Ejemplo n.º 1
0
    $display .= PLG_showCenterblock(3, $page, $topic);
    // bottom blocks
    // Print Google-like paging navigation
    if (!isset($_CONF['hide_main_page_navigation']) || $_CONF['hide_main_page_navigation'] == 0) {
        if (empty($topic)) {
            $base_url = $_CONF['site_url'] . '/index.php';
            if ($newstories) {
                $base_url .= '?display=new';
            }
        } else {
            $base_url = $_CONF['site_url'] . '/index.php?topic=' . $topic;
        }
        $display .= COM_printPageNavigation($base_url, $page, $num_pages);
    }
} else {
    // no stories to display
    if (!isset($_CONF['hide_no_news_msg']) || $_CONF['hide_no_news_msg'] == 0) {
        $display .= COM_startBlock($LANG05[1], '', COM_getBlockTemplate('_msg_block', 'header')) . $LANG05[2];
        if (!empty($topic)) {
            $topicname = DB_getItem($_TABLES['topics'], 'topic', "tid = '{$topic}'");
            $display .= sprintf($LANG05[3], $topicname);
        }
        $display .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    }
    $display .= PLG_showCenterblock(3, $page, $topic);
    // bottom blocks
}
$display .= COM_siteFooter(true);
// The true value enables right hand blocks.
// Output page
COM_output($display);
Ejemplo n.º 2
0
                $base_url .= '?display=new';
            }
        } else {
            $base_url = $_CONF['site_url'] . '/index.php?topic=' . $topic;
        }
        $pageBody .= '<div class="aligncenter">' . COM_printPageNavigation($base_url, $page, $num_pages) . '</div>';
    }
} else {
    // no stories to display
    $cbDisplay = '';
    $cbDisplay .= PLG_showCenterblock(CENTERBLOCK_AFTER_FEATURED, $page, $topic);
    $cbDisplay .= PLG_showCenterblock(CENTERBLOCK_BOTTOM, $page, $topic);
    // bottom blocks
    if ((!isset($_CONF['hide_no_news_msg']) || $_CONF['hide_no_news_msg'] == 0) && $cbDisplay == '') {
        // If there's still nothing to display, show any default centerblocks.
        $cbDisplay .= PLG_showCenterblock(CENTERBLOCK_NONEWS, $page, $topic);
        if ($cbDisplay == '') {
            // If there's *still* nothing to show, show the stock message
            $eMsg = $LANG05[2];
            if (!empty($topic)) {
                $topicname = DB_getItem($_TABLES['topics'], 'topic', "tid = '" . DB_escapeString($topic) . "'");
                $eMsg .= sprintf($LANG05[3], $topicname);
            }
            $cbDisplay .= COM_showMessageText($eMsg, $LANG05[1], true, 'info');
        }
    }
    $pageBody .= $cbDisplay;
}
$display = COM_siteHeader();
$display .= $pageBody;
$display .= COM_siteFooter(true);