From version 1.3 you must now install the Simple URL Shortener plugin for the URL shortening to work in this plugin
Also please read the installation notes for ensuring that the new caching facility correctly works
The code for Simple Social Bookmarks should be added to the bottom of appropriate post/page templates within your theme (and in the case of posts, within the loop).
Here is an example...
<?php echo simple_social_bookmarks('','Currently reading a blog post titled %title% - %url%','padding-left: 5px; padding-right: 5px','service=is.gd&iconfolder=24x24'); ?>
There are 3 parameters in total that require passing.
The first parameter is the URL that you wish the Social Bookmarks to respond to. If left blank (and this is probably the default for most people) it will use the URL of the current post/page.
The second parameter is the text that is passed to Twitter. If you don't specify anything then it will take you to your Twitter account and pre-fill in the status with "I'm currently reading xxx", where xxx will be the URLaddress of the page/post that you just came from.
If, however, you'd like to define your own Twitter text, then you simply pass this as the second parameter. %url% must be specified within the sentence, as this specifies where you want the URL to go. You can also the tag %title%, which will show the post/page title in the Twitter text.
So, in the example above, it will set the status to "Currently reading a blog post titled yyy - xxx", where xxx is the URL and yyy is the title.
The third parameter is a style definition which applies to the bookmark icons. In the example above adds a 5 pixel padding to the left and right of each icon.
Finally, the fourth parameter can contain a number of sub-parameters, all of which should be divided by an ampersand. These sub-parameters are as follows...
default= - This should be on or off and defines whether ALL the social bookmarks should display by default or not. Not specifying this sub-parameter will cause all to be displayed.
service= - This allows you to specify a URL shortening service to be used with the URLs. See the documentation for Simple URL Shortener for a complete list of those that are available.
iconfolder= - By default, a set of icons in the plugin's folder will be used (kindly provided by komodomedia.com). If, however, you'd like to use your own icons then you will need to add a sub-folder and then use this parameter to specify the sub-folders name. In the above example, I am specifying a sub-folder named `24x24`.
nofollow= - If specified as `ON` this will turn on the `NOFOLLOW` attribute for the links. By default, this is switched off.
target= - Allows you to override the standard `TARGET` of `_BLANK`.
There are also sub-parameters for EACH of the social bookmarking services, allowing you to specify for each 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'); ?>
The full list of social bookmark services are as follows...
Here is a further version of the original example, but this time with a check to confirm that they plugin is active...
<?php if (function_exists('simple_social_bookmarks')) : ?>
<?php echo simple_social_bookmarks('','Currently reading a blog post titled %title% - %url%','padding-left: 5px; padding-right: 5px','service=is.gd&iconfolder=24x24'); ?>
<?php endif; ?>
It's also 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('','Currently reading a blog post titled %title% - %url%','padding-left: 2px; padding-right: 2px','service=is.gd&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 smaller icons with a small padded space between them.




