<?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>JiveBay &#187; Web Apps</title>
	<atom:link href="http://jivebay.com/category/web/web-apps/feed/" rel="self" type="application/rss+xml" />
	<link>http://jivebay.com</link>
	<description>Web Development, Code Snippets, Technology, Reviews and Random Stuff Blog</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:39:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>List of Reserved Login or Bad Usernames</title>
		<link>http://jivebay.com/2010/05/18/list-of-reserved-login-or-bad-usernames/</link>
		<comments>http://jivebay.com/2010/05/18/list-of-reserved-login-or-bad-usernames/#comments</comments>
		<pubDate>Tue, 18 May 2010 15:26:54 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=686</guid>
		<description><![CDATA[A starting list of reserved login names, bad usernames, insecure login names and user names people shouldn't register or sign up with.]]></description>
			<content:encoded><![CDATA[<p>The following are names you might want to prevent form being used not only by users, but also anyone that uses the admin to your site.</p>
<blockquote><p>about, aboutus, admin, administer, administor, administrater, administrator, anonymous, auther, author, blogger, contact, contactus, contributer, contributor, cpanel, delete, directer, director, editer, editor, email, emailus, guest, info, loggedin, loggedout, login, logout, moderater, moderator, mysql, nobody, operater, operator, oracle, owner, postmaster, president, registar, register, registrar, root, signout, test, user, vicepresident, webmaster</p></blockquote>
<p>A few of them are misspelled, typos, common login names, names hackers usually try to use to break in, and other names that regular users probably shouldn&#8217;t use as they would pretend to be someone they are not. Of course you may want to add the ability to prevent any starting with or ending with <strong>admin</strong> or <strong>moderator</strong>.</p>
<p>This is a good list to start with, share any others if you like. I didn&#8217;t include any cusswords, but it&#8217;s a good idea to add those into another table and make sure people don&#8217;t use those for usernames or just for part of it. Also this list took into consideration that the shortest username would be 4 characters long and only allowed letters and numbers.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=686&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2010/05/18/list-of-reserved-login-or-bad-usernames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Email Exposure</title>
		<link>http://jivebay.com/2009/11/03/wordpress-email-exposure/</link>
		<comments>http://jivebay.com/2009/11/03/wordpress-email-exposure/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 12:52:52 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=476</guid>
		<description><![CDATA[WordPress Post via e-mail (which allows for posting blogs by checking a POP email address) has a vulnerability of exposing the email address that sent the email. I show you how you can prevent this.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed WordPress&#8217;s blog by email feature has the possibility of allowing anyone to see other email addresses. This feature can be turned on in the <strong>Admin </strong>in <strong>Settings->Writings</strong> and then <strong>Post via e-mail</strong>. Let&#8217;s say you set that email address as <strong>wordpressposts@example.com</strong>, that address will stay hidden. However anyone that emails that address will can have their address exposed on your blog by going to <strong>http://example.com/wp-mail.php</strong> (assuming that&#8217;s where you have WordPress installed at http://example.com). Chances are most people will have this set to a <a href="http://en.wikipedia.org/wiki/Cron">cron job</a> and have it check it every so often, but it might be possible for others to request the page beforehand. And when you do go to that page, it shows something like this:</p>
<pre>
Author is myworkaddress@example.net

Author: 1

Posted title: Some Blog Post Title

Mission complete. Message 1 deleted.
</pre>
<p>Thus, if you are using your a email address you&#8217;d like to keep private and you are emailing wordpressposts@example.com, that email address has the possibility of showing up to people. Which is not good if you email from the same email address that checks the posts. And even worse if you email from a email address for a user in WordPress and has the rights to post contents because the email will get &#8220;publish&#8221; status rather than &#8220;pending&#8221; and will go live on the site. And if someone has the email address that is a user and has posting rights, they can easily send fake emails from that address, because all WordPress checks is the From or Reply-To line (whichever it finds first).</p>
<p>It&#8217;s easy to prevent it from showing email addresses by opening up <strong>wp-mail.php</strong> and looking for this line of code<br />
<code><br />
echo &#039;&lt;p&gt;&#039; . sprintf(__(&#039;Author is %s&#039;), $author) . &#039;&lt;/p&gt;&#039;;<br />
</code></p>
<p>And this line of code<br />
<code><br />
echo &quot;\n&lt;p&gt;&quot; . sprintf(__(&#039;&lt;strong&gt;Author:&lt;/strong&gt; %s&#039;), esc_html($post_author)) . &#039;&lt;/p&gt;&#039;;<br />
</code></p>
<p>And then you could comment those lines out by putting <strong>//</strong> in front of both of them.</p>
<p>I understand WordPress outputs this information so you can see logged from any cron jobs you have setup or if you visit the page manually, as a way of just knowing whats going on. However, it could be done better to prevent the addresses from being shown to everyone. A simple solution is to setup a query string and have a secretkey (don&#8217;t make this your blog&#8217;s password however). For example, lets say your blog is installed at <strong>http://example.com/</strong>, we are going to know require the following URL to check Posts via e-mail <strong>http://example.com/wp-mail.php?secretkey=abc123</strong>. And if someone doesn&#8217;t send the right secretkey, it won&#8217;t check the email address or echo anything out.</p>
<p>So before this line of code<br />
<code><br />
/** Make sure that the WordPress bootstrap has run before continuing. */<br />
</code></p>
<p>Let&#8217;s add<br />
<code><br />
if ($_GET[&#039;secretkey&#039;] != &#039;abc123&#039;)<br />
	exit();<br />
</code></p>
<p>Feel free to change the secretkey to whatever you wish. You can also change it to be called something other than secretkey. If you have a cron job, you&#8217;ll have to point to that new URL as well <strong>http://example.com/wp-mail.php?secretkey=abc123</strong>. If you use the secretkey method you can leave the lines where it echoes out the email address if you like (the 2 lines I showed you could comment out).</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=476&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2009/11/03/wordpress-email-exposure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpBB 3.x RSS Hack</title>
		<link>http://jivebay.com/2009/02/02/phpbb-3x-rss-hack/</link>
		<comments>http://jivebay.com/2009/02/02/phpbb-3x-rss-hack/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 20:31:25 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpbb]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=452</guid>
		<description><![CDATA[A code snippet or hack to get phpBB 3 to have rss feeds on your forums. It's very simple to setup and you can modify it how you like for your message board.]]></description>
			<content:encoded><![CDATA[<p>Where I work we use <a href="http://www.phpbb.com/">phpBB</a> and I was surprised to see version 3 didn&#8217;t have built in RSS support. I found a mod, but it contained several files and required modifying several more files. I put together a hack that will pull the latest posts that are approved and non-reported; However, it will keep them unique to a topic. So if the last 5 posts are for a topic called &#8220;That is awesome&#8221;, it will only show a link to the last post on that topic and will look for the other latest posts from other topics.</p>
<p>It&#8217;s configurable with a item_limit (number of posts to pull) and word_limit (how long the description is). However the description is just the title for the last post, so it will most often be &#8220;RE: original post title&#8221; unless the user changes it when posting. I could of done another query in a loop to the table <strong>phpbb_posts</strong> and pulled out the corresponding <strong>post_text</strong>, but didn&#8217;t want to have the overhead. Although you could easily modify that in and cache the file for say 5 or 15 minutes. Think of this as a head start to get the feeds from your forum for whatever you plan to do with them. <img src='http://jivebay.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span id="more-452"></span></p>
<p>Create a php file at the root of your forums with this code.<br />
<code><br />
&lt;?php<br />
	//OPTIONS<br />
	$item_limit = 20;//total rss items to pull<br />
	$word_limit = 25;//word limit<br />
	//YOU SHOULDNT HAVE TO EDIT ANYTHING BELOW<br />
	require(&#039;config.php&#039;);<br />
	$db_connect = mysql_connect($dbhost, $dbuser, $dbpasswd) or die(&#039;Unable to connect to database.&#039;);<br />
	$db_select = mysql_select_db($dbname, $db_connect) or die(&#039;Could not set the database.&#039;);<br />
	header(&quot;content-type: text/xml&quot;);<br />
	//GET THE SITES DATA<br />
	$db_record_site_data = mysql_query(&#039;SELECT config_name, config_value FROM phpbb_config WHERE config_name = \&#039;script_path\&#039; OR config_name = \&#039;server_name\&#039; OR config_name = \&#039;sitename\&#039; OR config_name = \&#039;site_desc\&#039; ORDER BY config_name&#039;);<br />
	$counter = 0;<br />
	//will get the items in this order: script_path, server_name, site_desc, sitename<br />
	while ($row = mysql_fetch_array($db_record_site_data))<br />
	{<br />
		if ($counter == 0)<br />
			$script_path = $row[&#039;config_value&#039;];<br />
		else if ($counter == 1)<br />
			$site_url = &#039;http://&#039;.$row[&#039;config_value&#039;];<br />
		else if ($counter == 2)<br />
			$site_description = $row[&#039;config_value&#039;];<br />
		else if ($counter == 3)<br />
			$site_title = $row[&#039;config_value&#039;];<br />
		$counter++;<br />
	}<br />
	//GET THE RECENT TOPICS, show only approved and non-reported topics<br />
	$db_record_topic_data = mysql_query(&#039;SELECT forum_id, topic_id, topic_last_post_time, topic_title, topic_last_post_subject, topic_last_poster_name, topic_first_post_id, topic_last_post_id FROM phpbb_topics WHERE topic_approved=1 AND topic_reported=0 ORDER BY topic_last_post_time DESC LIMIT &#039; . $item_limit);<br />
	echo &#039;&lt;&#039; . &#039;?xml version=&quot;1.0&quot;?&#039; . &#039;&gt;&#039; . &quot;\n&quot;;<br />
	echo &#039;&lt;rss version=&quot;2.0&quot;&gt;&#039; . &quot;\n&quot;;<br />
	echo &#039;&lt;channel&gt;&#039; . &quot;\n&quot;;<br />
	echo &#039;&lt;title&gt;&#039; . $site_title . &#039;&lt;/title&gt;&#039; . &quot;\n&quot;;<br />
	echo &#039;&lt;link&gt;&#039; . $site_url . $script_path . &#039;&lt;/link&gt;&#039; . &quot;\n&quot;;<br />
	echo &#039;&lt;description&gt;&#039; . $site_description . &#039;&lt;/description&gt;&#039; . &quot;\n&quot;;<br />
	while ($row = mysql_fetch_array($db_record_topic_data))<br />
	{<br />
		echo &#039;&lt;item&gt;&#039; . &quot;\n&quot;;<br />
		echo &#039;&lt;title&gt;&#039; . htmlspecialchars(trim($row[&#039;topic_title&#039;]), ENT_QUOTES) . &#039;&lt;/title&gt;&#039; . &quot;\n&quot;;<br />
		echo &#039;&lt;description&gt;&#039;;<br />
		//filter description<br />
		$post_text = htmlspecialchars(trim($row[&#039;topic_last_post_subject&#039;]), ENT_QUOTES);<br />
		//word limit<br />
		$post_text = str_replace(&#039;  &#039;, &#039; &#039;, $post_text);//get rid of multispaces<br />
		$post_word_array = explode(&#039; &#039;, $post_text);<br />
		$total_words = count($post_word_array);<br />
		$total_words = min($word_limit, $total_words);<br />
		for ($x = 0; $x &lt; $total_words; $x++)<br />
		{<br />
			echo $post_word_array[$x] . &#039; &#039;;<br />
		}<br />
		//ellipsis<br />
		if ($total_words &gt; $word_limit)<br />
			echo &#039;...&#039;;<br />
		echo &#039;&lt;/description&gt;&#039; . &quot;\n&quot;;<br />
		//echo &#039;&lt;description&gt;&#039; . substr(, 0, 128) . &#039;&lt;/description&gt;&#039;;//character limit<br />
		echo &#039;&lt;link&gt;&#039; . $site_url . $script_path . &#039;viewtopic.php?f=&#039; . $row[&#039;forum_id&#039;] . &#039;&amp;amp;t=&#039; . $row[&#039;topic_id&#039;] . &#039;&amp;amp;p=&#039; . $row[&#039;topic_first_post_id&#039;] . &#039;#&#039; . $row[&#039;topic_last_post_id&#039;] . &#039;&lt;/link&gt;&#039; . &quot;\n&quot;;<br />
		echo &#039;&lt;pubdate&gt;&#039; . date(&#039;r&#039;, $row[&#039;topic_last_post_time&#039;]) . &#039;&lt;/pubdate&gt;&#039; . &quot;\n&quot;;//RFC822<br />
		echo &#039;&lt;author&gt;&#039; . htmlspecialchars(trim($row[&#039;topic_last_poster_name&#039;]), ENT_QUOTES) . &#039;&lt;/author&gt;&#039;;<br />
		echo &#039;&lt;/item&gt;&#039; . &quot;\n&quot;;<br />
	}<br />
	echo &#039;&lt;/channel&gt;&#039; . &quot;\n&quot;;<br />
	echo &#039;&lt;/rss&gt;&#039; . &quot;\n&quot;;<br />
?&gt;<br />
</code></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=452&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2009/02/02/phpbb-3x-rss-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A More Useful WordPress 404</title>
		<link>http://jivebay.com/2008/11/23/a-more-useful-wordpress-404/</link>
		<comments>http://jivebay.com/2008/11/23/a-more-useful-wordpress-404/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 17:48:00 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=398</guid>
		<description><![CDATA[Recently A List Apart had an article by Dean Frickey titled A More Useful 404. It was a good article about making a more useful 404 page that attempts to figure out what went wrong and it will email you some information. I modified the code from Perl to PHP for WordPress and figured I&#8217;d [...]]]></description>
			<content:encoded><![CDATA[<p>Recently <a href="http://www.alistapart.com/">A List Apart</a> had an article by <a href="http://www.alistapart.com/authors/f/deanfrickey">Dean Frickey</a> titled <a href="http://www.alistapart.com/articles/amoreuseful404">A More Useful 404</a>. It was a good article about making a more useful 404 page that attempts to figure out what went wrong and it will email you some information. I modified the code from Perl to PHP for WordPress and figured I&#8217;d save people time from building it themselves by posting it here. Feel free to edit what you need to. The code goes inside your <strong>404.php</strong> template.</p>
<p><code><br />
&lt;?php<br />
//based on http://www.alistapart.com/articles/amoreuseful404<br />
//just to break any email addresses or spam that might get spoofed in falsed headers, might just use a regex later<br />
$disallowed_strings = array(&#039;@&#039;, &#039;\t&#039;, &#039;\r&#039;, &#039;\n&#039;, &#039;\v&#039;, &#039;\f&#039;, &#039;&lt;&#039;, &#039;&gt;&#039;);<br />
$clean_server_name = preg_replace(&#039;/[^a-zA-Z0-9\-\.]/&#039;, &#039;&#039;, $_SERVER[&#039;SERVER_NAME&#039;]);<br />
$clean_http_referer = str_ireplace($disallowed_strings, &#039;&#039;, $_SERVER[&#039;HTTP_REFERER&#039;]);<br />
$clean_request_uri = str_ireplace($disallowed_strings, &#039;&#039;, $_SERVER[&#039;REQUEST_URI&#039;]);<br />
$search_engine_domains = array(&#039;google.com&#039;, &#039;images.google.com&#039;, &#039;translate.google.com&#039;, &#039;yahoo.com&#039;, &#039;ask.com&#039;, &#039;live.com&#039;, &#039;aol.com&#039;, &#039;search.msn.com&#039;);//add more if you want<br />
$search_message = &#039;&lt;p&gt;You may want to try searching this site or using our &lt;a href=&quot;&#039; . get_bloginfo(&#039;url&#039;) . &#039;/sitemap/&quot;&gt;sitemap&lt;/a&gt; to find what you were looking for.&lt;/p&gt;&#039;;//if you have a sitemap<br />
?&gt;<br />
	&lt;p&gt;Sorry, but the page you were trying to get to &lt;!--http:// ,--&gt; does not exist.&lt;/p&gt;<br />
&lt;?php<br />
if ($_SERVER[&#039;HTTP_REFERER&#039;] == &#039;&#039;)<br />
{<br />
?&gt;<br />
	&lt;p&gt;It looks like this was the result of either&lt;/p&gt;<br />
	&lt;ul&gt;<br />
	&lt;li&gt;a mistyped address&lt;/li&gt;<br />
	&lt;li&gt;or an out-of-date bookmark in your web browser.&lt;/li&gt;<br />
	&lt;/ul&gt;<br />
&lt;?php<br />
	echo $search_message;<br />
}<br />
else<br />
{<br />
	//make it easier to search referer<br />
	$disallowed_url_strings = array(&#039;http://&#039;, &#039;https://&#039;, &#039;www.&#039;);//filter out https:// anyway<br />
	$referer = str_ireplace($disallowed_url_strings, &#039;&#039;, $_SERVER[&#039;HTTP_REFERER&#039;]);<br />
	$referer_array = explode(&#039;/&#039;, $referer);<br />
	$referer = $referer_array[0];<br />
	$myblog_url = get_bloginfo(&#039;url&#039;);<br />
	$myblog_url = str_ireplace($disallowed_url_strings, &#039;&#039;, $myblog_url);<br />
	$myblog_url_array = explode(&#039;/&#039;, $myblog_url);<br />
	$myblog_url = $myblog_url_array[0];<br />
	if ($referer == $myblog_url)<br />
	{<br />
?&gt;<br />
		&lt;p&gt;Apparently, we have a broken link on our page. An e-mail has just been sent to the person who can fix this and it should be corrected shortly. No further action is required on your part.&lt;/p&gt;<br />
&lt;?php<br />
		$email_subject = &#039;Broken link on my site, &#039; . $clean_server_name;<br />
		$email_message = &#039;BROKEN LINK ON MY SITE&#039; . &quot;\r\n\r\n&quot; . &#039;There appears to be a broken link on my page, &#039; . $clean_http_referer . &quot; \r\n\r\n&quot; . &#039; Someone was trying to get to &#039; . $clean_request_uri . &#039; from that page.&#039;;<br />
		$email_message .= &quot;\r\n\r\n&quot; . &#039;Why don\&#039;t you take a look at it and see what\&#039;s wrong?&#039;;<br />
		mail(get_bloginfo(&#039;admin_email&#039;), $email_subject, $email_message, &#039;FROM: 404@example.com&#039;);<br />
	}<br />
	else<br />
	{<br />
		//see if it was a search engine<br />
		$domains_matched = 0;<br />
		$total_domains = count($search_engine_domains);<br />
		for ($x = 0; $x &lt; $total_domains; $x++)<br />
		{<br />
			if ($referer == $search_engine_domains[$x])<br />
				$domains_matched++;<br />
		}<br />
		if ($domains_matched != 0)<br />
		{<br />
?&gt;<br />
			&lt;p&gt;It looks like the search engine has returned a link to an old page. These old links should eventually be removed from their indexes but since these are automatically generated there is no one to contact to try to correct the problem.&lt;/p&gt;<br />
&lt;?php<br />
			echo $search_message;<br />
		}<br />
		else<br />
		{<br />
?&gt;<br />
			&lt;p&gt;Apparently, there is a broken link on the page you just came from. We have been notified and will attempt to contact the owner of that page and let them know about it.&lt;/p&gt;<br />
&lt;?php<br />
			echo $search_message;<br />
			$email_subject = &#039;Broken link on somebody else\&#039;s site.&#039;;<br />
			$email_message = &#039;BROKEN LINK ON SOMEBODY ELSE\&#039;S SITE&#039; . &quot;\r\n\r\n&quot; . &#039;There appears to be a broken link on the page, &#039; . $clean_http_referer . &quot; \r\n\r\n&quot; . &#039; Someone was trying to get to &#039; . $clean_request_uri . &#039; from that page.&#039;;<br />
		$email_message .= &quot;\r\n\r\n&quot; . &#039;Why don\&#039;t you take a look at it and see if you can contact the page owner and let them know about it?&#039;;<br />
			mail(get_bloginfo(&#039;admin_email&#039;), $email_subject, $email_message, &#039;FROM: 404@example.com&#039;);<br />
		}<br />
	}<br />
}<br />
?&gt;<br />
</code></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=398&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/11/23/a-more-useful-wordpress-404/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Recent Comments Hack</title>
		<link>http://jivebay.com/2008/08/27/wordpress-recent-comments-hack/</link>
		<comments>http://jivebay.com/2008/08/27/wordpress-recent-comments-hack/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 17:38:35 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=254</guid>
		<description><![CDATA[I wanted to get the most recent comments in WordPress without having to use the widgets or any plugins. When you use any of the widgets it will override the sidebar.php (although you could put what you needed in a else bracket inside sidebar.php, but I figured I&#8217;d put this hack together anyway).
This hack would [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to get the most recent comments in <a href="http://wordpress.org/">WordPress</a> without having to use the widgets or any plugins. When you use any of the widgets it will override the <strong>sidebar.php</strong> (although you could put what you needed in a else bracket inside sidebar.php, but I figured I&#8217;d put this hack together anyway).</p>
<p>This hack would go in your <strong>sidebar.php</strong><br />
<code><br />
$comment_array = $wpdb-&gt;get_results(&quot;SELECT comment_date_gmt, comment_author, comment_ID, comment_post_ID FROM $wpdb-&gt;comments WHERE comment_approved = &#039;1&#039; ORDER BY comment_date_gmt DESC LIMIT 10&quot;);<br />
$comment_total = count($comment_array);<br />
echo &#039;&lt;ul&gt;&#039;;<br />
for ($x = 0; $x &lt; $comment_total; $x++)<br />
{<br />
	echo  &#039;&lt;li&gt;&#039;;<br />
	echo $comment_array[$x]-&gt;comment_author . &#039; on &#039;;<br />
	echo &#039;&lt;a href=&quot;&#039;. get_permalink($comment_array[$x]-&gt;comment_post_ID) . &#039;#comment-&#039; . $comment_array[$x]-&gt;comment_ID . &#039;&quot;&gt;&#039;;<br />
	echo get_the_title($comment_array[$x]-&gt;comment_post_ID);<br />
	echo &#039;&lt;/a&gt;&#039;;<br />
	echo &#039;&lt;/li&gt;&#039;;<br />
}<br />
echo &#039;&lt;/ul&gt;&#039;<br />
</code></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=254&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/08/27/wordpress-recent-comments-hack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Customizable Tag Cloud For WordPress</title>
		<link>http://jivebay.com/2008/08/26/a-customizable-tag-cloud-for-wordpress/</link>
		<comments>http://jivebay.com/2008/08/26/a-customizable-tag-cloud-for-wordpress/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 03:38:52 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=253</guid>
		<description><![CDATA[If you&#8217;ve tried using wp_tag_cloud() as an array, you&#8217;ve noticed that all it really does is give you a string, which isn&#8217;t useful. The only way I could figure out how to get the tags to where I can format them how I want was to call get_tags() in wp-includes/category.php. You can also pass arguments [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve tried using <a href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud">wp_tag_cloud()</a> as an array, you&#8217;ve noticed that all it really does is give you a string, which isn&#8217;t useful. The only way I could figure out how to get the tags to where I can format them how I want was to call <strong>get_tags()</strong> in <strong>wp-includes/category.php</strong>. You can also pass arguments to it to sort it differently. Take a look at <strong>get_terms()</strong> in <strong>wp-includes/taxonomy.php</strong> to get an idea of what you can do.</p>
<p>Here is a hack I put together that will output your tags as a unordered list (UL) with the total number of times the tag is used in parenthesis. You can place this code in <strong>sidebar.php</strong><br />
<code><br />
$tag_array = get_tags(&#039;orderby=count&amp;order=DESC&amp;number=15&#039;);<br />
$tag_total = count($tag_array);<br />
echo &#039;&lt;ul&gt;&#039;;<br />
for ($x = 0; $x &lt; $tag_total; $x++)<br />
{<br />
	echo &#039;&lt;li&gt;&#039;;<br />
	echo &#039;&lt;a href=&quot;&#039; . get_option(&#039;home&#039;) . &#039;/tag/&#039; . $tag_array[$x]-&gt;slug . &#039;/&quot; rel=&quot;tag&quot;&gt;&#039;;<br />
	echo $tag_array[$x]-&gt;name;<br />
	echo &#039;&lt;/a&gt;&#039;;<br />
	echo &#039; (&#039; . $tag_array[$x]-&gt;count . &#039;) &#039;;<br />
	echo &#039;&lt;/li&gt;&#039;;<br />
}<br />
echo &#039;&lt;/ul&gt;&#039;;<br />
</code></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=253&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/08/26/a-customizable-tag-cloud-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PunBB forks into FluxBB</title>
		<link>http://jivebay.com/2008/05/09/punbb-forks-into-fluxbb/</link>
		<comments>http://jivebay.com/2008/05/09/punbb-forks-into-fluxbb/#comments</comments>
		<pubDate>Fri, 09 May 2008 22:38:14 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[PunBB]]></category>
		<category><![CDATA[fluxbb]]></category>

		<guid isPermaLink="false">http://jivebay.com/?p=231</guid>
		<description><![CDATA[Is this a repeat of what happened to Mambo and Joomla!?
Awhile back the rights to PunBB were sold to a company. 

Apart from sponsoring the project, they wanted to later down the line offer paid-for web services in relation to PunBB (for example commercial grade PunBB hosting). We decided we liked the idea and sold [...]]]></description>
			<content:encoded><![CDATA[<p>Is this a repeat of what happened to <a href="http://mambo-foundation.org/">Mambo</a> and <a href="http://www.joomla.org/">Joomla!</a>?</p>
<p>Awhile back the rights to <a href="http://punbb.informer.com/forums/viewtopic.php?id=17268">PunBB were sold to a company</a>. </p>
<blockquote><p>
Apart from sponsoring the project, they wanted to later down the line offer paid-for web services in relation to PunBB (for example commercial grade PunBB hosting). We decided we liked the idea and sold the rights to the project.
</p></blockquote>
<p>Then a <a href="http://punbb.informer.com/forums/viewtopic.php?id=19084">recent switch to a new domain</a> occurred.</p>
<blockquote><p>Moving the PunBB website under the informer.com domain is a way for our benefactors to promote their other services to the PunBB community and to promote PunBB to users of their other services.</p></blockquote>
<p>Today many of the <a href="http://punbb.informer.com/forums/viewtopic.php?id=19157">active developers mentioned they were forking the project</a> into what they call <a href="http://fluxbb.org/">FluxBB</a>.</p>
<blockquote><p>Some of you may have been wondering about the future of PunBB and the current development team following Rickard&#8217;s announcement that he will not be actively involved with PunBB, at least for the time being. &#8230; Now that circumstances have changed with the inevitable shift of power within the project, we all feel that we need a degree of control over future development which is no longer possible. We all share a desire to develop software for the benefit of the community and ourselves, without commercial concerns influencing the final product. This is not a condemnation of PunBB&#8217;s current owners: we simply feel that this change is necessary so that we as developers can maintain full control over the development process.</p></blockquote>
<p>It didn&#8217;t bother me they had sold the rights to PunBB as long as it remained GPL, but what this split means now, I&#8217;m not sure. How many people will now abandon PunBB for FluxBB? A lot depends on how active the FluxBB project becomes and if the new PunBB development takes off.</p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=231&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/05/09/punbb-forks-into-fluxbb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Last Modified Posts in WordPress</title>
		<link>http://jivebay.com/2008/03/08/last-modified-posts-in-wordpress/</link>
		<comments>http://jivebay.com/2008/03/08/last-modified-posts-in-wordpress/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 04:07:01 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jivebay.com/2008/03/08/last-modified-posts-in-wordpress/</guid>
		<description><![CDATA[Want to show the last posts you updated in WordPress? This shows the posts you went back and updated or modified, which is different than your recent posts.

&#60;?php
query_posts(&#039;showposts=10&#38;orderby=modified&#38;order=DESC&#039;);
if (have_posts())
{
	echo &#039;&#60;h3&#62;Last Modified Posts&#60;/h3&#62;&#039;;
	echo &#039;&#60;ul&#62;&#039; . &#34;\n&#34;;
	while (have_posts()) : the_post();
		echo &#039;&#60;li&#62;&#039;;
		echo &#039;&#60;a href=&#34;&#039; . get_permalink() . &#039;&#34;&#62;&#039; . the_title(&#039;&#039;,&#039;&#039;, false) . &#039;&#60;/a&#62;&#039;;
		echo &#039;&#60;/li&#62;&#039; . &#34;\n&#34;;
	endwhile;
	echo &#039;&#60;/ul&#62;&#039;;
}
?&#62;

]]></description>
			<content:encoded><![CDATA[<p>Want to show the last posts you updated in WordPress? This shows the posts you went back and updated or modified, which is different than your recent posts.</p>
<p><code><br />
&lt;?php<br />
query_posts(&#039;showposts=10&amp;orderby=modified&amp;order=DESC&#039;);<br />
if (have_posts())<br />
{<br />
	echo &#039;&lt;h3&gt;Last Modified Posts&lt;/h3&gt;&#039;;<br />
	echo &#039;&lt;ul&gt;&#039; . &quot;\n&quot;;<br />
	while (have_posts()) : the_post();<br />
		echo &#039;&lt;li&gt;&#039;;<br />
		echo &#039;&lt;a href=&quot;&#039; . get_permalink() . &#039;&quot;&gt;&#039; . the_title(&#039;&#039;,&#039;&#039;, false) . &#039;&lt;/a&gt;&#039;;<br />
		echo &#039;&lt;/li&gt;&#039; . &quot;\n&quot;;<br />
	endwhile;<br />
	echo &#039;&lt;/ul&gt;&#039;;<br />
}<br />
?&gt;<br />
</code></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=218&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/03/08/last-modified-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RSS feeds in PunBB</title>
		<link>http://jivebay.com/2008/03/08/rss-feeds-in-punbb/</link>
		<comments>http://jivebay.com/2008/03/08/rss-feeds-in-punbb/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 18:25:38 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[PunBB]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://jivebay.com/2008/03/08/rss-feeds-in-punbb/</guid>
		<description><![CDATA[These are quick easy hacks to get RSS feeds for each forum on the index.php page and viewforum.php pages.
I covered how to put the main RSS feed on PunBB already.
Open up index.php and after this line

$forum_field = &#039;&#60;h3&#62;&#60;a href=&#34;viewforum.php?id=&#039;.$cur_forum[&#039;fid&#039;].&#039;&#34;&#62;&#039;.pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]).&#039;&#60;/a&#62;&#60;/h3&#62;&#039;;

Add this

$forum_field .= &#039;&#60;div class=&#34;forum_rss&#34;&#62;&#60;a class=&#34;rss&#34; href=&#34;extern.php?action=active&#38;type=RSS&#38;fid=&#039;.$cur_forum[&#039;fid&#039;].&#039;&#34;&#62;&#60;span&#62;RSS&#60;/span&#62;&#60;/a&#62;&#60;/div&#62;&#039;;/

Now open up viewforum.php and find this line

&#60;h2&#62;&#60;span&#62;&#60;?php echo pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]) ?&#62;&#60;/span&#62;&#60;/h2&#62;

and [...]]]></description>
			<content:encoded><![CDATA[<p>These are quick easy hacks to get RSS feeds for each forum on the index.php page and viewforum.php pages.</p>
<p>I covered <a href="http://jivebay.com/2007/05/25/punbb-style-tips/">how to put the main RSS feed on PunBB</a> already.</p>
<p>Open up <strong>index.php</strong> and after this line<br />
<code><br />
$forum_field = &#039;&lt;h3&gt;&lt;a href=&quot;viewforum.php?id=&#039;.$cur_forum[&#039;fid&#039;].&#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]).&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;<br />
</code></p>
<p>Add this<br />
<code><br />
$forum_field .= &#039;&lt;div class=&quot;forum_rss&quot;&gt;&lt;a class=&quot;rss&quot; href=&quot;extern.php?action=active&amp;type=RSS&amp;fid=&#039;.$cur_forum[&#039;fid&#039;].&#039;&quot;&gt;&lt;span&gt;RSS&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&#039;;/<br />
</code></p>
<p>Now open up <strong>viewforum.php</strong> and find this line<br />
<code><br />
&lt;h2&gt;&lt;span&gt;&lt;?php echo pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]) ?&gt;&lt;/span&gt;&lt;/h2&gt;<br />
</code></p>
<p>and modify it to be<br />
<code><br />
&lt;h2&gt;&lt;span&gt;&lt;?php echo pun_htmlspecialchars($cur_forum[&#039;forum_name&#039;]) ?&gt; &lt;a class=&quot;rss&quot; href=&quot;extern.php?action=active&amp;type=RSS&amp;fid=&lt;?php echo $id /*MODIFIED - RSS*/ ?&gt;&quot;&gt;&lt;span&gt;RSS&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;<br />
</code></p>
<p>And now for the CSS<br />
<code><br />
.forum_rss {float:right;}<br />
a.rss {background:url(../../img/feed.png) no-repeat left; width:16px; height:16px; padding-left:20px;}<br />
a.rss span {display:none;}<br />
</code></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=217&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/03/08/rss-feeds-in-punbb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Odd and Even Forums and Hot Icons for PunBB</title>
		<link>http://jivebay.com/2008/02/12/odd-and-even-forums-and-hot-icons-for-punbb/</link>
		<comments>http://jivebay.com/2008/02/12/odd-and-even-forums-and-hot-icons-for-punbb/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 17:22:04 +0000</pubDate>
		<dc:creator>blogger</dc:creator>
				<category><![CDATA[PunBB]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://jivebay.com/2008/02/12/odd-and-even-forums-and-hot-icons-for-punbb/</guid>
		<description><![CDATA[PunBB adds classes for odd and even posts, but not for odd and even forum rows. PunBB also adds several classes for icons we can tap into, but there is no way to know if a topic is &#8220;hot&#8221;. Let&#8217;s add a hack that will mark any topic that has more than 25 posts as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://punbb.org/">PunBB</a> adds classes for odd and even posts, but not for odd and even forum rows. PunBB also adds several classes for icons we can tap into, but there is no way to know if a topic is &#8220;hot&#8221;. Let&#8217;s add a hack that will mark any topic that has more than 25 posts as &#8220;hot&#8221; and setup odd and even forum rows.</p>
<p>Open up <strong>viewforum.php</strong></p>
<p>Find this line<br />
<code><br />
// If there are topics in this forum.<br />
if ($db-&gt;num_rows($result))<br />
{<br />
</code></p>
<p>And add this afterwards<br />
<code><br />
$temp_counter = 0;<br />
</code></p>
<p>Then find this line<br />
<code><br />
// Should we show the "New posts" and/or the multipage links?<br />
if (!empty($subject_new_posts) || !empty($subject_multipage))<br />
{<br />
	$subject .= '&nbsp; '.(!empty($subject_new_posts) ? $subject_new_posts : '');<br />
	$subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';<br />
}<br />
</code></p>
<p>And add this afterwards<br />
<code><br />
$temp_counter++;<br />
</code></p>
<p>Then find this line<br />
<code><br />
&lt;tr&lt;?php if ($item_status != &#039;&#039;) echo &#039; class=&quot;&#039;.trim($item_status).&#039;&quot;&#039;; ?&gt;&gt;<br />
</code></p>
<p>And modify it to be this instead<br />
<code><br />
&lt;tr class=&quot;&lt;?php<br />
/*MODIFIED*/<br />
if ($temp_counter % 2)<br />
	echo &#039;forum_rowodd&#039;;<br />
else<br />
	echo &#039;forum_roweven&#039;;<br />
//hoticon<br />
$temp_status = trim($item_status);<br />
if (($cur_topic[&#039;num_replies&#039;] &gt; 25) &amp;&amp; ($temp_status == &#039;&#039; || $temp_status == &#039;inew&#039;))<br />
{<br />
	if ($temp_status == &#039;&#039;)<br />
		echo &#039; ihot&#039;;<br />
	else<br />
		echo &#039; ihot_inew&#039;;<br />
}<br />
else if ($item_status != &#039;&#039;)<br />
	echo &#039; &#039;.trim($item_status);<br />
/*MODIFIED END*/ ?&gt;&quot;&gt;<br />
</code></p>
<p>Now for CSS<br />
<code><br />
/*style rows*/<br />
tr.forum_rowodd {background-color:#eee;}<br />
tr.forum_rowodd td.tc2, tr.forum_rowodd td.tc3 {background-color:#ddd;}<br />
tr.forum_roweven {background-color:#ccc;}<br />
tr.forum_roweven td.tc2, tr.forum_roweven td.tc3 {background-color:#bbb;}<br />
/*style hot and hot new posts*/<br />
tr.ihot div.icon {background-image:url(../../img/hot.png);}<br />
tr.ihot_inew div.icon {background-image:url(../../img/hot_new.png);}<br />
/*css we used for icons before*/<br />
div.icon {<br />
float:left;<br />
display:block;<br />
width:28px;<br />
height:25px;<br />
background-repeat:no-repeat;<br />
background-position:center center;<br />
border:0 !important;<br />
}<br />
/*if you aren't using any images you can use something like this<br />
tr.ihot DIV.icon {BORDER-COLOR: #600 #700 #800 #900}<br />
tr.ihot_inew DIV.inew {BORDER-COLOR: #006 #007 #008 #009}<br />
*/<br />
</code></p>
<p><ins datetime="2008-03-08T16:07:31+00:00">I updated code the code, since I didn&#8217;t like how it was before</ins></p>
<img src="http://jivebay.com/?ak_action=api_record_view&id=212&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://jivebay.com/2008/02/12/odd-and-even-forums-and-hot-icons-for-punbb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
