} # Cannot be done as part of handler due to scoping issues when include done in function if ($action == 'blogitupgrade' && bi_Auth('blogit-admin')) { include_once $bi_Paths['convert']; } if (bi_Auth('*')) { $EnablePostCaptchaRequired = 0; } #disable captcha for any BlogIt user # ---------------------------------------- # - Javascript - [1] SDVA($HTMLHeaderFmt, array('jquery-ui.css' => '<link rel="stylesheet" href="' . $PubDirUrl . '/blogit/jquery-ui/ui-lightness/jquery-ui.custom.css" type="text/css" />', 'jquery.validity.css' => '<link rel="stylesheet" href="' . $PubDirUrl . '/blogit/jquery.validity.css" type="text/css" />', 'blogit.css' => '<link rel="stylesheet" href="' . $PubDirUrl . '/blogit/blogit.css" type="text/css" />')); SDVA($HTMLFooterFmt, array('jquery.js' => '<script type="text/javascript" src="' . $PubDirUrl . '/blogit/jquery.min.js"></script>', 'jquery-ui.js' => '<script type="text/javascript" src="' . $PubDirUrl . '/blogit/jquery-ui.custom.min.js"></script>', 'jquery.validity.js' => '<script type="text/javascript" src="' . $PubDirUrl . '/blogit/jquery.validity.pack.js"></script>', 'jquery.showmessage.js' => '<script type="text/javascript" src="' . $PubDirUrl . '/blogit/jquery.showmessage.min.js"></script>', 'blogit.js' => '<script type="text/javascript" src="' . $PubDirUrl . '/blogit/blogit.js"></script>', 'blogit-core' => '<script type="text/javascript"> BlogIt.pm["pubdirurl"]="' . $PubDirUrl . '/blogit"; BlogIt.pm["categories"]="' . bi_CategoryList() . '"; BlogIt.fmt["entry-date"]=/^' . bi_DateFmtRE(XL('%d-%m-%Y %H:%M')) . '$/;' . "\n" . 'BlogIt.pm["skin-classes"]=' . bi_json_encode($bi_SkinClasses) . ';' . "\n" . 'BlogIt.pm["charset"]="' . $Charset . '";' . "\n" . 'BlogIt.pm["ajax-message-timer"]=' . $bi_AjaxMsgTimer . ';' . "\n" . bi_JXL() . "\n" . '</script>')); # ---------------------------------------- # - RSS Config #if ($bi_RSSEnabled == 'true') $HTMLHeaderFmt['feedlinks'] = '<link rel="alternate" type="application/rss+xml" title="$WikiTitle" href="$ScriptUrl?n=' .$bi_Pages['rss'] .'?action=rss" />'; #TODO: Add blogid if (!isset($feedUrl) || $feedUrl == "") { $feedUrl = '$ScriptUrl?n=' . $bi_Pages['rss'] . '?action=rss'; } if ($bi_RSSEnabled == 'true') { $HTMLHeaderFmt['feedlinks'] = '<link rel="alternate" type="application/rss+xml" title="$WikiTitle" href="$feedUrl" />'; } if ($bi_RSSEnabled == 'true' && $action == 'rss' && $bi_Pagename == $bi_Pages['rss']) { #add url parameter of $:blogid=xxx to restrict to a specific blog if ($bi_DisplayFuture == 'false') { SDV($_REQUEST['if'], 'date ..@{$Now} @{$:entrydate}'); } SDVA($_REQUEST, array('order' => '-$:entrydate', 'group' => '*', 'count' => $bi_RSSPerPage, '$:entrytype' => 'blog', '$:entrystatus' => '-draft'));
$FmtPV['$bi_BlogId'] = '"' . bi_Clean('word', $_GET['blogid']) . '"'; } // Cannot be done as part of handler due to scoping issues when include done in function if ($action == 'blogitupgrade' && bi_Auth('blogit-admin')) { include_once $bi_Paths['convert']; } $bi_AuthUser = bi_Auth('*'); //Disable captcha for admins and ajax type calls if ($bi_AuthUser && (!$bi_Internal['dev'] || $FmtPV['$bi_Mode'] == 'ajax' || $action == 'bi_ne' || $action == 'bi_be' || $action == 'pmform' || $action == 'edit')) { $rc_Settings['enabled'] = $bi_ReCaptchaEnabled = $EnablePostCaptchaRequired = 0; } //only use captcha for comment post, and for any BlogIt user not in dev mode // ---------------------------------------- // - Javascript - [1] SDVA($HTMLHeaderFmt, array('jbox.css' => '<link rel="stylesheet" href="' . $FarmPubDirUrl . '/blogit/jbox.css" type="text/css" />', 'awesomplete.css' => '<link rel="stylesheet" href="' . $FarmPubDirUrl . '/blogit/awesomplete.css" type="text/css" />', 'blogit.css' => '<link rel="stylesheet" href="' . $FarmPubDirUrl . '/blogit/blogit.min.css" type="text/css" />')); SDVA($HTMLFooterFmt, array('jquery.js' => '<script type="text/javascript" src="' . $FarmPubDirUrl . '/blogit/jquery.min.js"></script>', 'validate.js' => '<script type="text/javascript" src="' . $FarmPubDirUrl . '/blogit/jquery.validate.min.js"></script>', 'jbox.js' => '<script type="text/javascript" src="' . $FarmPubDirUrl . '/blogit/jbox.min.js"></script>', 'awesomplete.js' => '<script type="text/javascript" src="' . $FarmPubDirUrl . '/blogit/awesomplete.min.js"></script>', 'blogit.js' => '<script type="text/javascript" src="' . $FarmPubDirUrl . '/blogit/blogit.' . ($bi_Internal['dev'] ? '' : 'min.') . 'js"></script>', 'blogit-core' => '<script type="text/javascript">' . 'BlogIt.pm["pubdirurl"]="' . $FarmPubDirUrl . '/blogit";' . 'BlogIt.pm["categories"]="' . bi_CategoryList() . '";' . 'BlogIt.fmt["entry-date"]=/^' . bi_DateFmtRE(XL('%d-%m-%Y %H:%M')) . '$/;' . 'BlogIt.pm["skin-classes"]=' . bi_json_encode($bi_SkinClasses) . ';' . 'BlogIt.pm["charset"]="' . $Charset . '";' . 'BlogIt.pm["ajax-message-timer"]=' . $bi_AjaxMsgTimer . ';' . bi_JXL() . '</script>')); // ---------------------------------------- // - RSS Config if ($bi_RSSEnabled == 'true') { $HTMLHeaderFmt['feedlinks'] = '<link rel="alternate" type="application/rss+xml" title="$WikiTitle" href="$ScriptUrl?n=' . $bi_Pages['rss'] . '?action=rss" />'; } //TODO: Add blogid if ($bi_RSSEnabled == 'true' && $action == 'rss' && $bi_Pagename == $bi_Pages['rss']) { //add url parameter of $:blogid=xxx to restrict to a specific blog if ($bi_DisplayFuture == 'false') { SDV($_REQUEST['if'], 'date ..@{$Now} @{$:entrydate}'); } SDVA($_REQUEST, array('order' => '-$:entrydate', 'group' => '*', 'count' => $bi_RSSPerPage, '$:entrytype' => 'blog', '$:entrystatus' => '-draft')); SDVA($FeedFmt['rss']['feed'], array('title' => $WikiTitle, 'description' => $WikiTag, 'link' => '{$PageUrl}?action=rss')); SDVA($FeedFmt['rss']['item'], array('author' => 'bi_GetPageVar', 'link' => '{$PageUrl}?when=$ItemISOTime', 'title' => '{$Group} / {$Title}', 'dc:date' => 'bi_GetPageVar', 'pubDate' => 'bi_GetPageVar', 'description' => 'bi_FeedText')); include_once $bi_Paths['feeds'];