Subscribe to
Posts
Comments
NSLog(); Header Image

del.icio.us within PulpFiction

pulp_fiction.jpgSeveral of our customers have asked us for place to put bookmarklets within PulpFiction. Bookmarklets are just chunks of JavaScript, and we've already got a place in which javascripts can run: the bottom pane where you read articles!

In response to these custoers, I've added del.icio.us support to PulpFiction's default template and posted it in the PulpFiction Resources section under "Stylesheets." Have a look or read on for a very quick tutorial that will allow you to add the del.icio.us links to your own favorite stylesheet.

Clearly, we'll want to put the JavaScript links in somewhere. I chose to wrap them in a div (so that I could style it) and a simple unordered list:

<div id="delicious"><ul>
    <li><a href="javascript:location.href='http://del.icio.us/username?
v=2&url='+encodeURIComponent('^u')+'&title='+encodeURIComponent('^n')"
title="use this to make a bookmark">Post to del.icio.us</a></li>
    <li><a href="javascript:q='^u';p='^n';
void(open('http://del.icio.us/username?v=2&noui=yes&jump=close&
url='+encodeURIComponent(q)+'& title='+encodeURIComponent(p),
'delicious',%20'toolbar=no,width=700,height=250') );" title="use this one to make
a bookmark for posting">popup post to del.icio.us</a></li>
</ul></div>

You'll want to replace the two occurrences of "username" with your del.icio.us username, of course.

That's about it. I styled the example by adding this to the style section of the stylesheet:

#delicious
{
    width: 200px;
    float: right;
    font-size: 10px;
    border: 1px solid #^l;
    border-top: none;
    border-right: none;
    margin: 0 0 10px 10px;
}

The result looks like this:

Delicious

I used the label color to draw the left and bottom borders of the box so that it blends in with the bar, but you're of course free to do whatever you'd like: this is merely an example. One last thing: don't forget to change "username" to your username!

Again, you can download this stylesheet from the "Stylesheets" section of the PulpFiction Resources page.

2 Responses to "del.icio.us within PulpFiction"

  1. Wow, that was fast! Thank-you so much.

  2. This is brilliant! What a great idea. I've finally started to embrace del.icio.us. and then I find this.


Comments RSS

Leave a Reply


Warning: Undefined variable $user_ID in /var/www/vhosts/nslog.com/httpsdocs/wp-content/themes/nslog/comments.php on line 96

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.