Example #1
0
require BASEDIR . '/fpb-includes/toolbar.php';
ob_start();
/**
 * The 'head_load' hook is executed when we build up the content in <head>
 * @see Hooks
 */
Plugins::RunHook('head_load');
fpb_toolbar_head();
$head_contents = ob_get_contents();
ob_clean();
$smarty->assign('head', $head_contents);
$smarty->assign('title', $page_title);
$smarty->assign('site_slogan', $config["GlobalSlogan"]);
$smarty->assign('site_name', $config["GlobalName"]);
$smarty->assign('fb_login_button', $fb_helper->FBLoginButton());
$smarty->assign('fb_root', $fb_helper->FBInitDiv());
// And now we can figure out what we're doing!
/**
 * The 'pre_action' hook runs just before we figure out what action we will be taking
 * @see Hooks
 */
Plugins::RunHook('pre_action');
$full_action_requested = $_SERVER['REQUEST_URI'];
ob_start();
/**
 * The 'body_pre_action' hook runs in an output buffer before the body action is performed
 * @see Hooks
 */
Plugins::RunHook('body_pre_action');
if (preg_match("|/(?<year>[0-9]{4})/(?<month>[0-9]{2})/(?<day>[0-9]{2})/(?<title>[-A-Za-z0-9_]*)/?\$|", $full_action_requested, $action_parts) != 0) {
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {