source: extensions/FacebookPlug/Plugin/tpl/share.tpl @ 8439

Last change on this file since 8439 was 8439, checked in by rub, 13 years ago

New to share link: use stream.share from the FB.ui() method of the Facebook JS SDK

  • Property svn:eol-style set to LF
File size: 1.1 KB
Line 
1{if $FBP_SHARE_LI}<li>{/if}
2{* method 1 *}
3{*
4<a name="fb_share" type="icon" share_url="{$fbp_page.url}" title="{'Share on Facebook'|@translate}"></a>
5<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
6        type="text/javascript">
7</script>
8*}
9{* method 2 *}
10{*
11<a href="http://www.facebook.com/sharer.php?u={$fbp_page.url|@urlencode}" title="{'Share on Facebook'|@translate}" rel="nofollow" onclick="window.open(this.href, 'Facebook','width=550,height=350,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'); return false;"><img src="{$FBP_PATH|@cat:'/icon/share.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
12*}
13{* method 3 *}
14<a href="{$fbp_page.url}" title="{'Share on Facebook'|@translate}" rel="nofollow"  onclick="share(this.href); return false;"><img src="{$FBP_PATH|@cat:'/icon/share.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
15{literal}
16<script type="text/javascript">
17  //stream share method
18  function share(href)
19  {
20    FB.ui({method: 'stream.share', u: href});
21  }
22</script>
23{/literal}
24{if $FBP_SHARE_LI}</li>{/if}
Note: See TracBrowser for help on using the repository browser.