public static function InstallPlugin($_plugin_yaml_file) { $this_plugin = Spyc::YAMLLoad(BASEDIR . '/fpb-content/plugins/' . $_plugin_yaml_file); foreach (Plugins::Instance()->_plugin_data as $plugin) { if (strtoupper($plugin['PluginName']) == strtoupper($this_plugin['PluginName'])) { return; } } array_push(Plugins::Instance()->_plugin_data, $this_plugin); FPBDatabase::Instance()->SetConfigElement('Plugins', serialize(Plugins::Instance()->_plugin_data)); }
function FPB_Debugger_RenderDebugDiv() { global $smarty; $var_dump = print_r($_SESSION, true); $var_dump .= print_r($_REQUEST, true); $var_dump .= print_r($_COOKIE, true); $plugins = print_r(Plugins::Instance()->PluginData(), true); $user = print_r(FPBAuth::GetInstance()->GetUser(), true); $debug_contents = <<<HTML <hr/> <pre> {$var_dump} </pre> <pre> {$plugins} </pre> <pre> {$user} </pre> HTML; $smarty->assign('debug', $debug_contents); }
/** * @package FacePress * @version $Id$ * @copyright (c) 2010 JiffSoft * @license http://www.gnu.org/licenses/gpl.html GNU General Public License v3 */ // load up the required classes require BASEDIR . '/fpb-includes/smarty/Smarty.class.php'; require BASEDIR . '/fpb-includes/auth.php'; require BASEDIR . '/fpb-includes/database.php'; require BASEDIR . '/fpb-includes/functions.php'; require BASEDIR . '/fpb-includes/fbhelper.php'; require BASEDIR . '/fpb-includes/spyc.php'; require BASEDIR . '/fpb-includes/plugins.php'; Plugins::Instance()->Load(); $config = FPBDatabase::Instance()->GetConfigArray(); /** * The 'core_loaded' hook is executed after we load up the classes and templates, * prior to any other code being executed * @see Hooks */ Plugins::RunHook('core_loaded'); $fb_helper = new FacebookHelper(); FPBAuth::GetInstance()->CheckFBStatus(); /** * The 'auth_completed' hook is executed after the authentication module has run * @see Hooks */ Plugins::RunHook('auth_completed'); $site_theme = strlen($config["Theme"]) > 0 ? $config["Theme"] : 'coolblue';