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

<channel>
	<title>Web Cash &#187; Web Design</title>
	<atom:link href="http://www.earn-web-cash.com/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Another New Project: Digital Photography How To</title>
		<link>http://www.earn-web-cash.com/2010/07/16/another-new-project-digital-photography-how-to/</link>
		<comments>http://www.earn-web-cash.com/2010/07/16/another-new-project-digital-photography-how-to/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 17:32:09 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/?p=200</guid>
		<description><![CDATA[So it&#8217;s summer, and in my spare time I&#8217;ve cooked up another idea for a new project: Digital Photography How To. I like writing tutorials/educational stuff (which is the way this site began), and this falls into that niche. Photography is an increasingly important hobby of mine, and this new site will give me a [...]]]></description>
			<content:encoded><![CDATA[<p>So it&#8217;s summer, and in my spare time I&#8217;ve cooked up another idea for a new project: <a href="http://digital-photography-howto.com">Digital Photography How To</a>.</p>
<p>I like writing tutorials/educational stuff (which is the way this site began), and this falls into that niche. Photography is an increasingly important hobby of mine, and this new site will give me a chance to organize my thoughts about photography and also help out others.</p>
<p>As an exercise for myself, I&#8217;m also maintaining a <a href="http://digital-photography-howto.com/category/picture-of-the-day/">Picture of the Day</a> section of the site. The goal is to look through Flickr for one nifty photo each day, post it on the site, and then explain what I do/don&#8217;t like about it. You get better by looking at the work of others&#8230;</p>
<p>Another ulterior motive is that I want to help promote my other project: <a href="http://olinda-gibbons.com">Olinda Gibbons Photography</a>. Ideally, Digital Photography How To can be used to generate some ad revenue, but I&#8217;d be happy if I can also use it to channel some link juice and traffic back to that site. Ultimately, the photography itself will be much more lucrative for Olinda and me than the writing about it&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2010/07/16/another-new-project-digital-photography-how-to/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New Project: olinda-gibbons.com</title>
		<link>http://www.earn-web-cash.com/2010/04/10/new-project-olinda-gibbons-com/</link>
		<comments>http://www.earn-web-cash.com/2010/04/10/new-project-olinda-gibbons-com/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 00:21:03 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/?p=198</guid>
		<description><![CDATA[I recently completed (in a manner of speaking) a new project: olinda-gibbons.com. It&#8217;s a portfolio/proof ordering site for an up and coming photographer. Although it&#8217;s kind of a work in progress, it&#8217;s up, live, and fully functional. I wrote a little bit about how I designed the site elsewhere, and I plan on writing up [...]]]></description>
			<content:encoded><![CDATA[<p>I recently completed (in a manner of speaking) a new project: <a href="olinda-gibbons.com">olinda-gibbons.com</a>. It&#8217;s a portfolio/proof ordering site for an up and coming photographer.</p>
<p>Although it&#8217;s kind of a work in progress, it&#8217;s up, live, and fully functional. I wrote a little bit about <a href="http://life-of-brian.com/2010/04/using-a-jquery-gallery-in-a-photography-website/">how I designed the site</a> elsewhere, and I plan on writing up some more information in the future. That info will likely appear in a new blog portion of <a href="olinda-gibbons.com">olinda-gibbons.com</a>.</p>
<p>In the meantime, one highlight to check out is the <a href="http://olinda-gibbons.com/portfolios/portraits-portfolio/">portraits portfolio</a> page. It was made possible by a combination of the <a href="http://devkick.com/lab/galleria/">galleria jquery plugin</a> and the <a href="http://nextgen-gallery.com/">NextGen gallery plugin for WordPress</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2010/04/10/new-project-olinda-gibbons-com/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Analytics: Inserting Into a WordPress Template</title>
		<link>http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/</link>
		<comments>http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 17:00:48 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Online Tools]]></category>
		<category><![CDATA[Redirected]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Stat Tracking]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/</guid>
		<description><![CDATA[Google Analytics is a great tool for gathering data about your website. You can track and analyze all kinds of data about your visitors, their navigation paths, and the effectiveness of your content. To use Google Analytics, you need to place some javascript on your website. A commonly asked question in forums is, &#8220;How do [...]]]></description>
			<content:encoded><![CDATA[<p>Google Analytics is a great tool for gathering data about your website.  You can track and analyze all kinds of data about your visitors, their navigation paths, and the effectiveness of your content.</p>
<p>To use Google Analytics, you need to place some javascript on your website.  A commonly asked question in forums is, &#8220;How do I add Google Analytics to my WordPress template?&#8221;<br />
<span id="more-184"></span></p>
<h4>Where the Analytics Code Goes</h4>
<p>When you sign up for Google Analytics, Google provides you with a short piece of javascript to place on your site.  The code should look like this.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
var pageTracker = _gat._getTracker(&quot;UA-2894597-3&quot;);
pageTracker._initData();
pageTracker._trackPageview();
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>According to Google&#8217;s instructions, this needs to be placed at the very end of your site &#8211; just before the closing body tag.  To do this, we need to find the closing body tag on the WordPress template.</p>
<h4>Look In Footer.php</h4>
<p>As we previously discovered, a <a href="http://www.earn-web-cash.com/2008/03/10/wordpress-template-basics/">WordPress template</a> is made up of a series of files.  Three basic files &#8211; header.php, sidebar.php, and footer.php &#8211; help build the components of the page.</p>
<p>If your WordPress template follows normal conventions, the closing body tag should be in the footer.php file.</p>
<p>Go to your themes directory of the WordPress installation, navigate to your current theme, and open footer.php.  You should see something like this at the end.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php wp_footer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Add a blank line before the closing body tag.  Simply copy and paste the javascript code that Google provides on that blank line, save the file, and you&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spread the Love: Intersite Linking</title>
		<link>http://www.earn-web-cash.com/2008/03/27/intersite-linking-seo/</link>
		<comments>http://www.earn-web-cash.com/2008/03/27/intersite-linking-seo/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 00:31:44 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Traffic]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[backlinks]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/27/intersite-linking-seo/</guid>
		<description><![CDATA[I recently started working on a new website &#8211; the one I mentioned in the article on creating individual 301 redirects for WordPress. I got the site up and running, updated some content, and then submitted my sitemap information to the Google Webmaster Tools. As usual, the next step is to wait and see how [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started working on a new website &#8211; the one I mentioned in the article on creating <a href="http://www.earn-web-cash.com/2008/03/23/moving-wordpress-individual-301-redirects-with-php/">individual 301 redirects for WordPress</a>.</p>
<p>I got the site up and running, updated some content, and then submitted my sitemap information to the Google Webmaster Tools.  As usual, the next step is to wait and see how long it takes Google to start regularly indexing the site.<br />
<span id="more-183"></span></p>
<h4>Instant Indexing</h4>
<p>When I checked my site&#8217;s info in Webmaster Tools the next day, I found something strange &#8211; a page in the site was already cached in the index.</p>
<p>I had included a link to the site in the article here.  This site has a decent reputation with Google.  According to <a href="http://www.seometer.com">SEO Meter</a>, this site gets crawled every 1 to 2 days.</p>
<p>Apparently, Google crawled the site, followed the link, and cached that page in the index.  It has yet to sort through the new links and the sitemap, but the home page is accessible through a Google search.</p>
<h4>Get Articles Listed Quickly</h4>
<p>This leads me to a pretty useful bit of information.  If you have a link on a trusted site to an page that is previously unknown to Google, it will quickly get stored in the index.</p>
<p>I&#8217;ve never found this type of quick response with directory listings or forum links.  I suppose the difference here is that it&#8217;s a direct content to content link that carries some real weight.</p>
<p>If you already run a website &#8211; or if you write articles at <a href="http://www.associatedcontent.com">Associated Content</a> or a similar site &#8211; this seems like a pretty good strategy for jump-starting the crawling process.  Choose some of your main landing pages and link to them immediately from other sites that you own and write for.</p>
<p>This will send Google your way, get your pages indexed, and start bringing in a modicum of search engine traffic.  From there, you can wait for the rest of your link building strategy to help improve your SERP and Page Rank.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/27/intersite-linking-seo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Marking Up and Styling an Image Gallery</title>
		<link>http://www.earn-web-cash.com/2008/03/25/semantic-markup-image-album/</link>
		<comments>http://www.earn-web-cash.com/2008/03/25/semantic-markup-image-album/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 00:32:36 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/25/marking-up-and-styling-an-image-gallery/</guid>
		<description><![CDATA[While working on a new site (Rolling Horde), I decided to include a small image gallery. I randomly display four images from a flickr album in the sidebar. The pictures are presented in the mark-up that flickr creates, and I used the styling that came with the template I was working from. It creates a [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a new site (<a href="http://rolling-horde.net">Rolling Horde</a>), I decided to include a small image gallery.  I randomly display four images from a flickr album in the sidebar.</p>
<p>The pictures are presented in the mark-up that flickr creates, and I used the styling that came with the template I was working from.  It creates a simple two by two square of photos, with a slight gap in between them.</p>
<p>Although I like the way they are presented, I&#8217;m not sure I like the mark-up that flickr creates.  What would be the simplest, semantic way to mark-up and style images in a small album like this?<br />
<span id="more-181"></span></p>
<h4>Semantic Mark-up: An Unordered List</h4>
<p>Flickr places all of the photos in divs.  These are then styled to float next to each other or appear however you like.</p>
<p>In my opinion, the most semantic way to mark-up photos like this would be to create an unordered list.  A photo album is essentially a list of photos.</p>
<p>This could be an ordered list if the photos were intended to be sequential &#8211; like a photo essay or a comic book &#8211; but the average photo album is just a collection of pictures.</p>
<p>The mark-up would look something like this.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></div></div>

<p>The images would then be displayed in a long, vertical list.</p>
<h4>Styling &#8211; Making the List Inline</h4>
<p>In the end, we&#8217;d like to have the images sit side by side.  Ideally, they&#8217;d form a rectangle of either 2 x 3 pictures, or 3 x 2.</p>
<p>The first thing we want to do, then, is remove the list style type, clear the padding/margins of the list, and make the images appear next to each other.  The last bit we can achieve by giving the list items the &#8220;display: inline&#8221; css declaration.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#images</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#images</span> li <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This would create a simple horizontal list, like this&#8230;</p>
<ul id="images_one">
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
</ul>
<h4>Width: Restricting the Number of Columns</h4>
<p>Notice how the list terminates at the end of its container div and continues on a second line?  </p>
<p>Without a width declaration, the unordered list expands as large as wide as it can.  When that width limit is hit, it starts a second line, and continues until all of the list items have been displayed.</p>
<p>We can use this to our advantage by setting a width declaration.  This allows us to limit the number of images to be displayed in each row.</p>
<p>If our images are 75px square, and we want to display three images across, we can set our width to be about 250px.  The extra space can be used later for paddings and margins &#8211; but the images will appear left justified within the list container.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#images</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">250px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#images</span> li <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This would create a list like this&#8230;</p>
<ul id="images_two">
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
</ul>
<h4>Finishing Touches: Padding and Borders</h4>
<p>With the basic structure complete, we can add a few finishing touches.</p>
<p>First, we might we to add a little padding to the images.  This would space them out a few pixels from each other so that they don&#8217;t appear so cramped.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#image</span> img <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Adding this line to the css file would change the image album to this.</p>
<ul id="images_three">
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
</ul>
<p>Finally, a cool effect for images is to add a border around the image.  If you include a padding value for the img tag, the border is placed 2-3 pixels away from the edge of the picture.  It gives a nice framing effect.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#image</span> img <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">thin</span> <span style="color: #993333;">solid</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This final change would look something like this.</p>
<ul id="images_four">
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
<li><img src="http://farm4.static.flickr.com/3047/2362739858_c82b4de7c2_s.jpg" /></li>
</ul>
<p>By using an unordered list to mark-up your image collection, you end up with semantically correct and simple to style content.  Much better, in my opinion, than a string of divs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/25/semantic-markup-image-album/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving WordPress: Individual 301 Redirects with PHP</title>
		<link>http://www.earn-web-cash.com/2008/03/23/moving-wordpress-individual-301-redirects-with-php/</link>
		<comments>http://www.earn-web-cash.com/2008/03/23/moving-wordpress-individual-301-redirects-with-php/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 01:51:58 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Redirect]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/23/moving-wordpress-individual-301-redirects-with-php/</guid>
		<description><![CDATA[I recently decided to move part of an old blog to an independent site. In order to maintain the meager search engine and referral traffic that the old pages had, I planned on using 301 Redirects. I figured that I would re-create each of the old articles (~10 total articles) on the new site and [...]]]></description>
			<content:encoded><![CDATA[<p>I recently decided to move part of an <a href="http://walkere.frih.net/issues">old blog</a> to an <a href="http://rolling-horde.net">independent site</a>.</p>
<p>In order to maintain the meager search engine and referral traffic that the old pages had, I planned on using 301 Redirects.  I figured that I would re-create each of the old articles (~10 total articles) on the new site and set up an individual 301 Redirect to send users and search engine spiders to the new location.</p>
<p>The problem, however, was that the standard .htaccess rewrite that WordPress uses was conflicting with the 301 Redirects.  For some reason, they just weren&#8217;t working &#8211; so I turned to a PHP-based solution.<br />
<span id="more-180"></span></p>
<h4>301 Redirects In htaccess</h4>
<p>Normally, you can handle a 301 Redirect with a .htaccess file.  You can do this with a single line in your .htaccess file.</p>
<pre>redirect 301 /path/to/old/file.html http://newdomain.com/file.html</pre>
<p>The first part &#8220;redirect 301&#8243; indicates the <strong>type</strong> of redirect.  This tells the browser (or the search engine spider) that the page has <strong>permanently</strong> moved to the new location.  HTTP has several other options.  The 302 Redirect, for example, indicates that the move is <strong>temporary</strong>.</p>
<p>The next two parts indicate the old path to the file and the URL of the new location.</p>
<p>Normally, that&#8217;s all there is to it.  However, WordPress adds its own layer to the .htaccess file which makes your pretty URLs work.  The URL that you request is really just a bunch of variables that tell WordPress what article to pull out of the database and display in the template.</p>
<p>Although you should be able to get the two to work together, I couldn&#8217;t.  The server was ignoring my 301 Redirect and going directly to the other rewrite rules.</p>
<h4>Using PHP to 301 Redirect a WordPress Page</h4>
<p>The solution?  PHP.</p>
<p>Creating a 301 Redirect in PHP is fairly simple.  I&#8217;d read about it before, and just the other day I came across a <a href="http://www.electrictoolbox.com/php-301-redirect/">brief article about it</a> in one of my regular RSS feeds.</p>
<p>You use the header() function to send custom headers to the user&#8217;s browser.  With these, you can tell the browser that you want to initiate a 301 Redirect.  You can then tell the browser where to go to find the article.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HTTP/1.1 301 Moved Permanently&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: http://newdomain.com/article.html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Simply replace the URL with the URL you want to redirect to.</p>
<h4>Making It Work With WordPress</h4>
<p>If you look in your site&#8217;s directory structure, you may realize that the path to your article doesn&#8217;t really exist.</p>
<p>Let&#8217;s say we want to redirect the article located at <a href="http://www.earn-web-cash.com/2008/03/20/useful-wordpress-plugins/">http://www.earn-web-cash.com/2008/03/20/useful-wordpress-plugins/</a>.  To use PHP, we&#8217;d need to create a PHP file to replace the article that is being redirected, and include the snippet of code above.</p>
<p>The problem is that the directory /2008/03/20/useful-wordpress-plugins/ doesn&#8217;t exist.  Those are parameters sent to the WordPress script to fetch information out of the database.</p>
<p>To make this type of redirect work, we need to <strong>create</strong> this directory structure.  Start at your root, and create the directory &#8220;2008.&#8221;  Create a directory &#8220;03&#8243; inside that.  Create a directory &#8220;20&#8243; inside that.  Finally, create the directory &#8220;useful-wordpress-plugins&#8221; inside that.</p>
<p>You&#8217;ll notice that there is a trailing slash in the URL.  In a normal directory structure, &#8220;useful-wordpress-plugins&#8221; is a directory, even though it would seem to represent the file where your article resides.  To get the browser to access a PHP file at this location, we place an index.php file in that directory.  Then, accessing the URL will automatically pull up index.php.</p>
<p>In short, create /2008/03/20/useful-wordpress-plugins/index.php, add the snippet of code above, and your redirect should work flawlessly.</p>
<p>This is a good way to move a few articles on a site to a new site.  If you&#8217;re moving an entire site, you&#8217;d definitely want to look into using the .htaccess method, or creating a PHP file that dynamically chooses what page to redirect the user to.  I only had to move 10 articles, so I created ten php files to do the work for me.</p>
<p>There is one caveat to keep in mind.  If your installation of WordPress uses the URL http://www.earn-web-cash.com/2008 to access the yearly archives, you&#8217;ll run into a problem.  /2008 will now be an actual directory &#8211; so the server will try to serve up the directory.  You&#8217;ll need to change your settings so that the archives are located in something like http://www.earn-web-cash.com/archives/2008.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/23/moving-wordpress-individual-301-redirects-with-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Five Useful, Simple WordPress Plugins</title>
		<link>http://www.earn-web-cash.com/2008/03/20/useful-wordpress-plugins/</link>
		<comments>http://www.earn-web-cash.com/2008/03/20/useful-wordpress-plugins/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 00:30:13 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Sundry Musings]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/20/useful-wordpress-plugins/</guid>
		<description><![CDATA[I&#8217;ve been playing around with developing WordPress sites for a while now. I love how quick and easy it is to launch a site and update content. One of the greatest features is the thousands of plug-ins available for WordPress. You can find a plug-in for just about anything you want to do &#8211; or [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with developing WordPress sites for a while now.  I love how quick and easy it is to launch a site and update content.</p>
<p>One of the greatest features is the thousands of plug-ins available for WordPress.  You can find a plug-in for just about anything you want to do &#8211; or if you have some PHP know-how, you can develop your own.</p>
<p>Here are five basic WordPress plug-ins that I&#8217;d recommend using for <strong>any</strong> project you start.<br />
<span id="more-179"></span></p>
<h4>Akismet &#8211; Spam Protection</h4>
<p>This plug-in comes pre-installed with WordPress &#8211; and there&#8217;s absolutely no reason you shouldn&#8217;t use it.  <a href="http://akismet.com/>Akismet</a> automatically captures most spam comments and places them in a separate &#8220;spam&#8221; category.  You don&#8217;t get bombarded with &#8220;Moderate Now&#8221; e-mails, and you can trust that your comment logs will be pretty clean.</p>
<p>Since I&#8217;ve been using it on this site (about two months), Akismet has caught a little over 900 comments.  Once a week or so, I scan through the comment log and rescue any false positives.  Occasionally a legitimate comment will get swept up, but all you need to do is select it, hit &#8220;De-spam Comment,&#8221; and it will be saved.</p>
<h4>All In One SEO Plug-In</h4>
<p>The <a href="http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/">All In One SEO Plug-In</a> is just what it sounds like.  It adds some extra functionality to tweak the SEO of each of your posts and pages.</p>
<p>For example, All In One will automatically generate a description meta tag based on your excerpt and it will automatically generate keywords based on your tags.  You can also use this to modify the title element of each page.  I&#8217;d say it&#8217;s a must have for optimizing your website.</p>
<h4>Exec-PHP</h4>
<p>Early on, I was looking for a way to execute PHP code inside a post.  WordPress doesn&#8217;t have built-in support for this, so you need to find a plug in to do it.</p>
<p>There are dozens of plug-ins that attempted to implement this feature.  <a href="http://bluesome.net/post/2005/08/18/50/">Exec PHP</a> is hands down the best that I&#8217;ve found.  You simply add regular PHP tags to your post and the PHP code will be executed properly.  I&#8217;ve never run into any bugs while using the plug-in, unlike some other plug-ins I&#8217;ve tested.</p>
<h4>Per Post CSS and JS</h4>
<p><a href="http://www.flog.co.nz/">Per Post CSS and JS</a> allows you to attach individual stylesheets or javascript files to your posts or pages.  This is great for changing the look of a specific page without creating an entirely new template.  By attaching these files to individual posts, you cut down a lot on redundancy.</p>
<p>For example, let&#8217;s say you wrote a javascript file that you use in 10% of your posts.  Why should it be attached to the other 90% of your posts?</p>
<p>I&#8217;ve also found it <strong>very</strong> useful for creating HTML/CSS/JS tutorials.  I can place my sample code in external .css and .js files and have it attached properly to the page.  This way I don&#8217;t have to write in-line styles to demonstrate functionality.</p>
<h4>WP Unformatted</h4>
<p>This simple plug-in removes all of the auto-formatting that WordPress adds to your posts.  With <a href="http://alexking.org/projects/wordpress">WP Unformatted</a>, you can add a custom field to your post to tell the plug-in to strip out all of that formatting.</p>
<p>For example, WordPress likes to wrap text in <code>&lt;p&gt;</code> tags.  Sometimes &#8211; like with forms &#8211; this is entirely undesirable.  It can mess up your carefully formatted (and syntactically correct) HTML.</p>
<p>By using WP Unformatted, you can add sophisticated mark up to your post content without worrying that WordPress will screw it up with random <code>&lt;p&gt;</code> and <code>&lt;br /&gt;</code> tags.</p>
<h4>And Many More&#8230;</h4>
<p>There are, of course, dozens of other useful plug-ins.  I&#8217;ve used plenty of other plug-ins that I liked.  However, these are the ones that I feel appeal to the widest audience.</p>
<p>No matter what you&#8217;re doing, you&#8217;ll probably find a use for spam filtering, individualized stylesheets, SEO, PHP, and clean formatting.  I would never start another project without these plug-ins.</p>
<p>What else do you find useful?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/20/useful-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flash Movies: Standards Compliant Embedding</title>
		<link>http://www.earn-web-cash.com/2008/03/18/flash-movies-standards-compliant-embedding/</link>
		<comments>http://www.earn-web-cash.com/2008/03/18/flash-movies-standards-compliant-embedding/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 22:27:13 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/18/flash-movies-standards-compliant-embedding/</guid>
		<description><![CDATA[The other day, I was looking into using Picasa to create an image album and embed it as a slideshow on a website. Uploading the images and creating the album was easy. However, I noticed that the code Google creates to embed the slideshow (a flash file) is not standards compliant &#8211; it uses the [...]]]></description>
			<content:encoded><![CDATA[<p>The other day, I was looking into using Picasa to create an image album and embed it as a slideshow on a website.</p>
<p>Uploading the images and creating the album was easy.  However, I noticed that the code Google creates to embed the slideshow (a flash file) is not standards compliant &#8211; it uses the <code>&lt;embed&gt;</code> tag.</p>
<p>How can we convert this code to a standards compliant version?<br />
<span id="more-178"></span></p>
<h4>The Original Picasa Embed Code</h4>
<p>The code that Google generates to embed the flash file uses the embed element.  The embed tag includes all of the pertinent information &#8211; the swf file, the height, the width, and the parameters.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;embed <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://picasaweb.google.com/s/c/bin/slideshow.swf&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;288&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;192&quot;</span></span>
<span style="color: #009900;">  flashvars<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fslowwalkere%2Falbumid%2F5178325186511467969%3Fkind%3Dphoto%26alt%3Drss&quot;</span></span>
<span style="color: #009900;">  pluginspage<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.macromedia.com/go/getflashplayer&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>embed&gt;</span></pre></div></div>

<p>The problem here is that the code uses the embed tag.  This is no longer recognized as a valid html element &#8211; although it still functions in most browsers.</p>
<h4>Converting Embed to Object</h4>
<p>We can, however, convert this embed element into an object element.  The object element <strong>is</strong> standards compliant, and <a href="http://www.alistapart.com/articles/flashsatay">with a few parameters</a> it is compatible across most browsers.</p>
<p>To do this, let&#8217;s identify the information that we&#8217;ll need from the original Picasa code.</p>
<p>Obviously, we&#8217;ll need the flash file.  This is the value of the &#8220;src=&#8221; attribute.  We&#8217;ll also need the height and width, which are pretty obvious.  Finally, we&#8217;ll need the parameters to be passed to the flash movie &#8211; located in the flashvars parameter.</p>
<p>Here&#8217;s what an object element might look like to display a flash movie.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">object</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">data</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flash-file.swf&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;400&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;movie&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flash-file.swf&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">object</span>&gt;</span></pre></div></div>

<p>We create the object and give it the attribute <code>type="application/x-shockwave-flash"</code>.  This tells the browser it is a flash movie.</p>
<p>We pass the name of the flash file with the data attribute and the &#8220;movie&#8221; param element &#8211; notice that the filename is passed twice here.</p>
<p>Finally, we pass the height and width parameters as attributes to the object element.</p>
<h4>Filling Out the Object</h4>
<p>Now we can take the values provided for us by Google and create a new, valid object to display the flash slideshow.</p>
<p>The only extra thing we need to know is that we can send another param element &#8211; name=&#8221;flashVars&#8221; &#8211; to contain the flash parameters.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">object</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">data</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://picasaweb.google.com/s/c/bin/slideshow.swf&quot;</span></span>
<span style="color: #009900;">  <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;288&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;192&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;movie&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://picasaweb.google.com/s/c/bin/slideshow.swf&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">param</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;flashVars&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;host=picasaweb.google.com&amp;amp;RGB=0x000000&amp;amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fslowwalkere%2Falbumid%2F5178325186511467969%3Fkind%3Dphoto%26alt%3Drss&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">object</span>&gt;</span></pre></div></div>

<p>This should do the trick and display our Flash slideshow in a standards compliant way.  You should also be able to apply this to any other widget that displays a flash movie.</p>
<p>Also, here are two minor things to keep in mind.</p>
<p>The param elements are self closing &#8211; i.e. <code>&lt;param /&gt;</code>.  The param element doesn&#8217;t contain any text, so it must be self closing to be standards compliant.</p>
<p>The flashVars value is constructed as a query string.  It utilizes ampersands (&amp;) to separate key/value pairs.  Ampersands are a standards no-no &#8211; they should be escaped as an html entity (<code>&amp;amp;</code>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/18/flash-movies-standards-compliant-embedding/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tips to Ensure Your XML RSS Feed is Valid</title>
		<link>http://www.earn-web-cash.com/2008/03/15/valid-xml-rss-feed/</link>
		<comments>http://www.earn-web-cash.com/2008/03/15/valid-xml-rss-feed/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 14:01:06 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Feed]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplexml]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/15/valid-xml-rss-feed/</guid>
		<description><![CDATA[Last month, I wrote on article on creating an RSS feed for your site. Some people have reported problems with the process &#8211; but these all come from malformed XML, not the PHP code supplied in the article. There are a few things you need to keep in mind while writing an XML document, or [...]]]></description>
			<content:encoded><![CDATA[<p>Last month, I wrote on article on <a href="http://www.earn-web-cash.com/2008/02/14/create-rss-feed-php/">creating an RSS feed for your site</a>.  Some people have reported problems with the process &#8211; but these all come from malformed XML, not the PHP code supplied in the article.</p>
<p>There are a few things you <strong>need</strong> to keep in mind while writing an XML document, or else the RSS reader will not be able to understand it.  It&#8217;s better to <a href="http://hsivonen.iki.fi/producing-xml/">think of writing XML as writing code than text</a>, because there are some strict syntax rules you need to adhere to.<br />
<span id="more-177"></span></p>
<h4>Balance Opening and Closing Tags</h4>
<p>One strict syntax rule of XML is that opening and closing tags must be balanced.  For every opening tag, there must be a closing tag.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>In this example, the first item element is invalid &#8211; because description has no closing tag.  The second example is valid, because description is closed.  You could also use a self-closing tag if description doesn&#8217;t contain a value.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>With a simple feed, it can be easy enough to keep tags balanced.  However, it&#8217;s a good idea to look into <a href="http://www.earn-web-cash.com/2008/02/21/create-rss-feed-simplexml/">using an XML parser like SimpleXML to build the feed</a>.  This ensures that the tags are balanced and that the XML is well-formed.</p>
<h4>Ampersands Are Not Allowed</h4>
<p>The lovely ampersand &#8211; &amp; &#8211; is not allowed to appear in an XML document without being escaped (<code>&amp;amp;</code>).</p>
<p>If a browser or feed reader encounters an ampersand that isn&#8217;t escaped and that isn&#8217;t being used to form a valid entity, the application will simply stop reading.  You might overlook this possible problem if your URLs use query strings &#8211; and thus have ampersands inside them.</p>
<p>The solution is to escape all of the URLs and data that is going into your feed.  The reader will convert <code>&amp;amp;</code> back into &amp; so that your links work correctly.  PHP offers a function to help you do that.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$escapedText</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$unescapedText</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Pass all of the text that needs to be escaped (like your URLs) through the htmlentities function, and your problems will be solved.  Incidentally, this will also escape &gt; and &lt; characters.</p>
<h4>No Non-Breaking Spaces!</h4>
<p>The final tip deals with invalid entities, like <code>&amp;nbsp;</code>.  As mentioned before, ampersands are a strict no-no.  They can be used to form entity codes, but they cannot be used by themselves.</p>
<p>If you attempt to create an entity that the XML processor doesn&#8217;t recognize, it won&#8217;t read it as an entity &#8211; it will read it as an ampersand with some text following.  For example, <code>&amp;bob;</code> would be read by an XML processor as an ampersand and the word &#8220;bob;&#8221;.</p>
<p>It would then promptly stop processing your feed.</p>
<p>One common way for this to break your feed is the non-breaking space character &#8211; <code>&amp;nbsp;</code>.  These often serve no purpose in the document, but you might get them littered around your source code if you use a WYSIWYG editor.</p>
<p>You could get rid of these by filtering your output through a function that does a str_replace of <code>&amp;nbsp;</code> with &#8216; &#8216;.</p>
<p>If the non-breaking space character serves a purpose in your document, you can preserve it for the browser but make the XML processor ignore it.  This is where CDATA comes in.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[This is a description with content that</span>
<span style="color: #339933;">&lt;strong&gt;shouldn't&lt;/strong&gt; be interpeted</span>
<span style="color: #339933;">by the &amp;nbsp; XML processor.]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>When you wrap text inside that tag &#8211; <code>&lt;![CDATA[</code> and <code>]]&gt;</code> &#8211; you tell the processor to ignore the text and spit it out as is.  This can help your non-breaking space character make it to the user.  You may also want to use this if your descriptions and content include HTML tags.</p>
<h4>Browse the Spec</h4>
<p>These are a couple of tips to help you address some of the more common things that will break your XML documents.</p>
<p>However, there are many other minor errors you can come across.  The only way to learn about them and solve them is through two things &#8211; research and trial and error.</p>
<p>You may want to take some time to browse the <a href="http://www.xml.com/axml/testaxml.htm">XML specification</a> as well as read forums for problems that other people have.  Then, test things out and find out what doesn&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/15/valid-xml-rss-feed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Traffic Through Social Bookmarking</title>
		<link>http://www.earn-web-cash.com/2008/03/12/traffic-social-bookmarking/</link>
		<comments>http://www.earn-web-cash.com/2008/03/12/traffic-social-bookmarking/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 21:00:34 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Traffic]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[backlinks]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[social bookmarking]]></category>
		<category><![CDATA[stumbleupon]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/12/traffic-through-social-bookmarking/</guid>
		<description><![CDATA[Since Digg broke the scene years ago, website operators have looked to social bookmarking sites for help. They can be a great source of traffic, and they can also be a good source of backlinks for search engine optimization. For now, let&#8217;s stick with the traffic component. Can a social bookmarking site direct significant traffic [...]]]></description>
			<content:encoded><![CDATA[<p>Since Digg broke the scene years ago, website operators have looked to social bookmarking sites for help.  They can be a great source of traffic, and they can also be a good source of backlinks for search engine optimization.</p>
<p>For now, let&#8217;s stick with the traffic component.  Can a social bookmarking site direct significant traffic to your site, and is it worth your trouble to use them?<br />
<span id="more-176"></span></p>
<h4>Case One: Digg</h4>
<p>I&#8217;ve used a variety of social bookmarking sites while promoting this site &#8211; <a href="http://www.digg.com">Digg</a> being one of them.  Although some people have had tremendous success with Digg, I haven&#8217;t.  Most of the articles I Digg end up falling off the recently submitted page without too many Diggs.</p>
<p>In the past two months, I&#8217;ve had a dozen or so articles go up on Digg and I&#8217;ve only gotten 230 visits in return.  Most of those articles fall off the page after I&#8217;ve gotten a handful of visits.</p>
<p>Two articles were moderately successful.  <a href="http://www.earn-web-cash.com/2008/01/30/resize-images-php/">One article</a> I didn&#8217;t submit myself &#8211; a reader Dugg it and it promptly gained about 20 Diggs.  Despite its relative popularity, it didn&#8217;t bring in a whole lot of traffic.</p>
<p>Many of my articles are designed to garnish search engine traffic, so that may be why they don&#8217;t appeal to users scanning a bookmark list.  I did write <a href="http://www.earn-web-cash.com/2008/03/03/ubuntu-linux-myths/">another article</a> that focused more on an attention grabbing topic and less on search engine juju, and it did ok on Digg (~100 visits).</p>
<p>For whatever reason, Digg hasn&#8217;t been tremendously helpful for me.  I still leave it on the toolbar at the bottom &#8211; so that users can Digg an article they like &#8211; but I don&#8217;t actively submit many articles hoping for traffic.</p>
<h4>Case Two: dZone</h4>
<p>While browsing through social bookmarking sites to promote this site, I stumbled on <a href="http://www.dzone.com">dZone</a>.</p>
<p>At first I was excited.  It&#8217;s geared towards programmers and web developers, so my technically oriented articles should have done well.  Not so much.</p>
<p>Perhaps I haven&#8217;t found the right approach to take.  Some articles were probably too rudimentary for the savvy audience, while the more advanced articles didn&#8217;t have attention grabbing topics.</p>
<p>I&#8217;ve gotten a little bit of traffic from dZone &#8211; slightly less than from Digg &#8211; but it&#8217;s nothing to write home about.  I continue to use it every now and again to gain some backlinks, but I don&#8217;t count on it for traffic either.</p>
<h4>Case Three: Stumblupon</h4>
<p>Unlike Digg and dZone, <a href="http://www.stumbleupon.com">Stumble Upon</a> has done a great job.</p>
<p>One day I looked at my Google Analytics data, and I thought the thing had broken.  An average day at the time was about 2-300 visits &#8211; and this day showed as over 2,000 visits.</p>
<p>I went into the data and found out that one of articles was bringing in a ton of traffic from Stumble Upon.  The same article that brought in about 100 visits on Digg brought in over 2000 visits from Stumble Upon.</p>
<p>I wish I knew why it did that well, and how I could repeat it, but it just kind of happened.</p>
<p>Within the last few days, I&#8217;ve also noticed another page bringing in a decent amount of Stumble traffic.  For the past several days, it&#8217;s brought in 50+ visits each day.  I&#8217;m wondering how long that&#8217;ll last before the page gets shuffled out of the index.</p>
<h4>Bottom Line</h4>
<p>In terms of traffic, social bookmarking sites can be effective but they seem to be out of your own control.</p>
<p>I haven&#8217;t had a lot of luck with Digg and dZone, but I have had some good luck with StumbleUpon.</p>
<p>The best performing articles were submitted by other people, though &#8211; not me.  Maybe those people had fans that followed their bookmarks, leading more traffic to my site.  Or maybe it&#8217;s just luck of the draw.</p>
<p>My advice would be to leave a selection of &#8220;Share This&#8221; icons at the end of your article to encourage users to submit it to their favorite bookmarking sites.  However, don&#8217;t hold your breath and wait for a ton of traffic to come in.</p>
<p>In the meantime, consider the SEO benefits of social bookmarking sites.  We&#8217;ll come back to that another time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/12/traffic-social-bookmarking/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

