Support » Fixing WordPress » Last updated, links

  • I am having the most awful time getting my link lists to reflect the last time they were updated. All I want is a little indicator next to a link if it was updated in the last few hours (minutes, seconds, days– I’m flexible on this).

    This worked well in older versions of WP but has failed since an upgrade to 1.5. I’ve searched the forums, hacked and slashed the code and included everything short of the kitchen sink — it ain’t happening.

    Currently, I have an include at the top of my template:

    <?php include_once

    and, of course, I have selected ‘track updates’ in Options > Misc.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Not to insult your intelligence, but this is how the link updates tracking works in WordPress (by the way, when I refer to a ‘setting’, I mean the row in wp_options table with that option_name).

    • When the file wp-admin/update-links.php is included, it will send a HTTP request off to to pull a list of when each link has been updated, and populates the link_updated column in wp_links.
    • When get_links_list() is called, it iterates through the list of link categories
    • With each one, get_links() is called
    • This checks if the setting links_recently_updated_time is set
    • If it is, a column recently_updated will be returned from the database query inside get_links(), which indicates whether the link’s link_updated field + links_recently_updated_time is later than now()
    • get_links() then proceeds on to output the list of links. If the show_updated field of the link category which the current link belongs to is true and if the link’s recently_updated field (see previous point) is true, then whatever’s in the setting links_recently_updated_prepend is output before the link, and links_recently_updated_append is output after the link. Also, if show_updated is true, then a string indicating that the link has recently been updated will be shown.

    So, the things to check:

    • wp_options->use_linksupdate is true
    • wp_options->links_recently_updated_time is > 0 (the default is 120, this represents how many minutes ago we call ‘recent’)
    • wp_options->links_recently_updated_prepend and wp_options->links_recently_updated_append are what you want to prepend and append to updated links.
    • Your host allows remote fsockopen calls. If not, the HTTP request in wp-admin/update-links.php will fail.
    Mark (podz)


    Support Maven

    I just tried that.

    1 – We shouldn’t be messing in the database to alter settings should we ? In 1.5.1 I can access the ‘master list’ of options, but again if that was considered safe it would be linked. And even doing things there has no effect.

    2. It does not work. I just tried it – set of links on my page called “Latest Updated” – there are non-pingers in that list.

    3. This non-working happens with 2 hosts.

    If it DOES work, can someone give step by step without any need to use the database ?

    If you need to change the append/prepend for the links, I don’t think you can do it from within WP. If you have access via phpmyadmin, have a look at wp_options entris 80 – 82. In the option_values I have < for the append and 1440 (seconds) for update time.
    I also run update-links.php with a cron job once every 12 hours.

    Mark (podz)


    Support Maven

    My point is that in 1.2.x, this “just worked”
    Now it does not.

    Actually, it only “just worked” when “just Worked”, which has been a rare occurrence lately.

    There are, however, a couple of issues with the Pingomatic API:

    1) The number of sites that ping it is still small compared to some of the older blog trackers.

    2) It only recognizes sites in the “http://domainname.tld” format. If a link in your list is in the “http://www.domainname.tld” format, the API will not recognize it.

    There’s a plugin around that uses instead of Pingomatic. You may have more success with it.

    Matt Mullenweg says that he has fixed the Pingomatic bug I refer to in “2)” above.

    David, your certainly not insulting my intelligence — it never occurred to me that I would have to set options manually in the database.

    However, upon taking a look I see that all of the database fields you referenced are already what you suggest. It still doesn’t work.

    I would also like to make this function *work* again. I’ve just checked my database and it’s set to double asterisk updated links, but I haven’t seen anything happen since my upgrade.

    Good thread. To IanD and Podz, with you can hit:
    wp-admin/options.php in a browser to access this info. I’ve been able to change the append and prepend as well as the update times from there. Lots of other stuff, so be careful.

    I wrote my first plugin (monkey see monkey do) that places a menu entry to this in the options panel, but never published it after I saw someone else already had done so.

    Mark (podz)


    Support Maven

    I’ve since moved to displaying a random list of links from the one category. As I’m linking to non-pingers it means they get equal ‘air time’ too.


    Should I just put an ‘*’ on the append/prepend with or should I erase the ’em’ there?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Last updated, links’ is closed to new replies.