<?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 2.5 &#8211; change the default name extension for thumbnail image</title>
	<atom:link href="http://blog.4rev.net/2008-06/wordpress-25-change-the-default-name-extension-for-thumbnail-image/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.4rev.net/2008-06/wordpress-25-change-the-default-name-extension-for-thumbnail-image/</link>
	<description>4 REV NET</description>
	<lastBuildDate>Tue, 24 Nov 2009 08:16:51 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: byrev</title>
		<link>http://blog.4rev.net/2008-06/wordpress-25-change-the-default-name-extension-for-thumbnail-image/comment-page-1/#comment-51373</link>
		<dc:creator>byrev</dc:creator>
		<pubDate>Sat, 14 Feb 2009 13:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.4rev.net/?p=4922#comment-51373</guid>
		<description>here is the solution:
replace this:
&lt;code&gt;$aImgName = explode(’.&#039;,$strSrcImgName);&lt;/code&gt;
with this:
&lt;code&gt;$aImgName = substr($strSrcImgName,0,strrpos($strSrcImgName, &quot;.&quot;));&lt;/code&gt;

woking with 100+ dots :D .... have fun!</description>
		<content:encoded><![CDATA[<p>here is the solution:<br />
replace this:<br />
<code>$aImgName = explode(’.',$strSrcImgName);</code><br />
with this:<br />
<code>$aImgName = substr($strSrcImgName,0,strrpos($strSrcImgName, "."));</code></p>
<p>woking with 100+ dots <img src='http://blog.4rev.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  &#8230;. have fun!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo</title>
		<link>http://blog.4rev.net/2008-06/wordpress-25-change-the-default-name-extension-for-thumbnail-image/comment-page-1/#comment-51371</link>
		<dc:creator>Matteo</dc:creator>
		<pubDate>Sat, 14 Feb 2009 09:41:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.4rev.net/?p=4922#comment-51371</guid>
		<description>I created this workaround to solve the problem. Basically I use the WP function &quot;image_resize_dimensions&quot; which calculates the dimensions of a resized image, according to Settings-&gt;Media numbers.

My workaround is supposed to be used with images that contain no dots (except the one for the extension: i.e. my.picture.jpg doesn&#039;t work, while my-picture.jpg works)

Finally...here is the code:

//Gets the custom field of the post
					$strSrcImgName = get_post_meta($post-&gt;ID, &#039;img_main&#039;,1);

					//Gets dims of the original image
					list($orig_w, $orig_h) = getimagesize( $_SERVER[&quot;DOCUMENT_ROOT&quot;].get_option(&#039;upload_path&#039;).&#039;/&#039;.$strSrcImgName );

					//Calculates dims of the &quot;medium size&quot; resized image
					list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = image_resize_dimensions($orig_w, $orig_h, get_option(&#039;medium_size_w&#039;),  get_option(&#039;medium_size_h&#039;), false);

					//..here it is why it doesn&#039;t work with images with more than one dot
					$aImgName = explode(&#039;.&#039;,$strSrcImgName);
					$strMediumImgName = $aImgName[0].&#039;-&#039;.$dst_w.&#039;x&#039;.$dst_h.&#039;.&#039;.$aImgName[1];</description>
		<content:encoded><![CDATA[<p>I created this workaround to solve the problem. Basically I use the WP function &#8220;image_resize_dimensions&#8221; which calculates the dimensions of a resized image, according to Settings-&gt;Media numbers.</p>
<p>My workaround is supposed to be used with images that contain no dots (except the one for the extension: i.e. my.picture.jpg doesn&#8217;t work, while my-picture.jpg works)</p>
<p>Finally&#8230;here is the code:</p>
<p>//Gets the custom field of the post<br />
					$strSrcImgName = get_post_meta($post-&gt;ID, &#8216;img_main&#8217;,1);</p>
<p>					//Gets dims of the original image<br />
					list($orig_w, $orig_h) = getimagesize( $_SERVER["DOCUMENT_ROOT"].get_option(&#8217;upload_path&#8217;).&#8217;/&#8217;.$strSrcImgName );</p>
<p>					//Calculates dims of the &#8220;medium size&#8221; resized image<br />
					list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = image_resize_dimensions($orig_w, $orig_h, get_option(&#8217;medium_size_w&#8217;),  get_option(&#8217;medium_size_h&#8217;), false);</p>
<p>					//..here it is why it doesn&#8217;t work with images with more than one dot<br />
					$aImgName = explode(&#8217;.',$strSrcImgName);<br />
					$strMediumImgName = $aImgName[0].&#8217;-&#8217;.$dst_w.&#8217;x&#8217;.$dst_h.&#8217;.&#8217;.$aImgName[1];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo</title>
		<link>http://blog.4rev.net/2008-06/wordpress-25-change-the-default-name-extension-for-thumbnail-image/comment-page-1/#comment-51005</link>
		<dc:creator>Matteo</dc:creator>
		<pubDate>Fri, 30 Jan 2009 15:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.4rev.net/?p=4922#comment-51005</guid>
		<description>Thank you for this suggest.

I changed the script as you wrote, but now WP generates just 2 images (insted of 4): myimage.jpg (original size) and myimage.thumbnail.jpg (dimensions as specified in Settings &gt; Media &gt; &quot;Big size image&quot; ...or something similar, sorry, I&#039;m working with an italian versione :) ).

So I lost two image: &quot;Middle size&quot; and &quot;Thumbnail&quot; (the one I can choose to crop).
Is there a solution to this?
I&#039;m using WP 2.7

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Thank you for this suggest.</p>
<p>I changed the script as you wrote, but now WP generates just 2 images (insted of 4): myimage.jpg (original size) and myimage.thumbnail.jpg (dimensions as specified in Settings &gt; Media &gt; &#8220;Big size image&#8221; &#8230;or something similar, sorry, I&#8217;m working with an italian versione <img src='http://blog.4rev.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>So I lost two image: &#8220;Middle size&#8221; and &#8220;Thumbnail&#8221; (the one I can choose to crop).<br />
Is there a solution to this?<br />
I&#8217;m using WP 2.7</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raphael</title>
		<link>http://blog.4rev.net/2008-06/wordpress-25-change-the-default-name-extension-for-thumbnail-image/comment-page-1/#comment-50971</link>
		<dc:creator>Raphael</dc:creator>
		<pubDate>Thu, 29 Jan 2009 16:21:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.4rev.net/?p=4922#comment-50971</guid>
		<description>Thank you for this phantastic hint! It took me 3 hours to find our why the thumbs have other names now! Sometimes I have the impression, that WP just wants to make uns mad! 
Greetings!
Raphael</description>
		<content:encoded><![CDATA[<p>Thank you for this phantastic hint! It took me 3 hours to find our why the thumbs have other names now! Sometimes I have the impression, that WP just wants to make uns mad!<br />
Greetings!<br />
Raphael</p>
]]></content:encoded>
	</item>
</channel>
</rss>
