<?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>Web development blog &#187; php</title>
	<atom:link href="http://simplemediacode.info/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://simplemediacode.info</link>
	<description>by Simple Media Code</description>
	<lastBuildDate>Wed, 09 May 2012 12:19:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Optimize WordPress theme stylesheet inclusion</title>
		<link>http://simplemediacode.info/optimize-wordpress-theme-stylesheet-inclusion/</link>
		<comments>http://simplemediacode.info/optimize-wordpress-theme-stylesheet-inclusion/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 09:41:34 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[WordPress themes]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web page optimization]]></category>
		<category><![CDATA[Websites optimization]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=659</guid>
		<description><![CDATA[Yesterday I was workin on latest project, where I needed to include WordPress Child theme's stylesheet in blog. Following good practise I wanted to escape from using @import in my style.css. By fast research and tests, found way how to optimize that inclusion....]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was workin on latest project, where I needed to include WordPress Child theme&#8217;s stylesheet in blog. Following good practise I wanted to escape from using <em>@import</em> in my style.css. By fast research and tests, found way how to optimize that inclusion (code snippet here: <strong><a title="New way to include WordPress Theme Stylesheet in 2012" href="http://simplemediacode.info/snippets/new-way-to-include-wordpress-theme-stylesheet-in-2012/">New way to include WordPress Theme Stylesheet in 2012</a></strong>).</p>
<p>Today @konstruktors shared link to latest WordPress default theme <em>TwentyTwelve</em>, where style.css is included same way.</p>
<p>I still see space for optimize my code, but nice to see that I am going same way as future release of WordPress Theme.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/optimize-wordpress-theme-stylesheet-inclusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mini-optimization of statistics / analytics counters on your web page</title>
		<link>http://simplemediacode.info/mini-optimization-of-statistics-analytics-counters-on-your-web-page/</link>
		<comments>http://simplemediacode.info/mini-optimization-of-statistics-analytics-counters-on-your-web-page/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 13:34:20 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[Coding web page]]></category>
		<category><![CDATA[analytics code]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Quantcast]]></category>
		<category><![CDATA[StatCounter.com]]></category>
		<category><![CDATA[web page optimization]]></category>
		<category><![CDATA[Websites optimization]]></category>
		<category><![CDATA[yandex]]></category>
		<category><![CDATA[Yandex Metrika]]></category>
		<category><![CDATA[yandex.ru]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=287</guid>
		<description><![CDATA[Today working on site optimization, made small javascript optimization for several counters on website. Problem: You are using 2-4 statistic counters on Your page. Most of them are using javascript and for noscript mode image (GIF). Solution: Split them and ...]]></description>
			<content:encoded><![CDATA[<p>Today working on site optimization, made small javascript optimization for several counters on website.</p>
<p><strong>Problem</strong>: You are using 2-4 statistic counters on Your page. Most of them are using <em>javascript</em> and for <em><span style="text-decoration: underline;">noscript</span> mode</em> image (GIF).</p>
<p><strong>Solution</strong>: Split them and then merge <img src='http://simplemediacode.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Micro optimization for analytics counters</h2>
<p>Most of codes on my site were with one <span style="text-decoration: underline;">inline</span> javascript code, code from counter&#8217;s site and <em>noscript</em> solution.</p>
<h3>Spliting inline javascript counter code</h3>
<p>First You need to examine all statistics codes, because some have some id before included javascript (like <em>Google Analytics</em>, <em>StatCounter.com</em> or <em>Quantcast</em>) and some after (<em>Yandex</em>). So what we need is take all inline javascripts and put them inside <strong><em>&lt;script&gt;</em></strong> tags, them links put all external janasvripts and then again inline javascript for counters, which use inline script after external javascript.</p>
<p>Here is mine for <a title="Web development, WordPress blog customization, PSD to HTML" href="http://simplemediacode.com">SimpleMediaCode.com</a>:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-799" title="optimize javasacript counters" src="http://simplemediacode.info/files/2010/09/optimize-javasacript-counters.png" alt="optimize javasacript counters" width="590" height="230" /></p>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/mini-optimization-of-statistics-analytics-counters-on-your-web-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Removing WWW from URI (or domain) with PHP</title>
		<link>http://simplemediacode.info/removing-www-from-uri-or-domain-with-php/</link>
		<comments>http://simplemediacode.info/removing-www-from-uri-or-domain-with-php/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 13:40:13 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[Coding web page]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[duplicate content]]></category>
		<category><![CDATA[non-www site]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[www prefix]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=136</guid>
		<description><![CDATA[Few weeks ago I wrote how to remove WWW from domain with .htaccess. In some cases or hosting plans it's not possible to view or use .htaccess file (e.g. some low cost or free hosting providers). Solution is PHP code which redirects all www requests to non www page....]]></description>
			<content:encoded><![CDATA[<p>Few weeks ago I wrote <strong><a title="how to remove WWW from domain with .htaccess" href="http://mediabox.lv/en/remove-www-from-domain-with-htaccess/">how to remove WWW from domain with .htaccess</a></strong>. In some cases or hosting plans it&#8217;s not possible to view or use .htaccess file (e.g. some low cost or free hosting providers).</p>
<p><strong>Solution is PHP code</strong> which redirects all www requests to non www page. Since You are (should) use some general configuration or header file in Your web application, you can include this PHP code (very top of php page):</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php // Removing WWW from URI with PHP http://simplemediacode.info/?p=136
if ('mediabox.lv' !== $_SERVER['HTTP_HOST']) {
header('Location: http://mediabox.lv' . $_SERVER['REQUEST_URI'], null, 301);
}
?&gt;
</pre>
<p>It use build-in <a href="http://php.net/manual/en/function.header.php">PHP header() function</a> to redirect all requests to another page, in this case: non-www domain.</p>
<p>Simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/removing-www-from-uri-or-domain-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Final cut for my first WordPress plugin</title>
		<link>http://simplemediacode.info/final-cut-for-my-first-wordpress-plugin/</link>
		<comments>http://simplemediacode.info/final-cut-for-my-first-wordpress-plugin/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:17:37 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[Facebook.com applications and pages]]></category>
		<category><![CDATA[Social network applications and plugins]]></category>
		<category><![CDATA[WordPress plugins and widgets]]></category>
		<category><![CDATA[draugiem.lv]]></category>
		<category><![CDATA[Extending Social networks]]></category>
		<category><![CDATA[FaceBook.com application]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WordPress plugin]]></category>
		<category><![CDATA[WordPress widget]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=112</guid>
		<description><![CDATA[More than one month ago I published my first WordPress plugin "Draugiem.lv/lapas fan page" for social network in Latvia draugiem.lv (FRYPE.COM). And now I want to make final cut with version 1.0 (0.1.5) and upgrade it....]]></description>
			<content:encoded><![CDATA[<p>More than one month ago I published my first WordPress plugin &#8220;<a title="Draugiem.lv/lapas Fan page, WordPress Plugin on MediaBox.lv" href="http://mediabox.lv/en/wordpress-plugins/draugiem-lv-lapas-fan-page/">Draugiem.lv/lapas fan page</a>&#8221; for social network in Latvia draugiem.lv (FRYPE.COM). And now I want to make final cut with version 1.0 (0.1.5) and upgrade it.</p>
<p>For now on my To-Do list:</p>
<ol>
<li>make for widget separate administration page,</li>
<li>rewrite <strong>JSON </strong>parsing script from <strong>Javascript </strong>to <strong>PHP</strong>,</li>
<li>and remove counter* and make it optional.</li>
</ol>
<p>*counter reads ONLY clicks on profile and page links, nothing more</p>
<h2>Next on list</h2>
<p>An <strong>FaceBook.com application for pages and profiles</strong>. Now testing.</p>
<p>Download page for WordPress plugin on WordPress.org <a title="Draugiem.lv/lapas Fan page, WordPress Plugins" href="http://wordpress.org/extend/plugins/draugiemlvlapas-fan-page/">http://wordpress.org/extend/plugins/draugiemlvlapas-fan-page/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/final-cut-for-my-first-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing first public WordPress Plugin (widget)</title>
		<link>http://simplemediacode.info/writing-first-public-wordpress-plugin-widget/</link>
		<comments>http://simplemediacode.info/writing-first-public-wordpress-plugin-widget/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 14:08:13 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress plugins and widgets]]></category>
		<category><![CDATA[draugiem.lv]]></category>
		<category><![CDATA[frype]]></category>
		<category><![CDATA[Frype.com]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WordPress plugin]]></category>
		<category><![CDATA[WordPress widget]]></category>
		<category><![CDATA[WPMU]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=70</guid>
		<description><![CDATA[Today was first release of  "Draugiem.lv/lapas Fan page" (for non-Latvian draugiem.lv best known as Frype.com) WordPress sidebar widget for FRYPE business pages....]]></description>
			<content:encoded><![CDATA[<p>Today was first release of  &#8220;<strong><a title="Draugiem.lv/lapas Fan page, WordPress Plugins" href="http://wordpress.org/extend/plugins/draugiemlvlapas-fan-page/">Draugiem.lv/lapas Fan page</a></strong>&#8221; (for non-Latvian <em>draugiem.lv</em> best known as <a title="FRYPE" href="http://frype.com"><strong>Frype.com</strong></a>) WordPress sidebar widget for FRYPE business pages.</p>
<h2>About &#8220;<a title="Draugiem.lv/lapas Fan page, WordPress Plugins" href="http://mediabox.lv/en/wordpress-plugins/draugiem-lv-lapas-fan-page/">Draugiem.lv/lapas Fan page</a>&#8221; WordPress widget</h2>
<blockquote>
<p style="text-align: left;">This plugin makes it easy to add <strong>draugiem.lv/lapas (frype.com) fan page</strong> to sidebar of WordPress blog.</p>
</blockquote>
<p>Widget <strong>features</strong>: (<a title="Draugiem.lv/lapas Fan page, WordPress Plugins" href="http://mediabox.lv/en/wordpress-plugins/draugiem-lv-lapas-fan-page/">http://mediabox.lv/en/wordpress-plugins/draugiem-lv-lapas-fan-page/</a>)</p>
<ol>
<li>customizable <strong>widget title</strong>,</li>
<li>customizable <strong>width</strong> (included recommended widths from frype.com),</li>
<li>customizable <strong>user count</strong> in sidebar or possibility turn visibility off,</li>
<li>changeable fan pages URL (e.g. http://draugiem.lv/<strong>umbrovskiscom</strong>),</li>
<li><strong>In Your language</strong>. By default included <span style="text-decoration: underline;">Latvian</span> and <span style="text-decoration: underline;">English</span>.</li>
</ol>
<p>This plugin is mainly written for Latvians <img src='http://simplemediacode.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a title="Draugiem.lv/lapas Fanu lapa WordPress spraudnis" href="http://mediabox.lv/blog/wordpress/spraudni/draugiem-lv-lapas-fanu-lapa/">http://mediabox.lv/blog/wordpress/spraudni/draugiem-lv-lapas-fanu-lapa/</a></p>
<h2>Changelog</h2>
<ul>
<li>0.1.3 (test for upcoming 0.2) Custom CSS</li>
<li>0.1.1 &amp; 0.1.2 code clean up</li>
<li>0.1 initial release</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/writing-first-public-wordpress-plugin-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add Google Buzz button to WordPress and Blogger</title>
		<link>http://simplemediacode.info/how-to-add-google-buzz-button-to-wordpress-and-blogger/</link>
		<comments>http://simplemediacode.info/how-to-add-google-buzz-button-to-wordpress-and-blogger/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 11:49:34 +0000</pubDate>
		<dc:creator>umbrovskis</dc:creator>
				<category><![CDATA[Coding web page]]></category>
		<category><![CDATA[Blogger addons]]></category>
		<category><![CDATA[blogspot.com tip]]></category>
		<category><![CDATA[Google Buzz]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://simplemediacode.info/?p=30</guid>
		<description><![CDATA[Already some days are working Google Buzz. I made short search on Google for possibility to add Google Buzz button to Blogger template. As I didn't find it on first page, I decide to rewrite some of previous Blogspot template code, which I made earlier. And for WordPress blogs too......]]></description>
			<content:encoded><![CDATA[<p>Already some days are working Google Buzz. I made short search on Google for possibility to add Google Buzz button to Blogger template. As I didn&#8217;t find it on first page, I decide to rewrite some of previous Blogspot template code, which I made earlier.</p>
<p><img class="aligncenter size-full wp-image-804" title="google buzz logo" src="http://simplemediacode.info/files/2010/02/google-buzz-logo.png" alt="google buzz logo" width="286" height="68" /></p>
<p style="text-align: center;">
<p>So here it is: (live example: <a title="add Google Buzz button to Blogger template" href="http://mediabox4b.blogspot.com/2010/02/google-buzz-button-in-blogspot-blogger.html">http://mediabox4b.blogspot.com</a>)</p>
<pre class="brush: xml; title: ; notranslate">&lt;a expr:href='&amp;&quot;http://www.google.com/reader/link?url=&amp;quot; + data:post.url + &amp;quot;&amp;amp;title=&amp;&quot; + data:post.title + &amp;quot;&amp;amp;srcTitle=&amp;quot; + data:blog.title+ &amp;quot;&amp;amp;srcURL=&amp;quot; + data:blog.homepageUrl ' rel='nofollow' target='_blank'&gt;+add to Google Buzz&lt;/a&gt;</pre>
<p>put it near data:post.body</p>
<blockquote><p>Made with <a title="Web development, WordPress  freelancer, Blogger templates" href="http://mediabox.lv">MediaBox.lv</a> / <a title="Rolands Umbrovskis" href="http://umbrovskis.com/">Umbrovskis.com</a></p></blockquote>
<p>Where<br />
<strong>url=data:post.url</strong> – post URI,<br />
<strong>title=data:post.title</strong> – post title,<br />
<strong>srcTitle=data:blog.title</strong> – post source, You may also use data:blog.homepageUrl,<br />
<strong>srcURL=data:blog.homepageUrl</strong> – source home page.</p>
<p>And Google Buzz button for WordPress blogs:</p>
<pre class="brush: php; title: ; notranslate">
&lt;a href=&quot;http://www.google.com/reader/link?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;srcTitle=&lt;?php bloginfo('url'); ?&gt;&amp;srcURL=&lt;?php bloginfo('url'); ?&gt;&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;+add to Google Buzz&lt;/a&gt;
</pre>
<p>Put this <span style="text-decoration: underline;">inside</span> <strong>WordPress post loop</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplemediacode.info/how-to-add-google-buzz-button-to-wordpress-and-blogger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

