<?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>Sumit Bansal</title>
	<atom:link href="http://sumitbansal.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sumitbansal.com</link>
	<description>Complete Web, Software &#38; Computer Solutions</description>
	<lastBuildDate>Fri, 27 Jan 2012 09:16:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Calculate week in PHP</title>
		<link>http://sumitbansal.com/computer-related/calculate-week-in-php/</link>
		<comments>http://sumitbansal.com/computer-related/calculate-week-in-php/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 09:15:43 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Computer Related]]></category>
		<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Web Development Tips]]></category>
		<category><![CDATA[calculate week]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=485</guid>
		<description><![CDATA[Use this script to calculate a week in PHP &#60;?php $date = mktime(0, 0, 0, 01,27, 2011); $week = (int)date(&#8216;W&#8217;, $date); ?&#62;]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Use this script to calculate a week in PHP</p>
<blockquote><p>&lt;?php<br />
$date = mktime(0, 0, 0, 01,27, 2011);<br />
$week = (int)date(&#8216;W&#8217;, $date);<br />
?&gt;</p></blockquote>
<div class="shr-publisher-485"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fcalculate-week-in-php%2F' data-shr_title='Calculate+week+in+PHP'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fcalculate-week-in-php%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fcalculate-week-in-php%2F' data-shr_title='Calculate+week+in+PHP'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/computer-related/calculate-week-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove admin color scheme picker from profile</title>
		<link>http://sumitbansal.com/scripts/php-scripts/remove-admin-color-scheme-picker-from-profile/</link>
		<comments>http://sumitbansal.com/scripts/php-scripts/remove-admin-color-scheme-picker-from-profile/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 08:45:40 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[admin color scheme]]></category>
		<category><![CDATA[remove color picker]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=481</guid>
		<description><![CDATA[Add this script to the functions.php of your wordpress theme will remove the admin color scheme picker from the profile page. if(is_admin()){ remove_action(&#8220;admin_color_scheme_picker&#8221;, &#8220;admin_color_scheme_picker&#8221;); }]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Add this script to the functions.php of your wordpress theme will remove the admin color scheme picker from the profile page.</p>
<blockquote><p>if(is_admin()){<br />
remove_action(&#8220;admin_color_scheme_picker&#8221;, &#8220;admin_color_scheme_picker&#8221;);<br />
}</p></blockquote>
<div class="shr-publisher-481"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fphp-scripts%2Fremove-admin-color-scheme-picker-from-profile%2F' data-shr_title='Remove+admin+color+scheme+picker+from+profile'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fphp-scripts%2Fremove-admin-color-scheme-picker-from-profile%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fphp-scripts%2Fremove-admin-color-scheme-picker-from-profile%2F' data-shr_title='Remove+admin+color+scheme+picker+from+profile'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/scripts/php-scripts/remove-admin-color-scheme-picker-from-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check date if date is between two date</title>
		<link>http://sumitbansal.com/scripts/java-scripts/how-to-check-date-if-date-is-between-two-date/</link>
		<comments>http://sumitbansal.com/scripts/java-scripts/how-to-check-date-if-date-is-between-two-date/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 12:27:15 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Java Scripts]]></category>
		<category><![CDATA[Web Development Tips]]></category>
		<category><![CDATA[between two dates]]></category>
		<category><![CDATA[check date]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[javascript date]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=476</guid>
		<description><![CDATA[This function the return the true and false if date is exist or not exist. function dateWithin(StartDate,EndDate,CheckDate) { var b,e,c; s = Date.parse(StartDate); e = Date.parse(EndDate); c = Date.parse(CheckDate); if((c... <span class="meta-more"><a href="http://sumitbansal.com/scripts/java-scripts/how-to-check-date-if-date-is-between-two-date/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This function the return the true and false if date is exist or not exist.</p>
<blockquote><p>function dateWithin(StartDate,EndDate,CheckDate) {<br />
var b,e,c;<br />
s = Date.parse(StartDate);<br />
e = Date.parse(EndDate);<br />
c = Date.parse(CheckDate);<br />
if((c &lt;= e &amp;&amp; c &gt;= s)) {<br />
return true;<br />
}<br />
return false;<br />
}</p></blockquote>
<p>// This will alert &#8216;false&#8217;</p>
<blockquote><p>if(dateWithin(&#8217;12/20/2007&#8242;,&#8217;12/20/2007&#8242;,&#8217;12/20/2007&#8242;))<br />
alert(dateWithin(&#8217;12/20/2007&#8242;,&#8217;12/20/2007&#8242;,&#8217;12/20/2007&#8242;));</p></blockquote>
<div class="shr-publisher-476"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fjava-scripts%2Fhow-to-check-date-if-date-is-between-two-date%2F' data-shr_title='How+to+check+date+if+date+is+between+two+date'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fjava-scripts%2Fhow-to-check-date-if-date-is-between-two-date%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fjava-scripts%2Fhow-to-check-date-if-date-is-between-two-date%2F' data-shr_title='How+to+check+date+if+date+is+between+two+date'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/scripts/java-scripts/how-to-check-date-if-date-is-between-two-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix wordpress plugin profile pic error</title>
		<link>http://sumitbansal.com/computer-related/fix-wordpress-plugin-profile-pic-error/</link>
		<comments>http://sumitbansal.com/computer-related/fix-wordpress-plugin-profile-pic-error/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 12:51:41 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Computer Related]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=472</guid>
		<description><![CDATA[The error of the profile pic has been fix. The error was in the new version of wordpress is not upload the profile picture. Solution to resolve this problem Open... <span class="meta-more"><a href="http://sumitbansal.com/computer-related/fix-wordpress-plugin-profile-pic-error/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The error of the profile pic has been fix. The error was in the new version of wordpress is not upload the profile picture.</p>
<p><strong>Solution to resolve this problem</strong></p>
<ol>
<li>Open the profile pic plugin folder.</li>
<li>search &#8220;jQuery(&#8220;#your-profile&#8221;).attr(&#8216;encoding&#8217;,'multipart/form-data&#8217;);&#8221; this line.</li>
<li>Replace it with &#8220;jQuery(&#8220;#your-profile&#8221;).attr(&#8216;enctype&#8217;,'multipart/form-data&#8217;);&#8221; line.</li>
</ol>
<p>The second problem is when we upload the profile pic this shows an error on some server while uploading a pic.</p>
<p>add the <strong>ob_start();</strong> at the top of the page after starting the php.</p>
<p>After these changes the plugin works fine.</p>
<p>To download the new file <a title="Fix wordpress plugin profile pic error" href="http://sumitbansal.com/doc/profile-pic.zip">click here</a></p>
<p>&nbsp;</p>
<div class="shr-publisher-472"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Ffix-wordpress-plugin-profile-pic-error%2F' data-shr_title='Fix+wordpress+plugin+profile+pic+error'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Ffix-wordpress-plugin-profile-pic-error%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Ffix-wordpress-plugin-profile-pic-error%2F' data-shr_title='Fix+wordpress+plugin+profile+pic+error'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/computer-related/fix-wordpress-plugin-profile-pic-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a trailing slash to requested urls</title>
		<link>http://sumitbansal.com/computer-related/add-a-trailing-slash-to-requested-urls/</link>
		<comments>http://sumitbansal.com/computer-related/add-a-trailing-slash-to-requested-urls/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 07:32:46 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Computer Related]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[slash]]></category>
		<category><![CDATA[trailing]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=467</guid>
		<description><![CDATA[Without trailing slash URL shows URL count as a page and with trailing slash it&#8217;s count as directory. Search engine gives the high priority to directory in comparision of page.... <span class="meta-more"><a href="http://sumitbansal.com/computer-related/add-a-trailing-slash-to-requested-urls/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Without trailing slash URL shows URL count as a page and with trailing slash it&#8217;s count as directory. Search engine gives the high priority to directory in comparision of page.</p>
<p>The solution was to create a .htaccess rewrite rule that adds the trailing slashes to these urls.</p>
<p><strong>Example – redirect all urls that doesn’t have a trailing slash to urls with a trailing slash</strong></p>
<blockquote><p>RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_URI} !example.php<br />
RewriteCond %{REQUEST_URI} !(.*)/$<br />
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]</p></blockquote>
<div class="shr-publisher-467"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fadd-a-trailing-slash-to-requested-urls%2F' data-shr_title='Add+a+trailing+slash+to+requested+urls'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fadd-a-trailing-slash-to-requested-urls%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fadd-a-trailing-slash-to-requested-urls%2F' data-shr_title='Add+a+trailing+slash+to+requested+urls'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/computer-related/add-a-trailing-slash-to-requested-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error reporting and debugging in codeigniter</title>
		<link>http://sumitbansal.com/codeigniter-tips/error-reporting-and-debugging-in-codeigniter/</link>
		<comments>http://sumitbansal.com/codeigniter-tips/error-reporting-and-debugging-in-codeigniter/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 12:23:36 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Codeigniter Tips]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=463</guid>
		<description><![CDATA[To Turn off Debugging Set the db_debug value(in the application/config/database.php config file) to false To Turn off Error reporting Set the Envirement value(in the top of the main index.php) to... <span class="meta-more"><a href="http://sumitbansal.com/codeigniter-tips/error-reporting-and-debugging-in-codeigniter/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><strong>To Turn off Debugging</strong></p>
<p>Set the <strong>db_debug</strong> value(in the application/config/database.php config file) to <strong>false</strong></p>
<p><strong>To Turn off Error reporting</strong></p>
<p>Set the Envirement value(in the top of the main <strong>index.php</strong>) to <strong>production</strong> or <strong>testing</strong></p>
<p>Replace <strong>define(&#8216;ENVIRONMENT&#8217;, &#8216;development&#8217;);</strong> to <strong>define(&#8216;ENVIRONMENT&#8217;, &#8216;production&#8217;);</strong></p>
<p>One another way to make all of this easy has been for me to set the <strong>db_debug</strong> value (in the application/config/database.php config file) to a constant I declare MP_DB_DEBUG. And add the following code to the top of the main <strong>index.php</strong> to replace the error_reporting() declaration when the site is live (will disable all errors):</p>
<blockquote>
<div><code> ini_set('display_errors', 'Off');<br />
error_reporting(0);<br />
define('MP_DB_DEBUG', false); </code></div>
</blockquote>
<div></div>
<div>But when in production or testing phase I’d suggest:</div>
<div>
<blockquote>
<div><code> ini_set('display_errors', 'On');<br />
error_reporting(-1);<br />
define('MP_DB_DEBUG', true); </code></div>
</blockquote>
<div>
For more information <a title="Error reporting and debugging" href="http://codeigniter.com/forums/viewthread/125687/" target="_blank">click here</a></div>
</div>
<div class="shr-publisher-463"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcodeigniter-tips%2Ferror-reporting-and-debugging-in-codeigniter%2F' data-shr_title='Error+reporting+and+debugging+in+codeigniter'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcodeigniter-tips%2Ferror-reporting-and-debugging-in-codeigniter%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcodeigniter-tips%2Ferror-reporting-and-debugging-in-codeigniter%2F' data-shr_title='Error+reporting+and+debugging+in+codeigniter'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/codeigniter-tips/error-reporting-and-debugging-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to redirect my website to be opened through HTTPS?</title>
		<link>http://sumitbansal.com/computer-related/how-to-redirect-my-website-to-be-opened-through-https/</link>
		<comments>http://sumitbansal.com/computer-related/how-to-redirect-my-website-to-be-opened-through-https/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 06:09:39 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Computer Related]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[open through https]]></category>
		<category><![CDATA[redirect website]]></category>
		<category><![CDATA[rewrite condition]]></category>
		<category><![CDATA[rewriteengine]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=456</guid>
		<description><![CDATA[In order to redirect your website to be opened through HTTPS, you should add the following rewrite rule in your .htaccess file:  RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule .* https://www.domain.com/%{REQUEST_URI}... <span class="meta-more"><a href="http://sumitbansal.com/computer-related/how-to-redirect-my-website-to-be-opened-through-https/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In order to redirect your website to be opened through HTTPS, you should add the following rewrite rule in your <em>.htaccess</em> file:</p>
<blockquote><p> RewriteEngine On<br />
RewriteCond %{HTTPS} !=on<br />
RewriteRule .* <a href="https://www.domain.com%%7brequest_uri%7d/">https://www.domain.com/%{REQUEST_URI}</a> [R,L]</p></blockquote>
<p>This will redirect your domain to https://www.yourdomain.com. If you wish the redirect to work without www, you should remove it from the rewrite rule:</p>
<blockquote><p> <em>RewriteEngine On<br />
RewriteCond %{HTTPS} !=on<br />
</em>RewriteRule .* <a href="https://www.domain.com%%7brequest_uri%7d/">https://domain.com/%{REQUEST_URI}</a> [R,L]</p></blockquote>
<div class="shr-publisher-456"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fhow-to-redirect-my-website-to-be-opened-through-https%2F' data-shr_title='How+to+redirect+my+website+to+be+opened+through+HTTPS%3F'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fhow-to-redirect-my-website-to-be-opened-through-https%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fcomputer-related%2Fhow-to-redirect-my-website-to-be-opened-through-https%2F' data-shr_title='How+to+redirect+my+website+to+be+opened+through+HTTPS%3F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/computer-related/how-to-redirect-my-website-to-be-opened-through-https/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a dynamic tree structure menu</title>
		<link>http://sumitbansal.com/scripts/how-to-make-a-dynamic-tree-structure-menu/</link>
		<comments>http://sumitbansal.com/scripts/how-to-make-a-dynamic-tree-structure-menu/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 10:32:56 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Technical Skills]]></category>
		<category><![CDATA[dynamic menu bar]]></category>
		<category><![CDATA[dynamic tree structure menu]]></category>
		<category><![CDATA[menu bar]]></category>
		<category><![CDATA[php menu bar]]></category>
		<category><![CDATA[tree menu]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=452</guid>
		<description><![CDATA[To make dynamic tree structure menu, We have to make to functions one is for &#8220;Parent Menu&#8221; and second for &#8220;Child Menu or Sub Child Menu&#8221;. $query = &#8220;select *... <span class="meta-more"><a href="http://sumitbansal.com/scripts/how-to-make-a-dynamic-tree-structure-menu/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>To make dynamic tree structure menu, We have to make to functions one is for <strong>&#8220;Parent Menu&#8221;</strong> and second for <strong>&#8220;Child Menu or Sub Child Menu&#8221;</strong>.</p>
<blockquote><p>$query = &#8220;select * from categories where parentid=&#8217;0&#8242;&#8221;;<br />
$result = mysql_query($query);<br />
$list .= &#8220;&lt;ul&gt;&#8221;;<br />
while($row = mysql_fetch_array($result))<br />
{</p>
<p>$list .= &#8220;&lt;li&gt;$row[name]&#8220;;<br />
$l = child($row[id]); $list .= $l;<br />
$list .= &#8220;&lt;/li&gt;&#8221;;<br />
}<br />
$list .= &#8220;&lt;/ul&gt;&#8221;;</p>
<p>$list = str_replace(&#8216;&lt;ul&gt;&lt;/ul&gt;&#8217;, &#8221;, $list);<br />
echo $list;</p>
<p>function child($parent) {<br />
$query1 = &#8220;select * from categories where parentid=&#8217;$parent&#8217;&#8221;;<br />
$result1 = mysql_query($query1);<br />
$rc = mysql_fetch_row($query1);<br />
$list .= &#8220;&lt;ul&gt;&#8221;;<br />
while($row1 = mysql_fetch_array($result1))<br />
{</p>
<p>$list .= &#8220;&lt;li&gt;$row1[name]&#8220;;<br />
$l = child($row1[id]); $list .= $l;<br />
$list .= &#8220;&lt;/li&gt;&#8221;;<br />
}<br />
$list .= &#8220;&lt;/ul&gt;&#8221;;<br />
return $list;<br />
}</p></blockquote>
<p>To download complete script <a title="How to make a dynamic tree structure menu" href="http://sumitbansal.com/doc/category-tree-structure.zip" target="_blank">Click Here</a></p>
<div class="shr-publisher-452"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fhow-to-make-a-dynamic-tree-structure-menu%2F' data-shr_title='How+to+make+a+dynamic+tree+structure+menu'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fhow-to-make-a-dynamic-tree-structure-menu%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fscripts%2Fhow-to-make-a-dynamic-tree-structure-menu%2F' data-shr_title='How+to+make+a+dynamic+tree+structure+menu'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/scripts/how-to-make-a-dynamic-tree-structure-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable auto save, post revision and reduce the database size in wordpress</title>
		<link>http://sumitbansal.com/wordpress-tips/how-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress/</link>
		<comments>http://sumitbansal.com/wordpress-tips/how-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 05:01:07 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Technical Skills]]></category>
		<category><![CDATA[Web Development Tips]]></category>
		<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[disable auto save]]></category>
		<category><![CDATA[reduce wordpress database site]]></category>
		<category><![CDATA[speed up your wordpress site]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress disable post revision]]></category>
		<category><![CDATA[wordpress post]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=447</guid>
		<description><![CDATA[The auto save option in wordpress is a best feature but not for every. For those who have limited web space, limited database size and they not want to auto... <span class="meta-more"><a href="http://sumitbansal.com/wordpress-tips/how-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The auto save option in wordpress is a best feature but not for every. For those who have limited web space, limited database size and they not want to auto save or post revision option they can disable this option by adding two lines in wp-config.php file</p>
<p>Add the following code in your wordpress config file i.e. wp-config.php</p>
<blockquote>
<pre>define('AUTOSAVE_INTERVAL', 300 ); // seconds
define('WP_POST_REVISIONS', false );</pre>
</blockquote>
<p>By this code the auto save function of wordpress will be disable and it also increase the speed of the site because the database less consume space</p>
<p>But the above code will not remove the past revisions from your database. You have to do this manual  with the help of <strong>phpmyadmin, </strong>please visit the phpmyadmin and run the given blow query. It will remove the all revision post from the wrdpress database.</p>
<blockquote><p>DELETE FROM wp_posts WHERE post_type = &#8220;revision&#8221;;</p></blockquote>
<p>Here <strong>wp_posts</strong> is the table name and the <strong>wp</strong> is the prefix of tables, which is defined at the installation time. You should use your prefix otherwise the error will shown <strong>&#8220;#1146 Table does not exist&#8221;.</strong></p>
<div class="shr-publisher-447"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fwordpress-tips%2Fhow-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress%2F' data-shr_title='How+to+disable+auto+save%2C+post+revision+and+reduce+the+database+size+in+wordpress'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fwordpress-tips%2Fhow-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fwordpress-tips%2Fhow-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress%2F' data-shr_title='How+to+disable+auto+save%2C+post+revision+and+reduce+the+database+size+in+wordpress'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/wordpress-tips/how-to-disable-auto-save-post-revision-and-reduce-the-database-size-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get image URL from post in wordpress</title>
		<link>http://sumitbansal.com/wordpress-tips/get-image-url-from-post-in-wordpress/</link>
		<comments>http://sumitbansal.com/wordpress-tips/get-image-url-from-post-in-wordpress/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 04:00:14 +0000</pubDate>
		<dc:creator>Bansal Sumit</dc:creator>
				<category><![CDATA[Technical Skills]]></category>
		<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[attachment url]]></category>
		<category><![CDATA[attachment url in wordpress]]></category>
		<category><![CDATA[get attachment id]]></category>
		<category><![CDATA[get attachment url from post]]></category>
		<category><![CDATA[get attachment url from post id]]></category>
		<category><![CDATA[get image url from post]]></category>
		<category><![CDATA[image url]]></category>
		<category><![CDATA[image url in wordpress]]></category>
		<category><![CDATA[post id in wordpress]]></category>
		<category><![CDATA[thumbnail image]]></category>

		<guid isPermaLink="false">http://sumitbansal.com/?p=442</guid>
		<description><![CDATA[To get the image URL of post thumbnail in wordpress is little difficult because the wordpress doesn&#8217;t provide any function to get the image URL. It only returns the full... <span class="meta-more"><a href="http://sumitbansal.com/wordpress-tips/get-image-url-from-post-in-wordpress/">Read more &#187;</a></span>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>To get the image URL of post thumbnail in wordpress is little difficult because the wordpress doesn&#8217;t provide any function to get the image URL. It only returns the full HTML code of image.</p>
<p>We get the image URL from the <strong>Thumbnail ID </strong>and the <strong>Thumbnail ID</strong> we will get from the <strong>POST ID</strong>.</p>
<h3>To get the single post attachment url use the following code</h3>
<blockquote>
<pre>$image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id($mypost-&gt;ID), 'large-thumb' ); // returns an array
$timage[]=$image_attributes[0];</pre>
</blockquote>
<pre>Here is the <strong>large-thumb </strong>is the thumbnail name that could be large, medium or which is defined in function.</pre>
<pre>You can use this code in a loop to get more than 1 post attachment url</pre>
<h3>Get attachment url in Loop</h3>
<blockquote>
<pre>&lt;?php
global $post;
$args = array( 'numberposts' =&gt; 3, 'offset'=&gt; 0, 'category' =&gt; '4' );
$myposts = get_posts( $args );
	foreach( $myposts as $post ) :	setup_postdata($post);

		$url[] = get_permalink();
//echo wp_get_attachment_image( $attachment-&gt;ID, 'full' );
		$image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id($mypost-&gt;ID), 'large-thumb' ); // returns an array
		$timage[]=$image_attributes[0];
		$timage_attributes = wp_get_attachment_image_src( get_post_thumbnail_id($mypost-&gt;ID), 'full'  ); // returns an array
		$limage[]=$timage_attributes[0];

	endforeach; wp_reset_query(); ?&gt;</pre>
</blockquote>
<div class="shr-publisher-442"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fwordpress-tips%2Fget-image-url-from-post-in-wordpress%2F' data-shr_title='Get+image+URL+from+post+in+wordpress'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fwordpress-tips%2Fget-image-url-from-post-in-wordpress%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsumitbansal.com%2Fwordpress-tips%2Fget-image-url-from-post-in-wordpress%2F' data-shr_title='Get+image+URL+from+post+in+wordpress'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://sumitbansal.com/wordpress-tips/get-image-url-from-post-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

