<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Belafonte Code</title>
	
	<link>http://www.belafontecode.com</link>
	<description>All These People are Going Green... I'm Just Tryin' To Keep It Real</description>
	<lastBuildDate>Mon, 25 Jul 2011 06:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/belafontecode" /><feedburner:info uri="belafontecode" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>belafontecode</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbelafontecode" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbelafontecode" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbelafontecode" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/belafontecode" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbelafontecode" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbelafontecode" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:browserFriendly>Belafonte Feeds - Who Could Ask For More?</feedburner:browserFriendly><item>
		<title>Image Manipulation with phpThumbOf in MODx Revolution</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/OpmxkJqYZFI/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fimage-manipulation-with-phpthumbof-in-modx-revolution%2F&amp;seed_title=Image+Manipulation+with+phpThumbOf+in+MODx+Revolution#comments</comments>
		<pubDate>Thu, 23 Jun 2011 20:59:56 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[MODx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/?p=605</guid>
		<description><![CDATA[PhpThumbOf is a MODx Revolution add-on that is based on the popular php script called phpThumb. It allows you to use the graphics libraries on an Apache server to make modifications to images on-the-fly. This is an entry that is based on the presentation of phpThumbOf that I gave at the June MODx Houston Meetup, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.belafontecode.com/wp-content/uploads/modx-revo+img-banner.jpg" height="265" class="floatRight" /></p>
<p class="leadCaption">PhpThumbOf is a MODx Revolution add-on that is based on the popular php script called phpThumb. It allows you to use the graphics libraries on an Apache server to make modifications to images on-the-fly.</p>
<p>This is an entry that is based on the presentation of phpThumbOf that I gave at the June MODx Houston Meetup, which demonstrates some of the awesome things we can do to manipulate images using phpThumbOf in MODx Revolution.</p>
<p>I&#8217;m not going to go through the process of how to download and install phpThumbOf from the MODx repository.  I&#8217;ll assume that you&#8217;ve already downloaded and installed the add-on.  There are no other add-ons that need to be installed to get this working.</p>
<p>These examples are created using <strong>MODx 2.1.0</strong> and <strong>phpThumbOf 1.2.1-pl</strong>.</p>
<p class="note">Note: there is also a MODx Evolution version of this add-on called <strong><a href="http://modx.com/extras/package/phpthumbpackage">phpThumb</a></strong>.</p>
<p>As of this writing, the official MODx documentation for phpThumbOf is pretty scarce.  Initially, I thought you could only use the <code><strong>&amp;zc=</strong></code> (zoom-crop) option when inserting an image because that&#8217;s all that&#8217;s mentioned in the add-on&#8217;s documentation.  Then, I just randomly tried some of the other phpThumb options and they worked! </p>
<h2>The Anatomy of a phpThumbOf Call— As an Output Filter</h2>
<p>A MODx Output Filter allows you to pass the value of an element through any of a set of filters to modify it before it&#8217;s loaded into the page.  The syntax looks like this </p>
<pre><code>[[element:modifier=`value`]]</code></pre>
<p>The first, and most common, way that you can use phpThumbOf is by using it as an <strong>Output Filter</strong>, attaching it to an image-based <strong>Template Variable</strong> in MODx.  </p>
<p>Just to be thorough, I&#8217;m going to walk through the creation of an image-based template variable.</p>
<p>First, you&#8217;ll create a new template variable and name it whatever you want.  Take the following, for example:</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/01-tv-creation.png" rel="lightbox[605]" title="Fields for creating a new TV"><img src="http://www.belafontecode.com/wp-content/uploads/01-tv-creation-e1311459747180.png" alt="" title="Fields for creating a new TV" width="480" height="320" class="alignnone size-full wp-image-625" /></a></p>
<p class="caption">Fields for creating a new Template Variable</p>
<p>Then choose &#8216;Image&#8217; as the <strong>input type</strong> under <strong>Input Options</strong>.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/02-tv-image-type.png" rel="lightbox[605]" title="Select &#039;Image&#039; as the input option"><img src="http://www.belafontecode.com/wp-content/uploads/02-tv-image-type-e1311460888561.png" alt="" title="Select &#039;Image&#039; as the input option" width="480" height="346" class="alignnone size-full wp-image-630" /></a></p>
<p class="caption">Select &#039;Image&#039; as the input option</p>
<p>We&#8217;ll select the following image as the source of our Template Variable:</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/hot-air-balloons1.jpg" rel="lightbox[605]" title="Hot Air Balloons"><img src="http://www.belafontecode.com/wp-content/uploads/hot-air-balloons1-e1311471772311.jpg" alt="" title="Hot Air Balloons" width="480" height="319" class="alignnone size-full wp-image-650" /></a></p>
<p>All we have to do is set this TV output as the <code>src</code> of our image. The code to call this Template Variable looks like this: </p>
<pre><code>&lt;img src="[[*tvImage]]" /&gt;</code></pre>
<p>As we mentioned at the outset, an output filter modifies the element before it&#8217;s printed to the page.  So we attach the phpThumbOf Output Filter to our previous TV call, like so.</p>
<pre><code>[[*tvImage<strong>:phpthumbof=`w=120&amp;h=120`</strong>]]</code></pre>
<p class="note"><strong>Note:</strong> If this is being called inside a TPL file or Chunk, then the asterisk becomes a plus: <code>[[+tvImage:phpthumbof=`w=120&amp;h=120`]]</code></p>
<p>The result is a newly-generated image, <strong>based on the image you choose for the &#8216;tvImage&#8217;</strong> template variable that is resized to 120px by 120px.  But if you notice, <strong>it has added a white background</strong> to keep our image&#8217;s size ratio stays intact.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/03-balloons-120px.png" rel="lightbox[605]" title="Sized 120x120 without cropping"><img src="http://www.belafontecode.com/wp-content/uploads/03-balloons-120px-e1311463866227.png" alt="" title="Sized 120x120 without cropping" width="480" height="221" class="alignnone size-full wp-image-640" /></a></p>
<p class="caption">Image resized to 120px by 120px</p>
<p>If you don&#8217;t want it to force a background, simply leave off either the width or height.  Here&#8217;s what happens if we only specify a width: </p>
<pre><code>[[+tvImage:phpthumbof=`w=120`]]</code></pre>
<p>It resizes to the specified width, and just lets the height fall to whatever proportionally matches this width.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/05-balloons-width-only.png" rel="lightbox[605]" title="120 Pixels, Width Only"><img src="http://www.belafontecode.com/wp-content/uploads/05-balloons-width-only-e1311485798599.png" alt="" title="120 Pixels, Width Only" width="480" height="220" class="alignnone size-full wp-image-673" /></a></p>
<p class="caption">120 Pixels, Width Only. Height automatically calculated.</p>
<p>Just so you can see that the resizing possibilities are extremely flexible, here is another example with a width of 270px defined. You can even output an image that&#8217;s larger than its source image. (Not that it would be a good idea).</p>
<pre><code>[[*tvImage:phpthumbof=`<strong>w=270</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/04a-balloons-270px.png" rel="lightbox[605]" title="04a-balloons-270px"><img src="http://www.belafontecode.com/wp-content/uploads/04a-balloons-270px-e1311490516506.png" alt="" title="04a-balloons-270px" width="480" height="214" class="alignnone size-full wp-image-717" /></a></p>
<h2>Cropping the Image to Exact Dimensions</h2>
<p>If we want to crop it and make it <em>exactly</em> 120px by 120px version of our image, we&#8217;d add the <strong>zoom-crop</strong> option <code><strong>&amp;zc=1</strong></code>.</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120<strong>&amp;zc=1</strong>`]]</code></pre>
<p>Now, we have a cropped version of the same image with the exact dimensions we specified.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/04-balloons-120px-cropped.png" rel="lightbox[605]" title="Zoom-Cropped version"><img src="http://www.belafontecode.com/wp-content/uploads/04-balloons-120px-cropped-e1311465932732.png" alt="" title="Zoom-Cropped version" width="480" height="224" class="alignnone size-full wp-image-646" /></a></p>
<p class="note"><strong>Note:</strong> As of this version (phpThumbOf 1.2.1-pl) crop gravity does not work. So, Changing the <code><strong>&amp;zc=</strong></code> value to &#8216;C&#8217;, &#8216;T&#8217;, &#8216;B&#8217;, &#8216;L&#8217;, &#8216;R&#8217;, &#8216;TL&#8217;, &#8216;TR&#8217;, &#8216;BL&#8217;, &#8216;BR&#8217; will not change the (top, bottom, left, right, etc.) area of the picture that the crop will be anchored to. It will always be center-weighted.</p>
<h2>PhpThumb&#8217;s Filters— Where the Fun Really Begins</h2>
<p>Now that you know how to manipulate the size of the image, we&#8217;ll get into what I consider to be the real power of phpThumb: filters.  I&#8217;m just going to throw out several demos of the filters available in phpThumb. <strong>Notice that we&#8217;re simply adding new filters to the end of previous phpThumb options. Order DOES matter. Filters are applied from left to right.</strong></p>
<h3>Blur</h3>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;fltr[]=blur|10</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/06-balloons-blur10.png" rel="lightbox[605]" title="06-balloons-blur10"><img src="http://www.belafontecode.com/wp-content/uploads/06-balloons-blur10-e1311487594392.png" alt="" title="06-balloons-blur10" width="480" height="218" class="alignnone size-full wp-image-688" /></a></p>
<p class="caption">120px by 120px with a blur value of 10</p>
<h3>Grayscale</h3>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;fltr[]=gray</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/07-balloons-grayscale.png" rel="lightbox[605]" title="Grayscale Filter"><img src="http://www.belafontecode.com/wp-content/uploads/07-balloons-grayscale-e1311487995750.png" alt="" title="Grayscale Filter" width="480" height="218" class="alignnone size-full wp-image-692" /></a></p>
<p class="caption">120px by 120px in grayscale</p>
<h3>Rounded Corners</h3>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;fltr[]=ric|20|20</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/08-balloons-rounded.png" rel="lightbox[605]" title="08-balloons-rounded"><img src="http://www.belafontecode.com/wp-content/uploads/08-balloons-rounded-e1311488375137.png" alt="" title="08-balloons-rounded" width="480" height="217" class="alignnone size-full wp-image-695" /></a></p>
<p class="caption">120px by 120px with rounded corners</p>
<p>Notice how the filter is adding the white background into the non-image areas where the rounded corners are? We can get rid of that by switching the image type from JPG, to PNG.</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;f=png</strong>&amp;fltr[]=ric|20|20`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/09-balloons-rounded-png.png" rel="lightbox[605]" title="09-balloons-rounded-png"><img src="http://www.belafontecode.com/wp-content/uploads/09-balloons-rounded-png-e1311488679910.png" alt="" title="09-balloons-rounded-png" width="480" height="220" class="alignnone size-full wp-image-698" /></a></p>
<p class="caption">120px by 120px, rounded as transparent PNG</p>
<h3>Borders</h3>
<p>We all want to add borders to images.  You can do it with CSS, of course.  But there are times when you might want to do it within the graphic itself. I don&#8217;t like going into Photoshop for simple stuff like this.  It&#8217;s overkill.  So, take a look at once such instance where I&#8217;d use phpThumb instead of CSS:</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;f=png&amp;fltr[]=bord|5|0|0|FFFFFF&amp;fltr[]=rot|-15|E4F6FE</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/16-balloons-rotate+border.png" rel="lightbox[605]" title="Rotated with Border"><img src="http://www.belafontecode.com/wp-content/uploads/16-balloons-rotate+border-e1311532537823.png" alt="" title="Rotated with Border" width="480" height="220" class="alignnone size-full wp-image-752" /></a></p>
<p class="caption">PNG output, border 5px with no curves, set to white. Rotated -15&deg; with a matte color of #E4F6FE that matches the background</p>
<h3>Rotate Graphic</h3>
<p>Rotation requires a little explanation. You must specify a background color for the non-graphic area in the corners.  In this example, we use #006699. The rotation is -45&deg;</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;fltr[]=rot|-45|006699</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/10-balloons-rotate45.png" rel="lightbox[605]" title="10-balloons-rotate45"><img src="http://www.belafontecode.com/wp-content/uploads/10-balloons-rotate45-e1311489222797.png" alt="" title="10-balloons-rotate45" width="480" height="219" class="alignnone size-full wp-image-702" /></a></p>
<p class="caption">120px by 120px, rotated -45 degrees</p>
<p>If you want to reduce the JPG ugliness, you can increase the JPG quality (1-100):</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1&amp;fltr[]=rot|-45|006699<strong>&amp;q=100</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/11-balloons-rotate45-jpg100.png" rel="lightbox[605]" title="11-balloons-rotate45-jpg100"><img src="http://www.belafontecode.com/wp-content/uploads/11-balloons-rotate45-jpg100-e1311489466801.png" alt="" title="11-balloons-rotate45-jpg100" width="480" height="216" class="alignnone size-full wp-image-705" /></a></p>
<p class="caption">120px by 120px, rotated -45&deg; with JPEG quality 100</p>
<p>If you want to have a transparent background, just change the output to PNG like we did before:</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1&amp;fltr[]=rot|-45|<strong>&amp;f=png</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/12-balloons-rotate45-png.png" rel="lightbox[605]" title="12-balloons-rotate45-png"><img src="http://www.belafontecode.com/wp-content/uploads/12-balloons-rotate45-png-e1311489598818.png" alt="" title="12-balloons-rotate45-png" width="480" height="218" class="alignnone size-full wp-image-708" /></a></p>
<p class="caption">120px by 120px, rotated -45&deg; with transparent png</p>
<h3>Color Overlay</h3>
<p>The colorize filter allows you to overlay any hex color over an image.  The first value is the percentage, the second is the hex value.</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;fltr[]=clr|35|990033</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/13-balloons-colorize-red.png" rel="lightbox[605]" title="13-balloons-colorize-red"><img src="http://www.belafontecode.com/wp-content/uploads/13-balloons-colorize-red-e1311489964269.png" alt="" title="13-balloons-colorize-red" width="480" height="218" class="alignnone size-full wp-image-710" /></a></p>
<p class="caption">120px by 120px with 35% color overlay of #990033</p>
<p>If you want a <strong>duotone</strong> effect, just precede the overlay filter with a grayscale filter to remove the image&#8217;s color first.</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1<strong>&amp;fltr[]=gray</strong>&amp;fltr[]=clr|35|990033`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/14-balloons-duotone-red.png" rel="lightbox[605]" title="14-balloons-duotone-red"><img src="http://www.belafontecode.com/wp-content/uploads/14-balloons-duotone-red-e1311490264861.png" alt="" title="14-balloons-duotone-red" width="480" height="221" class="alignnone size-full wp-image-715" /></a></p>
<p class="caption">120px by 120px with 35% color overlay of #990033 atop a grayscale image, which gives us our duotone effect</p>
<h3>Basic Text Watermark</h3>
<p>You can do text and image watermarks as well, using phpThumb.  With text watermarks, you can define the size, placement, opacity and even the TTF font you want it to be rendered with.</p>
<p>There are a lot of variables to set. Check original documentation to see all options.</p>
<p>Here&#8217;s a simple text watermark using a default server font:</p>
<pre><code>[[*tvImage:phpthumbof=`w=120&amp;h=120&amp;zc=1&amp;fltr[]=gray<strong>&amp;fltr[]=wmt|Belafonte Code|3|T|FFFFFF||100|20|0||0|</strong>`]]</code></pre>
<p><a href="http://www.belafontecode.com/wp-content/uploads/15-balloons-watermark-text.png" rel="lightbox[605]" title="15-balloons-watermark-text"><img src="http://www.belafontecode.com/wp-content/uploads/15-balloons-watermark-text-e1311528975812.png" alt="" title="15-balloons-watermark-text" width="480" height="217" class="alignnone size-full wp-image-746" /></a></p>
<p class="caption">120px by 120px with basic text watermark, aligned-top, offset with 20% margin</p>
<h2>Direct Image Manipulation</h2>
<p>Output Filters are excellent, but what if you just want to modify a single image without creating a Template Variable for it?  To do that, we call phpThumbOf as a snippet and then pass the image url and options into it:</p>
<pre><code>&lt;img src="[[phpthumbof? &amp;input=`/assets/images/hot-air-balloons.jpg` &amp;options=`&amp;w=120&amp;h=120&amp;zc=1&amp;fltr[]=gray`]]" /&gt;</code></pre>
<p>You can chain the filters at the end of the options query string all the same.</p>
<p class="note"><strong>Note:</strong> If you want to see all the rest of the MANY options available, check the <a href="http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php" target="_blank">phpThumb demos</a> page.</p>
<p class="note"><strong>Note:</strong> I have not gotten drop shadows with fades to work.</p>
<p>You&#8217;re probably thinking of all the amazing things you can do with this so you don&#8217;t have to go into Photoshop for simple graphic tweaks. It also gives you the power to let users and content editors add graphics to pages and always know that they will be formatted according to your design specification.</p>
<p>Feel free to leave some of your awesome and clever uses of phpThumb in the comments.</p>
<p>Evo version of this demo coming soon.</p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=OpmxkJqYZFI:lKp_e5fbQeQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=OpmxkJqYZFI:lKp_e5fbQeQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OpmxkJqYZFI:lKp_e5fbQeQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=OpmxkJqYZFI:lKp_e5fbQeQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OpmxkJqYZFI:lKp_e5fbQeQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OpmxkJqYZFI:lKp_e5fbQeQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=OpmxkJqYZFI:lKp_e5fbQeQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OpmxkJqYZFI:lKp_e5fbQeQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OpmxkJqYZFI:lKp_e5fbQeQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fimage-manipulation-with-phpthumbof-in-modx-revolution%2F&amp;seed_title=Image+Manipulation+with+phpThumbOf+in+MODx+Revolution/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fimage-manipulation-with-phpthumbof-in-modx-revolution%2F&amp;seed_title=Image+Manipulation+with+phpThumbOf+in+MODx+Revolution</feedburner:origLink></item>
		<item>
		<title>Hosting Multiple Top-level Domains Using MODx Revolution</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/NMeyXzpX8yU/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fmodx-revolution-hosting-multiple-domains%2F&amp;seed_title=Hosting+Multiple+Top-level+Domains+Using+MODx+Revolution#comments</comments>
		<pubDate>Fri, 11 Feb 2011 02:55:00 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[MODx]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/?p=402</guid>
		<description><![CDATA[As a follow-up to the previous entry for setting up multiple subdomains in Revo, this entry explains how to use multiple top-level domains in MODx Revolution.]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">As a follow-up to the previous entry for <a href="/?p=228">setting up multiple subdomains in <abbr title="MODx Revolution">Revo</abbr></a>, this entry explains how to use multiple top-level domains in a single installation MODx Revolution without worrying about access to your Apache config file.</p>
<p><img class="floatRight" title="modx-revo" src="/wp-content/uploads/modx-revo2.jpg" alt="" /></p>
<p>Hosting multiple domains in MODx Revolution has been covered at <a href="http://www.h-quadrat.com/techblog/111-modx-revolution-multi-domain-context-installation-english.php" target="_new">H-Quadrat</a>.  But, just as with subdomains, I prefer to give each domain its own folder on the server to keep js, css and images tidy. <strong>So we will go into detail about how to route each domain to separate resource folders.</strong></p>
<h2>Preparation:</h2>
<ol>
<li>The top-level domains that you wish to use should already be pointed to/parked on the server where <abbr title="MODx Revolution">Revo</abbr> is installed. Do this the same as you would with setting up hosting or parking for any domain.</li>
<li>You will need FTP access to the web directory where you plan to have MODx installed. We will be using it to upload files and create the assets folders.</li>
<li>This tutorial assumes that you have MODx installed already. We will be using a fresh install of <strong>2.0.7-pl</strong>. (<a href="http://modx.com/revolution/download/" target="_new">Download</a>)</li>
<li>Please note that in the scripts you see in this tutorial, the <strong>bolded</strong> items are things you need to change for your setup.</li>
</ol>
<p class="note"><strong>Note:</strong> Although I&#8217;ve already covered the beginning parts of the setup process in the previous article, they will all be repeated here for completeness.</p>
<h2>Creating Contexts</h2>
<p>Setting up multiple sites will be done in what&#8217;s called <strong>&#8220;Contexts&#8221;</strong>, essentially &#8220;states&#8221; that your site can switch to.  Basically, we&#8217;ll set the conditions that tell MODx which state to be in based on how the visitor got to the site.</p>
<p>When you first log into the MODx Manager, you&#8217;ll notice that there&#8217;s a little house icon in the tree. This is your default context.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/01-web-context-default.png" rel="lightbox[402]" title="01-web-context-default"><img class="alignnone size-full wp-image-261" title="01-web-context-default" src="http://www.belafontecode.com/wp-content/uploads/01-web-context-default.png" alt="" width="341" height="235" /></a></p>
<p class="caption">The default &#8216;web&#8217; context with basic pages added.</p>
<p>To create a new context, we need to go to <strong>System > Contexts</strong> in the top menu.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/context-menu.png" rel="lightbox[402]" title="Location of the 'Context' menu item"><img class="alignnone size-full wp-image-437" title="Location of the 'Context' menu item" src="http://www.belafontecode.com/wp-content/uploads/context-menu.png" alt="Location of the 'Context' menu item" width="480" height="310" /></a></p>
<p class="caption">Location of the Contexts menu</p>
<p>Once there, you&#8217;ll notice that our default &#8216;web&#8217; and &#8216;mgr&#8217; contexts are there.  The &#8216;mgr&#8217; context is the manager interface. Neither of these can be edited or removed.</p>
<p>Click ‘<strong>Create New</strong>‘ and we’ll create our first alternate domain. The ‘<strong>Content Key</strong>‘  refers to how you want your context to appear in the sidebar and how  you will refer to it when you tell MODx to go there. This should be simple, and include no spaces.</p>
<p><a href="/wp-content/uploads/02-context-creation.png" rel="lightbox[402]" title="02-context-creation"><img class="alignnone size-full wp-image-442" title="02-context-creation" src="/wp-content/uploads/02-context-creation.png" alt="" width="480" height="273" /></a></p>
<p class="caption">I&#8217;m calling my first alternate domain &#8216;Domain2&#8242; for this example, since it&#8217;s assumed that my first domain will be attached to the &#8216;web&#8217; context.</p>
<p>Refresh the resource tree on the left (using the green “recycle” arrows), and you should see your new context appear below the original ‘web’ context. This will be the home of our first alternate domain. I always create the minimal pages needed inside any new contexts just to give it some life and for testing.</p>
<p>Go ahead and add an index and an error page. You can use the new ‘<strong>Quick Create</strong>’ feature by right-clicking the new context and choosing ‘<strong>Quick Create > Document</strong>‘.</p>
<p><a href="/wp-content/uploads/03-quick-create-document.png" rel="lightbox[402]" title="Quick Create Document"><img class="alignnone size-full wp-image-446" title="Quick Create Document" src="/wp-content/uploads/03-quick-create-document.png" alt="" width="480" /></a></p>
<p class="caption">I added content that will immediately let me know that I&#8217;m looking at the correct context during testing.</p>
<p>My resource tree now looks like this:<br />
<a href="/wp-content/uploads/04-resource-tree.png" rel="lightbox[402]" title="04-resource-tree"><img class="alignnone size-full wp-image-457" title="04-resource-tree" src="/wp-content/uploads/04-resource-tree.png" alt="" width="316" height="226" /></a></p>
<p class="note"><strong>Note:</strong> As of 2.0.5, you can edit your system settings and choose which field you want to display for each resource in your resource tree.  In my example, I&#8217;ve chosen &#8216;<strong>menutitle</strong>&#8216; in stead of the default &#8216;<strong>pagetitle</strong>&#8216;. This setting is found on page 4 of your system settings as &#8216;<strong>Resource Tree Node Field</strong>&#8216;</p>
<h2>Adding Context Settings</h2>
<p>Now, we need to make our new context actually DO something by adding in the system settings specific to this child site.</p>
<ol>
<li>Go back to your list of contexts under <strong>System > Contexts</strong></li>
<li><strong>Right-click</strong> the new context you created.</li>
<li>From the pop-up menu, choose &#8216;<strong>Update Context</strong>&#8216;</li>
<li>Click on the green tab for ‘<strong>Context Settings</strong>‘</li>
</ol>
<p><a href="/wp-content/uploads/05-context-settings.png" rel="lightbox[402]" title="Location of Context Settings"><img class="alignnone size-full wp-image-466" title="Location of Context Settings" src="/wp-content/uploads/05-context-settings.png" alt="" width="480" /></a></p>
<p class="caption">Location of Context Settings</p>
<p>We&#8217;ll be using this area to override global settings for things like &#8216;default home page&#8217;, &#8216;default template&#8217; and pretty much any other global setting.</p>
<p>Click &#8216;<strong>Create New</strong>&#8216;.</p>
<p>In the panel that pops up, there are several fields.  We only want to edit the <code>Key</code>, <code>Name</code> and <code>Value</code>.</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/06-context-settings-values.png" rel="lightbox[402]" title="Context Setting Values"><img class="alignnone size-full wp-image-471" title="Context Setting Values" src="http://www.belafontecode.com/wp-content/uploads/06-context-settings-values.png" alt="" width="480" /></a></p>
<p class="caption">Context setting value fields</p>
<p>Do this once for each of the following settings:</p>
<ul>
<li><strong>site_start</strong> &#8211; the ID of your new context&#8217;s homepage.</li>
<li><strong>base_url</strong> &#8211; Set this value to &#8220;/&#8221; (no quotes) since we&#8217;re making the root of the URL our base.</li>
<li><strong>http_host</strong> &#8211; Set this value to &#8220;yourseconddomain.com&#8221; (your add-on domain url)</li>
<li><strong>site_url</strong> &#8211; Set this value to &#8220;http://www.yourseconddomain.com/&#8221; (FULL domain url). Must have trailing slash.</li>
</ul>
<p>Here&#8217;s what my finished context settings panel looks like:</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/07-context-settings-final.png" rel="lightbox[402]" title="Final context settings"><img class="alignnone size-full wp-image-477" title="Final context settings" src="http://www.belafontecode.com/wp-content/uploads/07-context-settings-final.png" alt="" width="480" /></a></p>
<p class="note"><strong>Note:</strong> You&#8217;ll notice that I&#8217;ve added the value for the error page.  You&#8217;ll want to do this, but it is NOT required to get your context up and running.</p>
<h2>Option 1: Mapping Domains to their Contexts by Using Single Index</h2>
<p class="note"><strong>Note:</strong> Jump to <a href="#option2">Option 2</a> if you plan to give each domain its own folder.</p>
<p>When the official documentation refers to a &#8216;Gateway Plugin&#8217; it&#8217;s essentially referring to the &#8216;index.php&#8217; file. <strong> ONLY do this if you&#8217;re not planning on giving your sites separate resource folders.</strong> We will add conditionals to the main index.php that will handle the traffic for us.</p>
<p>This is extremely easy to do.  Open your &#8216;index.php&#8217; file and scroll down to the bottom.  You&#8217;ll see a block of code that looks like this:</p>
<pre><code>/* Initialize the default 'web' context */
$modx-&gt;initialize('web');</code>
</pre>
<p>You can replace those two lines with the following:</p>
<pre><code>/* Setup context mapping */
switch ($modx-&gt;getOption('http_host')) {
	case '<strong>modxdomain2.com:80</strong>':
	case '<strong>modxdomain2.com</strong>':
		// if the http_host is of a specific domain, switch the context
		$modx-&gt;switchContext('<strong>Domain2</strong>');
	break;

	default:
		// fallback, go to main context
		$modx-&gt;initialize('web');
	break;
}</code>
</pre>
<p>Notice what&#8217;s happening here: <em>&#8220;If the <code>http_host</code> setting matches the domain that was used to access this site, switch to the context associated with that <code>http_host</code>&#8220;</em>.</p>
<p>For each extra domain, you would repeat the first section, from the <code>switch</code> all the way to the first <code>break</code>.  Change the items that I&#8217;ve bolded to match the domains you&#8217;re working with, of course.</p>
<p>At this point, if your domains are parked, you should be able to visit your alternate domain and see pages from the second context!</p>
<p><strong>You can stop here if you&#8217;re going to have all resource files in the main directory.  Continue reading to see how I set up unique folders for each domain.</strong></p>
<h2 id="option2">Option 2: Giving each Domain a Unique Folder</h2>
<p>Now we create a folder on our server that will house the resources for our new domain. It can go anywhere, but for now, we&#8217;ll place them all in the same directory where MODx is installed and give it the same name as our domain. I&#8217;m calling it &#8216;modxdomain2&#8242; for this example so there&#8217;s no guessing once I have several domains in place.  Inside this newly-created folder, you&#8217;ll want to copy three files from the root directory:<br />
<strong>.htaccess<br />
index.php<br />
config.core.php</strong></p>
<p> <a href="http://www.belafontecode.com/wp-content/uploads/08-folder-structure.png" rel="lightbox[402]" title="Folder Structure"><img class="alignnone size-full wp-image-534" title="Folder Structure" src="http://www.belafontecode.com/wp-content/uploads/08-folder-structure.png" alt="" width="480" /></a></p>
<p>This keeps our sites&#8217; files organized neatly and prevents things from getting messy once all the domains are set up. Now that you have that in order, you can add all the css, javascript, files and folders that would normally live in the root of your web projects. Mine looks like this:<br />
<a href="http://www.belafontecode.com/wp-content/uploads/08-folder-structure-full.png" rel="lightbox[402]" title="Folder Structure Full"><img class="alignnone size-full wp-image-535" title="Folder Structure Full" src="http://www.belafontecode.com/wp-content/uploads/08-folder-structure-full.png" alt="" width="480" /></a></p>
<h2>Routing Domain to Specific Folder on the Server</h2>
<p>Similar to our earlier approach, we&#8217;ll be using <code>.htaccess</code> directives to tell the server what the root folder should be for each domain.  Last time, we set it so that it would automatically map to a folder based on the subdomain that was used to access the site.  This time around, we won&#8217;t use that approach because we can&#8217;t guarantee that some things won&#8217;t get confusing on the server once all domain names are in place.  That said, we&#8217;ll want to type the directives manually so that we have ultimate control over what folder names go with each domain.</p>
<p>Open your ROOT FOLDER&#8217;S <code>.htaccess</code> file and paste the following:</p>
<pre><code>#MAP TLD TO CUSTOM SUBDIRECTORY
RewriteCond $1 !^<strong>foldername</strong>/
RewriteCond %{HTTP_HOST} ^www\.<strong>modxdomain2\.com</strong>
RewriteRule (.*) /<strong>foldername</strong>/$1 [L]</code></pre>
<h2>Telling the Browser Which Context to Load</h2>
<p>If you read Option 1 above, you noticed that we used the single index to insert all the rules that direct the user&#8217;s browser to the proper context based on which domain they used to access the site.  We still have to do this, only the index will simply have a single rule, since our .htaccess is handling the re-routing for us already.</p>
<p>So, in the <strong>index.php</strong> that you copied into your second domain&#8217;s folder, find the following lines:</p>
<pre><code>/* Initialize the default 'web' context */
$modx-&gt;initialize('web');</code></pre>
<p>As you&#8217;d suspect, we do NOT want to point this traffic to the &#8216;web&#8217; context. That would show the main site.  We want it to go to our <strong>&#8216;Domain2&#8242;</strong> context.  So simply change it to this:</p>
<pre><code>/* Initialize the default 'web' context */
$modx-&gt;initialize('<strong>Domain2</strong>');</code></pre>
<p>Of course, you&#8217;ll want to replace <strong>&#8216;Domain2&#8242;</strong> with the name you gave to your second context in MODx. You can also change the comment to read whatever you want.</p>
<h2>Fixing Friendly URLs</h2>
<p>Since we&#8217;re using some pretty advanced directives in the <code>.htaccess</code> file, we&#8217;re going to have to make changes to the <strong>frienly URL</strong> script that comes with MODx.  Basically, we&#8217;ll have to tell it to only work on the primary domain.  Open the ROOT <code>.htaccess</code> file and <strong>paste the bolded line into the default friendly URL script</strong> and be sure to change it to your domain name.</p>
<pre><code># The Friendly URLs part - MUST BE SPECIFIC TO TOP-LEVEL HOST SO AS NOT TO CONFLICT WITH SUBFOLDER REDIRECTS
<strong>RewriteCond %{HTTP_HOST} ^www\.yourprimarymodxdomain\.com</strong>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php?q=$1 [L,QSA] </code></pre>
<p>Notice how we added the first line that tells the server that ONLY our primary domain (whatever yours happens to be) will use the friendly URL script in this file.  The other domains will have their own <code>.htaccess</code> file.</p>
<p>So, next, in the child <code>.htaccess</code> file that you copied into your  subdirectory, delete everything else and <strong>place the following code to enable friendly URLs on child domain.</strong>  (You will have to do this for each site that has its own folder.)</p>
<pre><code>RewriteEngine On
RewriteBase /

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?q=$1 [L,QSA]</code></pre>
<h2>Point Child Site to the MODx Core (503 Errors)</h2>
<p>If you&#8217;ve tried to access your child site already, you should be getting a pesky 503 Error.  This means that your gateway cannot locate the MODx core. Open your second site&#8217;s <strong>config.core.php</strong> and do the following.</p>
<p><strong>Find</strong></p>
<pre><code>define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');</code></pre>
<p>Change to</p>
<pre><code>define('MODX_CORE_PATH', '/home/example/public_html/core/');</code></pre>
<p>Use the full web path to <strong>your</strong> site&#8217;s core folder. If you don&#8217;t know your site&#8217;s full path, check your control panel or hosting welcome letter. You can use various PHP functions to find this information as well.</p>
<h2>You&#8217;re All Done!</h2>
<p>Now, with this in place, development can continue on addon domains without having to refer to relative directories.  You can use absolute paths in your CSS and JS such as <code>background-image: url('/images/background.gif')</code>. This eliminates the need to make extra changes when, for instance, moving from staging to live servers.</p>
<p>Now you should be able to add as many domains to your MODx Revolution installation as you want.  Of course, you want to be reasonable. If your site deals with incredible amounts of traffic, you may want to consider separate installations for each domain.  But for the majority of site owners and developers, this will be the perfect solution for keeping a family of sites in one place.</p>
<h1>Bonus Information and Optional Tweaks</h1>
<h2>Automatically Route to WWW Site</h2>
<p>As you might know, for SEO reasons, it&#8217;s good to globally redirect all traffic to a single version of your domains. I typically choose the WWW version. You can use the default MODx script in the <code>.htaccess</code> file and set this up for each of your domains. But with the following script, you can set it once for all domains that you point to this server. <strong>No customization needed in this script.</strong></p>
<pre><code># FORCE WWW ON ALL URLs
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</code></pre>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=NMeyXzpX8yU:cLRs2omjaBg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=NMeyXzpX8yU:cLRs2omjaBg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=NMeyXzpX8yU:cLRs2omjaBg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=NMeyXzpX8yU:cLRs2omjaBg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=NMeyXzpX8yU:cLRs2omjaBg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=NMeyXzpX8yU:cLRs2omjaBg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=NMeyXzpX8yU:cLRs2omjaBg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=NMeyXzpX8yU:cLRs2omjaBg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=NMeyXzpX8yU:cLRs2omjaBg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fmodx-revolution-hosting-multiple-domains%2F&amp;seed_title=Hosting+Multiple+Top-level+Domains+Using+MODx+Revolution/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fmodx-revolution-hosting-multiple-domains%2F&amp;seed_title=Hosting+Multiple+Top-level+Domains+Using+MODx+Revolution</feedburner:origLink></item>
		<item>
		<title>Hosting Multiple Subdomains on MODx Revolution</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/tAFlxRn3CD0/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fhow-to-host-multiple-sub-domains-on-modx-revolution%2F&amp;seed_title=Hosting+Multiple+Subdomains+on+MODx+Revolution#comments</comments>
		<pubDate>Sun, 18 Apr 2010 14:00:28 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[Randomonium]]></category>
		<category><![CDATA[MODx]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/?p=228</guid>
		<description><![CDATA[This write up gives you a step-by-step of how to set up and run multiple subdomains on a single instance of MODx Revolution. This process was created using the official documentation, along with some other helpful tricks that I added to make possible for anyone to do without root server access. Update: Feb 11, 2011 [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">This write up gives you a step-by-step of how to set up and run multiple subdomains on a single instance of MODx Revolution. This process was created using the official documentation, along with some other helpful tricks that I added to make possible for anyone to do without root server access.</p>
<p><strong>Update:</strong> Feb 11, 2011 &mdash; If you&#8217;re interested in hosting multiple top-level domains, the new write-up is <a href="/?p=402">here.</a><br />
<img class="floatRight" title="modx-revo" src="http://www.belafontecode.com/wp-content/uploads/modx-revo.png" /></p>
<h2>Before We Begin</h2>
<p>In order for this to go smoothly, you should have a few things already taken care of.</p>
<ol>
<li>Make sure that you have a wildcard (*) <code>A Record</code> created in your DNS Zone. If you don&#8217;t want to fool with wildcards, use your control panel to create the subdomains in your hosting control panel (although you won&#8217;t be using the real subdomains).</li>
<li>You must have FTP or File Manager access to the location where your MODx install lives.</li>
<li>Download and install MODx Revolution, already. I&#8217;m going to start with a fresh install of Revo. This tutorial uses RC-1, so the instructions you see here will likely apply to the final release.</li>
</ol>
<h2>Let&#8217;s Get It Started</h2>
<p>When you first visit your Manager, you&#8217;ll see the &#8216;web&#8217; container in the nav area. This is the context that houses the default main site of your MODx installation.</p>
<p><img class="alignnone size-full wp-image-261" title="01-web-context-default" src="http://www.belafontecode.com/wp-content/uploads/01-web-context-default.png" alt="" width="341" height="235" />
</p>
<p class="caption">The default &#8216;web&#8217; context with basic pages added.</p>
<p>Our goal will be to create several of these &#8220;home folders&#8221; one for each subdomain that we will create. So, let&#8217;s go!</p>
<p>First we need to visit the &#8216;<strong>Contexts</strong>&#8216; menu, located at <strong>System &gt; Contexts</strong>.</p>
<p style="text-align: center;"><a title="Location of Context Menu" rel="lightbox[ContextMenu]" href="http://www.belafontecode.com/wp-content/uploads/02-context-menu.png"><em>Click to Enlarge</em><br />
<img class="size-full wp-image-262 aligncenter" src="http://www.belafontecode.com/wp-content/uploads/02-context-menu.png" alt="" width="480" height="235" /></a></p>
<p class="caption">The Context area lists the default contexts: the &#8216;web&#8217; context, which is the main site, and the &#8216;mgr&#8217; context, which is the backend manager that we&#8217;re using to do this.</p>
<p>Click on &#8216;<strong>Create New</strong>&#8216; and we&#8217;ll create our first subdomain. The &#8216;<strong>Content Key</strong>&#8216; refers to how you want your context to appear in the sidebar and how you will refer to it when you tell MODx to go there. This should be simple and include no spaces (and preferably no caps). I typically name it the same as the submdomain I&#8217;m planning to use just because it makes things easier to remember (although these two names have no impact on one  another). For this example, I entered the following:</p>
<p><img class="alignnone size-full wp-image-264" title="04-create-context" src="http://www.belafontecode.com/wp-content/uploads/04-create-context.png" alt="" width="434" height="187" /></p>
<p>If we refresh the resource list (using the green &#8220;recycle&#8221; arrows), we see our new context appear along with the original &#8216;web&#8217; context. This will be the home of our first subdomain. Go ahead and create the minimal pages needed. I generally start with an index and an error page to get started. You can use the new &#8216;Quick Create&#8217; feature by right-clicking the new context and choosing &#8216;<strong>Quick Create &gt; Document</strong>&#8216;. I typed the following:</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/05-quick-create.png" rel="lightbox[228]" title="05-quick-create"><img title="05-quick-create" src="http://www.belafontecode.com/wp-content/uploads/05-quick-create.png" alt="" width="480" height="298" /></a></p>
<p class="caption">As you can see, I typed something in the content area that will let me know that it&#8217;s successful when I go to test the subdomains later.</p>
<p>My resource list now looks like this:</p>
<p><a href="http://www.belafontecode.com/wp-content/uploads/06-context-list.png" rel="lightbox[228]" title="06-context-list"><img class="alignnone size-full wp-image-266" title="06-context-list" src="http://www.belafontecode.com/wp-content/uploads/06-context-list.png" alt="" width="336" height="212" /></a></p>
<h2>The Setup</h2>
<p>To get this new context to actually behave like a website, we need to edit it and add a few necessary variables. So go back to your list of contexts (<strong>System &gt; Contexts</strong>) and <strong>right-click</strong> the new context you created. From the pop-up menu, choose &#8216;<strong>Update Context</strong>&#8216;. Once there, you should click on the green tab for &#8216;<strong>Context Settings</strong>&#8216;.</p>
<p><img class="alignnone size-full wp-image-304" title="06b-context-settings-tab" src="http://www.belafontecode.com/wp-content/uploads/06b-context-settings-tab.png" alt="" width="444" height="262" /></p>
<p class="caption">Location of Context Settings Tab</p>
<p>Click on &#8216;<strong>Create New</strong>&#8216; and we&#8217;ll begin adding the variables that we will need, one at a time. When the &#8216;<strong>Create New</strong>&#8216; dialog pops up, the only settings you need to worry about are the <code>Key</code>, <code>Name</code> and <code>Value</code>. Everything else goes untouched. I add a description just for kicks, but the main site&#8217;s description will usually override this description anyway.</p>
<p><img class="alignnone size-full wp-image-268" title="07-add-context-settings" src="http://www.belafontecode.com/wp-content/uploads/07-add-context-settings.png" alt="" width="480" height="393" /></p>
<p>Do this once for each of the following settings:</p>
<p><strong>site_start</strong> &#8211; the ID of your new context&#8217;s homepage.<br />
<strong>base_url</strong> &#8211; Set this value to &#8220;/&#8221; (no quotes) since we&#8217;re making the root of the URL our base.<br />
<strong>http_host</strong> &#8211; Set this value to &#8220;subdomain.yourdomain.com&#8221; (your subdomain url)<br />
<strong>site_url</strong> &#8211; Set this value to &#8220;http://subdomain.yourdomain.com/&#8221; (FULL subdomain url). Must have trailing slash.</p>
<p class="note"><strong>Note:</strong> You might recognize some of these variables, as they are simply overrides of options currently defined in the settings for the main site in your MODx installation. You can add any settings that you wish to customize for each site such as Default Template and Error Page.</p>
<p>Here are my finished settings.</p>
<p style="text-align: center;"><a title="Final Context Settings" rel="lightbox[FinishedSettings]" href="http://www.belafontecode.com/wp-content/uploads/08-finished-settings.png"><em>Click to Enlarge</em><br />
<img class="alignnone size-full wp-image-269" title="08-finished-settings" src="http://www.belafontecode.com/wp-content/uploads/08-finished-settings.png" alt="" width="480" height="371" /></a></p>
<h2>Now We Make It Tick</h2>
<p>So, let&#8217;s create a folder in our server to create a place where the subdomain&#8217;s files will live. We&#8217;ll place it in the same directory where modx is installed and give it the same name as our subdomain. My folder is called &#8216;subdomain1&#8242; for this example.</p>
<p>Inside this newly-created folder, you will need to <strong>copy a few files</strong> from the MODx root directory:</p>
<p><strong>.htaccess</strong><br />
<strong>index.php</strong><br />
<strong>config.core.php</strong></p>
<p><img class="alignnone size-full wp-image-270" title="09-folder-listing" src="http://www.belafontecode.com/wp-content/uploads/09-folder-listing.png" alt="" width="480" height="341" /></p>
<p>Now, we edit these files so that they handle things properly when they&#8217;re accessed. Basically, we need to make them behave as if they were root folders.</p>
<h3>Edit .htaccess</h3>
<p>Make sure that <code>RewriteBase</code> is set to &#8220;/&#8221; with no other folder names behind it. (In most cases, it will probably already be set correctly.)</p>
<h3>Edit index.php</h3>
<p>Find</p>
<pre><code>$modx-&gt;initialize('web'); </code></pre>
<p>Change to</p>
<pre><code>$modx-&gt;initialize('subdomain1');</code></pre>
<p><em>Change the context name to match whatever you named your context in the manager section.</em></p>
<h3>Edit in config.core.php</h3>
<p>Find</p>
<pre><code>define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');</code></pre>
<p>Change to</p>
<pre><code>define('MODX_CORE_PATH', '/home/example/public_html/core/');</code></pre>
<p>Use the full web path to <strong>your</strong> site&#8217;s core folder. If you don&#8217;t know your site&#8217;s full path, check your control panel or hosting welcome letter. This information should be readily available with your account.</p>
<p>At this point, everything should be working smoothly and you can test the success of your setup by accessing <code><strong>http://www.yourdomain.com/subdomainfolder/</strong></code> and you will see the contents of your main page.</p>
<p>In my case, I got the &#8220;This is Subdomain1&#8243; text that I typed as a success message. So, I&#8217;m in good shape!</p>
<h2>Routing Subdomain Traffic to the Proper Folder</h2>
<p>Now that we have all of our settings in place and our folder created, we just need to tell the server where to redirect this traffic to so that we can be sure our visitors don&#8217;t see the main site when they access this url. In the official documentation, they describe how to do this in your Apache Config File. I got mine working that way, but it was a huge pain. I wanted to find a way that would work without needing to hack around in Apache. Not to mention, most users do not have root access to their config files.</p>
<p>After several days of searching, I came across a regex hack from <strong>jdmorgan at WebMasterWorld</strong> that could be placed in the htaccess file. The script will take any traffic that comes in through a subomain and redirect it to a subfolder that matches that subdomain. This turned out to be exactly what I needed since I wouldnt want my subdomains to have to share folders and files with the main site anyway. That would be a disaster waiting to happen.</p>
<p>Place the following script in the .htaccess file that resides in the MAIN folder of your MODx installation. This does NOT belong in the .htaccess files of your subsequent folders. <strong>Add this to your .htaccess <em>AFTER</em> the Friendly URLs code or it will break Friendly URLs</strong></p>
<pre><code>#REDIRECT SUBDOMAIN TO SUBDIRECTORY OF SAME NAME
RewriteCond %{ENV:REDIRECT_SUBDOMAIN} =""
RewriteCond %{HTTP_HOST} ([a-z0-9][-a-z0-9]+)\.<strong>yourdomain</strong>\.com\.?(:80)?$ [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.*) %1/$1 [E=SUBDOMAIN:%1,L]
RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L]</code></pre>
<p>If you had success above when accessing your subfolder directly, you will be equally rewarded when you visit http://subdomain.yourdomain.com, where you should see the contents of your subdomain&#8217;s home page.</p>
<p>Now that you have this working, you can repeat this process as many times as you wish to launch any number of subdomains within your MODx installation.</p>
<p>Our next task is that of hosting completely different domains inside a single MODx installation.</p>
<h2>Troubleshooting</h2>
<h3>Error 503</h3>
<p>If you&#8217;re getting an Error 503 when you access either the subfolder or the subdomain, then you need to check your <code>config.core.php</code> file. If the path there is not specified correctly, you will get this error.</p>
<p>You might also check that the <code>Context</code> settings you created are correct.</p>
<h3>Subdomain Not Displaying Sub-folder Contents</h3>
<p>To be sure our redirect script is working, try adding a simple HTML file into your subfolder and accessing it via the subdomain (without folder name in URL). If you get a 404 error, then your site does not have a <strong>subdomain</strong> or <strong>wildcard</strong> set up.</p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=tAFlxRn3CD0:7dvU-poUKF0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=tAFlxRn3CD0:7dvU-poUKF0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=tAFlxRn3CD0:7dvU-poUKF0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=tAFlxRn3CD0:7dvU-poUKF0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=tAFlxRn3CD0:7dvU-poUKF0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=tAFlxRn3CD0:7dvU-poUKF0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=tAFlxRn3CD0:7dvU-poUKF0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=tAFlxRn3CD0:7dvU-poUKF0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=tAFlxRn3CD0:7dvU-poUKF0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fhow-to-host-multiple-sub-domains-on-modx-revolution%2F&amp;seed_title=Hosting+Multiple+Subdomains+on+MODx+Revolution/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fhow-to-host-multiple-sub-domains-on-modx-revolution%2F&amp;seed_title=Hosting+Multiple+Subdomains+on+MODx+Revolution</feedburner:origLink></item>
		<item>
		<title>Controlling Safari &amp; Chrome’s Resizable Textarea with Simple CSS</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/4Bs-W5VbwEk/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fcontrolling-safari-resizable-textarea-with-css%2F&amp;seed_title=Controlling+Safari+%26amp%3B+Chrome%26%238217%3Bs+Resizable+Textarea+with+Simple+CSS#comments</comments>
		<pubDate>Tue, 29 Dec 2009 04:25:25 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[UI/UX]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/?p=115</guid>
		<description><![CDATA[This article shows you how to get a &#8220;handle&#8221; on Webkit&#8217;s resizable textarea by managing its resize area without disabling the feature, as some have proposed. By now, most web surfers are aware that as of Safari 3, the Webkit engine (which also powers Google Chrome) introduced a new feature: the user-resizable textarea. This feature [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">This article shows you how to get a &#8220;handle&#8221; on Webkit&#8217;s resizable textarea by managing its resize area without disabling the feature, as some have proposed.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/chrome-safari-resize.png" alt="" title="Chrome Safari Resize" width="230" height="265" class="floatRight" /></p>
<p>By now, most web surfers are aware that as of Safari 3, the Webkit engine (which also powers Google Chrome) introduced a new feature: the user-resizable <code>textarea</code>.  This feature was very welcome to those who are familiar with accessibility and web usability.  Allowing a user to resize the <code>textarea</code> instead of simply relying on the scrollbars is just all-around good UI design.</p>
<p>However, it presents a new layout problem that we&#8217;ve never really had to deal with before.  Since the user can resize the text box, they could end up seeing a broken version of your original form.  While this doesn&#8217;t hurt anything at all, since the user is the one who initiates the resizing (and not some CSS or Javascript), their experience isn&#8217;t harmed.</p>
<p>But, like most designers, I&#8217;m sure you&#8217;d like to maintain some level of control over the page layout.  So we&#8217;ll use some very simple CSS to control its behavior.</p>
<h2>Let&#8217;s Do This</h2>
<p>We&#8217;ll start by designing the layout of our form. </p>
<pre>
<code>    &lt;ol id="form"&gt;
        &lt;li&gt;
            &lt;label for="Name"&gt;Name&lt;/label&gt;
            &lt;input type="text" name="Name" id="Name" /&gt;&lt;/li&gt;
        &lt;li&gt;
            &lt;label for="email"&gt;Email&lt;/label&gt;
            &lt;input type="text" name="email" id="email" /&gt;&lt;/li&gt;
        &lt;li&gt;
            &lt;label for="comment"&gt;Question or Comment&lt;/label&gt;
            &lt;textarea name="Comment" id="Comment" rows="5" cols="20"&gt;&lt;/textarea&gt;
         &lt;/li&gt;
        &lt;li&gt;&lt;input type="submit" value="Send" id="submit" name="submit" class="inputButton" /&gt;&lt;/li&gt;
    &lt;/ol&gt;</code>
</pre>
<p>Then we&#8217;ll add the CSS.  We won&#8217;t get into specifics about the design. We can simply use these pre-defined styles.</p>
<pre>
<code>#form {
	margin: 0;
	padding: 0;
}
#form label {
	padding: 3px 10px 0 0;
	margin: 0 0 3px 0;
	display: block;
}
#form li {
	margin: 0 0 5px 0;
	padding: 0;
	list-style: none;
}
#form input {
	border: 1px solid #737272;
	background: #EEE;
	width: 175px;
}
#form textarea {
	border: 1px solid #737272;
	background: #EEE;
}</code>
</pre>
<p>The above code leaves us with a set of form fields that looks roughly like this.  You&#8217;ll notice that in Safari or Chrome, there is a gripper handle on the bottom right corner.  </p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/form-a.png" alt="" title="" width="267" height="322" /></p>
<p>This resize handle allows the user to make the box taller or wider if they feel they need just a little more room to continue typing&#8230;even if it means disregarding the boundaries of our beautiful layout!</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/form-b.png" /></p>
<h2>The Fix</h2>
<p>Since we want the <code>textarea</code> to match the width of the other input values, we&#8217;ll add a width. This also keeps the <code>textarea</code> from being resized to a width that is smaller than that which is defined for our layout.</p>
<pre>
<code>#form textarea {
	border: 1px solid #737272;
	background: #EEE;
	<strong>width: 175px;</strong>
}</code>
</pre>
<p>Our biggest concern is if the user makes the <code>textarea</code> too <em>big</em>, though.  So we&#8217;ll add a <code>max-width</code> property.</p>
<pre>
<code>#form textarea {
	border: 1px solid #737272;
	background: #EEE;
	width: 175px;
	<strong>max-width: 175px; /* RESTRICT SAFARI RESIZE */</strong>
}</code>
</pre>
<p>Now, our <code>textarea</code> is only resizable vertically.  This is nearly complete for our example, but we don&#8217;t want the user to be able to resize <em>infinitely</em>.  It&#8217;s fun to play around with, but it looks pretty silly.  To stop that from happening, we define a <code>max-height</code> that we think will give our users the flexibility that they&#8217;ll need if they want more space to type in.</p>
<pre>
<code>#form textarea {
	border: 1px solid #737272;
	background: #EEE;
	width: 175px;
	max-width: 175px; /* RESTRICT SAFARI RESIZE */
	<strong>max-height: 250px; /* RESTRICT SAFARI RESIZE */</strong>
}</code>
</pre>
<p><img src="http://www.belafontecode.com/wp-content/uploads/form-c.png" alt="Textarea with all CSS in place." title="" width="290" height="509" /></p>
<p>Now, with all of the proper CSS in place, we avoid disabling features that users may find helpful, while maintaining the layout that we intended when designing the site.</p>
<p class="note"><strong>Note:</strong> Defining rows and columns in your <code>textarea</code> attributes also specifies a minimum width and height for the element.  While necessary for maximum accessibility, these attributes alone do not allow you to control the display as precisely as CSS does.</p>
<p class="note"><strong>Note:</strong> If you design allows room for it, you can also define a max-width that is larger than your <code>textarea</code>&#8216;s standard width to allow flexibility in horizontal sizing.</p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=4Bs-W5VbwEk:siTahksdbio:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=4Bs-W5VbwEk:siTahksdbio:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=4Bs-W5VbwEk:siTahksdbio:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=4Bs-W5VbwEk:siTahksdbio:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=4Bs-W5VbwEk:siTahksdbio:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=4Bs-W5VbwEk:siTahksdbio:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=4Bs-W5VbwEk:siTahksdbio:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=4Bs-W5VbwEk:siTahksdbio:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=4Bs-W5VbwEk:siTahksdbio:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fcontrolling-safari-resizable-textarea-with-css%2F&amp;seed_title=Controlling+Safari+%26amp%3B+Chrome%26%238217%3Bs+Resizable+Textarea+with+Simple+CSS/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fcontrolling-safari-resizable-textarea-with-css%2F&amp;seed_title=Controlling+Safari+%26amp%3B+Chrome%26%238217%3Bs+Resizable+Textarea+with+Simple+CSS</feedburner:origLink></item>
		<item>
		<title>How to Fix MODx CSRF Error when Using Firefox 3.5</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/HFJk-KYaLqI/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Ffix-modx-csrf-error-in-firefox%2F&amp;seed_title=How+to+Fix+MODx+CSRF+Error+when+Using+Firefox+3.5#comments</comments>
		<pubDate>Mon, 28 Dec 2009 07:12:26 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[MODx]]></category>
		<category><![CDATA[solutions]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/?p=120</guid>
		<description><![CDATA[This article describes how to fix the error &#8220;A possible CSRF attempt was detected. No referer was provided by the server.&#8221; that recently appeared when I upgraded to MODx 1.0.2. I use WordPress for all of my blogs, but my CMS of choice is MODx, hands down. As I recently mentioned on the forums and [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">This article describes how to fix the error &#8220;A possible CSRF attempt was detected. No referer was provided by the server.&#8221; that recently appeared when I upgraded to MODx 1.0.2.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/evo-ff.png" alt="MODx + FF" class="floatRight" /></p>
<p>I use WordPress for all of my blogs, but my <abbr title="Content Management System">CMS</abbr> of choice is MODx, hands down.  As I recently mentioned on the forums and on <a href="http://twitter.com/abelafonte/status/6471986750" target="_new">Twitter</a>, the update to version 1.0.2 started causing a very frustrating problem when accessing the manager in my copy of Firefox 3.5.  The good news was that the problem did not seem to appear in Safari, so I was able to get into the manager from there.</p>
<p>The error shows up like this: <strong>A possible <abbr title="Cross Site Request Forgery">CSRF</abbr> attempt was detected. No referer was provided by the server.</strong></p>
<p>If you go to the <a href="http://modxcms.com/forums/index.php?topic=36771.0" target="_new">MODx forums</a>, you&#8217;ll see that they suggest any of the following: 1.) reinstall, 2.) go into your database or site cache file and change the value of <code>Validate HTTP_REFERER headers</code> to &#8220;0&#8243;, or 3.) turning the <code>Validate HTTP_REFERER headers</code> option off in the configuration settings using a browser that can access the manager successfully.</p>
<p>I tried all of these and they <em>do</em> work.  However, <strong>none of these is an actual solution</strong>.  For one, this security feature was added for a reason, and when it&#8217;s disabled, your Manager displays a constant warning about it. Also, if you change this manually in your site cache file, it somehow changes from &#8220;0&#8243; to &#8220;00&#8243; and the problem returns. Another reason is that I launch new sites with MODx at least once a month and I didn&#8217;t want to have to do that every single time I install.</p>
<p>I thought about it for a while and it hit me: the key word here is &#8220;referer&#8221;.  The lack of a referrer made me think of the Firefox <code>about:config</code> panel because I had run into something similar not too long ago.</p>
<p>You see, a while back, I came across a blog posting on the Net somewhere that was entitled something like &#8220;How to Optimize Your Firefox Installation&#8221;.  In it, there was a list of suggested &#8220;tweaks&#8221; that one would apply in the <code>about:config</code> panel that would theoretically speed up Firefox and make an overall &#8220;more optimized&#8221; application.  One of these supposedly helpful suggestions was to instruct Firefox to NOT send referrer information.  Well, I didn&#8217;t nit-pick the changes&#8230; I just applied them <em>*Facepalm*</em>.  It took me over a year to notice that blocking referrer information was actually breaking some functionality on a few sites that I visit.  </p>
<h2>The Solution</h2>
<p>Once I realized that mine was set to block, I made the necessary change, and now the problem is fixed. To get rid of the CSRF error, I went to the <code>about:config</code> of Firefox and found the integer for <code>network.http.sendRefererHeader</code>, which was set to <strong><code>0</code></strong>, and reset it <strong><code>2</code></strong> in order to send the proper referrer information to the website.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/ff_refer_modify.png" alt="" title="ff_refer_modify" width="480" height="220" /></p>
<p class="caption">Modifying the setting in about:config</p>
<h2>Why This Works</h2>
<p>Here&#8217;s some information about the different sendRefererHeader settings in the Firefox <code>about:config</code> from <em><a href="http://cafe.elharo.com/privacy/privacy-tip-3-block-referer-headers-in-firefox/" target="_new">The Cafes</a></em> that helps explain what&#8217;s going on here.</p>
<blockquote><p>Setting it to 1 sends a referer header when following a link to another page, but not when loading images on the page. This will block most cross-site cookie tracking, but still allow WordPress and most other sites that depend on referers to function. Setting sendRefererHeader to 2 (the default) sends it when following links and when loading images on the page.</p></blockquote>
<p>In the case of MODx, setting the integer to &#8220;1&#8243; does not work.  It must be set to the default of &#8220;2&#8243;.  So if you may have been poking around in your Firefox settings at one time or another, make sure to check this setting if you&#8217;re experiencing problems with your MODx installation.</p>
<p class="note"><strong>Note:</strong> I upgraded from 0.9.6 to 1.0.2, so this problem may exist in other versions of MODx, such as 1.0.1 and likely affects all versions of Firefox.</p>
<p class="note"><strong>Note:</strong> If you are having this problem and Firefox is not the culprit, you might have some other software on your computer that is blocking the sending of referrer information in an effort to protect your privacy. Some <a href="http://modxcms.com/forums/index.php/topic,42480.msg260634.html#msg260634" target="_new">forum postings suggest</a> that Norton Anti-Virus may also cause this error.</p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=HFJk-KYaLqI:SaTr7PUj--s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=HFJk-KYaLqI:SaTr7PUj--s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=HFJk-KYaLqI:SaTr7PUj--s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=HFJk-KYaLqI:SaTr7PUj--s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=HFJk-KYaLqI:SaTr7PUj--s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=HFJk-KYaLqI:SaTr7PUj--s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=HFJk-KYaLqI:SaTr7PUj--s:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=HFJk-KYaLqI:SaTr7PUj--s:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=HFJk-KYaLqI:SaTr7PUj--s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Ffix-modx-csrf-error-in-firefox%2F&amp;seed_title=How+to+Fix+MODx+CSRF+Error+when+Using+Firefox+3.5/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Ffix-modx-csrf-error-in-firefox%2F&amp;seed_title=How+to+Fix+MODx+CSRF+Error+when+Using+Firefox+3.5</feedburner:origLink></item>
		<item>
		<title>Installing Sprint’s Sierra Wireless Compass 597 Aircard on OS X Leopard</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/qa9F7kd2Ffw/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fusing-a-sprint-compass-597-on-os-x%2F&amp;seed_title=Installing+Sprint%26%238217%3Bs+Sierra+Wireless+Compass+597+Aircard+on+OS+X+Leopard#comments</comments>
		<pubDate>Mon, 15 Sep 2008 14:10:51 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[Randomonium]]></category>
		<category><![CDATA[sprint]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/?p=102</guid>
		<description><![CDATA[The other day, I finally broke down and bought a wireless aircard from Sprint. The problem is: I couldn&#8217;t get it working on OS X, even after calling tech support! Yes, I have access to T-Mobile hotspots. Yes, there is a Starbuck&#8217;s on every corner. But sometimes I need access from random places. The moments [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption"><img src="http://www.belafontecode.com/wp-content/uploads/compass_597-197x300.jpg" alt="Sierra Wireless Compass 597" title="compass_597" width="197" height="300" class="floatRight" />The other day, I finally broke down and bought a wireless aircard from Sprint.  The problem is: I couldn&#8217;t get it working on OS X, even after calling tech support!</p>
<p>Yes, I have access to T-Mobile hotspots. Yes, there is a Starbuck&#8217;s on every corner. But sometimes I need access from random places.  The moments when I find myself in a situation where Internet is not readily available are rare.  But when I need to get online, and I&#8217;m on a meeting with a small business in the middle of nowhere, $60 per month is chump change considering that could mean the difference between my landing the account or heading back home passing the time with Facebook <a href="http://apps.new.facebook.com/wordchallenge">Word Challenge</a>.</p>
<p>Although I&#8217;m not fond of their cellular plans, I decided to go with Sprint, since I&#8217;m confident that they&#8217;ll have the broadest coverage in the areas where I&#8217;ll likely be.  </p>
<p>I chose the <strong>Sierra Wireless Compass 597</strong> USB aircard.  I didn&#8217;t want to worry about whether or not the computer I&#8217;m using has a wireless card slot. (Especially, since Apple <em>still</em> hasn&#8217;t decided to put one on the regular MacBooks.)</p>
<p>Installing the software for these devices is seemingly straight-forward.  But, contrary to what the instruction booklet tells you, their software does NOT immediately work with OS X.  This is something I discovered after trying it, and later calling tech support.</p>
<div class="note">
<h4>Update:</h4>
<p>These instructions were written for OS X 10.5 (Leopard), but you should be able to figure out the configuration settings on previous OSes based on these.</p>
</div>
<h2>How To Get a Sierra Wireless 597 Running on OS X</h2>
<p>When you insert the broadband card into the USB port on your mac, the <strong>TRU-install CD image</strong> will automatically appear on your desktop.  It will also pop-up the folder on the image that contains the installer for Sprint&#8217;s connection manager, SmartView.</p>
<div class="note">
<h4>Note:</h4>
<p>The software can also be downloaded at <a href="http://www.sprint.com/downloads/">http://www.sprint.com/downloads</a>. Here is the direct <a href="http://www.nextel.com/en/software_downloads/mobile_broadband/sierra_compass_597.shtml">download link for this device </a></p>
</div>
<p><img src="/wp-content/uploads/smartview_window.jpg" alt="SmartView Installer" title="smartview_window"/><br />
Double-click the file called &#8216;<strong>Install Sprint SmartView.mpkg</strong>&#8216; and proceed with the normal Mac installation process.  This will require a restart.</p>
<p>After you&#8217;ve restarted your Mac, you&#8217;ll notice that there is a new shortcut on your desktop for the Sprint SmartView software that controls the Sierra 597 USB device.  </p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/smartview_shortcut.jpg" alt="SmartView shortcut" /></p>
<p>Launch the Smartview software.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/smartview_interface.jpg" alt="Smartview Interface" /></p>
<p>The program displays the status of your wireless card. In this example, it&#8217;s  &#8216;Ready: Sprint Mobile Boradband&#8217;.  If this is a brand new wireless aircard, you&#8217;ll need to activate it.  You can activate using the steps outlined on <a href="http://support.sprint.com/doc/sp9122.xml?selectedDeviceId=9617">Sprint&#8217;s support website</a>, or you can let the SmartView software do it for you.  Some have reported failures during the automatic activation process, but it was seamless for me.</p>
<p>Go to the <strong>Tools</strong> menu and select <strong>Activate Device</strong>.</p>
<div class="note">
<h4>Note:</h4>
<p>You may want to disable Airport or disconnect from your local network.  If you can&#8217;t connect without it, then go ahead and re-enable your local network.</p>
</div>
<p>Once you&#8217;ve installed and activated, the software (and support representatives) will have you thinking that all you have to do now is hit &#8216;Connect&#8217;.  Lies.  While this step <em>is</em> necessary, it&#8217;s only 50% of what you need to do.</p>
<p>When you hit connect, it will probably prompt you for your Mac&#8217;s admin password and then just sit there. Lame.</p>
<h2>The Fix</h2>
<p>What you need to do is configure this new network device in your OS X system preferences.</p>
<p>Launch <strong>System Preferences</strong> and navigate to <strong>Network</strong>.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/system_preferences.jpg" alt="Mac System Preferences" /></p>
<p>Your system will alert you that a new network has been found.  Hit Apply.</p>
<p>Now, <strong>highlight your Sierra Wireless connection in the sidebar</strong>.  You&#8217;ll need to enter a telephone number, account name and password to make this work.  <strong>The phone number and password are not specific to your account.</strong> You&#8217;ll need to fill in the properties of this panel with the following:</p>
<ol>
<li><strong>Telephone Number:</strong> #777</li>
<li><strong>Account Name:</strong> The Sprint email address associated with your account</li>
<li><strong>Password:</strong> 123</li>
</ol>
<p><img src="http://www.belafontecode.com/wp-content/uploads/sierra_dial_settings.jpg" alt="Network Settings" /></p>
<p>Click the <strong>Advanced</strong> button near the bottom and, under the <strong>Modem</strong> tab, choose <strong>Sprint</strong> as your vendor.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/network_adv_tab.jpg" alt="Network Advanced Settings" /></p>
<p>The only model available is <strong>PCS Vision</strong>. So select that and OK it.</p>
<p>Check the box to &#8216;Show modem status in menu bar&#8217; if you choose. </p>
<p>Hit Apply.</p>
<p>Now you can connect using the icon in your menu bar every time you need to use your wireless card.</p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/sprint_menu_bar.jpg" alt="Network Menu Bar Option" /></p>
<div class="note">
<h4>Note:</h4>
<p>You MUST leave the SmartView software installed on your computer in order to connect.  Your system preferences alone won&#8217;t be enough.  You can, however, remove the Sprint icons from the menu bar and the desktop without hurting anything.</p>
</div>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=qa9F7kd2Ffw:QEQTyHHI9wI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=qa9F7kd2Ffw:QEQTyHHI9wI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=qa9F7kd2Ffw:QEQTyHHI9wI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=qa9F7kd2Ffw:QEQTyHHI9wI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=qa9F7kd2Ffw:QEQTyHHI9wI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=qa9F7kd2Ffw:QEQTyHHI9wI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=qa9F7kd2Ffw:QEQTyHHI9wI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=qa9F7kd2Ffw:QEQTyHHI9wI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=qa9F7kd2Ffw:QEQTyHHI9wI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fusing-a-sprint-compass-597-on-os-x%2F&amp;seed_title=Installing+Sprint%26%238217%3Bs+Sierra+Wireless+Compass+597+Aircard+on+OS+X+Leopard/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fusing-a-sprint-compass-597-on-os-x%2F&amp;seed_title=Installing+Sprint%26%238217%3Bs+Sierra+Wireless+Compass+597+Aircard+on+OS+X+Leopard</feedburner:origLink></item>
		<item>
		<title>3 Ways to Get Rid of Spaces in List Item Navigation in IE6</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/B_j6gGXmamc/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2F3-ways-to-get-rid-of-spaces-in-list-item-navigation-in-ie6%2F&amp;seed_title=3+Ways+to+Get+Rid+of+Spaces+in+List+Item+Navigation+in+IE6#comments</comments>
		<pubDate>Fri, 18 Jan 2008 03:41:45 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/3-ways-to-get-rid-of-spaces-in-list-item-navigation-in-ie6/</guid>
		<description><![CDATA[If you&#8217;ve ever tried to create an all-css navigation for your website, then you&#8217;ve seen it: dreaded spaces when viewed in Internet Explorer 6 on Windows. This article will outline 3 different ways that you can get rid of these spaces in vertical list item navigation. And in the usual Belafonte style, these solutions are [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">If you&#8217;ve ever tried to create an all-css navigation for your website, then you&#8217;ve seen it: dreaded spaces when viewed in Internet Explorer 6 on Windows.  This article will outline 3 different ways that you can get rid of these spaces in vertical list item navigation. And in the usual Belafonte style, these solutions are hack-free. (Who&#10084;you?!)</p>
<p>Let&#8217;s start with a test navigation.  We&#8217;ll jump right to the part where we&#8217;ve completed the navigation&#8217;s XHTML and CSS.  Copy the following code into your own document if you want to follow along.</p>
<h3>CSS</h3>
<pre>
<code>body {
	font: normal .9em Helvetica, Verdana, Arial, sans-serif;
	background: #FFF;
	color: #FFF;
}
#sideNav {
	margin: 0;
	padding: 0;
	list-style: none;
	width: 200px;
	border: solid 1px #000;
}
#sideNav li {
	margin: 0;
	margin-bottom: 1px;
	background: #CCC;
}
#sideNav li a {
	text-decoration: none;
	color: #FFF;
	padding: 5px 3px;
	background: #000;
	display: block;
}</code></pre>
<h3>HTML</h3>
<pre>
<code>&lt;ul id="sideNav"&gt;
	&lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code>
</pre>
<p>This code is designed in the way that most nav lists would look. Also, most designers would want their links to change on rollover.  Since IE6 does not recognize <code>:hover</code> pseudo classes when applied to any element that&#8217;s not the <code>a</code> tag, we have cannot simply apply the hover to the <code>li</code> tag. Therefore, in order to achieve the rollover, we went ahead and applied <code>display:block</code> to the link so that the rollover color will fill the entire button area.</p>
<p>This is where the problem comes in.  If we apply a background color (yellow) to the <code>li</code> element, we can see that the gap that appears below the link element has something to do with either the outside of the <code>a</code> or the inside of the <code>li</code>.</p>
<p><img src='/wp-content/uploads/ie_menu_w_bkg.gif' alt='Menu in IE6 with BG color Applied' /></p>
<p class="caption">Above: Test menu in IE6 after display:block applied to links. Notice the yellow from list items area showing between block-level links.</p>
<h2>Space Removal Method 1: Define Border-Bottom</h2>
<p>I came up with this solution a few years back and found this to be the simplest fix for the problem: <strong>add a border to the bottom of the <code>li</code> element</strong>. If your navigation has divisions between the links, then this is a perfect fit.  You see how we have a <code>margin-bottom:1px;</code> applied to the list item?  We can simply write in <code>border-bottom:solid 1px #FFF;</code> and eliminate the <code>margin-bottom</code> property.  So, we still get the one-pixel white separation, and our gaps disappear in IE6. Success!</p>
<h2>Space Removal Method 2: Define Link Width</h2>
<p>One of my theories about where the gap comes from is that I imagined there to be an unseen hard return at the end of the link.  In my vision, this hard return gets dropped down below the link when display block pushes the link all the way edge to edge.  With that in mind, I decided to see what would happen if I reduced the width by one pixel or even made it match the width of the containing element.</p>
<p><strong>So, I added <code>width: 200px;</code> to the <code>a</code> to exactly match the width we defined for our nav as a whole.</strong> <em>(You could also use <code>width: 100%;</code> but sometimes that doesn&#8217;t work.)</em>  If my theory of why this happens is close, then this would keep the line return from dropping down below the link. <strong>BAM!</strong>  It worked! The caveat here is that if you have any left/right padding applied to the link element, compliant browsers will add that to the total width. So, if you go with this method, you&#8217;ll have to adjust for that accordingly. (My preferred method is to send different widths to each browser using conditional comments for IE.)</p>
<p><img src='http://www.belafontecode.com/wp-content/uploads/plus3px.gif' alt='Padding added in compliant browsers' /></p>
<p class="caption">Notice how, since we have 3 pixels of padding applied to both sides, defining the links&#8217; width as &#8217;200px&#8217; results in a 206-pixel width in compliant browsers.</p>
<h2>Space Removal Method 3: IE Whitespace Fix Using Floats</h2>
<p>After a long time of using the methods described above, I came across some prett useful information: this phenomenon has a name.  It has been dubbed the &#8220;IE Whitespace Bug&#8221;.  If I had known that, I could have just looked it up online and moved along. (It&#8217;s OK. I ain&#8217;t mad.) Anyway, when I did a search for solutions on this bug, I found tons of hacky &#8220;solutions&#8221;. Some involved commenting out the space after the <code>li</code>, others had a couple of Tantek-styled backslashes. {shudders}</p>
<p>I found this one at <a href="http://www.hicksdesign.co.uk/journal/ie-whitespace-bug" rel="nofollow">Jon Hicks</a>&#8216; website, which involves floating and clearing the list item surrounding the link.  In an IE6-specific conditional stylesheet, I make sure to include the following in my rule for the navigation <code>li</code>:</p>
<pre>
<code>#sideNav li {
	float: left; 	/* IE WHTESPACE BUG */
	clear: left;	/* IE WHTESPACE BUG */
	width: 200px; 	/* IE WHTESPACE BUG */
}</code>
</pre>
<p><strong>Note:</strong> it&#8217;s always good practice to add notes to remind you why you added something.  This way, if you choose to go a different route to solve this bug, you know which declarations to remove.</p>
<p>A few things to understand about this method: The width <em>must</em> be defined on the list item once it&#8217;s floated.  If it&#8217;s not, it will collapse down onto the text that it contains.  Also, the containing element must be floated as well, since only floated elements can wrap to contain other floated items.  Since this is probably a sidebar navigation, it will likely be floated already, so this shouldn&#8217;t be a problem.</p>
<p>I know that there are lots of solutions presented to fix gaps in IE6.  These are the ones that I choose since they don&#8217;t require much to remember and don&#8217;t use hacks.</p>
<p><img src='http://www.belafontecode.com/wp-content/uploads/ie_nav_success.gif' alt='IE Nav Success' /></p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=B_j6gGXmamc:LsP9QtCjgAo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=B_j6gGXmamc:LsP9QtCjgAo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=B_j6gGXmamc:LsP9QtCjgAo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=B_j6gGXmamc:LsP9QtCjgAo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=B_j6gGXmamc:LsP9QtCjgAo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=B_j6gGXmamc:LsP9QtCjgAo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=B_j6gGXmamc:LsP9QtCjgAo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=B_j6gGXmamc:LsP9QtCjgAo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=B_j6gGXmamc:LsP9QtCjgAo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2F3-ways-to-get-rid-of-spaces-in-list-item-navigation-in-ie6%2F&amp;seed_title=3+Ways+to+Get+Rid+of+Spaces+in+List+Item+Navigation+in+IE6/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2F3-ways-to-get-rid-of-spaces-in-list-item-navigation-in-ie6%2F&amp;seed_title=3+Ways+to+Get+Rid+of+Spaces+in+List+Item+Navigation+in+IE6</feedburner:origLink></item>
		<item>
		<title>You Snooze, You Lose – Reasons &amp; Ways to Avoid Design Apathy</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/eGRuHqrNmCI/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fway-avoid-design-apathy%2F&amp;seed_title=You+Snooze%2C+You+Lose+%26%238211%3B+Reasons+%26amp%3B+Ways+to+Avoid+Design+Apathy#comments</comments>
		<pubDate>Wed, 12 Dec 2007 05:32:35 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/way-avoid-design-apathy/</guid>
		<description><![CDATA[This is my reasoning on why procrastinating on idea development is bad, and my take on how to get motivated &#38; avoid design apathy. As a designer, I know what it&#8217;s like to have an awesome design hit me at 2:00 a.m. and think &#34;I&#8217;ll do that in the morning&#34;, only to have it disappear [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">This is my reasoning on why procrastinating on idea development is bad, and my take on how to get motivated &amp; avoid design apathy.</p>
<p>As a designer, I know what it&#8217;s like to have an awesome design hit me at 2:00 a.m. and think &quot;I&#8217;ll do that in the morning&quot;, only to have it disappear in the land between sleep and awake. I also know what it&#8217;s like to have an amazing idea that you plan to &quot;get around to later&quot;, only to see it show up on television, or in someone else&#8217;s portfolio. C&#8217;mon, You <em>know</em> you thought of it long before that guy! But, really, who&#8217;s gonna believe you?</p>
<p>What happens a lot of times also, is that you may not necessarily be the first to do something, but at the time when you thought to do it there were only a few examples of that technique.  Sadly, when you finally get around to it, the style, technique or typeface that you wanted to experiment with has become a huge trend online and most likely lost its appeal.  By that point, you simply write it off and move on to something else.</p>
<p>The problem with ideas—especially the good ones—is that they&#8217;re like treasure during the Gold Rush.  If you know there&#8217;s gold to be found in the hills and you don&#8217;t go out and get it, then someone else is sure to find it.  And once one person finds that gold, everyone else heads that direction and stays there until there&#8217;s nothing else of value. Unique ideas are no different. Your idea could be the beginning of a point of change in design.</p>
<p>Not that it was going to be revolutionary or anything, but my latest experience with orphaned ideas is the concept of using watercolor as a primary element in the design of this site. A while back, in an effort to go offline for inspiration in online design, I trotted on down to the nearest Hobby Lobby and grabbed two tubes of watercolor paints in two different shades of blue. Unfortunately, I sat on this one for a very long time and that idea that I neglected for so long was implemented by others who put turned it into something real once they decided it was something they wanted to do. Examples are <a href="http://www.antoniorozco.com" rel="nofollow">Antonio Orozco</a>’s new site, launched at the beginning of 2007, <a href="http://www.happycog.com" rel="nofollow">Happy Cog</a> and <a href="http://www.webdesignerwall.com" rel="nofollow">Web Designer Wall</a>, all of whom use watercolors as design elements. Needless to say, I had to take my design in a different direction.  But, one thing I had to realize was that missing the boat on this one was all my fault. Foiled, yet again!</p>
<p>So, the question arises: How does a designer avoid being only a back-room innovator… an idea alienator… a teacher-but-not-doer&#8230; all bark and no bite? Here are a few pointers that I think might help.</p>
<ol class="standOutList">
<li>
<h2>Solidify Your Initial Thoughts</h2>
<p>If you don&#8217;t have a sketchbook, then you&#8217;ll probably want to get one. It’s always good to convert abstract concepts into something more tangible. Jot down a brief, written explanation of what you’re thinking or try to rough it out. Even if your idea or the execution of it isn’t exactly clear in your head, scribble down what you have. It might be a bit cloudy, but a very rough sketch is better than a half-memory.</p>
</li>
<li>
<h2>Discuss Your Idea With Like-Minded People</h2>
<p>Don’t be afraid to start talking about your new idea. Once you start telling people about what you’re brainstorming, all sorts of good things can happen.</p>
<p>If you’re one who’s afraid someone will take your new idea and use it, talk about it anyway. The fear of having it swiped from you could be the kick in the butt that you need to get moving! (Although, I would hope that your design peers are cooler than that.)</p>
<p>Another good thing that could come out of peer discussion is that you get feedback on your concept. This feedback, along with peer suggestions can help you refine your idea and avert certain tough situations down the road.</p>
<p>A conversation like this also gives you the opportunity to hear yourself talk about it. This has a subconscious impact. It makes a concept feel more real, thus making you more likely to follow through.</p>
</li>
<li>
<h2>Discuss Your Idea with Non-Designers</h2>
<p>This could be synonymous with “people who applaud you no matter what”. Take Mom, for instance. I don’t recall ever telling my Mom about something I plan to do, only to have her respond with: “Well, how will that approach impact the overall usability?”  And, while siblings are usually not afraid to say things like: “Aaron, that’s the dumbest thing I’ve ever heard…” the chances of getting negative feedback from them and other non-designers are slim.</p>
<p>They’re not going to be critiquing the concept; they’re just hearing you out. And what they say usually serves as the positive feedback that you need in order to get over any inhibitions that you may have. Call it moral support.</p>
</li>
<li>
<h2>Google It</h2>
<p>It’s always good to jump online and see what’s going on around you when you’re about to do something new. If you’re inventing something that has yet to be used, you want to make sure it truly is a unique idea before touting it as such.</p>
<p>Also, you can get an awful lot of design inspiration from other designers’ work. Even when you’re striving to be unique in some aspect of design, there is nothing wrong with allowing another designer or artist’s work influence you.</p>
<p>In my opinion, we are all influenced by each other’s work in some way or another. Sometimes these influences are subconscious, other times intentional. But either way, it’s usually constructive and rarely detrimental.</p>
</li>
<li>
<h2>Get Started</h2>
<p>You can’t finish something that you never start. If you do everything previously mentioned a million times over, but never do anything about it, you run the risk of becoming a serial planner whose ideas motivate others, but has no work to show for himself.  While you may not realize it, your peer conversations have a sort of symbiotic effect: you benefit and <strong>so do your peers</strong>.</p>
<p>So, chances are, that as a result of what they know you’re working on, they’ve gone home and started working on ideas that started churning in <em>their</em> heads during the brainstorming session. While it’s awesome that you were able to motive other people, you don’t want to be the only one who’s consistently trying to “get around to” creating your truly original idea.</p>
</li>
</ol>
<p>The point of all this is: when you have a great idea, don&#8217;t sit on it. It does you no good to have the creative juices flowing if you don&#8217;t create anything that serves as a representation of that creativity. So, whatever you do, stay motivated, stay fresh and keep producing.</p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=eGRuHqrNmCI:I0zre-LEdlE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=eGRuHqrNmCI:I0zre-LEdlE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=eGRuHqrNmCI:I0zre-LEdlE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=eGRuHqrNmCI:I0zre-LEdlE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=eGRuHqrNmCI:I0zre-LEdlE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=eGRuHqrNmCI:I0zre-LEdlE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=eGRuHqrNmCI:I0zre-LEdlE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=eGRuHqrNmCI:I0zre-LEdlE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=eGRuHqrNmCI:I0zre-LEdlE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fway-avoid-design-apathy%2F&amp;seed_title=You+Snooze%2C+You+Lose+%26%238211%3B+Reasons+%26amp%3B+Ways+to+Avoid+Design+Apathy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fway-avoid-design-apathy%2F&amp;seed_title=You+Snooze%2C+You+Lose+%26%238211%3B+Reasons+%26amp%3B+Ways+to+Avoid+Design+Apathy</feedburner:origLink></item>
		<item>
		<title>I Believe in Santogold</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/VXw-B2nJHfU/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fi-believe-in-santogold%2F&amp;seed_title=I+Believe+in+Santogold#comments</comments>
		<pubDate>Sat, 08 Dec 2007 19:29:02 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/i-believe-in-santogold/</guid>
		<description><![CDATA[With running buddies like pop-dub artist M.I.A., landing an opening gig for Bjork and working with the likes of Diplo and Spank Rock, Santogold can&#8217;t go wrong. I first heard Santogold (Santi White) on Mark Ronson&#8217;s July 2007 album &#8216;Version&#8217;, on the track called &#8216;Pretty Green&#8217;. I must admit, though, it didn&#8217;t stand out too [...]]]></description>
			<content:encoded><![CDATA[<p class="leadCaption">With running buddies like pop-dub artist M.I.A., landing an opening gig for Bjork and working with the likes of Diplo and Spank Rock, Santogold can&#8217;t go wrong.</p>
<p><img src='http://www.belafontecode.com/wp-content/uploads/santogold.jpg' alt='Santi White, a.k.a. Santogold' class="floatRight" />
<p>I first heard Santogold (Santi White) on Mark Ronson&#8217;s July 2007 album &#8216;Version&#8217;, on the track called &#8216;Pretty Green&#8217;.  I must admit, though, it didn&#8217;t stand out too much to me at the time.  After a little while, that song grew on me, and now I have it in iTunes rotation.</p>
<p>A few months later, though, when I heard &#8216;Creator&#8217; from Santogold&#8217;s upcoming album, I was like &#8220;Maaan!&#8221;</p>
<p>I&#8217;m not going to regurgitate her career bio here, as you can easily find it in a <a href="http://www.google.com/search?q=santogold" rel="nofollow">Google search</a>.  I will say, though, if you like M.I.A. (I only dug her <em>first</em> album) and Bjork, then Santogold is a definite must-have in your playlist.</p>
<p>Trasn Menagerie has an <a href="http://www.trashmenagerie.com/blog/2007/05/15/santogold-delivers-the-explosion/" rel="nofollow">in-depth write up on Santogold</a> along with the script from an interview with Santi.</p>
<h2>Music Samples</h2>
<h3>Santogold &#8211; Creator</h3>
<h3>Santogold &#8211; You Will Find A Way (Remix)</h3>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=VXw-B2nJHfU:IUB8XjTvc7s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=VXw-B2nJHfU:IUB8XjTvc7s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=VXw-B2nJHfU:IUB8XjTvc7s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=VXw-B2nJHfU:IUB8XjTvc7s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=VXw-B2nJHfU:IUB8XjTvc7s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=VXw-B2nJHfU:IUB8XjTvc7s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=VXw-B2nJHfU:IUB8XjTvc7s:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=VXw-B2nJHfU:IUB8XjTvc7s:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=VXw-B2nJHfU:IUB8XjTvc7s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fi-believe-in-santogold%2F&amp;seed_title=I+Believe+in+Santogold/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fi-believe-in-santogold%2F&amp;seed_title=I+Believe+in+Santogold</feedburner:origLink></item>
		<item>
		<title>Experimenting with HDR Photography</title>
		<link>http://feedproxy.google.com/~r/belafontecode/~3/OlxE4_AjKzk/</link>
		<comments>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fexperimenting-with-hdr-photography%2F&amp;seed_title=Experimenting+with+HDR+Photography#comments</comments>
		<pubDate>Mon, 05 Nov 2007 06:27:59 +0000</pubDate>
		<dc:creator>.abelafonte</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[hdr]]></category>

		<guid isPermaLink="false">http://www.belafontecode.com/experimenting-with-hdr-photography/</guid>
		<description><![CDATA[Earlier this year I saved up and grabbed a Canon 20D. It was something I had waited a long while to get my hands on so that I could finally replace my Rebel film camera. Finally, after I wrapped a few freelance web projects, I got it! Then, I put it on a shelf in [...]]]></description>
			<content:encoded><![CDATA[<p class="leadImage"><img src="http://www.belafontecode.com/wp-content/uploads/balcony.jpg" alt="balcony.jpg" /></p>
<p class="leadCaption">Earlier this year I saved up and grabbed a Canon 20D.  It was something I had waited a long while to get my hands on so that I could finally replace my Rebel film camera.  Finally, after I wrapped a few freelance web projects, I got it!</p>
<p>Then, I put it on a shelf in my closet next to my film camera.It&#8217;s sad, I know.  But the Web is a busy place, and I have been working on all this CSS, Ruby and Ajax stuff.  However, in my link hopping a few months ago, I came across a <a href="http://www.cambridgeincolour.com/tutorials/high-dynamic-range.htm" rel="nofollow">tutorial of HDR photography</a>.  It seemed interesting, but quickly got too complicated for me to take a real interest since I was only casually browsing links on the &#8216;Net.  Well, this evening I came across a few more links featuring HDR or High Dynamic Range techniques and tools that are used to achieve the effect.  </p>
<p>What made me stop long enough to really read what was going on was the <a href="http://www.vanilladays.com/hdr-guide/" rel="nofollow">striking images</a> that I was seeing produced with tools that are common to most graphic and web designers already.  After a few minutes reading  the previously-linked <a href="http://www.vanilladays.com/hdr-guide/" title="HDR tutorial" rel="nofollow">HDR tutorial at Vanilla Days</a>, I grabbed my 20D and went to take some bracketed photos at 9:30 PM on a Sunday night!  I took several sets, but here is the image I used to get started with HDR, (which is probably going to my new reason to keep an SLR on my hip 24/7). </p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/williams_0.jpg" /></p>
<p class="caption">Original Image, 2-second exposure, before any RAW white balance adjustments:</p>
<p>Basically, the technique involves bracketing your images with a difference of -2 or +2 stops. Your settings can be different and you don&#8217;t have to limit your composites to just three photos. Another option is to shoot a single RAW image and create your under- and over-exposed images that image. RAW offers you much greater image data than you&#8217;ll ever see in standard formats like JPEG and TIFF.  (Don&#8217;t get the benefits of RAW mixed up with benefits of HDR.  You could shoot regular images and then move on to HDR techniques, but all that does is limit your control in post-processing and kills some of your possibilities.) </p>
<h2>HDR Experiment 1 &#8211; November 4, 2007</h2>
<p>These images were taken using a 2 second shutter speed with a tripod and timer in RAW. Since I shot these in RAW, I was able to manipulate the white balance that I wanted applied to the images. I tested several and settled on &#8216;Tungsten&#8217;, since this pulls the orange out of images.  </p>
<p><strong>The three original photos: Tungsten-balanced, original -2 +2, respectively:<br />
</strong>  <img src="http://www.belafontecode.com/wp-content/uploads/williams1.jpg" /></p>
<p>  <img src="http://www.belafontecode.com/wp-content/uploads/williamns2.jpg" /></p>
<p>  <img src="http://www.belafontecode.com/wp-content/uploads/williams3.jpg" />  </p>
<p>I used <a href="http://hdrsoft.com" rel="nofollow">Photomatix</a> to create my composite because I was less than pleased with Photoshop&#8217;s &#8216;Merge to HDR&#8217; results <em>(Found under File &gt; Automate)</em>. Since I am only using the Trial of  Photomatix, I saved the <em>Radiance RGBE (.hdr)</em> file that can be opened in most of the latest graphics programs. I did all of my color adjustments in Photoshop, since the &#8216;tone mapping&#8217; option watermarks the images in the trial  of Photomatix. No big deal there. Here is the result of my first experiment with High Dynamic Range photos:  </p>
<p>  <img src="http://www.belafontecode.com/wp-content/uploads/williams_hdr.jpg" />  </p>
<p class="caption">Converted to 8bit with exposure of +13.13, gamma 1.00. I also pushed the saturation up to about +24.</p>
<p>As proof that there is definite value in this technique, I decided to try to replicate the results by simply taking the original RAW image and pulling the levels up and attempting to match the HDR version.  Even if the color could be matched, it wouldn&#8217;t be as crisp.  The reason is because the biggest benefit of HDR is being able to display greater detail in the highlights and shadows of the image.  </p>
<p><img src="http://www.belafontecode.com/wp-content/uploads/williams1a.jpg" /></p>
<p class="caption">Original image, RAW with Tungsten white balance, levels adjusted</p>
<p>Of course, there will be more.  I&#8217;ll do follow-ups to this very soon.</p>
<!-- PHP 5.x --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/belafontecode?a=OlxE4_AjKzk:5H01Xus09to:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=OlxE4_AjKzk:5H01Xus09to:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OlxE4_AjKzk:5H01Xus09to:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=OlxE4_AjKzk:5H01Xus09to:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OlxE4_AjKzk:5H01Xus09to:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OlxE4_AjKzk:5H01Xus09to:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/belafontecode?i=OlxE4_AjKzk:5H01Xus09to:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OlxE4_AjKzk:5H01Xus09to:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/belafontecode?a=OlxE4_AjKzk:5H01Xus09to:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/belafontecode?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fexperimenting-with-hdr-photography%2F&amp;seed_title=Experimenting+with+HDR+Photography/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.belafontecode.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.belafontecode.com%2Fexperimenting-with-hdr-photography%2F&amp;seed_title=Experimenting+with+HDR+Photography</feedburner:origLink></item>
	</channel>
</rss>

