Exemple #1
0
<?php

require './bb-load.php';
bb_repermalink();
$bb_db_override = false;
do_action('bb_index.php_pre_db');
if (isset($_GET['new']) && '1' == $_GET['new']) {
    $forums = false;
} elseif (!$bb_db_override) {
    $forums = bb_get_forums();
    // Comment to hide forums
    if ($topics = get_latest_topics(false, $page)) {
        bb_cache_last_posts($topics);
    }
    if ($super_stickies = get_sticky_topics()) {
        bb_cache_last_posts($super_stickies);
    }
}
bb_load_template('front-page.php', array('bb_db_override', 'super_stickies'));
Exemple #2
0
<?php

require_once './bb-load.php';
$forum_id = 0;
bb_repermalink();
if (!$forum) {
    bb_die(__('Forum not found.'));
}
$bb_db_override = false;
do_action('bb_forum.php_pre_db', $forum_id);
if (!$bb_db_override) {
    if ($topics = get_latest_topics($forum_id, $page)) {
        bb_cache_last_posts($topics);
    }
    if ($stickies = get_sticky_topics($forum_id, $page)) {
        bb_cache_last_posts($stickies);
    }
}
bb_load_template('forum.php', array('bb_db_override', 'stickies'), $forum_id);