Changeset 8248 for extensions/FacebookPlug/Plugin/include/picture.inc.php
- Timestamp:
- Dec 23, 2010, 10:39:59 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/include/picture.inc.php
r8243 r8248 84 84 } 85 85 86 function fbp_add_social($content, &$smarty)87 {88 global $conf;89 $fbp_content .= '<div id="fb-xfbml">';90 91 // iframe implementation92 /* $fbp_content = '93 <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>94 ';*/95 96 // XFBML implementation97 /*$fbp_content .= '98 <fb:like href="{$SRC_IMG}" show_faces="true" width="{$WIDTH_IMG}"></fb:like>99 ';*/100 $fbp_content .= '101 <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>102 ';103 104 $fbp_content .= '</div>';105 106 return $content.$fbp_content;107 }108 109 86 function fbp_loc_begin_picture() 110 87 { … … 113 90 // set prefilter 114 91 $template->set_prefilter('header', 'fbp_header'); 115 //~ $template->set_prefilter('header', 'fbp_add_fb_init');116 if ($conf['fbp']['social_plugin_like_button']['enabled'])117 {118 $template->set_prefilter('default_content', 'fbp_add_social');119 }120 92 } 121 93 … … 125 97 global $template, $user, $page, $conf, $picture; 126 98 99 if ($page['slideshow']) 100 { 101 // nothing to do on slideshow other media aren't usable 102 return $content; 103 } 104 127 105 if ($conf['fbp']['social_plugin_like_button']['enabled']) 128 106 { 107 // iframe implementation 108 /* $$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 implementation 112 $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 129 120 //~ $template->set_prefilter('default_content', 'fbp_add_social'); 130 121 // Always use full url for FB social plugin … … 146 137 $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BUTTON', $conf['fbp']['social_plugin_like_button']); 147 138 } 139 148 140 return $content; 149 141 } … … 177 169 { 178 170 add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture'); 179 add_event_handler('render_element_content', 'fbp_render_element_content', null, 2);171 add_event_handler('render_element_content', 'fbp_render_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL+1 /*in order to have picture content*/, 2); 180 172 //~ add_event_handler('loc_end_picture', 'fbp_loc_end_picture'); 181 173 add_event_handler('loc_end_section_init', 'ftp_loc_end_section_init');
Note: See TracChangeset
for help on using the changeset viewer.