<?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>Rein Aris - Blog</title>
	<atom:link href="http://www.reinaris.nl/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reinaris.nl/wp</link>
	<description>Just another WordPress harrie</description>
	<lastBuildDate>Thu, 25 Oct 2012 07:15:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Preview Google Webfonts with Fontjuggler</title>
		<link>http://www.reinaris.nl/wp/preview-google-webfonts-with-fontjuggler/</link>
		<comments>http://www.reinaris.nl/wp/preview-google-webfonts-with-fontjuggler/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 14:29:08 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[fontjuggler]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[preview]]></category>
		<category><![CDATA[webfonts]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=241</guid>
		<description><![CDATA[Last week I&#8217;ve been busy in my spare time writing a tool to preview Google webfonts on a live website. I always found it hard to chose a font from the Google webfonts list so I came up with a &#8230; <a href="http://www.reinaris.nl/wp/preview-google-webfonts-with-fontjuggler/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.reinaris.nl/wp/wp-content/uploads/2011/10/fontjuggler.jpg" alt="" title="fontjuggler" width="150" height="150" class="alignright size-full wp-image-242" />Last week I&#8217;ve been busy in my spare time writing a tool to <strong>preview Google webfonts</strong> on a live website. I always found it hard to chose a font from the <a href="http://www.google.com/webfonts#ChoosePlace:select">Google webfonts list</a> so I came up with a more visual way to pick a font for your website.<br />
Fontjuggler let&#8217;s you load your (allready existing) website so you can chose the dom elements you want to apply a Google webfont to. Try it on <a href="http://www.fontjuggler.com" title="Fontjuggler">http://www.fontjuggler.com</a>.<br />
<span id="more-241"></span><br />
The server is running with <a href="http://nodejs.org/">node.js</a>, <a href="http://www.pythonheads.nl">Pythonheads</a> supported me with the server setup. It&#8217;s pretty easy to make some small changes to your server using (read; hack into) node.js, which I found fun to do because I&#8217;m not really a &#8216;serverside guy&#8217;. <a href="http://blog.sterkwebwerk.nl">Roel Kramer</a> helped me out with some regexes, so thanks both for your support! The tool is written in Javascript (jQuery) and uses the Google Webfonts API. I&#8217;m no Javascript pro so watch out loading this into your browser <img src='http://www.reinaris.nl/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
All comments and feedback are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/preview-google-webfonts-with-fontjuggler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom styles for Getsatisfaction feedback-widget button</title>
		<link>http://www.reinaris.nl/wp/custom-styles-for-getsatisfaction-feedback-widget-button/</link>
		<comments>http://www.reinaris.nl/wp/custom-styles-for-getsatisfaction-feedback-widget-button/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 11:46:53 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[custom styles]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[feedback widget styles]]></category>
		<category><![CDATA[getsatisfaction]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=228</guid>
		<description><![CDATA[I wanted to create a custom button for the Getsatisfaction feedback widget. The button on the left, right or bottom wasn&#8217;t satisfying me. I just wanted a link in my main menu. Sounds easy right? Well it drove me mad! &#8230; <a href="http://www.reinaris.nl/wp/custom-styles-for-getsatisfaction-feedback-widget-button/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.reinaris.nl/wp/wp-content/uploads/2011/09/custom-feedback-widget-button.jpg" alt="" title="custom-feedback-widget-button" width="150" height="150" class="alignright size-full wp-image-231" />I wanted to create a custom button for the Getsatisfaction feedback widget. The button on the left, right or bottom wasn&#8217;t satisfying me. I just wanted a link in my main menu. Sounds easy right? Well it drove me mad! So for those who wan&#8217;t a custom button themselves, a quick guide:<br />
<span id="more-228"></span></p>
<ul>
<li>First remove the old button. I was running jQuery allready so I did this with jQuery:

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.fdbk_tab_left&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// get rid of the default getsatisfaction button</span></pre></td></tr></table></div>

<p>The classname could be fdbk_tab_left, fdbk_tab_right or fdbk_tab_bottom. Depends on the settings you chose, look it up by inspecting the element.
</li>
<li>Chose a button you want to hook the click action to (it opens the feedback panel) by giving it the following ID

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Please leave us feedback!&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;fdbk_tab&quot;</span><span style="color: #339933;">&gt;</span>Please leave us feedback<span style="color: #339933;">!&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Note: I always use javascript:; as href so the page doesn&#8217;t jump to the top of the screen if you click it, this happens if you use # as href.</li>
<li>Overwrite the styles of the button and give it your own styles, my css looked like:

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #cc00cc;">#fdbk_tab</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">9px</span> <span style="color: #cc66cc;">0</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inherit</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

</li>
<li>You&#8217;re done! Click it <img src='http://www.reinaris.nl/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<p>Any improvements are welcome, please leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/custom-styles-for-getsatisfaction-feedback-widget-button/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Delete malware warning counter-wordpress.com</title>
		<link>http://www.reinaris.nl/wp/delete-malware-warning-counter-wordpress-com/</link>
		<comments>http://www.reinaris.nl/wp/delete-malware-warning-counter-wordpress-com/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 11:27:24 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[counter-wordpress.com]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[timthumb]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=205</guid>
		<description><![CDATA[There is a leak in old versions of TimThumb, read the article about it here. This week (started on august 22) many WordPress (with TimThumb) users encountered problems with there websites. Google marked there websites as a risk (including one &#8230; <a href="http://www.reinaris.nl/wp/delete-malware-warning-counter-wordpress-com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.reinaris.nl/wp/wp-content/uploads/2011/08/istock_warning_tape_cropped__1234281031_9929-150x150.jpg" alt="" title="istock_warning_tape_cropped__1234281031_9929" width="150" height="150" class="alignright size-thumbnail wp-image-209" />There is a leak in old versions of TimThumb, <a href="http://blog.sucuri.net/2011/08/timthumb-php-security-vulnerability-just-the-tip-of-the-iceberg.html">read the article about it here</a>. This week (started on august 22) many WordPress (with TimThumb) users encountered problems with there websites. <strong>Google marked there websites as a risk</strong> (including one of my websites). </p>
<p>The websites <strong>connected to counter-wordpress.com</strong>. The script/malware had the abbility to enter your database, create a database dump, play sounds (?), get your WordPress password and more.. With the <a href="http://php.net/manual/en/function.curl-setopt.php">curl_setopt</a> function there were able to install php scripts on your server.<br />
So for those who have problems, a quick guide to fix this. And for those who doesn’t have problems yet. <strong>Update TimThumb</strong> (<a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">latest version here</a>)!</p>
<h2>Fix this malware warning step by step:</h2>
<p><span id="more-205"></span></p>
<ul>
<li>Remove code from your wp-config.php or upload a clean version.
<ul>
<li>Inspect your wp-confip.php. They add like 3000 of empty Lines. Somewhere in the middle there is the malicious code. Delete it!</li>
</ul>
</li>
<li>Delete the files the injected with the curl_setopt function:
<ul>
<li>wp-admin/upd.php</li>
<li>wp-content/upd.php</li>
</ul>
</li>
<li>Some WordPress users (I didn&#8217;t) found a ‘temp’ folder in there current theme folder with a file like eab9c5e9815adc4c40a6557495eed6d3.php, or something like that. Delete it.</li>
<li>Update your WordPress if possible!</li>
<li>Replace the following file with original files from a clean WordPress installation:
<ul>
<li>wp-settings.php</li>
<li>wp-includes/js/jquery/jquery.js</li>
<li>wp-includes/js /l10n.js</li>
<li><small style="font-size: 11px;">* If you have problems overwriting them, delete them first (on your FTP) and then upload the new file</small></li>
</ul>
</li>
<li>Replace timthumb with the <a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">latest version</a></li>
<li>Change your FTP password</li>
<li>Change your DB password and change it in wp-config.php</li>
<li>If Google is warning your visitors (right above the result description in the SERP). Login to webmastertools and ask for a <a href="http://googlewebmastercentral.blogspot.com/2007/08/malware-reviews-via-webmaster-tools.html">review</a>. It should be gone in 24 hours</li>
<li>To be sure check your website with these tools:
<ul>
<li>Download the <a href="http://blog.sucuri.net/2011/08/timthumb-php-security-vulnerability-just-the-tip-of-the-iceberg.html">Sucuri WP Check</a>, and follow the ‘how to use’ steps on theyre website</li>
<li>Check your site on with a <a href="http://sitecheck.sucuri.net/scanner/">security scanner</a></li>
</ul>
</li>
<li>You’re done!</li>
</ul>
<p>Hopefully your site will be clean after your followed the steps above. Did you found other suspisious thing please let me know by writing a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/delete-malware-warning-counter-wordpress-com/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
		<item>
		<title>Change the language of a Multisite</title>
		<link>http://www.reinaris.nl/wp/change-the-language-of-a-multisite/</link>
		<comments>http://www.reinaris.nl/wp/change-the-language-of-a-multisite/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 13:24:33 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Multisite]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=184</guid>
		<description><![CDATA[This week I had problems with changing the language of my multisite, for those who have the sample problem I wrote a quick guide: On a normal WordPress installation you can change the language in your wp-config.php file. When I &#8230; <a href="http://www.reinaris.nl/wp/change-the-language-of-a-multisite/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This<img src="http://www.reinaris.nl/wp/wp-content/uploads/2011/08/Dictionary-150x150.jpg" alt="" title="Dictionary" width="150" height="150" class="alignright size-thumbnail wp-image-193" /> week I had <strong>problems with changing the language of my multisite</strong>, for those who have the sample problem I wrote a quick guide:</p>
<p>On a normal WordPress installation you can change the language in your wp-config.php file. When I like to change the language to Dutch (by example) I define:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WPLANG'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nl_NL'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Make sure the language files (.mo) are located in your languages folder in wp-content.</p>
<p><strong>But I recently tried this on a multisite, and nothing happened!</strong></p>
<p><span id="more-184"></span></p>
<p>I discovered that the<strong> multisite also stores the language in his settings (database)</strong>, so you have to change this for every site in your network (it makes sense!).</p>
<ul>
<li>In wp-admin go to the site admin area (right top of the admin)<br/>/wp-admin/network/sites.php</li>
<li>Chose &#8216;edit&#8217; for the website(s) you like to change the language</li>
<li>Go to the settings tab and look for the setting called WPLANG</li>
<li>Change (or define if it is empty) the language to nl_NL (or your own language)</li>
</ul>
<p>Website language should be changed now! Again; make sure the language files (.mo) are located in your languages folder in wp-content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/change-the-language-of-a-multisite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>List subpages of a parent page</title>
		<link>http://www.reinaris.nl/wp/list-subpages-of-a-parent-page/</link>
		<comments>http://www.reinaris.nl/wp/list-subpages-of-a-parent-page/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 10:52:28 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[child pages]]></category>
		<category><![CDATA[subpages]]></category>
		<category><![CDATA[wp_list_pages]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=161</guid>
		<description><![CDATA[I&#8217;m using the wp_list_pages function a lot for displaying parent pages in the main menu. I usually only show the parent pages without children (on a homepage). In the function I use depth=1 to only sum up the top level &#8230; <a href="http://www.reinaris.nl/wp/list-subpages-of-a-parent-page/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m <img src="http://www.reinaris.nl/wp/wp-content/uploads/2011/08/book_pages_400-150x150.jpg" alt="" title="book_pages_400" width="150" height="150" class="alignright size-thumbnail wp-image-200" />using the wp_list_pages function a lot for displaying parent pages in the main menu. </p>
<p>I usually only show the parent pages without children (on a homepage). In the function I use <em>depth=1</em> to only sum up the top level pages:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_li=&amp;depth=1'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>When visiting a page i like to <strong>sum up the subpages of the parent page</strong> in a submenu. Sometimes (when using a submenu on a left sidebar) i like to show the parent page again on the top of the subitems. I created a function for this which you can put in your functions.php template file. This function is only created to list 1 level of subpages, no sub-sub is supported (yet) on the moment. Maybe I will update the function when I need it myself <img src='http://www.reinaris.nl/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-161"></span></p>
<p>The function in you functions.php looks like this</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wp_list_subpages<span style="color: #009900;">&#40;</span><span style="color: #000088;">$list_parent_page</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;">&#123;</span>	
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$parent_id</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$parent_link</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// if we are on a subpage</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent_id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent_id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> get_page<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$parent_link</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;a href=&quot;'</span><span style="color: #339933;">.</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; title=&quot;'</span><span style="color: #339933;">.</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$parent_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// the parent id we need to list subpages from</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// stop after 1</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// if we are on the parent page</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$parent_id</span> <span style="color: #339933;">=</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: #666666; font-style: italic;">// the parent id we need to list subpages from</span>
		<span style="color: #000088;">$parent_link</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;li class=&quot;current_page_item&quot;&gt;&lt;a href=&quot;'</span><span style="color: #339933;">.</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; title=&quot;'</span><span style="color: #339933;">.</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// default = true</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$list_parent_page</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;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$parent_link</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;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// list the subpages</span>
	<span style="color: #000088;">$subpages</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_li=&amp;depth=1&amp;echo=0&amp;child_of='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$parent_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$subpages</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$subpages</span><span style="color: #339933;">;</span>
 	<span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>On your template you can use the following function to show subpages (including the parent page):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">wp_list_subpages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>If you don&#8217;t want to list the parent before the subpages, use:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">wp_list_subpages<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>All comments or improvents are welcome! This is just something i really use a lot and hopefully someone is happy with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/list-subpages-of-a-parent-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add &#8216;first&#8217; and &#8216;last&#8217; class to wp_list_pages</title>
		<link>http://www.reinaris.nl/wp/add-first-and-last-class-to-wp_list_pages/</link>
		<comments>http://www.reinaris.nl/wp/add-first-and-last-class-to-wp_list_pages/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 10:36:26 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[first]]></category>
		<category><![CDATA[last]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[wp_list_pages]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=155</guid>
		<description><![CDATA[As a frontend developer I like to have a lot of pre-defined classes in page lists, menu&#8217;s and things like that. Unfortunately WordPress doesn&#8217;t have a first and last class in the wp_list_pages function. I think this should be there &#8230; <a href="http://www.reinaris.nl/wp/add-first-and-last-class-to-wp_list_pages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As a frontend developer I like to have a lot of pre-defined classes in page lists, menu&#8217;s and things like that. Unfortunately WordPress doesn&#8217;t have a <strong>first and last class in the wp_list_pages</strong> function. I think this should be there by default!</p>
<p>Based on this <a href="http://webknight-nz.blogspot.com/2009/04/styling-first-and-last-list-items-and.html">piece of code</a> (thanks Robert) I created a hook you can put in your functions.php template file. So the generated <strong>page list will get first and last classes</strong>, good luck!</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* last and first classes on wp_list_pages */</span>
<span style="color: #000000; font-weight: bold;">function</span> wp_list_pages_firstlast<span style="color: #009900;">&#40;</span><span style="color: #000088;">$pageList</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$pageList</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/class=&quot;/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'class=&quot;first '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pageList</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$reversedString</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strrev</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pageList</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$reversedSearch</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #990000;">strrev</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class=&quot;'</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: #000088;">$endClass</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strrev</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class=&quot;last '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$pageList</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strrev</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$reversedSearch</span><span style="color: #339933;">,</span><span style="color: #000088;">$endClass</span><span style="color: #339933;">,</span> <span style="color: #000088;">$reversedString</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$pageList</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_list_pages'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_list_pages_firstlast'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/add-first-and-last-class-to-wp_list_pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TimThumb upscale fix: stop timthumb from upscaling small images</title>
		<link>http://www.reinaris.nl/wp/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/</link>
		<comments>http://www.reinaris.nl/wp/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/#comments</comments>
		<pubDate>Tue, 31 May 2011 12:17:21 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[timthumb]]></category>
		<category><![CDATA[upscale]]></category>
		<category><![CDATA[upscaling]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=145</guid>
		<description><![CDATA[TimThumb is hosted on http://code.google.com/p/timthumb/, more documentation on the website of the author BinaryMoon. I had problem with TimThumb, first off all with my multisite but i found a nice fix written by my Dutch colleagues on http://www.letuslook.nl/how-to-make-timthumb-work-in-wordpress-multisite/. Then TimThumb &#8230; <a href="http://www.reinaris.nl/wp/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>TimThumb <img src="http://www.reinaris.nl/wp/wp-content/uploads/2011/05/spot_pixelated_NEW-150x150.gif" alt="" title="spot_pixelated_NEW" width="150" height="150" class="alignright size-thumbnail wp-image-202" /> is hosted on <a href="http://code.google.com/p/timthumb/">http://code.google.com/p/timthumb/</a>, more documentation on the <a href="http://www.binarymoon.co.uk/projects/timthumb/">website of the author BinaryMoon</a>.<br />
I had problem with TimThumb, first off all with my <strong>multisite</strong> but i found a nice fix written by my Dutch colleagues on <a href="http://www.letuslook.nl/how-to-make-timthumb-work-in-wordpress-multisite/">http://www.letuslook.nl/how-to-make-timthumb-work-in-wordpress-multisite/</a>.</p>
<h2>Then TimThumb was scaling up my small images!</h2>
<p>I searched for a couple of hours for a fix but no good results. The only interesting result I found was about the same issue I had (<a href="http://code.google.com/p/timthumb/issues/detail?id=55">over here</a>). In the issue they refered to an older version of TimThumb which is located <a href="http://code.google.com/p/timthumb/source/browse/trunk/timthumb.php?spec=svn69&#038;r=69">here (#69)</a>. Well with that version i was capable of fixing my upscaling problem.</p>
<p><span id="more-145"></span></p>
<h2>The upscaling fix</h2>
<p>On line 119 of the current TimThumb you will find:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// generate new w/h if not provided</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_width</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$new_height</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$new_height</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$height</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_width</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$width</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_height</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$new_width</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$new_width</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_height</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>I replaced that piece with the older part:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// don't allow new width or height to be greater than the original</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_width</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$width</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$new_width</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$width</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_height</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$height</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$new_height</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$height</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// generate new w/h if not provided</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_width</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$new_height</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>        
    <span style="color: #000088;">$new_height</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$height</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_width</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$width</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>        
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_height</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$new_width</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>        
    <span style="color: #000088;">$new_width</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$new_height</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$height</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>        
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$new_width</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$new_height</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>        
    <span style="color: #000088;">$new_width</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$width</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$new_height</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$height</span><span style="color: #339933;">;</span>        
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Well this worked for me! TimThumb works with my WordPress Multisite and TimThumb isn&#8217;t scaling up my small images any more. I&#8217;m not a real PHP developer (just a frontend-guy) so maybe this fix is not the best but I hope other people can use it.</p>
<p>If someone knows a better fix or can explain me what is going wrong exactly please leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/timthumb-upscale-fix-stop-timthumb-from-upscaling-small-images/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress random post order not working (orderby=rand)</title>
		<link>http://www.reinaris.nl/wp/wordpress-random-post-order-not-working-orderbyrand/</link>
		<comments>http://www.reinaris.nl/wp/wordpress-random-post-order-not-working-orderbyrand/#comments</comments>
		<pubDate>Mon, 09 May 2011 10:01:25 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[orderby]]></category>
		<category><![CDATA[post order]]></category>
		<category><![CDATA[rand]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=141</guid>
		<description><![CDATA[I had a situation where my random post wasn&#8217;t working at all, it just displayed the last added post or page (or custom post type). I was running a custom query like: &#60;?php query_posts&#40;'orderby=rand'&#41;; ?&#62; I could be a plugin &#8230; <a href="http://www.reinaris.nl/wp/wordpress-random-post-order-not-working-orderbyrand/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I had a situation where my random post wasn&#8217;t working at all, it just displayed the last added post or page (or custom post type).<br />
I was running a custom query like:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
   query_posts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'orderby=rand'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>I could be a plugin (like WP Sticky or in my case an other plugin) which is causing the problem. You can try to find and disable the plugin but a more easy solution is this:<br/><br />
<strong>Remove the filter before running the query:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
   remove_all_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'posts_orderby'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   query_posts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'orderby=rand'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>But watch out, the plugin which is causing the problem doesn&#8217;t adds the filter for fun, so you can wreck a plugin functionality with this solution, but it&#8217;s fast and easy <img src='http://www.reinaris.nl/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/wordpress-random-post-order-not-working-orderbyrand/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Verve Meta Boxes &#8211; WordPress Multi Site Timthumb fix</title>
		<link>http://www.reinaris.nl/wp/verve-meta-boxes-wordpress-multi-site-timthumb-fix/</link>
		<comments>http://www.reinaris.nl/wp/verve-meta-boxes-wordpress-multi-site-timthumb-fix/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 14:25:25 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Multisite]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[timthumb]]></category>
		<category><![CDATA[verve meta boxes]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=125</guid>
		<description><![CDATA[Timthumb doens&#8217;t work with a WordPress multi site (MU), fortunately there is a fix for this problem on the Binarymoon blog (developer of Timthumb). Update: This fix is now included in the new version of Verve Meta Boxes! But I &#8230; <a href="http://www.reinaris.nl/wp/verve-meta-boxes-wordpress-multi-site-timthumb-fix/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Timthumb doens&#8217;t work with a WordPress multi site (MU), fortunately there is a <a href="http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/">fix for this problem on the Binarymoon blog</a> (developer of Timthumb).</p>
<blockquote><p>Update: This fix is now included in the new version of Verve Meta Boxes!</p></blockquote>
<p><strong>But I also had this problem with Verve Meta Boxes</strong>. I didn&#8217;t generate thumbnails within my multi site installation. That&#8217;s because Verve is using Timthumb too.</p>
<p>Based on the solution by Binarymoon I managed to fix the Verve timthumb problem to by editing the plugin.</p>
<p>I&#8217;m using Verve meta boxes 1.2.6</p>
<p>On line 435 of <strong>verve-meta-boxes.php</strong> you will find the following code:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div&gt;&lt;img src=&quot;'</span><span style="color: #339933;">.</span>plugins_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/verve-meta-boxes/tools/timthumb.php?src='</span><span style="color: #339933;">.</span><span style="color: #000088;">$meta_box_value</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;w=180&amp;zc=1&amp;q=95&quot; alt=&quot;&quot; /&gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Change this to:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$theImageSrc</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$meta_box_value</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$blog_id</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$blog_id</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$blog_id</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$imageParts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/files/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$theImageSrc</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$imageParts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$theImageSrc</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/blogs.dir/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$blog_id</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/files/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$imageParts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;verve-img&quot;&gt;&lt;img src=&quot;'</span><span style="color: #339933;">.</span>plugins_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/verve-meta-boxes/tools/timthumb.php?src='</span><span style="color: #339933;">.</span><span style="color: #000088;">$theImageSrc</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;w=180&amp;zc=1&amp;q=95&quot; alt=&quot;&quot; /&gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And your Verve meta boxes will generate thumbnails again within your WordPress multi site!</p>
<blockquote><p>Update: This fix is now included in the new version of Verve Meta Boxes!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/verve-meta-boxes-wordpress-multi-site-timthumb-fix/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>5 most used WordPress plugins (2)</title>
		<link>http://www.reinaris.nl/wp/5-most-used-wordpress-plugins-2/</link>
		<comments>http://www.reinaris.nl/wp/5-most-used-wordpress-plugins-2/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 07:13:53 +0000</pubDate>
		<dc:creator>Rein Aris</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.reinaris.nl/wp/?p=120</guid>
		<description><![CDATA[An update on my 5 most used WordPress plugins. I&#8217;m working hard on a couple of WordPress websites and discovered some pretty nice plugins. So my list (of the last two months) changed: More Fields &#8211; You can create more &#8230; <a href="http://www.reinaris.nl/wp/5-most-used-wordpress-plugins-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>An update on my 5 most used WordPress plugins. I&#8217;m working hard on a couple of WordPress websites and discovered some pretty nice plugins. So my list (of the last two months) changed:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/more-fields/">More Fields</a> &#8211; You can create more (meta) fields with this plugin for post, pages or custom posts. It&#8217;s easy and very user friendly. There are plenty of fields to chose from, but no image upload field.. well that&#8217;s why i developed <a href="http://www.reinaris.nl/wp/multiple-template-images/">Multiple Template Images</a>. You could also look at <a href="http://wordpress.org/extend/plugins/verve-meta-boxes/">Verve Meta Boxes</a>. It has a image field but it&#8217;s not as user friendly like More Fields.</li>
<li><a href="http://wordpress.org/extend/plugins/custom-post-type-ui/">Custom Post type UI</a> &#8211; You could also define your custom post types true your functions.php. <span id="more-120"></span>But this plugin comes with a real easy admin interface to create custom post types. You could also try <a href="http://www.google.nl/search?q=more+types&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t&#038;rls=org.mozilla:nl:official&#038;client=firefox-a">More Types</a> (from the same developers of More Fields).</li>
<li><a href="http://www.gravityforms.com/">Gravity Forms</a> &#8211; I&#8217;m really glad that I bought the developers license for Gravity Forms. This is much better then Contact Form 7 (which i wrote about in my last top 5). It comes with a very easy form wizzard with all options and types of form fields you like. But the best feature: it saves the entries posted by visitors in your WP admin.</li>
<li><a href="http://wordpress.org/extend/plugins/wordpress-seo/">WordPress SEO</a> &#8211; Just released a month ago, it&#8217;s good and has every SEO option in it. A nice feature: it comes with a very nice Google snippet preview.</li>
<li><a href="http://wordpress.org/extend/plugins/simple-page-ordering/">Simple Page Ordering</a> &#8211; This makes page ordening really easy. No extra menu&#8217;s or options, it just let you drag and drop your pages or posts in your existing page/post overviews. It has some small bugs but it&#8217;s the best attempt so far.</li>
</ul>
<p>Did I not mentioned a very good plugin? Please let me know by writing a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reinaris.nl/wp/5-most-used-wordpress-plugins-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
