<?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>anilmakhijani.com &#187; Planet</title>
	<atom:link href="http://anilmakhijani.com/category/planet/feed/" rel="self" type="application/rss+xml" />
	<link>http://anilmakhijani.com</link>
	<description></description>
	<lastBuildDate>Tue, 07 Jul 2009 02:01:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Streetsblog.NET Launch</title>
		<link>http://anilmakhijani.com/2008/12/03/streetsblognet-launch/</link>
		<comments>http://anilmakhijani.com/2008/12/03/streetsblognet-launch/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 19:29:25 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Steetsblog.NET]]></category>
		<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Streetsblog.NET]]></category>
		<category><![CDATA[TOPP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=120</guid>
		<description><![CDATA[A few coworkers and I launched Streetsblog.NET yesterday. The website is actually a vanilla install of WordPress working in conjunction with a vanilla install of Planet with a bunch of custom WordPress plugins. I will release the plugins when I get some time to clean them up.]]></description>
			<content:encoded><![CDATA[<p>A few coworkers and I launched <a href="http://streetsblog.net">Streetsblog.NET</a> yesterday.  The website is actually a vanilla install of <a href="http://wordpress.org">WordPress</a> working in conjunction with a vanilla install of <a href="http://www.planetplanet.org/">Planet</a> with a bunch of custom WordPress plugins.  I will release the plugins when I get some time to clean them up.</p>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/12/03/streetsblognet-launch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Meta Information to a Blogroll</title>
		<link>http://anilmakhijani.com/2008/10/13/adding-meta-information-to-a-blogroll/</link>
		<comments>http://anilmakhijani.com/2008/10/13/adding-meta-information-to-a-blogroll/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 17:27:16 +0000</pubDate>
		<dc:creator>Anil</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://anilmakhijani.com/?p=89</guid>
		<description><![CDATA[I found a useful blog post on how to add text fields to the &#8220;link management&#8221; admin menu in WordPress:  http://planetozh.com/blog/2008/02/wordpress-snippet-add_meta_box/ But how do you save this information into your database?  This is a three step approach. 1.  Add the fields to you database: add_action('activate_geo_blogroll.php','geo_blogroll_update_db'); function geo_blogroll_update_db(){ global $wpdb; $wpdb-&#62;query("ALTER TABLE $wpdb-&#62;links ADD COLUMN link_city [...]]]></description>
			<content:encoded><![CDATA[<p>I found a useful blog post on how to add text fields to the &#8220;link management&#8221; admin menu in WordPress:  <a href="http://planetozh.com/blog/2008/02/wordpress-snippet-add_meta_box/" target="_blank">http://planetozh.com/blog/2008/02/wordpress-snippet-add_meta_box/</a></p>
<p>But how do you save this information into your database?  This is a three step approach.</p>
<p>
1.  Add the fields to you database:
</p>
<pre>add_action('activate_geo_blogroll.php','geo_blogroll_update_db');

function geo_blogroll_update_db(){
   global $wpdb;
   $wpdb-&gt;query("ALTER TABLE $wpdb-&gt;links ADD COLUMN link_city varchar(255);");
   $wpdb-&gt;query("ALTER TABLE $wpdb-&gt;links ADD COLUMN link_state varchar(255);");
}</pre>
<p>
2.  Add text fields to the link admin screen:
</p>
<pre>add_action('admin_menu', 'add_geo_meta_to_links');

function add_geo_meta_to_links() {
   add_meta_box ('geo_link', 'Link Geography', 'geo_blogroll_form', 'link');
}

function geo_blogroll_form () {
  global $link;
?&gt;

&lt;table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5"&gt;
  &lt;tr class="form-field"&gt;
       &lt;th value="top" scope="row"&gt;&lt;label for="blog_city"&gt;&lt;?php _e('City'); ?&gt;&lt;/label&gt;&lt;/th&gt;
       &lt;td&gt;
           &lt;input name="blog_city" type="text" id="blog_city"
                  value="&lt;?php echo $link-&gt;link_city; ?&gt;" style="width: 95%" /&gt;
       &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class="form-field"&gt;
    &lt;th value="top" scope="row"&gt;&lt;label for="blog_state"&gt;&lt;?php _e('State'); ?&gt;&lt;/label&gt;&lt;/th&gt;
    &lt;td&gt;
      &lt;input name="blog_state" type="text" id="blog_state"
             value="&lt;?php echo $link-&gt;link_state; ?&gt;"  style="width: 95%" /&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;?php } ?&gt;</pre>
<p>
3.  And finally save this information to the database every time someone saves a new link or updates an old link:
</p>
<pre>add_action('edit_link', 'geo_blogroll_save_meta');
add_action('add_link', 'geo_blogroll_save_meta');

function geo_blogroll_save_meta ($link_id){
  global $wpdb;
  $sql_statement =  "UPDATE wp_links SET link_city='".$_POST['blog_city'].
                              "', link_state='".$_POST['blog_state'].
                              "' WHERE link_id =".$link_id.";";
  $wpdb-&gt;query($sql_statement);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://anilmakhijani.com/2008/10/13/adding-meta-information-to-a-blogroll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
