<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WordPress Plugin: AutoThumb</title>
	<atom:link href="http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/feed/" rel="self" type="application/rss+xml" />
	<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/</link>
	<description>IT stuff and more</description>
	<lastBuildDate>Sat, 04 Sep 2010 22:57:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Damien</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-4049</link>
		<dc:creator>Damien</dc:creator>
		<pubDate>Thu, 20 May 2010 21:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-4049</guid>
		<description>Hello,
first of all, thank you for this great plugin. Glad I found it.

I&#039;m using PHP Version 5.3.2, so the included phpthumb script didn&#039;t work. I found a fix for that, http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2937928&amp;group_id=106407&amp;atid=643974. 
So now it worked when there was only one image in the content. When there were more images, the creation of the page was cut off at the title. Searched around in the sources and found in autothumb.php the function getphpthumburl. 
At the top of this function there is an include: &lt;code&gt;include(AUTOTHUMB_PATH . &#039;phpthumb/phpThumb.config.php&#039;);&lt;/code&gt;
After changing this to &lt;code&gt;include_once(AUTOTHUMB_PATH . &#039;phpthumb/phpThumb.config.php&#039;);&lt;/code&gt; it worked and all the images in the content are processed.

As I am not really into php it is all to possible that with this &#039;fix&#039; I&#039;m breaking something else or there is another solution, but I thought I&#039;d mention it just in case.

Thanks again for the plugin.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
first of all, thank you for this great plugin. Glad I found it.</p>
<p>I&#8217;m using PHP Version 5.3.2, so the included phpthumb script didn&#8217;t work. I found a fix for that, <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2937928&amp;group_id=106407&amp;atid=643974" rel="nofollow">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2937928&amp;group_id=106407&amp;atid=643974</a>.<br />
So now it worked when there was only one image in the content. When there were more images, the creation of the page was cut off at the title. Searched around in the sources and found in autothumb.php the function getphpthumburl.<br />
At the top of this function there is an include: <code>include(AUTOTHUMB_PATH . 'phpthumb/phpThumb.config.php');</code><br />
After changing this to <code>include_once(AUTOTHUMB_PATH . 'phpthumb/phpThumb.config.php');</code> it worked and all the images in the content are processed.</p>
<p>As I am not really into php it is all to possible that with this &#8216;fix&#8217; I&#8217;m breaking something else or there is another solution, but I thought I&#8217;d mention it just in case.</p>
<p>Thanks again for the plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3981</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 26 Mar 2010 11:24:39 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3981</guid>
		<description>Hi, I&#039;ve been using this excellent plugin for a while now. Only just realised the power of switching on &#039;Apply Autothumb on post/page content?&#039;. What a fantastic feature. Just saved a ton of time!</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;ve been using this excellent plugin for a while now. Only just realised the power of switching on &#8216;Apply Autothumb on post/page content?&#8217;. What a fantastic feature. Just saved a ton of time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3972</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 12 Mar 2010 20:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3972</guid>
		<description>Hi Aliakbar

This plugin doesn&#039;t have anything to do with how photos react when you click them, that is handled by another plugin you have installed.

Sorry.

-Paul</description>
		<content:encoded><![CDATA[<p>Hi Aliakbar</p>
<p>This plugin doesn&#8217;t have anything to do with how photos react when you click them, that is handled by another plugin you have installed.</p>
<p>Sorry.</p>
<p>-Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aliakbar</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3971</link>
		<dc:creator>Aliakbar</dc:creator>
		<pubDate>Fri, 12 Mar 2010 17:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3971</guid>
		<description>Hi,
How can I make the screen go dark instead of white when I click a picture? And how can I change the font size on photo&#039;s caption?

Thanks in advance. Good plugin.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
How can I make the screen go dark instead of white when I click a picture? And how can I change the font size on photo&#8217;s caption?</p>
<p>Thanks in advance. Good plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3947</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 05 Feb 2010 05:38:36 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3947</guid>
		<description>Hi this is great..I used it on a site recently with custom fields with some code supplied from this site and it worked just great. Am having trouble with it working with my account however..

Half way down page I am getting an error message related to file path..Advice much appreciated.

Here is the path I am getting ...I contact webhost and they told me to modify path in post area which is not ideal..There must be a way to modify plugin files to make this work?

&lt;a href=&quot;http://174.120.240.6/~marketin/&quot; title=&quot;&quot; rel=&quot;nofollow&quot;&gt;</description>
		<content:encoded><![CDATA[<p>Hi this is great..I used it on a site recently with custom fields with some code supplied from this site and it worked just great. Am having trouble with it working with my account however..</p>
<p>Half way down page I am getting an error message related to file path..Advice much appreciated.</p>
<p>Here is the path I am getting &#8230;I contact webhost and they told me to modify path in post area which is not ideal..There must be a way to modify plugin files to make this work?</p>
<p><a href="http://174.120.240.6/~marketin/" title="" rel="nofollow"></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3946</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 05 Feb 2010 05:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3946</guid>
		<description>Hi this is great..I used it on a site recently with custom fields with some code supplied from this site and it worked just great. Am having trouble with it working with my account however..

Half way down page I am getting an error message related to file path..Advice much appreciated.

Here is the path I am getting ...I contact webhost and they told me to modify path in post area which is not ideal..There muct be a way to modify plugin files to make this work?

&lt;a href=&quot;http://174.120.240.6/~marketin/&quot; title=&quot;&quot; rel=&quot;nofollow&quot;&gt;</description>
		<content:encoded><![CDATA[<p>Hi this is great..I used it on a site recently with custom fields with some code supplied from this site and it worked just great. Am having trouble with it working with my account however..</p>
<p>Half way down page I am getting an error message related to file path..Advice much appreciated.</p>
<p>Here is the path I am getting &#8230;I contact webhost and they told me to modify path in post area which is not ideal..There muct be a way to modify plugin files to make this work?</p>
<p><a href="http://174.120.240.6/~marketin/" title="" rel="nofollow"></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moe</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3935</link>
		<dc:creator>moe</dc:creator>
		<pubDate>Tue, 02 Feb 2010 21:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3935</guid>
		<description>Hi,

I&#039;m a newbie, but How it works?

I installed the plugin, enter the password, and...?

http://www.ultragraphik.com/histoirecourte/

As you can see, no &quot;avatar&quot;, it don&#039;t works..

The 2 or 3 thumbails you can see on the site, are host on my serveur ( the custom fields: Image),
But, I thougt it possible to make a thumb from the first pic on my page, even if the image was an external image, hosted by amazon.com, in my example..

Help!!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m a newbie, but How it works?</p>
<p>I installed the plugin, enter the password, and&#8230;?</p>
<p><a href="http://www.ultragraphik.com/histoirecourte/" rel="nofollow">http://www.ultragraphik.com/histoirecourte/</a></p>
<p>As you can see, no &#8220;avatar&#8221;, it don&#8217;t works..</p>
<p>The 2 or 3 thumbails you can see on the site, are host on my serveur ( the custom fields: Image),<br />
But, I thougt it possible to make a thumb from the first pic on my page, even if the image was an external image, hosted by amazon.com, in my example..</p>
<p>Help!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Sheldrake</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3781</link>
		<dc:creator>Paul Sheldrake</dc:creator>
		<pubDate>Wed, 09 Dec 2009 00:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3781</guid>
		<description>Hi Mathias

The new version (0.5.2) doesn&#039;t seem to be encoding the URL properly.  I&#039;ve had a wrap the link to the picture link in &lt;code&gt;rawurlencode&lt;/code&gt; to get it to work.  In the last version the plugin worked without me having to do this.

I commented about a fix for the off server links a little while ago which should also fix this problem as well.

http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3636

Cheers,
Paul</description>
		<content:encoded><![CDATA[<p>Hi Mathias</p>
<p>The new version (0.5.2) doesn&#8217;t seem to be encoding the URL properly.  I&#8217;ve had a wrap the link to the picture link in <code>rawurlencode</code> to get it to work.  In the last version the plugin worked without me having to do this.</p>
<p>I commented about a fix for the off server links a little while ago which should also fix this problem as well.</p>
<p><a href="http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3636" rel="nofollow">http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3636</a></p>
<p>Cheers,<br />
Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3750</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Wed, 25 Nov 2009 17:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3750</guid>
		<description>Hi Hilder!

Thank you for the bugfix, I just corrected it and tagged it as version 0.5.2 (should be available in a few minutes in the WP plugins repository).

-- Mathias</description>
		<content:encoded><![CDATA[<p>Hi Hilder!</p>
<p>Thank you for the bugfix, I just corrected it and tagged it as version 0.5.2 (should be available in a few minutes in the WP plugins repository).</p>
<p>&#8211; Mathias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hilder Santos</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3744</link>
		<dc:creator>Hilder Santos</dc:creator>
		<pubDate>Fri, 20 Nov 2009 18:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3744</guid>
		<description>Hi, Mathias!

I found a little issue in your plugin: it&#039;s not getting external images and applying the PHPThumb, because it&#039;s resolving it like internal images (from same domain).

Doing a little search at your code, I found that there&#039;s an error in a conditional at line 54, to be more precisely:

[source lang=&quot;php&quot;]
if($wordpress_url[&#039;hostname&#039;] == $image_url[&#039;hostname&#039;]) {
[/source]

There&#039;s no &quot;hostname&quot; on parse_url() function... But there&#039;s &quot;host&quot;! :D

So, the correct code should be:

[source lang=&quot;php&quot;]
if($wordpress_url[&#039;host&#039;] == $image_url[&#039;host&#039;]) {
[/source]

And all is done. ^^

May you take look at this and correct your awesome plugin for us? :D

Thank you, man!</description>
		<content:encoded><![CDATA[<p>Hi, Mathias!</p>
<p>I found a little issue in your plugin: it&#8217;s not getting external images and applying the PHPThumb, because it&#8217;s resolving it like internal images (from same domain).</p>
<p>Doing a little search at your code, I found that there&#8217;s an error in a conditional at line 54, to be more precisely:</p>
<pre class="code prettyprint php">
if($wordpress_url[&#039;hostname&#039;] == $image_url[&#039;hostname&#039;]) {
</pre>
<p>There&#8217;s no &#8220;hostname&#8221; on parse_url() function&#8230; But there&#8217;s &#8220;host&#8221;! <img src='http://maff.ailoo.net/wp-includes/images/smilies/laugh.gif' alt=':D' class='wp-smiley' /> </p>
<p>So, the correct code should be:</p>
<pre class="code prettyprint php">
if($wordpress_url[&#039;host&#039;] == $image_url[&#039;host&#039;]) {
</pre>
<p>And all is done. ^^</p>
<p>May you take look at this and correct your awesome plugin for us? <img src='http://maff.ailoo.net/wp-includes/images/smilies/laugh.gif' alt=':D' class='wp-smiley' /> </p>
<p>Thank you, man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3711</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 12 Nov 2009 12:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3711</guid>
		<description>I&#039;m sorry, i need some help. I have read the past posts here but i don&#039;t understand. I hope you can help me.

i have in my posts images like this http://ts.vimeo.com.s3.amazonaws.com/230/309/23030964_200.jpg
when i turn autothumb on i get an &#039;error-image&#039; (the light blue ones) saying image missing. that is right because the http:// and domain whole domains gets truncated.

how to fix this? or why this part gets cut off?
thx you</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry, i need some help. I have read the past posts here but i don&#8217;t understand. I hope you can help me.</p>
<p>i have in my posts images like this <a href="http://ts.vimeo.com.s3.amazonaws.com/230/309/23030964_200.jpg" rel="nofollow">http://ts.vimeo.com.s3.amazonaws.com/230/309/23030964_200.jpg</a><br />
when i turn autothumb on i get an &#8216;error-image&#8217; (the light blue ones) saying image missing. that is right because the http:// and domain whole domains gets truncated.</p>
<p>how to fix this? or why this part gets cut off?<br />
thx you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3636</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 23 Oct 2009 02:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3636</guid>
		<description>Hey Guys

I debugged the issue with external images.   The if statement that checks whether the image is on the server or not a had a couple of errors in it.

&lt;code&gt;// trim URL when it points to the same host
            if($wordpress_url[&#039;host&#039;] == $image_url[&#039;host&#039;]) {
                $image = $image_url[&#039;path&#039;];
                $httpSrc = false;
            } else {
				// encode the link so phpthumb can use the remote image
				$image = rawurlencode($image);
                $httpSrc = true;
            }&lt;/code&gt;

Hope that helps everyone and Mathias can update the plugin on Wordpress soon because this plugin is awesome.

Cheers,
Paul</description>
		<content:encoded><![CDATA[<p>Hey Guys</p>
<p>I debugged the issue with external images.   The if statement that checks whether the image is on the server or not a had a couple of errors in it.</p>
<p><code>// trim URL when it points to the same host<br />
            if($wordpress_url['host'] == $image_url['host']) {<br />
                $image = $image_url['path'];<br />
                $httpSrc = false;<br />
            } else {<br />
				// encode the link so phpthumb can use the remote image<br />
				$image = rawurlencode($image);<br />
                $httpSrc = true;<br />
            }</code></p>
<p>Hope that helps everyone and Mathias can update the plugin on WordPress soon because this plugin is awesome.</p>
<p>Cheers,<br />
Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3629</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 20 Oct 2009 19:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3629</guid>
		<description>I have url_fopen on and it it doesn&#039;t seem to be able to get the images.  I&#039;ve also set the array of valid no hot link domains.   Any ideas why it&#039;s not working?</description>
		<content:encoded><![CDATA[<p>I have url_fopen on and it it doesn&#8217;t seem to be able to get the images.  I&#8217;ve also set the array of valid no hot link domains.   Any ideas why it&#8217;s not working?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fusion theme for Wordpress Personal Blog</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3591</link>
		<dc:creator>Fusion theme for Wordpress Personal Blog</dc:creator>
		<pubDate>Sun, 04 Oct 2009 20:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3591</guid>
		<description>[...] custom widgets. I had some problem with the image sizes in the post which was sorted out using the Autothumb plugin, thanks to the author. PhotoQ plugin has the option to adjust the uploaded image size. Related [...]</description>
		<content:encoded><![CDATA[<p>[...] custom widgets. I had some problem with the image sizes in the post which was sorted out using the Autothumb plugin, thanks to the author. PhotoQ plugin has the option to adjust the uploaded image size. Related [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3539</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 21 Sep 2009 08:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3539</guid>
		<description>Hi Mathias - sent you an email.</description>
		<content:encoded><![CDATA[<p>Hi Mathias &#8211; sent you an email.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3537</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Fri, 18 Sep 2009 00:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3537</guid>
		<description>Hi Ben,

sorry for my late response but I&#039;m quite busy at the moment as I&#039;m currently moving to Spain for an exchange semester. As of this, I don&#039;t know how much time I can spend in the next weeks on maintaining the plugin. If you like I could add you as commiter to the SVN-Repo, would be easier than handling around with patches ;) Just drop me an email if you are interested (you can find my address on the about page).

-- Mathias</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>sorry for my late response but I&#8217;m quite busy at the moment as I&#8217;m currently moving to Spain for an exchange semester. As of this, I don&#8217;t know how much time I can spend in the next weeks on maintaining the plugin. If you like I could add you as commiter to the SVN-Repo, would be easier than handling around with patches <img src='http://maff.ailoo.net/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' />  Just drop me an email if you are interested (you can find my address on the about page).</p>
<p>&#8211; Mathias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3441</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sun, 06 Sep 2009 13:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3441</guid>
		<description>Hi again Mathias,
I&#039;ve traced that bug through now, there&#039;s a couple of ways to fix it - my thoughts are to add an extra function to the plugin that hooks onto the generate_rewrite_rules action.

I&#039;ve done a little bit of testing with this on a single wp2.8.4 apache install and it seems to work ok

extra function:
&lt;code&gt;
/**
 * autothumb_generate_rewrite_action
 * 
 * 06/09/09 Ben - Added Extra action to ensure autothumb rewrite&#039;s are not-overwritten when
 * Wordpress updates its permalink/category rules
 * @param object $wp_rewrite Reference to the global wp_rewrite object
 */
function autothumb_generate_rewrite_action($wp_rewrite)
{    
    $switch = get_option(&#039;autothumb_clean_urls&#039;);
    $path = get_option(&#039;autothumb_clean_urls_path&#039;);
    
    if($switch == 1 &amp;&amp; $path !== false &amp;&amp; !empty($path)) {
        $wp_rewrite-&gt;non_wp_rules[$path . &#039;/(.*)$&#039;] = &#039;wp-content/plugins/autothumb/image.php?$1&#039;;	
    }	
}
&lt;/code&gt;

And then the action hook is:
&lt;code&gt;
add_action(&#039;generate_rewrite_rules&#039;,&#039;autothumb_generate_rewrite_action&#039;);
&lt;/code&gt;

This respects any other plugins that have added their own non_wp_rules, it just appends the extra rule - however I&#039;ve noticed that a lot of examples of using non_wp_rules don&#039;t append the array, they instead overwrite it, so other plugins may or may not cause problems depending on how defensively they have been written.

A second approach I tried was to add a filter to mod_rewrite_rules - this way you can catch the .htaccess rules as a string and add your own immediately before the wp generated rules are written. This lets you completely insulate yourself from any other plugins, but you then have to rebuild the RewriteBase as well - it just felt messier.

One problem remains however, the current phpThumb approach means that if you link images to Facebook or similar sites (eg you use Addthis/Sharethis or someone just adds a post on their wall) it breaks as Facebook scrambles the hash in the querystring (or something like that). You can post the link ok, but when you go to view it facebook has &#039;cleaned&#039; the url to the image.

Somehow I need to get the actual image path for the cached auto generated image once it has been created, rather they running through phpThumb to check for its existance. 

Something a bit like this http://mrphp.com.au/code/project/miscellaneous/image-cache-using-phpthumb-and-htaccess, but that&#039;s still open to abuse by external scripts...any ideas?</description>
		<content:encoded><![CDATA[<p>Hi again Mathias,<br />
I&#8217;ve traced that bug through now, there&#8217;s a couple of ways to fix it &#8211; my thoughts are to add an extra function to the plugin that hooks onto the generate_rewrite_rules action.</p>
<p>I&#8217;ve done a little bit of testing with this on a single wp2.8.4 apache install and it seems to work ok</p>
<p>extra function:<br />
<code><br />
/**<br />
 * autothumb_generate_rewrite_action<br />
 *<br />
 * 06/09/09 Ben - Added Extra action to ensure autothumb rewrite's are not-overwritten when<br />
 * WordPress updates its permalink/category rules<br />
 * @param object $wp_rewrite Reference to the global wp_rewrite object<br />
 */<br />
function autothumb_generate_rewrite_action($wp_rewrite)<br />
{<br />
    $switch = get_option('autothumb_clean_urls');<br />
    $path = get_option('autothumb_clean_urls_path');</p>
<p>    if($switch == 1 &amp;&amp; $path !== false &amp;&amp; !empty($path)) {<br />
        $wp_rewrite-&gt;non_wp_rules[$path . '/(.*)$'] = 'wp-content/plugins/autothumb/image.php?$1';<br />
    }<br />
}<br />
</code></p>
<p>And then the action hook is:<br />
<code><br />
add_action('generate_rewrite_rules','autothumb_generate_rewrite_action');<br />
</code></p>
<p>This respects any other plugins that have added their own non_wp_rules, it just appends the extra rule &#8211; however I&#8217;ve noticed that a lot of examples of using non_wp_rules don&#8217;t append the array, they instead overwrite it, so other plugins may or may not cause problems depending on how defensively they have been written.</p>
<p>A second approach I tried was to add a filter to mod_rewrite_rules &#8211; this way you can catch the .htaccess rules as a string and add your own immediately before the wp generated rules are written. This lets you completely insulate yourself from any other plugins, but you then have to rebuild the RewriteBase as well &#8211; it just felt messier.</p>
<p>One problem remains however, the current phpThumb approach means that if you link images to Facebook or similar sites (eg you use Addthis/Sharethis or someone just adds a post on their wall) it breaks as Facebook scrambles the hash in the querystring (or something like that). You can post the link ok, but when you go to view it facebook has &#8216;cleaned&#8217; the url to the image.</p>
<p>Somehow I need to get the actual image path for the cached auto generated image once it has been created, rather they running through phpThumb to check for its existance. </p>
<p>Something a bit like this <a href="http://mrphp.com.au/code/project/miscellaneous/image-cache-using-phpthumb-and-htaccess" rel="nofollow">http://mrphp.com.au/code/project/miscellaneous/image-cache-using-phpthumb-and-htaccess</a>, but that&#8217;s still open to abuse by external scripts&#8230;any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3396</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 03 Sep 2009 11:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3396</guid>
		<description>Hi Mathias,

Just spotted a bug but haven&#039;t traced it through yet - posting this before I forget - the rewrite rules don&#039;t appear to get updated when you change your permalink structure. 

Here&#039;s how to repeat the bug (and how to work around it).
Start with a clean install and Authothumb clean URLs off.

1. Set your permalink structure to /%year%/%monthnum%/%postname%/
2. Now turn on Autothumb clean URLs
3. Verfiy that its working
4. Change your permalink structure to /archives/%post_id%
5. Autothumbs no longer work
6. Turn off Autothumb clean URLs and save
7. Turn them back on again
8. Autothumbs work again

The actual permalink structures don&#039;t matter, its the change that doesn&#039;t get captured and triggers the bug.</description>
		<content:encoded><![CDATA[<p>Hi Mathias,</p>
<p>Just spotted a bug but haven&#8217;t traced it through yet &#8211; posting this before I forget &#8211; the rewrite rules don&#8217;t appear to get updated when you change your permalink structure. </p>
<p>Here&#8217;s how to repeat the bug (and how to work around it).<br />
Start with a clean install and Authothumb clean URLs off.</p>
<p>1. Set your permalink structure to /%year%/%monthnum%/%postname%/<br />
2. Now turn on Autothumb clean URLs<br />
3. Verfiy that its working<br />
4. Change your permalink structure to /archives/%post_id%<br />
5. Autothumbs no longer work<br />
6. Turn off Autothumb clean URLs and save<br />
7. Turn them back on again<br />
8. Autothumbs work again</p>
<p>The actual permalink structures don&#8217;t matter, its the change that doesn&#8217;t get captured and triggers the bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3382</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 02 Sep 2009 01:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3382</guid>
		<description>Oops, my code got sanatized...
what I meant to write was, in the  tag, for src attribute, I put:
[?php echo getphpthumburl(&#039;wp-content/themes/default/images/photo4.jpg&#039;, &#039;w=400&amp;fltr[]=ric&#124;30&#124;30&amp;fltr[]=sat&#124;-100&amp;fltr[]=cont&#124;30&amp;f=png&#039;); ?]</description>
		<content:encoded><![CDATA[<p>Oops, my code got sanatized&#8230;<br />
what I meant to write was, in the  tag, for src attribute, I put:<br />
[?php echo getphpthumburl('wp-content/themes/default/images/photo4.jpg', 'w=400&amp;fltr[]=ric|30|30&amp;fltr[]=sat|-100&amp;fltr[]=cont|30&amp;f=png&#8217;); ?]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3381</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 02 Sep 2009 01:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3381</guid>
		<description>Oops, my code got sanatized...
what I meant to write was, in the  tag, for src attribute, I put:
&quot;</description>
		<content:encoded><![CDATA[<p>Oops, my code got sanatized&#8230;<br />
what I meant to write was, in the  tag, for src attribute, I put:<br />
&#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3380</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 02 Sep 2009 01:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3380</guid>
		<description>I&#039;ve started using the
&lt;img src=&quot;&quot; /&gt;
way of doing things and it seems to be working fine now :-)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve started using the<br />
&lt;img src=&quot;&#8221; /&gt;<br />
way of doing things and it seems to be working fine now :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3377</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 01 Sep 2009 16:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3377</guid>
		<description>More info: basically I&#039;ve done the chmodding as stated above but no matter what I pass as arguments after the image, like ?w=400&amp;fltr[]=ric&#124;30&#124;30&amp;fltr[]=sat&#124;-100&amp;fltr[]=cont&#124;30&amp;f=png, etc. the image just stays the same as it was before. No error message, nothing.

I&#039;ve tried with just a normal image tag in the HTML, but I want to eventually get this to work with NextGEN Gallery.

I&#039;m using WordPress MU 2.8.4a also...I&#039;m going to keep trying things; I&#039;ll post back here if I get it to work.</description>
		<content:encoded><![CDATA[<p>More info: basically I&#8217;ve done the chmodding as stated above but no matter what I pass as arguments after the image, like ?w=400&amp;fltr[]=ric|30|30&amp;fltr[]=sat|-100&amp;fltr[]=cont|30&amp;f=png, etc. the image just stays the same as it was before. No error message, nothing.</p>
<p>I&#8217;ve tried with just a normal image tag in the HTML, but I want to eventually get this to work with NextGEN Gallery.</p>
<p>I&#8217;m using WordPress MU 2.8.4a also&#8230;I&#8217;m going to keep trying things; I&#8217;ll post back here if I get it to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3376</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 01 Sep 2009 15:59:23 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3376</guid>
		<description>Hmm...can&#039;t seem to get it working. I chmoded both the cache folder and the phpThumb.config.php file to 755. :-(</description>
		<content:encoded><![CDATA[<p>Hmm&#8230;can&#8217;t seem to get it working. I chmoded both the cache folder and the phpThumb.config.php file to 755. :-(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3374</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Tue, 01 Sep 2009 09:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3374</guid>
		<description>Yep, parameters are directly passed to phpThumb. I added an &lt;a href=&quot;#rounded-corners&quot; rel=&quot;nofollow&quot;&gt;example&lt;/a&gt; above.

-- Mathias</description>
		<content:encoded><![CDATA[<p>Yep, parameters are directly passed to phpThumb. I added an <a href="#rounded-corners" rel="nofollow">example</a> above.</p>
<p>&#8211; Mathias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://maff.ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/#comment-3373</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 01 Sep 2009 00:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://maff.ailoo.net/?page_id=83#comment-3373</guid>
		<description>Will this do everything that phpThumb does, specifically rounding corners and stuff? That&#039;s what I really need it for; if not, is it easy to modify to incorporate that functionality?</description>
		<content:encoded><![CDATA[<p>Will this do everything that phpThumb does, specifically rounding corners and stuff? That&#8217;s what I really need it for; if not, is it easy to modify to incorporate that functionality?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
