Beispiel #1
0
            }
            $t->assign(array('FORUMS_SECTIONS_ROW_SUBITEMS' => is_array($nxtlvl[$y]) && $cfg['forums']['cat_' . $y]['defstate'] ? 1 : 0, 'FORUMS_SECTIONS_ROW_ACTIVITY' => cot_rc('forums_icon_section_activity', array('secact_num' => $secact_num)), 'FORUMS_SECTIONS_ROW_ACTIVITYVALUE' => $secact_num, 'FORUMS_SECTIONS_ROW_VIEWERS' => $cot_sections_vw_cur, 'FORUMS_SECTIONS_ROW_ODDEVEN' => cot_build_oddeven($yy), 'FORUMS_SECTIONS_ROW_NUM' => $yy));
            /* === Hook - Part2 : Include === */
            foreach ($extps as $pl) {
                include $pl;
            }
            /* ===== */
            $t->parse('MAIN.FORUMS_SECTIONS.CAT.SECTION');
        }
    }
    $xx++;
    $fold = !$cfg['forums']['cat_' . $x]['defstate'];
    if ($c) {
        $fold = (int) ($c == 'fold' ? true : ($c == 'unfold' ? false : ($c == $x ? false : true)));
    }
    $t->assign(cot_generate_sectiontags($x, 'FORUMS_SECTIONS_ROW_', $cat_top[$x]));
    $t->assign(array('FORUMS_SECTIONS_ROW_FOLD' => $fold, 'FORUMS_SECTIONS_ROW_SUBITEMS' => is_array($nxtlvl[$x]) ? 1 : 0, 'FORUMS_SECTIONS_ROW_ODDEVEN' => cot_build_oddeven($xx), 'FORUMS_SECTIONS_ROW_NUM' => $xx));
    /* === Hook - Part2 : Include === */
    foreach ($extp as $pl) {
        include $pl;
    }
    /* ===== */
    $t->parse('MAIN.FORUMS_SECTIONS.CAT');
}
$t->parse('MAIN.FORUMS_SECTIONS');
/* === Hook === */
foreach (cot_getextplugins('forums.sections.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
Beispiel #2
0
require_once $cfg['system_dir'] . '/header.php';
$mskin = cot_tplfile(array('forums', 'topics', $structure['forums'][$s]['tpl']));
$t = new XTemplate($mskin);
$arraychilds = cot_structure_children('forums', $s, false, false);
if (count($arraychilds) > 0) {
    /* === Hook - Part1 : Set === */
    $extp = cot_getextplugins('forums.topics.sections.loop');
    /* ===== */
    $jj = 0;
    foreach ($arraychilds as $cat) {
        $jj++;
        $all = cot_structure_children('forums', $cat);
        $last = $db->query("SELECT fs_lt_id, fs_lt_title, fs_lt_date, fs_lt_posterid, fs_lt_postername FROM {$db_forum_stats}\n\t\t\t\tWHERE fs_cat IN (\"" . implode('", "', $all) . "\") ORDER BY fs_lt_date DESC LIMIT 1")->fetch();
        $stat = $db->query("SELECT SUM(fs_topiccount) AS topiccount, SUM(fs_postcount) AS postcount, SUM(fs_viewcount) AS viewcount\n\t\t\t\tFROM {$db_forum_stats}\n\t\t\t\tWHERE fs_cat IN (\"" . implode('", "', $all) . "\") ORDER BY fs_lt_date DESC LIMIT 1")->fetch();
        $last = is_array($last) && is_array($stat) ? $stat + $last : '';
        $t->assign(cot_generate_sectiontags($cat, 'FORUMS_SECTIONS_ROW_', $last));
        $t->assign(array('FORUMS_SECTIONS_ROW_ODDEVEN' => cot_build_oddeven($jj), 'FORUMS_SECTIONS_ROW_NUM' => $jj));
        /* === Hook - Part2 : Include === */
        foreach ($extp as $pl) {
            include $pl;
        }
        /* ===== */
        $t->parse('MAIN.FORUMS_SECTIONS.FORUMS_SECTIONS_ROW_SECTION');
    }
    $t->parse('MAIN.FORUMS_SECTIONS');
}
$where = is_array($where) ? $where : array();
$where['cat'] = 'ft_cat=' . $db->quote($s);
$where['admin'] = $usr['isadmin'] ? '' : "(ft_mode=0 OR (ft_mode=1 AND ft_firstposterid=" . (int) $usr['id'] . "))";
$order = "ft_sticky DESC, ft_{$o} {$w}";
$join_columns = '';