<?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>Dmitri's Blog &#187; PHP</title>
	<atom:link href="http://www.dmitri.me/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dmitri.me/blog</link>
	<description>Dmitri Smirnov. Web development in Estonia.</description>
	<lastBuildDate>Tue, 10 Aug 2010 12:07:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Isikukoodi valideerimine</title>
		<link>http://www.dmitri.me/blog/isikukood-valideerimine/</link>
		<comments>http://www.dmitri.me/blog/isikukood-valideerimine/#comments</comments>
		<pubDate>Fri, 29 May 2009 09:29:07 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Eesti]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Rury]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=258</guid>
		<description><![CDATA[Leidsin täna seda → Isikukood. Algoritm on selge aga näidese kood on räpp&#8230;
Siis&#8230;
Versioon PHP by Setor
Versioon PHP 2 by MiamiBC (kõige lihtsam ja arusaadavam)
Java version by Incubo
Minu versioon Ruby keeles
Mika Tuupola versioon JavaScript
Kui sul on mingi teine versioon siis saada mulle ka  
]]></description>
			<content:encoded><![CDATA[<p>Leidsin täna seda → <a href="http://et.wikipedia.org/wiki/Isikukood">Isikukood</a>. Algoritm on selge aga näidese kood on räpp&#8230;</p>
<p>Siis&#8230;</p>
<p><a href="/misc/isikukood/isikukood.phps">Versioon PHP</a> by <a href="http://www.setor.net/">Setor</a><br />
<a href="/misc/isikukood/isikukood2.phps">Versioon PHP 2</a> by MiamiBC (kõige lihtsam ja arusaadavam)<br />
<a href="/misc/isikukood/PersonalCode.java">Java version</a> by Incubo<br />
Minu <a href="/misc/isikukood/isikukood.rb">versioon</a> Ruby keeles<br />
<a href="http://www.appelsiini.net">Mika Tuupola</a> <a href="http://www.appelsiini.net/2009/9/verify-estonian-isikukood-with-javascript">versioon</a> JavaScript</p>
<p>Kui sul on mingi teine versioon siis saada mulle ka <img src='http://www.dmitri.me/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/isikukood-valideerimine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Notify bar</title>
		<link>http://www.dmitri.me/blog/notify-bar/</link>
		<comments>http://www.dmitri.me/blog/notify-bar/#comments</comments>
		<pubDate>Wed, 27 May 2009 10:11:47 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[notify]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=245</guid>
		<description><![CDATA[&#8216;Notify Bar&#8217; plugin

      Simple plugin (basically it&#8217;s not a plugin, but widget) to show notify bar
      (like on Twitter&#8217;s webpage).
      It&#8217;s very simple to use:
    

      
$(function () {
  $.notifyBar({
  [...]]]></description>
			<content:encoded><![CDATA[<h1>&#8216;Notify Bar&#8217; plugin</h1>
<p>
      Simple plugin (basically it&#8217;s not a plugin, but widget) to show notify bar<br />
      (like on Twitter&#8217;s webpage).<br />
      It&#8217;s very simple to use:
    </p>
<pre>
      <code>
$(function () {
  $.notifyBar({
    html: "Thank you, your settings were updated!",
    delay: 2000,
    animationSpeed: "normal"
  });
});
      </code>
    </pre>
<p>    and to your html page stylesheet:</p>
<pre>
<code>&lt;link rel="stylesheet" href="jquery.notifyBar.css" type="text/css" media="screen"  /&gt;</code>
</pre>
<h3>$.notifyBar can pass next parameters:</h3>
<table border="1">
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Type</th>
<th>Default</th>
</tr>
<tr>
<td>html</td>
<td>What text will be inside bar, can be HTML</td>
<td>String [optional]</td>
<td>&#8220;Your message here&#8221;</td>
</tr>
<tr>
<td>delay</td>
<td>How long bar will be delayed, doesn&#8217;t count animation time.</td>
<td>Integer [optional]</td>
<td>2000</td>
</tr>
<tr>
<td>animationSpeed</td>
<td>How long this bar will be slided up and down</td>
<td>String | Integer [optional]</td>
<td>&#8220;normal&#8221;</td>
</tr>
<tr>
<td>jqObject</td>
<td>Own jquery object for notify bar</td>
<td>jQuery object [optional]</td>
<td>null</td>
</tr>
<tr>
<td>cls</td>
<td>You can set own CSS class for &#8216;Notify bar&#8217;. There is too premade clasess &#8220;error&#8221; and &#8220;success&#8221;</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>close</td>
<td>If set to true close button will be displayed</td>
<td>Boolean</td>
<td>false</td>
</tr>
</table>
<p><a href="/misc/notify/">See demonstration</a> or <a href="http://github.com/dknight/jQuery-Notify-bar">download source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/notify-bar/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Plugin &#8216;Minify&#8217; for Frog CMS</title>
		<link>http://www.dmitri.me/blog/plugin-minify-for-frog-cms/</link>
		<comments>http://www.dmitri.me/blog/plugin-minify-for-frog-cms/#comments</comments>
		<pubDate>Wed, 20 May 2009 09:25:46 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[frog cms]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=235</guid>
		<description><![CDATA[About Minify
&#8216;Minify&#8217; is a plugin to minify JavaScript and/or CSS code and combine it
into one file on the fly. This will increase performance of website.
So you don&#8217;t need to do dozens HTTP request for every JavaScript or CSS file.
Minify plugin is more useful and faster with Funky cache plugin.

Usage
Install the minify plugin to your Frog [...]]]></description>
			<content:encoded><![CDATA[<h1>About Minify</h1>
<p>&#8216;Minify&#8217; is a plugin to minify JavaScript and/or CSS code and combine it<br />
into one file on the fly. This will increase performance of website.<br />
So you don&#8217;t need to do dozens HTTP request for every JavaScript or CSS file.<br />
Minify plugin is more useful and faster with <a href="http://www.appelsiini.net/projects/funky_cache">Funky cache</a> plugin.</p>
<p><span id="more-235"></span></p>
<h1>Usage</h1>
<p>Install the minify plugin to your Frog CMS plugins directory:</p>
<pre><code>
$cd /path/to/frog/plugins/
$git clone git://github.com/dknight/minify.git
</code></pre>
<h3>Activate minify plugin</h3>
<p><img src="http://www.dmitri.me/misc/minify.png" alt="" /></p>
<h3>Set the settings</h3>
<p>So next step you need to create &#8216;cache&#8217; directory in your document root and make it<br />
writable. Due to security settings most webservers doesn&#8217;t allow you to create<br />
directories dynamically, so you need to create it manually. Create it in your DOCUMENT_ROOT/cache/ and set writtable permissions.</p>
<pre><code>
$mkdir /website/root/cache/
$chmod 0666 /website/root/cache/
</code></pre>
<h3>Usage in Frog CMS</h3>
<pre><code>
&lt;?php
$jsFiles = array(
    '/public/javascripts/jquery-1.3.2.min.js',
    '/public/javascripts/jquery.validate.min.js',
    '/public/javascripts/jquery.form.js',
    '/public/javascripts/frog.js'
);
$cssFiles = array(
    'path/to/master.css',
    'path/to/subpage.css',
    'path/to/ie-fix.css'
);

$js_minify  = Minify::factory('js');
$css_minify = Minify::factory('css');
?&gt;
</code></pre>
<p>HTML:</p>
<pre><code>

...
&lt;link href="&lt;?php echo $css_minify-&gt;minify($cssFiles, true); ?&gt;" rel="stylesheet" type="text/css" /&gt;
...
&lt;script type="text/javascript" src="&lt;?php echo $js_minify-&gt;minify($files, true); ?&gt;"&gt;&lt;/script&gt;
...

</code></pre>
<p>The &#8216;minify&#8217; method can pass 3 parameters:</p>
<table border="1">
<tbody>
<tr>
<th>name</th>
<th>description</th>
<th>type</th>
<th>default</th>
</tr>
<tr>
<td>files</td>
<td>File to be minified</td>
<td>array [required]</td>
<td>array()</td>
</tr>
<tr>
<td>output</td>
<td>Output to file or raw output into string</td>
<td>boolean [optional]</td>
<td>false</td>
</tr>
<tr>
<td>fileName</td>
<td>Name of output file</td>
<td>string [optional]</td>
<td>&#8216;min.js&#8217; or &#8216;min.css&#8217;</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/plugin-minify-for-frog-cms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE session bug is solved</title>
		<link>http://www.dmitri.me/blog/ie-session-bug-is-solved/</link>
		<comments>http://www.dmitri.me/blog/ie-session-bug-is-solved/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 09:07:40 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[IE bug]]></category>
		<category><![CDATA[stupid microsoft]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=207</guid>
		<description><![CDATA[IE has bug which deletes session data and brakes functionality of website. In other browsers all is working fine.
Here is example in PHP:

&#60;?php
print_r($_SESSION);
//output:
//Array ()
?&#62;

After half day of breaking brain and Google really fantastic solution for this problem, but no one of them didn&#8217;t solved our problem. So Mika found that if markup have empty src [...]]]></description>
			<content:encoded><![CDATA[<p>IE has bug which deletes session data and brakes functionality of website. In other browsers all is working fine.<br />
Here is example in PHP:<br />
<code><br />
&lt;?php<br />
print_r($_SESSION);<br />
//output:<br />
//Array ()<br />
?&gt;<br />
</code></p>
<p>After half day of breaking brain and Google really fantastic solution for this problem, but no one of them didn&#8217;t solved our problem. So <a href="http://www.appelsiini.net">Mika</a> found that if markup have empty <strong>src</strong> attribute, IE makes an empty request which breaks session data. So solution is simple check if there any empty <strong>src</strong> attributes and <strong>hrefs</strong> in link tag.</p>
<p>Was:<br />
&lt;img <span style="color:red">src=&quot;&quot;</span> alt=&quot;An image&quot; id=&quot;img&quot; /&gt;</p>
<p>You need to remove this empty attribute or if you don&#8217;t need this for javascript remove <strong>IMG</strong> tag at all.<br />
&lt;img <span style="color:#ccc;text-decoration:line-through;">src=&quot;&quot;</span> alt=&quot;An image&quot; id=&quot;img&quot; /&gt;</p>
<p>That&#8217;s really stupid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/ie-session-bug-is-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Official Estonian currency rates with PHP</title>
		<link>http://www.dmitri.me/blog/estonian-currency-rates-php/</link>
		<comments>http://www.dmitri.me/blog/estonian-currency-rates-php/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 11:35:21 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wrong world]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=164</guid>
		<description><![CDATA[I had a bit free time today and I have written a PHP class which gets the official rates for Estonian crown. This class will be useful for internet shops or any other commercial organizations who need to keep their courses fresh.
You can download or check source. This stuff is really simple as hell, anyway [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bit free time today and I have written a PHP class which gets the official rates for Estonian crown. This class will be useful for internet shops or any other commercial organizations who need to keep their courses fresh.</p>
<p>You can <a href="/misc/rates/Eesti-Money_Rates.zip">download</a> or <a href="/misc/rates/Money/Rates.phps">check source</a>. This stuff is really simple as hell, anyway there is a small documentation inside archive.<br />
<span id="more-164"></span></p>
<h3>Here you can see the most fresh Estonian currency rates</h3>
<p><iframe src="/misc/rates/fresh-rates.php" width="302px" height="1400px" frameborder="0" scrolling="no">Update your browser!</iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/estonian-currency-rates-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why Obama has won?</title>
		<link>http://www.dmitri.me/blog/why-obama-wins/</link>
		<comments>http://www.dmitri.me/blog/why-obama-wins/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 08:52:53 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[politycs]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=148</guid>
		<description><![CDATA[New US. president Barack Obama wins elections because his site is written on PHP, but John McCain has ASP.NET site, so they are:
Obama vs McCain.
  
]]></description>
			<content:encoded><![CDATA[<p>New US. president Barack Obama wins elections because his site is written on PHP, but John McCain has ASP.NET site, so they are:</p>
<p><a href="http://my.barackobama.com/page/user/login?successurl[]=">Obama</a> vs <a href="http://www.johnmccain.com/Informing/News/PressReleases/Read.aspx ">McCain</a>.</p>
<p> <img src='http://www.dmitri.me/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/why-obama-wins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
