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

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

empty meta are invisibles

  • 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{if isset($fbp_page.fb.app_id)}
25<meta property="fb:app_id" content="{$fbp_page.fb.app_id}">
26{/if}
27{if isset($fbp_page.fb.admins)}
28<meta property="fb:admins" content="{$fbp_page.fb.admins}">
29{/if}
30
31{if $fbp.async_script}
32<div id="fb-root"></div>
33<script>
34  window.fbAsyncInit = function() {ldelim}
35    FB.init({ldelim}
36      appId  : '{$FACEBOOK_APP_ID}',
37      status : true, // check login status
38      cookie : true, // enable cookies to allow the server to access the session
39      xfbml  : true  // parse XFBML
40    {rdelim});
41  {rdelim};
42  (function() {ldelim}
43    var e = document.createElement(script);
44    e.src = document.location.protocol + //connect.facebook.net/{$FACEBOOK_LOCALE}/all.js#appId={$FACEBOOK_APP_ID}&amp;xfbml=1;
45    e.async = true;
46    document.getElementById(fb-root).appendChild(e);
47  {rdelim}());
48</script>
49{else}
50<div id="fb-root"></div>
51<script src="http://connect.facebook.net/{$FACEBOOK_LOCALE}/all.js#appId={$FACEBOOK_APP_ID}&amp;xfbml=1"></script>
52<script>
53  FB.init({ldelim}
54    appId  : '{$FACEBOOK_APP_ID}',
55    status : true, // check login status
56    cookie : true, // enable cookies to allow the server to access the session
57    xfbml  : true  // parse XFBML
58 {rdelim});
59</script>
60{/if}
Note: See TracBrowser for help on using the repository browser.