';
}
return $renderExt;
}
function password($pw) {
global $userPassword;
if ("$userPassword" == "$pw") {
echo '';
return true;
}
else {
echo "
";
if ($userPassword == "")
echo "This section is protected. To view it, enter the correct password.";
else
echo "The password you entered is incorrect! Please try again.";
?>
$object){
ob_start(); // These ob_lines will prevent output of actual HTML (the function already does this?!)
require "$file";
$blogentry->includeFile = $file;
//echo "";
ob_end_clean(); // Enable output, drop cached
//array_push($posts, $blogentry);
$posts[$blogentry->file] = $blogentry;
}
# Create list of columns relevant for sorting
$sort = array();
foreach($posts as $k=>$v) {
$sort['ctime'][$k] = $v->ctime;;
// $sort['author'][$k] = $v->author;
}
// Now sort the entries
// Multiple keys: array_multisort($sort['author'], SORT_ASC, $sort['title'], SORT_ASC,$posts);
array_multisort($sort['ctime'], SORT_DESC, $posts);
}
// Store to cache
apcu_store('posts', $posts, CACHE_POSTS_TTL);
$CMS_INDEXING = false;
}
if (!isset($CMS_RSS))
echo "";
if (isset($postUrl)) { // Display post
$CMS_SINGLE_POST = true;
echo '
';
// Header is rendered in renderPost()
require $postUrl; // This will render the body
//if ($blogentry->isPublic) { // Render the blog footer
//echo "
Written by $blogentry->author
";
renderFooter();
//}
echo '
';
}
else {
//echo "
Blog posts
";
if (isset($tagSearch)) {
echo "
Archive for '$tagSearch'
";
if (RSS_ENABLED) {
echo '
';
}
echo '
';
$pageTitle = "Archive for '$tagSearch'";
}
if (isset($CMS_RSS) && RSS_SHOW_FULL) {
$CMS_SINGLE_POST = true;
}
$i = 0;
$morePosts = 0;
foreach($posts as $k=>$v) {
if ($v->isPublic) {
if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) {
if ($i++ >= $postsSkip) {
if (isset($CMS_RSS)) {
if (!isset($latestDisplayedPost)) {
$latestDisplayedPost = $v->ctime;
}
echo '' . $v->title . 'includeFile;
renderFooter();
echo ']]>
permalink . ']]>
permalink . ']]>' . date(RSS_DATE_FORMAT, $v->ctime) . '' . $v->author . '';
} else {
echo '