Changeset 8250 for extensions/FacebookPlug/Plugin/include/picture.inc.php
- Timestamp:
- Dec 23, 2010, 11:53:27 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/include/picture.inc.php
r8248 r8250 92 92 } 93 93 94 //~ function fbp_loc_end_picture() 94 function fbp_bool2str($value) 95 { 96 return ($value ? 'true' : 'false'); 97 } 98 95 99 function fbp_render_element_content($content, $current_picture) 96 100 { … … 103 107 } 104 108 105 if ($conf['fbp']['social_plugin_like_button']['enabled'] )109 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 106 110 { 107 // iframe implementation108 /* $$content = '109 <iframe src="http://www.facebook.com/plugins/like.php?href={$SRC_IMG}&layout=standard&show_faces=true&width={$WIDTH_IMG}&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:{$WIDTH_IMG}px; height:80px;" allowTransparency="true"></iframe>110 ';*/111 // XFBML implementation112 $content .= '113 <div id="fb-xfbml">114 <fb:like href="{$FBP_URL_PICTURE}" layout="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.layout}" show_faces="{if $FBP_SOCIAL_PLUGIN_LIKE_BUTTON.show_faces}true{else}false{/if}" width="{$WIDTH_IMG}" action="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.action}" colorscheme="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.colorscheme}"></fb:like>115 </div>';116 $content2 = '117 <fb:like href="{$FBP_URL_PICTURE}" layout="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.layout}" show_faces="{if $FBP_SOCIAL_PLUGIN_LIKE_BUTTON.show_faces}true{else}false{/if}" width="{$WIDTH_IMG}" action="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.action}" colorscheme="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.colorscheme}"></fb:like>118 ';119 120 //~ $template->set_prefilter('default_content', 'fbp_add_social');121 // Always use full url for FB social plugin122 //~ set_make_full_url();123 111 // define language 124 112 $template->assign('LANGUAGE', $user['language']); 125 113 // define picture FB link 114 // Always use full url for FB social plugin 126 115 set_make_full_url(); 127 116 if ($conf['fbp']['social_plugin_like_button']['url_type'] == 'image') 128 117 { 129 $fbp_url_picture = get_element_url($ picture['current']);118 $fbp_url_picture = get_element_url($current_picture); 130 119 } 131 120 else … … 134 123 } 135 124 unset_make_full_url(); 136 $template->assign('FBP_URL_PICTURE', $fbp_url_picture); 137 $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BUTTON', $conf['fbp']['social_plugin_like_button']); 138 } 125 //~ $template->assign('FBP_URL_PICTURE', $fbp_url_picture); 126 //~ $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BUTTON', $conf['fbp']['social_plugin_like_button']); 127 //~ $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BOX', $conf['fbp']['social_plugin_like_box']); 128 129 // iframe implementation 130 /* $$content = ' 131 <iframe src="http://www.facebook.com/plugins/like.php?href={$SRC_IMG}&layout=standard&show_faces=true&width={$WIDTH_IMG}&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:{$WIDTH_IMG}px; height:80px;" allowTransparency="true"></iframe> 132 ';*/ 133 // XFBML implementation 134 //~ $content .= ' 135 //~ <div id="fb-xfbml">'; 136 if ($conf['fbp']['social_plugin_like_button']['enabled']) 137 { 138 $content .= ' 139 <div id="fb-xfbml"> 140 <fb:like href="'.$fbp_url_picture.'" layout="'.$conf['fbp']['social_plugin_like_button']['layout'].'" show_faces="'.fbp_bool2str($conf['fbp']['social_plugin_like_button']['show_faces']).'" width="'.@$current_picture['scaled_width'].'" action="'.$conf['fbp']['social_plugin_like_button']['action'].'" colorscheme="'.$conf['fbp']['social_plugin_like_button']['colorscheme'].'"></fb:like> 141 </div>'; 142 } 143 if ($conf['fbp']['social_plugin_like_box']['enabled']) 144 { 145 $content .= ' 146 <div id="fb-xfbml"> 147 <fb:like-box href="'.$fbp_url_picture.'" width="'.@$current_picture['scaled_width'].'" show_faces="'.fbp_bool2str($conf['fbp']['social_plugin_like_box']['show_faces']).'" stream="'.fbp_bool2str($conf['fbp']['social_plugin_like_box']['stream']).'" header="'.fbp_bool2str($conf['fbp']['social_plugin_like_box']['header']).'"></fb:like-box> 148 </div>'; 149 } 150 151 //~ $content .= ' 152 //~ </div>'; 153 } 139 154 140 155 return $content; … … 145 160 global $conf; 146 161 147 if ($conf['fbp']['social_plugin_like_button']['enabled'] )162 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 148 163 { 149 164 if ($conf['fbp']['allow_fb_access_private_page']) … … 166 181 } 167 182 168 if ($conf['fbp']['social_plugin_like_button']['enabled'] )183 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 169 184 { 170 185 add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture');
Note: See TracChangeset
for help on using the changeset viewer.