Archive for July, 2008

MagpieRSS

07.14.2008 by Denis - 2 Comments
Posted in PHP

MagpieRSS provides an XML-based (expat) RSS parser in PHP. MagpieRSS is compatible with RSS 0.9 through RSS 1.0. MagpieRSS can also parse RSS 1.0’s modules, RSS 2.0, and Atom. (with a few exceptions). In other words, it is the Swiss army knife of RSS parsers.

WordPress have already integrated the MagpieRSS PHP class into its code, so it’s super easy to use MagpieRSS in WordPress.

<?php 

include_once(ABSPATH . WPINC . '/rss.php'); 

$rss = fetch_rss('http://feed.fairyfish.net/'); $maxitems = 5

$items = array_slice($rss->items, 0, $maxitems)

?>

The code above will fetch the first 5 items of the feed ( http://feed.fairyfish.net/), and then store it in an array items. To see the detail of the array just use the PHP function print_r to print it.

You can use another function wp_rss in WordPress to retrieves an RSS feed and then parses it. It will then display it as an unordered list of links.

<?php

include_once(ABSPATH . WPINC . '/rss-functions.php')

wp_rss('http://feed.fairyfish.net/', 5)

?>

The function have two parameters, the first one is the feed you want to parse and the second one is used to set how many items you want to output.

WordPress Theme : Blue Blog

07.14.2008 by Denis - 2 Comments
Posted in Theme

Blue Blog is a 3 Column themes that mostly for bloggers. It contain 2 widget-ready sidebar, custom templates, integrated pulgins and integrated digg, delicious and stumbleupon for every posts. You can preview it here. It’s compatible with WordPress 2.5.1 and has been tested with in Firefox, Internet Explorer 6 &, Opera, and Safari.

theme-blue-blog

Demo | Download

AideRSS WordPress Plugin

07.14.2008 by Denis - 2 Comments
Posted in Plugin

AideRSS is a service that helps you to prioritize news feeds based on the amount of social activity around them. Using an algorithm called PostRank, which tracks the number of comments, Digg votes, del.icio.us bookmarks and more, it will process any feed you enter and spit out feeds of All Posts, Good Posts, Great Posts, Best Posts and the Top 20.

AideRSS has released API and PHP Class. Base on the PHP Class, I created a simple WordPress plugin which can display the top posts in the specified time period.

After the plugin is uploaded and actived, you can add the following function in your template:

<ol>
	aide_get_top_posts('month',10);
</ol>

There are two parameters for the function:
period=[day|week|month|year|auto|length in seconds] : The period to return posts from.
num=[1-30] : The number of posts to return.

Dowload: wp-aiderss.zip

Where did they go from here? Mod

07.14.2008 by Denis - 1 Comment
Posted in Plugin

Where did they go from here? is a awesome plugin. It generats a list of posts that readers who read the current post also read. But there is a small bug in the plugin. It records the Pages. I don’t think it is a good idea. Because every page in blog have the static Pages’ links. There will be lots of Page links added to the lists generated.

I have made a small modification to the plugin so that it only records posts. Automatic inserting the list before comment form is also disabled. You need to add the function show_where_they_go() in the single.php file of your WordPress Theme.

Installation of this plugin is very simple. You only need to upload the plugin to your WordPress plugin directory and active it. If the visitor history has not been shown after installation, please check if footer.php file of your theme has the function <?php wp_footer(); ?>

Download the plugin: Where did they go from here