|
Cookbook /
DeliciousSummary: Insert a delicious.com user's links or tags into PmWiki
Version: 2009-10-14
Prerequisites: PmWiki 2.0.beta25
Status: Stable
Maintainers: JonHaupt, overtones99
Categories: Includes, SocialBookmarking
Questions answered by this recipe
Descriptiondelicious.com, the social bookmarking site, offers the use of javascript tagrolls and linkrolls to be used on blogs and other web sites. This script enables you to include those rolls in a PmWiki installation. In addition, the script allows you to include a "tagometer badge" showing how many times a page has been bookmarked using delicious.com, and offering the opportunity to save the page to the user's delicious.com bookmarks. It also includes a simple "network badge" which displays your account name, how many bookmarks you have, etc. To use this feature, install the delicious.phpΔ script into the cookbook/ directory, then add an The script can generate linkrolls (displaying some or all of your bookmarked links) and tagrolls (displaying some or all of your tags). The simplest linkroll can be created by using the markup The simplest way to produce a tagometer badge or network badge is to simply type The recipe is derived from the delicious.com help pages, specifically those related to tagrolls, linkrolls, tagometer, and network badges. Linkroll, Tagroll, Tagometer Badge, & Network Badge Arguments:For
For
For
If you'd rather just copy&paste from http://delicious.com/help/tagometer instead of using the recipe and it's various arguments, simply add something like the following to $DeliciousTagometerFmt = 'yourjavascripthere';
For
Again, if you'd rather just copy&paste from http://delicious.com/help/networkbadges instead of using the recipe and it's various arguments, simply add something like the following to $DeliciousBadgeFmt = 'yourjavascripthere';
Defining Default ValuesDefault values for linkroll, tagroll, tagometer badges and network badges are already defined within the recipe, but you can define your own defaults in $DeliciousBookmarkDefaults = array( 'number' => '30', 'sort' => 'alph', 'tags' => 'true', 'user' => 'myUserName', 'icon' => 'none', 'title' => '', 'showtags' => 'true', 'shownotes' => 'false', 'showname' => 'false', 'showadd' => 'false' ); $DeliciousTagDefaults = array( 'number' => '', 'sort' => 'alpha', 'sizerange' => '12-35', 'user' => '', 'flow' => 'cloud', 'title' => 'My Delicious Tags', 'color1' => '87ceeb', 'color2' => '0000ff', 'counts' => 'false', 'showicon' => 'false', 'showname' => 'false', 'showadd' => 'false' ); $DeliciousTagometerDefaults = array( 'size' => 'wide', 'icon' => 'true', 'timesSaved' => 'true', 'graph' => 'true', 'tags' => 'true' ); $DeliciousBadgeDefaults = array( 'user' => 'myAccount', 'icon' => 'medium', 'bookmarkcount' => 'true', 'networkcount' => 'true', 'fancount' => 'true', 'showicon' => 'true', 'showname' => 'true' ); CSS and Styling ExampleLinkroll - It's possible to style the linkroll links in your CSS file. Info from delicious.com on this matter is available here, though their examples are spare and not well-explained. Below are some of the more commonly used CSS lines that enable one to define separate stylings for links, tags, and notes. Note that there are several more CSS classes defined than are notated here. In addition, feel free to comment out or delete the ones you don't need. Any items that you don't include will inherit the default styling of your page. .delicious-banner, .delicious-banner a { font-size:12px; color:green; } /* style for title */
.delicious-link { color:blue; } /* color of each bookmark link */
.delicious-tag { color:red; } /* color of each tags */
.delicious-extended { color:yellow; } /* style for notes */
.delicious-even { background-color:none; display:block; } /* zebra (alternating) - EVEN */
.delicious-odd { background-color:#eee; display:inline; } /* zebra (alternating) - ODD */
Release Notes
Comments2006/10/02, Daniel I don't think del.icio.us provides this option; since the links are sent on the fly by del.icio.us's database, we're sort of forced to use whatever code they send. I think the thinking at the moment is that browsers offer the option of opening links in a new window or tab, so it's unnecessary to force the user to do it one way or another. I think using CSS you might be able to tweak it somehow, but I'm really not sure how you'd do that. - JonHaupt
note that this is something that has been requested by the Delicious community (http://support.delicious.com/forum/search.php?PostBackAction=Search&Keywords=link+new+window&Type=Topics&btnSubmit=Search(approve links)), but has not yet been delivered. however, Delicious staff have indicated ((http://support.delicious.com/forum/comments.php?DiscussionID=1999&page=1#Item_0(approve links)) that they will likely provide this functionality in a future version of their software. for now, it appears there is a javascript hack (http://support.delicious.com/forum/comments.php?DiscussionID=1186&page=1#Item_5(approve links)) that rewrites all links with target=_blank appended... - overtones99
2007/02/14, Tobias I believe this is a limitation of del.icio.us, as it doesn't know how to tell that those two urls are the same thing. I think the only way to avoid this is to make sure that the URI is always one or the other--perhaps by using a rewrite rule. It seems like probably the second one is safer, so you could rewrite all of the first one to the second one. otherwise, it's up to del.icio.us to become a smarter system. -j
2007/04/07, Mark Question though, if I just want to show the tagometer badge but not the tags or person count, just the clickable image. Thanks. Mark 2009/08/18 st 2009/10/03a overtones99 this recipe is fabulous! thank you jon (and delicious). this is totally going to revolutionize the way i share bookmarks! i noticed that it's possible to style the links in my css file. info from delicious is available here: http://delicious.com/help/linkrolls/css ... but here are some of the most valuable CSS lines i plan to use Note that there are more than are notated below; feel free to just comment out or delete the ones you don't need. Any items that you don't include will assume the default styling of your site: .delicious-banner, .delicious-banner a { font-size:12px; color:green; } /* style for title */
.delicious-link { color:blue; } /* color of each bookmark link */
.delicious-tag { color:red; } /* color of each tags */
.delicious-extended { color:yellow; } /* style for notes */
/* zebra (alternating bgcolors) - EVEN */
.delicious-even { background-color:none; display:block; }
/* zebra (alternating bgcolors) - ODD */
.delicious-odd { background-color:#eee; display:inline; }
2009/10/03b overtones99 it appears that an older version of the delicious recipe from 11/2008 was the version that was last uploaded, instead of the 4/2009 version - i noticed that the label-to-title bug had not been fixed. i fixed what i thought was probably the bug, and reuploaded it here as delicious-2009-10-03b.phpΔ, and in place the link for the current recipe for this page as well. i hope that's alright. might want to double-check. one thing i cannot yet figure out: when adding a title, it seems to prefer it as and finally, i decided to make the defaults available via SDVA, so that folks can set their own defaults in their config.php. this can now be done via $deliciousBookmarkDefaults = array(
'number' => '30',
'sort' => 'alph',
'tags' => 'true',
'user' => 'myAcct',
'icon' => 'none',
'title' => '',
'showtags' => 'true',
'shownotes' => 'false',
'showname' => 'false',
'showadd' => 'false'
);
2009/10/04 overtones99 - With delicious-2009-10-04b.phpΔ, one can now display notes via See AlsoContributors
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |