<?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>Fragov Blog</title>
	<atom:link href="http://fragov.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://fragov.com/blog</link>
	<description>About my life, programming, freelancing</description>
	<lastBuildDate>Mon, 09 Apr 2012 04:10:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Automatic currency change for VirtueMart using Joom!Fish Router Plugin Modified</title>
		<link>http://fragov.com/blog/2012/04/09/automatic-currency-change-for-virtuemart-using-joomfish-router-plugin-modified/</link>
		<comments>http://fragov.com/blog/2012/04/09/automatic-currency-change-for-virtuemart-using-joomfish-router-plugin-modified/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 04:09:42 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[VirtueMart]]></category>
		<category><![CDATA[automatic]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[joomfish]]></category>
		<category><![CDATA[joomla 1.5]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[virtuemart]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=136</guid>
		<description><![CDATA[This modification will change currency depend of user IP and language. First of all you should download Joom!Fish Router Plugin Modified from modification page or from my server. You have to install it and then edit /plugins/system/jfrouter.php, found: if (defined("_JLEGACY")){ $name = 'mosConfig_'.$key; $GLOBALS[$name] = $val; } } } and add after: $auto_currency = JRequest::getVar('auto_currency', [...]]]></description>
			<content:encoded><![CDATA[<p>This modification will change currency depend of user IP and language.<br />
First of all you should download Joom!Fish Router Plugin Modified from <a href="http://www.hybing.com/Download/Joom-Fish-Router-Plugin-modified/download.html">modification page</a> or from <a href="http://fragov.com/blog/wp-content/uploads/2012/04/Joomfish_jfrouter_modified.2.02.zip">my server</a>.<br />
<span id="more-136"></span><br />
You have to install it and then edit /plugins/system/jfrouter.php, found:</p>
<pre class="php" name="code">if (defined("_JLEGACY")){
$name = 'mosConfig_'.$key;
$GLOBALS[$name] = $val;
}
}
}</pre>
<p>and add after:</p>
<pre class="php" name="code">$auto_currency = JRequest::getVar('auto_currency', null, "COOKIE");
if ($auto_currency == null) {
$href= "index.php";
$hrefVars = '';
$queryString = JRequest::getVar('QUERY_STRING', null ,"SERVER");
if( !empty($queryString) ) {
$vars = explode( "&amp;", $queryString );
if( count($vars) &gt; 0 &amp;&amp; $queryString) {
foreach ($vars as $var) {
if( eregi('=', $var ) ) {
list($key, $value) = explode( "=", $var);
if( $key != "lang" ) {
if( $hrefVars != "" ) {
$hrefVars .= "&amp;amp;";
}
// ignore mosmsg to ensure it is visible in frontend
if( $key != 'mosmsg' ) {
$hrefVars .= "$key=$value";
}
}
}
}
}
}

// Add the existing variables
if( $hrefVars != "" ) {
$href .= '?' .$hrefVars;
}

switch ($country) {
case 'BG': setcookie( "auto_currency", "CHF", time()+24*3600, '/' ); $GLOBALS['product_currency'] = "CHF"; $product_currency = "CHF"; break;
case 'US': setcookie( "auto_currency", "USD", time()+24*3600, '/' ); $GLOBALS['product_currency'] = "USD"; $product_currency = "USD";break;
default: setcookie( "auto_currency", "EUR", time()+24*3600, '/' ); $GLOBALS['product_currency'] = "EUR"; $product_currency = "EUR";
}

if (!strpos($queryString, 'index.php'))
{
$href = JURI::current();
$hrefVars = '';
}

// if there are other vars we need to add a &amp; otherwiese ?
if( $hrefVars == '' ) {
$href .= '?' . 'product_currency=' . $product_currency . '&amp;lang=' .$jfLang-&gt;getLanguageCode();
} else {
$href .= '&amp;' . 'product_currency=' . $product_currency . '&amp;lang=' .$jfLang-&gt;getLanguageCode();;
}

// $msg = 'Your currency automaticly set to ' . $product_currency . ', your country is ' . $country;
$app = JFactory::getApplication();
$app-&gt;redirect ($href);
}</pre>
<p>Check code after switch ($country) there you sould add any other countries and currencies.</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2012/04/09/automatic-currency-change-for-virtuemart-using-joomfish-router-plugin-modified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sh404SEF and JoomFish Homepage link problem for other languages</title>
		<link>http://fragov.com/blog/2012/04/01/sh404sef-and-joomfish-homepage-link-problem-for-other-languages/</link>
		<comments>http://fragov.com/blog/2012/04/01/sh404sef-and-joomfish-homepage-link-problem-for-other-languages/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 17:19:08 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[joomfish]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[sh404SEF]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=133</guid>
		<description><![CDATA[I&#8217;ve fixed today problem related with JoomFish and sh404SEF. If you click on homepage link in other languages except main it show you homepage in your default language, not in selected. To fix this bug you should open file modules/mod_mainmenu/helper.php (also check same file in your template folder), and change: $tmp-&#62;url = JURI::base(); to: $tmp-&#62;url [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve fixed today problem related with JoomFish and sh404SEF. If you click on homepage link in other languages except main it show you homepage in your default language, not in selected.<br />
To fix this bug you should open file modules/mod_mainmenu/helper.php (also check same file in your template folder), and change:</p>
<pre class="php" name="code">
$tmp-&gt;url = JURI::base();
</pre>
<p>to:</p>
<pre class="php" name="code">
$tmp-&gt;url = str_replace(array($tmp-&gt;route.'/', $tmp-&gt;route), '', JRoute::_( $tmp-&gt;url ));
</pre>
<p>Now everything should for as it has to.</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2012/04/01/sh404sef-and-joomfish-homepage-link-problem-for-other-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disallow to load your page in iframe</title>
		<link>http://fragov.com/blog/2011/12/14/disallow-to-load-your-page-in-iframe/</link>
		<comments>http://fragov.com/blog/2011/12/14/disallow-to-load-your-page-in-iframe/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 20:35:38 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=128</guid>
		<description><![CDATA[You may use next code to make problems for somebody, who is loading your page in iFrame: if((self.parent &#38;&#38; !(self.parent===self)) &#38;&#38; (self.parent.frames.length != 0)){ self.parent.location=document.location; }]]></description>
			<content:encoded><![CDATA[<p>You may use next code to make problems for somebody, who is loading your page in iFrame:</p>
<pre name="code" class="javascript">if((self.parent &amp;&amp; !(self.parent===self)) &amp;&amp; (self.parent.frames.length != 0)){
self.parent.location=document.location;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/12/14/disallow-to-load-your-page-in-iframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Full URL, current URL and base URL variables in Joomla 1.5, 1.6 and 1.7</title>
		<link>http://fragov.com/blog/2011/10/31/full-url-current-url-and-base-url-variables-in-joomla-1-5-1-6-and-1-7/</link>
		<comments>http://fragov.com/blog/2011/10/31/full-url-current-url-and-base-url-variables-in-joomla-1-5-1-6-and-1-7/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 16:00:23 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Joomla 1.7]]></category>
		<category><![CDATA[base]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[full]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[joomla 1.5]]></category>
		<category><![CDATA[joomla 1.6]]></category>
		<category><![CDATA[joomla 1.7]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=124</guid>
		<description><![CDATA[Base URL: JURI::base(); Current URL: JURI::current(); Full URL: JRequest::getURI();]]></description>
			<content:encoded><![CDATA[<p>Base URL:</p>
<pre name="code" class="php">JURI::base();</pre>
<p>Current URL:</p>
<pre name="code" class="php">JURI::current();</pre>
<p>Full URL:</p>
<pre name="code" class="php">JRequest::getURI();</pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/31/full-url-current-url-and-base-url-variables-in-joomla-1-5-1-6-and-1-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add class “last” to last menu item (li) in Joomla 1.7 (mod_menu)</title>
		<link>http://fragov.com/blog/2011/10/30/how-to-add-class-%e2%80%9clast%e2%80%9d-to-last-menu-item-li-in-joomla-1-7-mod_menu/</link>
		<comments>http://fragov.com/blog/2011/10/30/how-to-add-class-%e2%80%9clast%e2%80%9d-to-last-menu-item-li-in-joomla-1-7-mod_menu/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 14:48:24 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Joomla 1.7]]></category>
		<category><![CDATA[item]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[joomla 1.7]]></category>
		<category><![CDATA[last]]></category>
		<category><![CDATA[menu]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=120</guid>
		<description><![CDATA[There is an option to add for last &#60;a&#62; tag, but it is not enough for me, as I need also for last &#60;li&#62; tag. First you should copy file default.php from /modules/mod_menu/ to /templates/your_template_name/html/mod_menu. Next, you should edit this file. Before: foreach ($list as $i =&#62; &#38;$item) add: $num = 1; and before: if [...]]]></description>
			<content:encoded><![CDATA[<p>There is an option to add for last &lt;a&gt; tag, but it is not enough for me, as I need also for last &lt;li&gt; tag.<br />
First you should copy file default.php from /modules/mod_menu/ to /templates/your_template_name/html/mod_menu. Next, you should edit this file.<span id="more-120"></span><br />
Before:</p>
<pre name="code" class="php">foreach ($list as $i =&gt; &amp;$item)</pre>
<p>add:</p>
<pre name="code" class="php">$num = 1;</pre>
<p>and before:</p>
<pre name="code" class="php">if (!empty($class)) {
&nbsp;&nbsp;$class = '';
}</pre>
<p>add:</p>
<pre name="code" class="php">if ($num++ == count($list) || $item-&gt;shallower) $class .= ' last';</pre>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/30/how-to-add-class-%e2%80%9clast%e2%80%9d-to-last-menu-item-li-in-joomla-1-7-mod_menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Empty list of language switcher module in Joomla 1.7</title>
		<link>http://fragov.com/blog/2011/10/29/empty-list-of-language-switcher-module-in-joomla-1-7/</link>
		<comments>http://fragov.com/blog/2011/10/29/empty-list-of-language-switcher-module-in-joomla-1-7/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 15:56:17 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Joomla 1.7]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[multi-langual]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=113</guid>
		<description><![CDATA[Process of enabling of multi-lingual in Joomla is not too obvious. Main thing, which usually cause empty list of language, so multi-lingual not work at all. You have not to forget to enable &#8220;System &#8211; Language Filter&#8221; in Joomla Extentions -> Plug-in Manages. Also you should create menu and make &#8220;Default&#8221; pages for each language. [...]]]></description>
			<content:encoded><![CDATA[<p>Process of enabling of multi-lingual in Joomla is not too obvious. Main thing, which usually cause empty list of language, so multi-lingual not work at all.</p>
<p>You have not to forget to enable &#8220;System &#8211; Language Filter&#8221; in Joomla Extentions -> Plug-in Manages. Also you should create menu and make &#8220;Default&#8221; pages for each language.<span id="more-113"></span><br />
Here some images to make it more clear:</p>
<p><a href="http://fragov.com/blog/wp-content/uploads/2011/10/mainmenu.png"><img src="http://fragov.com/blog/wp-content/uploads/2011/10/mainmenu.png" alt="Joomla 1.7 Main Menu several languages" title="mainmenu" width="133" height="154" class="aligncenter size-full wp-image-115" /></a></p>
<p><a href="http://fragov.com/blog/wp-content/uploads/2011/10/itmenu.png"><img src="http://fragov.com/blog/wp-content/uploads/2011/10/itmenu-300x55.png" alt="Menu with Default page selected for each language" title="Menu with Default page selected for each language" width="300" height="55" class="aligncenter size-medium wp-image-114" /></a></p>
<p><a href="http://fragov.com/blog/wp-content/uploads/2011/10/Untitled-6.png"><img src="http://fragov.com/blog/wp-content/uploads/2011/10/Untitled-6.png" alt="Enabling multi-langual in Joomla 1.7. Creating Default page for each language." title="Enabling multi-langual in Joomla 1.7. Creating Default page for each language." width="494" height="450" class="aligncenter size-full wp-image-116" /></a></p>
<p>Also, it is good idea to read full manual of how to enable Joomla Multi-Language System: http://multilingual-joomla-demo.cloudaccess.net/en/multi-lingual-steps-by-steps.html</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/29/empty-list-of-language-switcher-module-in-joomla-1-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MooTools actions on browser window resize</title>
		<link>http://fragov.com/blog/2011/10/29/mootools-actions-on-browser-window-resize/</link>
		<comments>http://fragov.com/blog/2011/10/29/mootools-actions-on-browser-window-resize/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 02:13:08 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=109</guid>
		<description><![CDATA[When you need make some action using MooTools on window resize you should use a timer: window.addEvent('resize', function(){     $clear(timer);     var timer = (function(){         // your actions goes here     }).delay(50); }); You may play with timer delay.]]></description>
			<content:encoded><![CDATA[<p>When you need make some action using MooTools on window resize you should use a timer:</p>
<pre name="code" class="javascript">window.addEvent('resize', function(){
    $clear(timer);
    var timer = (function(){
        // your actions goes here
    }).delay(50);
});</pre>
<p>You may play with timer delay.</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/29/mootools-actions-on-browser-window-resize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer conditional comments</title>
		<link>http://fragov.com/blog/2011/10/24/internet-explorer-conditional-comments/</link>
		<comments>http://fragov.com/blog/2011/10/24/internet-explorer-conditional-comments/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 20:03:58 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=103</guid>
		<description><![CDATA[&#60;!--[if IE]&#62; According to the conditional comment this is IE&#60;br /&#62; &#60;![endif]--&#62; &#60;!--[if IE 6]&#62; According to the conditional comment this is IE 6&#60;br /&#62; &#60;![endif]--&#62; &#60;!--[if IE 7]&#62; According to the conditional comment this is IE 7&#60;br /&#62; &#60;![endif]--&#62; &#60;!--[if IE 8]&#62; According to the conditional comment this is IE 8&#60;br /&#62; &#60;![endif]--&#62; &#60;!--[if [...]]]></description>
			<content:encoded><![CDATA[<pre class="html" name="code">&lt;!--[if IE]&gt;
According to the conditional comment this is IE&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 6]&gt;
According to the conditional comment this is IE 6&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 7]&gt;
According to the conditional comment this is IE 7&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 8]&gt;
According to the conditional comment this is IE 8&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if IE 9]&gt;
According to the conditional comment this is IE 9&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if gte IE 8]&gt;
According to the conditional comment this is IE 8 or higher&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if lt IE 9]&gt;
According to the conditional comment this is IE lower than 9&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if lte IE 7]&gt;
According to the conditional comment this is IE lower or equal to 7&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if gt IE 6]&gt;
According to the conditional comment this is IE greater than 6&lt;br /&gt;
&lt;![endif]--&gt;
&lt;!--[if !IE]&gt; --&gt;
According to the conditional comment this is not IE&lt;br /&gt;
&lt;!-- &lt;![endif]--&gt;</pre>
<p>lt &#8211; less than<br />
gt &#8211; greater than<br />
lte &#8211; less than or equal to<br />
gte &#8211; greater than or equal to</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/24/internet-explorer-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove index.php From URLs in ExpressionEngine</title>
		<link>http://fragov.com/blog/2011/10/22/remove-index-php-from-urls-in-expressionengine/</link>
		<comments>http://fragov.com/blog/2011/10/22/remove-index-php-from-urls-in-expressionengine/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 12:47:19 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[espressionengine]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=100</guid>
		<description><![CDATA[First we need to create .htaccess file in ExpressionEngine root directory with next lines: Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] Next in ExpressionEngine administration panel in Admin &#62; General Configuration set Name of your site&#8217;s index page empty.]]></description>
			<content:encoded><![CDATA[<p>First we need to create .htaccess file in ExpressionEngine root directory with next lines:</p>
<pre class="php" name="code">Options +FollowSymLinks
RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]</pre>
<p>Next in ExpressionEngine administration panel in <strong>Admin</strong> &gt; <strong>General Configuration</strong> set <strong>Name of your site&#8217;s index page</strong> empty.</p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/22/remove-index-php-from-urls-in-expressionengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using ExpressionEngine Image Manipulation in Templates</title>
		<link>http://fragov.com/blog/2011/10/22/using-expressionengine-image-manipulation-in-templates/</link>
		<comments>http://fragov.com/blog/2011/10/22/using-expressionengine-image-manipulation-in-templates/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 12:37:50 +0000</pubDate>
		<dc:creator>fragov</dc:creator>
				<category><![CDATA[ExpressionEngine]]></category>
		<category><![CDATA[ee2]]></category>
		<category><![CDATA[expressionengine]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[image manipulation]]></category>

		<guid isPermaLink="false">http://fragov.com/blog/?p=93</guid>
		<description><![CDATA[Since version 2.2, ExpressionEngine has integrated some image manipulation into its file management module. This includes resizing images and creating thumbnails with support for the three major image manipulation protocols: GD, NetPBM, and ImageMagick. This means that when adding images to your site you can set multiple sizes and aspect ratios for creating thumbnails. You [...]]]></description>
			<content:encoded><![CDATA[<p>Since version 2.2, ExpressionEngine has integrated some image manipulation into its file management module. This includes resizing images and creating thumbnails with support for the three major image manipulation protocols: GD, NetPBM, and ImageMagick. This means that when adding images to your site you can set multiple sizes and aspect ratios for creating thumbnails. You also have the option of creating watermarks on the images.<span id="more-93"></span></p>
<p>The requirements are, of course, EE 2.2+ and PHP with one of the image manipulation protocols listed above. To create your own thumbnails, first you need to set up a new upload destination.</p>
<p><img class="aligncenter size-full wp-image-94" title="create_upload_destination_zoom" src="http://fragov.com/blog/wp-content/uploads/2011/10/create_upload_destination_zoom.gif" alt="" width="550" height="248" /></p>
<p>In the settings for the new destination near the bottom are the rules for creating additional images. The fields to set are short name, height and width. You can use the Resize Type dropdown to constrain or crop the image and the Watermark dropdown to create a watermark. Remember the names of each short name you create because this is how we will access the thumbnails that EE generates later in this article.</p>
<p><strong>* Leaving height or width blank will allow you to not change the aspect ratio of the image.</strong></p>
<p><img class="aligncenter size-full wp-image-95" title="manipulate_rules" src="http://fragov.com/blog/wp-content/uploads/2011/10/manipulate_rules.gif" alt="" width="550" height="248" /></p>
<p>Once the upload directory is set and you have a channel ready, publish a new entry and upload a new image. As the image gets uploaded the additional images are automagically created. If you already have entries with images that you would like to use, click on the synchronize icon from the File Upload Preferences page and then click submit on the following form. This will scan all images in the directory and create the extra images using the rules.</p>
<p><img class="aligncenter size-full wp-image-96" title="upload_sync" src="http://fragov.com/blog/wp-content/uploads/2011/10/upload_sync.gif" alt="" width="550" height="311" /></p>
<p>Now it’s time to change or create the template code to use the new images. Here is sample code for a basic blog with images.</p>
<pre class="php" name="code">{exp:channel:entries channel=”blog”}
    &lt;h1&gt;{title}&lt;/h1&gt;
    &lt;img src=”{blog_img}” alt=”blog_img” /&gt;
    &lt;p&gt;{blog_content}&lt;/p&gt;
{/exp:channel:entries}</pre>
<p>All you will need to do to use the new images is to change the {blog_img} single tag to a tag pair and type in the short name of the image you would like to use prefixed with an underscore. This is to direct the file path to the newly created image. This works because EE creates a folder for all of the thumbs it creates for each Short Name by using the short name plus an underscore (ie. _nameyoumake).</p>
<pre class="php" name="code">{exp:channel:entries channel=”blog”}
    &lt;h1&gt;{title}&lt;/h1&gt;
    {blog_img}
        &lt;img src=”{path}_shortName/{filename}.{extension}” alt=”blog_img” /&gt;
    {/blog_img}
    &lt;p&gt;{blog_content}&lt;/p&gt;
{/exp:channel:entries}</pre>
<p>Using this method you can create multiple images to use in different parts of the page using the default EE install. This can help keep image file sizes small to decrease page load times and use thumbnails for an image gallery. EE, by default, creates an 100&#215;100 thumbnail called thumbs in the directory _thumbs.</p>
<p>Article was copied from: <a href="http://viminteractive.com/blog/post/using_expressionengine_image_manipulation_in_templates" title="VIM Interactive">VIM Interactive</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fragov.com/blog/2011/10/22/using-expressionengine-image-manipulation-in-templates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
