post-page

Simple news feed for links list in WordPress

6
responses
by
 
on
February 15th, 2004
in
WordPress Hack

I had a question in the WordPress forums about my links list RSS feed reader and I wrote up a little tutorial for it. Check out the links list in Mindful Musings for a better idea of what I mean. So here goes.

I added the RSS 2.0 feed with each of my link manager links (updated them manually, look inside each link under link manager). Then in links.php (in wp-includes folder) I found this line (inside the get_links() function) that shows the updated links:
if ($show_updated && $row->recently_updated) {
echo get_settings(‘links_recently_updated_append’);
}

and replaced it with this:
if ($show_updated && $row->recently_updated) {
echo get_settings(‘links_recently_updated_append’);
if ($row->link_rss!=””) echo ”  <span style=\”border-bottom: 1px dashed #ccc;
padding-bottom: 0px; font-size: 85%\”><a href=\”newsreader.php?url=$row->link_rss\”>RSS</a></span>\n”;
}

I find this line in the same file:
$sql = “SELECT link_url, link_name, link_image, link_target,
link_description, link_rating, link_rel,
$length $recently_updated_test $get_updated
FROM $tablelinks
WHERE link_visible = ‘Y’ ” .
$category_query;

and replace it with:
$sql = “SELECT link_url, link_name, link_image, link_target,
link_description, link_rating, link_rel, link_rss $length $recently_updated_test $get_updated
FROM $tablelinks
WHERE link_visible = ‘Y’ ” .
$category_query;

Finally, I uploaded this file to the root of my blog. http://weblogtoolscollection.com/b2-img/newsreader.phps

This is a very simple newsreader I wrote for educational purposes (Figuring out an ultra liberal feed parser for php). It takes one variable for now. The variable is ‘url’ and it is the RSS (2.0 preferred) feed of the blog. For example, here is the news feed to my own blog. Notice how the url works:
http://dinki.mine.nu/weblog/newsreader.php?url=http://dinki.mine.nu/weblog/wp-rss2.php

The final product shows all the rss feed links for recently updated blogs alongside the links list. I use it as my own “blogroll” news reader.

heading
heading
6
Responses

 

Comments

  1. Ash Haque says:

    I use this RSS Parser: http://rawlinson.us/blog/index.php?p=212

    It was kind weird, like the first time I tried it worked! That usually never happens to me, it’s really easy to use too.

  2. Jorge says:

    I have some problem with your template. I use Opera at my work (800×600) and the phrase “Translate this blog” superpose the title of the blog… I apologize for this comment if the template is optimized for 1024 x 768… and for my poor english šŸ™‚

  3. Mark says:

    Sorry. šŸ™‚ This template will eventually get replaced with a new version of it when I get this blog updated to 1.1 As soon as I have some free time……

    LOL

  4. mark says:

    Is there a way to actually get and display an RSS feed inside my main page template?

  5. Mark says:

    Sure, just use this example to create your news feed as a link
    http://dinki.mine.nu/weblog/ne.....p-rss2.php



Trackbacks/Pingbacks

Obviously Powered by WordPress. © 2003-2013

css.php