WordPress database error: [Got error 28 from storage engine]
SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag') AND tr.object_id IN (89) ORDER BY t.name ASC

wordlog.com » How to Display Links in Your Link Roll in the Order Updated

A weblog authored by Carthik about the latest in the WordPress world.

Sunday, August 29, 2004

How to Display Links in Your Link Roll in the Order Updated

Filed under: Uncategorized — Carthik @ 3:35 am

Today, your’s truly brings to you a guide to showing links in your link manager ordered by the most recently updated weblogs. This is useful when you have a lot of blogs in your link roll, and you want to show the links in the order of “freshness” of the blogs, that is, with the most recently updated blog appearing first in the list.

Ok, I am bored. No one has anything interesting to say about WordPress today. Today being a Saturday (early Sunday already, actually), and all that. So I thought I will write a long tutorial for you.

You can see this in action at Molly’s blog, where the links in her Blogroll are in the order updated — “freshest to mustiest“, as she so eloquently puts it. Matt’s Portal page is also a good example of this.

1) Get a plugin and update it.
2) chmod a file.
3) Set the right options.
4) Add the right template tag.

Now, for a detailed blow-by-blow account :

Step 1:
a) Save the Update Linkroll plugin which was Carthik’s first ever plugin ;) .
b) Rename the file as updatelinkroll.php
c) Upload it to your wp-content/plugins folder.
d) Activate the plugin from the plugins page visible at the administration interface after you log in.

Step 2:

a) CHMOD the links-update-cache.xml file in the wp-content folder to 766 (so that it is writable by wordpress)
b) Notice the existence of a file called link-update-cache.xml (link, not links) in wp-content and pat yourself on your back for not getting confused between this imposter and the real file that does all the work, which you CHMOD’ed. You don’t need the link-update-cache.xml file at all, so go ahead and delete it, if you like. Helps avoid confusion, you know.

Step 3:

a) Tweak the options in wp-admin/options.php?option_group_id=8 (The link manager options)

The following options are the ones related to displaying updated links:

  • weblogs_xml_url – You won’t need to change this. This specifies the URL of the xml file with the list of recently changed weblogs.
  • weblogs_cacheminutes – Specify the number of minutes WP waits before it updates the cached list of recently updated blogs it got from weblogs.com (something like 30 or 60 should be fine, really)
  • links_updated_date_format – The date format for the updated tooltip, leave it the way it is, if you are not too particular about minutae.
  • links_recently_updated_prepend – The text to prepend to a recently updated link
  • links_recently_updated_append – The text to append to a recently updated link
  • links_recently_updated_time - The time in minutes to consider a link recently updated

Step 4:
Add a suitable template tag to your index.php where you want the list of links to appear. The following template tag works, so it’s a good place to start, when in doubt:
<?php get_links('-1','<li>','</li>',' ','true','_updated','false','false','-1','1','true'); ?>
More details about that template tag are available at the get_links wiki page.

Or, you can use wp_get_links()
to display the links. You can order the list by “recently updated” by clicking the “Links” tab in the admin interface, and then link-categories (wp-admin/link-categories.php). There, for each category, you can decide the order of display of links. The whole idea is that you use the wp_get_links to display the list of links, and you use the “Links” menu in the admin interface to adjust everything about how the links are displayed.
The link manager in WordPress is largely the effort of Mike. He was extremely helpful in understanding how the links manager works. Thanks, Mike :)


  1. [...] in the Order Updated
    Filed under: 2do WordPress — Kishore @ 6:06 pm

    wordlog.com � How to Display Links in Your Link Roll in the Order Updated : …..T [...]

    Pingback by Kishore Balakrishnan's Weblog » wordlog.com � How to Display Links in Your Link Roll in the Order Updated — 8/29/2004 @ 10:07 am

  2. [...] ign as anything other than an html tag! A brief and easy to follow tutorial can be found here at wordlog.com. I may extend this to my other RSS feeds as well but haven’t [...]

    Pingback by Farmer Blog » Blog Archive » Blogroll — 9/14/2004 @ 2:45 am

  3. nächstes Todo hier
    wordlog.com » How to Display Links in Your Link Roll in the Order Updated
    Today, your%u2019s truly brings to you a guide to showing links in your link manager ordered by the most recently updated weblogs. Oder sollten die Links weiter alphabetische g…

    Trackback by netbib weblog — 8/29/2004 @ 10:43 am

  4. wow ! tanx ! so usefull :D

    Comment by Ali ix — 8/29/2004 @ 2:16 pm

  5. You’re welcome.

    Comment by Carthik — 8/29/2004 @ 4:54 pm

  6. Hello Carthik! Have been visiting this site for quite some time! Its been very helpful to me thanks so much! :smile:

    Off topic: Do you know if it is possible to change the time zone for different authors? I have one author in India while i am in USA. Just wanted to see if you knew. Thanks in advance! :smile:

    Comment by Poonam — 8/29/2004 @ 7:45 pm

  7. Poonam,
    Thank you :)

    Interesting! Though there is a method to define the time offset for the author, for the case where the author is a different timezone from the server, it is not possible to do that same for every author. It is possible for only one author.
    You can post a bug report at Mosquito requesting that there be support for this.

    Comment by Carthik — 8/29/2004 @ 8:58 pm

  8. Thank you Carthik for the suggestion! I have now posted it on Mosquito. :smile:

    Comment by Poonam — 8/29/2004 @ 11:10 pm

  9. Blogroll
    I’ve been working on my Blogroll to list the most recently updated items first using the Update Linkroll plugin by Carthik. Blogs updated within the last two hours will appear bracketed (with too “less than” signs followed by two “greater than” s…

    Trackback by Farmer Blog — 9/13/2004 @ 10:45 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress

eXTReMe Tracker