<?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>am i works? &#187; wordpress</title>
	<atom:link href="http://amiworks.co.in/talk/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://amiworks.co.in/talk</link>
	<description>all about my work</description>
	<lastBuildDate>Sun, 14 Mar 2010 03:17:45 +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>Backup your WordPress blog to Rackspace Cloud Files</title>
		<link>http://amiworks.co.in/talk/backup-your-wordpress-blog-to-rackspace-cloud-files/</link>
		<comments>http://amiworks.co.in/talk/backup-your-wordpress-blog-to-rackspace-cloud-files/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 12:17:23 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[amazon s3]]></category>
		<category><![CDATA[backup plugin]]></category>
		<category><![CDATA[rackspace clodfiles]]></category>
		<category><![CDATA[wodpress backup]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/backup-your-wordpress-blog-to-rackspace-cloud-files/</guid>
		<description><![CDATA[We all have heard of importance of regular backups, but for a long time I had neglected it for my blog. But recently things happened that prompted me to take backups. While I was looking for option to keep backups, I found Rackspace Cloud Files to be a very affordable option, this prompted me to [...]]]></description>
			<content:encoded><![CDATA[<p>We all have heard of importance of regular backups, but for a long time I had neglected it for my blog. But recently things happened that prompted me to take backups. </p>
<p>While I was looking for option to keep backups, I found Rackspace Cloud Files to be a very affordable option, this prompted me to write <strong><a title="All in one backup, restore and migration plugin for WordPress" href="http://amiworks.com/simple-wordpress-backup.html">wpSimpleBackup a WordpPress plug-in that&#160; will take the backups to cloud files</a></strong>, and then I also added support to take backup to Amazon S3 or FTP to another server. But <a href="http://amiworks.co.in/talk/category/wordpress/">unlike my other plugins</a>, this one is not free.</p>
<p><a href="http://amiworks.co.in/talk/wp-content/uploads/2010/03/wpsimplebackup.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="wpsimplebackup" border="0" alt="wpsimplebackup" src="http://amiworks.co.in/talk/wp-content/uploads/2010/03/wpsimplebackup_thumb.png" width="400" height="297" /></a> </p>
<p><strong>Features</strong></p>
<ul>
<li><strong>Backup your entire blog not just database</strong>. It takes backup of the wp-config.php, database, and plugins, themes and all other files in wp-content folder.</li>
<li><strong>Simple and speedy restore</strong>. All you have to do is to move the restore script to the location where you need to do restore, it will automatically fetch the backup file and restore your blog.</li>
<li><strong>Even simpler migration</strong>. if you have ever moved you web server or domain you know the pain it is, with the restore script you get the simple WordPress like installation script which not only installs the WordPress but also restores all you backed up settings, even updating the domain urls if needed. Migration will never get easier then this.</li>
<li><strong>Not one but three ways to keep your backups</strong>, while I personally use Rackspace CloudFiles, you have a choice to use Amazon S3 or even FTP.</li>
<li><strong>Ability to take manual Backups.</strong>&#160; While we do have ability to automatically take backups, some times it makes sense to take backups manually, just click a button, and back up is done.</li>
<li><strong>Restrict number of backups</strong>. while we allow for any number of backups, in services like S3 or Cloud Files, keeping large number of backups can become costly over a period of time. To avoid that you can specify number of latest backups you want to keep, and the backup plugin will take care of the rest.</li>
<li><strong>Backup Scheduling</strong>. It provides the ability to take backups automatically every day, once a week or month.</li>
</ul>
<p>You can <a href="http://amiworks.com/simple-wordpress-backup.html">buy wpSimpleBackup plugin here</a>.</p>
<hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/backup-your-wordpress-blog-to-rackspace-cloud-files/">Backup your WordPress blog to Rackspace Cloud Files</a> was first posted on March 5, 2010 at 5:47 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/backup-your-wordpress-blog-to-rackspace-cloud-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Where is MySQL Gone Away?</title>
		<link>http://amiworks.co.in/talk/where-is-mysql-gone-away/</link>
		<comments>http://amiworks.co.in/talk/where-is-mysql-gone-away/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 16:51:09 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[how too?]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=316</guid>
		<description><![CDATA[Last Sunday I got to work on a very interesting problem in WordPress which I initially thought could be solved in like 5 mins, but alas it took me almost 7 hours before I found and fixed the problem. Let me describe the problem, I was running a simple xml parsing script whose task was [...]]]></description>
			<content:encoded><![CDATA[<p>Last Sunday I got to work on a very interesting problem in WordPress which I initially thought could be solved in like 5 mins, but alas it took me almost 7 hours before I found and fixed the problem.</p>
<p>Let me describe the problem, I was running a simple xml parsing script whose task was to parse the xml file and insert the content into WordPress database as a post, everything was working fine except the <em>‘INSERT’</em> statement was failing with out any errors. Basically everything would run but nothing would get inserted into database and no errors. We had used the <em>‘wp_insert_post’</em> function in  <em>‘post.php’</em> file to handle the insertion of post, which was returning ‘0’ instead.</p>
<p>After lot’s of time spend checking and cross checking the sql statements for error and PHP code logic, i finally found the problem which was a small kinda cryptic error <strong>‘MySQL server has gone away’ </strong>for every single query that was getting executed in the script.</p>
<p>Well, a quick google search took me to <a title="MySQL server gone away" href="http://dev.mysql.com/doc/refman/5.0/en/gone-away.html">MySQL manual</a> page where it list bunch of possibilities on why the error might be coming.</p>
<p>To me the most logical one were</p>
<ol>
<li>
<ol>
<li>You tried to run a query after closing the connection to the server. This indicates a logic error in the application that should be corrected.</li>
<li>A client application running on a different host does not have the necessary privileges to connect to the MySQL server from that host.</li>
<li>You have encountered a timeout on the server side and the automatic reconnection in the client is disabled (the reconnect flag in the MYSQL structure is equal to 0).</li>
<li>You can also get these errors if you send a query to the server that is incorrect or too large.</li>
<li>You are using a Windows client and the server had dropped the connection (probably because wait_timeout expired) before the command was issued.</li>
</ol>
</li>
</ol>
<p>I investigated each one but it turned out that because a query was taking a bit to long to execute MySQL closed the connection and refused all further request from the client.</p>
<p>So you might be wondering what was the <strong>Solution </strong>to this problem.</p>
<p>Well <a href="http://robsnotebook.com/">Rob of Rob’s notebook</a> had the almost perfect solution for it. He <a href="http://robsnotebook.com/wordpress-mysql-gone-away">created a replacement file for<em> ‘wpdb.php’</em></a> which takes care of this problem, yeah it is temporary and you have to remember to replace this file every time you do an WordPress upgrade but it works.</p>
<p>If you are facing this problem go download it and replace you <em>‘wpdb’</em> file and save yourself some time.</p>
<div style="border-bottom: #aaaaaa 1px solid; border-left: #aaaaaa 1px solid; padding-bottom: 5px; margin: 10px; padding-left: 5px; padding-right: 5px; background: #ffffcc; font-size: 1.4em; border-top: #aaaaaa 1px solid; font-weight: bold; border-right: #aaaaaa 1px solid; padding-top: 5px">Check out <a style="color: #008888; text-decoration: underline" title="PHP community where you learn something new every day " href="http://phpcamp.net/?utm_medium=blog_post&amp;utm_source=new_blog_at_amiworks&amp;utm_campaign=where%20MySQL%20Server%20gone">PHPCamp.net</a> a article sharing website relevant to our own PHP community</div>
<hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/where-is-mysql-gone-away/">Where is MySQL Gone Away?</a> was first posted on November 11, 2009 at 10:21 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/where-is-mysql-gone-away/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>5 key skills of a successful web application developer</title>
		<link>http://amiworks.co.in/talk/5-key-skills-of-a-successful-web-application-developer/</link>
		<comments>http://amiworks.co.in/talk/5-key-skills-of-a-successful-web-application-developer/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 10:33:28 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[skills for web development]]></category>
		<category><![CDATA[web app]]></category>
		<category><![CDATA[web developer]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/5-key-skills-of-a-successful-web-application-developer/</guid>
		<description><![CDATA[Most probably you will be knowing about all these skills already, it is common sense, still I have found so many developers who just know just one server side language(usually java or .net) and then they think themselves as superman/superwoman. In web application development, that is just one thing. You need to know about lot [...]]]></description>
			<content:encoded><![CDATA[<p>Most probably you will be knowing about all these skills already, it is common sense, still I have found so many developers who just know just one server side language(usually java or .net) and then they think themselves as superman/superwoman.</p>
<p>In web application development, that is just one thing. You need to know about lot more things before you can consider yourself successful.</p>
<p>So, if you know them already that&#8217;s good, you don&#8217;t need to read any further otherwise continue reading to know why each of these skills are important for you(the web developer).</p>
<p>Here are the skills</p>
<ol>
<li>the structure : HTML</li>
<li>the presentation: CSS</li>
<li>the behavior: JavaScript</li>
</ol>
<p>With these three skill you have ability to become the super cool static website developer or a front end developer</p>
<ol>
<li>the database: SQL</li>
<li>the server-side language : PHP( other options are JSP/ASP/PERL/RUBY choice is yours, as all the fight for best happens here)</li>
</ol>
<p>These two skill will make you a web developer.</p>
<p>All five of these skills will make you a most prized web developer, in your organization.</p>
<p><span id="more-102"></span></p>
<h3>HTML</h3>
<p>You think you know HTML, think again. I have been interviewing lot of people, they have all rated themselves nearing 7-8 out of 10, whenever I asked them to rate their knowledge of html. Every time I tried to verify their claim, they came down to 2-3, reason is simple, HTML is very simple and everyone thinks they can bluff their way through, After all what is HTML, just tables and forms isn&#8217;t?</p>
<p>Well you are wrong, HTML is the one of the most important skill that you should have, you should know HTML better then you know your server side language, why?</p>
<p>Simply because your server side language is optional, but HTML is must, even when you dream about a web page. It gives your website a structure and layout. This is what an end user see&#8217;s and care about. You don&#8217;t know HTML, you can&#8217;t fix the strange behaviors that you see in you website.</p>
<p>Without proper layout, you site/application is nothing.  With proper use of HTML you can not only create most accessible websites, you can also create a website which will look good in absence of css and will work without javascript.</p>
<p>So go and revise you HTML again, and remember just know is not enough, you have to understand where to use what.</p>
<h3>CSS</h3>
<p>CSS is used to give the look and feel to your website. You as a web developer need to know and understand how it works, and how you can simplify the html layout&#8217;s so that it becomes manageable. Design is what your users/client sees.</p>
<p>On the basis of your sites design, your ability is judged initially.</p>
<p>CSS is easy to learn, but it&#8217;s application is another story, all thanks to browser incompatibilities.  So to make your website look good in all the browser you need CSS. Just knowing CSS is not enough, you have to understand it&#8217;s application also.</p>
<h3>JavaScript</h3>
<p>JavaScript is not just for validations as many of you think, it is what gives you ability to do some nifty things with your webpage(like lightbox, rating&#8217;s , ajax).</p>
<p>It adds behavior to  your website, makes it interesting and improves the users experience. If you have still not chosen any framework, do it now. jQuery, prototype, YUI, Dojo are some of the interesting frameworks that make developers life easier.</p>
<p>If have master all the three skills above you can already consider your self above average web developer even if that person has 10 years of experience. Remember we are in IT industry. IT is Information Technology, where Information aka Knowledge is important.</p>
<h3>SQL</h3>
<p>The most neglected in the bunch, when this is the second most important skill that a web developer should have.</p>
<p>Why? what a question, we are building web applications that almost always relay on database, If you don&#8217;t understand the SQL how do you propose to get the data fast enough from your database? Almost all the websites can be distilled down to simple SELECT,INSERT, UPDATE operations. If you can master them, you can dictate your terms.</p>
<p>When I say SQL I don&#8217;t just mean queries but also the database schema and intricacies of database itself.</p>
<h3>PHP</h3>
<p>Before you get up in arms against me for suggesting PHP and not your favorite language, understand this, I am talking about web applications only, and their is no other scripting language which is so easy to learn and program with. At the same time, it provides functions for everything you can think off that is required in a web application development environment.</p>
<p>Please spare me the talk about java and .net they are platforms and/or programming language. If you understand  &#8220;you should not use sword to do the job of needle and vice versa&#8221; then you know what I mean.</p>
<p>Their are many frameworks that you can use. Also their are many ready to use open source packages that you can use and adapt to your needs, you don&#8217;t need to start from scratch all the time.</p>
<p>If you have read till here, then I would love to know your views on these skills and others that you think are important for a successful web development career.</p>
<hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/5-key-skills-of-a-successful-web-application-developer/">5 key skills of a successful web application developer</a> was first posted on June 3, 2008 at 10:33 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/5-key-skills-of-a-successful-web-application-developer/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>akWpLightBox : simple lightbox for wordpress</title>
		<link>http://amiworks.co.in/talk/akwplightbox/</link>
		<comments>http://amiworks.co.in/talk/akwplightbox/#comments</comments>
		<pubDate>Wed, 21 May 2008 04:00:42 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[akwplightBox]]></category>
		<category><![CDATA[lightbox plugin]]></category>
		<category><![CDATA[prettyPhoto]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/akwplightbox/</guid>
		<description><![CDATA[I always strive for simple solutions to all my problems, akWpLightBox plugin is result of one such endeavor. For quite some time now I was looking for a plugin which is lightweight, and can show images in lightbox like effect, in my blog. The effort of creating a javascript functionality for that was putting me [...]]]></description>
			<content:encoded><![CDATA[<p>I always strive for simple solutions to all my problems, akWpLightBox plugin is result of one such endeavor.</p>
<p>For quite some time now I was looking for a plugin which is lightweight, and can show images in lightbox like effect, in my blog.</p>
<p>The effort of creating a javascript functionality for that was putting me off, then few days back I saw the <a href="http://www.no-margin-for-errors.com/projects/prettyPhoto/" target="_blank">prettyPhoto</a>, it is a <a href="http://jquery.com" target="_blank">jQuery</a> based plugin for creating the lightbox effects for the images.</p>
<p>This made my job pretty easier, now I can have my lightbox effect, all i needed to was convert it into a wordpress plugin. So I did some modifications to the prettyPhoto to suite my needs, and here is the result of my work. Check out an working example below.</p>
<p><a title="Example of akWpLightbox" href="http://amiworks.co.in/talk/wp-content/pretty.jpg"></a></p>
<p style="text-align: center;"><a title="Example of akWpLightbox" href="http://amiworks.co.in/talk/wp-content/pretty.jpg"><img src="http://amiworks.co.in/talk/wp-content/pretty.thumbnail.jpg" alt="Example of akWpLightbox" /></a></p>
<p><span id="more-87"></span><br />
<strong>How To Install</strong></p>
<ol>
<li>Just download the akwpLightbox plugin, <a title="download aklightbox a lightbox plugin for wordpress" href="http://downloads.wordpress.org/plugin/akwplightbox.zip">akwplightbox.zip</a>.</li>
<li>Extract <em>akwplightbox.zip</em> into akwpLightbox folder.</li>
<li>Upload this folder into &#8216;wp-content/plugin&#8217; folder.</li>
<li>Now go to plugins section in admin and activate the plugin</li>
</ol>
<p>Now, enjoy the lightbox effect.</p>
<p><strong>How To use</strong></p>
<p>Next time when you are adding a image in the post or page, just remember to link you image to full size image, or to image that you want to show in the lightbox. You may want to check &#8220;title&#8221; attribute of anchor tag, this will be displayed below the image as caption in the lightbox.</p>
<p><strong>Credits</strong></p>
<p>I will say all credit goes to <a href="http://www.no-margin-for-errors.com/" target="_blank">Stephane Caron</a> for creating  simple to use <a href="http://www.no-margin-for-errors.com/projects/prettyPhoto/" target="_blank">prettyPhoto</a> plugin  that made this possible.</p>
<p>If you have any questions, suggestions or issues just leave a comment below.</p>
<div style="border: 1px solid rgb(170, 170, 170); padding: 5px; margin: 10px; background: none repeat scroll 0% 0% rgb(255, 255, 204); font-size: 1.4em; font-weight: bold;"><a href="http://amiworks.com/simple-wordpress-backup.html" title="wordpress plugin to take complete backups to amazon s3, rackspace cloud files">wpSimpleBackup</a> : a simple wordpress plugin to take backups of your blog.</div>
<hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/akwplightbox/">akWpLightBox : simple lightbox for wordpress</a> was first posted on May 21, 2008 at 4:00 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/akwplightbox/feed/</wfw:commentRss>
		<slash:comments>84</slash:comments>
		</item>
		<item>
		<title>Simplified AJAX For WordPress Plugin Developers using Jquery</title>
		<link>http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/</link>
		<comments>http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 10:11:33 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[how too?]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[simplified ajax]]></category>
		<category><![CDATA[wordpress ajax plugins]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/</guid>
		<description><![CDATA[I am assuming you know how to write a wordpress plugin, and now you are wondering how to use ajax to add that sexy feature which will make your plugin look bit kool. I faced the same problem, with my akWpUploder plugin. I googled but could not find anything interesting, or should I say, simple [...]]]></description>
			<content:encoded><![CDATA[<p>I am assuming you know how to write a wordpress <a href="http://codex.wordpress.org/Writing_a_Plugin" title="Writing a plugin">plugin</a>, and now you are wondering how to use ajax to add that sexy feature which will make your plugin look bit kool.</p>
<p>I faced the same problem, with my <a href="http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/" title="akWpUploader: alternative wordpress image uploader using flickr">akWpUploder</a> plugin. I googled but could not find anything interesting, or should I say, simple way of adding ajax to my plugin. So I dig into the wordpress code base for solution, as  auto-saving feature of wordpress was one such thing that I wanted to use.</p>
<p>There I found what I was really looking for, a very simple way of using Ajax to get things done.</p>
<p><strong>Problem: How to use WordPress functions in you plugin when using ajax</strong></p>
<div style="border: 1px solid rgb(170, 170, 170); margin: 10px; padding: 5px; background: rgb(255, 255, 204) none repeat scroll 0% 0%; font-weight: bold; font-size: 1.4em; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">Are you satisfied with your knowledge? No, then spent 15 minutes every day on <a href="http://phpcamp.net/" style="color: rgb(0, 136, 136); text-decoration: underline;" title="PHP community where you learn something new every day ">PHPCamp.net</a> a knowledge sharing website for our own PHP community</div>
<p>Let me explain the problem first, while I was working on my <a href="http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/" title="akWpUploader: alternative wordpress image uploader using flickr">plugin</a> I needed to insert the photo data into the database. To do this I needed to use wordpress database functions, but the way I knew to use ajax(i.e. creating a separate php file which handles the ajax request), it was bit difficult and messy. It would have involved either making a direct connection with the database or including the wordpress config file.</p>
<p>I was not happy with either of these options, I needed a simpler solution.</p>
<p><span id="more-64"></span><strong>Solution: <em>admin-ajax.php</em> and action hook <em>wp_ajax_</em></strong></p>
<p>As I mentioned earlier I dig into wordpress to  see the way WP uses ajax to save the posts.</p>
<p>What I found was this code.</p>
<pre>
      default :
	do_action( 'wp_ajax_' . $_POST['action'] );
 	die('0');</pre>
<p>So, now all I needed to do was send all my ajax request to <em>admin-ajax.php</em> provide an ‘<em>action</em>’ and wordpress will call the function attached to that hook.</p>
<p>Neat, isn’t it?  Now I can keep my plugin simple.</p>
<p><strong>Implementation: an example </strong></p>
<p>You might be thinking “It’s ok, but can you show me an example?”</p>
<p>Yeah, sure I will.</p>
<p>First we take care of javascript, here I am using <a href="http://amiworks.co.in/talk/jquery-an-introduction/" title="Jquery : An introduction">Jquery</a>, the easiest javascript library available.</p>
<ol>
<li>Let&#8217;s include jquery:
<pre>&lt;?php
echo'&lt;script src="'.get_option('siteurl'). '/wp-content/plugins/jquery-1.2.3.min.js"&gt; &lt;/script&gt;';</pre>
</li>
<li>Now the code for ajax request: their are two things to notice
<ol>
<li> the &#8216;<em>action</em>&#8216;, which contains the value to be used with &#8216;<em>wp_ajax_</em>&#8216; to make a wordpress hook.</li>
<li>the other is &#8216;<em>cookie</em>&#8216; which contains the cookie required to authenticate you admin access to <em>admin-ajax.php</em>.</li>
</ol>
<pre>
&lt;script&gt;
 $.post(siteurl+"/wp-admin/admin-ajax.php", {action:"ak_attach", 'cookie': encodeURIComponent(document.cookie)},
 function(str)
{
      alert(str);
});

&lt;/script&gt;</pre>
</li>
</ol>
<p>With this the javascript part of the things is over.</p>
<p>Now we will take care of handling this request in our plugin.</p>
<ol>
<li>So first we will create the function that will respond to ajax request. you should notice that i have used the <em>exit</em> at the end this is because i want the script to end here, other wise i will get &#8217;0&#8242; with my data.
<pre>
&lt;?php
function ajaxResponse(){
global $wpdb; 	global $userdata;
get_currentuserinfo();
 echo "Hello ". $userdata-&gt;user_login;
 exit;
 }</pre>
</li>
<li>Now we need to tell wordpress about this function, so we will attach this function to the Hook that we created, by providing the action parameter in the javascript code above.
<pre>
 add_action('wp_ajax_ak_attach', 'ajaxResponse');</pre>
</li>
</ol>
<p>That’s it we are done.</p>
<p>Now that you know how to use ajax easily while writing the your plugin, go ahead and use it. Download code for this  <a href="http://amiworks.co.in/ajaxdemo/ajax_demo.zip" title="Ajax for wordpress, using jquery tutorial demo file">demo plugin</a> which shows the whole operation, and can act as template.</p>
<p><strong><em>Note</em></strong>: <em>admin-ajax.php</em> only allows admin users to post the data, which means this can only be used on admin area of wordpress and not in the general scenario.  For using ajax in other situations please check <a href="http://www.devlounge.net/articles/using-ajax-with-your-wordpress-plugin" title="Using Ajax with wordpress plugin">Using AJAX with your WordPress Plugin</a> tutorial by Ronald.</p>
<hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/">Simplified AJAX For WordPress Plugin Developers using Jquery</a> was first posted on April 10, 2008 at 10:11 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>akWpUploader: Alternative WordPress Image Uploader</title>
		<link>http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/</link>
		<comments>http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 01:09:35 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[akWpUploader]]></category>
		<category><![CDATA[Alternative Image Uploader]]></category>
		<category><![CDATA[Flickr For wordpress]]></category>
		<category><![CDATA[photoblogging  gallery]]></category>
		<category><![CDATA[wordpress image uploader based on flickr]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/</guid>
		<description><![CDATA[For those in hurry, download the latest version of from wordpress plugin page. UPDATE (25 August 2009): I have released the version 1.1.0 and made it comaptible with WordPress 2.8. UPDATE: I have released 0.7.1 of this plugin, with this i consider it to be good enough for general uses, Please help me test it [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><em>For those in hurry, download the latest version of </em><code><a class="downloadlink" href="http://amiworks.co.in/talk/wp-content/plugins/download-monitor/download.php?id=2" title="Version 1.0.0 downloaded 1543 times" >akWpUploader</a></code><em> from</em><code> </code><em><a title="Alternative WordPress Image Uploader Using Flickr" href="http://wordpress.org/extend/plugins/akwpuploader-alternative-wordpress-image-uploader/">wordpress plugin</a> page.</em></p>
<p align="left">UPDATE (25 August 2009): I have released the version 1.1.0 and made it comaptible with WordPress 2.8.</p>
<p align="left">UPDATE: I have released 0.7.1 of this plugin, with this i consider it to be good enough for general uses, Please help me test it so that we can together release version 1.0 of this plugin soon.</p>
<p>I was fed up with the wordpress  image uploader&#8217;s inability to properly resize the images. I was posting  pictures of  <a title="Rangpanchami 2008 puneitlabs" href="http://blog.puneitlab.com/2008/04/01/pahechan-kaun-rang-panchami-2008/">Rangpanchami</a> in my office blog but image would just not resize properly.</p>
<p>So i decided to create this akWpUploader: alternative image uploader for wordpress  which uses <a title="Flickr!" href="http://flickr.com" target="_blank">Flickr.com&#8217;s</a> web services to attach images on the blog post. Initially i wanted to use rss feed that Flickr provides, but found it very restrictive so i went ahead to use flickr Api, which has been simplified by  <a href="http://www.dancoulter.com/">Dan Coulter</a> who wrote easy to use  <a title="phpFlickr : wrapper for Flickr's  API" href="http://phpflickr.com/">phpFlickr</a> wrapper class. This plugin is not meant to replace the original uploader but to complement it by providing additional missing functionalities. Their was a need for some such plugin as is evident from following wordpress feature enhancement request <a title="Wordpress Idea for Image handling " href="http://wordpress.org/extend/ideas/topic.php?id=74">Idea:Image Handling</a>.</p>
<h2>How it works?</h2>
<p>All you need to do is type your Flickr user id and it will fetch all the photographs that you have published on the Flickr,  you click on the image that you want to insert into the editor, select the option for image size to include in the editor. It will take the title, description form Flickr and attach  image from Flickr in the editor. Simple isn&#8217;t ?  <img src='http://amiworks.co.in/talk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<a title="akWpUploader" href="http://www.flickr.com/photos/thecancerus/2379770334"><img src="http://farm4.static.flickr.com/3247/2379770334_ecfc21810b.jpg" alt="akWpUploader" /></a></p>
<p><span style="text-decoration: line-through;"><em>I have cheated here <img src='http://amiworks.co.in/talk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </em></span><em> Cheating, No More <img src='http://amiworks.co.in/talk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p><strong>Update</strong> : their is one more additional step involved now, you first select type the username, akWpuploader will fetch the tags and photo sets that you have created, once you select the option you can get the images from the Flickr.</p>
<h2>How to install</h2>
<p>This is very simple task, just upload the &#8220;akwpuploader-alternative-wordpress-image-uploader&#8221; folder to &#8220;wp-content/plugins/&#8221; folder, care must be taken to ensure that folder name is kept as it is.</p>
<p>Then go to plugins section of the website and activate the plugin and you are done.</p>
<p>This plugin shows itself when you create new post, just below the editor in wordpress 2.3 and below, It shows itself between Advanced options and categories in wordpress 2.5.</p>
<h2>Limitations</h2>
<p>As it is a <strong>Beta release</strong> it may have bugs, it still lacks some features and it may crash.</p>
<h2>To Do</h2>
<ol>
<li><span style="text-decoration: line-through;">To choose the size that we want to display in blog instead of just small thumbnail that is currently being used</span></li>
<li><span style="text-decoration: line-through;">Similar to wordpress uploader,  ability  to choose whether to link or not, and also to take user to wordpress blog page or directly to image</span>.</li>
<li><span style="text-decoration: line-through;">Ability to select image sets from Flickr.</span></li>
<li><span style="text-decoration: line-through;">Ability to select images based on tags.</span></li>
<li>Pagination.</li>
<li><span style="text-decoration: line-through;">Ability to clear the images from the selection</span></li>
<li>Ability to specify your own details like title and description for a photo instead of using the one on Flickr.</li>
<li>Ability to Upload the images to Flickr itself.</li>
</ol>
<p>If you have any ideas that you want to see with this plugin please let me know.</p>
<p><strong>Fixed</strong> : Just released a new version to fix the issues mentioned by matthew  and kimharding in comments please help me test it further so that i can release a stable version soon.</p>
<p><strong>Fixed</strong> : With release of 0.7.1, i have fixed the issue mentioned by kimchi39 in comments.</p>
<p><strong>Update(5th July 2008) </strong>: Released 1.0.0 a stable version after lot&#8217;s of testing.</p>
<p><strong>Update (25 August 2009)</strong>: I have released the version 1.1.0 and made it comaptible with WordPress 2.8.</p>
<hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/">akWpUploader: Alternative WordPress Image Uploader</a> was first posted on April 1, 2008 at 6:39 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/akwpupoader-alternative-wordpress-image-uploader/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
	</channel>
</rss>
