Delicious Save Buttons

With a “Bookmark this on Delicious” link, you can provide your site visitors an easy way to save it to Delicious. Here is an example (with an image added before the link):

Delicious Bookmark this on Delicious

The best way to accomplish this is by including some javascript which pops up a post window. If javascript is off, it will navigate to the post page. Here is the code:

<img src=”http://static.delicious.com/img/delicious.small.gif&#8221; height=”10″ width=”10″ alt=”Delicious” /> <a href=”http://delicious.com/save&#8221; onclick=”window.open(‘http://delicious.com/save?v=5&noui&jump=close&url=’+encodeURIComponent(location.href)+’&title=’+encodeURIComponent(document.title), ‘delicious’,’toolbar=no,width=550,height=550′); return false;”> Bookmark this on Delicious</a>

Blog templates

A quick word of advice: Don’t do this unless you are a geek.

WordPress

To place this on your front page, go to Presentation -> Theme Editor -> Main Index Template. You may place the following code where you wish:

<img src=”http://static.delicious.com/img/delicious.small.gif&#8221; height=”10″ width=”10″ alt=”Delicious” /> <a href=”http://delicious.com/save&#8221; onclick=”window.open(‘http://delicious.com/save?v=5&noui&jump=close&url=’+encodeURIComponent(‘&lt;?php the_permalink() ?>’)+’&title=’+encodeURIComponent(‘<?php the_title() ?>’),’delicious’, ‘toolbar=no,width=550,height=550’); return false;”> Bookmark this on Delicious</a>

Movable Type

In your Main Index and Individual Archive templates, after </MTIfAllowComments>, add:

<img src=”http://static.delicious.com/img/delicious.small.gif&#8221; height=”10″ width=”10″ alt=”Delicious” /> <a href=”http://delicious.com/save&#8221; onclick=”window.open(‘http://delicious.com/save?v=5&noui&jump=close&url=’+encodeURIComponent(<$MTEntryPermalink$&gt;)+’&title=’+encodeURIComponent(<$MTEntryTitle$>),’delicious’, ‘toolbar=no,width=550,height=550’); return false;”> Bookmark this on Delicious</a>

Browser Buttons

If you’re looking to install the browser toolbar buttons for saving bookmarks to Delicious, here’s where to go: the Firefox buttons, Internet Explorer buttons, or bookmarklet buttons for any browser.

Advertisements

Code to Create Custom Share Buttons for Facebook, Twitter, LinkedIn and Delicious

Interested in sharing your content on Facebook, Twitter, LinkedIn or delicious? Do multi-option social media sharing tools such as ShareThis seem like overkill?

That was our conclusion after researching the social media sites on which readers are most likely to share content from our blog focused on solutions to a wide range of business challenges, What Works for Business. We decided that Facebook, LinkedIn, delicious, and Twitter were the sites on which our target business audience is most likely to share business-related content. Rather than using the ShareThis widget which provides many more options (many confusing options for most of our readers), we decided to create custom share buttons.

To add custom share buttons automatically to each post in a WordPress blog, add the following code to single.php, the file which renders the individual post (note that you must be using WordPress.org, the self-hosted version of WordPress, to be able to customize the php files). See an example of how this looks.

Facebook Share Button Code

Here is the Facebook share code, which can also be found at http://www.facebook.com/share_partners.php/.

<script>function fbs_click() {u=location.href;t=document.title;window.open(’http://www.facebook.com/sharer.php?u=’+encodeURIComponent(u)+’&t=’+encodeURIComponent(t),’sharer’,’toolbar=0,status=0,width=626,height=436′);return false;}</script><a href=”http://www.facebook.com/share.php?u=<url>” onclick=”return fbs_click()” target=”_blank”><img src=”ADD_IMAGE_URL_HERE” alt=”Share on Facebook” /></a>

Twitter Share Button Code

Here is the Twitter share code, which can also be found at http://www.jhuskisson.com/code-tidbits/share-on-twitter-link.

<a href=”http://twitter.com/home?status=Currentlyreading <?php the_permalink(); ?>” title=”Click to share this post on Twitter””><img src=”ADD_IMAGE_URL_HERE” alt=”Share on Twitter”></a>

LinkedIn Share Button Code

Here is the LinkedIn share code, which can also be found at http://www.linkedin.com/static?key=developers_widget_shareonlinkedin.

<a href=”http://www.linkedin.com/shareArticle?mini=true&url=<?phpthe_permalink(); ?>&title=<?php the_title(); ?>&source=ADD_YOUR_BLOG_URL_HERE”><img src=”ADD_IMAGE_URL_HERE”></a>

delicious Share Button Code

Here is the delicious share code, which can also be found at http://delicious.com/help/savebuttons.

<a href=”http://delicious.com/save” onclick=”window.open(’http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=’+encodeURIComponent(’<?php the_permalink() ?>’)+’&amp;title=’+encodeURIComponent(’<?php the_title() ?>’),’delicious’, ‘toolbar=no,width=550,height=550′); return false;”><img src=”ADD_IMAGE_URL_HERE” height=”20″ width=”20″ alt=”Delicious” /></a>