Changeset 29781
- Timestamp:
- Sep 25, 2014, 6:52:23 PM (10 years ago)
- Location:
- extensions/SocialButtons
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SocialButtons/admin.php
r28850 r29781 1 1 <?php 2 if (!defined('SOCIALBUTT_PATH'))die('Hacking attempt!');2 defined('SOCIALBUTT_PATH') or die('Hacking attempt!'); 3 3 4 4 global $conf, $template, $page; -
extensions/SocialButtons/include/facebook.inc.php
r23202 r29781 44 44 $buttons[] = 'facebook_button'; 45 45 } 46 47 ?> -
extensions/SocialButtons/include/google.inc.php
r23202 r29781 45 45 $buttons[] = 'google_button'; 46 46 } 47 48 ?> -
extensions/SocialButtons/include/linkedin.inc.php
r25178 r29781 39 39 $buttons[] = 'linkedin_button'; 40 40 } 41 42 ?> -
extensions/SocialButtons/include/pinterest.inc.php
r24788 r29781 18 18 $buttons[] = 'pinterest_button'; 19 19 } 20 21 ?> -
extensions/SocialButtons/include/reddit.inc.php
r24788 r29781 42 42 $buttons[] = 'reddit_button'; 43 43 } 44 45 ?> -
extensions/SocialButtons/include/tumblr.inc.php
r24788 r29781 12 12 $buttons[] = 'tumblr_button'; 13 13 } 14 15 ?> -
extensions/SocialButtons/include/twitter.inc.php
r24757 r29781 33 33 $buttons[] = 'twitter_button'; 34 34 } 35 36 ?> -
extensions/SocialButtons/maintain.class.php
r28850 r29781 46 46 function install($plugin_version, &$errors=array()) 47 47 { 48 global $conf; 49 48 50 if (empty($conf['SocialButtons'])) 49 51 { … … 67 69 if (!empty($temp['annotation'])) $this->default_config['google']['annotation'] = $temp['annotation']; 68 70 } 69 71 70 72 conf_update_param('SocialButtons', $this->default_config, true); 71 73 } … … 73 75 { 74 76 $new_conf = safe_unserialize($conf['SocialButtons']); 75 77 76 78 if (empty($new_conf['pinterest'])) 77 79 { … … 81 83 ); 82 84 } 83 85 84 86 if (empty($new_conf['reddit'])) 85 87 { … … 90 92 ); 91 93 } 92 94 93 95 if (empty($new_conf['linkedin'])) 94 96 { … … 98 100 ); 99 101 } 100 102 101 103 if (!isset($new_conf['on_index'])) 102 104 { 103 105 $new_conf['on_index'] = true; 104 106 } 105 107 106 108 if ($new_conf['facebook']['layout'] == 'none') 107 109 { 108 110 $new_conf['facebook']['layout'] = 'button_count'; 109 111 } 110 112 111 113 if (!isset($new_conf['light'])) 112 114 { 113 115 $new_conf['light'] = false; 114 116 } 115 117 116 118 if (!isset($new_conf['img_size'])) 117 119 { … … 119 121 unset($new_conf['tumblr']['img_size'], $new_conf['pinterest']['img_size']); 120 122 } 121 123 122 124 conf_update_param('SocialButtons', $new_conf, true); 123 125 } -
extensions/SocialButtons/template/facebook.tpl
r27274 r29781 1 1 {strip} 2 2 {if $SOCIALBUTT.light} 3 <a title="Share on Facebook" href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode} 4 {if $SOCIALBUTT.basename=='picture'} 5 &p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}" 6 {else} 7 &p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}" 8 {/if} 3 <a title="Share on Facebook" href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.basename=='picture'}&p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}"{else}&p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"{/if} 9 4 onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank" rel="nofollow"> 10 5 <img src="{$ROOT_URL}{$SOCIALBUTT_PATH}template/images/facebook.png" alt="Facebook"></a>
Note: See TracChangeset
for help on using the changeset viewer.