14 require_once(CH_DIRECTORY_PATH_INC .
'db.inc.php');
15 require_once(CH_DIRECTORY_PATH_INC .
'params.inc.php');
16 require_once(CH_DIRECTORY_PATH_INC .
'design.inc.php');
17 require_once(CH_DIRECTORY_PATH_CLASSES .
'ChWsbPageView.php');
35 parent::__construct(
'forums_index');
50 parent::__construct(
'forums_home');
57 'base_url_forum' =>
$GLOBALS[
'gConf'][
'url'][
'base'],
59 return array($oTemplate->parseHtmlByName(
'search_block.html',
$aVars));
66 $s =
'<div class="forums_index_short">';
67 $ac =
$GLOBALS[
'f']->fdb->getCategs();
69 $s .=
'<div class="forums_index_short_cat ch-def-font-large"><a href="' .
$gConf[
'url'][
'base'] . sprintf(
$gConf[
'rewrite'][
'cat'], $c[
'cat_uri'], 0) .
'" onclick="return f.selectForumIndex(\'' . $c[
'cat_uri'] .
'\')
">'. $c['cat_name'] .'</a></div>';
70 $af = $GLOBALS['f']->fdb->getForumsByCatUri (filter_to_db($c['cat_uri']));
72 $s .= '<div class="forums_index_short_forum ch-def-padding-sec-left
"><a href="' . $gConf['url
']['base
'] . sprintf($gConf['rewrite
']['forum
'], $ff['forum_uri
'], 0) . '" onclick="return f.selectForum(\
'' . $ff[
'forum_uri'] .
'\', 0)
">' . $ff['forum_title'] . '</a></div>';
78 function getBlockCode_RecentTopics()
80 return $this->sMarker;
85 global $_page, $glHeader, $glFooter, $logged, $_ni;
87 $GLOBALS['name_index'] = $_page['name_index'] = 55;
89 $_page['header'] = $gConf['def_title'];
90 $_page['header_text'] = $gConf['def_title'];
92 $_ni = $_page['name_index'];
93 $_page_cont[$_ni]['page_main_code'] = '-=++=-';
97 $sCssPathUrl = ch_ltrim_str($gConf['url']['css'], CH_WSB_URL_ROOT);
98 $sCssPathDir = ch_ltrim_str("{
$gConf[
'dir'][
'layouts']}{
$gConf[
'skin']}/css/
", CH_DIRECTORY_PATH_ROOT);
101 $sJsPathUrl = ch_ltrim_str($gConf['url']['js'], CH_WSB_URL_ROOT);
102 $sJsPathDir = ch_ltrim_str($gConf['dir']['js'], CH_DIRECTORY_PATH_ROOT);
103 $GLOBALS['oSysTemplate']->addJs (array(
115 $GLOBALS['ChWsbTemplateInjections']['page_'.$_ni]['injection_body'][] = array('type' => 'text', 'data' => 'id="body
" onload="if(!
document.body) {
document.body =
document.getElementById(\
'body\'); }; h = new ChHistory(\'' .
$gConf[
'url'][
'base'] .
'\');
document.h = h;
return h.init(\
'h\'); "');
118 $aVars = array (
'ForumBaseUrl' =>
$gConf[
'url'][
'base']);
119 $GLOBALS[
'oTopMenu']->setCustomSubActions(
$aVars,
'ch_forum_title',
false);
125 $sEditorId = isset(
$_REQUEST[
'new_topic']) ?
'#tinyEditor' :
'#fakeEditor';
127 if (
'sys_tinymce' == $oEditor->getObjectName())
128 $oEditor->setCustomConf(
'setup :
130 ed.on("init", function(e) {
131 if ("undefined" === typeof(glOrcaSettings))
132 glOrcaSettings = tinyMCE.activeEditor["settings"];
133 orcaInitInstance(ed);
136 $sEditor .= $oEditor->attachEditor ($sEditorId,
CH_EDITOR_FULL) .
'<div id="fakeEditor" style="display:none;"></div>';