All the Links as seen on my Bookmarks page are actually syndicated from my del.icio.us account. I even use it on my clients blogs to syndicate feed from local/international newspaper sites, blogs and even flickr photos. I refuse to use a plugin to do the job and for that matter I recycle the codes from WordPress core, wp-admin/index.php to be exact. Although it’s not as flexible and has its limit unlike all the Atom/RSS aggregator plugins out there but I’m pretty much happy with it.
Once the content has been syndicated, it is stored temporarily inside your WordPress database options table. Yes, it’s temporary. If you need something permanent, I suggest that you seek other alternatives.
The codes and pairing it with xFolk
Like I said before, the codes are taken from WordPress core with a little bit of modification. You can see it in action from WordPress Admin Dashboard page where WordPress uses it to grab latest news from Planet WordPress and WordPress development blog. The difference is that I’ve paired the codes with xFolk format and wrap it up with unordered list (<li> inside <ul>).
<?php
require_once (ABSPATH . WPINC . '/rss-functions.php');
$rss = @fetch_rss('http://del.icio.us/rss/zeo/');
if ( isset($rss->items) && 0 != count($rss->items) ) {
$rss_1 = parse_w3cdtf($item['dc']['date']);
$date = date('d F Y g:i a', $rss_1);
?>
<ul>
<?php
$rss->items = array_slice($rss->items, 0, 10);
foreach ($rss->items as $item ) {
?>
<li class='xfolkentry'>
<a rel='bookmark' class='taggedlink' href='<?php echo wp_filter_kses($item['link']); ?>' title='<?php echo wp_specialchars($item['title']); ?>'><?php echo wp_specialchars($item['title']); ?></a> added on <abbr class='published' title='<?php echo $item['dc']['date']; ?>'><?php echo $date; ?></abbr>
<p class='description'><?php echo $item['description']; ?></p>
</li>
<?php } ?>
</ul>
<?php } ?>
Take note: As for WordPress 2.1 revision 3862 and later, rss-functions.php has been renamed to rss.php.
Basically, all you have to do is paste these codes anywhere in your blog template. If you’d like to add it into a separate page like mine, the important steps have already been explained over at WordPress Codex Creating your own Page Templates.
Modify according to your needs
I’ve highlighted the important lines that you need to change to suit your needs. First is the RSS link (duh!) and second is the numbers of item to be displayed. Everything else is pretty obvious.
Good luck playing.
ADDED: I’ve updated the code to support del.icio.us RSS 1.0’s dc:date.
One question though.
Since we only displaying 10 (example) items, can’t we like add a link where we can actually read the other bookmarks (example another 10 new links).
sorry off topik kejap
zeo, what flikr plugin that you wud suggest? i want a plugin that can display images from MY account, not randomly display images from other flickr users.. do you have one that u can suggest to me?
Sorry for answering this but…
Ditri, you should check out FlickrRSS, it allows you to integrate photos from any Flickr account. It offers some display options as well. It’s what I’m currently using on my site and it works like a charm!
Chris,
Last nite, I was going to tell U that FlickRss did not work well for me, but it looks like i have missed something outta that plugin, and now, it works like a charm to me too, so thanks mucho to you ^__^
Tried it out with WordPress 2.1-alpha3… Didn’t work…
>> rss-functions.php has been renamed to rss.php
Still not working… Getting an unexpected $end error :-(