wp–Recent–Links

Version 1.11 (April 27, 2004)

Requirements | Changelog | Installation | Upgrade | Help | Copying

wp–recent–links is a WordPress plugin (hack!) for adding a links blog to your WordPress–powered site, similar to kottke.org’s remaindered links. Compared to WordPress’s included links manager, this plugin allows you to have a separate archives page for your links blog, with monthly archives.

Requirements

This hack has been tested on WordPress 1.0.1, and should work with versions 1.0, 1.0.2 and succeeding bugfixes to the 1.0 trunk. Using older versions or the recent nightlies will probably be a hit-or-miss affair, proceed only if you know what you are doing.

This document was ripped from WP’s readme.html, and is provided for users of this hack.

Changelog

1.2 (May 14, 2004)
Added an rss2 feed for links syndication. Link to the feed is given by the rpmod_recentlinks_rss2_url() function, another addition.
Fixed the displayed text for the title attribute produced by the function rpmod_recentlinks(), now more simpler. If you didn't add a description, you will simply get the date.
1.11 (April 27, 2004)
Removed some unnecessary "breaks", which caused a problem for some users. (As reported by Kate. Thanks Kate!)
1.1 (April 5, 2004)
Added bookmarklet, taken from "Press It" on the WP main post window. (Suggested by Stephen.)
Fixed a bug involving time differences on servers. (Thanks Sushubh!)

Installation

  1. Unzip the package in an empty directory.
  2. Upload/Copy/Edit the following files:
    wp-recent-links.php
    Upload to your wordpress root; i.e, the folder where your WordPress-powered page will reside.
    wp-recent-links-rss2.php
    Upload to your wordpress root; i.e, the folder where your WordPress-powered page and syndication pages reside.
    recent-links.php
    Upload inside your wp-admin/ directory.
    menu.txt
    If you haven’t edited the default menu.txt file in your wordpress install, it is safe to copy/upload this to your wp-admin/ directory and overwrite the original file.

    If you have edited it before, just add a new menu item with a user level of 5, pointing to recent-links.php and named “Recent Links.”

    my-hacks.php
    Copy the functions inside this file to your my-hacks.php file, and make sure it is enabled in WordPress’s options. if you currently don’t have one, just upload this file and enable it in the options page.
    rpmod-recent-links-setup.php
    Upload to your wordpress root, used only to setup the required tables.
  3. If you are using WordPress’s mod_rewrite rules, add the following rules to your .htaccess file on the server (where you also placed WP’s generated rewrite rules):
    
    RewriteRule    ^recent-links/feed?/?$    wp-recent-links-rss2.php   [QSA]
    RewriteRule    ^recent-links?/?$    wp-recent-links.php   [QSA]
    RewriteRule    ^recent-links/([0-9]{4})?/?([0-9]{1,2})?/?$    wp-recent-links.php?y=$1&m=$2   [QSA]
          
  4. Open rpmod-recent-links-setup.php in your browser, and follow the one-step instruction! after this, you are good to go! You may now delete rpmod-recent-links-setup.php.
  5. Login to WordPress and start using your recent-links hack, using the new menu item "Recent Links."
  6. Edit wp-recent-links.php to your site’s style and design.
  7. 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!)
    
    <!-- begin recent links block -->
    <h2>Recent Links</h2>
    <ul>
        <?php rpmod_recentlinks(12, '<li>', '</li>'); ?>
         <li><a href="<?php rpmod_recentlinks_archives_url(); ?>" rel="Links Archives">more &#187;</a></li> | <a href="<?php rpmod_recentlinks_rss2_url(); ?>" rel="RSS2 feed for recently added links.">feed &#187;</a>
    </ul>
    <!-- end recent links block -->
    

Upgrade

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

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.