/** * WoWRoster.net WoWRoster * * @copyright 2002-2011 WoWRoster.net * @license http://www.gnu.org/licenses/gpl.html Licensed under the GNU General Public License v3. * @version SVN: $Id$ * @link http://www.wowroster.net * @package News */ if (!defined('IN_ROSTER')) { exit('Detected invalid access to this file!'); } if (!$roster->auth->getAuthorized($addon['config']['forum_start_topic'])) { echo $roster->auth->getLoginForm($addon['config']['forum_start_topic']); return; //To the addon framework } include $addon['dir'] . 'inc/function.lib.php'; $functions = new forum(); $x = $functions->getCrumbsa($_GET['id']); // Assign template vars $roster->tpl->assign_vars(array('S_ADD_TOPIC' => false, 'CRUMB' => $x, 'U_BACK' => makelink('guild-forum'), 'S_HTML_ENABLE' => false, 'S_TOPIC_HTML' => $addon['config']['forum_html_posts'], 'S_POSTER' => $_COOKIE['roster_user'], 'S_TOPIC_ACCESS' => $roster->auth->rosterAccess(array('name' => 'access', 'value' => '0')), 'U_FORMACTION' => makelink('guild-forum-forum&id=' . $_GET['id']))); if ($addon['config']['forum_html_posts'] >= 0) { $roster->tpl->assign_var('S_HTML_ENABLE', true); } if ($addon['config']['forum_nicedit'] > 0) { roster_add_js('js/nicEdit.js'); roster_add_js('bkLib.onDomLoaded(function() { nicEditors.allTextAreas({xhtml : true, fullPanel : true, iconsPath : \'' . $roster->config['img_url'] . 'nicEditorIcons.gif\'}) });', 'inline', 'header', false, false); } $roster->tpl->set_filenames(array('topic' => $addon['basename'] . '/topic_new.html')); $roster->tpl->display('topic');
<?php //$addon = getaddon('forum'); include $addon['dir'] . 'inc/function.lib.php'; $functions = new forum(); //roster_add_css(ROSTER_BASE . 'pages/forum/style.css','module'); //$view->extend('forum/forum_template', 'content', array('title' => $view->lang->get('forum')->get('forums'))); // $forums = $functions->getForums(); $x = $functions->getCrumbsa(''); $roster->tpl->assign_vars(array('CRUMB' => $x)); /* echo '<pre>'; print_r($forums); echo '</pre>'; */ foreach ($forums as $parent_id => $forum) { if ($roster->auth->getAuthorized($forum['access'])) { $roster->tpl->assign_block_vars('forums', array('FORUM_ID' => $forum['forumid'], 'LOCKED' => $forum['locked'], 'TITLE' => $forum['title'])); } foreach ($forum['forums'] as $forum_id => $data) { if ($roster->auth->getAuthorized($data['access'])) { $is_read = false; //$functions->get_topic_tracking($forum['forum_id'], $forum['topicid'], $forum['r_date']); $icon = ''; if (!empty($data['icon'])) { if (file_exists($roster->config['img_url'] . 'class/' . $data['icon'] . '.png')) { $icon = $roster->config['img_url'] . 'class/' . $data['icon'] . '.png'; } else { if (remoteFileExists($roster->config['interface_url'] . 'Interface/Icons/' . $data['icon'] . '.png')) { $icon = $roster->config['interface_url'] . 'Interface/Icons/' . $data['icon'] . '.png';