function au_blog_sidebar_about() { // We need $setting for this global $setting; // Check if our about section is empty if ($setting['blog_about'] == '') { return false; } // Otherwise we are ready to go return au_sidebar_block(BLOG_ABOUT, 'info', au_parse_blog($setting['blog_about'])); }
function au_template_blog_preview() { // Our template needs the big $aulis global $aulis; // Let's make this thing shorter $e = $aulis['blog_entry']; // If our blog has no seperate intro text, it is the same as the whole blog if ($e->blog_intro == '' and $e->blog_content != '') { $e->blog_intro = $e->blog_content; } else { if ($e->blog_intro == '' and $e->blog_content == '') { return au_error_box(BLOG_EMPTY); } } // We might have to highlight stuff if (isset($_GET['search'])) { // Explode the search string, so that we can highlight every word seperatly $exploded_search = explode(' ', $aulis['blog_search']); // Each word needs to be highlighted in blog_name and blog_intro foreach ($exploded_search as $keyword) { $e->blog_name = au_highlight($keyword, $e->blog_name, "<span class='highlight'>", "</span>"); $e->blog_intro = au_highlight($keyword, $e->blog_intro, "<span class='highlight'>", "</span>"); } } // The href to the blog entry page $href = au_blog_url($aulis['blog_url_input']); // The heading au_out("<h1><a href='" . $href . "'>" . $e->blog_name . "</a></h1>", true, 'blog_entries'); // The sub heading with time and catergory au_out("<span class='sub'>" . au_icon('category', 12) . ' ' . sprintf(BLOG_POSTED_IN, "<a href='" . au_blog_url(array('app' => 'blogindex', 'category' => $e->blog_category, 'category_name' => $e->category_name)) . "'>" . $e->category_name . "</a>") . "\n\t\t " . au_icon('clock', 12) . ' ' . au_date($e->blog_date) . "</span>", true, 'blog_entries'); // The content au_out("<p>" . au_parse_blog($e->blog_intro, $e->blog_parse_mode) . "</p>", true, 'blog_entries'); // Comments bar! au_out('<div class="comments_bar"><a href="' . $href . '#comments">' . au_icon('comment', 12) . ' ' . ($aulis['blog_comment_count'] == 0 ? BLOG_NO_COMMENTS : $aulis['blog_comment_count'] . ' ' . ($aulis['blog_comment_count'] > 1 ? BLOG_COMMENTS : BLOG_COMMENT)) . '</a> | <a href="' . $href . '">' . au_icon('lamp', 12) . ' ' . BLOG_READMORE . '</a></div>', $e->blog_can_comment == 1, 'blog_entries'); // We need this for the output $blog_preview = ''; // Finish the output into $aulis['page']['blog_preview'] foreach ($aulis['page']['blog_entries'] as $entry) { $blog_preview .= $entry; } // Transfer the output au_out($blog_preview, true, 'blog_preview'); // Ready for the next one unset($aulis['blog']['entry'], $aulis['page']['blog_entries']); }
function au_template_blog_entry() { // Our template needs the big $aulis global $aulis; // Let's make this thing shorter $e = $aulis['blog']['entry']; // The href to the blog entry page $href = au_blog_url($aulis['blog']['url_input']); // The wrapper au_out("<div class='blog_full_wrapper'>"); // The heading au_out("<h1><a href='" . $href . "'>" . $e->blog_name . "</a></h1>"); // The sub heading with time and catergory au_out("<span class='sub'><a class='icon i-category i-12'></a> " . sprintf(BLOG_POSTED_IN, "<a href='" . au_url("?app=blogindex&category=" . $e->blog_category) . "'>" . $e->category_name . "</a>") . "\n\t\t <a class='icon i-clock i-12'></a> " . au_date($e->blog_date) . "</span>"); // The content au_out("<p>" . au_parse_blog($e->blog_content) . "</p>"); // Ending the wrapper au_out("</div>"); // Ready for the next one unset($aulis['blog']['entry']); }