<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>A Division by Zer0 &#187; Coding</title>
	<atom:link href="http://dbzer0.com/blog/category/undefined_remainder/coding/feed" rel="self" type="application/rss+xml" />
	<link>http://dbzer0.com</link>
	<description>A bug in the code of the universe.</description>
	<lastBuildDate>Sat, 11 Feb 2012 14:28:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Preparing for a long-time-coming upgrade</title>
		<link>http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade</link>
		<comments>http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade#comments</comments>
		<pubDate>Tue, 25 Aug 2009 10:43:44 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[HemingwayEx]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=2759</guid>
		<description><![CDATA[After squashing a showstopping bug, I'm finally ready to upgrade my theme to the newest version and hopefully jump start its development, on my own if necessary.]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 250px;">
<dt class="wp-caption-dt"><a href="http://www.flickr.com/photos/24201822@N00/2515423894"><img title="The Keyboard Parade" src="http://dbzer0.com/wp-content/uploads/2009/08/2515423894_71296869b7_m.jpg" alt="The Keyboard Parade" width="240" height="180" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image by <a href="http://www.flickr.com/photos/24201822@N00/2515423894">theopie</a> via Flickr</dd>
</dl>
</div>
</div>
<p>I&#8217;m finally preparing to upgrade my theme to the latest version (ie the next part in my <a href="http://dbzer0.com/blog/theme-upgrade-fail">ongoing attempts</a> to upgrade) as I really should finally start using wordpress widgets. Unfortunately the theme seems to be unmaintained at the moment and the author MIA since April this year. Also the theme still hasn&#8217;t been moved to the shiny new official <a href="http://wordpress.org/extend/themes/">WordPress repository</a> which tells me that Nalin must have lost all interest in it.</p>
<p>Hopefully I&#8217;m wrong. I&#8217;ve sent him an email and <a href="http://www.nalinmakar.com/forum/comments.php?DiscussionID=125">left a forum post</a> asking to add to the repository and allow me to pickup the maintenance if he&#8217;s not interested anymore. If he doesn&#8217;t come back to me, I&#8217;ll unfortunately have to <a href="http://en.wikipedia.org/wiki/Fork_%28software_development%29">fork</a> it in order to make it compatible with newer version of WordPress and to merge the changes I&#8217;ve made into it for others to use. We&#8217;ll see.</p>
<p>Some of the things I&#8217;m planning to add/modify are</p>
<ul>
<li>Support for the new way of styling so that it works properly <a href="http://www.zemanta.com/blog/zemanta-tip-image-align-in-wordpress/">with Zemanta</a> and builtin alignments.</li>
<li>Option to enable drop-down menus for the header (as you see above) through suckerfish and possibly <a href="http://users.tpg.com.au/j_birch/plugins/superfish/">superfish</a> in the future.</li>
<li>More options to tweak.</li>
<li>Widgetize the single-post sidebar to allow some content in the generally empty area on the left.</li>
<li>Hardcoded support for the various plugins I&#8217;m currently using. So for example, if you install <a href="http://dbzer0.com/blog/finally-a-way-the-audience-to-rate-posts-based-on-emotion">emo-vote</a>, there code will already be in your theme to activate it but nothing will be visible if the plugin is missing. I will probably add support for tweaking these plugins in the options page as well.</li>
</ul>
<p>And that&#8217;s for starters. Fortunately I see that the community around this theme is still alive so I&#8217;m guessing I&#8217;ll be getting more ideas for addition from there as well.</p>
<p>I&#8217;m still running my old theme since I managed to debug the suckerfish issue a few minutes before I left for work today, but now that my biggest hurdle is resolved, I&#8217;ll soon my changing into &#8220;fresh clothes&#8221; so to speak.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/a1c90ee2-46b1-4f11-8462-8963e3b829f9/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=a1c90ee2-46b1-4f11-8462-8963e3b829f9" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/theme-upgrade-fail" rel="bookmark" title="June 15, 2008">Theme Upgrade Fail</a>
 | <a href="http://dbzer0.com/blog/fsdaily-sidebar" rel="bookmark" title="February 22, 2008">FSDaily Sidebar</a>
 | <a href="http://dbzer0.com/blog/why-setting-up-your-own-self-hosted-wordpress-blog-is-not-hard" rel="bookmark" title="August 27, 2008">Why setting up your own self-hosted wordpress blog is not hard.</a>
<!-- Similar Posts took 66.457 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Dreamhost PS simply a way for Dreamhost to wash their hands of support?</title>
		<link>http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support</link>
		<comments>http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support#comments</comments>
		<pubDate>Wed, 04 Feb 2009 14:56:16 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Site Updates]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP Super Cache]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=2171</guid>
		<description><![CDATA[I've moved the site to Dreamhost's VPS offering but my support experience since has been less than optimal. Are we on our own?]]></description>
			<content:encoded><![CDATA[<p>Another month, another total crapdown of my sites which are hosted at the moment in <a href="http://www.dreamhost.com/hosting-vps.html">Dreamhost&#8217;s Virtual Private Server</a> offering. Once again the story begins in the usual way, all three of my &nbsp;sites start puking Internal Server Errors all over the place which generally means that you are out of available RAM on your server. As I generally have about 180 Mb of availability, it would meant that either I have a huge amount of traffic that my Cache did not alleviate, or that something is going wrong on the server.</p>
<p>Going to the Resource Management, I am greeted by a classic figure</p>
<div id="attachment_2172" class="wp-caption aligncenter" style="width: 310px"><a href="http://dbzer0.com/wp-content/uploads/2009/02/dreamhost_ram_load.png"><img class="size-medium wp-image-2172" title="PS Ram Load" src="http://dbzer0.com/wp-content/uploads/2009/02/dreamhost_ram_load-300x123.png" alt="Up, up and away!" width="300" height="123"></a><p class="wp-caption-text">Up, up and away!</p></div>
<p>Having looked at my traffic already which had stayed steady in the last days, I know that this is certainly caused by some server/app malfunction. I know this from experience because the same goddamn problem happens to me so regularly, it&#8217;s not even funny anymore.</p>
<p>Since this happened while I was at work, I could troubleshoot it through the terminal as they have the ssh ports blocked so I had to wait until I came back home to investigate. Once I arrived, I fired up an ssh connection and checked what processes were running. As expected, it was PHP in CGI mode that was sucking my life&#8217;s blood.</p>
<div id="attachment_2184" class="wp-caption aligncenter" style="width: 310px"><a href="http://dbzer0.com/wp-content/uploads/2009/02/php5cgi.png"><img class="size-medium wp-image-2184" title="Runaway Processes" src="http://dbzer0.com/wp-content/uploads/2009/02/php5cgi-300x109.png" alt="Bad PHP. Baaaad!" width="300" height="109"></a><p class="wp-caption-text">Bad PHP. Baaaad!</p></div>
<p>Now mind you, I know all this because I&#8217;ve done it before where I had to google around and learn which commands to use to discover this info. The first time it happened, my ram usage was slowly creeping upwards in jumps of 30 Mb per week or so. After that, it simply happens all at once suddenly.</p>
<p>Now this is extremelly difficult to troubleshoot as you can have no idea what is causing this. A php5.cgi process can be anything under the sun that runs on PHP. Basically the whole wordpress interface or any of the dozens of plugins I have installed. You can kill the processes but this will not tell you what is happening and as it does not happen persistently, you can&#8217;t figure out which plugin might be causing it as shutting down a plugin does not stop the process and you don&#8217;t know when a process will get stuck again.</p>
<p>Unfortunately, and this is what is annoying me mostly, Dreamhost&#8217;s answer in the past has been that &#8220;It&#8217;s not our fault. Figure it out yourself&#8221;. A very unfulfilling answer as you might guess. But at least I know that I can expect very little help from them anymore so I avoid them.</p>
<p>So then I got to process killing. Unfortunately this time it seems that I had found a resistant strain of bug. As soon as I killed a process, 5 seconds later and a new one would be spawned, then another and another, until all my RAM was eaten up, no matter how much I increased my available. At this point I was fast reaching a deadend with my current skills as I couldn&#8217;t make the problem go away. I couldn&#8217;t even access my wordpress&#8217; admin panel to disable plugins.</p>
<p>At this point, a former colleague suggested that this might be caused by <a href="http://paul-m-jones.com/?p=262">a known PHP 5.2 bug</a> which leaves processes hanging when done with them. I thought this might be a good thing to suggest to Dreamhost support to check so I fired up a support ticket.</p>
<p>A while later, I noticed that the RAM usage seemed to have dropped off so I thought that the problem had resolved itself. Unfortunately, while the main page was working the admin panel refused to work.</p>
<div id="attachment_2177" class="wp-caption aligncenter" style="width: 310px"><a href="http://dbzer0.com/wp-content/uploads/2009/02/admin_panel.png"><img class="size-medium wp-image-2177" title="Dead Admin Panel" src="http://dbzer0.com/wp-content/uploads/2009/02/admin_panel-300x80.png" alt="What admin panel. There's no such thing here" width="300" height="80"></a><p class="wp-caption-text">What admin panel. There's no such thing here</p></div>
<p>In desperation I did a quick server reboot and this was the point where the universe b0rked. After the reboot the whole site was off and my memory usage was stuck at around 20Mb which means that basically the whole thing failed to load. I fired a new ticket to support and waited.</p>
<p>I had to wait until today for an answer which basically told me that they managed to get the sites running again but advised me that my RAM usage was high so I should be checking that and no, they still can&#8217;t help me. Thanks Sherlock&#8230;</p>
<p>Looking around the interwebs however, I did <a href="http://wiki.dreamhost.com/Fine_Tuning_Your_WordPress_Install#Caching">stumble on a page</a> in the dreamhost wiki where there was a note under supercache under caching that warned not to utilize the &#8220;super&#8221; part of <a href="http://ocaoimh.ie/wp-super-cache/">WP Super Cache</a> as it may drive resource use up on Private Servers. Gee, it would be nice if I knew of this a bit before. It would also be nice if Super Cache was not installed as part of the standard one-click installation of WordPress by Dreamhost which makes people assume that if anything, this plugin will be working well.</p>
<p>So I disabled Supercache on the Division by Zer0 and on the Wesnoth Journals and killed the remaining php processes. Lo and behold, no more processes were spawned. Unfortunately I was lucky that I could access the admin panel of these two sites after I increased my available resources to some ungawdly amount (1.5Gb of RAM or so). Unfortunately I was not so lucky in the <a href="http://www.antichristian-phenomenon.com/">Antichristian Phenomenon</a> where not only I could not access the admin panel (never finished loading) anymore but the php processes kept spawning repeatedly and fast.</p>
<p>I tried deleting the plugin directory which led to my whole page being turned off. I tried fixing the .htaccess file. Nothing. Anything I tried, I couldn&#8217;t get the site to work properly. So I did the only thing I could do, renamed the whole wordpress directory and reinstalled again. At least this gave me an opportunity to finally rename the prefix of my database tables which helps avoid zero-day exploits by script kiddies. After a few hours, the site was back online.</p>
<p>Unfortunately the latest ordeal has really disillusioned me about Dreamhost&#8217;s PS and their support of those. From the 3 times I&#8217;ve contacted them about issues in randomly increasing resources, their reply has been &#8220;Deal with it yourself&#8221; because apparently now I control everything on the server and if anything goes wrong, it must be my own scripts or whatever. Seeing as I only use standard software like WordPress and Gallery this reply does not help me much.</p>
<p>Basically what seems to be happening is that when one decides to go to a PS in order to get a bit more speed (since shared hosting seems at time to be powered by hamsters) you&#8217;re on your own. If you&#8217;re not a (quite) techical user and have made the grave error of installing wordpress plugins on your site, you&#8217;re fucked. It seems that as far as Dreamhost is concerned, you shouldn&#8217;t be running plugins in the first place. Just vanilla WordPress for you.</p>
<p>Luckily for me, I know a few UNIX commands and how to use an ssh shell to do some troubleshooting. However even for me this kind of response is definitelly inferior. It would be nice if I could expect the Dreamhost support to ask questions like &#8220;Are you using WP Super Cache?&#8221;, or something similar. It would be nice to expect the support people to know of a few issues that generally might cause this kind of trouble. Is this is all too much to ask? Is it too much to ask to expect some attempt to help your users?</p>
<p><a href="http://dbzer0.com/blog/this-is-why-i-like-dreamhost">Last time</a> I was delighted when the support tech gave me a simple command to help me trouble shoot but since then, all replies have been to explain me that it&#8217;s my own damn fault and this is very disheartening. To everyone considering the Private Server offering, if you&#8217;re not very technical and open to spending a few hours now and then to troubleshoot random issues that occur without you changing anything, then stay away from it and stick to simple shared hosting.</p>
<p>As for me, now my sites are all in the classic WP Cache mode and I&#8217;ve used <a href="http://www.satollo.com/english/wordpress/hyper-cache">Hyper Cache</a> for the ACP to see how it goes. If all goes fine, I will switch everything to Hyper Cache and drop Super Cache altogether. &#8216;Till next time my site craps down&#8230;</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/d1452fae-a3d2-4980-af69-fc99143b4624/"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=d1452fae-a3d2-4980-af69-fc99143b4624" alt="Reblog this post [with Zemanta]"></a></div>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/of-wordpress-caches-and-fast-phps" rel="bookmark" title="February 6, 2009">Of WordPress Caches and Fast PHPs</a>
 | <a href="http://dbzer0.com/blog/this-is-why-i-like-dreamhost" rel="bookmark" title="September 5, 2008">This is why I like dreamhost</a>
 | <a href="http://dbzer0.com/blog/dreamhost-ps-activated" rel="bookmark" title="July 2, 2008">Dreamhost PS activated!</a>
<!-- Similar Posts took 115.849 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/is-dreamhost-ps-simply-a-way-for-dreamhost-to-wash-their-hands-of-support/feed</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>I love WordPress! Now I&#8217;ve got a series plugin</title>
		<link>http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin</link>
		<comments>http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin#comments</comments>
		<pubDate>Mon, 24 Nov 2008 23:41:58 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[organize series]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Site Updates]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=1859</guid>
		<description><![CDATA[As I&#8217;ve been progressing with my misunderstanding communism series it has become to me painfully obvious that I need a better way to organise the links and the format of it in a much better way than what I&#8217;ve been doing until now. Specifically, what I have been doing was to copy paste a small [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve been progressing with my <a href="http://dbzer0.com/blog/misunderstanding-communism-its-not-ussr">misunderstanding communism</a> series it has become to me painfully obvious that I need a better way to organise the links and the format of it in a much better way than what I&#8217;ve been doing until now. Specifically, what I have been doing was to copy paste a small introduction text within a style-customized &lt;div&gt; and then manually update the links towards the previous and next articles.</p>
<p>This is what I had been doing in my <a href="http://dbzer0.com/the-penguin-migration/self-hosting-with-wordpress">self-hosting with WordPress</a> series as well and, frankly it was an annoying process. I thought that there must be a more optimal way to go about doing this and fortunately others had the same idea as me.</p>
<p>A quick search for relevant plugins immediately landed me two results. Without knowing the difference, I simply went for the one which has been updated more recently (plugin developers, this is why it pays to keep your code up to date): <a href="http://unfoldingneurons.com/neurotic-plugins/organize-series-wordpress-plugin">Organise Series</a></p>
<p>This one takes the more exciting road of actually using the wordpres taxonomy capabilities and creating a new one. As such I do not have to mix up my already existing tags or categories (which would appear in the various parts of my theme) and I can rest assured that I will not b0rk it by mistake.</p>
<p>I faced the first hurdle when I discovered that the plugin <a href="http://unfoldingneurons.com/forums/topic/settings-url-in-options-page-is-wrong">did not have the correct link structure for the options page</a> and eventually that it is not yet ready for WordPress 2.6. However actually opening my eyes a bit more showed me that some kind soul has already submitted patches for this and the beta versions are working. Thus, since I had already initialized it anyway, I took the dive and upgraded to <a href="http://unfoldingneurons.com/2008/organize-series-208beta-release">the developer version</a> No problems there.</p>
<p>Then I set about making it look good. It took me a while to figure it out but the author of the plugin has gone into the trouble of writing a use <a href="http://unfoldingneurons.com/series/organize-series-usage-tips">howto&#8230;well, series</a>, which goes quite in depth. Eventually I figured it out and made my pages look readable again. But as always, I wanted more <em>bling</em>. So, since I&#8217;m already using scriptaculous through <a href="http://dbzer0.com/backlinks">backlinks</a>, why not make my series description available without crowding the actual post, through the nice toggle function. And lo, there was code!</p>
<p>The following went into my &#8220;Series Meta&#8221;, which is the text that appears very first on the post, announcing it as part of the series.</p>
<p><code><br />
&lt;div class="seriesmeta"&gt;This entry is part %series_part% of %total_posts_in_series% in the series %series_title% - &lt;a href="#" onclick="Effect.toggle('series_description', 'slide')"&gt;%series_icon_linked% About this series&lt;/a&gt;&lt;/div&gt;%postcontent%<br />
<!--formatted--></code></p>
<p>This goes into my Series post list Template:<br />
<code><br />
&lt;div class="seriesbox" id="series_description" style="display:none;"&gt;<br />
%series_description%&lt;hr/&gt;<br />
&lt;ul class="serieslist-ul"&gt;%post_title_list%&lt;/ul&gt;<br />
&lt;/div&gt;%postcontent%<br />
<!--formatted--></code></p>
<p>And thus, after customizing the css a bit, you get the nice result you see now in any post in the series where you can click on the link and the description of the series, along with the whole list of posts drops down for your viewing pleasure. And I didn&#8217;t even had to hack my theme as you can do all this from the options page. Sweet!</p>
<p>The plugin has other nice options like the ability to assign an icon/image to a series, a <a href="http://dbzer0.com/series">standalone series page</a> and the capability to read all the posts in a row when clicking on their series link. Unfortunately for me the last does not work as it simply kills the html loading of the page. I assume this is because it&#8217;s not yet fully compatible with 2.6 but I&#8217;m going to soon open a bug about it.</p>
<p>All in all, I like!</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/backlinks" rel="bookmark" title="October 19, 2008">Backlinks</a>
 | <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs" rel="bookmark" title="June 22, 2008">Memberlist for Collaborative WordPress Blogs</a>
 | <a href="http://dbzer0.com/blog/gallery-tags-not-working" rel="bookmark" title="January 21, 2008">Gallery tags not working</a>
<!-- Similar Posts took 3.807 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to load a javascript through your wordpress plugin</title>
		<link>http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin</link>
		<comments>http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin#comments</comments>
		<pubDate>Sun, 19 Oct 2008 14:25:17 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Planet-LGU]]></category>
		<category><![CDATA[backlinks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[scriptaculous]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=1629</guid>
		<description><![CDATA[I&#8217;ve been struggling today to manage to make Backlinks to use the Scriptaculous script library in order to have the list of backlinks hidden until the viewer chooses to see them. While in the Division by Zer0 I already have those libraries loaded for my navigation, it&#8217;s certain that not everyone who is going to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling today to manage to make <a href="http://dbzer0.com/backlinks">Backlinks</a> to use the Scriptaculous script library in order to have the list of backlinks hidden until the viewer chooses to see them. While in the Division by Zer0 I already have those libraries loaded for my navigation, it&#8217;s certain that not everyone who is going to use it does the same.</p>
<p>Initially I was thinking of simply asking everyone to use a plugin loading these libraries as a dependency but that&#8217;s simply over the top for something this simple. Instead I decided to find out how to load the script within the plugin and to my delight I found out that not only does wordpress has <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">functions explicitly for this purpose</a>, but it already includes most common javascript libraries, inclusing Scriptaculous.</p>
<p>Unfortunately, although there were a number of guides trying to explain how to use this, none of them was complete. Simply adding enqueue_script in my function didn&#8217;t work and I couldn&#8217;t see a full example.</p>
<p>Fortunately someone had thought to add a mailing list discussion which <a href="http://comox.textdrive.com/pipermail/wp-hackers/2008-March/018990.html">gave me the solution</a> after a few pages. I need to use the <a href="http://wphooks.flatearth.org/hooks/template_redirect/">template_redirect</a> hook (wp_head is not good, I tried) and I need to put that at the very start of my plugin, after the information but before any function begins. It then needs to call a function which enqueues the scriptaculous effects of which &#8220;blind&#8221; is used by Backlinks</p>
<p>The end result looks like this</p>
<p><code>add_action(&#039;template_redirect&#039;, &#039;addeffects&#039;);<br />
function addeffects() {<br />
if (function_exists(&#039;wp_enqueue_script&#039;)) wp_enqueue_script(&#039;scriptaculous-effects&#039;);<br />
}</code></p>
<p>Of course, the name of the function can be anything you like and you can call any javascript library you wish instead of scriptaculous-effects. Feel free to download the whole plugin to see the whole code.</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin" rel="bookmark" title="November 25, 2008">I love WordPress! Now I&#8217;ve got a series plugin</a>
 | <a href="http://dbzer0.com/blog/backlinks" rel="bookmark" title="October 19, 2008">Backlinks</a>
 | <a href="http://dbzer0.com/blog/clickcomments-on-feed" rel="bookmark" title="April 7, 2008">ClickComments on Feed</a>
<!-- Similar Posts took 4.074 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backlinks</title>
		<link>http://dbzer0.com/blog/backlinks</link>
		<comments>http://dbzer0.com/blog/backlinks#comments</comments>
		<pubDate>Sun, 19 Oct 2008 10:59:28 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Planet-LGU]]></category>
		<category><![CDATA[backlinks]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=1624</guid>
		<description><![CDATA[I just created a new plugin which allows you to display backlinks for your posts similar to the way it exists in Blogger. It is called, appropriately Backlinks. If you do not like that wordpress does not display links coming from blogs that utilize trackbacks, or if you simply want a simply list of incoming [...]]]></description>
			<content:encoded><![CDATA[<p>I just created a new plugin which allows you to display <a href="http://help.blogger.com/bin/answer.py?answer=42533">backlinks</a> for your posts similar to the way it exists in Blogger. It is called, appropriately <a href="http://dbzer0.com/the-penguin-migration/backlinks">Backlinks</a>.</p>
<p>If you do not like that wordpress does not display links coming from blogs that utilize trackbacks, or if you simply want a simply list of incoming links (instead of having them scattered in your comments), this is for you.</p>
<p>If it still in the very first version so it is quite basic. I plan in the future that have a configuration page, the ability to hide or display the links (just in case the list gets too long) though scriptalicious etc. For the moment you can simply put it anywhere in a template and it will automatically show you blogs linking there.</p>
<p>Let me know what you think or if you have any ideas that might make it better.</p>
<p>UPDATE: I&#8217;ve now managed to get the plugin to hide the results until the header/link is clicked. This will save people with a lot of incoming links from having a huge list in the middle.</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/backlinks?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/backlinks?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/backlinks?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/backlinks?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/backlinks?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/how-to-load-a-javascript-through-your-wordpress-plugin" rel="bookmark" title="October 19, 2008">How to load a javascript through your wordpress plugin</a>
 | <a href="http://dbzer0.com/blog/i-love-wordpress-now-ive-got-a-series-plugin" rel="bookmark" title="November 25, 2008">I love WordPress! Now I&#8217;ve got a series plugin</a>
 | <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs" rel="bookmark" title="June 22, 2008">Memberlist for Collaborative WordPress Blogs</a>
<!-- Similar Posts took 3.381 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/backlinks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last.fm activity now in Complexlife</title>
		<link>http://dbzer0.com/blog/lastfm-activity-now-in-complexlife</link>
		<comments>http://dbzer0.com/blog/lastfm-activity-now-in-complexlife#comments</comments>
		<pubDate>Sun, 28 Sep 2008 00:14:35 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[complexlife]]></category>
		<category><![CDATA[Last.fm]]></category>
		<category><![CDATA[Lifestream]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Yahoo Pipe]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=1458</guid>
		<description><![CDATA[Last.fm is one of the top, if not the best music service out there and it&#8217;s something I&#8217;ve been using for quite a while now. While last.fm includes things like groups, friends, forums and other aspects of a social network, your activities in these was never provided. In the latest version these activities (new friends, [...]]]></description>
			<content:encoded><![CDATA[<p>Last.fm is one of the top, if not the best music service out there and it&#8217;s something I&#8217;ve been using for quite a while now. While last.fm includes things like groups, friends, forums and other aspects of a social network, your activities in these was never provided. In the latest version these activities (new friends, loved songs etc) were shown in the form of a little block in the sidebar but unfortunately there has been no way to grab that for use in <a href="http://dbzer0.com/the-penguin-migration/complexlife">Complexlife</a>.</p>
<p>I knew there is a way to get these activities somehow as Friendfeed does show you when you love a track but having asked directly about it in the forum, I was told that getting this in a feed was just not an option.</p>
<p>Fortunately <a href="http://web-mastered.de/post/51575071/last-fm-activity-feed-rss">web-mastered stepped up</a> and created a yahoo pipe which grabs the last.fm latest activities API and returns it as a feed. Very useful but unfrotunately I noticed that it wasn&#8217;t exactly in the format I needed. If I used that in Complexlife then you would only see the title (a generic &#8220;New activity from &lt;username&gt;&#8221;) and having no date info in the feed, b0rked the sort by date of Simplepie.</p>
<p>Thus I had to modify the pipe in a way that</p>
<ol>
<li>Made the content become the title of the post (removing any html which might break Complexlife)</li>
<li>Provide the date in the RSS so that the item can be sorted</li>
</ol>
<h3>Creating the title</h3>
<p>It took me a while to figure it out, but making the content become the title was the easiest part of it all. Since yahoo pipes provides a handy renaming function, all I needed to do is tell it to rename the content as the title</p>
<div id="attachment_1460" class="wp-caption aligncenter" style="width: 377px"><img class="size-full wp-image-1460" title="Renaming" src="http://dbzer0.com/wp-content/uploads/2008/09/rename.png" alt="Renaming the content as Title" width="367" height="102" /><p class="wp-caption-text">Renaming the content as Title</p></div>
<p>The first part copies the whole content as the date field. I will later use this get the date. The second part renames the current content to the title so that it is displayed in whole. If I didn&#8217;t do it, I would get only part of the content displayed with elipsis after 30 characters or so.</p>
<p>Now I need to remove all the html code the activity stream has in. As it includes links to my profile as well as to artists and tracks, this would break the link complexlife puts for each row. The only way to remove the unecessary parts is of course through <a class="zem_slink" title="Regular expression" rel="wikipedia" href="http://en.wikipedia.org/wiki/Regular_expression">regular expressions</a> and yahoo pipes gives exactly that function.</p>
<div id="attachment_1462" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-1462" title="Regular Expressions" src="http://dbzer0.com/wp-content/uploads/2008/09/regex.png" alt="Removing the unecessary parts from the content" width="500" height="173" /><p class="wp-caption-text">Removing the unnecessary parts from the content</p></div>
<p>This part actually goes before the renaming/copying as I remove various parts I also don&#8217;t need from the date field. Thus when I copy, I save duplicating the work.<br />
The most interesting part is the previous the last field, wherein I tell it to remove all html tags (anything between &lt; and &gt;) and all their settings (i.e. target=&#8221;_blank&#8221;). Thus I&#8217;m left with the title in plain text.</p>
<h3>Creating the date</h3>
<p>This was a more tricky part as not only does the last.fm activity stream API consider it a good idea to put the date on the content but it also puts it in as a relevant entry to the current date.</p>
<p>Putting the date in the correct field was the easy part as all I needed to do was copy the content in the date field and remove everything except the date. As right before the date there was a fullstop, it was fairly simple to use another regex to delete anything until the last fullstop</p>
<div id="attachment_1463" class="wp-caption aligncenter" style="width: 625px"><img class="wp-image-1463" title="Getting the date" src="http://dbzer0.com/wp-content/uploads/2008/09/getting-date.png" alt="The regular expression removes everything until the last fullstop" width="615" height="205" /><p class="wp-caption-text">With a little regex magic, anything except the date is gone</p></div>
<p>The more difficult part was to make the relevant fuzzy date to become something that is expected to be in an RSS feed, which is something very specific in time and format. Fortunately, I noticed that there is a specific module that does exactly that: Date builder. How convenient.</p>
<p>Unfortunately this module accepts only strings so I could not really parse my whole feed through it unless I had a loop. Oh wait&#8230;</p>
<div id="attachment_1465" class="wp-caption aligncenter" style="width: 534px"><img class="wp-image-1465" title="Correct Date format" src="http://dbzer0.com/wp-content/uploads/2008/09/correct-date.png" alt="With a loop I can make all date items in the correct format" width="524" height="372" /><p class="wp-caption-text">With a loop I can make all date items in the correct format</p></div>
<p>Sweetness. Unfortunately one problem remains which is that because the date provided is always fuzzy, I end up getting a rolling date for the item each time the pipe is run. For example, an item which has a date of &#8220;one month ago&#8221; today will point to Aug 28, tomorrow on Aug 29 etc. There&#8217;s not much I can do about it other than wait until (and if) last.fm deems it worthy to give us a proper feed.</p>
<p>And now <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=16cd2a80dd2fce58df9ea58731c821f3">my new shiny feed</a> is in exactly the format I need to have for Complexlife to use it. A little hacking later and version 0.9.8 is ready to go. The last.fm activity stream is finally lifestreamable <img src='http://dbzer0.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/96bad634-17f6-498a-9434-f48e5c8593b5/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=96bad634-17f6-498a-9434-f48e5c8593b5" alt="Reblog this post [with Zemanta]" /></a></div>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/lastfm-activity-now-in-complexlife?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/lastfm-activity-now-in-complexlife?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/lastfm-activity-now-in-complexlife?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/lastfm-activity-now-in-complexlife?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/lastfm-activity-now-in-complexlife?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream" rel="bookmark" title="May 8, 2008">An easier way to track your comments in your lifestream</a>
 | <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs" rel="bookmark" title="June 22, 2008">Memberlist for Collaborative WordPress Blogs</a>
 | <a href="http://dbzer0.com/blog/hacked-simplelife" rel="bookmark" title="April 21, 2008">Hacked Simplelife</a>
<!-- Similar Posts took 4.324 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/lastfm-activity-now-in-complexlife/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ComplexLife</title>
		<link>http://dbzer0.com/blog/complexlife</link>
		<comments>http://dbzer0.com/blog/complexlife#comments</comments>
		<pubDate>Sat, 02 Aug 2008 19:54:34 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Planet-LGU]]></category>
		<category><![CDATA[complexlife]]></category>
		<category><![CDATA[Lifestream]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SimpleLife]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=869</guid>
		<description><![CDATA[So finally my very first WordPress plugin is accepted into the official plugins repository This is a historic event. I&#8217;m certain that fame and fortune will not be very far back! In case you haven&#8217;t seen my recent page about it and you don&#8217;t care to read it, Complexlife is a lifestreaming plugin which is [...]]]></description>
			<content:encoded><![CDATA[<p><a title="window peeks" href="http://www.flickr.com/photos/28759098@N00/1481075631/" target="_blank"><img class="alignright" style="border: 0pt none;" src="http://farm2.static.flickr.com/1335/1481075631_44d61338cb_m.jpg" border="0" alt="window peeks" width="240" height="180" /></a>So finally <a href="http://dbzer0.com/the-penguin-migration/complexlife">my very first WordPress plugin</a> is accepted into the <a href="http://wordpress.org/extend/plugins/complexlife/">official plugins repository</a> <img src='http://dbzer0.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is a historic event. I&#8217;m certain that fame and fortune will not be very far back!</p>
<p>In case you haven&#8217;t seen my recent page about it and you don&#8217;t care to read it, Complexlife is a <a title="Explanation of lifestreaming" href="http://lifestreamblog.com/about/">lifestreaming </a>plugin which is a fork from <a href="http://kierandelaney.net/blog/projects/simplelife/">SimpleLife</a> (You see what I did there? <img src='http://dbzer0.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ).</p>
<p>After adding a lot of features and options to it and seeing that Simplelife is not progressing I thought I&#8217;d go ahead and just upload it as a new version. This will allow me to have a more organised development and also have the help of anyone who wishes to improve it.</p>
<p>I&#8217;ve already got a few features I want to add and I&#8217;m also going to be merging changes from other places where I find them, i.e. <a href="http://ttrumble.com/modified-simplelife-lifestreaming-plugin/">the trumblog</a>.</p>
<p>So if you&#8217;ve got a self-hosted WordPress blog, give it a go and let me know what you think. I&#8217;m eager for feedback.</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/complexlife?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/complexlife?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/complexlife?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/complexlife?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/complexlife?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/hacked-simplelife" rel="bookmark" title="April 21, 2008">Hacked Simplelife</a>
 | <a href="http://dbzer0.com/blog/the-debate-is-intensifying" rel="bookmark" title="August 14, 2008">The Debate is Intensifying</a>
 | <a href="http://dbzer0.com/blog/convincing-intense-debate-to-liberate-their-source" rel="bookmark" title="September 25, 2008">Convincing Intense Debate to liberate their source</a>
<!-- Similar Posts took 3.870 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/complexlife/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memberlist for Collaborative WordPress Blogs</title>
		<link>http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs</link>
		<comments>http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs#comments</comments>
		<pubDate>Sat, 21 Jun 2008 22:58:03 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Planet-LGU]]></category>
		<category><![CDATA[ACP]]></category>
		<category><![CDATA[members]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=714</guid>
		<description><![CDATA[In case you have a self-hosted Worpdress blog which has multiple authors you may have noticed that you don&#8217;t have lots of option to show information about each one. You can have each author create a post for himself and link it from the sidebar (Which is how Debunking Christianity does it), or you can [...]]]></description>
			<content:encoded><![CDATA[<p>In case you have a self-hosted Worpdress blog which has multiple authors you may have noticed that you don&#8217;t have lots of option to show information about each one. You can have each author create a post for himself and link it from the sidebar (Which is how <a href="http://debunkingchristianity.blogspot.com/">Debunking Christianity</a> does it), or you can create a page for each one after they provide you some information about themselves. Finally you can just leave each author&#8217;s page to be the default list of posts.</p>
<p>I wasn&#8217;t satisfied with either of those options so I looked around and found something better. So I have just finished with my <a href="http://www.antichristian-phenomenon.com/db0/member-pages/">custom member list setup</a> at the <a href="http://www.antichristian-phenomenon.com/">Antichristian Phenomenon</a> and I thought I&#8217;d share how I did it in case anyone wishes to implement it as well.</p>
<p>I started after I discovered this <a title="How to Use WordPress as a Membership Directory" href="http://www.wpdesigner.com/2008/03/01/how-to-use-wordpress-as-a-membership-directory/">excellent guide from WPDesigner</a>. Although I didn&#8217;t need the role manager, the rest of the instructions were perfect for my purpose. So I installed the necessary plugins (plus <a href="http://wordpress.org/extend/plugins/register-plus/" target="_blank">Register Plus</a> to stop spammers registering) and started adding fields.</p>
<p>I then needed to display those fields in each author&#8217;s page somehow. In also wanted to do that without making the page totally different from the reast of the site. So I copied the archive.php file to author.php. I enterred the file and inserted all the necessary variables for my fields (as described in the guide) and deleted all archive loops except the author&#8217;s. This way the user visiting the author page could see the author profile but also a list of articles they have written.</p>
<p>The <a href="http://codex.wordpress.org/Author_Templates#Using_Author_Information">curauthor</a> variable was used to grab information for some of the default fields. Unfortunately the <a href="http://www.dealsway.net/2007/11/05/wp-user-manager/">Wp User Manager plugin</a> does not give you the names for all the default wordpress fields but fortunately the documentation in curauthor is complete. I copied the html div the archive loop was in (so as to have the same format) and created a little list to show each author&#8217;s profile. <a title="A paste of my code for the author info" href="http://rafb.net/p/52WmWq18.html">Here&#8217;s how it looks like currently</a></p>
<p>Once that was done, I decided to see if I could also put comments in each author&#8217;s page as well. Unfortunately, just putting the php call for the comments template  between the info and the archives did not work. Apparently WordPress does not expect comments on archive pages. However since I am using <a href="http://intensedebate.com/" target="_blank">Intense Debate Comments</a> at the moment I figured that they would be agnostic on where I am putting their script.</p>
<p>Unfortunately since IDC works through the wordpress comments template, where that does not appear, so does IDC. I managed after all to work around this by copying the script itself into the template. It wasn&#8217;t easy to get the code for this since IDC insists on providing you with a WP plugin instead of allowing you the option to paste the script somewhere. I finally got the code by telling IDC that I wanted to install it on my gallery. Unfortunately, the script then had the wrong ID and I needed the correct one to have my comments logged at the correct blog. For this, I was able to just edit the WP plugin code and copy the ID from there. So I pasted the script in the template itself and, lo and behold, it worked! I now had comment capability on each author&#8217;s profile page <img src='http://dbzer0.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Once this was done, I made a quick test comment to check if it works and noticed that IDC was logging a strange page title for the Author&#8217;s profiles. It seems that my theme is using a title for author archives as if they were a category archive and that would not do. I thus edited my header file and placed an if statement to check if it is an <a href="http://codex.wordpress.org/Conditional_Tags#An_Author_Page">author page</a>. On a positive, I changed the page to show a more appropriate title as well as the author&#8217;s nickname (through curauth again). Unfortunately IDC still kept grabbing some weird titles (or not at all) but it&#8217;s not caused by the title anymore.</p>
<p>Finally, I <a href="http://codex.wordpress.org/Template_Tags/wp_list_authors">listed the authors</a> of the blog on the sidebar through a <a href="http://wordpress.org/extend/plugins/php-code-widget/">php widget</a>, I looked at it, and it was nice.</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream" rel="bookmark" title="May 8, 2008">An easier way to track your comments in your lifestream</a>
 | <a href="http://dbzer0.com/blog/dynamically-expanding-single-post-sidebar" rel="bookmark" title="February 22, 2008">Dynamically expanding single-post sidebar</a>
 | <a href="http://dbzer0.com/blog/hacked-simplelife" rel="bookmark" title="April 21, 2008">Hacked Simplelife</a>
<!-- Similar Posts took 5.315 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/memberlist-for-collaborative-wordpress-blogs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theme Upgrade Fail</title>
		<link>http://dbzer0.com/blog/theme-upgrade-fail</link>
		<comments>http://dbzer0.com/blog/theme-upgrade-fail#comments</comments>
		<pubDate>Sun, 15 Jun 2008 16:16:11 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[HemingwayEx]]></category>
		<category><![CDATA[suckerfish]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=705</guid>
		<description><![CDATA[I never understand why upgrading to the newer HemingwayEx is such a hassle. This is the second time I&#8217;ve attempted it now (once more on 1.0) and I just now gave up. What is happening is that I get the theme to work, I can change the colours just fine and switch to finally using [...]]]></description>
			<content:encoded><![CDATA[<p>I never understand why upgrading to the <a href="http://www.nalinmakar.com/2008/04/29/hemingwayex-11-is-finally-here" target="_blank">newer HemingwayEx</a> is such a hassle. This is the second time I&#8217;ve attempted it now (once more on 1.0) and I just now gave up.</p>
<p>What is happening is that I get the theme to work, I can change the colours just fine and switch to finally using widgets, but for some reason I can&#8217;t get the suckerfish dropdown to work and I keep running into various other problems (like my gallery losing its theme etc).</p>
<p>It wouldn&#8217;t be such a great problem if I knew where to start but what is happening is making me scratch my head. Specifically, even drop-downs start to work once I put the code in, they get hidden behind the background. That is, I can see the dropdown menu appearing (the top of it) but its somehow placed behind the main content and even expanding the navigation does not make it appear. Grrr</p>
<p>Anyway, it&#8217;s too much bother to figure out what is causing this so I&#8217;ll stay with my current version which still seems to be working fine. I will however attempt to widgetize it and perhaps upload it as a different version from HemingwayEx. I&#8217;ve aready created a sourceforge page for it (waiting approval still) and then possibly more people might be willing to help.</p>
<p>It only annoys me that I spent so much time on it and I still couldn&#8217;t get it to work as the current version.</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/theme-upgrade-fail?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/theme-upgrade-fail?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/theme-upgrade-fail?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/theme-upgrade-fail?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/theme-upgrade-fail?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/how-to-hunt-for-wordpress-performance-hogs" rel="bookmark" title="April 13, 2008">How to hunt for WordPress performance hogs</a>
 | <a href="http://dbzer0.com/blog/preparing-for-a-long-time-coming-upgrade" rel="bookmark" title="August 25, 2009">Preparing for a long-time-coming upgrade</a>
 | <a href="http://dbzer0.com/blog/how-i-made-steam-play-nice-with-my-ubuntu" rel="bookmark" title="March 6, 2008">How I made Steam play nice with my Ubuntu</a>
<!-- Similar Posts took 3.566 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/theme-upgrade-fail/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>An easier way to track your comments in your lifestream</title>
		<link>http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream</link>
		<comments>http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream#comments</comments>
		<pubDate>Wed, 07 May 2008 22:39:02 +0000</pubDate>
		<dc:creator>Db0</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Planet-LGU]]></category>
		<category><![CDATA[Lifestream]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[SimpleLife]]></category>

		<guid isPermaLink="false">http://dbzer0.com/?p=680</guid>
		<description><![CDATA[I&#8217;ve been trying to find a better way to allow my lifestream to track my comments that would require less manual activity from me as well as allow me to track my own comments in my own site. When I started using google reader to archive and extend my lifestream, I briefly considered using it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to find a better way to allow my <a title="Db0's Lifestream" href="http://dbzer0.com/about/lifestream" target="_blank">lifestream</a> to track my comments that would require <a title="A way to track everything for lifestreams through online bookmarking" href="http://dbzer0.com/blog/undefined_remainder/internet/how-to-track-anything-and-everything-in-your-lifestream" target="_blank">less manual activity</a> from me as well as allow me to track my own comments in my own site.</p>
<p>When I started using google reader to <a href="http://dbzer0.com/blog/undefined_remainder/coding/using-a-google-reader-as-a-lifestream-archive" target="_blank">archive and extend my lifestream</a>, I briefly considered using it to track my comments as well but I decided against it as I wanted first to see if comment services like Cocomments or co.mments might work (they didn&#8217;t). I also could not see a way so as to get it to track only the thread titles where I&#8217;ve placed a comment (so as to insert it in the areas I am commenting) or how to get my lifestream to display only my own comments.</p>
<p>However, after managing to set up google reader as an archive, I discovered how much more information an atom feed is providing, part or which is the author or each comment post. <a title="The Simplepie get_author procedure is exactly what I need" href="http://simplepie.org/wiki/reference/simplepie_item/get_author" target="_blank">Just what I needed</a> <img src='http://dbzer0.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I quickly cooked up a bit of code to just keep the comments left from me in each thread&#8217;s feed. This is something I was not able to achieve with Cocomments and co.mments as they don&#8217;t provide you with an actual feed of the whole thread but rather they copy the text and provide you with a raw html formatted to simply <em>look</em> separated.</p>
<p>There was also a little problem that many feeds included various words in the title like &#8220;Comments on:&#8221; which just looked bad when I appended my extra &#8220;Commented on:&#8221; text. I needed to find a way to remove them so a little search and the <a title="How to replace or crop strings in php" href="http://de.php.net/str_replace" target="_blank">php solution appeared</a>. Perfect!</p>
<p>Last step was to trigger it even if I happened to comment with differing case in my alias. the &#8220;if&#8221; statement is quite anal about cases that way. All in lowercase then.</p>
<p>The end result is this:</p>
<p><code>if ($feedurl == $greader_comment_feed) {<br />
if ($author = $item-&gt;get_author()) {<br />
$name = strtolower($author-&gt;get_name());<br />
if ($name == get_option('greader_comments_author')) {<br />
$item_title_crops = array('Comments on:', 'Comments for', 'Σχόλια στο:');<br />
$item_title = str_replace($item_title_crops,'',$item-&gt;get_source()-&gt;get_title());}<br />
else {continue;}}} <!--formatted--></code></p>
<p>Finally, all you need to do is setup a google reader public tag where you&#8217;re grouping in all the thread feeds of any place you comment in. You can see mine <a title="Db0's comments in the internet" href="https://www.google.com/reader/shared/user/13245328054084406047/label/Comments" target="_blank">here</a> for example. Get the feed of it, put the number of items you want to see (the default is 20) by appending ?n=# in the end, where # is the number of items you want. In this case you should put something sufficiently large as this will also include comments from others.</p>
<p>Unfortunately, once this was setup, I realized a limitation of <a title="The simplelife wordpress plugin" href="http://kierandelaney.net/blog/projects/simplelife/" target="_blank">simplelife</a>. It still could not limit the number of items you received by date. This is apparently on the &#8220;To Do&#8221; list but seeing how long it is taking for new versions to come out, my only option was to code it myself. And code it I did <img src='http://dbzer0.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code><br />
if (get_option('simple_datelimit') &gt; 0) {$date_limit = get_option('simple_datelimit')*86400;}<br />
if ($item-&gt;get_date(U) &lt; date(U)-$date_limit) {continue;}<!--formatted--></code></p>
<p>Not only that, but I decided to try my hand at adding it as an option on the plugins config page in the WordPress admin panel. This is why the &#8220;get_option&#8221; exists instead of hard-coded entries <img src='http://dbzer0.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>What it does it take the number of days the user submits and multiplies it by the number of seconds in a 24h day (86400). After that, for each entry, I get the date in a UNIX epoch format and compare if the day the item was recorded is within the number of days I&#8217;ve set. If not, I just skip the current iteration.</p>
<p><a href='http://dbzer0.com/wp-content/uploads/2008/05/screenshot-1.png'><img src="http://dbzer0.com/wp-content/uploads/2008/05/screenshot-1-300x66.png" alt="The new option to set how many days of history you need." title="Days of history" width="300" height="66" class="aligncenter size-medium wp-image-681" /></a></p>
<p>Finally, since I already managed to edit a new option in the config, I thought why not to create the option for the Google Reader feed as well. And lo! There was code.</p>
<p><a href='http://dbzer0.com/wp-content/uploads/2008/05/screenshot.png'><img src="http://dbzer0.com/wp-content/uploads/2008/05/screenshot-300x70.png" alt="The Google Reader Comments menu config" title="The Google Reader Comments menu config" width="300" height="70" class="aligncenter size-medium wp-image-682" /></a></p>
<p>Since this wasn&#8217;t really hard, I&#8217;m planning now to prepare the plugin for general consumption and perhaps upload it to the Codex. I&#8217;ve was waiting for the 1.3 version to come out so that I could take that as it has some more improvements, but it just does not seem to be happening.</p>
<p>I also have some nice ideas to improve the config, like Ajax dynamic menus etc but that&#8217;s for the future.</p>
<p style="text-align:center;"><a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream?emo=4&amp;vote=Insightful" title="Insightful">Insightful?</a> <a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream?emo=3&amp;vote=Funny" title="Funny">Funny?</a> <a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream?emo=0&amp;vote=Informative" title="Informative">Informative?</a> <a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream?emo=2&amp;vote=Convincing" title="Convincing">Convincing?</a> <a href="http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream?emo=1&amp;vote=Helpful" title="Helpful">Helpful?</a> </p><hr />Other similar posts you might also enjoy: <a href="http://dbzer0.com/blog/using-a-google-reader-as-a-lifestream-archive" rel="bookmark" title="April 15, 2008">Using a Google Reader as a lifestream archive</a>
 | <a href="http://dbzer0.com/blog/how-to-track-anything-and-everything-in-your-lifestream" rel="bookmark" title="April 17, 2008">How to track anything and everything in your lifestream</a>
 | <a href="http://dbzer0.com/blog/hacked-simplelife" rel="bookmark" title="April 21, 2008">Hacked Simplelife</a>
<!-- Similar Posts took 3.804 ms -->]]></content:encoded>
			<wfw:commentRss>http://dbzer0.com/blog/an-easier-way-to-track-your-comments-in-your-lifestream/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 17/109 queries in 1.568 seconds using disk: basic
Object Caching 2187/2338 objects using disk: basic

Served from: dbzer0.com @ 2012-02-11 19:16:47 -->
