Gossamer Forum
Quote Reply
Del.icio.us integration
Do you know del.icio.us? Your users do.

I've found a simple way to integrate LSQL with del.icio.us.

Since del.icio.us offers an open api with basic authentification, you can offer your users to add one of your links to his/her own del.icio.us account. You can also make it easy to add a new link to your site to del.icio.us.

In your link.html and add_success.html templates, add this link:
<a href="http://del.icio.us/api/posts/add?url=<%URL%>&description=<%Title%>&extended=<%Description%>&tags=<%catname%>">Add to del.icio.us</a>

<%catname%> is a global that gets the category name:
Quote:
sub {
my ($rec) = @_;
my $id = $rec->{ID};
my $db = $DB->table ('Category','CatLinks');
my $sth = $db->select ( { 'CatLinks.LinkID' => $id }, ['Category.ID', 'Category.Name'] );
my $cat;
while (my ($id,$name) = $sth->fetchrow_array) {

$name =~ s/ /_/g;
$cat = "$name";

}
return $cat;
}

I suppose the add_success.html thing could be automated, but I like the optional way it works. After all, it is just a click away from the confirmation page.

Both these functions prompts for a del.icio.us user account.