SocialBookmarkIcons
Questions answered by this recipe
How can I include a list of social bookmark icons that, when clicked, post my page to social bookmarking sites like del.icio.us, Ma.gnolia, Furl, and the like?
Description
Create dynamically a list of clickable icons for social bookmarking sites in PmWiki.
In order to accomplish this, three steps are needed: First, enable the wiki engine to build the right kinds of urls (i.e. valid ones) that include the title and whatnot from your post. Second, create a generic page that can be included on any page thus making sure you don't have to keep typing the urls. Third, style the icons so they look good.
Included in social.bookmark-icons.zip are the following:
social-bookmark-icons.zip /social-bookmark-icons social-bookmark-icons.php social-bookmark-icons.css /wikilib.d Site.SocialBookmarkIcons /uploads /Site (various image files)
Place the /social-bookmark-icons folder in your /cookbook folder. Place the /uploads/Site files in your /uploads folder, place the css file in your /pub/css folder, and enable the recipe in config.php by using
include_once("$FarmD
/cookbook/social-bookmark-icons/social-bookmark-icons.php");
When you want to include the icons for a given page, simply use
(:include Site.SocialBookmarkIcons:)
Additionally, the recipe enables the (:urlencode whatever:)
markup which will encode any text or page variable in such a way that it will be a valid url.
If you want to use these in a pagelist, you need to change them around, because (:urlencode {*$Titlespaced}:)
, for example, won't work -- you would need (:urlencode {=$Titlespaced}:)
.
Notes
In order to show only one or a few social bookmark icons, the Site.SocialBookmarkIcons page can be altered, or you could create a different page with fewer icons. Or, you could just copy the markup for the one icon you need.
Release Notes
2007-03-08: Released.
Comments
Some of this buttons doesn't work. I think they need an update. An other way to use SocialBookmarking is to generate widgets and include it on your WebSite. I've found some providers for free: www.clearspring.com, www.addthis.com. Look at Enable HTML and Java Script how to use (Security). st January 12, 2009, at 10:34 AM
Mark 13/03/07
Got an error and then realised that I had to make a directory in cookbook called 'social-bookmark-icons'. So if you get the same either make a directory or edit the include_once.
Works a charma nd very nice. Thanks Mark
See Also
Contributors
yes
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.