Exemple #1
0
 public static function get($key)
 {
     $string = self::$strings[$key];
     if (!isset($string)) {
         if (!isset(self::$stringsEN)) {
             self::$stringsEN = parent::getStrings(substr(__CLASS__, 0, strlen(__CLASS__) - 1), parent::LANG_EN);
         }
         return self::$stringsEN[$key];
     }
     return $string;
 }
Exemple #2
0
$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();
    ?>
Exemple #3
0
<?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');