<?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>Chad Von Lind &#187; Website Designer, WordPress Programmer &amp; Theme Developer &#8211; Chad Von Lind</title>
	<atom:link href="http://vonlind.com/tag/tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://vonlind.com</link>
	<description>Web Design Specialist, WordPress, CMS and eCommerce</description>
	<lastBuildDate>Mon, 17 Oct 2011 18:27:25 +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>How To Make Your WordPress Post Look Nice When Shared On Facebook</title>
		<link>http://vonlind.com/2010/10/how-to-make-your-wordpress-post-look-nice-when-shared-on-facebook/</link>
		<comments>http://vonlind.com/2010/10/how-to-make-your-wordpress-post-look-nice-when-shared-on-facebook/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 01:28:25 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=539</guid>
		<description><![CDATA[Have you ever wondered how your WordPress posts might look when they&#8217;re shared on Facebook? If you&#8217;ve ever shared a link on your Facebook account, you&#8217;ve noticed the nifty Title, Image and Description that get automatically loaded to provide an attractive link. Depending on how your particular theme is built, sometimes you&#8217;ll have to cycle [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered how your WordPress posts might look when they&#8217;re shared on Facebook?</p>
<p><img src="http://vonlind.com/wp-content/uploads/2010/10/sharing-links-on-facebook.png" alt="" title="sharing-wordpress-links-on-facebook" width="504" height="296" class="alignnone size-full wp-image-874" /></p>
<p>If you&#8217;ve ever shared a link on your Facebook account, you&#8217;ve noticed the nifty Title, Image and Description that get automatically loaded to provide an attractive link. Depending on how your particular theme is built, sometimes you&#8217;ll have to cycle through several images, before the actual appropriate post image shows up with your Facebook link.</p>
<p>Here is a bit of code you can <code>add to the head section of the header.php file of your theme</code> (Try adding it before the wp_head(); tag) to guarantee that your theme is optimized for Facebook link sharing. It will also make sure that the appropriate post image is the first one that Facebook looks for.</p>
<p><em>Code Last Updated June 3rd 2011</em></p>
<p>This update allows you to set the &#8220;Featured Image&#8221; as the the image that Facebook shows when your link is shared. Secondly, it allows you to set a default image, in case your post does not make use of a &#8220;featured image&#8221;. You can use <a href="http://vonlind.com/wp-content/themes/cvl2011/assets/imgs/default_icon.jpg">a promo graphic</a>, or your logo for this default, by saving it in your themes directory, in a <code>/images/</code> directory with the file name as  <code>default_icon.jpg</code>. Or you can alter the image directory in the code below</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&nbsp;
&lt;!-- Begin FB Sharing for WP by Chad Von Lind. Get the latest code here: http://vonlind.com/?p=539  --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$default_img</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/images/default_icon.jpg'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
	&lt;meta property=&quot;og:title&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> single_post_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$out_excerpt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_excerpt_rss'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$out_excerpt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> 	<span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
	&lt;meta property=&quot;og:url&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$default_img</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
   &lt;meta property=&quot;og:title&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
	&lt;meta property=&quot;og:url&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;/&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
    &lt;meta property=&quot;og:image&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$default_img</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #009900;">&#125;</span>  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!-- End FB Sharing for WP --&gt;</pre>
</div>
</div>
<p><strong><em>Be Aware:</em></strong> Updating your code will not have immediate effects with Facebook, as Facebook will cache your shared link. It could take up to a few hours before the shared link would work properly. You can try to share one of your links that has not been shared before, to test that it is working proper.</p>
<p><em><strong>Coming soon:</strong></em> At the moment, if you don&#8217;t have an image set as &#8220;featured&#8221;, it will just default to your chosen default image in your theme directory. I&#8217;ll be adding the ability for it to check for the first image used in the post if there is no featured image. So the order will be 1) Featured, if not 2) First Image in post, if not 3) Use default image in theme directory.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=539&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/10/how-to-make-your-wordpress-post-look-nice-when-shared-on-facebook/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>WordPress Thumbnails Outside The Loop</title>
		<link>http://vonlind.com/2010/06/wordpress-thumbnails-outside-the-loop/</link>
		<comments>http://vonlind.com/2010/06/wordpress-thumbnails-outside-the-loop/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 19:44:50 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[the_post_image]]></category>
		<category><![CDATA[the_post_thumbnail]]></category>

		<guid isPermaLink="false">http://vonlind.com/?p=490</guid>
		<description><![CDATA[Occasionally you&#8217;ll need to fetch a posts image outside of the loop. &#60;?php $thumb = get_post_meta&#40;$post-&#62;ID,'_thumbnail_id',false&#41;; $thumb = wp_get_attachment_image_src&#40;$thumb&#91;0&#93;, false&#41;; $thumb = $thumb&#91;0&#93;;?&#62; &#160; &#60;img src=&#34;&#60;?php echo $thumb; ?&#62;&#34; alt=&#34;&#34; /&#62; Combine this with the Timthumb script for control over image size. IE: &#160; &#60;?php $thumb = get_post_meta&#40;$post-&#62;ID,'_thumbnail_id',false&#41;; $thumb = wp_get_attachment_image_src&#40;$thumb&#91;0&#93;, false&#41;; $thumb = $thumb&#91;0&#93;; [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally you&#8217;ll need to fetch a posts image outside of the loop.</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>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
   &lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;&quot; /&gt;</pre>
</div>
</div>
<p>Combine this with the <a href="http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/">Timthumb script</a> for control over image size. IE:</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
   <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/timthumb.php?src=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;amp;w=150&amp;amp;h=150&amp;amp;zc=1&quot;
        alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<h3>Not Recommended, But Available Option</h3>
<p>This will output the URL to an image with the size predefined by &#8216;post-thumbnail&#8217; in your functions file when registering the functionality for post images.</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>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my-custom-size'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thumb</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p>The above code is referencing &#8216;my-custom-size&#8217;, which we can see below as being 405&#215;180. Typically <a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/#comment-3053">it is not advised</a> to use these predefined sizes as it will overload your uploads directory with additional sizes, and it puts strain on your server when uploading images. Better to use the above method with the <a href="http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/">Timthumb script</a> to get an exact image size, while making use of image caching.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'add_theme_support'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Added in 2.9</span>
	add_theme_support<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	set_post_thumbnail_size<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Normal post thumbnails</span>
	add_image_size<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'my-custom-size'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">405</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">180</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=490&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2010/06/wordpress-thumbnails-outside-the-loop/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Remove and Prevent Revisions in WordPress</title>
		<link>http://vonlind.com/2009/06/remove-and-prevent-revisions-in-wordpress/</link>
		<comments>http://vonlind.com/2009/06/remove-and-prevent-revisions-in-wordpress/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 19:49:51 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[revisions]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=259</guid>
		<description><![CDATA[I recently noticed that a particular post had built up about 10 or 15 revisions for it. I started thinking that of all the posts I have, there have to be quite a few revisions and therefore are creating a hefty sized table in my database. This was run on my WP 2.8, but should [...]]]></description>
			<content:encoded><![CDATA[<p>I recently noticed that a particular post had built up about 10 or 15 revisions for it. I started thinking that of all the posts I have, there have to be quite a few revisions and therefore are creating a hefty sized table in my database. This was run on my WP 2.8, but should work for 2.6 and up.</p>
<p>Here is a solution to prevent revisions from being created, as well as removing all revisions from your database.</p>
<h3>Prevent Revision Creation</h3>
<p>Open wp-config.php and add this to the very bottom of the file, before the php closing tag.</p>
<p><code>define('WP_POST_REVISIONS', false);</code></p>
<p>This completely turns off any revision creation. If you&#8217;d like to restrict revision creation to a set amount per post, you can change &#8216;false&#8217; for the number of revisions you&#8217;d like stored.</p>
<h3>Remove All Revisions From Database</h3>
<p>Open up your database in phpmyadmin and run this SQL Query.</p>
<p><code>DELETE FROM wp_posts WHERE post_type = "revision";</code></p>
<p>And now you&#8217;ll have a more tidy database.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=259&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/06/remove-and-prevent-revisions-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design Tricks</title>
		<link>http://vonlind.com/2009/01/web-design-tricks/</link>
		<comments>http://vonlind.com/2009/01/web-design-tricks/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 23:22:35 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=105</guid>
		<description><![CDATA[Here is a round up of some very useful tricks and snippets for web designers. Resizeable Background Image with jQuery 15 Wicked CSS Tricks Build a jQuery Interactive Map Better Way To Register the WP Sidebar]]></description>
			<content:encoded><![CDATA[<p>Here is a round up of some very useful tricks and snippets for web designers.</p>
<ul>
<li><a href='http://css-tricks.com/how-to-resizeable-background-image/'>Resizeable Background Image with jQuery</a></li>
<li><a href="http://devsnippets.com/reviews/css-code-snippets-15-wicked-tricks.html">15 Wicked CSS Tricks</a></li>
<li><a href="http://www.newmediacampaigns.com/page/jquery-vs-flash-for-interactive-map">Build a jQuery Interactive Map</a></li>
<li><a href="http://wpengineer.com/wordpress-and-register_sidebar">Better Way To Register the WP Sidebar</a></li>
</ul>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=105&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/01/web-design-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comment Design For WordPress 2.7</title>
		<link>http://vonlind.com/2009/01/comment-design-for-wordpress-2-7/</link>
		<comments>http://vonlind.com/2009/01/comment-design-for-wordpress-2-7/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 03:48:16 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=101</guid>
		<description><![CDATA[If you&#8217;re a WordPress theme developer, I&#8217;m sure you&#8217;ve run into the problem of styling, and altering comments in your theme. Now that comments are called through a loop to allow for the much anticipated threaded comments feature, we&#8217;ll have to make use of our function file to style the comments. If you&#8217;re like most [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a WordPress theme developer, I&#8217;m sure you&#8217;ve run into the problem of styling, and altering comments in your theme. Now that comments are called through a loop to allow for the much anticipated threaded comments feature, we&#8217;ll have to make use of our function file to style the comments.</p>
<p>If you&#8217;re like most every other developer, the first thing you want to get rid of is the &#8220;says&#8221; that follows the authors name. Now we can do it, without having to set the CSS to display none.</p>
<p><strong>01.</strong> In your theme directory, open up functions.php. If you don&#8217;t have this file, go ahead and create one.</p>
<p><strong>02.</strong> Let&#8217;s create the function &#8216;<em>mytheme_comment</em>&#8216; and paste it into our <em>functions.php</em> file.</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>
<span style="color: #000000; font-weight: bold;">function</span> mytheme_comment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;li-comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
     &lt;div id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
      &lt;div class=&quot;comment-author vcard&quot;&gt;
         <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span><span style="color: #000088;">$size</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'48'</span><span style="color: #339933;">,</span><span style="color: #000088;">$default</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;path_to_url&gt;'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
         <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;cite class=&quot;fn&quot;&gt;%s&lt;/cite&gt; &lt;span class=&quot;says&quot;&gt;says:&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_author_link<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>
      &lt;/div&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_approved</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
         &lt;em&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Your comment is awaiting moderation.'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/em&gt;
         &lt;br /&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;div class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span> get_comment_link<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%1$s at %2$s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>  get_comment_time<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>&lt;/a&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_comment_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(Edit)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'  '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_text<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;div class=&quot;reply&quot;&gt;
         <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_reply_link<span style="color: #009900;">&#40;</span><span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'max_depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'max_depth'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;/div&gt;
     &lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p>Looking at this code, you can see exactly what you want to do to style your comments accordingly. After you&#8217;re happy with how you want it, the next step is to create the callback from our &#8216;wp_list_comments&#8217; in the <em>comments.php</em> file.</p>
<p><strong>03.</strong> Open up comments.php in your theme directory, and search for wp_list_comments. Control + F should make short work of that.</p>
<p>The default theme has this exact call:</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> wp_list_comments<span style="color: #009900;">&#40;</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>So we&#8217;ll just use the function name that we created in step 2 (<em>mytheme_comment</em>), and call it as a variable:</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> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'callback=mytheme_comment'</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>And now, we&#8217;ll see the styling reflected in our comments!</p>
<h3>Separate Comments From Trackbacks</h3>
<p>And for another good tip, you should separate your comments from your trackbacks. It&#8217;s just good manners.</p>
<p>In your <em>comments.php</em> file you can create two lists, and call the loop twice. Only for each loop, you can specify which type of comment/trackback is called. Example:</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">	&lt;h3 class=&quot;comment_title&quot;&gt;Comments&lt;/h3&gt;
		&lt;ol class=&quot;commentlist&quot;&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment&amp;callback=mytheme_comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/ol&gt;
&nbsp;
	&lt;h3 class=&quot;trackback_title&quot;&gt;Trackbacks&lt;/h3&gt;
		&lt;ol id=&quot;pings&quot; class=&quot;trackback&quot;&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/ol&gt;</pre>
</div>
</div>
<p>For some complete code, and even some jQuery for a toggle hide switch on the trackbacks, be sure to read the <a href="http://curtishenson.com/separating-and-hiding-trackbacks-with-jquery-in-wordpress-27/">article by Curtis Henson</a>.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=101&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/01/comment-design-for-wordpress-2-7/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>I Broke Up With #</title>
		<link>http://vonlind.com/2009/01/i-broke-up-with-pound/</link>
		<comments>http://vonlind.com/2009/01/i-broke-up-with-pound/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 06:03:41 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=100</guid>
		<description><![CDATA[And I&#8217;ve been steady with javascript:; ever since. Ever since I&#8217;ve become friends with jQuery, I&#8217;ve found that using # inside an anchor href has become occasionally overly jealous and sometimes outright psychotic. After these past incidences, which usually fall in line with using fun stuff like localScroll and scrollTo, I&#8217;ve decided to tell # [...]]]></description>
			<content:encoded><![CDATA[<p>And I&#8217;ve been steady with <em>javascript:;</em> ever since.</p>
<p>Ever since I&#8217;ve become friends with <a href="http://jquery.com/">jQuery</a>, I&#8217;ve found that using <em>#</em> inside an anchor <em>href</em> has become occasionally overly jealous and sometimes outright psychotic. After these past incidences, which usually fall in line with using fun stuff like <a href="http://plugins.jquery.com/project/LocalScroll">localScroll</a> and <a href="http://plugins.jquery.com/project/ScrollTo">scrollTo</a>, I&#8217;ve decided to tell <em>#</em> to # sand, and strictly go with <em>javascript:;</em> inside my href.</p>
<p>As <em>#</em> works as an anchor reference point, for the top of your page, you can imagine it may get in the way of content sliders and other plugins and scripts that make use of a #&#8217;d href.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=100&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/01/i-broke-up-with-pound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding TimThumb To Your WordPress Theme</title>
		<link>http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/</link>
		<comments>http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 19:38:06 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[timthumb]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=34</guid>
		<description><![CDATA[TimThumb PHP Script is a custom image-sizing script, that allows you to produce a cropped and sized version of an image. These are great to use along with a WordPress Magazine Theme. TimThumb has recently been released as open source, and here I will walk you through adding TimThumb to your WordPress theme. Using TimThumb [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.binarymoon.co.uk/projects/timthumb/">TimThumb PHP Script</a> is a custom image-sizing script, that allows you to produce a cropped and sized version of an image. These are great to use along with a WordPress Magazine Theme. TimThumb has recently been released as open source, and here I will walk you through adding TimThumb to your WordPress theme. <span id="more-401"></span></p>
<p>Using TimThumb will require the use of <a href="http://codex.wordpress.org/Using_Custom_Fields" title="Learn about Custom Fields in WordPress">WP Custom Fields</a>.</p>
<h3>01. Setting Up The Script</h3>
<p>Lets grab the <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">TimThumb.php source code</a>, and save it to our theme directory.</p>
<p>To keep things organized, lets save it in a scripts directory in our theme.</p>
<p><code>yourdomain.com/wp-content/themes/your-theme/scripts/timthumb.php</code></p>
<p>Now create a new directory inside of scripts, and name it &#8220;cache&#8221;</p>
<p><code>yourdomain.com/wp-content/themes/your-theme/scripts/cache/</code></p>
<p>Make sure that both directories <em>/scripts/</em> and <em>/cache/</em> are set to 755 so they&#8217;re writable by the server.</p>
<h3>02. Adding The Call To Our Theme Template</h3>
<p>Depending on whether you use <em>home.php</em> or <em>index.php</em>, open the appropriate template file up, and lets find <a href="http://codex.wordpress.org/The_Loop" title="Learn about The Loop in WordPress">The Loop</a>. Look for the calll to the post title, and lets insert the call somewhere below the title, or meta information.</p>
<p>I&#8217;m presenting you with 3 options for the call. You can pick which one might suit you best.</p>
<p><strong>Option 01 &#8211; Show Image Only</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> <span style="color: #666666; font-style: italic;">// This will show only the image. Alter the width and height (in both places) to your needs. ?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumb'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div class=&quot;postthumb&quot;&gt;
		&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/scripts/timthumb.php?src=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;thumb&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$single</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;h=150&amp;w=150&amp;zc=1&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;100&quot; height=&quot;57&quot; /&gt;
	&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p><strong>Option 02 &#8211; Show image, and link image to post</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> <span style="color: #666666; font-style: italic;">// This will show the image and link the image to the post. Alter the width and height (in both places) to your needs. ?&gt;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumb'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div class=&quot;postthumb&quot;&gt;
		&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/scripts/timthumb.php?src=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;thumb&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$single</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;h=150&amp;w=150&amp;zc=1&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;
	&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p><strong>Option 03 &#8211; Show image and link image to URL of your choice. </strong>Requires additional custom field of &#8220;imglink&#8221;. Could be used for outgoing links, or linking a thumb to a full version of the image. This option would work best inside of your <em>single.php</em> template.</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> 	<span style="color: #666666; font-style: italic;">// This will show the image and link it to anything you place into another custom field of &quot;imglink&quot;.</span>
		<span style="color: #666666; font-style: italic;">// Alter the width and height (in both places) to your needs.</span>
  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'imglink'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div class=&quot;postthumb&quot;&gt;
		&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;imglink&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$single</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/scripts/timthumb.php?src=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;thumb&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$single</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;h=150&amp;w=150&amp;zc=1&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;  /&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'imglink'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<h3>03. Making Use of Custom Fields</h3>
<ol>
<li>In your post go ahead and upload your image.</li>
<li>In the &#8220;<strong>LINK URL</strong>&#8221; input, highlight and copy the entire address of the image you just uploaded.</li>
<li>Close the image manager, and open the Custom Fields box down below. </li>
<li>For the <em>key</em> enter <strong>thumb</strong>.</li>
<li>For the <em>value</em>, paste in full address of the image we just copied. ie: <strong>http://your-domain.com/wp-content/uploads/2008/02/my-image.jpg</strong></li>
<li>*For Option 03 &#8211; if you want to link the thumb to a url, you&#8217;ll need to add a new custom field with a key of &#8220;imglink&#8221; and paste in the URL as the value. See example below.</li>
</ol>
<p><a href='http://vonlind.com/wp-content/uploads/2008/12/custom-field-timthumb-demo.jpg'><img src="http://vonlind.com/wp-content/uploads/2008/12/custom-field-timthumb-demo-311x190.jpg" alt="" title="custom-field-timthumb-demo" width="311" height="190" class="alignnone size-medium wp-image-94" /></a></p>
<h3>Need Help?</h3>
<p>Please visit the <a href="http://www.darrenhoyt.com/support/forum/timthumb">Timthumb Support Forums</a>.<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=401&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Measure Page Elements The Easy Way</title>
		<link>http://vonlind.com/2008/06/measure-page-elements-the-easy-way/</link>
		<comments>http://vonlind.com/2008/06/measure-page-elements-the-easy-way/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 23:13:32 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=33</guid>
		<description><![CDATA[Perhaps you&#8217;re the guy who still has to hit the &#8220;Print Screen&#8221; button, paste into Photoshop, and use the marquee tool to measure the pixel width of an element in a website you&#8217;re working on. If so, here are a couple alternatives. 01. XRAY Bookmarklet My first choice, is to make use of XRAY. It [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps you&#8217;re the guy who still has to hit the &#8220;Print Screen&#8221; button, paste into Photoshop, and use the marquee tool to measure the pixel width of an element in a website you&#8217;re working on.</p>
<p>If so, here are a couple alternatives.</p>
<h3>01. <a href="http://www.westciv.com/xray/xray_more.html">XRAY Bookmarklet</a><br />
</h3>
<p> My first choice, is to make use of <a href="http://www.westciv.com/xray/xray_more.html">XRAY</a>. It is just a javascript that allows you to click any block element on a page, and it gives you a list of details for that element.</p>
<p>Try it. Just click the XRAY button, then click anywhere on this page. It&#8217;ll highlight the block, and give you details like the element id, width, height, position, margin, padding and more.</p>
<p><a class="button" href="javascript:function%20loadScript(scriptURL)%20{%20var%20scriptElem%20=%20document.createElement('SCRIPT');%20scriptElem.setAttribute('language',%20'JavaScript');%20scriptElem.setAttribute('src',%20scriptURL);%20document.body.appendChild(scriptElem);}loadScript('http://westciv.com/xray/thexray.js');" style="border: 1px solid rgb(170, 170, 170); padding: 0.5em 2em; background-color: rgb(153, 153, 153); color: rgb(255, 255, 255); text-decoration: none; font-weight: bold; text-shadow: 2px 2px 2px rgb(102, 102, 102); font-size: 1.1em;" title="drag this to your bookmarks bar">XRAY</a></p>
<p><span class="info">For best use, right click the XRAY button, Select &#8220;Bookmark this link&#8221; and save it to your link toolbar. Or just drag the button to your toolbar. That way it&#8217;ll always be a handy button up top, for any page you&#8217;re viewing.</span></p>
<h3>02. <a href="https://addons.mozilla.org/en-US/firefox/addon/539">MeasureIt Addon</a></h3>
<p>The <a href="https://addons.mozilla.org/en-US/firefox/addon/539">MeasureIt Firefox Addon</a> is handy as it allows you to click and drag to manually measure a block element.</p>
<h3>03. <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a></h3>
<p>If you aren&#8217;t using <a href="https://addons.mozilla.org/en-US/firefox/addon/60">this Firefox Addon</a>, then you really need to be. On the WebDev toolbar, click Information &raquo; Display Element Information.</p>
<p>Much like XRAY, this allows you to click an element and get a list of info for it. Keyboard shortcut is Control + Shift + F.</p>
<p>Anyone else have any suggestions for measuring page elements?<img src="http://vonlind.com/?ak_action=api_record_view&#038;id=400&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2008/06/measure-page-elements-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Shadowbox to Magento Ecommerce</title>
		<link>http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/</link>
		<comments>http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 22:24:21 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[shadowbox]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=30</guid>
		<description><![CDATA[Here is a tutorial on how to add the Shadowbox modal box to your Magento powered online store. For those unfamiliar with Magento, it is the latest and greatest in open-source eCommerce software. Varian has done the online communi-tay a great service by building a shopcart the right way, from the ground up. Thanks Varian! [...]]]></description>
			<content:encoded><![CDATA[<p><span class="intro">Here is a tutorial on how to add the <a href="http://mjijackson.com/shadowbox/#demos">Shadowbox</a> modal box to your <a href="http://www.magentocommerce.com">Magento</a> powered online store.</span> For those unfamiliar with Magento, it is the latest and greatest in open-source eCommerce software. Varian has done the online communi-tay a great service by building a shopcart the right way, from the ground up. Thanks Varian! Granted, Magento has a strong learning curve, so those unfamiliar with basic HTML, CSS, or hacking at code&#8230; beware. <span id="more-397"></span></p>
<p><span class="info">Parlez-vous français? <a href="http://google.com/translate?u=http%3A%2F%2Fvonlind.com%2F2008%2F06%2Fadding-shadowbox-to-magento-ecommerce%2F&#038;hl=en&#038;ie=UTF8&#038;sl=en&#038;tl=fr">Voici une traduction Google.</a></span></p>
<p><small>Magento Wiki offers the help of <a href="http://www.magentocommerce.com/wiki/adding_lightbox_to_magento_v2">adding Lightbox2 to your Magento</a> install, for those not interested in the Shadowbox Modal.</small></p>
<h3>Step 01</h3>
<p><del datetime="2008-07-08T15:37:47+00:00"><a href="http://mjijackson.com/shadowbox/#download"><strong>Download Shadowbox</strong></a>. Go with the second download option. Just the files necessary to run shadowbox.</del></p>
<p><span class="info">Shadowbox has been recently upgraded and restructured. This tutorial used the previous Shadowbox version structure. I&#8217;ve compiled Shadowbox how it used to be and created the proper directory structure as well. Please use this download link for your Shadowbox files.</span></p>
<p><span class="download"><a href="http://vonlind.com/mint/pepper/tillkruess/downloads/tracker.php?uri=http://vonlind.com/files/shadowbox-for-magento.zip">Shadowbox for Magento.</a></span></p>
<p>As you are using this tutorial to add Shadowbox to a site that obviously is for commercial purposes, you&#8217;ll need to <strong>buy the Shadowbox Commercial License for $20</strong>.</p>
<p>Assuming that magento is installed in your root directory (yourdomain.com) -</p>
<p>From the root open the /js directory</p>
<p><code>yourdomain.com/js</code></p>
<p>Inside of the /js directory create a new directory named &#8220;sb&#8221; which is short for shadowbox</p>
<p><code>yourdomain.com/js/sb</code></p>
<p>Inside of /sb lets upload the 3 shadowbox directories /build, /images, and /src. So now on the server we should have:</p>
<p><code>yourdomain.com/js/sb/build<br />
yourdomain.com/js/sb/images<br />
yourdomain.com/js/sb/src</code></p>
<h3>Step 02</h3>
<p>Lets open your template directory and drop in the CSS file that comes with Shadowbox.</p>
<p><span class="info">This tutorial will make use of the default template. So if you are not using the default template, you&#8217;ll need to exchange the default template name for your own template directory name.</span></p>
<p>The default template can be found here:</p>
<p><code>yourdomain.com/skin/frontend/default/default/</code></p>
<p>So now, you should have the CSS file named <em>shadowbox.css</em> in this directory:</p>
<p><code>yourdomain.com/skin/frontend/default/default/css/shadowbox.css</code></p>
<p><span class="info">The Shadowbox CSS file can be found in /build/css/ of the shadowbox zip file that you downloaded.</span></p>
<h3>Step 03</h3>
<p>Lets open your template directory and drop in the images used by Shadowbox. Open your default template, open the images directory, and create a new directory named &#8220;sb&#8221;. Drop in the images that are found in the images directory of the Shadowbox download. So now you should have</p>
<p><code>yourdomain.com/skin/frontend/default/default/images/sb/loading.gif<br />
yourdomain.com/skin/frontend/default/default/images/sb/loading-light.gif<br />
yourdomain.com/skin/frontend/default/default/images/sb/overlay-85.png</code></p>
<h3>Step 04</h3>
<p>Now we need to modify the Shadowbox Javascript. Open up the javascript found at:</p>
<p><code>yourdomain.com/js/sb/src/js/shadowbox.js</code></p>
<p>Around line 81, lets replace</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">loadingImage<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'images/loading.gif'</span><span style="color: #339933;">,</span></pre>
</div>
</div>
<p>with</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">loadingImage<span style="color: #339933;">:</span>  SKIN_URL <span style="color: #339933;">+</span> <span style="color: #3366CC;">'images/sb/loading.gif'</span><span style="color: #339933;">,</span></pre>
</div>
</div>
<p>And around line 131 lets replace</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">overlayBgImage<span style="color: #339933;">:</span>    <span style="color: #3366CC;">'images/sb/overlay-85.png'</span><span style="color: #339933;">,</span></pre>
</div>
</div>
<p>with</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">overlayBgImage<span style="color: #339933;">:</span>    SKIN_URL <span style="color: #339933;">+</span> <span style="color: #3366CC;">'images/sb/overlay-85.png'</span><span style="color: #339933;">,</span></pre>
</div>
</div>
<h3>Step 05</h3>
<p>Now lets modify the Magento template files and set them to use Shadowbox. Open up <code>yourdomain.com/app/design/frontend/default/default/layout/page.xml</code></p>
<p>Around line 42, look for</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;mage/cookies.js&lt;/script&gt;&lt;/action&gt;</pre>
</div>
</div>
<p> And insert this right after</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;sb/src/js/lib/yui-utilities.js&lt;/script&gt;&lt;/action&gt;
&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;sb/src/js/adapter/shadowbox-prototype.js&lt;/script&gt;&lt;/action&gt;
&lt;action method=&quot;addJs&quot;&gt;&lt;script&gt;sb/src/js/shadowbox.js&lt;/script&gt;&lt;/action&gt;</pre>
</div>
</div>
<p>Scroll down around line 49 and look for</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">css/menu.css</pre>
</div>
</div>
<p>After that, insert this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">css/shadowbox.css</pre>
</div>
</div>
<p>Save and close.</p>
<p>Now lets open up <code>yourdomain.com/app/design/frontend/default/default/template/catalog/product/view/media.phtml </code></p>
<p><strong>In version 1.0</strong> (1.1.1 below)<br />
Around line 51 find this code:</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> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		 &lt;li&gt;
		   &lt;a href=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;
		&lt;/li&gt;
	  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p>And replace it with this:</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> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		 &lt;li&gt;
		   &lt;a href=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;shadowbox[rotation]&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;
		&lt;/li&gt;
	  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p><strong>version 1.1.1</strong></p>
<p>Around line 51, replace this:</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>51
52
53
</pre>
</td>
<td class="code">
<pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;li&gt;&lt;a href=&quot;#&quot; onclick=&quot;popWin('<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;">getGalleryUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;&quot;&gt;&lt;img src=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&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;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLabel</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: #004000;">htmlEscape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLabel</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; /&gt;&lt;/a&gt;&lt;/li&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>with this:</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>51
52
53
</pre>
</td>
<td class="code">
<pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getGalleryImages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;li&gt;&lt;a href=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;shadowbox[rotation]&quot; title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog/image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProduct</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFile</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">68</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">68</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; width=&quot;68&quot; height=&quot;68&quot; alt=&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;">$_image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLabel</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; /&gt;&lt;/a&gt;&lt;/li&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>This just adds the rel=&#8221;shadowbox[rotation]&#8221; call to the anchor tag, to let shadowbox know that we are summoning its powers. Save and close.</p>
<p>Now lets open the file <code>yourdomain.com/app/design/frontend/default/default/template/page/html/head.phtml </code></p>
<p>Lets replace</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
	var BLANK_URL = '<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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blank.html'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
	var BLANK_IMG = '<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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'spacer.gif'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
&lt;/script&gt;</pre>
</div>
</div>
<p>With this</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
	var BLANK_URL = '<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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blank.html'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
	var BLANK_IMG = '<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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'spacer.gif'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
	var SKIN_URL = '<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;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core/js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJsSkinUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>';
&lt;/script&gt;
&lt;!-- Added Shadowbox --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.onload = function(){ Shadowbox.init(); };
&lt;/script&gt;
&lt;!-- end Added Shadowbox --&gt;</pre>
</div>
</div>
<p>Save and close.</p>
<h3>Enjoy The Fruits</h3>
<p>And now shadowbox should be fully functional for your product images. If you run into any problems, feel free to post questions or comments here.</p>
<p>And don&#8217;t forget to tip the man for his Shadowbox work!</p>
<p>
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input name="cmd" value="_s-xclick" type="hidden">
<input name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBG5nJj2oqJ5ht7Toix7tpNp1pMhwUr0dhjKag6qmtXBZZe5vaFSNT3Dri2GU3+fmYBQclnpqxgrgGhWSs3GSqKLqqqv387K/1Wmp5dXFW+1LwacwCavsSpzbvvyS43b9MmrVVyB/c6Im5lvgkDmLb1jnkJHG/B1uoZhHJKFj2AkjELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIcgd/GJbxXbKAgZiWE7gOelSTmWyFujKEjKVDz+X9hE9UFVawu4Riei5seU5Pl9p/1vlYp9X9/a00agQSFbJhCadMv3N/4q9I0KYVj6IwpPvQUbtLvNXZITSs0lINY6deIgsmzudA3o1uhCMVp6KN6h89J+jUOEoMQssVoAEZcINQyaZoLKDzIS6+2TpYbfHGu2+RtptnDc8Wr9FqTomEF0lbIaCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MTIwMzIwNDgyOFowIwYJKoZIhvcNAQkEMRYEFIlxN81LTigRAnCva4Suac6UmHk0MA0GCSqGSIb3DQEBAQUABIGABzpVNC0ti2maG7UEXCtA5NuMrG+th4jL4fdPiDGCOTUSZQW7YuCHJyGqxp2uRLQ+4Be+oaOGa9VSCIUJThXOgPI4MsMLkHh1RUYM4VM076QhOda674HkuRKyA9yzHJHHVSV6Vw4oEFm+Y5Oj+I5EzfI0/kkrqKt3EGjizMDdfbg=-----END PKCS7-----" type="hidden">
<input id="tip-button" class="button" value="Give a Tip" name="submit" alt="Make a donation with PayPal - it's fast, free and secure!" type="submit">    </form>
</p>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=397&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/feed/</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
		<item>
		<title>Dreamweaver Syntax Highlight Tip</title>
		<link>http://vonlind.com/2008/06/dreamweaver-syntax-highlight-tip/</link>
		<comments>http://vonlind.com/2008/06/dreamweaver-syntax-highlight-tip/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 20:14:15 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[dreamweaver]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=27</guid>
		<description><![CDATA[I use Dreamwweaver CS3 for all of my code editing, and I currently have the pleasure of working with the new Magento Shopcart Software. While adding Shadowbox to the cart, I ran into the small problem of Magento template files that use the rare .phtml file extension. As Dreamweaver by default does not color code [...]]]></description>
			<content:encoded><![CDATA[<p>I use Dreamwweaver CS3 for all of my code editing, and I currently have the pleasure of working with the new <a href="http://magentoecommerce.com">Magento Shopcart Software</a>. While <a href="http://vonlind.com/2008/06/adding-shadowbox-to-magento-ecommerce/">adding Shadowbox</a> to the cart, I ran into the small problem of Magento template files that use the rare .phtml file extension. As Dreamweaver by default does not color code the syntax, it makes it difficult to read the php code that makes up the template file.</p>
<p>Here is how I added syntax highlighting to a specific file type that is not listed by default in Dreamweaver. <span id="more-396"></span></p>
<p><span class="intro">First, I noted what language the template file is made up of.</span> Even though the file extension is .phtml, I know that the actual language is php.</p>
<p><span class="intro">Second, I opened the document type config file in the Dreamweaver installation folder.</span> This should be found in this general area.</p>
<p><small>C:\Program Files\Adobe\Dreamweaver CS3\Configuration\DocumentTypes\<strong>MMDocumentTypes.xml</strong></small></p>
<p>I opened the file with Notepad, and hit Control + F, and entered <em>winfileextension=&#8221;php</em> as my search query. This jumped me down to where the list of file types that use a specific syntax highlighting. My list appeared as <em>winfileextension=&#8221;php,php3,php4,php5&#8243;</em>.</p>
<p>All I did was add a comma and phtml to the end of that list:</p>
<p><em>winfileextension=&#8221;php,php3,php4,php5,phtml&#8221;</em></p>
<p>Then I saved the file and restarted Dreamweaver. Now any file with the .phtml file extension receives the same syntax highlighting as a php document.</p>
<p><strong>Before and After</strong></p>
<p><a href='http://vonlind.com/wp-content/uploads/2008/06/syntax-hilite-before.jpg'><img src="http://vonlind.com/wp-content/uploads/2008/06/syntax-hilite-before-322x190.jpg" alt="" title="syntax-hilite-before" width="322" height="190" class="alignnone size-medium wp-image-28" /></a></p>
<p><a href='http://vonlind.com/wp-content/uploads/2008/06/syntax-hilite-after.jpg'><img src="http://vonlind.com/wp-content/uploads/2008/06/syntax-hilite-after-322x190.jpg" alt="" title="syntax-hilite-after" width="322" height="190" class="alignnone size-medium wp-image-29" /></a><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=396&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2008/06/dreamweaver-syntax-highlight-tip/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>

