Beispiel #1
0
if (function_exists('sp_SubscriptionsSubscribeButton')) {
    sp_SubscriptionsSubscribeButton('tagClass=spButton spLeft', __sp('Subscribe'), __sp('Unsubscribe'), __sp('Subscribe to this topic'), __sp('Unsubscribe from this topic'));
}
if (function_exists('sp_WatchesWatchButton')) {
    sp_WatchesWatchButton('tagClass=spButton spLeft', __sp('Watch'), __sp('Stop Watching'), __sp('Watch this topic'), __sp('Stop watching this topic'));
}
sp_GoToTop('tagClass=spRight spGoToTop&iconClass=spIcon', '', __sp('Go to top'));
sp_SectionEnd('tagClass=spClear', 'pageBottomStatus');
# Start the 'stats' section
# ----------------------------------------------------------------------
sp_SectionStart('tagClass=spStatsSection', 'stats');
sp_ForumTimeZone('tagClass=spForumTimeZone', __sp('Forum Timezone: '));
sp_UserTimeZone('tagClass=spUserTimeZone', __sp('Your Timezone: '));
sp_InsertBreak();
sp_ColumnStart('tagClass=spColumnSection spLeft spOnlineStats&width=40%&height=0');
sp_OnlineStats('tagClass=spLeft', __sp('Most Users Ever Online: '), __sp('Currently Online: '), __sp('Currently Browsing this Page: '), __sp('Guest(s)'));
if (function_exists('sp_OnlinePageLink')) {
    sp_OnlinePageLink('', __sp('See All Online Activity'));
}
if (function_exists('sp_ListBirthdays')) {
    sp_ListBirthdays('tagClass=spCustomTag&spLeft', __sp('Members Birthdays'), __sp('Today'), __sp('Upcoming'));
}
sp_ColumnEnd();
sp_ColumnStart('tagClass=spColumnSection spRight spTopPosterStats&width=15%&height=0');
sp_TopPostersStats('tagClass=spRight', __sp('Top Posters: '));
sp_ColumnEnd();
sp_ColumnStart('tagClass=spColumnSection spRight spMembershipStats&width=20%&height=0');
sp_MembershipStats('tagClass=spRight', __sp('Member Stats: '), __sp('Members: %COUNT%'), __sp('Guest Posters: %COUNT%'), __sp('Moderators: %COUNT%'), __sp('Admins: %COUNT%'));
sp_ColumnEnd();
sp_ColumnStart('tagClass=spColumnSection spRight spForumStats&width=17%&height=0');
sp_ForumStats('tagClass=spRight', __sp('Forum Stats: '), __sp('Groups: '), __sp('Forums: '), __sp('Topics: '), __sp('Posts: '));
function spa_dashboard_forum()
{
    global $spGlobals, $spThisUser, $spStatus;
    $out = '';
    # check we have an installed version
    if ($spStatus != 'ok') {
        $out .= '<div style="border: 1px solid #eeeeee; padding: 10px; font-weight: bold;">' . "\n";
        $out .= '<p><img style="vertical-align:bottom;border:none;" src="' . sp_paint_file_icon(SPTHEMEICONSURL, 'sp_Information.png') . '" alt="" />' . "\n";
        $out .= '&nbsp;&nbsp;' . sprintf(spa_text('The forum is temporarily unavailable while awaiting %s'), $spStatus) . '</p>';
        if ($spThisUser->admin) {
            $out .= '&nbsp;&nbsp;<a style="text-decoration: underline;" href="' . SFADMINUPGRADE . '">' . spa_text('Perform Upgrade') . '</a>';
        }
        $out .= '</div>';
        echo $out;
        return;
    }
    $out .= '<div id="sf-dashboard">';
    echo $out;
    do_action('sph_dashboard_start');
    if ($spGlobals['admin']['sfdashboardstats']) {
        include_once SF_PLUGIN_DIR . '/forum/content/sp-common-view-functions.php';
        include_once SF_PLUGIN_DIR . '/forum/content/sp-template-control.php';
        echo '<br /><table class="sfdashtable">';
        echo '<tr>';
        echo '<td>';
        sp_OnlineStats('link_names=0', '<b>' . spa_text('Most Users Ever Online') . ': </b>', '<b>' . spa_text('Currently Online') . ': </b>', '<b>' . spa_text('Currently Browsing this Page') . ': </b>', spa_text('Guest(s)'));
        echo '</td>';
        echo '<td>';
        sp_ForumStats('', '<b>' . spa_text('Forum Stats') . ': </b>', spa_text('Groups') . ': ', spa_text('Forums') . ': ', spa_text('Topics') . ': ', spa_text('Posts') . ': ');
        echo '</td>';
        echo '<td>';
        sp_MembershipStats('', '<b>' . spa_text('Member Stats') . ': </b>', spa_text('There are %COUNT% Members'), spa_text('There have been %COUNT% Guest Posters'), spa_text('There are %COUNT% Moderators'), spa_text('There are %COUNT% Admins'));
        echo '</td>';
        echo '<td>';
        sp_TopPostersStats('link_names=0', '<b>' . spa_text('Top Posters') . ': </b>');
        echo '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td colspan="4">';
        sp_NewMembers('link_names=0', '<b>' . spa_text('Newest Members') . ': </b>');
        echo '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td colspan="4">';
        sp_ModsList('link_names=0', '<b>' . spa_text('Moderators') . ': </b>');
        echo '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td colspan="4">';
        sp_AdminsList('link_names=0', '<b>' . spa_text('Administrators') . ': </b>');
        echo '</td>';
        echo '</tr></table><br />';
    }
    do_action('sph_dashboard_end');
    $out = '';
    $out .= '<p><br /><a href="' . sp_url() . '">' . spa_text('Go To Forum') . '</a></p>';
    $out .= '</div>';
    echo $out;
}