<?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/"
	>

<channel>
	<title>The Newsroom &#187; WP Hacks</title>
	<atom:link href="http://wpmupremium.com/news/category/wp-hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpmupremium.com/news</link>
	<description>WordPress News &#38; Resources</description>
	<pubDate>Tue, 30 Jun 2009 11:02:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding GeoRSS Functionality</title>
		<link>http://wpmupremium.com/news/2009/02/05/adding-georss-functionality/</link>
		<comments>http://wpmupremium.com/news/2009/02/05/adding-georss-functionality/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 05:29:09 +0000</pubDate>
		<dc:creator>WPMU Team</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=161</guid>
		<description><![CDATA[If you would like to give your Wordpress RSS feed full GeoRSS compatibility, it’s really quite simple, which is why we have posted this hack for those looking to incorporate Geo-Blogging functionality directly into their themes, or that need a step in the right direction as far as developing your first Geo-Tagged plug-in...]]></description>
			<content:encoded><![CDATA[<p>If you would like to give your Wordpress RSS feed full GeoRSS compatibility, it&#8217;s really quite simple - all you need to do is copy and paste the following piece of code into your <strong>functions.php</strong> file:</p>
<div class="box-code">
function geo_header() {<br />
echo &#39;xmlns:geo=&quot;http://www.w3.org/2003/01/geo/wgs84_pos#&quot; xmlns:georss=&quot;http://www.georss.org/georss&quot;&#39;;<br />
}<br />
add_action(&#39;rss2_ns&#39;, &#39;geo_header&#39;);</p>
<p>function geo_points() {<br />
global $wp_query;<br />
$map_lat_geo = get_post_meta($wp_query-&gt;post-&gt;ID, &#39;map_lat&#39;, true);<br />
$map_long_geo = get_post_meta($wp_query-&gt;post-&gt;ID, &#39;map_long&#39;, true);<br />
echo &#39;&lt;geo:lat&gt;&#39; . $map_lat_geo . &#39;&lt;/geo:lat&gt;&#39;;<br />
echo &#39;&lt;geo:long&gt;&#39; . $map_long_geo . &#39;&lt;/geo:long&gt;&#39;;<br />
echo &#39;&lt;georss:point&gt;&#39; . $map_lat_geo . &#39; &#39; . $map_long_geo . &#39;&lt;/georss:point&gt;&#39;; }<br />
add_action(&#39;rss2_item&#39;, &#39;geo_points&#39;);
</p></div>
<p>However, please remember that in order to view the GEO-Tagged RSS feed, you will need to use the full URL, such as http://yourdomain.com/?feed=rss2</p>
<p>You may be asking how can you then add coordinates to posts&#8230;?</p>
<p>Also relatively simple - just create custom fields labeled:</p>
<p><strong>map_lat</strong><br />
<strong>map_long</strong></p>
<p>&#8230;As referenced above within the code.</p>
<p>If you need a really easy way to find the coordinates you need, we strongly recommend the use of the <a href="http://addresschooser.mapeed.com/doc/" target="_blank">Mapeed.AdressChooser API</a></p>
<p>If you&#8217;re looking for an example of what can then be done with the Geo-Tagged RSS Feed, please take a look at the following:</p>
<p>The <a href="http://klews.net/about-kuala-lumpur/" target="_blank">KL News Network</a> Geo-Tagged Page, which <strong>does not</strong> use any plug-ins:</p>
<p align="center"><a href="http://klews.net/about-kuala-lumpur/" target="_blank"><img src="http://wpmupremium.com/wp-content/article-images/klews-demo.jpg" /></a></p>
<p>This hack has been provided for those looking to incorporate Geo-Blogging functionality directly into their theme, or that need a step in the right direction as far as developing your first Geo-Tagged plug-in may be concerned.</p>
<p>For those curious as to exactly what code is needed to generate a map like the one seen above, all you need to do is include the following code:</p>
<div class="box-code">
&lt;script src=&quot;http://www.google.com/jsapi?key=MUST ADD YOUR API KEY HERE&quot;&gt;<br />
&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;google.load(&quot;maps&quot;, &quot;2&quot;);&lt;/script&gt;</p>
<p>&lt;script type=&quot;text/javascript&quot;&gt;<br />
    var map;<br />
    var geoXml;<br />
    var toggleState = 1;</p>
<p>    function loadMap() {<br />
      if (GBrowserIsCompatible()) {<br />
        geoXml = new GGeoXml(&quot;http://klews.net/?feed=rss2&quot;);<br />
        map = new GMap2(document.getElementById(&quot;map_canvas4&quot;));<br />
        map.setCenter(new GLatLng(3.15021,101.707703), 10);<br />
        map.addControl(new GLargeMapControl());<br />
        map.addControl(new GLargeMapControl());<br />
        map.addOverlay(geoXml);<br />
      }<br />
    }</p>
<p>    function toggleMyKml() {<br />
      if (toggleState == 1) {<br />
        map.removeOverlay(geoXml);<br />
        toggleState = 0;<br />
      } else {<br />
        map.addOverlay(geoXml);<br />
        toggleState = 1;<br />
      }<br />
    }<br />
    google.setOnLoadCallback(loadMap);<br />
    &lt;/script&gt;</p>
<p>&lt;div id=&quot;map_canvas4&quot;&gt;&lt;/div&gt;
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2009/02/05/adding-georss-functionality/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display Post &#38; Comment Count</title>
		<link>http://wpmupremium.com/news/2009/01/11/display-post-comment-count/</link>
		<comments>http://wpmupremium.com/news/2009/01/11/display-post-comment-count/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 12:37:37 +0000</pubDate>
		<dc:creator>WPMU Team</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=147</guid>
		<description><![CDATA[This nifty little hack will display a post and comment count and can be easily edited, but basically, all you need to do is paste the following code into your PHP file where you want the sentence displayed...]]></description>
			<content:encoded><![CDATA[<p>This nifty little hack will display a post and comment count and can be easily edited, but basically, all you need to do is paste the following code into your PHP file where you want the sentence displayed:</p>
<div class="box-code">
&lt;?php<br />
$numposts = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&gt;posts WHERE post_status = &#39;publish&#39;&quot;);<br />
if (0 &lt; $numposts) $numposts = number_format($numposts);<br />
$numcomms = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&gt;comments WHERE comment_approved = &#39;1&#39;&quot;);<br />
if (0 &lt; $numcomms) $numcomms = number_format($numcomms);<br />
echo $numposts.&#39; articles have been published on this site,&#39;;<br />
echo &quot; sharing a total of &quot;.$numcomms.&quot; comments.&quot;;<br />
?&gt;
</div>
<p>This will display <strong>XX articles have been published on this site, sharing a total of XX comments</strong>, and will only work correctly with Wordpress - if used with MU, it will only display the number of posts and comments specifically for the blog it is seen from&#8230;</p>
<p>If you want to define the variables in one place and then re-use the stats as numbers on their own (so they can be better styled) all you need to do is split the code as follows - by first defining the variables:</p>
<div class="box-code">
&lt;?php<br />
$numposts = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&gt;posts WHERE post_status = &#39;publish&#39;&quot;);<br />
if (0 &lt; $numposts) $numposts = number_format($numposts);<br />
$numcomms = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&gt;comments WHERE comment_approved = &#39;1&#39;&quot;);<br />
if (0 &lt; $numcomms) $numcomms = number_format($numcomms);<br />
?&gt;
</div>
<p>Then call the numbers using either of the following:</p>
<div class="box-code">
&lt;?php echo $numposts // Is the number of posts ?&gt;<br />
&lt;?php echo $numcomms // Is the number of comments ?&gt;
</div>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2009/01/11/display-post-comment-count/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating Your Own Options Page</title>
		<link>http://wpmupremium.com/news/2008/12/28/creating-your-own-options-page/</link>
		<comments>http://wpmupremium.com/news/2008/12/28/creating-your-own-options-page/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 05:06:57 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=116</guid>
		<description><![CDATA[If you need a little more customisation and or a slightly better grasp of what&#8217;s going-on within the back-end of themes, perhaps Ozh&#8217;s Theme Toolkit is not enough.  Fortunately, In The Woods added a detailed explanation of how to build your own options page, which can be customised as much as needed.
]]></description>
			<content:encoded><![CDATA[<p>If you need a little more customisation and or a slightly better grasp of what&#8217;s going-on within the back-end of themes, perhaps <a href="http://planetozh.com/blog/my-projects/wordpress-theme-toolkit-admin-menu/" target="_blank">Ozh&#8217;s</a> <a href="http://wpmupremium.com/news/2008/12/20/ozhs-theme-toolkit-mu-compatible/" target="_blank">Theme Toolkit</a> is not enough.  Fortunately, <a href="http://blog.themeforest.net/wordpress/create-an-options-page-for-your-wordpress-theme/" target="_blank">In The Woods</a> added a detailed explanation of how to build your own options page, which can be customised as much as needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/28/creating-your-own-options-page/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Changing the Site URL of WP</title>
		<link>http://wpmupremium.com/news/2008/12/28/changing-the-site-url-of-wp/</link>
		<comments>http://wpmupremium.com/news/2008/12/28/changing-the-site-url-of-wp/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 04:52:49 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=114</guid>
		<description><![CDATA[Have you ever wondered what was the best and most easiest ways to change the Site URL of a Wordpress installation? The Wordpress Codex provides a list of solutions, and although this is not exactly a hack, it is an article that often gets forgotten about or never read properly in the first place.
]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered what was the best and most easiest ways to change the Site URL of a Wordpress installation? The <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">Wordpress Codex</a> provides a list of solutions, and although this is not exactly a hack, it is an article that often gets forgotten about or never read properly in the first place.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/28/changing-the-site-url-of-wp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Inserting Ads into RSS Feeds</title>
		<link>http://wpmupremium.com/news/2008/12/28/inserting-ads-into-rss-feeds/</link>
		<comments>http://wpmupremium.com/news/2008/12/28/inserting-ads-into-rss-feeds/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 04:49:13 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=112</guid>
		<description><![CDATA[WP Recipes have provided a neat way to insert Ad units into RSS feeds.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wprecipes.com/hack-insert-ads-in-your-rss-feed" target="_blank">WP Recipes</a> have provided a neat way to insert Ad units into RSS feeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/28/inserting-ads-into-rss-feeds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Author Profiles for Posts</title>
		<link>http://wpmupremium.com/news/2008/12/28/author-profiles-for-posts/</link>
		<comments>http://wpmupremium.com/news/2008/12/28/author-profiles-for-posts/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 04:30:34 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=107</guid>
		<description><![CDATA[Stylized Web offer-up a solution for including an image of the author and his user profile description within The Loop...]]></description>
			<content:encoded><![CDATA[<p><a href="http://stylizedweb.com/2008/10/14/wordpress-post-author-description/" target="_blank">Stylized Web</a> offer-up a solution for including an image of the author and his user profile description within The Loop, which is as simple as:</p>
<div class="box-code">&lt;?php   echo get_avatar( get_the_author_id(), &#8216;65&#8242; );   ?&gt; &lt;strong&gt;&lt;a href=&#8221;&lt;?php the_author_url(); ?&gt; &#8220;&gt;&lt;?php the_author(); ?&gt;&lt;/a&gt;&lt;/strong&gt;<br />
&lt;?php the_author_description(); ?&gt;</div>
<p>The article also links to <a href="http://themetation.com/2008/07/08/how-to-display-author-photo-in-wordpres/" target="_blank">Kailoon&#8217;s</a> alternative solution without Gravatars.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/28/author-profiles-for-posts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding Comment Numbers to Posts</title>
		<link>http://wpmupremium.com/news/2008/12/28/adding-comment-numbers-to-posts/</link>
		<comments>http://wpmupremium.com/news/2008/12/28/adding-comment-numbers-to-posts/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 04:21:44 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=103</guid>
		<description><![CDATA[If you want more control over the numbering of comments, as opposed to the inherit ordered-list style, Wordpress Hacks have a useful article outlining how to generate an independent number that you can float and style however you wish...]]></description>
			<content:encoded><![CDATA[<p>If you want more control over the numbering of comments, as opposed to the inherit ordered-list style, <a href="http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/" target="_blank">Wordpress Hacks</a> have a useful article outlining how to generate an independent number that you can float and style as you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/28/adding-comment-numbers-to-posts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Integrating Google Custom Search with WP</title>
		<link>http://wpmupremium.com/news/2008/12/28/integrating-google-custom-search-with-wordpress/</link>
		<comments>http://wpmupremium.com/news/2008/12/28/integrating-google-custom-search-with-wordpress/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 03:48:57 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=100</guid>
		<description><![CDATA[Wordpress Hacks has listed a good set of resources for integrating Google’s custom search engine with Wordpress...]]></description>
			<content:encoded><![CDATA[<p><a href="http://wphacks.com/how-to-build-google-custom-search-engine-wordpress-blog/" target="_blank">Wordpress Hacks</a> has listed a good set of resources for <a href="http://firewalker.kamusilmiah.com/wordpress-search-as-custom-google-search-without-additional-page-or-post/" target="_blank">integrating</a> Google&#8217;s <a href="http://www.doshdosh.com/how-to-set-up-google-custom-search-and-make-money/" target="_blank">custom search</a> engine with Wordpress.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/28/integrating-google-custom-search-with-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding Adsense Anywhere in Posts</title>
		<link>http://wpmupremium.com/news/2008/12/20/adding-adsense-anywhere-in-posts/</link>
		<comments>http://wpmupremium.com/news/2008/12/20/adding-adsense-anywhere-in-posts/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 12:12:02 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=76</guid>
		<description><![CDATA[WP Recipes just published a useful article outlining how it becomes possible to add Google ads in the middle of posts, which also helps to show the way towards creating your own short-codes, which in theory, could be used for anything.  Excellent stuff indeed.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wprecipes.com/how-to-embed-adsense-anywhere-on-your-posts/" target="_blank">WP Recipes</a> just published a useful article outlining how it becomes possible to add Google ads in the middle of posts, which also helps to show the way towards creating your own short-codes, which in theory, could be used for anything.  Excellent stuff indeed.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/20/adding-adsense-anywhere-in-posts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Smashing WP MySQL Hacks</title>
		<link>http://wpmupremium.com/news/2008/12/20/smashing-wp-mysql-hacks/</link>
		<comments>http://wpmupremium.com/news/2008/12/20/smashing-wp-mysql-hacks/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 12:09:27 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=74</guid>
		<description><![CDATA[Smashing Magazine recently added an interesting article to their ever-helpful blog that detailed a good list of really useful Wordpress MySQL Hacks ranging from resetting URLs and passwords through to displaying queries and rendering times.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/" target="_blank">Smashing Magazine</a> recently added an interesting article to their ever-helpful blog that detailed a good list of really useful Wordpress MySQL Hacks ranging from resetting URLs and passwords through to displaying queries and rendering times.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/20/smashing-wp-mysql-hacks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WP Recipes (Hacks)</title>
		<link>http://wpmupremium.com/news/2008/12/14/wp-recipes-hacks/</link>
		<comments>http://wpmupremium.com/news/2008/12/14/wp-recipes-hacks/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 08:09:03 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[WP Hacks]]></category>

		<guid isPermaLink="false">http://wpmupremium.com/news/?p=31</guid>
		<description><![CDATA[For the very best and most up-to-date WP Hacks, we strongly recommend WP Recipes&#8230;
]]></description>
			<content:encoded><![CDATA[<p>For the very best and most up-to-date WP Hacks, we strongly recommend <a href="http://www.wprecipes.com/" target="_blank">WP Recipes</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/news/2008/12/14/wp-recipes-hacks/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
