rp-blogroll: Blo.gs Blogroll

rp–blogroll is a WordPress 1.2 plugin for fetching your blo.gs favorites and displaying them in your weblog, ordered by most recently updated.

I created the plugin because I couldn’t get the built–in Link Manager to display my blogroll correctly, and I couldn’t stop using blo.gs!

Download

Requirements

  • PHP4 (version 4.0.6 or higher)
  • MySQL (version 3.23.23 or higher)
  • WordPress 1.2-mingus (and maybe 1.2 beta and release candidates)

The plugin version has been tested on WordPress 1.2-mingus, and should work with the 1.2 final and later.

This document’s formatting and style was inspired (ripped?) from WP’s readme.html, and is provided for users of this hack.

Changelog

1.0 (May 25, 2004)
Updated for plugin format, first (and probably only) public release.

Installation

  1. Unzip the package in an empty directory.
  2. Drop rp-blo.gs.cache into your wp-content/ directory, and CHMOD to 666.
  3. Drop rp-plugin-blogroll.php into your wp-content/plugins/ directory, and activate in your Plugins menu.
  4. To display your recent links on your frontpage (index.php), just insert the following block of code after the <div id="menu"> line (or anywhere you want, really!).
    But be sure to enter the address to your blo.gs favorites.xml, not mine!
    <!-- begin rp-blogroll block -->
    <h2>Blogroll</h2>
    <ul>
        <?php rp_blogroll('http://blo.gs/1685/favorites.xml', 12); ?>
    </ul>
    <!-- end rp-blogroll block -->
    

Functions

<?php function rp_blogroll($favorites_url = '',
                        $limit = 12,
                        $date_string = 'Y-m-d H:i:s',
                        $before = '<li>',
                        $after = '</li>',
                        $between = "\n") ?>
Displays the most recent links added to your linklog.
  • $favorites_url – URL of your blo.gs favorites.xml file.
    Defaults to http://blo.gs/1685/favorites.xml (my favorites file!).
  • $limit – How many links to display?
    Defaults to 12.
  • $date_string – Date format of the date string added for a link’s title attribute.
    This is based on PHP’s date() function.
    Defaults to ‘F j’, which displays March 22.
    Other suggested formats:
    jS M Y @ g A ==> 22nd Mar 2004 @ 5 PM
    M j ==> Mar 22
  • $before – String to add before the link-formatted text.
    Defaults to “<li>”
  • $after – String to add after the link-formatted text.
    Defaults to “</li>”
  • $between – String to add after a link. This is added after the $after string.
    Defaults to “\n” (newline)

Help

Questions, reactions and, suggestions regarding this hack may be posted on the author’s site, just as you can email him at markku at rebelpixel dot com.

Copying

CC-GNU GPL Copying, modification and redistribution is allowed under the terms of the GPL, better explained by the CC–GPL (Creative Commons Deed). If you found this hack useful, don’t hesitate to link to my site and the projects’s page.