|
Cookbook /
FacebookLikeButton-TalkSummary: Talk page for FacebookLikeButton.
Maintainer: Ville Takanen
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment. 2011/10/11 - SaintMagoo: Here is an alternative - It just uses the standard JS stuff - No footer required & marginally faster -
function DspFBLike($pn, $opts) {
global $ScriptUrl;
$args = ParseArgs($opts);
if (empty($args['name'])){
return Keep('<a name="fb_share" type="button" share_url="http://Soft9000.com">Share on Facebook</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>');
}
else {
//Just name given -> make pagename from the title
$fbhref=$ScriptUrl."?n=".MakePageName($pn ,$args['name']);
return Keep('<center><a name="fb_share" type="button" share_url="'.$fbhref.'">Share on Facebook</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></center>');
}
Thanks, -Rn --- Any way to include this in the top-header? -Tried just putting (:fblike:) into the pmwiki.templ, but that obviously was not the way to go..? Have you tried the Works perfect. Using at the baldwinsoftware wiki. tonybaldwin February 20, 2011, at 09:58 PM I've locally added the ability to specify the width and font: (:fblike width=450 font=arial:)
What's the protocol for submitting diffs? Jonathan Blake April 10, 2011, at 11:21 AM Is there any possibility to change the language of the button's text? - found it on my own. ~Johnny Talk page for the FacebookLikeButton recipe (users). |