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

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

Replace language by locale

  • Property svn:eol-style set to LF
File size: 2.6 KB
Line 
1<!-- By FacebookPlug a Piwigo Plugin -->
2{if isset($fbp_page.og.title)}
3<meta property="og:title" content="{$fbp_page.og.title|@replace:'"':' '}">
4{else}
5  {if (isset($REVERSE) and $REVERSE and $PAGE_TITLE == l10n('Home'))}
6<meta property="og:title" content="{$GALLERY_TITLE|@replace:'"':' '} | {$PAGE_TITLE|@replace:'"':' '}">
7  {else}
8<meta property="og:title" content="{$PAGE_TITLE|@replace:'"':' '} | {$GALLERY_TITLE|@replace:'"':' '}">
9  {/if}
10{/if}
11{if isset($fbp_page.og.description)}
12<meta property="og:description" content="{$fbp_page.og.description|@replace:'"':' '}">
13{else}
14  {if isset($COMMENT_IMG)}
15<meta property="og:description" content="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE|@replace:'"':' '}{/if}">
16  {else}
17<meta property="og:description" content="{$PAGE_TITLE|@replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE|@replace:'"':' '}{/if}">
18  {/if}
19{/if}
20<meta property="og:site_name" content="{if isset($fbp_page.og.site_name)}{$fbp_page.og.site_name|@replace:'"':' '}{else}{$GALLERY_TITLE|@replace:'"':' '}{/if}">
21<meta property="og:type" content="{if isset($fbp_page.og.type)}{$fbp_page.og.type}{else}article{/if}">
22<meta property="og:image" content="{if isset($fbp_page.og.image)}{$fbp_page.og.image}{else}{$fbp_page.url_thumbnail_image}{/if}">
23<meta property="og:url" content="{if isset($fbp_page.og.url)}{$fbp_page.og.url}"{else}{$fbp_page.url}{/if}">
24<meta property="fb:app_id" content="{if isset($fbp_page.og.app_id)}{$fbp_page.og.app_id}{else}{$FACEBOOK_APP_ID}{/if}">
25<meta property="fb:admins" content="{$fbp_page.og.admins}">
26
27{if $fbp.async_script}
28<div id="fb-root"></div>
29<script>
30  window.fbAsyncInit = function() {ldelim}
31    FB.init({ldelim}
32      appId  : '{$FACEBOOK_APP_ID}',
33      status : true, // check login status
34      cookie : true, // enable cookies to allow the server to access the session
35      xfbml  : true  // parse XFBML
36    {rdelim});
37  {rdelim};
38  (function() {ldelim}
39    var e = document.createElement(script);
40    e.src = document.location.protocol + //connect.facebook.net/{$FACEBOOK_LOCALE}/all.js#appId={$FACEBOOK_APP_ID}&amp;xfbml=1;
41    e.async = true;
42    document.getElementById(fb-root).appendChild(e);
43  {rdelim}());
44</script>
45{else}
46<div id="fb-root"></div>
47<script src="http://connect.facebook.net/{$FACEBOOK_LOCALE}/all.js#appId={$FACEBOOK_APP_ID}&amp;xfbml=1"></script>
48<script>
49  FB.init({ldelim}
50    appId  : '{$FACEBOOK_APP_ID}',
51    status : true, // check login status
52    cookie : true, // enable cookies to allow the server to access the session
53    xfbml  : true  // parse XFBML
54 {rdelim});
55</script>
56{/if}
Note: See TracBrowser for help on using the repository browser.