diff --git a/e107_plugins/facebook/admin_config.php b/e107_plugins/facebook/admin_config.php new file mode 100644 index 000000000..00abe1b34 --- /dev/null +++ b/e107_plugins/facebook/admin_config.php @@ -0,0 +1,64 @@ +runObservers(true); + +require_once(e_ADMIN."auth.php"); + +/* + * Send page content + */ +e107::getAdminUI()->runPage(); + +require_once(e_ADMIN."footer.php"); + +/* OBSOLETE - see admin_shortcodes::sc_admin_menu() +function admin_config_adminmenu() +{ + //global $rp; + //$rp->show_options(); + e107::getRegistry('admin/release_dispatcher')->renderMenu(); +} +*/ + +/* OBSOLETE - done within header.php +function headerjs() // needed for the checkboxes - how can we remove the need to duplicate this code? +{ + return e107::getAdminUI()->getHeader(); +} +*/ +?> \ No newline at end of file diff --git a/e107_plugins/facebook/e_header.php b/e107_plugins/facebook/e_header.php new file mode 100644 index 000000000..a724d28d4 --- /dev/null +++ b/e107_plugins/facebook/e_header.php @@ -0,0 +1,65 @@ + +
Login with Facebook
+ +
+ '); + + + window.fbAsyncInit = function() { + FB.init({ + appId : '{$fbPref['appId']}', + status : true, + cookie : true, + xfbml : true, + oauth : true + + }); + }; + + $.ajax({ + type: "GET", + url: document.location.protocol + '//connect.facebook.net/en_US/all.js' , +// success: callback, + dataType: "script", + cache: true + }); +}); +EOT; + + +$core = ""; + +$perms = "email"; + +$code = <<Login with Facebook"; + + +// e107::js('inline',$code,'jquery',3); + +?> \ No newline at end of file diff --git a/e107_plugins/facebook/e_shortcode.php b/e107_plugins/facebook/e_shortcode.php new file mode 100644 index 000000000..4ff85576f --- /dev/null +++ b/e107_plugins/facebook/e_shortcode.php @@ -0,0 +1,25 @@ +Login with Facebook"; + } + + + } + +} +?> \ No newline at end of file diff --git a/e107_plugins/facebook/includes/admin.php b/e107_plugins/facebook/includes/admin.php new file mode 100644 index 000000000..64cd8e963 --- /dev/null +++ b/e107_plugins/facebook/includes/admin.php @@ -0,0 +1,69 @@ + array( + 'controller' => 'plugin_facebook_admin_ui', + 'path' => null, + 'ui' => 'plugin_facebook_admin_form_ui', + 'uipath' => null + ) + ); + + protected $adminMenu = array( + 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'), + ); + + protected $adminMenuAliases = array( + 'main/edit' => 'main/list' + ); + + /** + * Navigation menu title + * @var string + */ + protected $menuTitle = 'facebook Menu'; +} + +class plugin_facebook_admin_ui extends e_admin_ui +{ + // required + protected $pluginTitle = "e107 facebook"; + protected $pluginName = 'facebook'; + // protected $table = "facebook"; + + + // optional, if $pluginName == 'core', core prefs will be used, else e107::getPluginConfig($pluginName); + protected $prefs = array( + 'appId' => array('title'=> 'Facebook AppId', 'type'=>'text', 'data' => 'string', 'validate' => true), + 'appSecret' => array('title'=> 'Facebook AppSecret', 'type'=>'text', 'data' => 'string', 'validate' => true), + + // 'xfbml' => array('title'=> 'xfbml', 'type' => 'boolean', 'data' => 'int'), + // 'oauth' => array('title'=> 'oAuth', 'type' => 'boolean', 'data' => 'int') + ); + + // optional + public function init() + { + } +} + +class plugin_facebook_admin_form_ui extends e_admin_form_ui +{ + +}