delicious linkroll api tip

I just discovered a very quick and easy way to have a live list of delicous bookmarks on a Wordpress blog; although this will work anywhere that javascript can be dropped in.

First, I went to Delicious’ javascript generator page. I checked off the options I wanted, including showing the notes that I attach with each entry I make. This resulted in the following javascript (spacing and line breaks added for visibility):

< script type="text/javascript" src="http://del.icio.us/feeds/js/digitalramble?
extended;
title=my%20del.icio.us;
icon=s;
name">< /script>
<noscript><a href="http://del.icio.us/digitalramble">my del.icio.us</a></noscript>

I then opened up my WP’s admin pages, and started a Write->Write Page session (not Write Post). Then I copied the javascript generated by delicious into this page, with the title that I wanted, and saved the page. This now creates a static page (similar to the about page) but which will show my last 15 entries to delicious at any given time.

I tweaked the styles by finding the css styles used by delicious listed on style page, and adding that to my style.css file, with appropriate modifications. For the curious, this is what I wound up using:

 
.delicious-posts {
        margin: 1em;
        padding: 0.5em;
        font-family: sans-serif;
        font-size: 120%;
}
.delicious-posts ul, .delicious-posts li, .delicious-banner {
        margin: 0;
        padding: 0.25em;
}
.delicious-post {
        border-top: 1px solid #eee;
        padding: 0.25em;
}
.delicious-odd {
        background-color: #f8f8f8;
}
.delicious-posts a:hover {
        text-decoration: underline;
}
.delicious-posts a {
        text-decoration: none;
}

No further need for the plugin I used to use… If I wanted a quick list for the sidebar, I’d go back to the javascript page, and choose something like 5 entries, no notes, no titles or afterwards to make it as short and quick as possible, and then drop that into my sidebar.php file. Easy.

del.icio.us:delicious linkroll api tip  digg:delicious linkroll api tip

Leave a Comment

Bad Behavior has blocked 241 access attempts in the last 7 days.