WordPress Plugin: WP Social Bookmarks

by RustedBucket on April 2, 2007 · 9 comments

WP Social Bookmarks is a plugin that will allow you to insert links to social bookmark sites in your WordPress posts. The plugin is designed around my specific needs at the moment so unlike other social bookmarking plugins it doesn’t cover every possible site out there. At present it targets the specific ones I use most frequently and if there is enough interest in this I’ll consider expanding it.

What I was looking for was to accomplish two things. First I wanted the links to be text links and not images, plus I wanted to get the counts for Digg and del.icio.us because I think that’s kind of neat. Actually the whole thing came about because I liked how John Chow has his bookmark links implemented but I couldn’t find a single plugin that performed in that manner. Most use the Digg api and simply pull back the graphical button which I think is novelty and ultimately detracts from a site. Not to mention it’s difficult to implement into a layout sometimes.

So I proceeded to put this together. It will pull back the Digg count and del.icio.us bookmark count if you choose and you can style the links pretty much anyway you want via css.

Example:
wp-social-bookmarks.jpg

Download the plugin:

You can download the plugin here.

Requirements:

This is a WordPress 2.1x plugin but it should work in previous versions without much of an issue.

Installation:

Upload the plugin to your “wp-contents/plugins” directory
You should end up with this path (“wp-contents/plugins/wp-social-bookmarks/”)
Go to the “Plugins” main menu and find “WP Social Bookmarks”, then click “Activate”

Add the following code snippet to your templates where you want the links to appear:

<?php if (function_exists('wp_social_bookmarks')) { wp_social_bookmarks(); } ?>

The links themselves can be styled via css using (id# wpsb_bookmarks)

That’s it, pretty simple. You can leave feedback or if you have an issue using it, leave a comment in this post and I’ll do my best to help you out.

Popular From The Web

{ 9 comments… read them below or add one }

Ankur April 3, 2007 at 7:58 pm

Nice lightweight plugin. If you use FeedBurner, you can do something similar by adding FeedFlare to the bottom of your posts.

Reply

Ankur April 3, 2007 at 8:42 pm

Are your Digg API calls still working? I can’t seem to fopen any digg.com URL in my Gregarious plugin. Shame, really. I had some great features planned. I guess we just wait and see.

Reply

James April 3, 2007 at 10:17 pm

Hey Ankur, no mine appear to be broken as well. Digg made some kind of update this afternoon and afterwards services.digg.com wasn’t working but it came back after about 20-30 minutes. That appears to be working now because I can pull the xml directly but for some reason PHP’s built in routines aren’t parsing it. Maybe they’re updating on their end. I think I’m going to wait til morning to mess with it though.

Reply

Moxon April 11, 2007 at 7:59 pm

Yeah, The plugin throughs an exception for me, with an XML parse error “String could not be parsed as XML”, Any thoughts?

Reply

James April 12, 2007 at 7:46 am

The issue is with Digg. They’ve apparently decided to block any scripts trying to access their API. This is happening with most all the plugins that try to get the digg count now. They’re also not responding to inquries about it so my guess is, they’ve decided they know what’s best for the community and are only going to allow the use of their badge method.

For now you can just uncheck the Digg count and the exception error will go away.

Reply

Edwin May 8, 2007 at 12:00 pm

Might be a stupid question, but where do I put this?

I tried it on various places in the templates, but on non I get the links to digg and so. I do have the links to your sites however.

Reply

kanak June 18, 2007 at 5:57 am

Great work James . I also started searching for this pluging after looking at johnchow’s web blog. Nice to get it here .. Thanks …

Reply

Konatantin July 15, 2007 at 8:00 am

Thank you for this plug-in James. I don’t wait that I’ll find it here.

Reply

ludoop July 20, 2007 at 1:10 pm

The same stupid question as Edwin wrote…..where should I put that snippet to make it work?

I use WP2.2….should I add snippet to sidebar.php or general-template or where???
It seems not working when I add it there….

Many Thanx

Reply

Leave a Comment

What is 13 + 5 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

Previous post:

Next post: