source: extensions/FacebookPlug/Plugin/tpl/init.fb.tpl @ 8295

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

Add comments social plugin.
Fix FB connexion

  • Property svn:eol-style set to LF
File size: 1.0 KB
Line 
1<!-- By FacebookPlug a Piwigo Plugin -->
2{if $fbp.async_script}
3<div id="fb-root"></div>
4<script>
5  window.fbAsyncInit = function() {ldelim}
6    FB.init({ldelim}
7      appId  : '{$FACEBOOK_APP_ID}',
8      status : true, // check login status
9      cookie : true, // enable cookies to allow the server to access the session
10      xfbml  : true  // parse XFBML
11    {rdelim});
12  {rdelim};
13  (function() {ldelim}
14    var e = document.createElement(script);
15    e.src = document.location.protocol + //connect.facebook.net/{$LANGUAGE}/all.js#appId={$FACEBOOK_APP_ID}&amp;xfbml=1;
16    e.async = true;
17    document.getElementById(fb-root).appendChild(e);
18  {rdelim}());
19</script>
20{else}
21<div id="fb-root"></div>
22<script src="http://connect.facebook.net/{$LANGUAGE}/all.js#appId={$FACEBOOK_APP_ID}&amp;xfbml=1"></script>
23<script>
24  FB.init({ldelim}
25    appId  : '{$FACEBOOK_APP_ID}',
26    status : true, // check login status
27    cookie : true, // enable cookies to allow the server to access the session
28    xfbml  : true  // parse XFBML
29 {rdelim});
30</script>
31{/if}
Note: See TracBrowser for help on using the repository browser.