<?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: Joomla Virtuemart – Full Product Image Auto Resize Dynamically – Mod.(Hacks)</title>
	<atom:link href="http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/</link>
	<description>Online Tips for Web Developer/Designer</description>
	<lastBuildDate>Thu, 26 Jan 2012 10:24:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: musato</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-11022</link>
		<dc:creator>musato</dc:creator>
		<pubDate>Thu, 17 Nov 2011 13:42:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-11022</guid>
		<description>This really helped </description>
		<content:encoded><![CDATA[<p>This really helped</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogier</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-7199</link>
		<dc:creator>Rogier</dc:creator>
		<pubDate>Thu, 03 Mar 2011 11:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-7199</guid>
		<description>Great work! </description>
		<content:encoded><![CDATA[<p>Great work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Myung Vig</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-2392</link>
		<dc:creator>Myung Vig</dc:creator>
		<pubDate>Tue, 19 Oct 2010 20:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-2392</guid>
		<description>howdy this is a tremendous web log, would you think about being a guest writer on my blog? </description>
		<content:encoded><![CDATA[<p>howdy this is a tremendous web log, would you think about being a guest writer on my blog?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: head shops humidifier</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-2023</link>
		<dc:creator>head shops humidifier</dc:creator>
		<pubDate>Fri, 27 Aug 2010 00:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-2023</guid>
		<description>Impressive blog. </description>
		<content:encoded><![CDATA[<p>Impressive blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dino</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-1361</link>
		<dc:creator>Dino</dc:creator>
		<pubDate>Wed, 21 Apr 2010 04:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-1361</guid>
		<description>Hi, I have modified the code to use ratios instead so that if you want to set a different max height to width you can ie. width = 650 and height = 550. 
 
replace: 
[code] 
$image_info = getimagesize($full_file); 
$original_height =  $image_info[1]; 
$original_width =  $image_info[0]; 
 
if ($original_height &gt; $original_width) { 
$largewidth = (600 / $original_height) * $original_width; 
$largeheight = &quot;600px&quot;; 
} else { 
$largeheight = (600 / $original_width) * $original_height; 
$largewidth = &quot;600px&quot;; 
} 
[/code] 
 
with: 
[code] 
$max_width = 650; 
$max_height = 550; 
$max_ratio = $max_width / $max_height; 
 
$image_info = getimagesize($full_file); 
$original_height =  $image_info[1]; 
$original_width =  $image_info[0]; 
$original_ratio = $original_width / $original_height; 
 
// set some defaults 
$largewidth = $original_width; 
$largeheight = $original_height; 
 
if ($original_ratio &gt; $max_ratio) { 
if ($original_width &gt; $max_width) { 
$largewidth = $max_width; 
$largeheight = round($max_width / $original_ratio); 
} 
} else if ($original_ratio &lt; $max_ratio) { 
if ($original_height &gt; $max_height) { 
$largewidth = round($max_height * $original_ratio);; 
$largeheight = $max_height; 
} 
} 
[/code] </description>
		<content:encoded><![CDATA[<p>Hi, I have modified the code to use ratios instead so that if you want to set a different max height to width you can ie. width = 650 and height = 550. </p>
<p>replace: </p>
<pre class="brush: plain;">
$image_info = getimagesize($full_file);
$original_height =  $image_info[1];
$original_width =  $image_info[0]; 

if ($original_height &amp;gt; $original_width) {
$largewidth = (600 / $original_height) * $original_width;
$largeheight = &amp;quot;600px&amp;quot;;
} else {
$largeheight = (600 / $original_width) * $original_height;
$largewidth = &amp;quot;600px&amp;quot;;
}
</pre>
<p>with: </p>
<pre class="brush: plain;">
$max_width = 650;
$max_height = 550;
$max_ratio = $max_width / $max_height; 

$image_info = getimagesize($full_file);
$original_height =  $image_info[1];
$original_width =  $image_info[0];
$original_ratio = $original_width / $original_height; 

// set some defaults
$largewidth = $original_width;
$largeheight = $original_height; 

if ($original_ratio &amp;gt; $max_ratio) {
if ($original_width &amp;gt; $max_width) {
$largewidth = $max_width;
$largeheight = round($max_width / $original_ratio);
}
} else if ($original_ratio &amp;lt; $max_ratio) {
if ($original_height &amp;gt; $max_height) {
$largewidth = round($max_height * $original_ratio);;
$largeheight = $max_height;
}
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lauris</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-1245</link>
		<dc:creator>Lauris</dc:creator>
		<pubDate>Tue, 30 Mar 2010 07:18:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-1245</guid>
		<description>This is very nice hack, but i have have one problem. If i have smaler images(for examlpe 300px width), script forced resize image to 600px and my image loses quality. Is there some way to not resize if image is smaller than 600px? 
 
Thanks 
 </description>
		<content:encoded><![CDATA[<p>This is very nice hack, but i have have one problem. If i have smaler images(for examlpe 300px width), script forced resize image to 600px and my image loses quality. Is there some way to not resize if image is smaller than 600px? </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Free Image Hosting</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-572</link>
		<dc:creator>Free Image Hosting</dc:creator>
		<pubDate>Sat, 06 Feb 2010 19:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-572</guid>
		<description>good blog keep it up.</description>
		<content:encoded><![CDATA[<p>good blog keep it up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: designersandbox</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-146</link>
		<dc:creator>designersandbox</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-146</guid>
		<description>Hi Jonnypixel, 
Here&#039;s the new off the shelf hack for your category images. 
&lt;a href=&quot;http://tny.hk/2c&quot; target=&quot;_blank&quot;&gt;http://tny.hk/2c&lt;/a&gt; 
With this hack we had go beyond the product images hack. 
This hack add in several feature from the control panel 
thanks again for the support </description>
		<content:encoded><![CDATA[<p>Hi Jonnypixel,<br />
Here&#039;s the new off the shelf hack for your category images.<br />
<a href="http://tny.hk/2c" target="_blank">http://tny.hk/2c</a><br />
With this hack we had go beyond the product images hack.<br />
This hack add in several feature from the control panel<br />
thanks again for the support</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: designersandbox</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-105</link>
		<dc:creator>designersandbox</dc:creator>
		<pubDate>Sun, 10 Jan 2010 07:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-105</guid>
		<description>Thanks Jonnypixel, 
I believe my next hack will be on this topics. 
But I am not currently available to do this hack yet, maybe next week I am going to have more free time to do this hack. Because we are now in the time of wrapping up our first free exciting premium business template. 
For my wild guess, and a bit of knowledge of VM, I believe you can look into this files. 
1. administrator/components/com_virtuemart/classes/ps_product_category.php (this is where it control the admin side of it - I guess this is the place to hack. :-O wild guess only. havn&#039;t look deep in it yet.) 
2. components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php (this is where the template call the category_thumb_image. 
 
If you have found a solution to this, you can leave us a comment to share with the community. </description>
		<content:encoded><![CDATA[<p>Thanks Jonnypixel,<br />
I believe my next hack will be on this topics.<br />
But I am not currently available to do this hack yet, maybe next week I am going to have more free time to do this hack. Because we are now in the time of wrapping up our first free exciting premium business template.<br />
For my wild guess, and a bit of knowledge of VM, I believe you can look into this files.<br />
1. administrator/components/com_virtuemart/classes/ps_product_category.php (this is where it control the admin side of it &#8211; I guess this is the place to hack. :-O wild guess only. havn&#039;t look deep in it yet.)<br />
2. components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php (this is where the template call the category_thumb_image. </p>
<p>If you have found a solution to this, you can leave us a comment to share with the community.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonnypixel</title>
		<link>http://www.designersandbox.com/joomla/joomla-virtuemart-auto-resize-full-product-image-dynamically-mod-hacks/comment-page-1/#comment-102</link>
		<dc:creator>Jonnypixel</dc:creator>
		<pubDate>Sat, 09 Jan 2010 22:34:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.designersandbox.com/?p=693#comment-102</guid>
		<description>That is awesome! thankyou so much. You dont know how many clients i get uploading like 12megapixel photos to their shop and then asking me why theres problems with the lightbox etc... 
And all the photo resizing lessons i give them go over their head! 
 
Can you please tell me if i can apply that script to the category area as well? 
 
I would love to do the same for the Category image upload. 
If you could tell me where that file is for ( image resizing /  image categories ) i can have a  go at inserting the code you have written. 
 
Thankyou again for such a great modification to something thats really needed in VM  
 
John :-) </description>
		<content:encoded><![CDATA[<p>That is awesome! thankyou so much. You dont know how many clients i get uploading like 12megapixel photos to their shop and then asking me why theres problems with the lightbox etc&#8230;<br />
And all the photo resizing lessons i give them go over their head! </p>
<p>Can you please tell me if i can apply that script to the category area as well? </p>
<p>I would love to do the same for the Category image upload.<br />
If you could tell me where that file is for ( image resizing /  image categories ) i can have a  go at inserting the code you have written. </p>
<p>Thankyou again for such a great modification to something thats really needed in VM  </p>
<p>John <img src='http://www.designersandbox.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

