Zeile 19 | Zeile 19 |
---|
require_once MYBB_ROOT.'inc/functions_forumlist.php'; require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser;
|
require_once MYBB_ROOT.'inc/functions_forumlist.php'; require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser;
|
$plugins->run_hooks('index_start');
| |
// Load global language phrases $lang->load('index');
|
// Load global language phrases $lang->load('index');
|
| $plugins->run_hooks('index_start');
|
$logoutlink = ''; if($mybb->user['uid'] != 0) {
| $logoutlink = ''; if($mybb->user['uid'] != 0) {
|
Zeile 33 | Zeile 33 |
---|
$statspage = ''; if($mybb->settings['statsenabled'] != 0)
|
$statspage = ''; if($mybb->settings['statsenabled'] != 0)
|
{ if(!empty($logoutlink) || !empty($showteamlink))
| { $stats_page_separator = ''; if(!empty($logoutlink))
|
{ $stats_page_separator = $lang->board_stats_link_separator; } eval('$statspage = "'.$templates->get('index_statspage').'";'); }
|
{ $stats_page_separator = $lang->board_stats_link_separator; } eval('$statspage = "'.$templates->get('index_statspage').'";'); }
|
| $onlinecount = null;
|
$whosonline = ''; if($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0) {
| $whosonline = ''; if($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0) {
|
Zeile 57 | Zeile 59 |
---|
}
$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];
|
}
$timesearch = TIME_NOW - (int)$mybb->settings['wolcutoff'];
|
| $membercount = $guestcount = $anoncount = $botcount = 0; $forum_viewers = $doneusers = $onlinemembers = $onlinebots = array();
if($mybb->settings['showforumviewing'] != 0) { $query = $db->query(" SELECT location1, COUNT(DISTINCT ip) AS guestcount FROM ".TABLE_PREFIX."sessions WHERE uid = 0 AND location1 != 0 AND SUBSTR(sid,4,1) != '=' AND time > $timesearch GROUP BY location1 ");
while($location = $db->fetch_array($query)) { if(isset($forum_viewers[$location['location1']])) { $forum_viewers[$location['location1']] += $location['guestcount']; } else { $forum_viewers[$location['location1']] = $location['guestcount']; } } }
$query = $db->simple_select("sessions", "COUNT(DISTINCT ip) AS guestcount", "uid = 0 AND SUBSTR(sid,4,1) != '=' AND time > $timesearch"); $guestcount = $db->fetch_field($query, "guestcount");
|
$query = $db->query("
|
$query = $db->query("
|
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup FROM ".TABLE_PREFIX."sessions s LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid) WHERE s.time > '".$timesearch."'
| SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup FROM ".TABLE_PREFIX."sessions s LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid) WHERE (s.uid != 0 OR SUBSTR(s.sid,4,1) = '=') AND s.time > $timesearch
|
ORDER BY {$order_by}, {$order_by2} ");
|
ORDER BY {$order_by}, {$order_by2} ");
|
$forum_viewers = $doneusers = $onlinemembers = $onlinebots = array(); $membercount = $guestcount = $anoncount = $botcount = 0;
| |
// Fetch spiders $spiders = $cache->read('spiders');
|
// Fetch spiders $spiders = $cache->read('spiders');
|
// Loop through all users.
| // Loop through all users and spiders.
|
while($user = $db->fetch_array($query)) { // Create a key to test if this user is a search bot.
| while($user = $db->fetch_array($query)) { // Create a key to test if this user is a search bot.
|
Zeile 110 | Zeile 142 |
---|
$doneusers[$user['uid']] = $user['time']; } }
|
$doneusers[$user['uid']] = $user['time']; } }
|
elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey])
| elseif(my_strpos($user['sid'], 'bot=') !== false && $spiders[$botkey] && $mybb->settings['woldisplayspiders'] == 1)
|
{ if($mybb->settings['wolorder'] == 'username') {
| { if($mybb->settings['wolorder'] == 'username') {
|
Zeile 124 | Zeile 156 |
---|
// The user is a search bot. $onlinebots[$key] = format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']); ++$botcount;
|
// The user is a search bot. $onlinebots[$key] = format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']); ++$botcount;
|
} else { // The user is a guest. ++$guestcount;
| |
}
if($user['location1']) {
|
}
if($user['location1']) {
|
++$forum_viewers[$user['location1']];
| if(isset($forum_viewers[$user['location1']])) { ++$forum_viewers[$user['location1']]; } else { $forum_viewers[$user['location1']] = 1; }
|
} }
| } }
|
Zeile 186 | Zeile 220 |
---|
$anonbit = $lang->online_anon_singular; } if($guestcount != 1)
|
$anonbit = $lang->online_anon_singular; } if($guestcount != 1)
|
{
| {
|
$guestbit = $lang->online_guest_plural; } else
| $guestbit = $lang->online_guest_plural; } else
|
Zeile 196 | Zeile 230 |
---|
$lang->online_note = $lang->sprintf($lang->online_note, my_number_format($onlinecount), $onlinebit, $mybb->settings['wolcutoffmins'], my_number_format($membercount), $memberbit, my_number_format($anoncount), $anonbit, my_number_format($guestcount), $guestbit); eval('$whosonline = "'.$templates->get('index_whosonline').'";'); }
|
$lang->online_note = $lang->sprintf($lang->online_note, my_number_format($onlinecount), $onlinebit, $mybb->settings['wolcutoffmins'], my_number_format($membercount), $memberbit, my_number_format($anoncount), $anonbit, my_number_format($guestcount), $guestbit); eval('$whosonline = "'.$templates->get('index_whosonline').'";'); }
|
|
|
// Build the birthdays for to show on the index page. $bdays = $birthdays = ''; if($mybb->settings['showbirthdays'] != 0)
| // Build the birthdays for to show on the index page. $bdays = $birthdays = ''; if($mybb->settings['showbirthdays'] != 0)
|
Zeile 214 | Zeile 248 |
---|
$bdaycache = $cache->read('birthdays'); }
|
$bdaycache = $cache->read('birthdays'); }
|
$hiddencount = $today_bdays = 0;
| $hiddencount = 0; $today_bdays = array();
|
if(isset($bdaycache[$bdaydate])) {
|
if(isset($bdaycache[$bdaydate])) {
|
$hiddencount = $bdaycache[$bdaydate]['hiddencount']; $today_bdays = $bdaycache[$bdaydate]['users'];
| if(isset($bdaycache[$bdaydate]['hiddencount'])) { $hiddencount = $bdaycache[$bdaydate]['hiddencount']; } if(isset($bdaycache[$bdaydate]['users'])) { $today_bdays = $bdaycache[$bdaydate]['users']; }
|
}
$comma = '';
| }
$comma = '';
|
Zeile 228 | Zeile 269 |
---|
{ $bdayusers = array(); foreach($today_bdays as $key => $bdayuser_pc)
|
{ $bdayusers = array(); foreach($today_bdays as $key => $bdayuser_pc)
|
{
| {
|
$bdayusers[$bdayuser_pc['uid']] = $key; }
| $bdayusers[$bdayuser_pc['uid']] = $key; }
|
Zeile 259 | Zeile 300 |
---|
}
// If this user's display group can't be seen in the birthday list, skip it
|
}
// If this user's display group can't be seen in the birthday list, skip it
|
if($groupscache[$bdayuser['displaygroup']] && $groupscache[$bdayuser['displaygroup']]['showinbirthdaylist'] != 1)
| if(isset($groupscache[$bdayuser['displaygroup']]) && $groupscache[$bdayuser['displaygroup']]['showinbirthdaylist'] != 1)
|
{ continue; }
| { continue; }
|
Zeile 321 | Zeile 362 |
---|
// Find out what the highest users online count is. $mostonline = $cache->read('mostonline');
|
// Find out what the highest users online count is. $mostonline = $cache->read('mostonline');
|
if($onlinecount > $mostonline['numusers'])
| if($onlinecount !== null && $onlinecount > $mostonline['numusers'])
|
{ $time = TIME_NOW; $mostonline['numusers'] = $onlinecount;
| { $time = TIME_NOW; $mostonline['numusers'] = $onlinecount;
|
Zeile 347 | Zeile 388 |
---|
// Load the stats cache. $stats = $cache->read('stats'); }
|
// Load the stats cache. $stats = $cache->read('stats'); }
|
$expaltext = (in_array("boardstats", $collapse)) ? "[+]" : "[-]";
| if(!isset($collapsedthead['boardstats'])) { $collapsedthead['boardstats'] = ''; } if(!isset($collapsedimg['boardstats'])) { $collapsedimg['boardstats'] = ''; } if(!isset($collapsed['boardstats_e'])) { $collapsed['boardstats_e'] = ''; }
$expaltext = (in_array("boardstats", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;
|
eval('$boardstats = "'.$templates->get('index_boardstats').'";'); }
| eval('$boardstats = "'.$templates->get('index_boardstats').'";'); }
|
Zeile 360 | Zeile 414 |
---|
$forumsread = array(); if(isset($mybb->cookies['mybb']['forumread'])) {
|
$forumsread = array(); if(isset($mybb->cookies['mybb']['forumread'])) {
|
$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread'], false);
|
} } else
| } } else
|
Zeile 396 | Zeile 450 |
---|
}
$excols = 'index';
|
}
$excols = 'index';
|
$permissioncache['-1'] = '1';
| $permissioncache = null;
|
$bgcolor = 'trow1';
// Decide if we're showing first-level subforums on the index page.
| $bgcolor = 'trow1';
// Decide if we're showing first-level subforums on the index page.
|