<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>So Many Fish</title>
	<atom:link href="http://www.lisasawin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lisasawin.com</link>
	<description>...which is pretty cool when you think about it...</description>
	<lastBuildDate>Mon, 07 Jun 2010 20:30:12 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Add Individual Event to Calendar</title>
		<link>http://www.lisasawin.com/2010/06/07/add-individual-event-to-calendar/</link>
		<comments>http://www.lisasawin.com/2010/06/07/add-individual-event-to-calendar/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 20:11:53 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=148</guid>
		<description><![CDATA[A Drupal site I&#8217;m working on requires links for each event that would add the event to the user&#8217;s calendar.  I&#8217;d like to provide this functionality for iCal, Outlook and Google.  Drupals Calendar module offers something similar out of the box&#8211;there&#8217;s a feed which can deliver a an ics file on a per-day [...]]]></description>
			<content:encoded><![CDATA[<p>A Drupal site I&#8217;m working on requires links for each event that would add the event to the user&#8217;s calendar.  I&#8217;d like to provide this functionality for iCal, Outlook and Google.  Drupals Calendar module offers something similar out of the box&#8211;there&#8217;s a feed which can deliver a an ics file on a per-day basis.  I found some <a href="https://drupal.org/node/742146">great instructions</a> on how to deliver the ics for a single node.  This method handles repeating event really well, but I just can&#8217;t make it deal with all-day events.  No matter how I set my all day events up, the ics file delivers a start and end time.   I&#8217;ll keep digging and hopefully find a solution.  </p>
<p>To add the event to a Google calendar, I wrote a little code in my template.php file.  Here&#8217;s my code, combined with the code from above to handle the single node ics feed:</p>
<p><code>function THEME_preprocess_node(&amp;$vars, $hook) {<br />
  if ($vars['type'] == 'event') {<br />
    $node = $vars['node'];<br />
    $ics_link = "/calendar-single_ev_date/ical/".$node-&gt;nid;<br />
    $from = strtotime($node-&gt;field_ev_date[0]['value']);<br />
    $to = strtotime($node-&gt;field_ev_date[0]['value2']);<br />
    $event_title = str_replace(' ','+',$node-&gt;title);<br />
    $from_date = date('Ymd',$from);<br />
    $to_date = date('Ymd',$to);<br />
    $from_time_EST = date('His',strtotime($node-&gt;field_ev_date[0]['value']." UTC"));<br />
    $to_time_EST = date('His',strtotime($node-&gt;field_ev_date[0]['value2']." UTC"));<br />
    if ($from_time_EST == '000000' &amp;&amp; $to_time_EST == '000000') {<br />
      $google_link =<br />
'http://www.google.com/calendar/event?action=TEMPLATE&amp;text='.<br />
$event_title.'&amp;dates='.$from_date.'/'.<br />
$to_date.'&amp;<br />
location=CUSTOMER&amp;trp=false&amp;sprop=website:www.example.org&amp;'.<br />
'sprop;=name:CUSTOMER';<br />
    }else{<br />
      $from_time = date('His',$from);<br />
      $to_time = date('His',$to);<br />
      $google_link =<br />
'http://www.google.com/calendar/event?action=TEMPLATE&amp;text='.<br />
$event_title.'&amp;dates='.$from_date.'T'.$from_time.<br />
'Z/'.$to_date.'T'.$to_time.<br />
'Z&amp;location=CUSTOMER&amp;trp=false&amp;'.<br />
'sprop=website:www.example.org&amp;sprop;=name:CUSTOMER';<br />
    }<br />
    $repeat_string = $vars['node']-&gt;content['field_ev_date']['field']['#children'];<br />
    $regex = '/^&lt;div&gt;(.*?)&lt;\/div&gt;/';<br />
    $matches = array();<br />
    if (preg_match($regex, $repeat_string, $matches)) {<br />
      $search_strings = array('Repeats',' .','     ',' ');<br />
      $replace_strings = array('repeats','.','+','+');<br />
      $repeat_string =<br />
'&amp;details=Note:+This+event+'.str_replace($search_strings, $replace_strings, $matches[1]).'<br />
++Google+Calendar+does+not+allow+us+to+set+up+this+repeat+for+you.<br />
++Please+use+the+Repeats+button+above+to+do+so,+if+desired.';<br />
      $google_link .= $repeat_string;<br />
    }<br />
    $vars['add_to_ical']    = "<a href='".$ics_link."'>iCal</a>";<br />
    $vars['add_to_outlook'] = "<a href='".$ics_link."'>Outlook</a>";<br />
    $vars['add_to_google']  = '<a href="'.$google_link.'" target="_blank">&lt;img src="http://www.google.com/calendar/images/ext/gc_button1.gif" border=0&gt;</a>';<br />
  }<br />
}</code></p>
<p>Google has a <a href="http://www.google.com/googlecalendar/event_publisher_guide_detail.html">great API</a> on how to use this functionality.  It handles all day events perfectly, but doesn&#8217;t seem to have any way to deal with repeating events, despite the &#8220;All day&#8221; checkbox you get on their site.  I put a note for the user in the description box, which is unideal but will have to do.</p>
<p>We&#8217;re going to add some icons for iCal and Outlook, and we&#8217;ll be pretty much set.</p>
<p>Hey <a href="http://jamesboncek.com/">James</a>, thanks for your help with this!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/06/07/add-individual-event-to-calendar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Search Form restricted to particular node type, in a block.</title>
		<link>http://www.lisasawin.com/2010/04/27/search-form-restricted-to-particular-node-type-in-a-block/</link>
		<comments>http://www.lisasawin.com/2010/04/27/search-form-restricted-to-particular-node-type-in-a-block/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 17:25:55 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=135</guid>
		<description><![CDATA[A site I&#8217;m working on has quite a few search forms.  Basically, for each of the node types, we want to give the user an easy option to restrict search to only that type, ie events, blog posts, as well as a few custom content types.  Sometimes the node types will be presented [...]]]></description>
			<content:encoded><![CDATA[<p>A site I&#8217;m working on has quite a few search forms.  Basically, for each of the node types, we want to give the user an easy option to restrict search to only that type, ie events, blog posts, as well as a few custom content types.  Sometimes the node types will be presented by taxonomy term, so that the user should be able to easily search through events tagged &#8220;toddler,&#8221; for example.  Here&#8217;s how to construct these search boxes and place them into blocks.</p>
<p>First, construct a view which lists all of the content you&#8217;d like to search together.  For example, I&#8217;ve created a view called Event List.  In it, I filter based on node type == event.  I add another filter from the Search group, &#8220;Search:  Search Terms&#8221;.  This filter is exposed and optional.  On &#8220;empty input&#8221;, select &#8220;Show All&#8221;.  I created an argument for the taxonomy term and also choose a few fields.  Then, I created a page view and gave it the path &#8220;events/%&#8221;.  In the Basic Settings fieldset, change the setting &#8220;Exposed form in block&#8221; to &#8220;yes.&#8221;   Save!</p>
<p>Now, when you go to the Blocks page, you&#8217;ll see a block called &#8220;Exposed form:  Events-page_1&#8243; (or something nicer if you name your page).  You can just drag it to a sidebar for testing, but later on you&#8217;ll probably want to restrict where this block appears.  </p>
<p>When the block is displayed on /events/all, it searches all events.  When it is displayed on events/toddlers, it only searches within events tagged toddlers.  Just what we wanted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/04/27/search-form-restricted-to-particular-node-type-in-a-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Context and Menu Trail to establish subnavigation by taxonomy term</title>
		<link>http://www.lisasawin.com/2010/04/22/using-context-and-menu-trail-to-establish-subnavigation-by-taxonomy-term/</link>
		<comments>http://www.lisasawin.com/2010/04/22/using-context-and-menu-trail-to-establish-subnavigation-by-taxonomy-term/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 23:51:27 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=129</guid>
		<description><![CDATA[Context is a great module, but the settings page is a little misleading.  You can set a context to operate when a node tagged with a term.  You can set as a reaction that one of your menu items is made active.  However, when you navigate to the page for that node [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://drupal.org/project/context">Context</a> is a great module, but the settings page is a little misleading.  You can set a context to operate when a node tagged with a term.  You can set as a reaction that one of your menu items is made active.  However, when you navigate to the page for that node with the menu loaded into a block, the active item is not indicated.  Works fine if the menu is on the main part of the page, but not in a block.  This is true for any menu &#8212; primary, secondary or custom.</p>
<p>We&#8217;re working on a site which has the subnavigation in a sidebar.  It&#8217;s going to be used in a lot of different ways, but the simplest use case on this site is a blog, split into four categories.  Each category will be treated as its own mini-blog. The four categories will be in the sidebar.  When you&#8217;re viewing a post in the Book blog, then the Book link should be active in the sidebar.  </p>
<p>It turns out this is really easy to do if you use <a href="http://drupal.org/project/menutrails">Menu Trails</a>, in addition to Context.  Let context set up the display of the block holding the menu, but then associate each category with the correct menu item in Menu Trail.  Together, they will present the menu when you want it and highlight the correct link.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/04/22/using-context-and-menu-trail-to-establish-subnavigation-by-taxonomy-term/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Drupal Multisites as Git Submodules</title>
		<link>http://www.lisasawin.com/2010/03/15/configuring-drupal-multisites-as-git-submodules/</link>
		<comments>http://www.lisasawin.com/2010/03/15/configuring-drupal-multisites-as-git-submodules/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 14:01:09 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=115</guid>
		<description><![CDATA[After thinking about the set up in my previous post, I decided that I wanted a good way to push changes from the dev to the production site.  So, I found Simon Hamner&#8217;s post on using submodules for this and made some modifications.  I also got the whole setup working with 3 sites, [...]]]></description>
			<content:encoded><![CDATA[<p>After thinking about the set up in <a href='http://www.lisasawin.com/2010/03/09/setting-up-drupal-multisites-under-passenger-with-git/'>my previous post</a>, I decided that I wanted a good way to push changes from the dev to the production site.  So, I found <a href='http://www.simonhanmer.com/using_git_control_drupal_multi_site_setup'>Simon Hamner&#8217;s post</a> on using submodules for this and made some modifications.  I also got the whole setup working with 3 sites, dev.my-project.local, my-project.local and www.my-project.com.<br />
<span id="more-115"></span><br />
First, I set my server with a folder called git which will hold the bare repository for my application in git/drupal and the repository for my sites called git/sites:<br />
<code>$ mkdir git<br />
$ cd git<br />
$ cd sites<br />
$ git init</code></p>
<p>I added settings.php to a .gitignore file and checked the whole thing in to master, because I don&#8217;t ever want my sites folders to track the settings for a given location. Then, I moved up the sites code I developed earlier and checked it into a dev and production branch in git/sites.  I created the bare repository for git/drupal now too.</p>
<p>Then, I went back to my local machine and removed the sites I had developed.  I added them in as submodules instead:<br />
<code>$ git submodule add ssh://&amp;lt;snip&amp;gt;/git/sites sites/dev.my-project.local<br />
$ git submodule add ssh://&amp;lt;snip&amp;gt;/git/sites sites/my-project.local<br />
$ git submodule init</code></p>
<p>I made sure that each site was tracking the right branch and then checked the changes into the application branch of my project.  Next, I added the remote repository:<br />
<code>$ git remote add origin ssh://&amp;lt;snip&amp;gt;/git/drupal<br />
$ git push origin master<br />
$ git push origin modules-and-themes<br />
$ git push origin application</code></p>
<p>Now, I&#8217;m ready to clone this onto my host machine<br />
<code>$ git clone -l git/drupal/ production<br />
$ cd production<br />
$ git fetch<br />
$ git checkout -b  modules-and-themes<br />
$ git rebase origin/modules-and-themes<br />
$ git checkout -b application<br />
$ git rebase origin/application</code></p>
<p>and check in its application<br />
<code<br />
$ git submodule add ssh://&lt;snip&gt;/git/sites sites/www.my-project.com<br />
$ git submodule init<br />
</code></p>
<p>I pushed this up and pulled it down to my local machine, so now both repositories know all about my three sites.  I will only serve the two local sites locally and the www.my-project.com from my host, but I can live with that.  I like that I can work on the two branches (dev and production) on the various sites, merge changes and commit the results as submodules into the application branch of my Drupal site.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/03/15/configuring-drupal-multisites-as-git-submodules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Drupal multisites under Passenger, with Git</title>
		<link>http://www.lisasawin.com/2010/03/09/setting-up-drupal-multisites-under-passenger-with-git/</link>
		<comments>http://www.lisasawin.com/2010/03/09/setting-up-drupal-multisites-under-passenger-with-git/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 18:46:10 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=94</guid>
		<description><![CDATA[Here&#8217;s my steps for setting up a Drupal production and development site, with Drupal core and modules under separate Git control and running the whole thing under Passenger.  I got most of this framework from Version Control Blog, but instead of using separate repositories for Drupal core and modules, I use branches.  In [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my steps for setting up a Drupal production and development site, with Drupal core and modules under separate Git control and running the whole thing under Passenger.  I got most of this framework from <a href='http://www.versioncontrolblog.com/2007/08/02/upgrading-drupal-52-with-git/'>Version Control Blog</a>, but instead of using separate repositories for Drupal core and modules, I use branches.  In addition, I include the details of my Passenger setup.</p>
<p>One thing I really like about how <a href='http://www.versioncontrolblog.com'>Version Control Blog</a> illustrates this process, is setting up the project with an older version of Drupal and then upgrading at the end, to show how simple it is.  I will definitely follow that path.<br />
<span id="more-94"></span><br />
So, to begin with, create a folder with a fresh download of Drupal and commit it to Git.  At the command line:</p>
<p><code>$ drush dl drupal-6.15<br />
$ mv drupal-6.15 my-project<br />
$ cd my-project<br />
$ git init<br />
$ git add .<br />
$ git commit -m "Drupal 6.15 imported"</code></p>
<p>Now create the branch for your modules and download some modules for it:<br />
<code>$ git checkout -b "modules"<br />
$ drush dl cck<br />
$ git add .<br />
$ git commit -m "CCK 6.x-2.6 imported"<br />
$ drush dl views<br />
$ git add .<br />
$ git commit -m "Views 6.x-2.8 imported"<br />
$ git status</code></p>
<p>Now create the branch for your actual Drupal project:<br />
<code>$ git checkout -b application</code></p>
<p>Create two sites folders, one for a dev site, one for production:<br />
<code>$ mkdir sites/dev.my-projectlocal<br />
$ mkdir sites/my-project.local</code></p>
<p>Copy and rename sites/default/default.settings.php over to the two new sites folders:<br />
<code>$ cp sites/default/default.settings.php sites/dev.my-project.local/settings.php<br />
$ cp sites/default/default.settings.php sites/my-project.local/settings.php</code></p>
<p>Create the two databases in mysql:<br />
<code>mysql&gt; create database my_project;<br />
mysql&gt; create database my_project_development;</code></p>
<p>The next step is to configure Passenger to send requests for my-project.local and dev.my-project.local to our Drupal application.  For this, I need to edit my /etc/hosts file, adding these lines:<br />
<code>127.0.0.1 my-project.local<br />
127.0.0.1 dev.my-project.local</code></p>
<p>I setup Passenger via <a href='http://peepcode.com/products/phusion-passenger'>Peepcode&#8217;s Phusion Passenger screencast</a>, so my VirtualHost entry goes in a passenger_vhost.conf file and looks like this:<br />
<code>&amp;lt;VirtualHost *:80&amp;gt;<br />
    ServerName my-project.local<br />
    DocumentRoot /Library/WebServer/Documents/my-project<br />
&amp;lt;/VirtualHost *:80&amp;gt;<br />
&amp;lt;VirtualHost *:80&amp;gt;<br />
    ServerName dev. my-project.local<br />
    DocumentRoot /Library/WebServer/Documents/my-project<br />
&amp;lt;/VirtualHost *:80&amp;gt;</code></p>
<p>Don&#8217;t forget to restart your server:<br />
<code>$ sudo apachectl graceful</code></p>
<p>Now you should be able to navigate to http://my-project.local and http://dev.my-project.local and install these apps as usual.</p>
<p>When you are done, check the two sites folders into Git:<br />
<code>$ git add .<br />
$ git commit -m "Setting up development and production sites"</code></p>
<p>Don&#8217;t forget to block your webserver from exposing your Git files.  Add this line to your .htaccess file:<br />
<code>RewriteRule ^\.git - [F]</code></p>
<p>Check it into Git as well.  When I update from Drupal 6.15 to Drupal 6.16, Git nicely merges the changes to htaccess from the upgrade with my manual addition of this RewriteRule. </p>
<p>Now, here&#8217;s how to upgrade Drupal core.  I have a copy of the latest Drupal release in my Downloads directory.  I first switch back to my master branch, then copy the new Drupal files over to my project and then see what the changes are, just out of curiosity.  I add them all in to master, then checkout modules and merge master into that.  Then, I checkout application and merge modules into it.</p>
<p><code>$ git checkout master<br />
$ cp -Rf ~/Downloads/drupal-6.16/ .<br />
$ git status<br />
$  git add .<br />
$  git commit -m "Drupal 6.16 imported"<br />
$  git checkout modules<br />
$  git merge master<br />
$ git checkout application<br />
$  git merge modules</code></p>
<p>I&#8217;ll need to run the update.php script for each site, to update the databases, then I&#8217;m all set.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/03/09/setting-up-drupal-multisites-under-passenger-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import from Movable Type to Drupal</title>
		<link>http://www.lisasawin.com/2010/03/03/import-from-movable-type-to-drupal/</link>
		<comments>http://www.lisasawin.com/2010/03/03/import-from-movable-type-to-drupal/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 20:17:54 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=92</guid>
		<description><![CDATA[It seems like they&#8217;re been some problems along the way with the Import Typepad / MoveableType module and Drupal 6.  I had no problems with it though. I followed some, but not all of  Andrew Benkard&#8217;s suggestions.  Removing PRIMARY CATEGORY wasn&#8217;t necessary.  I loved how the user names don&#8217;t need to [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like they&#8217;re been some problems along the way with the <a href="http://drupal.org/project/import_typepad">Import Typepad / MoveableType</a> module and Drupal 6.  I had no problems with it though. I followed some, but not all of  <a href="http://www.marketingtechnician.com/blog/migrating-movable-type-drupal">Andrew Benkard&#8217;s suggestions</a>.  Removing PRIMARY CATEGORY wasn&#8217;t necessary.  I loved how the user names don&#8217;t need to match from Movable Type to Drupal&#8211;there&#8217;s a great gui for matching up the user names in Movable Type to the user names in Drupal.  This module is a huge help to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/03/03/import-from-movable-type-to-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theme Developer toasts drag-n-drop in Manage Fields</title>
		<link>http://www.lisasawin.com/2009/12/09/theme-developer-toasts-drag-n-drop-in-manage-fields/</link>
		<comments>http://www.lisasawin.com/2009/12/09/theme-developer-toasts-drag-n-drop-in-manage-fields/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 13:47:34 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=87</guid>
		<description><![CDATA[My Manage Fields page within Drupal Content Management lost drag and drop-ability, which turned out to because of this javascript error:

&#8216;$(&#8216;.indentation&#8217;, testCell).get(1)&#8217; [undefined] is not an object.

Turning off the Theme Developer module fixed it!
]]></description>
			<content:encoded><![CDATA[<p>My Manage Fields page within Drupal Content Management lost drag and drop-ability, which turned out to because of this javascript error:</p>
<blockquote><p>
&#8216;$(&#8216;.indentation&#8217;, testCell).get(1)&#8217; [undefined] is not an object.
</p></blockquote>
<p>Turning off the Theme Developer module fixed it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2009/12/09/theme-developer-toasts-drag-n-drop-in-manage-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing multiple domains hosted via vhost on other computers</title>
		<link>http://www.lisasawin.com/2009/10/07/viewing-multiple-domains-hosted-via-vhost-on-other-computers/</link>
		<comments>http://www.lisasawin.com/2009/10/07/viewing-multiple-domains-hosted-via-vhost-on-other-computers/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 19:59:58 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[rails hosting]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=14</guid>
		<description><![CDATA[I followed this excellent screencast on setting up Phusion Passenger and all was running well.  I can now develop multiple Rails apps simultaneously without starting/stopping my WebBrick server, which I love.  But how to view these apps from my networked PC&#8217;s?  All it took was an entry in the hosts file, which [...]]]></description>
			<content:encoded><![CDATA[<p>I followed <a href='http://peepcode.com/products/phusion-passenger'>this excellent screencast on setting up Phusion Passenger</a> and all was running well.  I can now develop multiple Rails apps simultaneously without starting/stopping my WebBrick server, which I love.  But how to view these apps from my networked PC&#8217;s?  All it took was an entry in the hosts file, which is here by default on both XP and Vista:</p>
<p>%SystemRoot%\system32\drivers\etc\</p>
<p><a href='http://en.wikipedia.org/wiki/Hosts_file#Location_and_content'>Thanks, Wikipedia!</a>  Now, on both my development machine and my others, I can use addresses like app.local to see work in progress.</p>
<p>One additional point:  in your Rails apps,  puts will write to your Apache error log, which may be located here:  /var/log/apache2/error_log.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2009/10/07/viewing-multiple-domains-hosted-via-vhost-on-other-computers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open prototip on page load</title>
		<link>http://www.lisasawin.com/2009/05/21/open-prototip-on-page-load/</link>
		<comments>http://www.lisasawin.com/2009/05/21/open-prototip-on-page-load/#comments</comments>
		<pubDate>Thu, 21 May 2009 12:21:01 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=11</guid>
		<description><![CDATA[I needed a prototip to open automatically on page load.  $(&#60;id&#62;).prototip.show() should do that, but it just wasn&#8217;t working.  Nick Stankenburg over on his Prototip forum gave me some ideas, but nothing worked until I set the prototip to open on a very short delay:
if(window.location.hash == '#vote-now') {
document.observe('dom:loaded', function() {
setTimeout("$('left-vote-button').prototip.show()",100);
});
} 
]]></description>
			<content:encoded><![CDATA[<p>I needed a prototip to open automatically on page load.  $(&lt;id&gt;).prototip.show() should do that, but it just wasn&#8217;t working.  Nick Stankenburg over on his <a href="http://www.nickstakenburg.com/forum/comments.php?DiscussionID=604">Prototip forum</a> gave me some ideas, but nothing worked until I set the prototip to open on a very short delay:<br />
<code>if(window.location.hash == '#vote-now') {<br />
document.observe('dom:loaded', function() {<br />
setTimeout("$('left-vote-button').prototip.show()",100);<br />
});<br />
} </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2009/05/21/open-prototip-on-page-load/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Privacy, caching and making Safari behave</title>
		<link>http://www.lisasawin.com/2008/08/17/privacy-caching-and-making-safari-behave/</link>
		<comments>http://www.lisasawin.com/2008/08/17/privacy-caching-and-making-safari-behave/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 17:01:22 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=9</guid>
		<description><![CDATA[One of the sites I&#8217;m working on has health related information, which is very important to keep private.  In particular, after the user logs out, we have to make its pages unavailable via the Back button.  it took some work to convince all browsers we meant it, but here&#8217;s what works for Safari [...]]]></description>
			<content:encoded><![CDATA[<p>One of the sites I&#8217;m working on has health related information, which is very important to keep private.  In particular, after the user logs out, we have to make its pages unavailable via the Back button.  it took some work to convince all browsers we meant it, but here&#8217;s what works for Safari 3, Firefox 2 &amp; 3 (Mac OS 10.4 Intel), IE 7, Firefox 2 &amp; 3 (Win XP and Vista), IE 6 (Win 2K):</p>
<p>Set the response headers in an after_filter:</p>
<blockquote><p>
def set_header<br />
   #Date in the past<br />
   headers["Expires"] = &#8220;Mon, 26 Jul 1997 05:00:00 GMT&#8221;<br />
   #always modified<br />
   headers["Last-Modified"] = &#8220;Mon, 26 Jul 1997 05:00:00 GMT&#8221;<br />
   headers["Cache-Control"] = &#8220;no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0&#8243;<br />
   #HTTP/1.0<br />
   headers["Pragma"] = &#8220;no-cache&#8221;<br />
 end<br />
</blockquote >
To make Safari behave, add this to all pages:</p>
<blockquote><p>
&lt;iframe style=&#8221;height:0px;width:0px;visibility:hidden&#8221; src=&#8221;about:blank&#8221;&gt;<br />
This frame prevents back forward cache in Safari.<br />
&lt;/iframe&gt;<br />
</blockquote >
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2008/08/17/privacy-caching-and-making-safari-behave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
