<?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>Design it. Develop it. Use it.</title>
	<atom:link href="http://blog.egorkhmelev.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.egorkhmelev.com</link>
	<description>Design, interface, interaction, big project development, research (by Egor Khmelev).</description>
	<lastBuildDate>Mon, 08 Mar 2010 22:21:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery Slider plugin (Safari&#160;style)</title>
		<link>http://blog.egorkhmelev.com/2009/11/jquery-slider-safari-style/</link>
		<comments>http://blog.egorkhmelev.com/2009/11/jquery-slider-safari-style/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:54:55 +0000</pubDate>
		<dc:creator>Egor Khmelev</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Interface&Interaction]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://blog.egorkhmelev.com/?p=161</guid>
		<description><![CDATA[jQuery Slider is easy to use and multifunctional jQuery plugin. Below you can find demos and documentation.
If you have any suggestions, comments or just found a bug – please do not hesitate to write.

Download sources&#038;examples (54Kb)



	 .layout { padding: 30px 20px; line-height: 120%; background: #f1f1f1;  }
	 .layout-slider { margin-bottom: 60px; width: 60%; }
	 .layout-slider [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery Slider is easy to use and multifunctional jQuery plugin. Below you can find demos and documentation.</p>
<p>If you have any suggestions, comments or just found a bug – please do not hesitate to write.</p>
<p><span id="more-161"></span></p>
<p><a href="/wp-content/downloads/jSlider.zip">Download sources&#038;examples (54Kb)</a></p>
<link rel="stylesheet" href="/wp-content/jslider/stylesheets/jslider.css" type="text/css">
<link rel="stylesheet" href="/wp-content/jslider/stylesheets/jslider.blue.css" type="text/css"><!--[if IE 6]>
<link rel="stylesheet" href="/wp-content/jslider/stylesheets/jslider.ie6.css" type="text/css" media="screen">
<link rel="stylesheet" href="/wp-content/jslider/stylesheets/jslider.blue.ie6.css" type="text/css" media="screen"><![endif]--><script type="text/javascript" src="/wp-content/jslider/javascripts/jquery.core-1.3.2.js"></script><script type="text/javascript" src="/wp-content/jslider/javascripts/jquery.dependClass.js"></script><script type="text/javascript" src="/wp-content/jslider/javascripts/jquery.slider-min.js"></script><script type="text/javascript" src="/wp-content/jslider/jslider.init.js"></script></p>
<style type="text/css" media="screen">
	 .layout { padding: 30px 20px; line-height: 120%; background: #f1f1f1;  }
	 .layout-slider { margin-bottom: 60px; width: 60%; }
	 .layout-slider br { display: none; }
	 .layout-slider-settings { font-size: 12px; padding-bottom: 10px; }
</style>
<div class="layout">
<div class="layout-slider" style="width: 100%">Slider <span style="display: inline-block; width: 400px; padding: 0 5px;"><br />
<input id="Slider1" type="slider" name="price" value="30000.5;60000" /></span>  in string</div>
<div class="layout-slider-settings">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  from<span style="color: #339933;">:</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span>
  to<span style="color: #339933;">:</span> <span style="color: #CC0000;">50</span><span style="color: #339933;">,</span>
  step<span style="color: #339933;">:</span> <span style="color: #CC0000;">2.5</span><span style="color: #339933;">,</span>
  round<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
  dimension<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;nbsp;€'</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</p></div>
<div class="layout-slider">
<input id="SliderSingle" type="slider" name="price" value="20" />
    </div>
<div class="layout-slider-settings">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  from<span style="color: #339933;">:</span> <span style="color: #CC0000;">5000</span><span style="color: #339933;">,</span>
  to<span style="color: #339933;">:</span> <span style="color: #CC0000;">150000</span><span style="color: #339933;">,</span>
  heterogeneity<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'50/50000'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  step<span style="color: #339933;">:</span> <span style="color: #CC0000;">1000</span><span style="color: #339933;">,</span>
  dimension<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;nbsp;$'</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</p></div>
<div class="layout-slider">
<input id="Slider2" type="slider" name="price" value="5000;50000" />
    </div>
<div class="layout-slider-settings">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  from<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
  to<span style="color: #339933;">:</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">,</span>
  heterogeneity<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'50/100'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'75/250'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  scale<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">50</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span> <span style="color: #339933;">,</span> <span style="color: #3366CC;">'100'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  limits<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
  step<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
  dimension<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;nbsp;m&lt;small&gt;2&lt;/small&gt;'</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</p></div>
<div class="layout-slider">
<input id="Slider3" type="slider" name="area" value="25;75" />
    </div>
<div class="layout-slider-settings">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  from<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
  to<span style="color: #339933;">:</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">,</span>
  heterogeneity<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'50/5'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'75/15'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  scale<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'5'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">15</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">30</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  limits<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
  step<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
  dimension<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>
  skin<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;blue&quot;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</p></div>
<div class="layout-slider">
<input id="Slider4" type="slider" name="area" value="2;10" />
    </div>
<div class="layout-slider-settings">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  from<span style="color: #339933;">:</span> <span style="color: #CC0000;">480</span><span style="color: #339933;">,</span>
  to<span style="color: #339933;">:</span> <span style="color: #CC0000;">1020</span><span style="color: #339933;">,</span>
  step<span style="color: #339933;">:</span> <span style="color: #CC0000;">15</span><span style="color: #339933;">,</span>
  dimension<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span>
  scale<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'8:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'9:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'10:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'11:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'12:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'13:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'14:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'15:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'16:00'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'17:00'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  limits<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
  calculate<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> value <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> hours <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span> value <span style="color: #339933;">/</span> <span style="color: #CC0000;">60</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> mins <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> value <span style="color: #339933;">-</span> hours<span style="color: #339933;">*</span><span style="color: #CC0000;">60</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>hours <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">10</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">+</span>hours <span style="color: #339933;">:</span> hours<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;:&quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span> mins <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;00&quot;</span> <span style="color: #339933;">:</span> mins <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</p></div>
<div class="layout-slider">
<input id="Slider5" type="slider" name="area" value="600;720" />
    </div>
</p></div>
<p><br/><br/></p>
<h2>Documentation</h2>
<ul>
<li>from — <strong>[number]</strong> left limit</li>
<li>to — <strong>[number]</strong> right limit</li>
<li>step — <strong>[number]</strong> step of pointer</li>
<li>round — <strong>[number]</strong> how many numbers after comma</li>
<li>heterogeneity — <strong>[array]</strong> (percentage of place)/(value of place)</li>
<li>dimension — <strong>[string]</strong> show this after number</li>
<li>limits — <strong>[boolean]</strong> show or not limits</li>
<li>scale — <strong>[array]</strong> labels under slider, &#8216;|&#8217; — show just line</li>
<li>skin — <strong>[string]</strong> if you define new skin, just write here his name, in sources defined blue skin for example</li>
<li>calculate — <strong>[function(value)]</strong> function to calculate final numbers, for example time.</li>
<li>onstatechange — <strong>[function(value)]</strong> function fires while slider change state.</li>
<li>callback — <strong>[function(value)]</strong> function fires on &#8220;mouseup&#8221; event.</li>
</ul>
<p><font color="red">Do not forget to set absolute or true relative path for png in <strong>jslider.ie6.css</strong> and <strong>jslider.ie6.[skin].css</strong></font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.egorkhmelev.com/2009/11/jquery-slider-safari-style/feed/</wfw:commentRss>
		<slash:comments>73</slash:comments>
		</item>
		<item>
		<title>jQuery Safari Searcher</title>
		<link>http://blog.egorkhmelev.com/2009/11/jquery-safari-searcher/</link>
		<comments>http://blog.egorkhmelev.com/2009/11/jquery-safari-searcher/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 00:24:15 +0000</pubDate>
		<dc:creator>Egor Khmelev</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Interface&Interaction]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://blog.egorkhmelev.com/?p=143</guid>
		<description><![CDATA[I want to share my jQuery search box plugin looks like Safari one. It is really easy to customize skin by drawing new sprite. Moreover, it have all the same functionality as a real one and a bit more — incremental search with loader. I hope it would help to you guys. Below some demos [...]]]></description>
			<content:encoded><![CDATA[<p>I want to share my jQuery search box plugin looks like Safari one. It is really easy to customize skin by drawing new sprite. Moreover, it have all the same functionality as a real one and a bit more — incremental search with loader. I hope it would help to you guys. Below some demos and examples of usage.</p>
<p><span id="more-143"></span></p>
<p><a href="/wp-content/downloads/jSearcher.zip">Download sources</a></p>
<link rel="stylesheet" href="/wp-content/jsearcher/stylesheets/j-searcher.css" type="text/css" media="screen"><!--[if lt IE 8]>
<link rel="stylesheet" href="/wp-content/jsearcher/stylesheets/j-searcher.ie.css" type="text/css" media="screen"><![endif]--><!--[if IE 6]>
<link rel="stylesheet" href="/wp-content/jsearcher/stylesheets/j-searcher.ie6.css" type="text/css" media="screen"><![endif]--><script src="/wp-content/jsearcher/javascripts/global/inheritance.js" type="text/javascript" charset="utf-8"></script><script src="/wp-content/jsearcher/javascripts/global/templating.js" type="text/javascript" charset="utf-8"></script><script src="/wp-content/jsearcher/javascripts/jquery.core-1.3.2.js" type="text/javascript" charset="utf-8"></script><script src="/wp-content/jsearcher/javascripts/jquery.dependClass.js" type="text/javascript" charset="utf-8"></script><script src="/wp-content/jsearcher/javascripts/jquery.searcher.js" type="text/javascript" charset="utf-8"></script></p>
<style type="text/css" media="screen">
      .searcher-container { position: relative; left: -7px; }
      .comment { color: gray; font-size: 12px; }
      pre { font-size: 14px; }
</style>
<p><br/></p>
<h3>Simple search:</h3>
<div class="searcher-container" style="width: 200px">
<input id="SimpleSearcher" type="search" placeholder="Search" autocomplete="off" />
    </div>
<p>    <script type="text/javascript" charset="utf-8">
      $("#SimpleSearcher").searcher();
    </script></p>
<p>
<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width: 200px&quot;</span>&gt;</span> <span style="color: #808080; font-style: italic;">&lt;!-- ← Define searcher width by setting width to parent node.--&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;SimpleSearcher&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;search&quot;</span></span>
<span style="color: #009900;">    placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Search&quot;</span></span>
<span style="color: #009900;">    autocomplete<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;off&quot;</span></span>
<span style="color: #009900;">  <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
  $(&quot;#SimpleSearcher&quot;).searcher();
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</p>
<p><br/></p>
<h3>Incremental search:</h3>
<div class="searcher-container" style="width: 200px">
<input id="IncrementalSearcher" type="search" placeholder="Search" incremental="yes" onsearch="onSearchHandler.apply(this, arguments)" autocomplete="off" />
    </div>
<p>    <script type="text/javascript" charset="utf-8">
      $("#IncrementalSearcher").searcher();
      function onSearchHandler(){
        this.loading(true);
        /* AJAX or simple JavaScript actions */
      }
    </script></p>
<p>
<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width: 200px&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;IncrementalSearcher&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;search&quot;</span></span>
<span style="color: #009900;">    placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Search&quot;</span></span>
<span style="color: #009900;">    autocomplete<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;off&quot;</span></span>
&nbsp;
<span style="color: #009900;">    incremental<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;yes&quot;</span></span>
<span style="color: #009900;">    onsearch<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;onSearchHandler.apply(this, arguments)&quot;</span></span>
&nbsp;
<span style="color: #009900;">  <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
  $(&quot;#IncrementalSearcher&quot;).searcher();
  function onSearchHandler(){
    this.loading(true);
    /* AJAX or simple JavaScript actions */
  }
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</p>
<p><br/></p>
<h3>Getting Search Object</h3>
<p>
<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
  $(&quot;#IncrementalSearcher&quot;).data(&quot;SearchHandler&quot;).onsearch = function(){ /* whatever */ };
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</p>
<p><br/></p>
<p>Next: <a href="http://blog.egorkhmelev.com/2009/11/jquery-slider-safari-style/"><strong>jQuery Slider plugin</strong><br/><img src="/wp-content/jslider/slider.png" alt="jQuery Slider plugin" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.egorkhmelev.com/2009/11/jquery-safari-searcher/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash based web radio player</title>
		<link>http://blog.egorkhmelev.com/2009/06/flash-based-web-radio-player/</link>
		<comments>http://blog.egorkhmelev.com/2009/06/flash-based-web-radio-player/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 11:03:40 +0000</pubDate>
		<dc:creator>Egor Khmelev</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Interface&Interaction]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[radio]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://blog.evershow.me/?p=127</guid>
		<description><![CDATA[Design of very simple and easy to use flash radio player. This is how every web radio player must be.

  

      #lifefmPlayer span { display: block !important; }
    
  
  
   	Sorry, this site has a flash based radio and adobe flash [...]]]></description>
			<content:encoded><![CDATA[<p>Design of very simple and easy to use flash radio player. This is how every web radio player must be.</p>
<div id="lifefmPlayer">
  <noscript></p>
<style type="text/css" media="screen">
      #lifefmPlayer span { display: block !important; }
    </style>
<p>  </noscript><br />
  <span><br />
   	<strong>Sorry, this site has a flash based radio and adobe flash 8+ is needed. </strong><br />
   	<br />
	  <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Download Flash here.</a><br />
	</span>
</div>
<p><script src="/wp-content/javascripts/swfobject.js" type="text/javascript" charset="utf-8"></script><br />
<script src="/wp-content/javascripts/player.js" type="text/javascript" charset="utf-8"></script></p>
<h3>Everyone can <a href="http://webplayerstore.com">purchase it here</a> ( 10$ ).</h3>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.egorkhmelev.com/2009/06/flash-based-web-radio-player/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>CSS framework in action</title>
		<link>http://blog.egorkhmelev.com/2009/05/css-framework-in-action/</link>
		<comments>http://blog.egorkhmelev.com/2009/05/css-framework-in-action/#comments</comments>
		<pubDate>Sun, 17 May 2009 11:59:05 +0000</pubDate>
		<dc:creator>Egor Khmelev</dc:creator>
				<category><![CDATA[Production]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://blog.evershow.me/?p=89</guid>
		<description><![CDATA[CSS framework is a base of your web to make developing faster and also a way to organize all CSS, JavaScripts, [+ xslt] etc.
Typical bottlenecks

structuring large project
faster developing
group developing
easy extensibility
future support by new developers
using parts in future projects



Download
css_framework.zip

Basic folder structure

/framework
	/stylesheets
		/global
		/layout
		/blocks

	/javascripts
		/global
		/jquery &#8592; or any JS framework

	/plugins

/stylesheets
	application.css &#8592; import all styles here
	application.ie.css &#8592; fixes for all of [...]]]></description>
			<content:encoded><![CDATA[<p>CSS framework is a base of your web to make developing faster and also a way to organize all CSS, JavaScripts, [+ xslt] etc.</p>
<h2>Typical bottlenecks</h2>
<ul>
<li>structuring large project</li>
<li>faster developing</li>
<li>group developing</li>
<li>easy extensibility</li>
<li>future support by new developers</li>
<li>using parts in future projects</li>
</ul>
<p><span id="more-89"></span><br />
<br/></p>
<h2>Download</h2>
<p><a href="/wp-content/downloads/css_framework/css_framework.zip">css_framework.zip</a><br />
<br/></p>
<h2>Basic folder structure</h2>
<pre>
/framework
	/stylesheets
		/global
		/layout
		/blocks

	/javascripts
		/global
		/jquery <em class="comment">&larr; or any JS framework</em>

	/plugins

/stylesheets
	application.css <em class="comment">&larr; import all styles here</em>
	application.ie.css <em class="comment">&larr; fixes for all of IE (6,7,8)</em>
	application.ie67.css <em class="comment">&larr; fixes for IE6&#038;7</em>
	application.ie7.css
	application.ie6.css
</pre>
<p><br/></p>
<h2>Explanations</h2>
<p><strong>/framework/stylesheets</strong> — here we are going to put all simple stylesheets <em>without any interactive (JS)</em><br />
<strong>/framework/stylesheets/global</strong> — basic styles, usually the same for every project<br />
<strong>/framework/stylesheets/layout</strong> — styles to make page layouts, columns and so on<br />
<strong>/framework/stylesheets/blocks</strong> — all styles for current project</p>
<p><strong>/framework/javascripts</strong> — here we are going to put all simple javascripts <em>without any layout (CSS)</em><br />
<strong>/framework/javascripts/global</strong> — basic scripts, usually the same for every project<br />
<strong>/framework/javascripts/jquery</strong> — any JS framework</p>
<p><strong>/framework/plugins</strong> — here we are going to put all <em>interactive blocks with layout</em></p>
<p><strong>/stylesheets</strong> — connect these files to page<br />
<br/></p>
<h2>Name of files and selectors</h2>
<p>We need some rules to name files and selectors, to be able to search it quicker and without any mess. First of all, we have to name a files.<br />
<strong>example.css</strong></p>
<p>But if we need the same fixes for all IE, we must create new file:<br />
<strong>example.ie.css</strong></p>
<p>Or/and we need fixes just for IE 6, we must create file:<br />
<strong>example.ie6.css</strong></p>
<p>The way to organize selectors is name it by first letter of folder where it placed, for example we have folders <strong>&#8220;global&#8221;</strong>, <strong>&#8220;layout&#8221;</strong> and &#8220;<strong>blocks&#8221;</strong>:<br />
.<strong>g</strong>-pseudo-link { &#8230; }<br />
.<strong>l</strong>-column { &#8230; }<br />
.<strong>b</strong>-menu { &#8230; }</p>
<p>Fixes for different browsers (<strong>/framework/javascripts/global/browsers.js</strong>):<br />
<strong>.e-webkit</strong> .b-menu { &#8230; }<br />
<strong>.e-gecko</strong> .b-post { &#8230; }<br />
<strong>.e-opera</strong> .b-post_featured { &#8230; }</p>
<p>Now we have structure of our framework and some basic rules, so we can start with styles.<br />
<br/></p>
<h2>Global styles</h2>
<p><strong>global.reset.css</strong> — reset default browser layout.<br />
<strong>global.link.css</strong> — styles for normal and pseudo links.<br />
<strong>global.css</strong> — another default styles.</p>
<p>Download sample framework to see all with IE fixes.<br />
<br/></p>
<h2>Blocks</h2>
<p>The most important thing is split page on simple blocks. Then we need to give a right name to that block and write styles. For example we have block:<br />
<img src="http://blog.evershow.me/wp-content/downloads/css_framework/b-post.jpg" alt="simple post block" /></p>
<p>This is a way to show post on <a href="http://lookatme.ru">LOOKATME.RU</a> home page.</p>
<p>So, we are creating a new folder and file and write css just for this block:<br />
<strong>/framework/stylesheets/blocks/b-post/b-post.css</strong></p>
<p><em>Place any pictures (if we need) close to this file.</em></p>
<p><strong>The name of inner selectors are like this:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.b-post</span> <span style="color: #00AA00;">&#123;</span> ... <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.b-post</span> <span style="color: #6666ff;">.b-post-border</span> <span style="color: #00AA00;">&#123;</span> ... <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.b-post</span> <span style="color: #6666ff;">.b-post-border</span> <span style="color: #6666ff;">.l</span> <span style="color: #00AA00;">&#123;</span> ... <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><br/></p>
<h3>Redefine existing blocks</h3>
<p>In the same home page we have another view of post — featured post, basically it is almost the same style, but it has a little difference.<br />
<img src="http://blog.evershow.me/wp-content/downloads/css_framework/b-post_featured.jpg" alt="featured post" /></p>
<p>We are creating new file close to b-post.css:<br />
<strong>/framework/stylesheets/blocks/b-post/b-post.featured.css</strong></p>
<p>And here we just need to write styles to extend .b-post for new layout.<br />
<strong>Selectors will have names like:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.b-post_featured</span> <span style="color: #00AA00;">&#123;</span> ... <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.b-post_featured</span> <span style="color: #6666ff;">.b-post-border</span> <span style="color: #6666ff;">.l</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>And html:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;b-post b-post_featured&quot;</span>&gt;</span>
...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p><font color="red">For IE fixes we just need to create files like b-post.ie.css or b-post.featured.ie6.css or any another combinations.</font><br />
<br/></p>
<h2>Structure of plugins</h2>
<pre>
/framework/plugins
	/b-search
		/javascripts
		/stylesheets
		/tests <em>&larr; examples how this plugin work and how to use it</em>
</pre>
<p><br/></p>
<h2>Conclusion</h2>
<p>This is just one way to organize files that I&#8217;ve used in two large projects. I&#8217;ve used a lot of different ways before, but finally I think this one is better.</p>
<p><font color="red">Be careful with IE because it has <strong>limit of 32 external css files</strong>. The way to solve it — join all css to one file.</font></p>
<p>Special thanks to Vitaly Harisov from <a href="http://yandex.ru">Yandex</a> for his help to solved the mess with selector names.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.egorkhmelev.com/2009/05/css-framework-in-action/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Different layout for every page in Joomla 1.5.x</title>
		<link>http://blog.egorkhmelev.com/2009/05/different-layout-for-every-page-in-joomla-15x/</link>
		<comments>http://blog.egorkhmelev.com/2009/05/different-layout-for-every-page-in-joomla-15x/#comments</comments>
		<pubDate>Sat, 02 May 2009 12:33:28 +0000</pubDate>
		<dc:creator>Egor Khmelev</dc:creator>
				<category><![CDATA[Routine]]></category>
		<category><![CDATA[different layout]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[inherit]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://blog.evershow.me/?p=58</guid>
		<description><![CDATA[The good thing is control layout of pages by administrator panel.
The solution is create different templates. But keeping the same things like header, footer and menu in every template is bad and if we are going to change something in future (who knows?) it will be a big problem.
So we need to have one main [...]]]></description>
			<content:encoded><![CDATA[<p>The good thing is control layout of pages by administrator panel.<br />
The solution is create different templates. But keeping the same things like header, footer and menu in every template is bad and if we are going to change something in future (who knows?) it will be a big problem.</p>
<p>So we need to have one main template with basic layout and another (inherited) templates with layout for each page.<br />
<span id="more-58"></span></p>
<h2>Solution</h2>
<p>First of all we need to create main template which will be wrapper for all the next templates.<br />
<br/></p>
<h3>Creating global template, named it &ldquo;_global&rdquo;. Files that we need:</h3>
<ul>
<li>/templates/<strong>_global</strong>/index.php</li>
<li>/templates/<strong>_global</strong>/layout.php</li>
<li>/templates/<strong>_global</strong>/templateDetails.xml</li>
<li>/templates/<strong>_global</strong>/helper.php</li>
</ul>
<p><br/></p>
<h3>1. index.php:</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $this-&gt;</span></span>language; ?&gt;&quot; lang=&quot;<span style="color: #009900;">&lt;?php echo $this-&gt;</span>language; ?&gt;&quot;&gt;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    <span style="color: #009900;">&lt;jdoc:include <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;head&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $this-&gt;</span></span>baseurl; ?&gt;/framework/stylesheets/application.css&quot; type=&quot;text/css&quot; charset=&quot;utf-8&quot;&gt;
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>
    Header of page
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;layout&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;jdoc:file <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;layout.php&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span>
    <span style="color: #ddbb00;">&amp;copy;</span> Egor Hmelyoff
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>Here we&#8217;ve written the new construction <strong>&lt;jdoc:file name=&#8221;layout.php&#8221; /&gt;</strong>. Which means that you include layout.php from the current template. After that, we will create this file in each new template and insert there our layout.<br />
<br/></p>
<h3>2. layout.php (for _global template):</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span>&gt;</span>basic layout<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Here we can write whatever we need.<br />
<br/></p>
<h3>3. templateDetails.xml</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>  
<span style="color: #00bbdd;">&lt;!DOCTYPE install PUBLIC &quot;-//Joomla! 1.5//DTD template 1.0//EN&quot;  </span>
<span style="color: #00bbdd;"> &quot;http://dev.joomla.org/xml/1.5/template-install.dtd&quot;&gt;</span>  
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;install</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.5.9&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;template&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>_global template<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;creationDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>23 April 2009<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/creationDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>hmelyoff<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;authorEmail<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>hmelyoff@gmail.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/authorEmail<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;authorUrl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://blog.evershow.me<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/authorUrl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copyright<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Life Fm, 2009<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copyright<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;license<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>GNU/GPL<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/license<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.5.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Global template with basic html layout<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;files<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>index.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>templateDetails.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>helper.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>layout.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/files<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>         
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;positions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/positions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>  
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/install<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Here nothing special.<br />
<br/></p>
<h3>4. helper.php: <small>(updated)</small></h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_JEXEC'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Restricted access'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">function</span> global_render<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_params</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">global</span> <span style="color: #000088;">$mainframe</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Base instances</span>
    <span style="color: #000088;">$document</span> <span style="color: #339933;">=&amp;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getDocument</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$user</span>     <span style="color: #339933;">=&amp;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getUser</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;">// Define global template</span>
    <span style="color: #000088;">$_template</span>	<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;_global&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$_template_dir</span>	<span style="color: #339933;">=</span> JPATH_THEMES<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #000088;">$_template</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Define _global params</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_readable</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_template_dir</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'params.ini'</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$_content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_template_dir</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'params.ini'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$_global_params</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JParameter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Define empty params if not exist</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$_params</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$_params</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JParameter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// example includes/application.php &quot;render&quot; function</span>
    <span style="color: #000088;">$file</span>	<span style="color: #339933;">=</span> JRequest<span style="color: #339933;">::</span><span style="color: #004000;">getCmd</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'tmpl'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'index'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> JSite<span style="color: #339933;">::</span><span style="color: #004000;">getCfg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'offline'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'gid'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #0000ff;">'23'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'offline'</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: #339933;">!</span><span style="color: #990000;">is_dir</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_template_dir</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>JSite<span style="color: #339933;">::</span><span style="color: #004000;">getCfg</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'offline'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'component'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">'template'</span> 	<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_template</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'file'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$file</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.php'</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">'directory'</span>	<span style="color: #339933;">=&gt;</span> JPATH_THEMES
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Catch current template</span>
    <span style="color: #000088;">$template</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$mainframe</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTemplate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$template_dir</span> <span style="color: #339933;">=</span> JPATH_THEMES<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #000088;">$template</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set global template as current and render document</span>
    <span style="color: #000088;">$mainframe</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setTemplate</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_template</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">render</span><span style="color: #009900;">&#40;</span> JSite<span style="color: #339933;">::</span><span style="color: #004000;">getCfg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'caching'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$params</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set back current template</span>
    <span style="color: #000088;">$mainframe</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setTemplate</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$template</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$replace</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>
    <span style="color: #000088;">$matches</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;">// Catch own construction for include files</span>
    <span style="color: #666666; font-style: italic;">// (example /libraties/joomla/document/html/html.php &quot;_parseTemplate&quot; function)</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'#&lt;jdoc:file\ name=&quot;([^&quot;]+)&quot;.*\/&gt;#iU'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$matches</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: #990000;">array_reverse</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$matches</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: #990000;">array_reverse</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$matches</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: #339933;">;</span>
&nbsp;
      <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$matches</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: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$count</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$inc</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$tpl_dir</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$template_dir</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// if file does not exist in current template,</span>
        <span style="color: #666666; font-style: italic;">// looking for it in &quot;_global&quot; teamplate dir</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$template_dir</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #000088;">$inc</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
          <span style="color: #000088;">$tpl_dir</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_template_dir</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_params</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">global_params</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_global_params</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$tpl</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span>_loadTemplate<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$tpl_dir</span><span style="color: #339933;">,</span> <span style="color: #000088;">$inc</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$tpl</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$document</span><span style="color: #339933;">-&gt;</span>_parseTemplate<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$tpl</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$replace</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tpl</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$matches</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: #000088;">$replace</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>This is the main function to render new inherited templates.<br />
So, we&#8217;ve created &ldquo;<strong>_global</strong>&rdquo; template, but remeber: <strong><font color="red">this template not for assign it</font></strong>.<br />
<br/></p>
<h2>Inherited templates</h2>
<p>Next step: we will create new inherited template for home page (for example).<br />
<br/></p>
<h3>Files that we need:</h3>
<ul>
<li>/templates/<strong>home</strong>/index.php</li>
<li>/templates/<strong>home</strong>/layout.php</li>
<li>/templates/<strong>home</strong>/templateDetails.php</li>
</ul>
<p>&ldquo;<strong>home</strong>&rdquo; here for example, we can give any name to inherited templates.<br />
<br/></p>
<h3>1. index.php: <small>(updated)</small></h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_JEXEC'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Restricted access'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">include</span> JPATH_THEMES<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'_global/helper.php'</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">echo</span> global_render<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</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><br/></p>
<h3>2. layout.php:</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;left&quot;</span>&gt;</span>new left column in home template<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;center&quot;</span>&gt;</span>content part<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p><br/></p>
<h3>3. templateDetails.php: <em>nothing special again</em>.</h3>
<p><br/><br />
That&#8217;s all. Now we can assign this template by Joomla administrator panel.<br />
Also, in inherited template <em>we have access to params of _global template by</em> <strong>$this->global_params->get(&#8230;)</strong><br />
<br/></p>
<h2>Download</h2>
<p><a href="/wp-content/downloads/inherit_templates.zip">Two blank templates</a> (_global and inherited).<br />
<br/></p>
<h2>Summary</h2>
<ol>
<li>Any count of inherited templates.</li>
<li>Redefining modules will be in context of templates (right way).<br />
<blockquote>For example we need to redefine layout for <strong>mod_mainmenu</strong> module for all pages, add file <strong>default.php</strong> to <nobr>/templates/<strong>_global</strong>/html/mod_mainmenu/default.php</nobr>. Or we need to redefine layout for <strong>mod_latestnews</strong> just in home page layout, add file <strong>default.php</strong> to <nobr>/templates/<strong>home</strong>/html/mod_latestnews/default.php</nobr>.</p></blockquote>
</li>
<li>All controled by administrator panel.</li>
</ol>
<p>Feel free to <a href="mailto:hmelyoff@gmail.com">mail me</a> anytime if you have any problem or question.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.egorkhmelev.com/2009/05/different-layout-for-every-page-in-joomla-15x/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Light PNG fix in Internet Explorer 6 by VML</title>
		<link>http://blog.egorkhmelev.com/2009/04/light-png-fix-in-internet-explorer-6-by-vml/</link>
		<comments>http://blog.egorkhmelev.com/2009/04/light-png-fix-in-internet-explorer-6-by-vml/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 17:00:30 +0000</pubDate>
		<dc:creator>Egor Khmelev</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[conditional comments]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[vml]]></category>

		<guid isPermaLink="false">http://blog.evershow.me/?p=23</guid>
		<description><![CDATA[Any web developer knows that Internet Explorer 6 can&#8217;t load PNG files with transparency (24 bits). We&#160;have to&#160;use filter &#8220;AlphaImageLoader&#8221; to&#160;fix it, that is&#160;very hard and you will use more resources applying this solution.
Drew Diller public researched post &#8220;Medicine for your IE6/PNG headache&#8221; and javascript library DD_belatedPNG (Current: 0.0.7a on&#160;2009.01.01). That is&#160;a&#160;very good solution but [...]]]></description>
			<content:encoded><![CDATA[<p>Any web developer knows that Internet Explorer 6 can&rsquo;t load PNG files with transparency (24 bits). We&nbsp;have to&nbsp;use filter &ldquo;AlphaImageLoader&rdquo; to&nbsp;fix it, that is&nbsp;very hard and you will use more resources applying this solution.</p>
<p><a href="http://www.dillerdesign.com/">Drew Diller</a> public researched post &ldquo;<a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/">Medicine for your IE6/PNG headache</a>&rdquo; and javascript <nobr>library DD_belatedPNG (Current: 0.0.7a on&nbsp;2009.01.01)</nobr>. That is&nbsp;a&nbsp;very good solution but it&rsquo;s got one big problem: If&nbsp;you are going to&nbsp;use <nobr><a href="http://www.alistapart.com/articles/sprites/"><acronym title="Cascading Style Sheets" lang="en">CSS</acronym> sprites</a></nobr>, you will have your png a&nbsp;little fuzzy. That problem prevents us&nbsp;from using this library.</p>
<p>The problem is&nbsp;inside VML technology with <strong>shape</strong> and <strong>fill</strong> objects (what Drew Diller have used).</p>
<p>So&nbsp;I&rsquo;ve written a&nbsp;special <acronym title="Cascading Style Sheets" lang="en">CSS</acronym> library for <acronym title="Cascading Style Sheets" lang="en">CSS</acronym> sprites use.<br />
<span id="more-23"></span></p>
<h3>What do&nbsp;we need?</h3>
<ol>
<li>Declare VML namespace for Internet Explorer</li>
<li>DOM ready CSS event</li>
<li>My&nbsp;CSS library</li>
</ol>
<p>Let&rsquo;s do&nbsp;it!<br />
<br/></p>
<h2>1. Declare VML namespace for Internet Explorer</h2>
<p>Using Conditional Comments in&nbsp;head part of&nbsp;our <acronym title="HyperText Markup Language" lang="en">HTML</acronym>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;xml:namespace ns=&quot;urn:schemas-microsoft-com:vml&quot; prefix=&quot;v&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></td></tr></table></div>

<p><br/></p>
<h2>2. DOM ready <acronym title="Cascading Style Sheets" lang="en">CSS</acronym> event</h2>
<p><a href="/wp-content/g-png/global.domready.ie.css" target="_blank">global.domready.ie.css</a>&nbsp;&mdash; this is&nbsp;jQuery light DOM ready event written by&nbsp;expression.</p>
<p>Connect it&nbsp;to&nbsp;our document for all of&nbsp;IE:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;xml:namespace ns=&quot;urn:schemas-microsoft-com:vml&quot; prefix=&quot;v&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;link href=&quot;global.domready.ie.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></td></tr></table></div>

<p> <br/></p>
<h2>3. My&nbsp;CSS library</h2>
<p><a href="/wp-content/g-png/g-png.ie6.css" target="_blank"><nobr>g-png</nobr>.ie6.css</a>&nbsp;&mdash; library written by&nbsp;expression (with english comments).</p>
<p>Connect it&nbsp;to&nbsp;our document, final result:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;xml:namespace ns=&quot;urn:schemas-microsoft-com:vml&quot; prefix=&quot;v&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;link href=&quot;global.domready.ie.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--[if IE 6]&gt;</span>
<span style="color: #808080; font-style: italic;">	&lt;link href=&quot;g-png.ie6.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></td></tr></table></div>

<p><br/></p>
<h2>How to&nbsp;use it?</h2>
<p>Simply connect all files and add class name <nobr>&ldquo;g-png&rdquo;</nobr> in&nbsp;tag where you need this png fix like:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shadow g-png&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span></pre></div></div>

<p><br/></p>
<h2>In&nbsp;action:</h2>
<p><a href="http://lookatme.ru">LOOKATME.RU</a><br />
<a href="http://campus.ru">Campus.ru</a><br />
<br/></p>
<h2>Known issues</h2>
<ol>
<li><nobr>Background-repeat</nobr> (use DD_belatedPNG for it).</li>
<li>Center positioning.</li>
<li>Opacity.</li>
</ol>
<p>This is&nbsp;a&nbsp;complete solution, it&nbsp;means that you don&rsquo;t need to&nbsp;use javascript manipulations.</p>
<p>And it&rsquo;s specially thought for <acronym title="Cascading Style Sheets" lang="en">CSS</acronym> sprites or&nbsp;simple png public.</p>
<p><font color="red">Warning: Safari doesn&rsquo;t like these files and ignores them.</font><br />
<br/></p>
<h2>Summary</h2>
<p><a href="/wp-content/g-png/g-png.zip">Download all by&nbsp;one file</a>.</p>
<p>This is&nbsp;a&nbsp;very light solution and has been tested and used in&nbsp;a&nbsp;big production web, but it&nbsp;may has bugs in&nbsp;different situations.</p>
<p>Feel free to&nbsp;<a href="mailto:hmelyoff@gmail.com">mail me</a> anytime if&nbsp;you have any problem or&nbsp;question.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.egorkhmelev.com/2009/04/light-png-fix-in-internet-explorer-6-by-vml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
