<?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>:: TechBlog :: &#187; Grazr</title>
	<atom:link href="http://techblog.touchbasic.com/html/tag/grazr/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.touchbasic.com/html</link>
	<description>Techblog is collection of articles covering a wide variety of tech related topics including: Linux, Microsoft, Google, web development, web design, open source, wordpress, security, and more.</description>
	<lastBuildDate>Fri, 06 May 2011 00:58:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Live Category-based OPML template for WordPress 2.0</title>
		<link>http://techblog.touchbasic.com/html/live-category-based-opml-template-for-wordpress-20/</link>
		<comments>http://techblog.touchbasic.com/html/live-category-based-opml-template-for-wordpress-20/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 18:12:38 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[Grazr]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[live categories]]></category>
		<category><![CDATA[opml]]></category>
		<category><![CDATA[OPMLBuilder]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[Share your OPML]]></category>
		<category><![CDATA[synchronize]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[wordpress template]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=173</guid>
		<description><![CDATA[ok, here&#8217;s a little something i&#8217;ve been messing with.. i wanted to generate an OPML file based on all the different types of feeds offered with the default WordPress installation. that is, every WP site has a &#8220;main&#8221; site feed (in rdf, rss, and atom), but there are also category (and subcategory) feeds, as well [...]]]></description>
			<content:encoded><![CDATA[<p>ok, here&#8217;s a little something i&#8217;ve been messing with..</p>
<p>i wanted to generate an OPML file based on all the different types of feeds offered with the default WordPress installation. that is, every WP site has a &#8220;main&#8221; site feed (in rdf, rss, and atom), but there are also category (and subcategory) feeds, as well as feeds for each author. There are even feeds for tags if you use the <a href="http://www.neato.co.nz/ultimate-tag-warrior/">UTW</a> plugin but i won&#8217;t get into that now.</p>
<p>i guess i was originally inspired by the relatively new service offered by <a href="http://grazr.com/">Grazr</a>. Add to that the cool things you can do with <a href="http://www.feedshow.com/goodies/opml/OPMLBuilder-create-opml-from-rss-list.php">OPMLBuilder</a> and the awesome potential of <a href="http://share.opml.org/">Share your OPML</a>.. </p>
<p>and well, i got to thinking (more like scheming).</p>
<div style="border:1px solid #000;float:left;margin:20px 10px;"><img src="http://techblog.touchbasic.com/html/wp-images/uploads/wordpress_logo.gif" alt="WordPress 2.0 logo" /></div>
<div style="border:1px solid #000;float:left;margin:20px 10px;"><img src="http://techblog.touchbasic.com/html/wp-images/uploads/opml_icon.gif" alt="OPML icon" /></div>
<div style="border:1px solid #000;float:left;margin:20px 10px;"><img src="http://techblog.touchbasic.com/html/wp-images/uploads/grazr_logo.gif" alt="Grazr logo" /></div>
<div style="clear:both;"></div>
<p>hmm, the one thing that i couldn&#8217;t seem to figure out was why there didn&#8217;t seem to be a way to  synchronize the feeds in your OPML file and thus ensure that it is always kept up to date. this would make it more useful to me, but i suspect it would be a lot more useful to others too &#8211; who in a shared environment (like on Share your OPML) &#8211; aren&#8217;t necessarily going to know when you add or remove feeds from this your file. essentially, i wanted to be able to create an OPML file, on-the-fly, based on WordPress categorization that would stay current even after i&#8217;ve added or deleted categories.</p>
<p><span class="under">To do this</span>:</p>
<ul>
<li>i created a new WP Template file and called it opml.php</li>
<li>i used this new template file to create a WordPress &#8220;Page&#8221; called opml (you don&#8217;t need to put any text in this page just use the OPML Template file (opml.php) instead of the Default Template page and you&#8217;re good to go)</li>
</ul>
<p><span id="more-173"></span></p>
<p><span class="under">What it does</span>:</p>
<ul>
<li>queries the wpdb for all your WP categories (minus any empty categories &#8211; ie: ones without posts)</li>
<li>excludes any additional categories that you specify (&#8220;Uncategorized&#8221; is excluded by default)</li>
<li>creates a &#8220;live&#8221; OPML file (actually it&#8217;s a URL) based on all your site&#8217;s categories but you can easily click on &#8220;view source&#8221; and copy/paste that code into a local text file (save it as filename.opml)</li>
</ul>
<p><span class="under">What you can do with this file</span>:</p>
<ul>
<li>import the OPML into your favorite feedreader (that supports URL imports)</li>
<li>create a local OPML file (as described earlier) and import it into your favorite feedreader (that supports OPML file uploads)</li>
<li>add your OPML to a directory like Share your OPML ( http://share.opml.org/ )</li>
<li>use  your OPML to browse your site with Grazr</li>
</ul>
<p><span class="under">How to get it all working</span>:</p>
<ol style="font-weight:bold;">
<li>download the new template file from here [ <a href="http://www.touchbasic.com/code/opml.phps">opml.phps</a> ] (right-click and choose &#8220;Save Link As..&#8221; or &#8220;Save Target As..&#8221;)</li>
<li>rename opml.phps to opml.php and drop it in your template directory</li>
<li>optionally edit the template file to manually add more categories to the exclude list* (other than the default &#8220;Uncategorized&#8221;)</li>
<li>create your new WP Page and call it &#8220;opml&#8221; (you can call it anything but in this case the OPML URL would be http://www.yourdomain.com/opml/)</li>
<li>make sure that permalinks are turned on (otherwise i doubt any of this will work)</li>
<li>try it out in your feedreader, on Share your OPML, or with Grazr</li>
</ol>
<p><em><strong>*</strong> the exclude list is just a list of category IDs you don&#8217;t want to display and formatted as:<br />
$opmlcatid == &#8217;1&#8242; || $opmlcatid == &#8217;2&#8242; || $opmlcatid == &#8217;3&#8242; || and so on..</em></p>
<p><span class="under">Examples</span>:</p>
<ul>
<li>you can see it all in action on the <a href="http://www.indyish.com/networking/">Indyish Networking</a> page where visitors can use Grazr to quickly browse the entire site for content, feeds, and more.</li>
<li>or, embedded right here in this page</li>
</ul>
<div style="height:350px;width:500px;margin-bottom:50px;">
<a href="http://grazr.com/gzpanel.html?font=Arial,Helvetica&#038;fontsize=9pt&#038;linktarget=grazrwin&#038;view=o&#038;file=http://www.indyish.com/opml" target="gz"><img src="http://grazr.com/images/grazrbadge.png" border="0"/></a><br />
<script defer="defer" type="text/javascript" src="http://grazr.com/gzloader.js?font=Arial,Helvetica&amp;fontsize=9pt&amp;linktarget=grazrwin&amp;view=o&amp;file=http://www.indyish.com/opml"></script>
</div>
<p><span class="under">Known Issues</span>:</p>
<ul>
<li>[ resolved: <a href="http://techblog.touchbasic.com/html/live-category-based-opml-template-for-wordpress-20/#comments">see comments</a> ] <del datetime="2006-10-03T18:02:37+00:00">i&#8217;m not an expert php programmer but for some reason there seems to be a problem when using Grazr (in &#8220;Slider&#8221; mode) where if you drill down into the category and subcategory feeds &#8211; navigating backwards becomes a bit retarded. it goes back to the wrong category and all you see is a completely blank page. Fortunately, you can just keep clicking backward (or the &#8220;home&#8221; icon, or the &#8220;refresh&#8221; icon) to get to the top of the directory and start over. Furethermore, i temporarily worked around this problem by switching the default view-mode in Grazr, from &#8220;Slider&#8221; to &#8220;Outline&#8221;</del></li>
</ul>
<p><span class="under">Up Next</span>:</p>
<ol>
<li>i&#8217;d like to get it to list all author feeds as well [ <strong>Update</strong>: this is done. just grab <a href="http://www.touchbasic.com/code/opml-authors.phps">opml-authors.phps</a>, rename it to opml-authors.php, and drop it in your WP template directory. then, uncomment the 2nd to last line of php in opml.php ] *This will only select Users who have the &#8220;Author&#8221; capability in WordPress. Authors without any published posts are excluded by default. You can also exclude other Authors by manually editing opml-authors.php &#8211; similar to the way i described earlier</li>
<li>i&#8217;d like to get it to list all Links in WP (ie: the default &#8220;Blogroll&#8221;, and any other link categories you create in the WP backend)  [ <strong>Update</strong>: this is done. just grab <a href="http://www.touchbasic.com/code/opml-links.phps">opml-links.phps</a>, rename it to opml-links.php, and drop it in your WP template directory. then, uncomment the last line of php in opml.php ] *you can also exclude Link Categories by manually editing opml-links.php &#8211; similar to the way i described earlier</li>
<li>i&#8217;d like to get it to be a simple WP plugin</li>
</ol>
<p><strong><em>if anyone has time, and wants to take a crack at any of these (or if you see any other ways to improve upon any of this i&#8217;d love to hear about it &#8211; leave lots of comments)</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/live-category-based-opml-template-for-wordpress-20/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

