<?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>Kailash Yadav</title>
	<atom:link href="http://www.kailashyadav.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kailashyadav.com</link>
	<description>Just another script samurai !!</description>
	<lastBuildDate>Wed, 18 May 2011 11:52:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Refresh Magento Cache Programmatically</title>
		<link>http://www.kailashyadav.com/refresh-magento-cache-programmatically/</link>
		<comments>http://www.kailashyadav.com/refresh-magento-cache-programmatically/#comments</comments>
		<pubDate>Wed, 18 May 2011 11:51:35 +0000</pubDate>
		<dc:creator>Kailash Yadav</dc:creator>
				<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[magento inventory refersh]]></category>
		<category><![CDATA[magento programatically]]></category>
		<category><![CDATA[refresh magento]]></category>
		<category><![CDATA[refresh programmatically]]></category>

		<guid isPermaLink="false">http://www.kailashyadav.com/?p=79</guid>
		<description><![CDATA[When writing processes to automate some of Magento’s normally laborious tasks, perhaps for a product-import script, a mass attribute update script, category import, or inventory adjustment, keep in mind that you may have to refresh some kind of cache — especially when working with attributes. If you are encountering quirks or inconsistencies with your data, [...]]]></description>
			<content:encoded><![CDATA[<p>When writing processes to automate some of Magento’s normally laborious tasks, perhaps for a product-import script, a mass attribute update script, category import, or inventory adjustment, keep in mind that you may have to refresh some kind of cache — especially when working with attributes. If you are encountering quirks or inconsistencies with your data, try these:</p>
<ul>
<li> Rebuild Catalog Index <code lang="php[notools]">Mage::getSingleton('catalog/index')->rebuild();</code></li>
</ul>
<ul>
<li>Rebuild Flat Catalog Product <code lang="php[notools]">Mage::getResourceModel('catalog/product_flat_indexer')->rebuild();</code></li>
</ul>
<ul>
<li>Inventory Stock <code lang="php[notools]">Mage::getSingleton('cataloginventory/stock_status')->rebuild()</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kailashyadav.com/refresh-magento-cache-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular expression for HTML tags in string</title>
		<link>http://www.kailashyadav.com/regular-expression-for-html-tags-in-string/</link>
		<comments>http://www.kailashyadav.com/regular-expression-for-html-tags-in-string/#comments</comments>
		<pubDate>Mon, 16 May 2011 06:55:45 +0000</pubDate>
		<dc:creator>Kailash Yadav</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[HTML Tag regex]]></category>
		<category><![CDATA[HTML tag regular expression]]></category>
		<category><![CDATA[regular expression]]></category>
		<category><![CDATA[regular expression for HTML tag]]></category>
		<category><![CDATA[string between HTML tags]]></category>

		<guid isPermaLink="false">http://www.kailashyadav.com/?p=58</guid>
		<description><![CDATA[Here is one of most powerful and used regular expression which was used by every developer once in their life for sure. How to select content or string inside a HTML tag using regular expression in all languages. I am sharing this regular expression with you. This regular expression is useful when you fetching content [...]]]></description>
			<content:encoded><![CDATA[<p>Here is one of most powerful and used regular expression which was used by every developer once in their life for sure.</p>
<p>How to select content or string inside a HTML tag using regular expression in all languages.</p>
<p>I am sharing this regular expression with you. This regular expression is useful when you fetching content from Other Website using cURL.<br />
<code lang="php"><?php {<'.$tag.'[^>]*>(.*?)</'.$tag.'>} ?></code><br/>
</p>
<p>
Here is one small example:<br />
<code lang="php[lines]"><?php<br />
//Example to get text inside given tag<br />
$content = file_get_contents("http://www.example.com");<br />
$tag= 'h1'; //we will extract page heading</p>
<p>preg_match("{<'.$tag.'[^>]*>(.*?)</'.$tag.'>}", $content, $match);<br />
$data = $match[0];<br />
echo $data;<br />
?></code></p>
<p>Note: This only returns text(string or HTML) inside the Tag you have given. It doesn&#8217;t include that tag.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kailashyadav.com/regular-expression-for-html-tags-in-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Sitemap Generator for WordPress</title>
		<link>http://www.kailashyadav.com/google-sitemap-generator-for-wordpress/</link>
		<comments>http://www.kailashyadav.com/google-sitemap-generator-for-wordpress/#comments</comments>
		<pubDate>Mon, 09 May 2011 11:26:21 +0000</pubDate>
		<dc:creator>Kailash Yadav</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[google sitemap]]></category>
		<category><![CDATA[sitemap xml]]></category>
		<category><![CDATA[wordpress google sitemap]]></category>
		<category><![CDATA[wordpress sitemap]]></category>
		<category><![CDATA[wordpress sitemap generator]]></category>

		<guid isPermaLink="false">http://www.kailashyadav.com/?p=47</guid>
		<description><![CDATA[While submitting my website to different search engine the first requirement is Sitemap.xml. As i was using wordpress to run my website. How to build dynamic sitemap xml i came accross this very fine plugin. http://wordpress.org/extend/plugins/google-sitemap-generator/ This plugin will generate a special XML sitemap which will help search engines like Google, Bing, Yahoo and Ask.com [...]]]></description>
			<content:encoded><![CDATA[<p>While submitting my website to different search engine the first requirement is Sitemap.xml. As i was using wordpress to run my website. How to build dynamic sitemap xml i came accross this very fine plugin.</p>
<p><a href="http://wordpress.org/extend/plugins/google-sitemap-generator/">http://wordpress.org/extend/plugins/google-sitemap-generator/</a></p>
<p>This plugin will generate a special XML sitemap which will help search engines like Google, Bing, Yahoo and Ask.com to better index your blog. With such a sitemap, it&#8217;s much easier for the crawlers to see the complete structure of your site and retrieve it more efficiently. The plugin supports all kinds of WordPress generated pages as well as custom URLs. Additionally it notifies all major search engines every time you create a post about the new content.</p>
<h4>Features:</h4>
<ul>
<li><strong>Available for all WordPress versions since 1.5</strong></li>
<li>No PHP skills or file changes needed</li>
<li>User interface to customize all parameters like priorities etc.</li>
<li>Available in many languages</li>
<li>Generates automatically a sitemap for all types of WordPress pages</li>
<li>Calculates a priority for each post, based on the number of comments</li>
<li>Notifies Ask.com, Google, Bing and YAHOO about changes via ping</li>
<li>Includes a WordPress filter for other plugins which can add their pages to the sitemap</li>
<li>Generates a static XML file as well as a zipped version</li>
<li>…and many more!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kailashyadav.com/google-sitemap-generator-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Fatal error: Call to a member function toHtml() on a non-object in …/Layout.php on line 529</title>
		<link>http://www.kailashyadav.com/php-fatal-error-call-to-a-member-function-tohtml-on-a-non-object-in-%e2%80%a6layout-php-on-line-529/</link>
		<comments>http://www.kailashyadav.com/php-fatal-error-call-to-a-member-function-tohtml-on-a-non-object-in-%e2%80%a6layout-php-on-line-529/#comments</comments>
		<pubDate>Fri, 06 May 2011 05:15:59 +0000</pubDate>
		<dc:creator>Kailash Yadav</dc:creator>
				<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[fatal error]]></category>
		<category><![CDATA[layout.php]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[magento 1.4]]></category>
		<category><![CDATA[magento themes]]></category>
		<category><![CDATA[toHTML]]></category>

		<guid isPermaLink="false">http://www.kailashyadav.com/?p=37</guid>
		<description><![CDATA[If you’ve just upgraded your Magento Commerce site to the 1.4.x release from a 1.3.x release or you using old theme on magneto 1.4.x + , and you forgot to change the theme/template to the default one before you performed the upgrade, you’ll probably end up with a blank white screen. If we look at [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve just upgraded your Magento Commerce site to the 1.4.x release from a 1.3.x release or you using old theme on magneto 1.4.x + , and you forgot to change the theme/template to the default one before you performed the upgrade, you’ll probably end up with a blank white screen.</p>
<p>If we look at line 529 of the “Layout.php” file we can see that it’s itterating over several objects ($this-&gt;_output) and producing a coalesced output which can then be displayed on the screen.<br />
<code></p>
<pre lang="php">/**
* Get all blocks marked for output
*
* @return string
*/
public function getOutput()
{
$out = '';
if (!empty($this->_output)) {
foreach ($this->_output as $callback) {
$out .= $this->getBlock($callback[0])->$callback[1]();
}
}

return $out;
}</pre>
<p></code></p>
<p>In 1.4.x Magento overhauled the templates and themes code so your 1.3.x template/theme isn’t going to work in a 1.4.x environment without some re-coding.  To get over this particular problem, find and edit the ‘page.xml’ file in your template/theme directory.  It should be in ./app/design/frontend/default/{your_theme}/layout/page.xml</p>
<p>Change the line<br />
&lt;block type=”core/profiler” output=”toHtml”/&gt;</p>
<p>to<br />
&lt;block type=”core/profiler” output=”toHtml” name=”core_profiler”/&gt;</p>
<p>Clear the cache directory using “rm -rf magento/var/cache/*” or using admin panel configuration &gt; cache management and refresh your page.  All being well your site should spring back in to life.</p>
<p>If this didn’t work for you, or your template/theme directory doesn’t have a local copy of the ‘page.xml’ file, look at the default files and ensure that they were updated when you upgraded Magento.  You’ll find the files in:</p>
<p>./app/design/frontend/default/default/layout/page.xml<br />
./app/design/frontend/default/modern/layout/page.xml<br />
./app/design/frontend/base/default/layout/page.xml</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kailashyadav.com/php-fatal-error-call-to-a-member-function-tohtml-on-a-non-object-in-%e2%80%a6layout-php-on-line-529/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting a variable in .htaccess</title>
		<link>http://www.kailashyadav.com/setting-a-variable-in-htaccess/</link>
		<comments>http://www.kailashyadav.com/setting-a-variable-in-htaccess/#comments</comments>
		<pubDate>Tue, 03 May 2011 09:04:24 +0000</pubDate>
		<dc:creator>Kailash Yadav</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[constant]]></category>
		<category><![CDATA[constant in .htaccess]]></category>
		<category><![CDATA[variable]]></category>

		<guid isPermaLink="false">http://www.kailashyadav.com/?p=32</guid>
		<description><![CDATA[I don’t know how useful it will be for you but still I’m sharing this information with you all. How to set a variable in .htaccess file which you have to write so many times and it changes when it goes to development and then on production as well. In my case, I have a [...]]]></description>
			<content:encoded><![CDATA[<p>I don’t know how useful it will be for you but still I’m sharing this information with you all.</p>
<p>How to set a variable in .htaccess file which you have to write so many times and it changes when it goes to development and then on production as well.</p>
<p>In my case,</p>
<p>I have a domain http://abc.example.com which needs to be redirected to http://www.xyz.com/</p>
<p>So my Rules are<br />
<code lang="apache"><br />
RewriteRule ^secu/?$ http://www.xyz.com/security/ [L,R=301]<br />
RewriteRule ^secu/archives.php/(.*)$ http://www.xyz.com/security/archive/$1 [L,R=301]</p>
<p>RewriteRule ^cnews/?$ http://www.xyz.com/news/ [L,R=301]<br />
RewriteRule ^cnews/archives.php/(.*)$ http://www.xyz.com/news/archive/$1 [L,R=301]</p>
<p>#Setting Variable for Host Name as per the Development Environment</p>
<p>RewriteCond %{HTTP_HOST} ^abc.example.local.com$ [NC]<br />
RewriteRule .* - [E=host_name:xyz.local.com]</p>
<p>RewriteCond %{HTTP_HOST} ^iabc.example.com$ [NC]<br />
RewriteRule .* - [E=host_name:xyz.com]</p>
<p>RewriteRule ^secu/?$ http://%{ENV:host_name}/security/ [L,R=301]<br />
RewriteRule ^secu/archives.php/(.*)$ http://%{ENV:host_name}/security/archive/$1 [L,R=301]</p>
<p>RewriteRule ^cnews/?$ http://%{ENV:host_name}/news/ [L,R=301]<br />
RewriteRule ^cnews/archives.php/(.*)$ http://%{ENV:host_name}/news/archive/$1 [L,R=301]</p>
<p></code><br />
As you can see in above example, now you don’t have to worry which environment you are working your rules will always work.</p>
<p>You can also set the variable without any condition and access it directly as mentioned below.<br />
<code lang="apache"><br />
RewriteRule .* - [E=foo:bar]</p>
<p>%{ENV:foo}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kailashyadav.com/setting-a-variable-in-htaccess/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Defer Banner Ads or JavaScript To Load After Page Loads</title>
		<link>http://www.kailashyadav.com/defer-banner-ads-or-javascript-to-load-after-page-loads/</link>
		<comments>http://www.kailashyadav.com/defer-banner-ads-or-javascript-to-load-after-page-loads/#comments</comments>
		<pubDate>Mon, 02 May 2011 18:09:10 +0000</pubDate>
		<dc:creator>Kailash Yadav</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[ads after page load]]></category>
		<category><![CDATA[defer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[load ads]]></category>

		<guid isPermaLink="false">http://www.kailashyadav.com/?p=16</guid>
		<description><![CDATA[There are many times when you might want a certain banner ad to load only after you page loads fully, however, not everyone is an expert in AJAX or JavaScript for that matter to make change code and make the code efficient. If you are a webmaster and have been worried about slow page load times, there is a [...]]]></description>
			<content:encoded><![CDATA[<p>There are many times when you might want a certain banner ad to load only after you page loads fully, however, not everyone is an expert in AJAX or JavaScript for that matter to make change code and make the code efficient.</p>
<p>If you are a webmaster and have been worried about slow page load times, there is a easier way to defer certain banners or JavaScript code to load after the browser has rendered the rest of the page. This trick can be used for both inline and external JavaScript by using the &#8220;defer&#8221; attribute specified in HTML 4.01 and later.</p>
<p>To defer banner ads or any JavaScript code to load after the entire page has rendered, just add the attribute<strong><em> defer=&#8221;defer&#8221; </em></strong>to the script tag and the browser will ignore the code within the script and load it after it has finished loading the rest of the content.</p>
<p>Here are some examples of using the defer attribute with a script:<br />
<code> </code></p>
<p><code></p>
<pre lang="javascript">//inline JS example
<script type="text/javascript" defer="defer"></script></pre>
<pre lang="javascript">//external JS example
<script src="somejs.js" type="text/javascript" defer="defer"></script></pre>
<p></code><br />
Using this trick will ensure that your non JavaScript content loads quickly enough so that it does not hinder a user’s browsing experience. However, it may not improve the overall page load times since the browser will continue to load the deferred JavaScript content after the rest of the page has loaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kailashyadav.com/defer-banner-ads-or-javascript-to-load-after-page-loads/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

