Plugin Directory

Simple Social Bookmarks

Simple Social Bookmarks adds icons to your posts and/or pages that allow your visitors to easily submit them on social bookmarking and network sites.

Download Version 3.1.2

Please note, if upgrading from a version previous to 3.0: Version 3 has changed some of the existing service names and icon filenames - please check the version history for further details. In addition, the standard icon set has changed.

Simple Social Bookmarks is an easy but powerful way to implement Social Bookmarking on your WordPress blog. It has links to over 200 Social Bookmarking networks - more than any other plugin - and is fully XHTML standards compliant.

Many non-English bookmarking sites are included - particularly Russian, Chinese and Japanese. Because of the use of icons and a lack of an administration screen, Simple Social Bookmarks does not require translation to other languages.

It will display a row of social bookmarking icons wherever you add its code - for an individual post and page or in a sidebar. They are split between bookmarking services and tools (e.g. printing, converting to PDF, etc).

For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but donations are always welcome.

The code for Simple Social Bookmarks should be added to your theme's code where required. In the case of posts this should be within "the loop".

Here is an example on use...

<?php echo simple_social_bookmarks('','','padding-left: 5px; padding-right: 5px','iconfolder=24x24'); ?>

There are 5 parameters in total that can be specified, but all are optional.

The first parameter is the URL that you wish the social sites to bookmark. If left blank (and this is probably the default for most people) it will use the URL of the current post or page.

The second parameter is where you can specify a shortened URL to bookmark (if you have one available). To maintain backward compatibility with previous version of this plugin, the URL must begin with "http" to be accepted. At the moment Twitter, Identica and Blip will be passed shortened URLs. If you think any other services should be included, please let me know. If no short URL is specified then the post/page short link will be used - if this is not available then a short URL will not be used.

The third parameter is a style definition which applies to the bookmark icons. This should, where possible, not be used in preference to using CSS definitions. Instead each element generated has a class of ssb so that it can be defined via your own stylesheet. The separator class is ssb_sep.

The fourth parameter can contain a number of options, all of which are separated by an ampersand. These options are as follows...

default= This should be on, off or basic and defines which social bookmarks should display by default. on means all should display, off means none should be displayed and basic shows a basic few. Not specifying this sub-parameter will cause the basic set to be displayed.

iconfolder= If not specified, a default set of 16x16 pixel icons will be used. If, however, you'd like to use your own icons then you will need to add a sub-folder in your theme folder and then use this parameter to specify the sub-folders name. If you are using a child theme then the the folder should be in the folder for the child theme. In the above example, I am specifying a sub-folder named 24x24. Icons should all have a .PNG extension and the file names must match the bookmarking service name, as specified below. Bookmarking services are shown first and tools afterwards.

priority= Allows you to specify whether a bookmark link should be via AddThis (1), Shareaholic (2) or AddtoAny (3) (if a link via more than one is available). This is defined by providing a series of numbers representing the order of the services. So, a priority of 231 would be Shareaholic first, followed by AddToAny and then AddThis. The default priority is 123.

nofollow= By default, REL=NOFOLLOW will be added to all links. However, if this is specified as NO then this will be deactivated.

target= Allows you to specify a TARGET. By default this is not used.

separator= If you wish to display a separator image between the bookmark and icon lists then you must specify separator=Yes. An image named separator.png will then be displayed. If using your own folder for images then this image will be required as well.

id= If using the animation option (see the later section) then a unique ID must be specified for each set of social bookmarks on the screen. If there is only one set of bookmarks per post and page, then the best option is to pass the post ID via get_the_ID(). By default, no ID is specified so animation is turned off.

There are also options for EACH of the social bookmarking services allowing you to specify whether they should be turned on or off. So, for example, to turn Digg off, you would specify digg=off.

So, as a further example, if you ONLY wanted the Delicious and Digg bookmarks to appear, it would be best to specify the default as off and then turn Delicious and Digg on individually, like so...

<?php echo simple_social_bookmarks('','','','default=off&delicious=on&digg=on'); ?>

Finally, the fifth parameter is an optional title - if this is not specified the title of the current page or post is used.

The full list of social bookmark services are listed separately. However, the basic set of services are as follows...

Delicious, Digg, Email, Facebook, LinkedIn, Print Friendly (Print), reddit, StumbleUpon and Twitter.

Here is a further version of the original example, but this time with a check to confirm that the plugin is active...

<?php if (function_exists('simple_social_bookmarks')) : ?>
<?php echo simple_social_bookmarks('','','padding-left: 5px; padding-right: 5px','iconfolder=24x24'); ?>
<?php endif; ?>

Using the shortcode

If you wish to add social bookmarks directly into a post or page you can use the shortcode [bookmarks]. All the same parameters as the PHP function are available and are named url, shorturl, style, options and title.

An example would be...

[bookmarks url="http://www.artiss.co.uk" style="padding-left: 5px; padding-right: 5px" options="iconfolder=24x24"]

Adding To Your Feed

It's possible to add the Social Bookmarks to your WordPress feed. Open up your functions.php file within your theme folder and add the following code...

<?php
function insertRss($content) {
    if ((is_feed())&&(function_exists('simple_social_bookmarks'))) {
        $content = $content."<p>".simple_social_bookmarks('','','padding-left: 2px; padding-right: 2px','iconfolder=16x16')."</p>";
    }
    return $content;
}
add_filter('the_content', 'insertRss');
?>

Obviously, you will need to modify the parameters that are passed to the Simple Social Bookmarks plugin, to make it appropriate for yourself. In the above example you may notice that I'm using an alternative set of icons with a small padded space between them.

Animation

A basic animation option is available and is switched on by providing a unique ID parameter (see earlier details).

Once specified, hovering over a bookmark option will switch it from the standard icon to another with _hov on the end.

For instance, hovering over twitter.png will switch the image to twitter_hov.png. When you move away, it will return to the original image. This extra image will need to exist in the same folder as the first.

However, although basic, it can be used for all sorts of effects, such as black & white icons becoming coloured when hovered over or icons that expand in size.

Here is an example where I'm switching on the animation option by specifying a unique ID...

<?php echo simple_social_bookmarks('','','padding-left: 2px; padding-right: 2px','separator=Yes&id='.get_the_ID()); ?>

Animation can also be performed by modifying the stylesheet. The following example will cause the images to move up by 5 pixels whenever they are hovered over, in a similar way to the SexyBookmarks or Simple Social plugins.

.ssb img, .ssb_sep {
    padding-top: 5px;
    padding-bottom: 0;
    padding-left: 5px;
    padding-right: 5px
}
.ssb img:hover {
    padding-top: 0;
    padding-bottom: 5px;
}
Author: dartiss

Requires: 2.0 or higher
Compatible up to: 3.3.1
Last Updated: 2012-2-10 Downloads: 45,536

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(15 ratings)

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

Log in to vote.

100,1,1
100,1,1
100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
100,1,1
100,2,2
0,1,0
100,2,2 100,1,1
0,1,0
100,2,2 80,5,4
0,1,0
100,4,4