WordPress.org

Ready to get started?Download WordPress

Forums

Update Links Plugin. (43 posts)

  1. carthik
    Member
    Posted 10 years ago #

    I wrote a plugin that checks if any of your link-roll linked weblogs have been recently updated, and marks them as recently updated, using the options you have specified in your WordPress link manager options page.
    This does what used to be acheived by uncommenting one line in index.php earlier, which is no longer present in the current (1.2) default index.php.
    The plugin is available at
    http://carthik.net/wpplugins/updatelinks.phps
    Download it, save it as updatelinks.php , upload it to /wp-content/plugins (your plugins folder)
    Activate the plugin through the WordPress administration Plugins page.
    Make sure your links-update-cache.xml file (in wp-content) is writable (chmod 766) and wait. Depending on your link manager options settings, and how soon or late one of the weblogs you have linked to is updated, it might take a while before you see results :)
    I have tested this (there is not much that can go wrong, I guess, with a one line function :) ) , but if there is any problem, let me know at mail at carthik dot net , in case I do not check this thread for updates.
    I beleive this plugin is essential if you want to know and show which of your linked-to blogs have been recently updated.
    I will add this to the wiki plugins page soon.

  2. ckelly5
    Member
    Posted 10 years ago #

    After following your instructions, I am getting a
    "Fatal error: Cannot redeclare update_links()" error message on my index page. It is telling me it is defined in the plugin file and "wp-includes/links-update-xml.php on line 34"
    plus the plugin page shows essentially the whole file in the plugin name section.
    anyone else seeing this?

  3. carthik
    Member
    Posted 10 years ago #

    ckelly5, you must be using a old version of index.php which has

    // Uncomment the next line if you want to track blog updates from weblogs.com
    //include_once(ABSPATH.WPINC.'/links-update-xml.php');

    on lines 5 and 6, with line line, the include_once part, uncommented.
    The new index.php does not have these lines, and that's where the plugin comes into play.

  4. ckelly5
    Member
    Posted 10 years ago #

    hmm, nope, it doesn't look like I am. the index.php is from the new 1.2 release, and I don't see any mention of the links-update.xml.php file, and even if it was, I didn't touch it and therefore it would still be commented out...
    either way, would that explain the not so pretty output in the plugins page?

  5. Tek
    Member
    Posted 10 years ago #

    This is what I am getting:
    Fatal error: Cannot redeclare update_links() (previously declared in ..../wp-content/plugins/updatelinks.php:16) in. .../wp-includes/links-update-xml.php on line 34

  6. Xadrian
    Member
    Posted 10 years ago #

    I'm getting the same error with the newest 1.2 release, no mention of links-update-xml.php in my index.php file. Weird. Seems like I should get the same error if I put the include into index.php itself, but experimentation seems to indicate otherwise. Weird.

  7. carthik
    Member
    Posted 10 years ago #

    My bad! I should rename the function update_links(); in the plugin. Will fix this as soon as I get home.

  8. carthik
    Member
    Posted 10 years ago #

    I made the corrections.
    I renamed the plugin as Update Linkroll
    Get the plugin at http://carthik.net/wpplugins/updatelinkroll.phps
    Instructions are the same and are at
    http://wiki.wordpress.org/UpdateLinkroll
    Thanks Ckelly5, Tek and Xadrian, for letting me know about the error :)
    Next time I write a plugin I will be more careful.

  9. Tek
    Member
    Posted 10 years ago #

    I have no errors now. I will wait to see when someone updates. =)

  10. Tek
    Member
    Posted 10 years ago #

    It's working fine now. I can see what has been updated. Thanks for the plugin!

  11. carthik
    Member
    Posted 10 years ago #

    You're welcome. Thanks again, for testing it and letting us know.

  12. gerard
    Member
    Posted 10 years ago #

    Just installed it on my WP1.2 weblog, and after activating i get these errors when entering the Links-menu:
    Warning: Cannot modify header information - headers already sent by (output started at d:\www\bd.nl\www\wordpress\wp-content\plugins\updatelinkroll.php:1) in d:\www\bd.nl\www\wordpress\wp-admin\link-manager.php on line 563

  13. gerard
    Member
    Posted 10 years ago #

    hmm, that code looks weird, maybe this is better:
    Warning: Cannot modify header information - headers already sent by (output started at d:\www\bd.nl\www\wordpress\wp-content\plugins\updatelinkroll.php:1) in d:\www\bd.nl\www\wordpress\wp-admin\link-manager.php on line 563

  14. carthik
    Member
    Posted 10 years ago #

    Gerard, http://faq.wordpress.net/view.php?p=7 should be of help.

  15. trench
    Member
    Posted 10 years ago #

    I instaled it. I don't get any errors but it just doesn't work on my site.

  16. trench
    Member
    Posted 10 years ago #

    If someone could take a look at my code and let me know why this isn't working I'd me greatly thankful.

  17. litlnemo
    Member
    Posted 10 years ago #

    Seems to be working for me -- thanks!

  18. carthik
    Member
    Posted 10 years ago #

    The plugin is just part of what is needed to get it to work, trench.
    You also need to check your settings in the link manager options.
    Also change permissions to the links-update-cache.xml file to 766.
    Hope that helps.

  19. randybrown
    Member
    Posted 10 years ago #

    2fargon - Nice plugin. FWIW: I did the same thing by creating a crontask that calls links-update-xml.php every 60 minutes. This has less impact on the server than calling the file each time someone hits the weblog.
    <rb>

  20. trench
    Member
    Posted 10 years ago #

    Settings are fine and links-update-cache.xml is CHMOD to 766. I must have broken some code somewhere.

  21. ckelly5
    Member
    Posted 10 years ago #

    hmm, I have to agree, I have data in the links-update-cache file, but I am not seeing any changes to the ordering :/
    any particular settings I need to change in the links settings that could be causing this?

  22. phildennison
    Member
    Posted 10 years ago #

    I'm getting an error after activating the plugin and setting the CHMOD for links-update-cache.xml to 766 as well. When I tried to update the time to consider a link recently updated, I got:
    Warning: Cannot modify header information - headers already sent by (output started at /home/phildenn/public_html/wp-content/plugins/updatelinkroll.php:25) in /home/phildenn/public_html/wp-admin/options.php on line 115
    According to the link posted above, there's a way to fix by editing something in the options.php file, is that right? I'm not terribly familiar yet with the ins-and-outs of php - can anyone help me out?

  23. Mark (podz)
    Support Maven
    Posted 10 years ago #

    That's the White space issue.
    Reason and Solution :
    It is usually because there are spaces, newlines, or other garbage
    before an opening '<?php' tag or after a closing '?>' tag, typically in
    wp-config.php. This could be true about some other file too, so please check the file that gave you the error too (mentioned in the error message).

  24. Ocean
    Member
    Posted 10 years ago #

    Why is there a plugin needed if this is something that's built into WP? I came here looking for answers, wondering why that option was in the backend if it doesn't appear to be doing anything... do I /need/ this plugin if I want the updated links?

  25. Beel
    Member
    Posted 10 years ago #

    No, my guess is you don't need the plugin if you can do a cron job (or in my case a scheduled task) to update the links.

  26. carthik
    Member
    Posted 10 years ago #

    Ocean, earlier, the same job as that which the plugin does could be accomplished by uncommenting one line in the default index.php.
    Since 1.2 that line (to be uncommented) is not there, so I wrote this plugin as an easy means of getting to update the links.
    Get the plugin file, update and activate it and there's no more worries - that was the idea behind it. It's probably the simplest plugin out there, and you really need it to get the links updated, yes.
    Cron jobs and such might be too advanced for at least some users, so this is perhaps the easiest (least work) way of updating links from within the wp system.

  27. Ocean
    Member
    Posted 10 years ago #

    Hmm. I have access to cron jobs on my account, but if it's as easy as a plugin, why not. :)
    Thanks for the explanation and the plugin. On the WordPress side of things, it makes it seem like an unfinished feature then, if you know what I mean. Perhaps something to look at in future versions.

  28. Edlef
    Member
    Posted 10 years ago #

    Hi,
    same problem like ckelly5 here:
    i have data in the links-update-cache file, but I am not seeing any changes to the ordering and no prefix like >>. I am using the Update Linkroll Plugin.
    Am i missing something????
    TIA
    Edlef

  29. Nick Momrik
    Member
    Posted 10 years ago #

    Plugin? Mine works fine without any type of plugin... I simply have this line....
    include_once(ABSPATH.WPINC.'/links-update-xml.php');
    at the top of index.php (in PHP code of course).
    Am I missing something here? What does this plugin do that WP doesn't?

  30. carthik
    Member
    Posted 10 years ago #

    MtDewVirus,
    It is perhaps the case that you are using your pre-1.2 index.php.
    In the default 1.2 index.php , that line is missing, and hence the need for a simple plugin like this one.

Topic Closed

This topic has been closed to new replies.

About this Topic