|
Cookbook /
AddThisWidgetSummary: Embed the 'AddThis' widget to enable easy sharing of webpages on facebook, delicious, twitter, and other social networking sites.
Version: 2009-05-03b
Prerequisites:
Status:
Maintainer: overtones99
Questions answered by this recipeHow do I add the 'Add This' social bookmarking widget to my webpage? DescriptionEmbed the 'AddThis' widget from http://addthis.com to enable easy sharing of webpages on facebook, delicious, twitter, and other social networking sites. NotesCode:To Install:add somewhere in your config.php:
include_once("$FarmD/cookbook/AddThis_sharingWidget.php");
the 'AddThis' widget Custom Markup looks like:(:addThis username="myUsername" btn="sm-share":)
Where to Embed it:According to the AddThis.com instructions, the embedded script should be added somewhere in the <BODY> of your page, so feel free to add it anywhere you would normally place your markup... Current Arguments:username -- created on addthis.com site - if you sign up for a username on addthis.com, you can access addthis.com's sharing statistics. even anonymous users seem to have usernames assigned in the form of a long string of random-ish characters (i.e. "49fd93d418b90e5e")... it may or may not work without it (i haven't checked), so to get the anonymous username just hit the "get your button code" button on the addthis.com site, and look for the part of the script that says something like:
var addthis_pub="49fd93d418b90e5e";
use the number generated for you in quotes for your username if you don't have a username...
btn - button styles -
More info on the 'Add This' widget: http://addthis.com ExamplesStandard Buttons(:addThis username="myUsername" btn="plus":) (:addThis username="myUsername" btn="sm-share":) (:addThis username="myUsername" btn="lg-share":) (:addThis username="myUsername" btn="sm-bookmark":) (:addThis username="myUsername" btn="lg-bookmark":) (:addThis username="myUsername" btn="lg-addthis":) Plain Texttext can be assigned via Custom Buttonsreminder: you'll need assign your custom via (:addThis username="myUsername" btn="custom":) (:addThis username="myUsername" btn="custom_NoText":) Release Notes2009-05-03b - added more standard buttons, incorporated ability to add custom button, overtones99
See Also
Contributors
Comments
User notes: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |