Changeset 808652
- Timestamp:
- 11/22/2013 06:39:46 AM (12 years ago)
- Location:
- fanpage-connect
- Files:
-
- 53 added
- 4 deleted
- 6 edited
-
assets (added)
-
assets/banner-772x250.jpg (added)
-
trunk/css/FACEBOLF.OTF (added)
-
trunk/css/colpick.css (added)
-
trunk/css/default.css (deleted)
-
trunk/css/fanpage-connect.css (deleted)
-
trunk/css/fpc-admin.css (added)
-
trunk/css/smoothness (deleted)
-
trunk/css/wp.css (deleted)
-
trunk/fanpage-connect.php (modified) (11 diffs)
-
trunk/img/20x20-toggle-icon.png (added)
-
trunk/img/action-button-icon.png (added)
-
trunk/img/fpc-button-icon.png (added)
-
trunk/img/fpc-tiny-mce-icon.png (added)
-
trunk/img/layout.png (added)
-
trunk/img/layoutf.png (added)
-
trunk/img/layouth.png (added)
-
trunk/img/layouthf.png (added)
-
trunk/img/layouthsl.png (added)
-
trunk/img/layouthslf.png (added)
-
trunk/img/layouthsr.png (added)
-
trunk/img/layouthsrf.png (added)
-
trunk/img/layoutsl.png (added)
-
trunk/img/layoutslf.png (added)
-
trunk/img/layoutsr.png (added)
-
trunk/img/layoutsrf.png (added)
-
trunk/img/lightbox-gate.png (added)
-
trunk/js/colpick.js (added)
-
trunk/js/fpc-admin.js (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-1.jpg (modified) (previous)
-
trunk/screenshot-2.jpg (modified) (previous)
-
trunk/screenshot-3.jpg (modified) (previous)
-
trunk/screenshot-4.jpg (modified) (previous)
-
trunk/screenshot-5.jpg (added)
-
trunk/template (added)
-
trunk/template/css (added)
-
trunk/template/css/fanpage-connect.css (added)
-
trunk/template/css/normalize.min.css (added)
-
trunk/template/js (added)
-
trunk/template/js/fpc.js (added)
-
trunk/template/js/modernizr.js (added)
-
trunk/template/single-fpc1.x-fanpage.php (added)
-
trunk/template/single-fpc2.x-fanpage.php (added)
-
trunk/util (added)
-
trunk/util/facebook (added)
-
trunk/util/facebook/base_facebook.php (added)
-
trunk/util/facebook/facebook.php (added)
-
trunk/util/facebook/fb_ca_chain_bundle.crt (added)
-
trunk/util/fanpage-connect-1.x-page-meta.php (added)
-
trunk/util/fanpage-connect-2.x-app-meta.php (added)
-
trunk/util/fanpage-connect-2.x-page-meta.php (added)
-
trunk/util/fanpage-connect-fb-locales.php (added)
-
trunk/util/fanpage-connect-fb-ogtypes.php (added)
-
trunk/util/fanpage-connect-help.php (added)
-
trunk/util/fanpage-connect-main.php (added)
-
trunk/util/fanpage-connect-reg.php (added)
-
trunk/util/fanpage-connect-shortcodes.php (added)
-
trunk/util/fonts (added)
-
trunk/util/fonts/google-fonts-display.php (added)
-
trunk/util/fonts/google-fonts-handwriting.php (added)
-
trunk/util/fonts/google-fonts-sans-serif.php (added)
-
trunk/util/fonts/google-fonts-serif.php (added)
Legend:
- Unmodified
- Added
- Removed
-
fanpage-connect/trunk/fanpage-connect.php
r525423 r808652 1 1 <?php 2 2 /* 3 Plugin Name: Fanpage Connect FREE3 Plugin Name: Fanpage Connect 2 FREE 4 4 Plugin URI: http://www.fanpageconnect.com 5 Version: v 1.4.65 Version: v2.0 6 6 Author: Pat Friedl, Chris Friedl, Bryan Batson 7 Description: Fanpage Connect is the WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress.8 9 Copyright 201 1 fanpageconnect.com email: [email protected]7 Description: Fanpage Connect is the Ultimate Facebook plugin for WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress. <strong>NOTE:</strong> This plugin should not be used with the original <a href="http://www.fanpageconnect.com" target="_blank">Fanpage Connect</a> - Activate one or the other, but not both! 8 9 Copyright 2013 FanpageConnect.com email: [email protected] 10 10 */ 11 12 if(!class_exists("FanpageConnect")){ 13 14 class FanpageConnect { 15 16 var $plugin_activated; 17 var $FanpageConnect_DB_option = 'fpc_options'; 18 var $FanpageConnect_options; 19 20 // variables sent to the page from Facebook 11 if(!class_exists("FanpageConnect2FREE")){ 12 13 class FanpageConnect2FREE { 14 15 /***********************************************************/ 16 /* Variables 17 /***********************************************************/ 18 // dashboard widget 19 var $dash_feed_url, $dash_site_url, $dash_site_name, $dash_error_title, $dash_no_items_text, 20 $dash_num_items, $dash_widget_name, $dash_widget_title, $dash_footer, $dash_fb_link, $dash_refresh_time; 21 22 var $plugin_activated = false; 23 var $plugin_type = 'free'; 24 var $old_pro_db_option = 'fpc_pro_options'; 25 var $old_free_db_option = 'fpc_options'; 26 var $fpc1_options; 27 var $fpc2_db_option = 'fpc2_options'; 28 var $fpc2_options; 29 30 var $reg_form_id = 1397961035; 31 var $reg_form_redir = 'http://www.fanpageconnect.com/fpc2-register-redirect.php'; 32 var $reg_form_tracker = 'https://forms.aweber.com/form/displays.htm?id=jMyc7JxsjAzMrA=='; 33 var $reg_form_name = 'Fanpage_Connect_Registration'; 34 var $reg_list_name = 'fanpageconnect'; 35 36 // variables sent from facebook 21 37 var $page_id; 22 38 var $page_liked; … … 31 47 var $oauth_token; 32 48 33 // variables set on the page 34 var $isfanpage; 35 var $fbappid; 36 var $fbappsecret; 37 var $fbcsslink; 38 var $fbcss; 39 var $fbtemplate; 40 var $fbheadercontent; 41 var $fbfootercontent; 42 var $fbcustomcontent; 43 var $show_comments; 44 var $google_fonts; 45 46 // global variables 47 var $g_use_menu; 48 var $g_menu_name; 49 var $g_show_menu; 50 var $g_debug; 51 var $g_autofit; 52 var $g_fp_url; 53 var $g_fpogtitle; 54 var $g_fpogtype; 55 var $g_fpogurl; 56 var $g_fpogimg; 57 var $g_fpogname; 58 var $g_aff; 49 // global counters for incrementing names in RSS, like buttons, etc 50 var $rss_num = 0; 51 var $tweet_num = 0; 52 var $karma_num = 0; 53 54 // global level variables for pages 55 var $added_like = false; 59 56 var $domain; 60 61 // other variables62 var $link_luv;63 57 var $fb_error; 64 65 function FanpageConnect() { //constructor 58 var $parm_prefix; 59 60 function __construct() { // class constructor 61 62 /***********************************************************/ 63 /* Plugin setup actions 64 /***********************************************************/ 66 65 67 66 // define the plugin URL so we can add the CSS … … 75 74 define('FPC_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . FPC_PLUGIN_NAME); 76 75 76 if (!defined('FPC_SITE_URL')) 77 define('FPC_SITE_URL', get_option('siteurl')); 78 77 79 if (!defined('FPC_PLUGIN_URL')) 78 80 define('FPC_PLUGIN_URL', WP_PLUGIN_URL . '/' . FPC_PLUGIN_NAME); 79 81 82 if (!defined('FPC_TEMPLATE_URL')) 83 define('FPC_TEMPLATE_URL', FPC_PLUGIN_URL . '/template'); 84 85 if (!defined('FPC_TEMPLATES_URL')) 86 define('FPC_TEMPLATES_URL', FPC_PLUGIN_URL . '/templates'); 87 80 88 if (!defined('FPC_PLUGIN_VERSION')) 81 define('FPC_PLUGIN_VERSION','1.4.6'); 89 define('FPC_PLUGIN_VERSION','2.0'); 90 91 if (!defined('FPC_PLUGIN_TYPE')) 92 define('FPC_PLUGIN_TYPE','free'); 82 93 83 94 global $post; 84 95 85 // pre-empt all other content 86 add_action('wp',array(&$this, 'dofbpage'),1); 87 88 // add admin menu 89 add_action('admin_menu', array(&$this, 'fpc_add_menu_page')); 90 91 // add jquery to the options page 92 add_action('admin_init', array(&$this, 'fpc_admin_init')); 93 add_action('admin_footer',array(&$this, 'fpc_admin_footer')); 94 95 // add jquery to the page 96 add_action('wp_enqueue_scripts',array(&$this, 'fpc_add_jquery')); 97 98 // add to tinyMCE 99 add_action('init', array(&$this, 'add_tinymce')); 100 101 // handle meta box for pages 102 add_action('add_meta_boxes', array(&$this, 'fpc_add_box')); 103 104 // handle google font shortcodes in pages 105 add_action('save_post', array(&$this, 'fpc_meta_save')); 106 96 /***********************************************************/ 97 /* Actions 98 /***********************************************************/ 99 add_action('init', array(&$this, 'register_post_types')); 100 add_action('init',array(&$this,'register_sidebars')); 101 add_action('template_redirect', array(&$this, 'get_template')); 102 add_action('admin_menu', array(&$this, 'add_plugin_menu')); 103 add_action('wp_dashboard_setup', array(&$this, 'add_dashboard_widget')); 104 add_action('admin_head', array(&$this,'add_admin_header_scripts')); 105 add_action('admin_enqueue_scripts', array(&$this, 'enqueue_admin_header_scripts')); 106 add_action('admin_footer',array(&$this, 'add_admin_footer_scripts')); 107 add_action('wp_enqueue_scripts',array(&$this, 'enqueue_scripts')); 108 add_action('media_buttons', array(&$this, 'add_shortcode_button'),100); 109 add_action('add_meta_boxes', array(&$this, 'add_meta_boxes')); 110 add_action('save_post', array(&$this, 'save_meta')); 111 add_action('wp_ajax_get_app_sidebars', array(&$this, 'get_app_sidebars')); 112 113 /***********************************************************/ 114 /* FREE Shortcodes 115 /***********************************************************/ 107 116 // define plugin shortcodes 108 117 add_shortcode('fbliked', array(&$this, 'fpc_liked')); … … 112 121 add_shortcode('font', array(&$this, 'fpc_font')); 113 122 114 // get the options 115 $options = $this->get_options(); 116 $this->plugin_activated = $options['activated']; 117 $this->g_use_menu = $options['use_menu']; 118 $this->g_menu_name = $options['menu_name']; 119 $this->g_show_menu = $options['show_menu']; 120 $this->g_debug = $options['debug']; 121 $this->g_fp_url = $options['fpurl']; 122 $this->g_autofit = $options['autofit']; 123 $this->link_luv = $options['link_luv']; 124 $this->g_fpogtitle = $options['fpogtitle']; 125 $this->g_fpogtype = $options['fpogtype']; 126 $this->g_fpogurl = $options['fpogurl']; 127 $this->g_fpogimg = $options['fpogimg']; 128 $this->g_fpogname = $options['fpogname']; 129 $this->g_aff = $options['aff']; 123 /***********************************************************/ 124 /* Variables 125 /***********************************************************/ 126 $this->dash_feed_url = 'http://www.fanpageconnect.com/feed/'; 127 $this->dash_site_url = 'http://www.fanpageconnect.com'; 128 $this->dash_fb_link = 'http://www.facebook.com/FanpageConnect/app_136008969801589'; 129 $this->dash_site_name = 'FanpageConnect.com'; 130 $this->dash_error_title = 'RSS Error'; 131 $this->dash_no_items_text = '<p>Huh, no updates from the blog yet, but you can visit <a href="'.$this->dash_site_url.'" target="_blank">'; 132 $this->dash_no_items_text .= $this->dash_site_name.'</a> for other info...</p>'; 133 $this->dash_num_items = 3; 134 $this->dash_widget_name = 'fanpageconnect_dashboard_widget'; 135 $this->dash_widget_title = 'Recent News from FanpageConnect.com'; 136 $this->dash_footer = '<b>Get more at <a href="'.$this->dash_site_url.'" target="_blank">'.$this->dash_site_name.'</a> '; 137 $this->dash_footer .= 'or check us out on Facebook: '; 138 $this->dash_footer .= '<a href="'.$this->dash_fb_link.'" target="_blank">fb.com/FanpageConnect</a></b>'; 139 $this->dash_refresh_time = 60 * 60 * 3; // 3 hours 140 141 $this->fpc1_options = $this->get_old_options(); 142 $this->fpc2_options = $this->get_options(); 143 $this->plugin_activated = $this->fpc2_options['activated']; 144 $this->plugin_type = $this->fpc2_options['plugin_type']; 130 145 131 146 $this->domain = $this->get_domain(); 132 147 133 if(empty($this->g_use_menu)) { $this->g_use_menu = false; } 134 if(empty($this->g_show_menu)) { $this->g_show_menu = 'liked'; } 135 if(empty($this->link_luv)) { $this->link_luv = 1; } 136 137 } // end function FanpageConnect 138 139 /* 140 strip the theme/template and display formatted content if this is a facebook fanpage 141 */ 142 function dofbpage(){ 143 global $wp_filter; 148 } // end constructor FanpageConnect2FREE 149 /***********************************************************/ 150 /* END FanpageConnect2FREE CONSTRUCTOR 151 /***********************************************************/ 152 153 // initial functions 154 // create fanpage and app post types 155 function register_post_types(){ 156 $post_type = 'fpc-fanpage'; 157 $supports = array('title','editor','comments','custom-fields','revisions'); 158 $labels = array( 159 'name' => 'FPC Pages', 160 'singular_name' => 'FPC Page', 161 'menu_name' => 'FPC Pages', 162 'all_items' => 'All FPC pages', 163 'add_new' => 'Add New FPC Page', 164 'add_new_item' => 'Add New Fanpage Connect Page', 165 'edit_item' => 'Edit FPC Page', 166 'new_item' => 'New FPC Page', 167 'view_item' => 'View FPC Page', 168 'search_items' => 'Search FPC Pages', 169 'not_found' => 'No Fanpage Connect Pages found', 170 'not_found_in_trash' => 'No FPC Pages found in trash', 171 'parent_item_colon' => '' 172 ); 173 $args = array( 174 'public' => true, 175 'show_ui' => true, 176 'publicly_queryable' => true, 177 'exclude_from_search' => false, 178 'show_in_nav_menus' => true, 179 'show_in_menu' => true, 180 'show_in_admin_bar' => false, 181 'menu_position' => 25, 182 'supports' => $supports, 183 'labels' => $labels, 184 'description' => 'FPC Pages (Fanpage Connect Pages) power your Facebook fanpage', 185 'has_archive' => false, 186 'rewrite' => array('slug' => 'fpc-fanpage'), 187 'query_var' => true 188 ); 189 register_post_type($post_type,$args); 190 191 /* app post type */ 192 $post_type = 'fpc-app'; 193 $supports = array('title','revisions'); 194 $labels = array( 195 'name' => 'Fanpage Connect Facebook Apps', 196 'singular_name' => 'Fanpage Connect Facebook App', 197 'menu_name' => 'Fanpage Connect Facebook Apps', 198 'all_items' => 'Apps', 199 'add_new' => 'Add New App', 200 'add_new_item' => 'New Fanpage Connect Facebook App', 201 'edit_item' => 'Edit Fanpage Connect Facebook App', 202 'new_item' => 'New Fanpage Connect Facebook App', 203 'view_item' => 'View Fanpage Connect Facebook App', 204 'search_items' => 'Search Apps', 205 'not_found' => 'No Facebook Apps found', 206 'not_found_in_trash' => 'No Facebook Apps found in trash', 207 'parent_item_colon' => '' 208 ); 209 $args = array( 210 'public' => false, 211 'show_ui' => true, 212 'publicly_queryable' => false, 213 'exclude_from_search' => false, 214 'show_in_nav_menus' => false, 215 'show_in_menu' => true, 216 'show_in_admin_bar' => false, 217 'menu_position' => 100.1, 218 'supports' => $supports, 219 'labels' => $labels, 220 'description' => 'Facebook Apps Connect your Fanpage Connect pages to your Facebook fanpage', 221 'has_archive' => false, 222 'rewrite' => array('slug' => 'fpc-app'), 223 'query_var' => true 224 ); 225 register_post_type($post_type,$args); 226 // with the new custom post types, flush rewrite rules 227 flush_rewrite_rules(); 228 } // end register_post_type 229 230 // get number of apps 231 function num_apps(){ 232 global $wpdb; 233 $querystr = "SELECT count(post_type) 234 FROM wp_posts 235 WHERE post_type='fpc-app' and post_status in('publish','pending','draft','future','private','inherit','trash')"; 236 $query_result = $wpdb->get_var($querystr); 237 return intval($query_result); 238 } 239 240 // get number of fanpages 241 function num_pages(){ 242 global $wpdb; 243 $querystr = "SELECT count(post_type) 244 FROM wp_posts 245 WHERE post_type='fpc-fanpage' and post_status in('publish','pending','draft','future','private','inherit','trash')"; 246 $query_result = $wpdb->get_var($querystr); 247 return intval($query_result); 248 } 249 250 // create the FPC sidebars 251 function register_sidebars(){ 252 if($this->plugin_activated){ 253 $args = array( 254 'post_type' => 'fpc-app', 255 'nopaging' => true 256 ); 257 $query = new WP_Query( $args ); 258 if($query->have_posts()) { 259 while ( $query->have_posts() ) { 260 $query->the_post(); 261 $meta = get_post_meta($query->post->ID, '_fpcapp', true); 262 if($meta['num_widgets'] > 0 && isset($meta['widget_name'])){ 263 for($i = 1; $i < $meta['num_widgets']+1; $i++){ 264 $sidebar_num = ($i<10)? '0' . $i : $i; 265 $sidebar_name = $meta['widget_name'].' '.$sidebar_num; 266 $args = array( 267 'name' => $sidebar_name, 268 'id' => 'fpc-'.$meta['widget_base'].'-'.$sidebar_num, 269 'class' => 'fpc-sidebar', 270 'before_widget' => '<li id="%1$s" class="widget %2$s">', 271 'after_widget' => '</li>'."\n", 272 'before_title' => '<h2 class="widgettitle fpc-sidebar-title">', 273 'after_title' => '</h2>'."\n" 274 ); 275 register_sidebar($args); 276 } 277 } 278 } 279 } 280 wp_reset_postdata(); 281 } // end if plugin_activated 282 } // end register sidebars 283 284 // get the meta for any FPC App 285 function get_app_meta($id){ 144 286 global $post; 145 146 $this->convert_old_meta($post->ID); 147 $page_meta = get_post_meta($post->ID, '_fbfp', true); 148 $this->isfanpage = $page_meta['isfanpage']; 149 $pos = strpos($_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'],'wp-admin/edit.php',0); 150 $doc_protocol = (empty($_SERVER['HTTPS']))? 'http://' : 'https://'; 151 152 if ((is_page() || is_object($post)) && $this->isfanpage == 'true' && $pos === false) { 153 154 $parmPrefix = (strpos($this->g_fp_url,'?') === false)? '?' : '&'; 155 $link_luv_url = $this->get_fpc_link(); 156 157 // free variables 158 $this->fbappid = $page_meta['appid']; 159 $this->fbappsecret = $page_meta['appsecret']; 160 $this->fbcsslink = $page_meta['csslink']; 161 $this->fbcss = $page_meta['css']; 162 $this->fbtemplate = $page_meta['template']; 163 $this->fbheadercontent = $page_meta['header']; 164 $this->fbfootercontent = $page_meta['footer']; 165 $this->show_comments = $page_meta['show_comments']; 166 $this->google_fonts = $page_meta['google_fonts']; 167 168 $this->get_overrides($page_meta); 169 170 // send a header for IE 171 header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'); 172 173 if(!class_exists("FacebookApiException")){ 174 require FPC_PLUGIN_DIR . '/src/facebook.php'; 175 } 176 177 // create facebook object 178 $facebook = new Facebook(array( 179 'appId' => $this->fbappid, 180 'secret' => $this->fbappsecret, 181 'cookie' => TRUE 182 )); 183 184 // get the signed request 185 try { 186 $signed_request = $facebook->getSignedRequest(); 187 }catch (FacebookApiException $e) { 188 $this->fb_error = $e; 189 $signed_request = null; 190 } 191 192 if(empty($signed_request)){ 193 if(isset($_COOKIE['fpc_cookie']['page_id'])){ 194 $this->page_id = $_COOKIE['fpc_cookie']['page_id']; 195 $this->page_liked = $_COOKIE['fpc_cookie']['page_liked']; 196 $this->page_admin = $_COOKIE['fpc_cookie']['page_admin']; 197 $this->user_country = $_COOKIE['fpc_cookie']['user_country']; 198 $this->user_locale = $_COOKIE['fpc_cookie']['user_locale']; 199 $this->user_id = $_COOKIE['fpc_cookie']['user_id']; 200 $this->app_data = $_COOKIE['fpc_cookie']['app_data']; 201 $this->algorithm = $_COOKIE['fpc_cookie']['algorithm']; 202 $this->expires = $_COOKIE['fpc_cookie']['expires']; 203 $this->issued_at = $_COOKIE['fpc_cookie']['issued_at']; 204 $this->oauth_token = $_COOKIE['fpc_cookie']['oauth_token']; 287 $dummy_meta = array( 288 'header_filters' => array(), 289 'content_filters' => array(), 290 'footer_filters' => array(), 291 'appid' => '', 292 'appsecret' => '', 293 'lang' => '', 294 'pageurl' => '', 295 'admins' => '', 296 'use_menu' => '', 297 'menu' => '', 298 'menu_display' => '', 299 'link_luv' => '', 300 'cbid' => '', 301 'gplus' => '', 302 'debug' => '', 303 'num_widgets' => '', 304 'widget_name' => '', 305 'widget_base' => '' 306 ); 307 if(intval($id)){ 308 $app_post = get_post($id); 309 $app_meta = get_post_meta($app_post->ID, '_fpcapp', true); 310 if(isset($app_meta['appid'])){ 311 return $app_meta; 312 } else { 313 return $dummy_meta; 314 } 315 } else { 316 return $dummy_meta; 317 } 318 } // end get_app_meta 319 320 // get the sidebar info from an app ID 321 function get_app_sidebars(){ 322 $json_test = array(']','}'); 323 $meta = $this->get_app_meta($_REQUEST['post_id']); 324 $result['widgetNum'] = $meta['num_widgets']; 325 $result['widgetName'] = $meta['widget_name']; 326 $result['widgetBase'] = 'fpc-'.$meta['widget_base']; 327 $result = json_encode($result); 328 echo $result; 329 die(); 330 } // end get_app_sidebars 331 332 function build_app_sidebar_select($id){ 333 $app_post = get_post($id); 334 $app_meta = $this->get_app_meta($id); 335 $select = '<option value="">None</option>'; 336 if($app_meta['num_widgets'] > 0 && isset($app_meta['widget_name']) && $app_post->post_status == 'publish'){ 337 for($i = 1; $i < $app_meta['num_widgets']+1; $i++){ 338 $sidebar_num = ($i<10)? '0' . $i : $i; 339 $sidebar_name = $app_meta['widget_name'].' '.$sidebar_num; 340 $sidebar_base = 'fpc-'.$app_meta['widget_base'].'-'.$sidebar_num; 341 $select .= '<option value="'.$sidebar_base.'">'.$sidebar_name.'</option>'; 342 } 343 } 344 return $select; 345 } 346 347 function add_admin_header_scripts(){ 348 349 } // end add_admin_header_scripts 350 351 // add FPC related scripts to admin 352 function enqueue_admin_header_scripts(){ 353 //global $pagenow; 354 if(isset($_GET['page']) && ($_GET['page'] == 'fpc-main' || $_GET['page'] == 'fpc-help')){ 355 wp_register_style('fpc-admin-ui-style','http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css'); 356 wp_enqueue_style('fpc-admin-ui-style'); 357 wp_enqueue_script('jquery'); 358 wp_enqueue_script('jquery-ui-core'); 359 wp_enqueue_script('jquery-ui-widget'); 360 wp_enqueue_script('jquery-ui-accordion'); 361 wp_enqueue_script('jquery-ui-tabs'); 362 } 363 wp_register_script('fpc-admin', FPC_PLUGIN_URL.'/js/fpc-admin.js'); 364 $apps_created = array('numApps'=>$this->num_apps(),'maxApps'=>1,'numPages'=>$this->num_pages(),'maxPages'=>5); 365 wp_localize_script('fpc-admin','appsCreated',$apps_created); 366 wp_enqueue_script('fpc-admin'); 367 } // end enqueue_admin_header_scripts 368 369 function add_admin_footer_scripts(){ 370 } // end add_admin_footer_scripts 371 372 function enqueue_scripts(){ 373 global $pagenow; 374 if (!is_admin()) { wp_enqueue_script('jquery'); } 375 } // end enqueue_scripts 376 377 // add the fpc menu 378 function add_plugin_menu() { 379 $capability = 'moderate_comments'; 380 $icon = plugins_url('img/fpc-icon-small.png', __FILE__); 381 add_menu_page('Fanpage Connect 2', 'FPC 2', $capability, 'fpc-main', array(&$this, 'fpc_main_menu'), plugins_url('img/fpc-icon-small.png', __FILE__),100.5); 382 add_submenu_page('fpc-main', 'Main', 'Fanpage Connect 2', $capability, 'fpc-main', array(&$this, 'fpc_main_menu')); 383 add_submenu_page('fpc-main', 'Apps', 'Apps', $capability, 'edit.php?post_type=fpc-app', null); 384 add_submenu_page('fpc-main', 'New App', 'New App', $capability, 'post-new.php?post_type=fpc-app', null); 385 add_submenu_page('fpc-main', 'FPC Widgets', 'FPC Widgets', $capability, 'widgets.php?widgets=fpc', null); 386 add_submenu_page('fpc-main', 'Help', 'Help', $capability, 'fpc-help', array(&$this, 'fpc_help_page')); 387 } 388 389 function fpc_main_menu(){ 390 global $reg_form_id, $reg_form_redir, $reg_form_tracker, $reg_form_name, $reg_list_name; 391 $reg_form_id = $this->reg_form_id; 392 $reg_form_redir = $this->reg_form_redir; 393 $reg_form_tracker = $this->reg_form_tracker; 394 $reg_form_name = $this->reg_form_name; 395 $reg_list_name = $this->reg_list_name; 396 include(FPC_PLUGIN_DIR.'/util/fanpage-connect-reg.php'); 397 include(FPC_PLUGIN_DIR.'/util/fanpage-connect-main.php'); 398 } 399 400 function fpc_help_page(){ 401 include(FPC_PLUGIN_DIR.'/util/fanpage-connect-help.php'); 402 } 403 404 // add dashboard widget 405 function add_dashboard_widget() { 406 wp_add_dashboard_widget($this->dash_widget_name, $this->dash_widget_title, array(&$this, 'dashboard_widget_callback')); 407 } 408 409 // dashboard widget display of RSS feed 410 function dashboard_widget_callback() { 411 if($this->dash_refresh_time > 0) { add_filter('wp_feed_cache_transient_lifetime', array(&$this, 'return_feed_time')); } 412 $rss = fetch_feed($this->dash_feed_url); 413 if($this->dash_refresh_time > 0) { remove_filter('wp_feed_cache_transient_lifetime', array(&$this, 'return_feed_time')); } 414 $rss = fetch_feed($this->dash_feed_url); 415 if(is_wp_error($rss)){ 416 if(is_admin() || current_user_can('manage_options')) { 417 echo "<p>"; 418 printf(__('<strong>'.$this->dash_error_title.'</strong>: %s'), $rss->get_error_message()); 419 echo "</p>"; 420 } 421 return; 422 } 423 if (!$rss->get_item_quantity()) { 424 echo $this->dash_no_items_text; 425 $rss->__destruct(); 426 unset($rss); 427 return; 428 } 429 echo "<div class='rss-widget'>\n<ul>\n"; 430 $items = ($rss->get_item_quantity() > $this->dash_num_items)? $this->dash_num_items : $rss->get_item_quantity(); 431 if($items){ 432 433 foreach($rss->get_items(0, $items) as $item) { 434 $publisher = ''; 435 $site_link = ''; 436 $link = ''; 437 $content = ''; 438 $date = esc_html(strip_tags($item->get_date())); 439 $date = strtotime( $date ); 440 $date = gmdate(get_option('date_format'), $date); 441 $link = esc_url(strip_tags($item->get_link())); 442 $title = esc_html($item->get_title()); 443 $content = $item->get_content(); 444 $content = wp_html_excerpt($content, 250) . ' ...'; 445 echo "<li>"; 446 echo "<a class='rsswidget' href='$link' target='_blank'>$title</a> "; 447 echo "<span class='rss-date'>$date</span>\n"; 448 echo "<div class='rssSummary'>$content</div>\n"; 449 echo "</li>"; 450 } 451 } 452 echo "</ul>\n</div>\n"; 453 if(isset($this->dash_footer)) { echo "$this->dash_footer\n"; } 454 $rss->__destruct(); 455 unset($rss); 456 } 457 // set refresh time for your feed 458 function return_feed_time($seconds){ 459 return $this->dash_refresh_time; 460 } // end return_feed_time 461 462 function is_old_fanpage($m){ 463 if(!empty($m['isfanpage'])){ 464 return($m['isfanpage'] === 'true'); 465 } else { 466 return false; 467 } 468 } 469 470 function add_shortcode_button($page = null, $target = null) { 471 global $typenow; 472 global $pagenow; 473 global $post; 474 $meta = array(); 475 $pages = array('post.php','post-new.php'); 476 if($post->ID){ $meta = get_post_meta($post->ID, '_fbfp', true); } 477 if(!current_user_can('edit_posts') && !current_user_can('edit_pages')) { 478 return; 479 } 480 if (empty($typenow) && !empty($_GET['post'])){ 481 $post = get_post($_GET['post']); 482 $typenow = $post->post_type; 483 $meta = get_post_meta($post->ID, '_fbfp', true); 484 } elseif(empty($typenow) && !empty($_GET['post_type'])){ 485 $typenow = $_GET['post_type']; 486 } 487 if(in_array($pagenow, $pages) && get_user_option('rich_editing') == 'true'){ 488 if ($typenow == "fpc-fanpage" || $this->is_old_fanpage($meta)){ 489 add_thickbox(); 490 $tb_height = 600; 491 $the_link = '<a href="#" id="fpc-shortcodes"'; 492 $the_link .= 'alt="Add Fanpage Shortcodes" class="button insert-media add_media">'; 493 $the_link .= '<span class="fpc-button-icon"></span>FPC Codes</a>'; 494 $the_link .= '<script>'; 495 $the_link .= 'jQuery(document).ready(function(){'; 496 $the_link .= 'jQuery("#fpc-shortcodes").on("click",function(){'; 497 $the_link .= 'tb_show("Add Fanpage Shortcodes","'.FPC_PLUGIN_URL.'/util/fanpage-connect-shortcodes.php?height='.$tb_height.'&width='.$tb_width.'&TB_iframe=true");'; 498 $the_link .= 'jQuery("#TB_window").height('.$tb_height.');'; 499 $the_link .= 'jQuery("#TB_iframeContent").height('.$tb_height.'-jQuery("#TB_title").height());'; 500 $the_link .= 'if(jQuery("#TB_window>div").length > 1){jQuery("#TB_window>div:eq(1)").remove();}'; 501 $the_link .= 'return false;'; 502 $the_link .= '});'; 503 $the_link .= '});'; 504 $the_link .= '</script>'; 505 echo $the_link; 506 } 507 } 508 } // end add_shortcode_button 509 510 // add meta box to page editor 511 function add_meta_boxes() { 512 global $post; 513 $old_meta = get_post_meta($post->ID, '_fbfp', true); 514 if ($post->post_type == 'fpc-fanpage') { 515 wp_enqueue_style('fpc_meta_css', FPC_PLUGIN_URL . '/css/fpc-admin.css'); 516 $box_id = 'fpc-fanpage2.x-page-meta-box'; 517 $box_title = 'Fanpage Connect Settings'; 518 $box_callback = array(&$this, 'render_meta_boxes'); 519 $box_type = 'fpc-fanpage'; 520 $box_context = 'normal'; 521 $box_priority = 'high'; 522 add_meta_box($box_id, $box_title, $box_callback, $box_type, $box_context, $box_priority); 523 } elseif ($post->post_type == 'fpc-app') { 524 wp_enqueue_style('fpc_meta_css', FPC_PLUGIN_URL . '/css/fpc-admin.css'); 525 $box_id = 'fpc-fanpage2.x-app-meta-box'; 526 $box_title = 'Fanpage Connect App Settings'; 527 $box_callback = array(&$this, 'render_meta_boxes'); 528 $box_type = 'fpc-app'; 529 $box_context = 'normal'; 530 $box_priority = 'high'; 531 add_meta_box($box_id, $box_title, $box_callback, $box_type, $box_context, $box_priority); 532 } elseif ($this->is_old_fanpage($old_meta)) { 533 wp_enqueue_style('fpc_meta_css', FPC_PLUGIN_URL . '/css/fpc-admin.css'); 534 $box_id = 'fpc-fanpage1.x-page-meta-box'; 535 $box_title = 'Fanpage Connect Settings'; 536 $box_callback = array(&$this, 'render_meta_boxes'); 537 $box_type = 'page'; 538 $box_context = 'normal'; 539 $box_priority = 'high'; 540 add_meta_box($box_id, $box_title, $box_callback, $box_type, $box_context, $box_priority); 541 } 542 } // end add_meta_boxes 543 544 // show the meta box on the page editor 545 function render_meta_boxes() { 546 global $post; 547 if ($post->post_type == 'fpc-fanpage') { 548 $meta = get_post_meta($post->ID, '_fpcpage', true); 549 if(!is_array($meta)){ $meta = array(); } 550 include(FPC_PLUGIN_DIR . '/util/fanpage-connect-2.x-page-meta.php'); 551 echo '<input type="hidden" id="fpc_nonce" name="fpc_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />'; 552 } elseif ($post->post_type == 'fpc-app') { 553 //something eff'd up here - meta was returning an empty array for some reason! 554 $meta = get_post_meta($post->ID, '_fpcapp', true); 555 if(!is_array($meta)){ $meta = array(); } 556 include(FPC_PLUGIN_DIR . '/util/fanpage-connect-2.x-app-meta.php'); 557 echo '<input type="hidden" id="fpc_nonce" name="fpc_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />'; 558 } else { 559 $meta = get_post_meta($post->ID, '_fbfp', true); 560 if(!is_array($meta)){ $meta = array(); } 561 if($this->is_old_fanpage($meta)){ 562 // show the page 563 include(FPC_PLUGIN_DIR . '/util/fanpage-connect-1.x-page-meta.php'); 564 echo '<input type="hidden" id="fpc_nonce" name="fpc_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />'; 565 } 566 } 567 } // end render_meta_boxes 568 569 // save meta for pages 570 function save_meta($post_id) { 571 global $post; 572 $old_meta = array(); 573 $new_meta = array(); 574 $meta_id = ''; 575 $meta_post = array(); 576 $fpc1_meta = get_post_meta($post->ID, '_fbfp', true); 577 // verify post data 578 if (!wp_verify_nonce($_POST['fpc_nonce'],basename(__FILE__))) { 579 return $post_id; 580 } 581 // check autosave 582 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { 583 return $post_id; 584 } 585 // check user permissions 586 if ('page' == $_POST['post_type']) { 587 if (!current_user_can('edit_page', $post_id)) { 588 return $post_id; 589 } 590 } elseif (!current_user_can('edit_post', $post_id)) { 591 return $post_id; 592 } 593 // end security and permissions 594 // begin saving meta data! 595 if ($post->post_type == 'fpc-fanpage') { // we're custom post type: fan-page 596 $meta_id = '_fpcpage'; 597 // get old meta if it exists 598 $old_meta = get_post_meta($post_id, $meta_id, true); 599 } elseif ($post->post_type == 'fpc-app') { // we're custom post type: fpc-appp 600 $meta_id = '_fpcapp'; 601 // get old meta if it exists 602 $old_meta = get_post_meta($post_id, $meta_id, true); 603 // get the header/content/footer filters for apps 604 if ($_POST['_header_filters']) { 605 $new_meta['header_filters'] = $_POST['_header_filters']; 606 } 607 if ($_POST['_content_filters']) { 608 $new_meta['content_filters'] = $_POST['_content_filters']; 609 } 610 if ($_POST['_footer_filters']) { 611 $new_meta['footer_filters'] = $_POST['_footer_filters']; 612 } 613 } elseif($this->is_old_fanpage($fpc1_meta)){ // we're a legacy fpc 1.x page 614 $meta_id = '_fbfp'; 615 // get old meta if it exists 616 $old_meta = $fpc1_meta; 617 } 618 // general function for saving all our meta 619 if(isset($meta_id)){ 620 // assign the new meta 621 if ($_POST[$meta_id]) { 622 foreach ($_POST[$meta_id] as $key => $value) { 623 $new_meta[$key] = trim($value); 205 624 } 206 $this->page_liked = !empty($this->page_liked); 207 $this->page_admin = !empty($this->page_admin); 208 } else { 209 $this->page_id = trim($signed_request["page"]["id"]); 210 $this->page_liked = trim($signed_request["page"]["liked"]); 211 $this->page_admin = trim($signed_request["page"]["admin"]); 212 $this->user_country = trim($signed_request["user"]["country"]); 213 $this->user_locale = trim($signed_request["user"]["locale"]); 214 $this->user_id = trim($signed_request["user_id"]); 215 $this->app_data = trim($signed_request["app_data"]); 216 $this->algorithm = trim($signed_request["algorithm"]); 217 $this->expires = trim($signed_request["expires"]); 218 $this->issued_at = trim($signed_request["issued_at"]); 219 $this->oauth_token = trim($signed_request["oauth_token"]); 220 221 $this->page_liked = !empty($this->page_liked); 222 $this->page_admin = !empty($this->page_admin); 223 224 setcookie('fpc_cookie[page_id]', $this->page_id, time()+1200, '/', $this->domain); 225 setcookie('fpc_cookie[page_liked]', $this->page_liked, time()+1200, '/', $this->domain); 226 setcookie('fpc_cookie[page_admin]', $this->page_admin, time()+1200, '/', $this->domain); 227 setcookie('fpc_cookie[user_country]', $this->user_country, time()+1200, '/', $this->domain); 228 setcookie('fpc_cookie[user_locale]', $this->user_locale, time()+1200, '/', $this->domain); 229 setcookie('fpc_cookie[user_id]', $this->user_id, time()+1200, '/', $this->domain); 230 setcookie('fpc_cookie[app_data]', $this->app_data, time()+1200, '/', $this->domain); 231 setcookie('fpc_cookie[algorithm]', $this->algorithm, time()+1200, '/', $this->domain); 232 setcookie('fpc_cookie[expires]', $this->expires, time()+1200, '/', $this->domain); 233 setcookie('fpc_cookie[issued_at]', $this->issued_at, time()+1200, '/', $this->domain); 234 setcookie('fpc_cookie[oauth_token]', $this->oauth_token, time()+1200, '/', $this->domain); 235 } 236 ?> 237 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 238 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> 239 <head> 240 <!-- This page Generated by Fanpage Connect FREE v<?php echo FPC_PLUGIN_VERSION; ?>: http://www.fanpageconnect.com --> 241 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 242 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no" /> 243 <meta property="og:title" content="<?php echo $this->g_fpogtitle; ?>" /> 244 <meta property="og:type" content="<?php echo $this->g_fpogtype; ?>" /> 245 <meta property="og:url" content="<?php echo $this->g_fpogurl; ?>" /> 246 <meta property="og:image" content="<?php echo $this->g_fpogimg; ?>" /> 247 <meta property="og:site_name" content="<?php echo $this->g_fpogname; ?>" /> 248 <meta property="fb:app_id" content="<?php echo $this->fbappid; ?>"> 249 <meta property="fb:admins" content="<?php echo $this->fbappid; ?>"> 250 <title><?php bloginfo('name'); ?> - <?php is_home() ? bloginfo('description') : wp_title(''); ?></title> 251 <?php if(!empty($this->g_fp_url) && !empty($this->fbappid)){ ?><script type="text/javascript">if(parent.frames.length <= 0){window.location.replace("<?php echo $this->g_fp_url.$parmPrefix.'sk=app_'.$this->fbappid; ?>");}</script><?php } ?> 252 <?php wp_head(); ?> 253 <link rel="stylesheet" href="<?php echo FPC_PLUGIN_URL; ?>/css/wp.css" type="text/css" media="screen" /> 254 <link rel="stylesheet" href="<?php echo FPC_PLUGIN_URL; ?>/css/default.css" type="text/css" media="screen" /> 255 <?php if(!empty($this->google_fonts)){ ?><link rel="stylesheet" href="<?php echo $doc_protocol;?>fonts.googleapis.com/css?family=<?php echo $this->google_fonts; ?>" type="text/css"><?php } ?> 256 <?php if(!empty($this->fbtemplate)){ ?><link rel="stylesheet" href="<?php echo FPC_PLUGIN_URL; ?>/templates/<?php echo $this->fbtemplate;?>/default.css" type="text/css" media="screen" /><?php } ?> 257 <?php if(!empty($this->fbcsslink)){?><link rel="stylesheet" href="<?php echo $this->fbcsslink; ?>" type="text/css" media="screen" /><?php } ?> 258 <?php if(!empty($this->fbcss)){?><style type="text/css"><?php echo $this->fbcss; ?></style><?php } ?> 259 <?php if($this->g_autofit == 'true'){ ?> 260 <style type="text/css"> 261 body { width:810px; overflow:hidden; margin:0; padding:0; border:0; } /* brute force autofit scrollbar killer */ 262 </style> 263 <script type="text/javascript"> 264 window.fbAsyncInit = function() { FB.Canvas.setAutoGrow(100); } 265 function sizeChangeCallback() { FB.Canvas.setAutoGrow(100); } 266 </script> 267 <?php } ?> 268 </head> 269 <body> 270 <script type="text/javascript"> 271 s = '<scr'+'ipt type="text/jav'+'ascr'+'ipt" src="'+document.location.protocol+'//connect.facebook.net/en_US/all.js#xfbml=1'+'"></scr'+'ipt>';document.write(s); 272 </script> 273 <?php if(!empty($this->g_fpogimg)): ?><img src="<?php echo $this->g_fpogimg; ?>" alt="<?php echo $this->g_fpogname; ?>" style="display:none;" /><?php endif;?> 274 <div id="fpc-wrapper"> 275 276 <div id="fpc-header-area" class="full-width"> 277 <div class="fpc-page"> 278 <div id="fpc-header"> 279 <?php echo do_shortcode(shortcode_unautop($this->fbheadercontent)); ?> 280 <?php if(!empty($this->g_menu_name) && $this->g_use_menu == 'true') { ?> 281 <?php if(($this->g_show_menu == 'liked' && $this->page_liked) || $this->g_show_menu == 'always'){ ?> 282 <div id="fpc-menu"> 283 <?php wp_nav_menu(array('menu' => $this->g_menu_name,'container_class' => 'menu-header')); ?> 284 </div> 285 <?php } ?> 286 <?php } ?> 287 </div><!-- fpc-header --> 288 </div><!-- .fpc-page --> 289 </div><!-- fpc-header-area --> 290 291 <div id="fpc-content-area" class="full-width"> 292 <div class="fpc-page"> 293 <div id="fpc-content"> 294 295 <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 296 <?php the_content(''); ?> 297 <div style="clear:both;display:block;margin-bottom:1px;padding-top:1px;"></div> 298 <?php endwhile; else: ?> 299 <h2>Oops! There are no posts.</h2> 300 <?php endif; ?> 301 <?php 302 if($this->g_debug == 'true'){ 303 echo '<p>'; 304 echo '<strong>Debug Info:</strong><br>'; 305 echo '<strong>Page Id:</strong> ' . $this->page_id . '<br>'; 306 echo '<strong>App Id:</strong> ' . $this->fbappid . '<br>'; 307 echo '<strong>Is Liked:</strong> ' . $this->page_liked . '<br>'; 308 echo '<strong>Is Admin:</strong> ' . $this->page_admin . '<br>'; 309 echo '<strong>Country:</strong> ' . $this->user_country . '<br>'; 310 echo '<strong>Locale:</strong> ' . $this->user_locale . '<br>'; 311 echo '<strong>User Id:</strong> ' . $this->user_id . '<br>'; 312 echo '<strong>App Data:</strong> ' . $this->app_data . '<br>'; 313 echo '<strong>Algorithm:</strong> ' . $this->algorithm . '<br>'; 314 echo '<strong>Expires:</strong> ' . $this->expires . '<br>'; 315 echo '<strong>Issued At:</strong> ' . $this->issued_at . '<br>'; 316 echo '<strong>Oauth Token:</strong> ' . $this->oauth_token . '<br>'; 317 echo '<strong>Referrer:</strong> ' . $_SERVER['HTTP_REFERER'] . '<br>'; 318 echo '<strong>Base Domain:</strong> '. $this->domain . '<br>'; 319 echo '<strong>FPC Cookie:</strong> '; 320 print_r($_COOKIE['fpc_cookie']); 321 echo '<br> '; 322 echo '<strong>User Agent:</strong> '. $_SERVER['HTTP_USER_AGENT'] . '<br>'; 323 if(!empty($this->fb_error)){ 324 echo '<strong>Facebook Exception:</strong> '; 325 print_r($this->fb_error, true); 326 } 327 echo '</p>'; 328 } 329 ?> 330 331 <div id="fb-root"></div> 332 333 <?php if(comments_open($post->ID) && (($this->show_comments == 'liked' && $this->page_liked) || $this->show_comments == 'always')){ ?> 334 <div id="fpc-comments"> 335 <fb:comments href="<?php echo the_permalink(); ?>" num_posts="10" width="470"></fb:comments> 336 </div> 337 <?php } ?> 338 339 </div><!-- fpc-content --> 340 </div><!-- .fpc-page --> 341 </div><!-- fpc-content-area --> 342 343 <div id="fpc-footer-area" class="full-width"> 344 <div class="fpc-page"> 345 <div id="fpc-footer"> 346 <?php echo do_shortcode(shortcode_unautop($this->fbfootercontent)); ?> 347 <?php if($this->link_luv){ ?> 348 <div id="fpc-linkluv"> 349 This fan page generated by <a href="<?php echo $link_luv_url; ?>" target="_blank">Fanpage Connect</a> 350 </div> 351 <?php } ?> 352 </div><!-- fpc-footer --> 353 </div><!-- .fpc-page --> 354 </div><!-- fpc-footer-area --> 355 356 </div><!-- fpc-wrapper --> 357 <div id="hidden-footer"><?php wp_footer(); ?></div> 358 <script type="text/javascript"> 359 FB.init({ appId : '<?php echo $this->fbappid; ?>', status : true, cookie : true, xfbml : true, oauth: true }); 360 <?php if(!empty($this->fbappid) && !empty($this->g_fp_url)):?> 361 FB.Event.subscribe('edge.create', function(response) { top.location.href = "<?php echo $this->g_fp_url.'?sk=app_'.$this->fbappid; ?>"; }); 362 FB.Event.subscribe('edge.remove', function(response) { top.location.href = "<?php echo $this->g_fp_url.'?sk=app_'.$this->fbappid; ?>"; }); 363 <?php endif; ?> 364 </script> 365 </body> 366 </html> 367 <?php 368 die(); 369 } 370 371 } // end dofbpage 372 373 /* 374 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 375 BEGIN FREE SHORTCODES 376 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 377 */ 378 /* 379 display content if page not liked 380 */ 381 function fpc_liked($atts, $content = null) { 382 if($this->page_liked){ 383 return do_shortcode(shortcode_unautop($content)); 384 } 385 } // end fpc_liked 386 387 /* 388 display content if page not liked 389 */ 390 function fpc_not_liked($atts, $content = null) { 391 if(!$this->page_liked){ 392 return do_shortcode(shortcode_unautop($content)); 393 } 394 } // end fpc_not_liked 395 396 /* 397 display content if user is page admin 398 */ 399 function fpc_admin($atts, $content = null) { 400 if($this->page_admin){ 401 return do_shortcode(shortcode_unautop($content)); 402 } 403 } // end fpc_admin 404 405 /* 406 add google font capability 407 */ 408 function fpc_font($atts, $content = null) { 409 extract(shortcode_atts(array('size'=>'', 'color'=>'', 'face'=>'', 'class'=>''),$atts)); 410 $fbf = '<span'; 411 $fbf .= ($class != '')? ' class="' . $class . '" ' : ''; 412 $fbf .= ' style="'; 413 $fbf .= ($face != '')? 'font-family:\'' . $face . '\' !important;' : ''; 414 $fbf .= ($size != '')? 'font-size:' . $size . 'px !important;' : ''; 415 $fbf .= ($color != '')? 'color:' . $color . ' !important;' : ''; 416 $fbf .= '">'; 417 $fbf .= do_shortcode($content); 418 $fbf .= '</span>'; 419 return $fbf; 420 } // end fpc_font 421 422 /* 423 process post and add google fonts 424 */ 425 function fpc_setup_google_fonts($postID) { 625 } 626 // check for google fonts 627 $new_meta['google_fonts'] = $this->setup_google_fonts($post_id); 628 $new_meta['google_plus'] = $this->setup_google_plus($post_id); 629 // save, update or delete the meta 630 if ($new_meta && $new_meta != $old_meta) { 631 update_post_meta($post_id, $meta_id, $new_meta); 632 } elseif ('' == $new_meta && $old_meta) { 633 delete_post_meta($post_id, $meta_id); 634 } 635 } 636 return $post_id; 637 } // end save_meta 638 639 // process post and add google fonts 640 function setup_google_fonts($postID) { 426 641 $fonts_to_include = ''; 427 642 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { … … 439 654 } 440 655 return $fonts_to_include; 441 } // end fpc_setup_google_fonts 442 /* 443 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 444 END FREE SHORTCODES 445 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 446 */ 447 448 /* 449 enqueue jQuery 450 */ 451 function fpc_add_jquery() { 452 if (!is_admin()) { 453 wp_enqueue_script('jquery'); 454 } 455 } // end enqueue jquery 456 457 /* 458 use page overrides, if any on menus, etc 459 */ 460 function get_overrides($m) 656 } // end setup_google_fonts 657 658 // process post and add google plug one script 659 function setup_google_plus($postID){ 660 $has_plus_on_tag = 0; 661 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { 662 return $has_plus_on_tag; 663 } else { 664 $the_post = get_post($postID); 665 if($the_post){ 666 $the_content = $the_post->post_content; 667 $pattern = '/\\[googleplus1/i'; 668 preg_match($pattern, $the_content, $matches); 669 if(count($matches) > 0){ 670 $has_plus_on_tag = 1; 671 } 672 } 673 } 674 return $has_plus_on_tag; 675 } // end setup_google_plus 676 677 function get_old_options(){ 678 // default values 679 // get ver 1.x options 680 $saved_1x_free = get_option($this->old_free_db_option); 681 $saved_1x_pro = get_option($this->old_pro_db_option); 682 if(!empty($saved_1x_pro)){ 683 $saved_1x_pro['plugin_type'] = 'pro'; 684 } elseif(!empty($saved_1x_free)){ 685 $saved_1x_free['plugin_type'] = 'free'; 686 return $saved_1x_free; 687 } 688 return $saved_1x_pro; 689 } // end get_old_options 690 691 function get_options() 461 692 { 462 $this->g_use_menu = (!empty($m['use_menu']) && $m['use_menu'] != 'defer')? $m['use_menu'] : $this->g_use_menu; 463 $this->g_show_menu = (!empty($m['show_menu']) && $m['show_menu'] != 'defer')? $m['show_menu'] : $this->g_show_menu; 464 } 465 466 function get_fpc_link(){ 467 if(!empty($this->g_aff)){ 468 return 'http://'.$this->g_aff.'.fbmarketer.hop.clickbank.net'; 469 } else { 470 return 'http://www.fanpageconnect.com'; 471 } 472 } 473 474 /* 475 convert old individual meta data into the newer array 476 */ 477 function convert_old_meta($id) 478 { 479 $old_meta_test = get_post_meta($id, '_fbfp_isfanpage', true); 480 if($old_meta_test != ''){ 481 $new_meta = array(); 482 483 // free meta 484 $new_meta['isfanpage'] = get_post_meta($id, '_fbfp_isfanpage', true); 485 $new_meta['appid'] = get_post_meta($id, '_fbfp_appid', true); 486 $new_meta['appsecret'] = get_post_meta($id, '_fbfp_appsecret', true); 487 $new_meta['csslink'] = get_post_meta($id, '_fbfp_csslink', true); 488 $new_meta['css'] = get_post_meta($id, '_fbfp_css', true); 489 $new_meta['template'] = get_post_meta($id, '_fbfp_template', true); 490 $new_meta['header'] = get_post_meta($id, '_fbfp_header', true); 491 $new_meta['footer'] = get_post_meta($id, '_fbfp_footer', true); 492 $new_meta['use_menu'] = get_post_meta($id, '_fbfp_use_menu',true); 493 $new_meta['show_menu'] = get_post_meta($id, '_fbfp_show_menu',true); 494 $new_meta['show_comments'] = get_post_meta($id, '_fbfp_show_comments',true); 495 $new_meta['google_font'] = get_post_meta($id, '_fbfp_goole_fonts', true); 496 497 update_post_meta($id, '_fbfp', $new_meta); 498 499 // nuke the old meta 500 delete_post_meta($id, '_fbfp_isfanpage'); 501 delete_post_meta($id, '_fbfp_autofit'); 502 delete_post_meta($id, '_fbfp_debug'); 503 delete_post_meta($id, '_fbfp_appid'); 504 delete_post_meta($id, '_fbfp_appsecret'); 505 delete_post_meta($id, '_fbfp_cookie'); 506 delete_post_meta($id, '_fbfp_csslink'); 507 delete_post_meta($id, '_fbfp_css'); 508 delete_post_meta($id, '_fbfp_template'); 509 delete_post_meta($id, '_fbfp_header'); 510 delete_post_meta($id, '_fbfp_footer'); 511 delete_post_meta($id, '_fbfp_use_menu'); 512 delete_post_meta($id, '_fbfp_show_menu'); 513 delete_post_meta($id, '_fbfp_show_comments'); 514 delete_post_meta($id, '_fbfp_goole_fonts'); 515 } 516 } 517 518 /* 519 add meta box to page editor 520 */ 521 function fpc_add_box() { 522 523 wp_enqueue_style('fpc_meta_css', FPC_PLUGIN_URL . '/css/fanpage-connect.css'); 524 525 $box_id = 'fbfp-meta-box'; 526 $box_title = 'Fanpage Connect Settings'; 527 $box_callback = array(&$this, 'fpc_show_box'); 528 $box_type = 'page'; 529 $box_context = 'normal'; 530 $box_priority = 'high'; 531 532 add_meta_box($box_id, $box_title, $box_callback, $box_type, $box_context, $box_priority); 533 } // end fpc_add_box 534 535 /* 536 show the meta box on the page editor 537 */ 538 function fpc_show_box() { 539 global $post; 540 // convert old meta 541 $this->convert_old_meta($post->ID); 542 // get meta data for the form 543 $meta = get_post_meta($post->ID, '_fbfp', true); 544 // show the page 545 include(FPC_PLUGIN_DIR . '/fanpage-connect-meta.php'); 546 echo '<input type="hidden" id="fpc_nonce" name="fpc_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />'; 547 } // end fpc_show_box 548 549 /* 550 return a select list of installed templates 551 */ 552 function fpc_get_templates($t) { 693 // default values 694 $options = array( 695 'activated' => false, 696 'plugin_type' => 'free', 697 'name' => '', 698 'email' => '', 699 'upgraded' => false 700 ); 701 // get saved options 702 $saved = get_option($this->fpc2_db_option); 703 // should just run once if we have previous versions of FPC ($saved_2x should only be empty once!) 704 if(empty($saved) && !empty($this->fpc1_options)){ 705 $saved['activated'] = $this->fpc1_options['activated']; 706 $saved['plugin_type'] = $this->fpc1_options['plugin_type']; 707 $saved['name'] = $this->fpc1_options['name']; 708 $saved['email'] = $this->fpc1_options['email']; 709 $saved['upgraded'] = true; 710 update_option($this->fpc2_db_option,$saved); 711 } 712 // assign options 713 if(!empty($saved)) 714 { 715 foreach($saved as $key => $option) 716 { 717 $options[$key] = $option; 718 } 719 } 720 //update options if necessary 721 if($saved != $options) 722 { 723 update_option($this->fpc2_db_option,$options); 724 } 725 726 // return the options 727 return $options; 728 729 } // end get_options 730 731 // return a select list of installed templates 732 function get_custom_templates($t,$mi) { 553 733 $out = ''; 554 734 $has_dirs = false; … … 562 742 if($has_dirs) 563 743 { 564 $out .= '<select id=" _fbfp[template]" name="_fbfp[template]">';744 $out .= '<select id="'.$mi.'_template" name="_'.$mi.'[template]">'; 565 745 if($t == ''){ 566 746 $out .= '<option value="" selected="selected"></option>'; … … 578 758 } 579 759 $out .= '</select>'; 580 $out .= '<br />'; 581 $out .= '<span>'; 760 $out .= '<button id="template_preview">Preview</button>'; 761 $out .= '<p>'; 762 $out .= '<div class="desc">'; 582 763 $out .= 'If you select a custom template, it will override all other CSS settings.<br />'; 583 764 $out .= 'Make sure your template directory contains the file "default.css"!<br />'; 584 $out .= '</ span>';585 765 $out .= '</div>'; 766 $out .= '</p>'; 586 767 } else { 587 $out .= '<span>There are no custom templates loaded.</span>'; 588 $out .= '<input type="hidden" id="_fbfp_template" name="_fbfp_template" value="">'; 768 $out .= '<p>'; 769 $out .= '<div class="desc">'; 770 $out .= 'There are no custom templates loaded.'; 771 $out .= '</div>'; 772 $out .= '</p>'; 773 $out .= '<input type="hidden" id="fbfp_template" name="'.$mi.'[template]" value="">'; 589 774 } 590 775 return $out; 591 } // end fpc_get_templates 592 593 /* 594 save the meta data 595 */ 596 function fpc_meta_save($post_id) { 597 // verify post data 598 if (!wp_verify_nonce($_POST['fpc_nonce'],basename(__FILE__))) { 599 return $post_id; 600 } 601 // check autosave 602 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { 603 return $post_id; 604 } 605 // check user permissions 606 if ('page' == $_POST['post_type']) { 607 if (!current_user_can('edit_page', $post_id)) { 608 return $post_id; 609 } 610 } elseif (!current_user_can('edit_post', $post_id)) { 611 return $post_id; 612 } 613 // get old and new meta 614 $old_meta = get_post_meta($post_id, '_fbfp', true); 615 $new_meta = array(); 616 // assign the new meta 617 if ($_POST['_fbfp']) { 618 foreach ($_POST['_fbfp'] as $key => $value) { 619 $new_meta[$key] = trim($value); 620 } 621 } 622 // check for google fonts 623 $new_meta['google_fonts'] = $this->fpc_setup_google_fonts($post_id); 624 625 // save, update or delete the meta 626 if ($new_meta && $new_meta != $old_meta) { 627 update_post_meta($post_id, '_fbfp', $new_meta); 628 } elseif ('' == $new_meta && $old_meta) { 629 delete_post_meta($post_id, '_fbfp'); 630 } 631 return $post_id; 632 } // end fpc_meta_save 633 634 /* 635 get plugin options, set plugin options 636 */ 637 function get_options() 638 { 639 // default values 640 $options = array( 641 'activated' => false, 642 'name' => '', 643 'email' => '', 644 'use_menu' => false, 645 'menu_name' => '', 646 'show_menu' => 'liked', 647 'link_luv' => 1, 648 'debug' => false, 649 'autofit' => true, 650 'cbid' => '', 651 'fpurl' => '', 652 'fpogtitle' => '', 653 'fpogtype' => '', 654 'fpogurl' => '', 655 'fpogimg' => '', 656 'fpogname' => '', 657 'aff' => '' 658 ); 659 660 // get saved options 661 $saved = get_option($this->FanpageConnect_DB_option); 662 // assign options 663 if(!empty($saved)) 664 { 665 foreach($saved as $key => $option) 666 { 667 $options[$key] = $option; 668 } 669 } 670 //update options if necessary 671 if($saved != $options) 672 { 673 update_option($this->FanpageConnect_DB_option,$options); 674 } 675 // return the options 676 return $options; 677 } // end get_options 678 679 /* 680 update options from the admin page 681 */ 682 function handle_options() 683 { 684 $options = $this->get_options(); 685 686 if (isset($_POST['submitted'])) { 687 688 //check security 689 check_admin_referer('fpc-options-nonce'); 690 691 $options['use_menu'] = ($_POST['use_menu'] == 'true')? true : false; 692 $options['menu_name'] = $_POST['menu']; 693 $options['show_menu'] = $_POST['show_menu']; 694 $options['link_luv'] = $_POST['link_luv']; 695 $options['debug'] = $_POST['debug']; 696 $options['fpurl'] = $_POST['fpurl']; 697 $options['autofit'] = $_POST['autofit']; 698 $options['cbid'] = $_POST['cbid']; 699 $options['fpogtitle'] = $_POST['fpogtitle']; 700 $options['fpogtype'] = $_POST['fpogtype']; 701 $options['fpogurl'] = $_POST['fpogurl']; 702 $options['fpogimg'] = $_POST['fpogimg']; 703 $options['fpogname'] = $_POST['fpogname']; 704 705 update_option($this->FanpageConnect_DB_option, $options); 706 707 echo '<div class="updated fade"><p>Plugin settings saved.</p></div>'; 708 } 709 710 // URL for form submit, equals our current page 711 $action_url = $_SERVER['REQUEST_URI']; 712 $use_menu = $options['use_menu']; 713 $menu_name = $options['menu_name']; 714 $show_menu = $options['show_menu']; 715 $link_luv = $options['link_luv']; 716 $debug = $options['debug']; 717 $fbautofit = $options['autofit']; 718 $cbid = $options['cbid']; 719 $fpurl = $options['fpurl']; 720 $fpogtitle = $options['fpogtitle']; 721 $fpogtype = $options['fpogtype']; 722 $fpogurl = $options['fpogurl']; 723 $fpogimg = $options['fpogimg']; 724 $fpogname = $options['fpogname']; 725 726 // include the options page 727 include('fanpage-connect-options.php'); 728 } // end handle_options 729 730 /* 731 get base domain for cookies 732 */ 776 } // end get_custom_templates 777 778 // get base domain for cookies 733 779 function get_domain() 734 780 { 735 781 $base_domain = ''; 736 737 782 $G_TLD = array( 738 783 'biz','com','edu','gov','info','int','mil','name','net','org', … … 742 787 'bitnet','csnet','ip','local','onion','uucp','co' 743 788 ); 744 745 789 $C_TLD = array( 746 790 'ac','ad','ae','af','ag','ai','al','am','an','ao','aq','ar','as','at','au','aw','ax','az', … … 760 804 'eh','kp','me','rs','um','bv','gb','pm','sj','so','yt','su','tp','bu','cs','dd','zr' 761 805 ); 762 763 806 // get our wordpress site url 764 807 $the_domain = parse_url(home_url()); … … 769 812 $full_domain = $the_domain['host']; 770 813 } 771 772 814 $DOMAIN = explode('.', $full_domain); 773 815 $DOMAIN = array_reverse($DOMAIN); 774 775 816 if ( count($DOMAIN) == 4 && is_numeric($DOMAIN[0]) && is_numeric($DOMAIN[3]) ) { return $full_domain; } 776 817 if ( count($DOMAIN) <= 2 ) return $full_domain; … … 784 825 } // end get_domain 785 826 827 // register the template 828 function get_template() { 829 global $post; 830 if($this->plugin_activated){ 831 $meta = get_post_meta($post->ID, '_fbfp', true); // old legacy page? 832 if ($post->post_type == 'fpc-fanpage') { 833 include (dirname( __FILE__ ) . '/template/single-fpc2.x-fanpage.php'); 834 exit; 835 } elseif ($this->is_old_fanpage($meta)) { 836 include (dirname( __FILE__ ) . '/template/single-fpc1.x-fanpage.php'); 837 exit; 838 } 839 } 840 } // end get_template 841 842 843 // make sure plugin settings match the domain we're logged in to. 844 function strip_protocol($url){ 845 $new_url = str_replace("https:", "", $url); 846 $new_url = str_replace("http:", "", $new_url); 847 return $new_url; 848 } 849 850 // uninstall 851 function uninstall(){ 852 flush_rewrite_rules(); 853 } 854 786 855 /* 787 add option page for Fanpage Connect 856 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 857 BEGIN FREE SHORTCODES 858 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 788 859 */ 789 function fpc_add_menu_page() { 790 add_menu_page('Fanpage Connect', 'Fanpage Connect', 2, 'fanpage-connect.php', array(&$this, 'fpc_menu_page'), plugins_url('img/fpc-icon-small.png', __FILE__)); 791 } 792 function fpc_menu_page(){ 793 $this->handle_options(); 794 } 795 860 861 // display content if page not liked 862 function fpc_liked($atts, $content = null) { 863 if($this->page_liked){ 864 return do_shortcode(shortcode_unautop($content)); 865 } 866 } // end fpc_liked 867 868 // display content if page not liked 869 function fpc_not_liked($atts, $content = null) { 870 if(!$this->page_liked){ 871 return do_shortcode(shortcode_unautop($content)); 872 } 873 } // end fpc_not_liked 874 875 // display a list of posts 876 function fpc_posts($atts, $content = null) { 877 global $post; 878 extract(shortcode_atts(array('num' => 10,'cat' => '','type' => '','excerpts'=>0,'showdate'=>0,'showauthor'=>0),$atts)); 879 $num = (is_numeric($num))? $num : 10; 880 $showdate = (is_numeric($showdate))? $showdate : 0; 881 $showauthor = (is_numeric($showauthor))? $showauthor : 0; 882 $excerpts = (is_numeric($excerpts))? $excerpts : 0; 883 $postype = ''; 884 $catname = ''; 885 $post_list = ''; 886 if($type != ''){ 887 $postype = '&post_type='.$type; 888 } elseif($cat != '') { 889 $catname = '&category_name='.$cat; 890 } 891 $args = 'orderby=date&order=DESC&posts_per_page='.$num.$postype.$catname; 892 $the_query = new WP_Query($args); 893 if($the_query->have_posts()){ 894 $post_list = '<ul class="fpc-posts">'; 895 while ($the_query->have_posts()) : $the_query->the_post(); 896 $post_list .= '<li class="fpc-blog-post">'; 897 $post_list .= '<a href="'.get_permalink($post->ID).'" target="_blank" alt="'.get_the_title($post->ID).'">'.get_the_title($post->ID).'</a>'; 898 if($showdate || $showauthor){ 899 $post_list .= '<br /><span class="fpc-post-info">'; 900 $post_list .= ($showdate == 1)? 'Posted on: ' . the_date('','',' ',FALSE) : ''; 901 $post_list .= ($showauthor == 1)? 'by: ' . get_the_author() : ''; 902 $post_list .= '</span>'; 903 } 904 if($excerpts){ 905 $tmp_excerpt = get_the_excerpt(); 906 $post_list .= '<br /><span class="fpc-post-excerpt">'; 907 $post_list .= $this->trim_excerpt(get_the_excerpt(),$post->ID); 908 $post_list .= '</span>'; 909 } 910 $post_list .= '</li>'; 911 endwhile; 912 $post_list .= '</ul>'; 913 } else { 914 $post_list = '<ul class="fpc-posts"><li class="fpc-blog-post">No Posts Found</li></ul>'; 915 } 916 wp_reset_postdata(); 917 return $post_list; 918 } // end fpc_posts 919 920 // helper function - trim excerpt to 140 characters 921 function trim_excerpt($excerpt,$pid) { 922 $charlength = 140; 923 $excerpt_out = ''; 924 if(strlen($excerpt) > $charlength) { 925 $subex = substr($excerpt,0,$charlength-5); 926 $exwords = explode(" ",$subex); 927 $excut = -(strlen($exwords[count($exwords)-1])); 928 if($excut < 0) { 929 $excerpt_out .= substr($subex,0,$excut); 930 } else { 931 $excerpt_out .= $subex; 932 } 933 $excerpt_out .= '<a href="'.get_permalink($pid).'" target="_blank" alt="'.get_the_title($pid).'">[...]</a>'; 934 } else { 935 $excerpt_out .= $excerpt; 936 } 937 return $excerpt_out; 938 } // end trim_excerpt 939 940 // display content if user is page admin 941 function fpc_admin($atts, $content = null) { 942 if($this->page_admin){ 943 return do_shortcode(shortcode_unautop($content)); 944 } 945 } // end fpc_admin 946 947 // add google font capability 948 function fpc_font($atts, $content = null) { 949 extract(shortcode_atts(array('size'=>'', 'lineheight'=>'', 'color'=>'', 'face'=>'', 'class'=>''),$atts)); 950 $fbf = '<span'; 951 $fbf .= ($class != '')? ' class="' . $class . '" ' : ''; 952 $fbf .= ' style="'; 953 $fbf .= ($face != '')? 'font-family:\'' . $face . '\' !important;' : ''; 954 $fbf .= ($size != '')? 'font-size:' . $size . ' !important;' : ''; 955 $fbf .= ($lineheight != '')? 'line-height:' . $size . ' !important;' : ''; 956 $fbf .= ($color != '')? 'color:' . $color . ' !important;' : ''; 957 $fbf .= '">'; 958 $fbf .= do_shortcode($content); 959 $fbf .= '</span>'; 960 return $fbf; 961 } // end fpc_font 796 962 /* 797 add jquery scripts to the options page 963 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 964 END FREE SHORTCODES 965 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 798 966 */ 799 function fpc_admin_init() 800 { 801 if(is_admin() && isset($_GET['page']) && $_GET['page'] == 'fanpage-connect.php'){ 802 wp_deregister_script('jquery'); 803 wp_register_script('jquery', FPC_PLUGIN_URL . '/js/jquery-1.5.1.min.js'); 804 wp_register_script('jquery-ui-custom', FPC_PLUGIN_URL . '/js/jquery-ui-1.8.13.custom.min.js'); 805 wp_register_style('jquery.ui.theme', FPC_PLUGIN_URL . '/css/smoothness/jquery-ui-1.8.13.custom.css'); 806 wp_enqueue_script('jquery'); 807 wp_enqueue_script('jquery-ui-custom'); 808 wp_enqueue_style('jquery.ui.theme'); 809 } 810 } // end fpc_admin_init 811 812 /* 813 add jquery footer code for accordion 814 */ 815 function fpc_admin_footer() 816 { 817 if(is_admin() && $_GET['page'] == 'fanpage-connect.php'){ 818 ?> 819 <script type="text/javascript"> 820 $(document).ready(function(){ 821 $("#fpc-accordion1").accordion({header:"h4",autoHeight:false,active:false,collapsible:true}); 822 $("#fpc-accordion2").accordion({header:"h4",autoHeight:false,active:false,collapsible:true}); 823 $("#fpc-accordion3").accordion({header:"h4",autoHeight:false,active:false,collapsible:true}); 824 }); 825 </script> 826 <?php 827 } 828 } // end fpc_admin_footer 829 830 // begin functions for adding plugin to tinyMCE 831 function add_tinymce() { 832 if(!current_user_can('edit_posts') && ! current_user_can('edit_pages')) { 833 return; 834 } 835 if(get_user_option('rich_editing') == 'true') { 836 add_filter('mce_external_plugins', array(&$this, 'add_tinymce_plugin')); 837 add_filter('mce_buttons', array(&$this, 'add_tinymce_button')); 838 } 839 } 840 function add_tinymce_plugin($plugin_array) { 841 $plugin_array['fpc_button'] = FPC_PLUGIN_URL . '/tinymce/editor_plugin.js'; 842 return $plugin_array; 843 } 844 function add_tinymce_button($buttons) { 845 array_push($buttons, "separator", 'fpc_button'); 846 return $buttons; 847 } 848 // end functions for adding plugin to tinyMCE 849 850 /* 851 install and initialize the plugin 852 */ 853 function install() 854 { 855 // set default options 856 $FanpageConnect_options = $this->get_options(); 857 } // end install 858 859 /* 860 uninstall the plugin - removes options 861 */ 862 function uninstall() { 863 delete_option('fpc_options'); 864 } // end uninstall 865 866 /* 867 registration form control 868 */ 869 function reg_form($step,$name,$email,$frm,$hide,$btn){ 870 ?> 871 <script language="javascript"> 872 function trim(s){ 873 var n = s; 874 while (n.length > 0 && n.charAt(0) == ' ') 875 n = n.substring(1,n.length); 876 while(n.length > 0 && n.charAt(n.length-1) == ' ') 877 n = n.substring(0,n.length-1); 878 return n; 879 } 880 function fpcValidateForm(){ 881 var fname = trim(document.forms['<?php echo $frm; ?>']['name'].value); 882 var email = document.forms['<?php echo $frm; ?>']['email'].value; 883 var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; 884 var err = ''; 885 if(fname.length <= 0){ 886 err += 'Registration Error:\n'; 887 err += '* Please Enter Your Name\n'; 888 } 889 if(reg.test(email) == false){ 890 err += '* Please Enter a Valid Email\n'; 891 } 892 if(err != ''){ 893 alert(err); 894 return false; 895 } 896 return true; 897 } 898 </script> 899 <form method="post" name="<?php echo $frm; ?>" action="http://www.aweber.com/scripts/addlead.pl"<?php if(!$hide){ ?> onsubmit="return fpcValidateForm()"<?php } ?>> 900 <div style="display: none;"> 901 <input type="hidden" name="meta_web_form_id" value="1397961035" /> 902 <input type="hidden" name="meta_split_id" value="" /> 903 <input type="hidden" name="listname" value="fanpageconnect" /> 904 <input type="hidden" name="redirect" value="http://www.fanpageconnect.com/fanpage-connect-register-redirect.php" /> 905 <input type="hidden" name="meta_redirect_onlist" value="http://www.fanpageconnect.com/fanpage-connect-register-redirect.php?fpc_onlist=1" /> 906 <input type="hidden" name="meta_adtracking" value="Fanpage_Connect_Registration" /> 907 <input type="hidden" name="meta_message" value="1" /> 908 <input type="hidden" name="meta_required" value="name,email" /> 909 <input type="hidden" name="meta_forward_vars" value="1" /> 910 <input type="hidden" name="meta_tooltip" value="" /> 911 <input type="hidden" name="custom Website" value='<?php bloginfo('url'); ?>' /> 912 <input type="hidden" name="reg_step" value="<?php echo $step;?>" /> 913 <script language="javascript"> 914 document.write('<input type="hidden" name="admin_url" value="'+document.location+'">'); 915 </script> 916 <img src="https://forms.aweber.com/form/displays.htm?id=jMyc7JxsjAzMrA==" alt="" /> 917 </div> 918 <table cellpadding="5" cellspacing="3" border="0" class="reg_form_center"<?php if($hide){echo ' style="display:none;"';} ?>> 919 <tr> 920 <td align="left"><label for="awf_field-17961111">Name:</label></td> 921 <td><input id="awf_field-17961111" type="text" name="name" value="<?php echo $name; ?>" /></td> 922 </tr> 923 <tr> 924 <td align="left"><label for="awf_field-17961112">Email:</label></td> 925 <td><input id="awf_field-17961112" type="text" name="email" value="<?php echo $email; ?>" /></td> 926 </tr> 927 <?php if(!$hide): ?> 928 <tr> 929 <td> </td> 930 <td align="left"><input name="submit" type="submit" value="<?php echo $btn; ?>" /></td> 931 </tr> 932 <?php endif; ?> 933 </table> 934 935 <?php if($hide): ?> 936 <input name="submit" type="submit" value="<?php echo $btn; ?>" /></td> 937 <?php endif; ?> 938 939 </form> 940 <?php 941 } // end reg_form 942 943 /* 944 registration step 1 945 */ 946 function reg_step1() { 947 global $current_user; 948 get_currentuserinfo(); 949 ?> 950 <div class="fpc_reg_wrapper"> 951 <h3>Please register the plugin to activate it. (Registration is free)</h3> 952 <p> 953 In addition you'll also receive a complimentary subscription to the Fanpage Connect Newsletter which will give you insider tips on how to get more from your blog as well as the best Facebook marketing tips. You'll learn how to bring thousands of new visitors to your blog for free.. 954 </p> 955 <p> 956 <strong>Fill in the form below to register the plugin:</strong> 957 </p> 958 <?php $this->reg_form(1,$current_user->user_firstname,$current_user->user_email,'frmReg1',false,'Register'); ?> 959 <p> 960 <strong>Note:</strong> If you've already registered any of the free Fanpage Conenct plugins then simply enter the name/email from which you have registered before. The plugin will activate immediately. 961 </p> 962 <p> 963 <em>Your contact information will be handled with the strictest confidence and will never be sold or shared with third parties.<strong>Also, you can unsubscribe at anytime.</strong></em> 964 </p> 965 </div> 966 <?php 967 } // end reg_step1 968 969 /* 970 registration step 2 971 */ 972 function reg_step2($name,$email) { 973 global $current_user; 974 get_currentuserinfo(); 975 ?> 976 <div class="fpc_reg_wrapper"> 977 <h3>Almost Done!</h3> 978 <p> 979 <strong>Step 1:</strong> 980 </p> 981 <p> 982 A confirmation email has been sent to your email "<?php echo $email; ?>". You must click on the link inside the email to activate the plugin. 983 </p> 984 <p> 985 The email will be from <strong>[email protected]</strong> and the subject will be "Response Required: Activate Your Fanpage Connect Plugin". 986 </p> 987 <p> 988 <strong>Step 2:</strong> 989 </p> 990 <p> 991 Once you've confirmed your email address, click below to activate Fanpage Connect. 992 </p> 993 <?php $this->reg_form(2,$name,$email,'frmReg2',true,'Verify & Activate'); ?> 994 995 <h3><a href="javascript:void(0)" onclick="toggleTrouble();" id="divToggle">+</a> Troubleshooting</h3> 996 997 <div id="trouble-guide"> 998 <p> 999 <strong>The confirmation email is not there in my inbox!</strong><br> 1000 Dont panic. CHECK THE JUNK, spam or bulk folder of your email. 1001 </p> 1002 <p> 1003 <strong>It's not there in the junk folder either.</strong><br> 1004 Sometimes the confirmation email takes time to arrive. Please be patient. WAIT FOR 6 HOURS AT MOST. The confirmation email should be there by then. 1005 </p> 1006 <p> 1007 <strong>Dude, 6 hours and yet no sign of a confirmation email!</strong><br> 1008 Please register again from below: 1009 </p> 1010 <?php $this->reg_form(1,$name,$email,'frmReg2',false,'Register'); ?> 1011 1012 <h3>I still have no confirmation email and I've registered 50 times - WTF?</h3> 1013 <p> 1014 Okay, please register again from the form above using a DIFFERENT EMAIL ADDRESS this time. 1015 </p> 1016 1017 <h3>Why am I getting something like this?</h3> 1018 <p> 1019 <img src="<?php echo FPC_PLUGIN_URL; ?>/img/verification-error.jpg"> 1020 </p> 1021 <p> 1022 You'll get that when you click on "Verify and Activate" button or try to register again. 1023 </p> 1024 <p> 1025 This means that you've already subscribed but haven't clicked on the link in the confirmation email yet. In order to avoid any spam complain we don't send repeated confirmation emails. If you have not recieved the confirmation email then you need to wait for 12 hours at least before requesting another confirmation email. 1026 </p> 1027 1028 <h3>But I've still got problems.</h3> 1029 <p> 1030 No biggie. <a href="mailto:[email protected]">Contact us</a> about it and we will get to you ASAP. 1031 </p> 1032 </div> 1033 <script language="javascript"> 1034 fpcIsHidden = 1; 1035 function toggleTrouble(){ 1036 troubleDiv = document.getElementById('trouble-guide'); 1037 toggleA = document.getElementById('divToggle'); 1038 troubleDiv.style.display = (fpcIsHidden)? 'block' : 'none'; 1039 toggleA.innerHTML = (fpcIsHidden)? '-' : '+'; 1040 fpcIsHidden = !fpcIsHidden; 1041 } 1042 </script> 1043 </div> 1044 <?php 1045 } // end reg_step2 1046 1047 /* 1048 registration step 3 1049 */ 1050 function reg_step3() { 1051 ?> 1052 <div style="width:250px;margin:0 auto;text-align:center;"> 1053 <p> 1054 <img src="<?php echo FPC_PLUGIN_URL; ?>/img/thumbs-up.jpg"> 1055 </p> 1056 <p> 1057 <strong>Woot! Fanpage Connect is now activated. Enjoy!</strong> 1058 </p> 1059 </div> 1060 <?php 1061 } // end reg_step3 1062 1063 } // end class FanpageConnect 967 968 } // end class FanpageConnect2FREE 1064 969 1065 970 } // end if class exists 1066 971 1067 // initialize the FanpageConnect class1068 if (class_exists("FanpageConnect ")) {1069 $wp_fpc = new FanpageConnect();972 // initialize the FanpageConnect2FREE class 973 if (class_exists("FanpageConnect2FREE")) { 974 $wp_fpc2free = new FanpageConnect2FREE(); 1070 975 } 1071 976 1072 977 // set up actions and filters - N/A 1073 if (isset($wp_fpc)) { 1074 //add_action('wp_head', array(&$wp_fpc, 'some_head_function'), 100); 978 if (isset($wp_fpc2free)) { 979 /* 980 if (function_exists('register_activation_hook')) 981 { 982 register_activation_hook(__FILE__, array(&$wp_fpc2free, 'install')); 983 } 984 */ 1075 985 if (function_exists('register_uninstall_hook')) 1076 986 { 1077 register_uninstall_hook(__FILE__, array(&$wp_fpc , 'uninstall'));987 register_uninstall_hook(__FILE__, array(&$wp_fpc2free, 'uninstall')); 1078 988 } 1079 989 } -
fanpage-connect/trunk/readme.txt
r525392 r808652 1 === Fanpage Connect ===1 === Fanpage Connect === 2 2 Contributors: Pat Friedl, Christopher Friedl, Bryan Batson 3 3 Donate link: http://www.fanpageconnect.com/ 4 Tags: Facebook, fan page, Facebook fan page, Facebook application, Facebook marketing, wordpress fan page 5 4 Tags: Facebook, fan page, Facebook fan page, Facebook application, Facebook tab, Facebook fan page tab, Facebook marketing, wordpress fan page, Social media, fan gate, like gate, Facebook fan gate, Facebook like gate 6 5 Requires at least: 3.0 7 Tested up to: 3.2.1 8 Stable tag: 1.4.6 9 10 Fanpage Connect is the WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress. 6 Tested up to: 3.7.1 7 Stable tag: 2.0 8 License: GPLv2 or later 9 10 Fanpage Connect is the WordPress plugin that allows you to create an manage your Facebook fan pages directly from WordPress. 11 11 12 12 == Description == 13 13 14 Fanpage Connect is the WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress. 15 16 Now you can power your Facebook Fan Page with your WordPress blog. In ONE click. 17 18 http://vimeo.com/26673379 19 20 Leverage the world’s most powerful blog engine and the social behemoth that is Facebook to maximize your business or brand’s exposure! 21 22 Give your Fan Page the look and functionality that WordPress offers without all the friggin’ coding. 23 24 No clunky "FBML", no hand coding, and no development experience required. Just edit, publish and *poof*, your fan page timeline is live! 25 26 Keep your website looking like your website and your fan page looking like your fan page. Fanpage Connect works with any theme seamlessly and installs on your WordPress site in just a few clicks. 27 28 == Features == 29 * No coding required - if you can edit a WordPress page, you can create Facebook Fan Pages 30 * Turn any WordPress page into a Facebook Fan Page in minutes! 31 * Use WordPress Custom Menus in your fan pages. 14 Fanpage Connect is a robust plugin that allows you to create and publish professional looking Facebook Fan Pages from the convenience of your Wordpress website. 15 16 *"This plugin is slick!! I was able to customize just the way I like and do it fast! Oh, and you’re support is amazing.* 17 **- Michele L** 18 19 = What do you get with Fanpage Connect? = 20 21 * Easy to launch, customizable Fan Pages from the comfort of Wordpress Editor platform. 22 * Increased visitor conversion through the use of fan gates. 23 * Style your content with the use of Google Fonts that are built into the plugin. 24 * Wordpress widget capabilities to use on your Fan Page Tabs. 25 * Use one of several themes that are available to you or just go freestyle. 26 * The ability to publish fan page tabs that are more enticing to your visitors. 27 * Easily add your new tab to your fan page with a simple "Add to Facebook" button. 28 * Create high converting fan pages by easily creating a "Fan Gate" to get your visitors to "like" the page to see more content. 29 * Use WordPress Custom Menus in your fan pages and pick when to display them: always, or after the page is liked. 32 30 * Use the included templates to change the look of your fan page or add your own. 33 * Create high converting fan pages by easily creating a "Fan Gate" to get your visitors to "like" the page to see more content. 34 * Create even better looking fan pages with over 150 Google Web Fonts! 31 * Up to five pages for your fan page tab. 32 * Custom header and footer content. 33 * Add widgets to header, footer or sidebar on demand, per page. 34 * Select where widgets go in the template. 35 * 12 page layouts - any combination of header, footer or left/right sidebar. 36 * Custom CSS 37 * Easy Open Graph settings per page. 38 * Filter removal options for header, content and footer - remove unwanted plugins from your fan pages while leaving them active for your site. 35 39 * Include Facebook Comments by just enabling comments in our page 36 * Add a high converting "Fan Gate" shortcodes with an easy "pick n click" interface in the editor37 40 * Add Facebook Open Graph tags for easy Facebook integration 38 41 * Works with Facebook Timeline 39 40 == Upgrade to Fanpage Connect Pro == 41 42 Fanpage Connect Pro is an upgrade to Fanpage Connect that ads even more social marketing power to your WordPress powered fan pages. 43 44 Check out all the extra features you'll get with Fanpage Connect Pro: 45 46 * Disable "Link Luv" - remove branding for offline marketing or client pages 47 * Add your ClickBank ID to turn the "Link Luv" into a money making affiliate link 48 * Filter Removal for Header, content and Footer. Allows you to keep plugins from altering your content 49 * Redirect to a different URL after being "Liked" - even more Fan Gate control 50 * Opt-In form box and shortcode to easily add opt-in forms, videos or other custom content 51 * Hide Selections of Content for N days - good for one time offers, coupon codes after "like", etc 52 * Show your latest blog posts - by most recent, category, or custom posts 53 * Shortcode for Facebook Comments 54 * Shortcode for Facebook Like buttons (standard and short) 55 * Shortcode for Facebook Share button 56 * Shortcode for Facebook Send button 57 * Shortcode for the high conversion Multi-friend Inviter! 58 * Shortcode for Facebook Activity Feed 59 * Shortcode for Google Plus 1 button 60 * Full point n' click interface in the visual editor - no need to type your shortcodes 61 * Widgetized areas in the content and footer 62 * Extra templates with more released regularly 63 * Custom WordPress menus per page 64 * Fan Page URL & Open Graph Settings per page - host pages for your clients for even more cashflow 65 * Unlimited pages and NO monthly fees like those other guys! 66 67 For more information visit: <a href="http://www.fanpageconnect.com/pro" target="_blank">www.FanpageConnect.com/pro</a> 42 * Backwards compatible with legacy Fanpage Connect pages 43 44 To get started, simply install the plugin and follow the instructions on the Settings Page... 45 46 = Fanpage Connect Basics = 47 [youtube https://www.youtube.com/watch?v=YT0-4CdmKho] 68 48 69 49 == Installation == 70 50 71 51 1. Upload `fanpage-connect` directory to the `/wp-content/plugins/` directory 72 2. Activate the plugin through the `Plugins` menu in WordPress 52 2. Activate the plugin through the `Plugins` menu in WordPress. 73 53 3. Use any of the following shortcodes in your posts or pages: 74 54 Available Shortcodes: 75 55 76 [fbliked]Content viewable when the page is "liked" goes here[/fbliked]77 78 [fbnotliked]Content viewable when the page has NOT been "liked" goes here[/fbnotliked]79 80 [fbadmin]Content viewable only to page admins goes here.[/fbadmin]81 82 [font]Use any of 150+ Google Web Fonts in your pages!.[/font]56 **[fbliked]**Content viewable when the page is "liked" goes here**[/fbliked]** 57 58 **[fbnotliked]**Content viewable when the page has NOT been "liked" goes here**[/fbnotliked]** 59 60 **[fbadmin]**Content viewable only to page admins goes here.**[/fbadmin]** 61 62 **[font]**Use any of 150+ Google Web Fonts in your pages!**[/font]** 83 63 84 64 == Frequently Asked Questions == 85 65 86 66 = Is This Plugin Supported? = 87 Absolutely! Visit <a href="http://www.fanpageconnect.com" target="_blank">www.fanpageconnect.com</a> for support and tutorial videos, or visit our fan page at <a href="http://www.facebook.com/FanpageConnect" target="_blank">http://fb.me/FanpageConnect</a> 67 Absolutely! Visit <a href="http://www.fanpageconnect.com" target="_blank">www.fanpageconnect.com</a> for support and tutorial videos, or visit our fan page at <a href="http://www.facebook.com/FanpageConnect" target="_blank">http://fb.me/FanpageConnect</a>. You can also join our <a href="http://www.facebook.com/groups/FanpageConnectMastermind/" target="_blank">Fanpage Connect Mastermind Group</a> on Facebook for tips and tricks on maximizing your social media presence. 88 68 89 69 = Will this plugin work with my theme? = 90 Fanpage Connect works with ANY theme. It removes your active theme from any Facebook enabled page so it will fit nicely in the fan page iframe.70 Fanpage Connect works with ANY theme. It uses it's own templating system to fit properly into the Facebook iFrame format. 91 71 92 72 = Will this plugin work with BuddyPress? = … … 103 83 104 84 = Could this plugin get any more awesomer? = 105 Of course it can - we’re actively developing the plugin, so the next version will most likely have at least 35% more awesome. We’re also developing a premium version, and more info is at <a href="http://www.fanpageconnect.com/pro" target="_blank">www.fanpageconnect.com/pro</a>.85 Of course it can - we’re actively developing the plugin, so the next version will most likely have at least 65% more awesome - if that's even possible. We’ve also got a premium version. More info is at <a href="http://www.fanpageconnect.com/" target="_blank">www.fanpageconnect.com</a>. 106 86 107 87 = I installed the plugin, but my site doesn’t look any different in Facebook! = … … 109 89 110 90 == Screenshots == 111 1. The Fanpage Connect Meta Box. You'll see this on every page you edit. Selecting "Yes" enables that page for display in your Facebook fan page. 112 2. The Fanpage Connect Visual Editor Icon. You're just one click away from creating high converting fan gates, facebook social plugins, and eye popping Google Web Fonts! 113 3. The Fanpage Connect shortcode window. With a simple "pick n' click" interface, you can create dynamic fan pages in one or two clicks. 114 4. The Fanpage Connect font picker. Add some sizzle to your fan pages with the ability to embed your choice of over 150 Google Web Fonts in any size or color! 91 1. The Fanpage Connect App Menu. Create th elink to your Facebook fan page tab in WordPress, and your fan pages will use this info for interacting with Facebook's SDK. 92 2. The Fanpage Connect Fan Page Options Menu. 93 3. The Fanpage Connect CSS & Layout options - or at least *some* of it. There're too many options to show in one screenshot! 94 4. The Fanpage Connect font picker. Add some sizzle to your fan pages with the ability to embed your choice of over 500 Google Web Fonts in any size or color! 95 5. The Fanpage Connect shortcode menu for fan gates. 115 96 116 97 == Upgrade Notice == 117 98 118 * M inorupdates, please upgrade!99 * MAJOR updates, please upgrade! 119 100 120 101 == Changelog == 102 = 2.0 = 103 * COMPLETE code overhaul, and there are too many fixes/updates to mention. However, here are a few... 104 * Updated to most recent Facebook SDK 105 * Migrated fan pages to custom post types 106 * Added custom post type App 107 * Migrated template from plugin to separate template file. 108 * Updated template layout to handle sidebars, header, footer and widgets 109 * Revamped the CSS files 110 * Streamlined all the JS 111 * Deprecated the Multi-Friend Inviter 112 * Added header/content/footer filters 113 121 114 = 1.4.6 = 122 * Update for facebook timeline format. 115 * Update for facebook timeline format. 123 116 124 117 = 1.4.5 =
Note: See TracChangeset
for help on using the changeset viewer.