Changeset 8282 for extensions/FacebookPlug/Plugin/include/picture.inc.php
- Timestamp:
- Dec 24, 2010, 1:46:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/include/picture.inc.php
r8275 r8282 27 27 include_once(FBP_DIR.'/include/header.inc.php'); 28 28 29 /*function fbp_header($content, &$smarty)30 {31 global $conf;32 33 // replace tag html34 $search = '<html ';35 $replacement = '<html xmlns:fb="http://www.facebook.com/2008/fbml" ';36 37 //~ $content = preg_replace('#'.$search.'#', $replacement, $content);38 return preg_replace('#'.$search.'#', $replacement, $content);39 //~ $fbp_content = file_get_contents(FBP_DIR.'/tpl/init.fb.tpl');40 41 $search = '<div id="the_page">';42 return preg_replace('#'.$search.'#', $fbp_content.$search, $content);43 }*/44 45 /*function fbp_loc_begin_picture()46 {47 global $template, $user, $page, $conf, $picture;48 49 // set prefilter50 $template->set_prefilter('header', 'fbp_header');51 52 $template->assign('FACEBOOK_APP_ID', FACEBOOK_APP_ID);53 // define language54 $template->assign('LANGUAGE', $user['language']);55 $template->assign('fbp', $conf['fbp']);56 $template->smarty->register_modifier('boolean_to_string', 'boolean_to_string');57 58 $template->set_filename('init.fb', FBP_DIR.'/tpl/init.fb.tpl');59 $template->append('head_elements', $template->parse('init.fb', true));60 }*/61 62 29 function fbp_render_element_content($content, $current_picture) 63 30 { 64 31 global $template, $user, $page, $conf, $picture; 65 32 66 if ($page['slideshow'] )33 if ($page['slideshow'] and $conf['fbp']['social_plugin_facepile']['enabled']) 67 34 { 68 // nothing to do on slideshow other media aren't usable 35 $tpl = 'social.plugin.facepile'; 36 $type = $conf['fbp']['social_plugin_facepile']['url_type']; 37 } 38 else if ($conf['fbp']['social_plugin_like_button']['enabled']) 39 { 40 $tpl = 'social.plugin.like.button'; 41 $type = $conf['fbp']['social_plugin_like_button']['url_type']; 42 } 43 else 44 { 45 // nothing to do 69 46 return $content; 70 47 } … … 73 50 // Always use full url for FB social plugin 74 51 set_make_full_url(); 75 if ($ conf['fbp']['social_plugin_like_button']['url_type']== 'image')52 if ($type == 'image') 76 53 { 77 54 $fbp_url_picture = get_element_url($current_picture); … … 85 62 86 63 // XFBML implementation 87 //~ $content .= ' 88 //~ <div id="fb-xfbml">'; 89 if ($conf['fbp']['social_plugin_like_button']['enabled']) 90 { 91 //~ $content .= ' 92 //~ <div id="fb-xfbml"> 93 //~ <fb:like href="'.$fbp_url_picture.'" layout="'.$conf['fbp']['social_plugin_like_button']['layout'].'" show_faces="'.boolean_to_string($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> 94 //~ </div>'; 95 $template->set_filename('social.plugin.like.button', FBP_DIR.'/tpl/social.plugin.like.button.tpl'); 96 $content .= $template->parse('social.plugin.like.button', true); 97 } 64 $template->set_filename($tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl'); 65 $content .= $template->parse($tpl, true); 98 66 99 67 return $content; … … 125 93 } 126 94 127 if ($conf['fbp']['social_plugin_like_button']['enabled'] )95 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_facepile']['enabled']) 128 96 { 129 97 //~ add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture');
Note: See TracChangeset
for help on using the changeset viewer.