<?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>Chris K Designs &#187; PHP</title>
	<atom:link href="http://www.chriskdesigns.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chriskdesigns.com</link>
	<description>WordPress tips, hacks, and plugins.</description>
	<lastBuildDate>Tue, 31 Aug 2010 04:56:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress Dev 101: Hooks</title>
		<link>http://www.chriskdesigns.com/wordpress-dev-101-hooks/</link>
		<comments>http://www.chriskdesigns.com/wordpress-dev-101-hooks/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 03:58:09 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress 101]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=670</guid>
		<description><![CDATA[When I first got into WordPress development, I had no idea how the Core of WordPress was designed. I knew that I wanted my snippet of code to fire at a specific time, but short of hacking it into the theme I was using at the time, I had no clue how to achieve this. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-510" title="WordPress Logo" src="http://www.chriskdesigns.com/wp-content/uploads/2010/05/grey-l.png" alt="" width="120" height="120" />When I first got into WordPress development, I had no idea how the Core of WordPress was designed. I knew that I wanted my snippet of code to fire at a specific time, but short of hacking it into the theme I was using at the time, I had no clue how to achieve this. It was then that I discovered the Hooks of WordPress. Think of WordPress&#8217; Hooks as the OnRamp to the rendering of your WordPress based site. Your code will sit dormant until the moment the Hook you have &#8216;Hooked&#8217; fires, then your code will jump in and be executed.<span id="more-670"></span><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h5>Actions vs. Filters</h5>
<p>There are two types of Hooks used in WordPress, Actions and Filters.<br />
Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API. These are most commonly used for the bulk of your plugin development.</p>
<p>Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.</p>
<h5>An Example</h5>
<p>Let&#8217;s take an example from my Updated Today Plugin. We&#8217;ll focus on the settings I have included for &#8220;Insert Into:&#8221;. The options are Header or Footer. What these reference is the functions wp_header() and wp_footer. Both are functions that exist in the index.php of your theme (or should exist). When a user selects the option of Footer as recommended, that tells the plugin to execute when wp_footer is run. How does it know when this is run? A Hook is how we know when it&#8217;s run. In the initial setup of the plugin, I tell the function &#8216;ck_wp_footer&#8217; to run when the hook (in this case the footer) &#8216;wp_footer&#8217; is executed.</p>
<p>[php]add_action(&#8216;wp_footer&#8217;, &#8216;ck_wp_footer&#8217;);[/php]</p>
<p>It&#8217;s as easy as that. Want your code to execute when the header is run?</p>
<p>[php]add_action(&#8216;wp_header&#8217;, &#8216;your_function_name&#8217;);[/php]</p>
<p>Keep in mind that some theme developers are now also building or creating their own hooks, so you can further customize your plugin/site to the max. If this isn&#8217;t quite making sense let&#8217;s have some real world experience. Below is a sample plugin for you to copy and paste into a new document named my-first-plugin.php.</p>
<p>[php]<br />
<?php<br />
/*<br />
   Plugin Name: My First Plugin<br />
   Plugin URI: http://www.chriskdesigns.com<br />
   Description: A template for your first plugin<br />
   Version: 0.1<br />
   Author: Chris Klosowski<br />
   Author URI: http://www.chriskdesigns.com<br />
   Copyright: 2010, Chris Klosowski<br />
*/</p>
<p>add_action('wp_head','my_first_plugin_header');</p>
<p>function my_first_plugin_header()<br />
{<br />
?><script type="text/javascript">
alert("I just hooked into the wp_header() function!");
</script><?php<br />
}<br />
?><br />
[/php]</p>
<p>Save it, and upload it into your wp-content/plugins/ folder of your WordPress site (use a development version if you don&#8217;t want this to impact your users). Activate the plugin and then visit your website. When WordPress starts to load the header, it executes the JavaScript alert we made and will wait to proceed until this alert is cleared. In this case it halts the loading of the site on purpose. I wanted you to see where the code executes, which we can identify as nothing on the page has loaded yet. If we were to change this to load in the footer, the entire page would load until the footer, then alert, and finish once you have clicked &#8216;OK&#8217;.</p>
<p>For a complete list of WordPress Hooks you can check out AdamBrown.info who keeps a complete <a href="http://adambrown.info/p/wp_hooks/version/3.0" target="_blank">list of Hooks</a> for quite a few versions of WordPress.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=WordPress+Dev+101%3A+Hooks+-+http://b2l.me/ana8w3&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;t=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks&amp;selection=When%20I%20first%20got%20into%20WordPress%20development%2C%20I%20had%20no%20idea%20how%20the%20Core%20of%20WordPress%20was%20designed.%20I%20knew%20that%20I%20wanted%20my%20snippet%20of%20code%20to%20fire%20at%20a%20specific%20time%2C%20but%20short%20of%20hacking%20it%20into%20the%20theme%20I%20was%20using%20at%20the%20time%2C%20I%20had%20no%20clue%20how%20to%20achieve%20this.%20It%20was%20then%20that%20I%20discovered%20the%20" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/wordpress-dev-101-hooks/&amp;title=WordPress+Dev+101%3A+Hooks" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/wordpress-dev-101-hooks/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/wordpress-dev-101-hooks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Updated today, release 2.2!</title>
		<link>http://www.chriskdesigns.com/updated-today-release-2-2/</link>
		<comments>http://www.chriskdesigns.com/updated-today-release-2-2/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 05:38:39 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Updated Today]]></category>
		<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=491</guid>
		<description><![CDATA[Could it be that the Updated Today plugin for WordPress has been updated to version 2.2 only a day later!? You better believe it. I&#8217;ve added some more options to this one. You now can choose if post, pages, or both trigger the banner. You can also choose between the original post date or the [...]]]></description>
			<content:encoded><![CDATA[<p>Could it be that the <a href="http://www.chriskdesigns.com/updated-today/">Updated Today plugin for WordPress has been updated to version 2.2</a> only a day later!? You better believe it. </p>
<p>I&#8217;ve added some more options to this one. You now can choose if post, pages, or both trigger the banner. You can also choose between the original post date or the modified date (or both) affect the banner. I hope you like the updates.</p>
<p>Cheers!</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Updated+today%2C+release+2.2%21+-+http://b2l.me/ajugzw&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;t=Updated+today%2C+release+2.2%21" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;title=Updated+today%2C+release+2.2%21&amp;selection=Could%20it%20be%20that%20the%20Updated%20Today%20plugin%20for%20WordPress%20has%20been%20updated%20to%20version%202.2%20only%20a%20day%20later%21%3F%20You%20better%20believe%20it.%20%0D%0A%0D%0AI%27ve%20added%20some%20more%20options%20to%20this%20one.%20You%20now%20can%20choose%20if%20post%2C%20pages%2C%20or%20both%20trigger%20the%20banner.%20You%20can%20also%20choose%20between%20the%20original%20post%20date%20or%20the%20mod" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;title=Updated+today%2C+release+2.2%21" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;title=Updated+today%2C+release+2.2%21" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;title=Updated+today%2C+release+2.2%21" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/updated-today-release-2-2/&amp;title=Updated+today%2C+release+2.2%21" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/updated-today-release-2-2/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/updated-today-release-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Today plugin to 2.1.1</title>
		<link>http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/</link>
		<comments>http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 04:06:33 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Updated Today]]></category>
		<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=477</guid>
		<description><![CDATA[The Updated Today plugin for WordPress has been updated to version 2.1.1. I was fighting with the SVN so I&#8217;m sorry if you got a bad version during the process. It should all be updated and good to go. You can download it directly from WordPress if need be! Thanks for the support. Tweet This! [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 110px"><img class=" " src="http://www.chriskdesigns.com/wp-content/plugins/updated-today-plugin/banners/updatedrt.png" alt="" width="100" height="100" /><p class="wp-caption-text">I&#39;ve been updated!</p></div>
<p>The Updated Today plugin for <a href="http://www.chriskdesigns.com/updated-today/">WordPress has been updated to version 2.1.1</a>. I was fighting with the SVN so I&#8217;m sorry if you got a bad version during the process. It should all be updated and good to go. You can download it directly from WordPress if need be!</p>
<p>Thanks for the support.</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Updated+Today+plugin+to+2.1.1+-+http://b2l.me/ajubez&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;t=Updated+Today+plugin+to+2.1.1" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;title=Updated+Today+plugin+to+2.1.1&amp;selection=%0D%0A%0D%0AThe%20Updated%20Today%20plugin%20for%20WordPress%20has%20been%20updated%20to%20version%202.1.1.%20I%20was%20fighting%20with%20the%20SVN%20so%20I%27m%20sorry%20if%20you%20got%20a%20bad%20version%20during%20the%20process.%20It%20should%20all%20be%20updated%20and%20good%20to%20go.%20You%20can%20download%20it%20directly%20from%20WordPress%20if%20need%20be%21%0D%0A%0D%0AThanks%20for%20the%20support." rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;title=Updated+Today+plugin+to+2.1.1" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;title=Updated+Today+plugin+to+2.1.1" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;title=Updated+Today+plugin+to+2.1.1" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/&amp;title=Updated+Today+plugin+to+2.1.1" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/updated-today-plugin-to-2-1-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plugin Progress</title>
		<link>http://www.chriskdesigns.com/plugin-progress/</link>
		<comments>http://www.chriskdesigns.com/plugin-progress/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 21:41:26 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Updated Today]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=256</guid>
		<description><![CDATA[I have been working on the Updated Today Plugin and adding features. I decided to give you all a little preview of the progress. I have added a &#8216;Settings&#8217; page for the plugin which can allow additional features. Some of them that you see already are the ability to move the image to the left [...]]]></description>
			<content:encoded><![CDATA[<p><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center><br />
I have been working on the Updated Today Plugin and adding features. I decided to give you all a little preview of the progress. I have added a &#8216;Settings&#8217; page for the plugin which can allow additional features. Some of them that you see already are the ability to move the image to the left or right of the page, the ability to turn off the pngfix javascript, and an image choosing feature that allows you to choose any image in the plugin directory. The next features will be the ability to upload your own image as well as a few other small things I think you will all like.</p>
<p>This is still in a rough development state and isn&#8217;t ready just yet for public use. Keep your eyes open for the public release very soon though! Leave some comments if you have feedback. So without further delay&#8230;screenshots!</p>
<div id="attachment_258" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.chriskdesigns.com/wp-content/uploads/2009/07/options.png" target="_blank" rel="lightbox[256]" title="Plugin Options"><img class="size-medium wp-image-258" title="Plugin Options" src="http://www.chriskdesigns.com/wp-content/uploads/2009/07/options-300x239.png" alt="The ability to choose some settings" width="300" height="239" /></a><p class="wp-caption-text">The ability to choose some settings</p></div>
<div id="attachment_257" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.chriskdesigns.com/wp-content/uploads/2009/07/display.png" target="_blank" rel="lightbox[256]" title="Display"><img class="size-medium wp-image-257" title="Display" src="http://www.chriskdesigns.com/wp-content/uploads/2009/07/display-300x239.png" alt="The plugin now allows you to put the banner on the left or right." width="300" height="239" /></a><p class="wp-caption-text">The plugin now allows you to put the banner on the left or right.</p></div>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Plugin+Progress+-+http://b2l.me/ajuca7&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/plugin-progress/&amp;t=Plugin+Progress" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/plugin-progress/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/plugin-progress/&amp;title=Plugin+Progress&amp;selection=%5Bad%5D%0D%0AI%20have%20been%20working%20on%20the%20Updated%20Today%20Plugin%20and%20adding%20features.%20I%20decided%20to%20give%20you%20all%20a%20little%20preview%20of%20the%20progress.%20I%20have%20added%20a%20%27Settings%27%20page%20for%20the%20plugin%20which%20can%20allow%20additional%20features.%20Some%20of%20them%20that%20you%20see%20already%20are%20the%20ability%20to%20move%20the%20image%20to%20the%20left%20or" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/plugin-progress/&amp;title=Plugin+Progress" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/plugin-progress/&amp;title=Plugin+Progress" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/plugin-progress/&amp;title=Plugin+Progress" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/plugin-progress/&amp;title=Plugin+Progress" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/plugin-progress/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/plugin-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Script for MySQL Optimization and Backup</title>
		<link>http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/</link>
		<comments>http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 11:15:57 +0000</pubDate>
		<dc:creator>Chris K</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[GoDaddy]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.chriskdesigns.com/?p=231</guid>
		<description><![CDATA[The biggest complaint I hear from people who use MySQL driven sites on inexpensive shared hosting services is a decrease in performance over time. Most of the time this decrease is no fault of your hosting provider, but the cluttering of your database. Like any computer storage device, a database is simply a collection of [...]]]></description>
			<content:encoded><![CDATA[<p><center><script type="text/javascript"><!--
google_ad_client = "pub-5875197947282333";
google_ad_slot = "6725358123";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<p style="text-align: justify;"><img class="size-full wp-image-235 alignright" title="phpmysql" src="http://www.chriskdesigns.com/wp-content/uploads/2009/06/phpmysql.png" alt="phpmysql" width="150" height="100" />The biggest complaint I hear from people who use MySQL driven sites on inexpensive shared hosting services is a decrease in performance over time. Most of the time this decrease is no fault of your hosting provider, but the cluttering of your database.</p>
<p style="text-align: justify;">Like any computer storage device, a database is simply a collection of data that through time, use, and abuse can grow unorganized and cluttered. I uncovered a few scripts people had written in <a href="http://www.noupe.com/php/10-ways-to-automatically-manually-backup-mysql-database.html" target="_blank">this article</a> at <a href="http://www.noupe.com" target="_blank">noupe.com</a>. Not only did I want to have my databases optimized, I also wanted the backups to be created. So what I have in for your enjoyment is a script that will optimize your database, backup the database to a file including the timestamp (to avoid overwriting), and it will also email you upon warnings and errors.</p>
<p>To install this script you place it in a folder that you can call something like &#8216;supersecretfoldername&#8217; and put a password on this folder. When the script is run it places a backup in a folder named &#8216;_db_backups&#8217; in the directory parent to the &#8216;supersecretfoldername&#8217; folder.</p>
<p style="text-align: justify;">As a bonus, if you use this in conjunction with <a href="http://www.godaddy.com" target="_blank">GoDaddy</a> hosting services, you can use this as a Cron Script to be run without your interaction and the backups will be in GoDaddy&#8217;s default database backup folder. GoDaddy&#8217;s Hosting Control Center will also email you the script results as part of their Cron Manager interface.</p>
<p class="download"><a href="http://www.chriskdesigns.com/projects/optbackmysql.zip" target="_blank">Download</a> the script.</p>
<p style="text-align: justify;">If you are using GoDaddy you will want to set the file permissions to &#8216;Executable&#8217; through their &#8216;File Manager&#8217; (<a href="http://help.godaddy.com/article/2535#basic" target="_blank">Help Article</a>). You can then use the &#8216;Cron Manager&#8217; from within the &#8216;Content&#8217; section of your Hosting Control Center. Here you can set the email address they will send your results to, your scripts, and their frequency</p>
<!-- PHP 5.x -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring-old">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=PHP+Script+for+MySQL+Optimization+and+Backup+-+http://b2l.me/ajzdpr&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;t=PHP+Script+for+MySQL+Optimization+and+Backup" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-posterous">
			<a href="http://posterous.com/share?linkto=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;title=PHP+Script+for+MySQL+Optimization+and+Backup&amp;selection=%5Bad%5D%0D%0AThe%20biggest%20complaint%20I%20hear%20from%20people%20who%20use%20MySQL%20driven%20sites%20on%20inexpensive%20shared%20hosting%20services%20is%20a%20decrease%20in%20performance%20over%20time.%20Most%20of%20the%20time%20this%20decrease%20is%20no%20fault%20of%20your%20hosting%20provider%2C%20but%20the%20cluttering%20of%20your%20database.%0D%0ALike%20any%20computer%20storage%20device%2C%20a%20data" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;title=PHP+Script+for+MySQL+Optimization+and+Backup" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;title=PHP+Script+for+MySQL+Optimization+and+Backup" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;title=PHP+Script+for+MySQL+Optimization+and+Backup" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/&amp;title=PHP+Script+for+MySQL+Optimization+and+Backup" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.chriskdesigns.com/php-script-for-mysql-optimization-and-backup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
