$topics = Templates::getVar('topics'); ?> <h1><?php echo $forum->getTitle(); ?> </h1> <div id="forum"> <div class="topics"> <?php if (count($topics) == 0) { ?> <div class="nothing"> <h2><?php echo ForumT::get('no_topics'); ?> </h2> </div> <?php } foreach ($topics as $topic) { ?> <div class="topic"> <div class="icon"><img src="<?php echo Templates::getThemeURL(); ?> images/icons/topics/<?php echo $forum->getIcon(); ?>
<?php require 'base.php'; require LANGS . 'ForumT.php'; ForumT::init(); $topic = ForumTopic::fromID((int) $_GET['id']); if (!$topic instanceof ForumTopic) { echo ErrorMessage::setText(ForumT::get('topic_doesnt_exist'), true); } $forum = $topic->getForum(); $posts = $topic->getPosts(Config::get('max_posts_perpage'), max((int) $_GET['page'], 1)); Templates::assignVars(array('forum' => $forum, 'topic' => $topic, 'posts' => $posts['posts'], 'pages' => $posts['pages'])); PluginHelper::delegate('__onPageDisplay', array($page)); Templates::display('viewtopic');