} return $nav . "</ul></div>" . $div; } $allowComment = true; if (!$isAjax) { $this->need('header.php'); ?> <div id="container" class="clearfix"> <main id="main" role="main"> <article class="hentry page"> <header class="entry-header"><h1 class="entry-title"><?php $this->title(); ?> </h1></header> <?php $fields = MyTypechoTheme_Plugin::getField($this->cid); $type = isset($fields['type']) ? $fields['type'] : NULL; if ($type == "archive") { $allowComment = false; $page = MyTypechoTheme_Plugin::$_cache[0]["p_archive"]; if (!$page) { $page = OutputArchives($this->db, $this->options); MyTypechoTheme_Plugin::setcache("p_archive", $page); } echo "<div class=\"entry-content\">"; echo "<ul class=\"archives-list\">"; echo $page; echo "</ul>"; echo "</div>"; } elseif ($type == "readers") { $page = MyTypechoTheme_Plugin::$_cache[0]["p_readers"];
function FeaturedSlider() { if (isset(MyTypechoTheme_Plugin::$_cache[0]["featured"])) { return MyTypechoTheme_Plugin::$_cache[0]["featured"]; } if (empty(MyTypechoTheme_Plugin::$_options->featured)) { return false; } $posts = MyTypechoTheme_Plugin::matchPost(@explode("\n", str_replace("\r", "", MyTypechoTheme_Plugin::$_options->featured))); if (empty($posts)) { return false; } $output = ""; $counter = 1; foreach ($posts as $cid => $post) { //Field $thumb = MyTypechoTheme_Plugin::getField($cid, 'featured'); if (empty($thumb)) { $thumb = scaleThumb($post[2], 960, 290); } if ($thumb) { $output .= '<li class="slide-' . $counter . '"><a href="' . $post[1] . '"><img src="' . $thumb . '" alt="' . $post[0] . '" /></a></li>'; } } MyTypechoTheme_Plugin::setcache("featured", $output); return $output; }