$page['image_id'])); } $page['fbp']['og']['url'] = $fbp_url_picture; $page['fbp']['og']['url_image'] = get_element_url($current_picture); unset_make_full_url(); // Assign template $template->assign('fbp_url_picture', $fbp_url_picture); $template->assign('fbp_urlencode_picture', urlencode($fbp_url_picture)); // Parse TPL foreach($tpls as $tpl) { // XFBML implementation $template->set_filename($tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl'); $content .= $template->parse($tpl, true); } } return $content; } function ftp_loc_end_section_init() { global $conf, $page; //~ if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_comments']['enabled']) if ($page['fbp']['do_facebook_init']) { if ($conf['fbp']['allow_fb_access_private_page']) { global $user, $page; // No restristion for facebook user if (preg_match('/'.FBP_IP_FB. '/', $_SERVER["REMOTE_ADDR"])) { //Allow guest access $conf['guest_access'] = true; // No forbidden categorie $user['forbidden_categories'] = ''; $user['level'] = max($conf['available_permission_levels']); $page['rank_of'][$page['image_id']] = 0; $page['items'] = array_flip($page['rank_of']); } } } } add_event_handler('render_element_content', 'fbp_render_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL+1 /*in order to have picture content*/, 2); add_event_handler('loc_end_section_init', 'ftp_loc_end_section_init'); ?>