<?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>Adam Merrifield { the collective } &#187; php</title>
	<atom:link href="http://adam.merrifield.ca/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://adam.merrifield.ca</link>
	<description>the collective thoughts and web works of adam merrifield</description>
	<lastBuildDate>Sun, 05 Sep 2010 09:59:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>One of My Old Favorites All Fresh and New</title>
		<link>http://adam.merrifield.ca/2009/07/09/one-of-my-old-favorites-all-fresh-and-new/</link>
		<comments>http://adam.merrifield.ca/2009/07/09/one-of-my-old-favorites-all-fresh-and-new/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 17:26:53 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Generally]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rw]]></category>
		<category><![CDATA[sitepoint]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/07/09/one-of-my-old-favorites-all-fresh-and-new/</guid>
		<description><![CDATA[The postman just delivered my fresh copy of Build Your Own Database Driven Web Site Using PHP &#38; MYSQL, 4th Edition. It&#8217;s not that there was anything wrong with my previous copy, but it was getting a little dated. Plus I am a little nostalgic for this particular publication. With a quick glance I can [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm3.static.flickr.com/2499/3704013627_74d8b4fae3_m.jpg" alt="" class="image-right" style="width:128px;height:auto;" /></p>

<p>The postman just delivered my fresh copy of <em><a href="http://www.sitepoint.com/article/php-mysql-tutorial/" title="Build Your Own Database Driven Web Site Using PHP &amp; MySQL, Fourth Edition [PHP &amp; MySQL Tutorials]">Build Your Own Database Driven Web Site Using PHP &amp; MYSQL, 4th Edition</a></em>. It&#8217;s not that there was anything wrong with my previous copy, but it was getting a little dated. Plus I am a little nostalgic for this particular publication.</p>

<p>With a quick glance I can already see that the book has been restructured quite a bit moving chapters around. I am really looking forward to reading this book again with renewed purpose and updated perspectives.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2008/09/04/welcome-to-the-new-rw-updates/" title="Welcome to the new RW Updates (September 4, 2008)">Welcome to the new RW Updates</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/11/03/seydoggy-is-back-in-the-office/" title="seyDoggy is back in the office. (November 3, 2008)">seyDoggy is back in the office.</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/02/09/im-still-alive/" title="I&#039;m still alive (February 9, 2008)">I&#039;m still alive</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/09/28/i-cant-leave-well-enough-alone/" title="I can&#039;t leave well enough alone (September 28, 2007)">I can&#039;t leave well enough alone</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/09/24/define-your-rss-feed-title/" title="Define your RSS Feed title (September 24, 2007)">Define your RSS Feed title</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/07/09/one-of-my-old-favorites-all-fresh-and-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LittleSnapper Touch Is Soon to Hit Realmac Lineup</title>
		<link>http://adam.merrifield.ca/2009/03/10/littlesnapper-touch-is-soon-to-hit-realmac-lineup/</link>
		<comments>http://adam.merrifield.ca/2009/03/10/littlesnapper-touch-is-soon-to-hit-realmac-lineup/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 02:31:20 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Generally]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rapidweaver]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/03/10/littlesnapper-touch-is-soon-to-hit-realmac-lineup/</guid>
		<description><![CDATA[This looks interesting, a companion iPhone application to LittleSnapper (desktop Mac app) and QuickSnapper (web based snapshot sharing). It&#8217;s yet to be released but the new app, dubbed LittleSnapper Touch promises to allow the user to snap photos and webpages (or parts of them) and then post them to QuickSnapper. Anyone familiar with QuickSnapper will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.realmacsoftware.com/blog/index_files/littlesnapper_touch_iphone.php#unique-entry-id-35" title="Realmac Software Blog - RapidWeaver News"><img src="http://images.seydoggy.com/LittleSnapper_Touch_from_Realmac_Software-20090310-222849.jpg" alt="LittleSnapper Touch from Realmac Software" class="image-left" /></a><a href="http://www.realmacsoftware.com/blog/index_files/littlesnapper_touch_iphone.php#unique-entry-id-35" title="Realmac Software Blog - RapidWeaver News">This looks interesting</a>, a companion iPhone application to <a href="http://www.realmacsoftware.com/littlesnapper/" title="LittleSnapper - Screen and Web Snapping for Mac OS X Leopard">LittleSnapper</a> (desktop Mac app) and <a href="http://www.quicksnapper.com/" title="Welcome to QuickSnapper image hosting | QuickSnapper.com">QuickSnapper</a> (web based snapshot sharing). It&#8217;s yet to be released but the new app, dubbed <em>LittleSnapper Touch</em> promises to allow the user to snap photos and webpages (or parts of them) and then post them to QuickSnapper.</p>

<p>Anyone familiar with QuickSnapper will be aware that you will, in turn, be able to pull down those snaps into the desktop version of LittleSnapper with a simple click of the &#8220;Send to LittleSnapper&#8221; button. It&#8217;s not clear yet whether there will be any syncing option that will negate this step. I guess we&#8217;ll have to wait and see.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2008/11/03/seydoggy-is-back-in-the-office/" title="seyDoggy is back in the office. (November 3, 2008)">seyDoggy is back in the office.</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/04/16/screeeeeeeech%e2%80%a6-halt-3/" title="SCREEECH HALT 3 (April 16, 2007)">SCREEECH HALT 3</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2009/02/18/life-as-a-theme-developer/" title="Life As a Theme Developer (February 18, 2009)">Life As a Theme Developer</a> (1)</li>
	<li><a href="http://adam.merrifield.ca/about-2-2/" title="About Me (March 27, 2007)">About Me</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/11/30/time-machine-a-giant-leap-backward/" title="Time Machine. A giant leap backward. (November 30, 2007)">Time Machine. A giant leap backward.</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/03/10/littlesnapper-touch-is-soon-to-hit-realmac-lineup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control your processors in Mac OS X 10.5</title>
		<link>http://adam.merrifield.ca/2009/03/07/control-your-processors-in-mac-os-x-105/</link>
		<comments>http://adam.merrifield.ca/2009/03/07/control-your-processors-in-mac-os-x-105/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 15:02:53 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[processor]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/03/07/control-your-processors-in-mac-os-x-105/</guid>
		<description><![CDATA[Remarkably after nearly one month I am still trying to tweak my system just so. I think this is one of the last things though, my processor preference pane. By default, the CPU controls in Mac OS X 10.5 and not enabled and in fact, can&#8217;t be enabled unless you have the developer tools installed. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://images.seydoggy.com/control_your_processor-20090307-100022.jpg" alt="control your processor" class="image-left" />Remarkably after nearly one month I am still trying to tweak my system just so. I think this is one of the last things though, my processor preference pane. By default, the CPU controls in Mac OS X 10.5 and not enabled and in fact, can&#8217;t be enabled unless you have the developer tools installed.</p>

<p>I like to be able to turn off some of my processors when I am just doing day to day web design and theme development. It&#8217;s a good way to save some energy (it&#8217;s good to be green) and to be totally honest, coding in HTML, CSS, PHP, Javascript and XML isn&#8217;t all that processor intensive. With the developer tool installed you can do this. There two things you can do, you can run the CPUPalette.app and/or you can install processor preference pane.</p>

<p>The CPUPalette.app can be found in <code>/Library/Application Support/HWPrefs/</code>. It&#8217;s a simple app that doesn&#8217;t allow much other than turning the processors on or off. If you click the little pill button in the top right-hand corner you can see a couple of basic preferences for window type, sampling rates and information display. It&#8217;s a quick and easy way to both monitor how your cores are being taxed and whether or not you can afford to shut a few of them down.</p>

<p>Your other option, if you you are already familiar with your processor usage, is to install the processor preference pane. Go to <code>/Developer/Extras/PreferencePanes</code> and find <code>Processor.prefPane</code>. Double click to install it. Once installed I highly suggest you click the &#8220;Show control in menu bar&#8221; for quick access. You&#8217;ll notice by installing the processor preference pane you get access to the CPUPalette.app without having to dig for it.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2008/08/25/my-top-5-web-development-tools/" title="My top 5 web development tools (August 25, 2008)">My top 5 web development tools</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/about-2-2/" title="About Me (March 27, 2007)">About Me</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/12/14/textmate-html-and-css-bundles-for-power-users/" title="TextMate HTML and CSS bundles for power users (December 14, 2007)">TextMate HTML and CSS bundles for power users</a> (3)</li>
	<li><a href="http://adam.merrifield.ca/2008/07/17/seydoggy-and-rapidweaver-a-new-approach/" title="seyDoggy and RapidWeaver, a new approach (July 17, 2008)">seyDoggy and RapidWeaver, a new approach</a> (2)</li>
	<li><a href="http://adam.merrifield.ca/2007/10/25/rapidweaver-tip-add-native-search/" title="RapidWeaver tip: Add native search (October 25, 2007)">RapidWeaver tip: Add native search</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/03/07/control-your-processors-in-mac-os-x-105/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let Them Know You&#039;re Open With PHP</title>
		<link>http://adam.merrifield.ca/2009/03/05/let-them-know-youre-open-with-php/</link>
		<comments>http://adam.merrifield.ca/2009/03/05/let-them-know-youre-open-with-php/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 20:47:07 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rapidweaver]]></category>
		<category><![CDATA[seydesign]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/03/05/let-them-know-youre-open-with-php/</guid>
		<description><![CDATA[I wanted a php script that would inform visitors to a web page that the office was either open or closed, depending on the day of the week and what time of day it was. I made a half hearted attempt to find one on the internet, but to be honest I knew I could [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://images.seydoggy.com/come_in_we_re_open-20090305-154449.jpg" alt="office hours" class="image-right" />I wanted a php script that would inform visitors to a <a href="http://www.seydesign.com/support/contact_us/" title="contact us | support | seyDesign Professional RapidWeaver themes">web page</a> that the office was either open or closed, depending on the day of the week and what time of day it was. I made a half hearted attempt to find one on the internet, but to be honest I knew I could write one faster. I thought of making it a proper extensible class but thought I&#8217;d better move on before I tie up too much time in it.</p>

<p>It&#8217;s pretty basic but I thought some of you might find it handy for your own purposes. The directions are in the script itself which you can <a href="http://www.seydoggy.com/downloads/officeHours.php.zip" title="">download here</a>.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2008/02/01/web-search-with-quicksilver-the-definitive-how-to/" title="Web Search with Quicksilver: how-to (February 1, 2008)">Web Search with Quicksilver: how-to</a> (3)</li>
	<li><a href="http://adam.merrifield.ca/2008/06/26/we-finally-launched-seydesign-2008/" title="We finally launched seyDesign 2008 (June 26, 2008)">We finally launched seyDesign 2008</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/11/03/seydoggy-is-back-in-the-office/" title="seyDoggy is back in the office. (November 3, 2008)">seyDoggy is back in the office.</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/02/09/im-still-alive/" title="I&#039;m still alive (February 9, 2008)">I&#039;m still alive</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/11/06/from-pixels-to-paper-were-getting-noticed/" title="From pixels to paper, we&#039;re getting noticed (November 6, 2008)">From pixels to paper, we&#039;re getting noticed</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/03/05/let-them-know-youre-open-with-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Auto mount/unmount your Mac volumes when required</title>
		<link>http://adam.merrifield.ca/2009/02/25/auto-mountunmount-your-mac-volumes-when-required/</link>
		<comments>http://adam.merrifield.ca/2009/02/25/auto-mountunmount-your-mac-volumes-when-required/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 18:25:39 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plist]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[unmount]]></category>
		<category><![CDATA[volumes]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/02/25/auto-mountunmount-your-mac-volumes-when-required/</guid>
		<description><![CDATA[Earlier this month you might recall the solution I gave you for keeping unused volumes unmounted on your mac. The next part of the equation, automatically mounting those volumes when needed to run my backup scheme, took me a little longer to sort out. In fact I wasn&#8217;t able to write a solution on my [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this month you might recall the solution I gave you for <a href="http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/" title="seyDoggy Web and Graphic Design - seyDoggy weblog - my thoughts on the web and the mac">keeping unused volumes unmounted</a> on your mac. The next part of the equation, automatically mounting those volumes when needed to run my backup scheme, took me a little longer to sort out. In fact I wasn&#8217;t able to write a solution on my own, try as I might, so I finally went searching for one.</p>

<p>I needed a script of some sort that would mount my unmounted volumes when it was time for <a href="http://www.econtechnologies.com/pages/cs/chrono_overview.html" title="ChronoSync | Perform File and Folder Synchronizations and Backups Like Clockwork | Econ Technologies">ChronoSync</a> to run and then unmount my volumes when ChronoSync was finished. After several IRC queries, forum posts here and there and countless Google searches I finally stumbled upon <a href="http://www.macosxhints.com/article.php?story=20060308154312630" title="macosxhints.com - A script to mount/unmount a volume on app launch">this post</a> at Mac OS X Hints. This solution was the answer I needed and it works perfectly. I won&#8217;t recap the whole thing here, but I will give you the bits that were most important to me.</p>

<p>Copy the following script into <em>Script Editor.app</em> (<code>/Applications/AppleScript/Script Editor.app</code>), changing the <code>diskname</code> and <code>appname</code> to suite your needs:</p>

<div style="margin-bottom: 1em; padding: 5px; border:1px solid; width:98%; overflow:scroll">
    <pre>property diskname : "MyDisk"
property appname : "ChronoSync"

on idle
  tell application "System Events"
    set x to the name of every process
    if appname is not in x then
      if (exists the disk diskname) then
        do shell script "disktool -l | egrep -i "Mountpoint = '/Volumes/" &#038; diskname &#038; "" | cut -d\' -f2 | xargs -n1 disktool -p"
      end if
    else
      do shell script "disktool -l | egrep -i "Mountpoint = '', fsType = 'hfs', volName = '" &#038; diskname &#038; "" | cut -d\' -f2 | xargs -n1 disktool -m"
    end if
  end tell
end idle</pre>
</div>

<p>Next you need to save it as a bundled app and select &#8220;<em>Stay Open</em>&#8220;, give it a useful name and save it where you will be able to find it. In my case I chose <code>/Library/Scripts/ChronoSync/</code>:</p>

<p><img src="http://images.seydoggy.com/Save_as_MountDisk_app_bundle-20090225-134228.jpg" alt="Save as dialog box in Script Editor.app" title="Save your script as a bundled application" /></p>

<p>Then you have to make it run in the background. To do this, find your newly created app, right click on it, &#8220;<em>Show Package Contents</em>&#8220;, find the Info.plist and open that in your favorite plain text editor. Above the key that says <code>CFBundleAllowMixedLocalizations</code> you want to add the following:</p>

<p><code><pre>&lt;key&gt;LSBackgroundOnly&lt;/key&gt;
&lt;string&gt;1&lt;/string&gt;</pre></code></p>

<p>Get out of the package and find your app again and double click on it. It should launch in the background but not show in the dock. You can see that it&#8217;s running by opening <em>Activity Monitor.app</em> (<code>/Applications/Utilities/Activity Monitor.app</code>):</p>

<p><img src="http://images.seydoggy.com/Activity_Monitor_showing_MountDisk_app_running-20090225-134317.jpg" alt="Activity Monitor showing our disk mounting app working" title="Activity Monitor showing our disk mounting app working" /></p>

<p>Now to truly make this process automated, you need this app to be on when your computer is on, so it needs to launch when you login. So open your Accounts preference pane in System Preferences.app (<code>/Applications/System Preferences.app</code>), select the <em>Login Items</em> tab, select the <img src="http://images.seydoggy.com/plus_button-20090225-131250.jpg" alt="plus button" title="plus button" /> button and add your newly created app:</p>

<p><img src="http://images.seydoggy.com/add_the_new_disk_mounting_app_to_your_login_items-20090225-134157.jpg" alt="add your newly created disk mounting app to your login items" title="add your newly created disk mounting app to your login items" /></p>

<p>And that&#8217;s it! Next time your backup program fires up to do it&#8217;s regularly scheduled backups, your disk mounting app will mount your volume, wait for your backup app to finish and then quietly tuck your volume back up for the night.</p>

<h2>Other references</h2>

<ol>
<li><a href="http://www.macosxhints.com/article.php?story=20060308154312630" title="macosxhints.com - A script to mount/unmount a volume on app launch">A Script to mount/unmount a volume on app launch</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20040905112951299" title="macosxhints.com - An AppleScript to mount, run, unmount a disk image">An AppleScript to mount, run, unmount a disk image</a></li>
<li><a href="http://www.well.com/~jfw/software/mountpart/" title="John F. Whitehead - MountPart - Mount/Unmount Individual Partitions">MountPart</a></li>
</ol>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2009/02/12/keeping-unused-hard-disks-unmounted/" title="Keeping unused hard disks unmounted (February 12, 2009)">Keeping unused hard disks unmounted</a> (7)</li>
	<li><a href="http://adam.merrifield.ca/2007/11/30/time-machine-a-giant-leap-backward/" title="Time Machine. A giant leap backward. (November 30, 2007)">Time Machine. A giant leap backward.</a> (5)</li>
	<li><a href="http://adam.merrifield.ca/2007/08/13/skitch-snap-draw-share/" title="Skitch &#8211; Snap, Draw, Share (August 13, 2007)">Skitch &#8211; Snap, Draw, Share</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/08/25/my-top-5-web-development-tools/" title="My top 5 web development tools (August 25, 2008)">My top 5 web development tools</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/07/23/compulsive-blogging-part-4/" title="Compulsive Blogging Part 4 (July 23, 2007)">Compulsive Blogging Part 4</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/02/25/auto-mountunmount-your-mac-volumes-when-required/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YourHead launches Stacks 1.0</title>
		<link>http://adam.merrifield.ca/2009/02/18/yourhead-launches-stacks-10/</link>
		<comments>http://adam.merrifield.ca/2009/02/18/yourhead-launches-stacks-10/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 04:20:57 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rapidweaver]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[stacks]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yourhead]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/02/18/yourhead-launches-stacks-10/</guid>
		<description><![CDATA[Fellow RapidWeaver developer, Isaiah of YourHead Software announced today that Stacks, a fluid layout plugin for RapidWeaver, is now official, hitting the big version 1.0. Those of you familiar with YourHead&#8217;s previous heavy hitting page layout tool, Blocks, will immediately recognize what this RapidWeaver plugin is all about, but the two are as different as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yourhead.com/stacks" title="Stacks"><img src="http://www.yourhead.com/stacks/index_files/stacks_image_186_1.jpg" alt="Stacks" class="image-right" /></a>Fellow RapidWeaver developer, Isaiah of <a href="http://www.yourhead.com/" title="YourHead Software">YourHead Software</a> announced today that <a href="http://www.yourhead.com/stacks" title="Stacks">Stacks</a>, a fluid layout plugin for <a href="http://www.realmacsoftware.com/rapidweaver/" title="RapidWeaver 4 - Powerful Web Design Software for Mac OS X">RapidWeaver</a>, is now official, hitting the big version 1.0. Those of you familiar with YourHead&#8217;s previous heavy hitting page layout tool, <a href="http://www.yourhead.com/blocks/" title="Blocks">Blocks</a>, will immediately recognize what this RapidWeaver plugin is all about, but the two are as different as night and day.</p>

<p>Don&#8217;t get me wrong, Blocks is a brilliant feat of plugin engineering and is the life blood of literally throngs of RapidWeaver users unable to do such layouts on their own. But it&#8217;s not a plugin that ever fit my web design sensibilities. The web is fluid, ever changing, growing, shrinking&#8230; for me, Blocks was too rigid.</p>

<p>Enter Stacks; a completely fluid, flexible, drag&#8217;n'drop all about layout tool for RapidWeaver that can generate oodles stacked up, blocked up, split up, embedded here and there kind of page layouts that only a pocket full of hand coded snippets could achieve perviously. Just like Blocks, Stacks allows to drop in text, HTML, images and whatnot, but then it allows to stacks onto stacks and those onto more stacks. You can make columns, columns in columns, columns where one column is an image, one is some code, one is some text, etc&#8230; drag that under some more columns&#8230; before you know it, you&#8217;ve got your very own <a href="http://960.gs/" title="960 Grid System">960 Grid System</a> built into a RapidWeaver plugin.</p>

<p>If you are looking for the ultimate in flexible page layout with RapidWeaver, go <a href="http://www.yourhead.com/stacks/" title="Stacks">check out Stacks</a>. There are some great movies demonstrating the raw power of it and there is also and <a href="http://www.yourhead.com/wikiwiki/index.php?title=Stacks_Library_API" title="Stacks Library API - YourHead">Stacks API</a> if you&#8217;re interested in creating a custom Stacks library or two.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2007/07/23/compulsive-blogging-part-4/" title="Compulsive Blogging Part 4 (July 23, 2007)">Compulsive Blogging Part 4</a> (4)</li>
	<li><a href="http://adam.merrifield.ca/2007/12/14/textmate-html-and-css-bundles-for-power-users/" title="TextMate HTML and CSS bundles for power users (December 14, 2007)">TextMate HTML and CSS bundles for power users</a> (3)</li>
	<li><a href="http://adam.merrifield.ca/2008/08/25/my-top-5-web-development-tools/" title="My top 5 web development tools (August 25, 2008)">My top 5 web development tools</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2009/02/18/life-as-a-theme-developer/" title="Life As a Theme Developer (February 18, 2009)">Life As a Theme Developer</a> (1)</li>
	<li><a href="http://adam.merrifield.ca/2007/10/24/elbow-deep-in-php-search-engines/" title="Elbow deep in php search engines (October 24, 2007)">Elbow deep in php search engines</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/02/18/yourhead-launches-stacks-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Keeping unused hard disks unmounted</title>
		<link>http://adam.merrifield.ca/2009/02/12/keeping-unused-hard-disks-unmounted/</link>
		<comments>http://adam.merrifield.ca/2009/02/12/keeping-unused-hard-disks-unmounted/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 05:02:20 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[hard drive]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macintosh]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rw]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[son]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[unmount]]></category>
		<category><![CDATA[volumes]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/</guid>
		<description><![CDATA[The question How do you prevent Mac OS X Leopard from auto mounting disks, drives and volumes when the computer boots up or a user logs in? (skip to the solution) The preamble I have spent days (literally) searching for the answer to this one; I have a Mac Pro running Leopard with (count them) [...]]]></description>
			<content:encoded><![CDATA[<h2>The question</h2>

<p>How do you prevent Mac OS X Leopard from auto mounting disks, drives and volumes when the computer boots up or a user logs in? (<a href="http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#shortcut02-11-09-22-27">skip to the solution</a>)</p>

<h2>The preamble</h2>

<p>I have spent days (literally) searching for the answer to this one; I have a Mac Pro running Leopard with (count them) 4 internal hard drives. One is my system disk and the other 3 are backup disks. Two are weekly mirrors of my system while the third is a daily snap shot of my user account. We won&#8217;t even get into the external disks I have. Yes I am THAT anal about my data.</p>

<p>So what is the trouble here? When you have this many disks containing duplicate data, <a href="http://www.apple.com/macosx/features/300.html#spotlight" title="Apple - Mac OS X Leopard - Features - 300+ New Features">Spotlight</a>, <a href="http://groups.google.com/group/blacktree-quicksilver" title="Blacktree: Quicksilver | Google Groups">QuickSilver</a>, <a href="http://www.obdev.at/launchbar/" title="LaunchBar 5 Beta">Launchbar</a>, <a href="http://code.google.com/p/qsb-mac/" title="qsb-mac - Google Code">Google QSB</a>, etc&#8230; they all want to serve up information found on each disk. That would include duplicate information that you most likely don&#8217;t want to inadvertently open and/or edit. But further to this, why spin up a disk, potential shortening it&#8217;s life span and wasting precious energy, when it only gets used on occasion?</p>

<p>One way around this is to diligently eject each volume every time you boot up your system. But that is both a pain in the butt and no where near as geeky as it should be. So do a quick search on Google for a solution to &#8220;unmount disk on login&#8221; or &#8220;prevent volumes from mounting at the boot up in Mac OS X Leopard&#8221; and you get a great deal of outdated info, inefficient Apple Scripts, overly complex bash commands, apps that wrap bash in an executable app that you launch at login when the moon is at&#8230; you get the idea.</p>

<p>So I set forth to put together the best of the best and simplest of the simple and post it here, for my own reference, exactly what <em>I</em> did to prevent my back up volumes from mounting on boot up.</p>

<div id="shortcut02-11-09-22-27"></div>

<h2>My Solution (proceed at your own risk)</h2>

<p>First off, what you are going to find with most solutions out there is the need for a file called <a href="http://en.wikipedia.org/wiki/Fstab" title="fstab - Wikipedia, the free encyclopedia">fstab</a> in the systems hidden &#8220;/etc&#8221; folder. The trouble is that later versions of OS X (10.4.x and later) don&#8217;t have this file. <em>However</em>, there <em>IS</em> a redundant file called fstab.hd. <em>WE ARE NOT USING THIS FILE</em>. Instead we will create our own fstab file. So with <em>that</em> out of the way, let&#8217;s get started:</p>

<h3>The short of it</h3>

<ol>
<li>Start by making a backup of your system. If you bugger up your system you&#8217;ll have something to recover from.</li>
<li>Open terminal (/Applications/Utilities/Terminal.app)</li>
<li>Do one on the following:

<ul>
<li>In Terminal, type the following (with your volume name) and return <a href="http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note1"><code>*</code></a>:
<code>diskutil info /volumes/DiskName</code>
<img src="http://images.seydoggy.com/diskutil_info_volume_DiskName-20090211-215727.jpg" alt="diskutil info volumes DiskName" title="diskutil info volumes DiskName" /></li>
<li>Or, you can use Apples Disk Utility app (/Applications/Utilities/Disk Utility.app), select the disk in question and choose &#8220;info&#8221; from the toolbar.
<img src="http://images.seydoggy.com/Disk_Utility_information-20090211-215916.jpg" alt="Disk Utility information" title="Disk Utility information" /></li>
</ul></li>
<li>Find the Volume <a href="http://en.wikipedia.org/wiki/UUID" title="Universally Unique Identifier - Wikipedia, the free encyclopedia">UUID</a> (Universal Unique Identifier). Copy the UUID to your clipboard <a href="http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note2"><code>**</code></a>.</li>
<li>In Terminal enter and return <a href="http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note3"><code>***</code></a>:
<code>sudo pico /etc/fstab</code></li>
<li>Enter your password and return.</li>
<li>You&#8217;ll enter a window that looks like this:
<img src="http://images.seydoggy.com/sudo_pico_etc_fstab-20090211-220250.jpg" alt="sudo pico etc fstab" title="sudo pico etc fstab" /></li>
<li>Enter the following (with your UUID) and return <a href="http://www.seydoggy.com/2009/02/12/keeping-unused-hard-disks-unmounted/#note4"><code>****</code></a>:
<code>UUID=87635CC4-B2EF-3114-B854-F64347A39630 none hfs rw,noauto 0 0</code></li>
<li>Repeat step for each device you with to hide, each on a new line.
<img src="http://images.seydoggy.com/device_id_moint_point_filesystem_options_boolean-20090211-221144.jpg" alt="device id, mount point, filesystem, mount options, dump and fsck options" title="device id, mount point, filesystem, mount options, dump and fsck options" /></li>
<li>Exit pico (&amp;#x2303;X) and save (Y).</li>
<li>Press return when prompted with:
<code>File Name to Write: /etc/fstab</code>
<img src="http://images.seydoggy.com/File_Name_to_Write_etc_fstab-20090211-221654.jpg" alt="File Name to Write: /etc/fstab" title="File Name to Write: /etc/fstab" /></li>
<li>All that&#8217;s left to do is is cross your fingers and reboot your Mac.</li>
</ol>

<h3>The long of it</h3>

<ul>
<li><span id="note1"><code>*</code></span> substitute &#8220;DiskName&#8221; for the name of the volume you wish to hide. If your volume name contains a space, like &#8220;Macintosh HD&#8221; you need to escape the space with a backslash so it looks like &#8220;Macintosh\ HD&#8221;</li>
<li><span id="note2"><code>**</code></span> We use the &#8220;Volume UUID&#8221; as the disk identifier since it is not prone to change like &#8220;Device Identifier&#8221; (i.e. &#8220;disk0s2&#8243;) which can change with each and every start up.</li>
<li><span id="note3"><code>***</code></span> This will create/edit your &#8220;/etc/fstab&#8221; file with <a href="http://tinyurl.com/bstnru" title="Pico (text editor) - Wikipedia, the free encyclopedia">pico</a>, a simple text editor.</li>
<li><p><span id="note4"><code>****</code></span> The string you are entering is the device id followed by the mount point, the filesystem, the mount options, the dump and fsck booleans. In this case:</p>

<ul>
<li>the device is my UUID (UUID=87635CC4-B2EF-3114-B854-F64347A39630)</li>
<li>the mount point is &#8220;none&#8221; (because we won&#8217;t be mounting it)</li>
<li>the file system is &#8220;hfs&#8221; (since it&#8217;s formatted for Mac)</li>
<li>the mount options are &#8220;rw&#8221; (read-write) and &#8220;noauto&#8221; (volume will not auto mount)</li>
<li>the dump option (backup utility) and fsck option (filesystem check utility) booleans are both set to 0 (false, off, nil, nada) since we don&#8217;t plan to mount the volume and therefor don&#8217;t need to backup or check them</li>
</ul>

<p>For more on fstab column structures, visit <a href="http://www.tuxfiles.org/linuxhelp/fstab.html" title="How to edit and understand /etc/fstab">tuxfiles fstab help</a>.</p></li>
</ul>

<h2>The wrap-up</h2>

<p>For whatever reason, Apple decided to nix fstab from it&#8217;s own Unix core. Perhaps for security or perhaps they just deemed it unnecessary. If you look in the <em>other</em> file I mentioned, &#8220;/etc/fstab.hd&#8221; (in terminal, enter and return: <code>sudo pico /etc/fstab.hd</code>), you&#8217;ll see the message:</p>

<blockquote>
  <p>IGNORE THIS FILE.
  This file does nothing, contains no useful data, and might go away in
  future releases.  Do not depend on this file or its contents.</p>
</blockquote>

<p>However, I see no harm in extending the life expectancy of my disks and saving energy at the same time. All while doing away with the annoyance of long indexing times and being inundated with duplicate search results. If you have anything to add, please feel free to leave a comment.</p>

<h2>Other references</h2>

<ol>
<li><a href="http://www.macosxhints.com/article.php?story=20060218083814209" title="macosxhints.com - Unmount a volume (on login) via AppleScript">Mac OS X Hints from 2006</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=2005052804075538" title="macosxhints.com - Unmount a volume at startup">Mac OS X Hints from 2005</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20040624012142602" title="macosxhints.com - A script to unmount cloned backup volumes at login">Mac OS X Hints from 2004</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20030227194830916" title="macosxhints.com - Create a more dynamic fstab using UUIDs">Mac OS X Hints from 2003</a></li>
<li><a href="http://www.macseven.com/files/20070719_how_to_prevent_a_drive_volume_from_mounting.html" title="How to prevent a drive volume from mounting | Tips &amp;amp; Tricks | MacSeven.com">MacSeven from 2007</a></li>
<li><a href="http://www.gigoblog.com/2007/05/01/prevent-mac-os-x-from-mounting-a-hard-drive-volume-at-boot/" title="Garbage In Garbage Out : Tech Blog  -   &amp;raquo; Prevent Mac OS X from mounting a hard drive volume at boot">Garbage In Garbage Out from 2007</a></li>
<li><a href="http://en.wikipedia.org/wiki/UUID" title="Universally Unique Identifier - Wikipedia, the free encyclopedia">UUID on Wikipedia</a></li>
<li><a href="http://tinyurl.com/bstnru" title="Pico (text editor) - Wikipedia, the free encyclopedia">Pico on Wikipedia</a></li>
<li><a href="http://www.tuxfiles.org/linuxhelp/fstab.html" title="How to edit and understand /etc/fstab">How to edit and understand fstab files</a></li>
</ol>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2009/02/25/auto-mountunmount-your-mac-volumes-when-required/" title="Auto mount/unmount your Mac volumes when required (February 25, 2009)">Auto mount/unmount your Mac volumes when required</a> (2)</li>
	<li><a href="http://adam.merrifield.ca/2007/11/30/time-machine-a-giant-leap-backward/" title="Time Machine. A giant leap backward. (November 30, 2007)">Time Machine. A giant leap backward.</a> (5)</li>
	<li><a href="http://adam.merrifield.ca/2007/08/13/skitch-snap-draw-share/" title="Skitch &#8211; Snap, Draw, Share (August 13, 2007)">Skitch &#8211; Snap, Draw, Share</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2009/10/27/creating-unique-ids-for-anything/" title="Creating Unique ID&#039;s For&#8230; Anything! (October 27, 2009)">Creating Unique ID&#039;s For&#8230; Anything!</a> (1)</li>
	<li><a href="http://adam.merrifield.ca/2007/03/27/the-bigbox/" title="The BigBox (March 27, 2007)">The BigBox</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/02/12/keeping-unused-hard-disks-unmounted/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Working with PHP, PEAR and MAMP</title>
		<link>http://adam.merrifield.ca/2009/02/04/working-with-php-pear-and-mamp/</link>
		<comments>http://adam.merrifield.ca/2009/02/04/working-with-php-pear-and-mamp/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 17:32:47 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.nutmac.com/2009/02/04/working-with-php-pear-and-mamp/</guid>
		<description><![CDATA[So I am starting to play around with PEAR in my PHP development and since I use MAMP I thought I better brush up on getting these extensions to load via the command line like they show for each extension. Knowing that MAMP works things a little differently than what&#8217;s already on my Mac I [...]]]></description>
			<content:encoded><![CDATA[<p>So I am starting to play around with <a href="http://pear.php.net" title="The PHP Extension and Application Repository">PEAR</a> in my PHP development and since I use <a href="http://www.mamp.info/" title="living-e AG: MAMP - Mac - Apache - MySQL - PHP">MAMP</a> I thought I better brush up on getting these extensions to load via the command line like they show for each extension. Knowing that MAMP works things a little differently than what&#8217;s already on my Mac I knew that there would be some trick to getting this to work. A quick Google search brought me to <a href="http://www.gringod.com/2007/02/27/using-mamp-on-a-mac/" title="GrinGod [dot] Com &raquo; Using MAMP on a Mac">this article</a> which taught me just what I needed. Sweet!</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2008/08/25/my-top-5-web-development-tools/" title="My top 5 web development tools (August 25, 2008)">My top 5 web development tools</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/03/04/sneak-peek-2/" title="Sneak peek #2 (March 4, 2008)">Sneak peek #2</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2007/08/13/nutmac-goes-skitchy/" title="nutMac goes Skitchy (August 13, 2007)">nutMac goes Skitchy</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2009/03/07/control-your-processors-in-mac-os-x-105/" title="Control your processors in Mac OS X 10.5 (March 7, 2009)">Control your processors in Mac OS X 10.5</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/02/12/configuring-textmate-sql-to-play-with-mamp/" title="Configuring TextMate SQL to play with MAMP (February 12, 2008)">Configuring TextMate SQL to play with MAMP</a> (11)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/02/04/working-with-php-pear-and-mamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use RapidWeaver&#039;s %pathto()% syntax in javascript files</title>
		<link>http://adam.merrifield.ca/2009/01/26/use-rapidweavers-pathto-syntax-in-javascript-files/</link>
		<comments>http://adam.merrifield.ca/2009/01/26/use-rapidweavers-pathto-syntax-in-javascript-files/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 18:00:00 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rapidweaver]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/wordpress/?p=82</guid>
		<description><![CDATA[UPDATE (2009-07-17): We have updated the code to account for those who were having trouble understanding the reg-ex nature of rTrim. The new code and instructions should make it harder to mess up your path. It may take me a while sometimes, but there is one simple truth about my workflow, I always strive to [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color:red;">UPDATE (2009-07-17):</span> <span style="font-style:italic;">We have <a href="http://www.seydoggy.com/2009/01/26/use-rapidweavers-pathto-syntax-in-javascript-files/#jsPathtoCodeDownload">updated the code</a> to account for those who were having trouble understanding the reg-ex nature of rTrim. The new code and instructions should make it harder to mess up your path.</span></p>

<p><img src="http://images.seydoggy.com/filetype_js-20090126-123231.png" alt="filetype_js" class="image-left"/>It may take me a while sometimes, but there is one simple truth about my workflow, I always strive to have the most efficient way of getting things done. This is especially true in RapidWeaver theme development. Developing themes for RapidWeaver is not like standard web design. You have no way of knowing how each user will structure their site, what plugins they&#8217;ll use, what they&#8217;ll add to their pages&#8230; All of these uncertanties leave us as developers scratching our heads sometimes, trying to sort out ways of dynamically including things and stuff without the end user being able to break it.</p>

<p>PHP would be the obvious choice here, but we don&#8217;t have the luxury of knowing what the end users hosting environment will be and whether they could, or even would be willing to support a host of PHP functions. So the next best thing is javascript; yes it&#8217;s a little slower and it does depending on the end user having javascript enabled, but the ubiquity of javascript has never been as great as it is today.</p>

<p>One thing that has plagued RapidWeaver developers for some time is how to utilize RapidWeaver&#8217;s &#37;pathto()&#37; syntax, the bit of code that allows RapidWeaver to imprint the end users chosen common file path, in any other file other than the index.html template file. For any javascript file that has required the inclusion of another file, we&#8217;ve previously had to fill our html with scripted variables for each file, each using the &#37;pathto()&#37; syntax and so forth until we have built a separate path to each file from outside our javascript that actually requires it. Since RapidWeaver will only write the path to files it can actually find, you need to do this for each and every file.</p>

<p>Today I had an AH-HA moment while in need of multiple paths to be defined for use in various javascript files. I decide to write a small bit of code that grabs RapidWeaver&#8217;s &#37;pathto()&#37; syntax while it chases a real file. Then I strip out the actual file name, and KABLOW! you have a common file path in the the form of a javascript variable, ready to be used in any javascript file you like.</p>

<p id="jsPathtoCodeDownload"><a href="http://www.codecollector.net/seyDoggy/javascript/5148/jsPathtosrcjs" rel="external">Get the source code</a>.<br /><a href="http://www.codecollector.net/seyDoggy/javascript/5147/jsPathtojs" rel="external">Get the code</a>.<br /><a href="http://www.codecollector.net/seyDoggy/javascript/5149/jsPathtominjs" rel="external">Get the minimized code</a>.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2007/12/14/textmate-html-and-css-bundles-for-power-users/" title="TextMate HTML and CSS bundles for power users (December 14, 2007)">TextMate HTML and CSS bundles for power users</a> (3)</li>
	<li><a href="http://adam.merrifield.ca/2009/02/18/yourhead-launches-stacks-10/" title="YourHead launches Stacks 1.0 (February 18, 2009)">YourHead launches Stacks 1.0</a> (1)</li>
	<li><a href="http://adam.merrifield.ca/2008/02/01/web-search-with-quicksilver-the-definitive-how-to/" title="Web Search with Quicksilver: how-to (February 1, 2008)">Web Search with Quicksilver: how-to</a> (3)</li>
	<li><a href="http://adam.merrifield.ca/2008/11/05/to-be-strict-or-not-to-be/" title="To be Strict or not to be (November 5, 2008)">To be Strict or not to be</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/07/17/seydoggy-and-rapidweaver-a-new-approach/" title="seyDoggy and RapidWeaver, a new approach (July 17, 2008)">seyDoggy and RapidWeaver, a new approach</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2009/01/26/use-rapidweavers-pathto-syntax-in-javascript-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From pixels to paper, we&#039;re getting noticed</title>
		<link>http://adam.merrifield.ca/2008/11/06/from-pixels-to-paper-were-getting-noticed/</link>
		<comments>http://adam.merrifield.ca/2008/11/06/from-pixels-to-paper-were-getting-noticed/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 20:38:00 +0000</pubDate>
		<dc:creator>Adam Merrifield</dc:creator>
				<category><![CDATA[Generally]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rapidweaver]]></category>
		<category><![CDATA[seydesign]]></category>
		<category><![CDATA[seydoggy]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.seydoggy.com/wordpress/?p=80</guid>
		<description><![CDATA[There is no greater flattery than to be made an example of so when we were asked some time ago if we would consent to being published in DesignMeltdown&#8217;s, The Web Designer&#8217;s Idea Book, I was truly honored. Today, I received my copy in the mail and was thrilled to find these kind words on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/seydoggy/3008540998/" title="Design by example by seyDoggy, on Flickr" rel="external"><img src="http://farm4.static.flickr.com/3235/3008540998_98f1c5a1a5_b.jpg" width="200" alt="Design by example" class="image-left"/></a>There is no greater flattery than to be made an example of so when we were asked some time ago if we would consent to being published in <a href="http://www.designmeltdown.com/">DesignMeltdown&#8217;s</a>, <em><a href="http://www.amazon.com/gp/product/1600610641?ie=UTF8&amp;tag=louisjordan-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1600610641">The Web Designer&#8217;s Idea Book</a></em>, I was truly honored.</p>

<p>Today, I received my copy in the mail and was thrilled to find these kind words on page 102 along side a screen shot on page 103:</p>

<blockquote>
 <em>&quot;A great example of a unified design is the seyDesign site. It has an office theme, and everything flows together perfectly. The corkboard background creates a terrific foundation to tie the site together. It essentially gives the office supplies a place to exist.&quot;</em>
</blockquote>

<p>Of course this isn&#8217;t how the site looks today, but for this 2007 iteration of <a href="http://www.seydesign.com/">seyDesign.com</a> to be forever immortalized in print is a true sense of accomplishment. All in all, RapidWeaver developers as a whole had a good showing in this book with various sites. Adam from <a href="http://www.elixirgraphics.com/" title="elixir graphics | professional rapidweaver themes">Elixir Graphics</a> has already written about <a href="http://www.elixirgraphics.com/blog/index.php?id=6072932220153081088" title="elixir graphics | weblog">his contributions</a>. and I&#8217;ve heard there are more, I just haven&#8217;t had time to look through each page yet.</p>

<p>To get yourself a copy of this most excellent web design resource, go to <a href="http://www.amazon.com/gp/product/1600610641?ie=UTF8&amp;tag=louisjordan-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1600610641">Amazon.com</a>.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://adam.merrifield.ca/2008/02/01/web-search-with-quicksilver-the-definitive-how-to/" title="Web Search with Quicksilver: how-to (February 1, 2008)">Web Search with Quicksilver: how-to</a> (3)</li>
	<li><a href="http://adam.merrifield.ca/2008/02/09/im-still-alive/" title="I&#039;m still alive (February 9, 2008)">I&#039;m still alive</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2009/02/18/yourhead-launches-stacks-10/" title="YourHead launches Stacks 1.0 (February 18, 2009)">YourHead launches Stacks 1.0</a> (1)</li>
	<li><a href="http://adam.merrifield.ca/2009/01/26/use-rapidweavers-pathto-syntax-in-javascript-files/" title="Use RapidWeaver&#039;s %pathto()% syntax in javascript files (January 26, 2009)">Use RapidWeaver&#039;s %pathto()% syntax in javascript files</a> (0)</li>
	<li><a href="http://adam.merrifield.ca/2008/11/05/to-be-strict-or-not-to-be/" title="To be Strict or not to be (November 5, 2008)">To be Strict or not to be</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://adam.merrifield.ca/2008/11/06/from-pixels-to-paper-were-getting-noticed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
