<?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>Jeff Malterre &#187; Snippet</title>
	<atom:link href="http://www.jeffmalterre.com/category/snippet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffmalterre.com</link>
	<description>accessible web programmer, SEO specialist, e-commerce professional</description>
	<lastBuildDate>Tue, 05 Oct 2010 18:23:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress Plugin jQuery Image Lazy Load &#8211; Targeting main content and not the sidebar.</title>
		<link>http://www.jeffmalterre.com/2010/09/17/wordpress-plugin-jquery-image-lazy-load-targeting-main-content-and-not-the-sidebar/</link>
		<comments>http://www.jeffmalterre.com/2010/09/17/wordpress-plugin-jquery-image-lazy-load-targeting-main-content-and-not-the-sidebar/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 13:41:38 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=1011</guid>
		<description><![CDATA[Recently I found this plugin called jQuery Image LazyLoad, and it&#8217;s been around for 3 years now. In history, web designers and developers wanted their images preloaded when a user browses to their page, in order for it to display properly and look seamless &#8211; you can find a plethora of old JavaScripts out there [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I found this plugin called <a href="http://wordpress.org/extend/plugins/jquery-image-lazy-loading/" title="jQuery Image Lazy Load">jQuery Image LazyLoad</a>, and it&#8217;s been around for 3 years now.  In history, web designers and developers wanted their images preloaded when a user browses to their page, in order for it to display properly and look seamless &#8211; you can find a plethora of old JavaScripts out there that do this.  However, this was mostly intended for the design, and not for the content.  Lazy Load is intended for content, not design, and it works in the exact opposite way.</p>
<p><a href="http://www.appelsiini.net/projects/lazyload">Lazy Load</a> will display images (content) that are on the visible portion of the web page, images that are outside of the visible are of the page are not loaded until the user scrolls down the page &#8211; this is when Lazy Load will load those images.  The idea is to save page load time.  Since the images outside of the visible area are not loaded until the user scrolls to them, load time is saved.  Let&#8217;s see we&#8217;re looking at a blog that displays 20 articles on a page and has several images in each post.  When we load the page, we&#8217;re probably only seeing the first 2 articles on top, while we&#8217;d have to scroll down to see the rest of the posts.  Well, since we&#8217;re not actively looking at the rest of the posts at that time, then we wouldn&#8217;t need the images within those posts loaded, right?  We&#8217;d only need to see those images when we scroll down the page to view those posts.  That&#8217;s the great idea behind this tool, it will load the images outside of the active visible area of the browser when the user scrolls down to that part of the web page.  Load time is saved because those images outside the active visible area of the page are simply not loaded, but are waiting to be loaded when the user gets to that part of the page.</p>
<p>Ok, so now we know how great this idea is, and how wonderful of a tool we have here.  Now we&#8217;re going to focus on the plugin for WordPress that implements this tool.  I recently installed this plugin and noticed only 1 thing it was missing &#8211; a setting to target elements.  Why do we need this setting?  Well, if you&#8217;ve installed this plugin and used it, you&#8217;ll notice that some images that are in the active visible area of the screen aren&#8217;t loading until the user scrolls to the bottom of the page (actually, to the bottom of the main content area &#8211; the posts.)  An example of this would be a sidebar, and this is because the HTML for that sidebar would come after the HTML for the main posts &#8211; towards the bottom of the page.  Even though the HTML for that sidebar is at the bottom of the page, CSS will bring it to the top (if that&#8217;s how your layout is being displayed.)</p>
<p><span id="more-1011"></span></p>
<p>First, let&#8217;s think of how we&#8217;re going to fix this problem.  The function is being applied to all elements of the page.  We know there&#8217;s a function that handles the lazy loader and if you&#8217;re familiar with jQuery, we know that that we can target specific elements, and apply the function to those specific elements.  We only want to target our posts and maybe the footer.  First determine what classes or ids of the elements that contain the content you want to target are.  In my case (at the time of this post) my I&#8217;m going to use #mainColumn and #footer, because those ids are applied to the elements of the content that I want to target.</p>
<p>Changing the code to target these elements is really easy, so let&#8217;s change it!  First let&#8217;s take a look at the original code that call&#8217;s this function (we don&#8217;t need to change the function, just the call to the function.)</p>
<p><strong>~/wp-content/plugins/jquery-image-lazy-loading/jq_img_lazy_load.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">/*
  Plugin Name: jQuery lazy load plugin
  Plugin URI: http://github.com/ayn/wp-jquery-lazy-load/
  Description: a quick and dirty wordpress plugin to enable image lazy loading.
  Version: v0.10
  Author: Andrew Ng
  Author URI: http://blog.andrewng.com
  */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> jquery_lazy_load_headers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$plugin_path</span> <span style="color: #339933;">=</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$lazy_url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$plugin_path</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'javascripts/jquery.lazyload.mini.js'</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$jq_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'</span><span style="color: #339933;">;</span>
  wp_deregister_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$jq_url</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1.4.2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquerylazyload'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lazy_url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1.5.0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> jquery_lazy_load_ready<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$placeholdergif</span> <span style="color: #339933;">=</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'images/grey.gif'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;eof
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(document).ready(function($){
  if (navigator.platform == &quot;iPad&quot;) return;
  jQuery(&quot;img&quot;).lazyload({
    effect:&quot;fadeIn&quot;,
    placeholder: &quot;$placeholdergif&quot;
  });
});
&lt;/script&gt;
EOF</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
  add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery_lazy_load_headers'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jquery_lazy_load_ready'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The description of this plugin is completely accurate, quick and dirty. The only thing it really lacks is a configuration for the selector that the function is called from &#8211; <strong>jQuery(&#8220;img&#8221;).lazyload</strong> on <strong>line 27</strong>.  This is what is applying the Lazy Load function to every image on the page.  We&#8217;re going to change it so that it only selects what we want it to, again in my case (at this time) it&#8217;s #mainColumn and #footer.</p>
<p>We&#8217;re going to change the line 27 of that same document we have opened to this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  jQuery<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#mainColumn,#footer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>find<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;img&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>lazyload<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>All this says is &#8220;jQuery, find all the image tags in the #mainColumn and #footer elements, and apply the lazyload function to them!&#8221;;  Like I said, very easy <img src='http://www.jeffmalterre.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2010/09/17/wordpress-plugin-jquery-image-lazy-load-targeting-main-content-and-not-the-sidebar/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>TweetSuite for WordPress Plugin &#8211; W3C Validation Error: Fixed</title>
		<link>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/</link>
		<comments>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 19:53:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[invalid markup]]></category>
		<category><![CDATA[tweetsuite]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=947</guid>
		<description><![CDATA[TweetSuite is a great plugin, it has a widget for displaying your latest tweets, displays tweetbacks, and lets you add in links to tweet or re-tweet a post on your blog. There&#8217;s more then a few things that need to be fixed with this plugin (ref: TweetSuite Errors and Troubleshooting), right now I&#8217;m just going [...]]]></description>
			<content:encoded><![CDATA[<p>TweetSuite is a great plugin, it has a widget for displaying your latest tweets, displays tweetbacks, and lets you add in links to tweet or re-tweet a post on your blog.  There&#8217;s more then a few things that need to be fixed with this plugin (ref: <a href="http://www.geoffmanning.com/twitter/tweetsuite-errors-and-troubleshooting/">TweetSuite Errors and Troubleshooting</a>), right now I&#8217;m just going to focus on some markup validation errors I came across.</p>
<p>The widget for displaying your latest tweets lists each tweet enclosed with li (listed item) tags.  Unfortunately, these listed items have no unordered or ordered list parent tag.  This causes a the markup to be invalid.  To fix this is quite easy&#8230;</p>
<p><span id="more-947"></span></p>
<p>Open <strong>TweetSuite.php</strong> and goto <strong>line 907</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>907
908
909
910
911
912
913
914
915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$buff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> order by datetime desc limit <span style="color: #006699; font-weight: bold;">$max</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$buff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tweet</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/y h:ia'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">datetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>and add in the appropriate opening and closing tags&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>907
908
909
910
911
912
913
914
915
916
917
918
919
920
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$buff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table_name</span> order by datetime desc limit <span style="color: #006699; font-weight: bold;">$max</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$buff</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$tweet</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m/d/y h:ia'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$line</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">datetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will enclose all the listed items with an unordered list tag, thus fixing the invalid markup.</p>
<p>The other problem I found was that some of the tweets had special characters (such as an ampersand) that were not converted to the specific html character code.  This will also cause validation errors.  To convert any special characters to use the appropriate special character code, we&#8217;ll need to make a real simple change.</p>
<p>Open <strong>TweetSuite.php</strong> and goto <strong>line 915</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$tweet</span> &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>and change it to&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>915
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;li class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tweet<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; &lt;a href='<span style="color: #006699; font-weight: bold;">$link</span>'?phpMyAdmin=GNiTviqADsNCTwBkw2A2k7Yfxf8&gt;<span style="color: #006699; font-weight: bold;">$dt</span>&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will now convert any special characters in a tweet to use special character code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/08/05/tweetsuite-for-wordpress-plugin-w3c-validation-error-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a mini login box to Magento</title>
		<link>http://www.jeffmalterre.com/2009/01/16/adding-a-mini-login-box-to-magento/</link>
		<comments>http://www.jeffmalterre.com/2009/01/16/adding-a-mini-login-box-to-magento/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 18:29:54 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[login box]]></category>
		<category><![CDATA[mini-login]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=924</guid>
		<description><![CDATA[I&#8217;m surprised there is not one in the default template for Magento.  Nevertheless, it&#8217;s pretty common to see a login box on a sidebar, and I need one.  This is actually pretty simple to do, we&#8217;re going to be modifying templates, layouts, and unfortunatly we&#8217;re going to have to alter the core (for something really [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m surprised there is not one in the default template for <a href="http://www.magentocommerce.com">Magento</a>.  Nevertheless, it&#8217;s pretty common to see a login box on a sidebar, and I need one.  This is actually pretty simple to do, we&#8217;re going to be modifying templates, layouts, and unfortunatly we&#8217;re going to have to alter the core (for something really silly.)</p>
<p><span id="more-924"></span></p>
<p>First, lets go ahead and make a template for the mini login box.  Take a look in <strong>&frasl;template&frasl;customer&frasl;form&frasl;</strong>&#8230;  What&#8217;s this!?  We already see that there is a <strong>mini.login.phtml</strong>.  For a closer look:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPostActionUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot;&gt;
    &lt;table width=&quot;100%&quot; class=&quot;mini-login&quot;&gt;
        &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Email'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>:&lt;/td&gt;&lt;td&gt;&lt;input name=&quot;login[username]&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Password'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>:&lt;/td&gt;&lt;td&gt;&lt;input name=&quot;login[password]&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;submit&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;
&lt;/form&gt;</pre></div></div>

<p>We&#8217;ll, even though functional, this isn&#8217;t styled nor does it fit in with the default Magento template.  So let&#8217;s change this.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;box base-mini mini-login-form&quot;&gt;
    &lt;div class=&quot;head&quot;&gt;
        &lt;h4&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h4&gt;
    &lt;/div&gt;
    &lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPostActionUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot; id=&quot;login-form&quot;&gt;
        &lt;div class=&quot;content&quot;&gt;
            &lt;ul class=&quot;form-list&quot;&gt;
                    &lt;li&gt;
                        &lt;label for=&quot;email&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Email Address'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
                        &lt;input name=&quot;login[username]&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">htmlEscape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUsername</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Email Address'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; id=&quot;email&quot; type=&quot;text&quot; class=&quot;input-text required-entry&quot; style=&quot;width:122px;&quot; /&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;label for=&quot;pass&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Password'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;/label&gt;&lt;br /&gt;
                        &lt;input name=&quot;login[password]&quot; type=&quot;password&quot; class=&quot;input-text required-entry validate-password&quot; id=&quot;pass&quot; style=&quot;width:122px;&quot; /&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
                &lt;p class=&quot;required&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'* Required Fields'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;
          &lt;/div&gt;
    &lt;div class=&quot;actions&quot;&gt;
        &lt;button class=&quot;form-button-alt&quot; type=&quot;submit&quot; name=&quot;send&quot; id=&quot;send2&quot;&gt;&lt;span&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Login'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;&lt;/button&gt;
    &lt;/div&gt;
&lt;/form&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    var dataForm = new VarienForm('login-form', true);
&lt;/script&gt;
&lt;/div&gt;</pre></div></div>

<p>Also add this to your CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.mini-login-form</span> h4 <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../images/icon_page_white_text.gif</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Now that we have a template (mini.login.phtml), we&#8217;re going to have to add it to our block structure.  Open <strong>layout/customer.xml</strong>, and make this change starting at <strong>line 65</strong>.</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;customer_logged_out<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reference</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;top.links&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">&quot;addLink&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label title&quot;</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;customer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Log In<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;url</span> <span style="color: #000066;">helper</span>=<span style="color: #ff0000;">&quot;customer/getLoginUrl&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Log In<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;prepare</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;urlParams</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;position<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>100<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/position<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/action<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/reference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;remove</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;wishlist_sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/remove<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;remove</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;reorder&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/remove<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reference</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;right&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;customer/form_login&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;mini_login&quot;</span> <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;customer/form/mini.login.phtml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/reference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/customer_logged_out<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Remember to copy this file/folder structure and put it in <strong>app/code/local</strong>.  We do this, because when you go to upgrade your Magento installation, your core files get patched, thus erasing all the hard work you did <img src='http://www.jeffmalterre.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2009/01/16/adding-a-mini-login-box-to-magento/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Delicious for WordPress Plugin &#8211; W3C Validation Error: Fixed</title>
		<link>http://www.jeffmalterre.com/2008/12/11/delicious-for-wordpress-plugin-w3c-validation-error-fixed/</link>
		<comments>http://www.jeffmalterre.com/2008/12/11/delicious-for-wordpress-plugin-w3c-validation-error-fixed/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 15:22:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[w3 validation]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=881</guid>
		<description><![CDATA[I keep almost all my bookmarks at Delicious (formerly del.icio.us.)  So I noticed there is a WordPress plugin to display your Delicious bookmarks.  One of the things I do after I add a new plugin to WordPress, is to validate a page using The W3C Markup Validate Service.  I noticed that my markup was now invalid, but [...]]]></description>
			<content:encoded><![CDATA[<p>I keep <em>almost</em> all my bookmarks at <a title="Delicious is a social bookmarking web service for storing, sharing, and discovering web bookmarks." href="http://www.delicious.com">Delicious</a> (formerly del.icio.us.)  So I noticed there is a <a title="A plugin used to add a widget to your sidebar that will display your Delicious bookmarks." href="http://wordpress.org/extend/plugins/delicious-for-wordpress/">WordPress plugin to display your Delicious bookmarks</a>.  One of the things I do after I add a new plugin to WordPress, is to validate a page using <a title="A service used to validate markup." href="http://validator.w3.org/">The W3C Markup Validate Service</a>.  I noticed that my markup was now invalid, but it wasn&#8217;t really because of the plugin itself.  The errors were caused because some of my Delicious bookmarks have predefined ampersand characters, and the plugin did not replace these with HTML entities.  I first tried replacing my bookmark titles in Delicious, but that just screwed up my titles (I always go for the easy way first.)  So it&#8217;s time to start editing sources again&#8230;</p>
<p>What we need to do to fix this is really quite simple, find the string that stores our bookmark title, and replace the predefined characters with HTML entities.  While looking for the best method to do this using PHP, I found a function that I never knew about before.  There&#8217;s actually a nice PHP function to do this: <a title="This function returns a string with some of these conversions made.  The translations made are those most useful for everyday web programming." href="http://www.php.net/htmlspecialchars">htmlspecialchars()</a></p>
<blockquote>
<p class="para rdfs-comment">Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function returns a string with some of these conversions made; the translations made are those most useful for everyday web programming. If you require all HTML character entities to be translated, use <a class="function" href="http://us2.php.net/function.htmlentities.php">htmlentities()</a> instead.</p>
<p class="simpara">This function is useful in preventing user-supplied text from containing HTML markup, such as in a message board or guest book application.</p>
</blockquote>
<p class="simpara">Perfect, this is what we&#8217;re going to use.  So let&#8217;s find that string now&#8230;</p>
<p class="simpara">Open <strong>delicious.php</strong> and go to <strong>line 74</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>73
74
75
76
77
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">foreach <span style="color: #00AA00;">&#40;</span> $bookmarks-&amp;gt<span style="color: #00AA00;">;</span>items as $bookmark <span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
$msg <span style="color: #00AA00;">=</span> $bookmark<span style="color: #00AA00;">&#91;</span><span style="color: #ff0000;">'title'</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">;</span>
if<span style="color: #00AA00;">&#40;</span>$encode_utf8<span style="color: #00AA00;">&#41;</span> utf8_encode<span style="color: #00AA00;">&#40;</span>$msg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
$link <span style="color: #00AA00;">=</span> $bookmark<span style="color: #00AA00;">&#91;</span><span style="color: #ff0000;">'link'</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">;</span>
$desc <span style="color: #00AA00;">=</span> $bookmark<span style="color: #00AA00;">&#91;</span><span style="color: #ff0000;">'description'</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">;</span></pre></td></tr></table></div>

<p>So we&#8217;re going to take <strong>line 74</strong> and change it to this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>73
74
75
76
77
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">foreach <span style="color: #00AA00;">&#40;</span> $bookmarks-&amp;gt<span style="color: #00AA00;">;</span>items as $bookmark <span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span>
$msg <span style="color: #00AA00;">=</span> htmlspecialchars<span style="color: #00AA00;">&#40;</span>$bookmark<span style="color: #00AA00;">&#91;</span><span style="color: #ff0000;">'title'</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
if<span style="color: #00AA00;">&#40;</span>$encode_utf8<span style="color: #00AA00;">&#41;</span> utf8_encode<span style="color: #00AA00;">&#40;</span>$msg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
$link <span style="color: #00AA00;">=</span> $bookmark<span style="color: #00AA00;">&#91;</span><span style="color: #ff0000;">'link'</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">;</span>
$desc <span style="color: #00AA00;">=</span> $bookmark<span style="color: #00AA00;">&#91;</span><span style="color: #ff0000;">'description'</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">;</span></pre></td></tr></table></div>

<p>Quite simple, now we&#8217;re back on the right track <img src='http://www.jeffmalterre.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2008/12/11/delicious-for-wordpress-plugin-w3c-validation-error-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WP Wall plugin + Elegant Grunge theme &#8211; fixed W3C xHTML validation error</title>
		<link>http://www.jeffmalterre.com/2008/11/20/wp-wall-plugin-elegant-grunge-theme-fixed-w3c-xhtml-validation-error/</link>
		<comments>http://www.jeffmalterre.com/2008/11/20/wp-wall-plugin-elegant-grunge-theme-fixed-w3c-xhtml-validation-error/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 15:48:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[sibble.com]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[elegant grunge]]></category>
		<category><![CDATA[invalid markup]]></category>
		<category><![CDATA[wp wall]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=641</guid>
		<description><![CDATA[I recently installed a plugin called WP Wall (you should now notice it in the sidebar.)  I&#8217;m pretty happy with how it worked out, but I noticed there was a problem validating my markup after installing this plugin. The problem was simple, an input tag had and ID and name of &#8220;page&#8221;.  This ID was [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed a plugin called <a title="WP Wall - WordPress Plugin" href="http://www.prelovac.com/vladimir/wordpress-plugins/wp-wall" target="_blank">WP Wall</a> (you should now notice it in the sidebar.)  I&#8217;m pretty happy with how it worked out, but I noticed there was a problem validating my markup after installing this plugin.</p>
<p>The problem was simple, an input tag had and ID and name of &#8220;page&#8221;.  This ID was already in use by my <a title="Wordpress" href="http://www.wordpress.org" target="_blank">WordPress</a> theme (<a title="Elegant Grunge - WordPress theme" href="http://michael.tyson.id.au/wordpress/themes/elegant-grunge/" target="_blank">Elegant Grunge</a>), and as we all know no two tags can have the same ID.  Generally speaking, <em>page</em> is a pretty common identifier and I&#8217;m not surprised that it was already in use.</p>
<h3>To fix:</h3>
<p style="padding-left: 30px;"><strong>Open wp-wall.php, and go to line 243</strong></p>
<p style="padding-left: 60px;">Change:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>243
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">'&amp;lt;input type=&quot;hidden&quot; name=&quot;page&quot; id=&quot;page&quot;value=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&amp;gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="padding-left: 60px;">To:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>243
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">'&amp;lt;input type=&quot;hidden&quot; name=&quot;wallpage&quot; id=&quot;wallpage&quot; value=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; /&amp;gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="padding-left: 30px;"><strong>Open wp-wall.js.php, and go to line 117</strong></p>
<p style="padding-left: 60px;">Change:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>117
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> page<span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wallcomments #page'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="padding-left: 60px;">To:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>117
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> page<span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wallcomments #wallpage'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I changed the identifier from <em>page</em> to <em>wallpage</em>, but you can use anything you like as long as something else isn&#8217;t already using that specific identifier.  Hopefully this won&#8217;t cause any conflicts within the WP Wall plugin, only time will tell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2008/11/20/wp-wall-plugin-elegant-grunge-theme-fixed-w3c-xhtml-validation-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elegant Grunge WordPress theme &#8211; Fixed image caption box.</title>
		<link>http://www.jeffmalterre.com/2008/11/18/elegant-grunge-wordpress-theme-fixed-image-caption-box/</link>
		<comments>http://www.jeffmalterre.com/2008/11/18/elegant-grunge-wordpress-theme-fixed-image-caption-box/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 05:32:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Snippet]]></category>
		<category><![CDATA[elegant grunge]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sibble.com/?p=361</guid>
		<description><![CDATA[I noticed a problem with the caption boxes that WordPress creates, and the image box model around the images in posts. adding this to styles.css: .wp-caption &#123; padding-right:15px; padding-left:5px; &#125; will change this: to this: Let me know if anyone runs into any problems.]]></description>
			<content:encoded><![CDATA[<p>I noticed a problem with the caption boxes that WordPress creates, and the image box model around the images in posts.</p>
<p>adding this to styles.css:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.wp-caption</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>will change this:</p>
<div id="attachment_371" class="wp-caption aligncenter" style="width: 190px"><a href="http://www.sibble.com/wp-content/theme-fix1.jpg"><img class="size-medium wp-image-371" title="before fix" src="http://www.sibble.com/wp-content/theme-fix1-300x232.jpg" alt="before fix" width="180" height="139" /></a><p class="wp-caption-text">before fix</p></div>
<p>to this:</p>
<div id="attachment_431" class="wp-caption aligncenter" style="width: 183px"><a href="http://www.sibble.com/wp-content/theme-fix2.jpg"><img class="size-medium wp-image-431" title="after fix" src="http://www.sibble.com/wp-content/theme-fix2-300x232.jpg" alt="after fix" width="173" height="134" /></a><p class="wp-caption-text">after fix</p></div>
<p>Let me know if anyone runs into any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffmalterre.com/2008/11/18/elegant-grunge-wordpress-theme-fixed-image-caption-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

