Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: index.php 5016 2010-06-12 00:24:02Z RyanGordon $
| * $Id: index.php 5594 2011-09-14 13:13:41Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 183 | Zeile 183 |
---|
$hiddencount = $bdaycache[$bdaydate]['hiddencount']; $today_bdays = $bdaycache[$bdaydate]['users'];
|
$hiddencount = $bdaycache[$bdaydate]['hiddencount']; $today_bdays = $bdaycache[$bdaydate]['users'];
|
|
|
$comma = ''; if(!empty($today_bdays)) {
|
$comma = ''; if(!empty($today_bdays)) {
|
foreach($today_bdays as $bdayuser)
| if(intval($mybb->settings['showbirthdayspostlimit']) > 0)
|
{
|
{
|
$bday = explode("-", $bdayuser['birthday']); if($year > $bday['2'] && $bday['2'] != '')
| $bdayusers = array(); foreach($today_bdays as $key => $bdayuser_pc) { $bdayusers[$bdayuser_pc['uid']] = $key; }
if(!empty($bdayusers)) { // Find out if our users have enough posts to be seen on our birthday list $bday_sql = implode(",", array_keys($bdayusers)); $query = $db->simple_select("users", "uid, postnum", "uid IN ({$bday_sql})");
while($bdayuser = $db->fetch_array($query)) { if($bdayuser['postnum'] < $mybb->settings['showbirthdayspostlimit']) { unset($today_bdays[$bdayusers[$bdayuser['uid']]]); } } } }
// We still have birthdays - display them in our list! if(!empty($today_bdays)) { foreach($today_bdays as $bdayuser)
|
{
|
{
|
$age = " (".($year - $bday['2']).")";
| if($bdayuser['displaygroup'] == 0) { $bdayuser['displaygroup'] = $bdayuser['usergroup']; }
// 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) { continue; }
$bday = explode("-", $bdayuser['birthday']); if($year > $bday['2'] && $bday['2'] != '') { $age = " (".($year - $bday['2']).")"; } else { $age = ''; }
$bdayuser['username'] = format_name($bdayuser['username'], $bdayuser['usergroup'], $bdayuser['displaygroup']); $bdayuser['profilelink'] = build_profile_link($bdayuser['username'], $bdayuser['uid']); eval("\$bdays .= \"".$templates->get("index_birthdays_birthday", 1, 0)."\";"); ++$bdaycount; $comma = $lang->comma;
|
}
|
}
|
else { $age = ''; } $bdayuser['username'] = format_name($bdayuser['username'], $bdayuser['usergroup'], $bdayuser['displaygroup']); $bdayuser['profilelink'] = build_profile_link($bdayuser['username'], $bdayuser['uid']); eval("\$bdays .= \"".$templates->get("index_birthdays_birthday", 1, 0)."\";"); ++$bdaycount; $comma = $lang->comma;
| |
} }
|
} }
|
|
|
if($hiddencount > 0) { if($bdaycount > 0)
| if($hiddencount > 0) { if($bdaycount > 0)
|
Zeile 251 | Zeile 291 |
---|
$mostonline['numusers'] = $onlinecount; $mostonline['time'] = $time; $cache->update("mostonline", $mostonline);
|
$mostonline['numusers'] = $onlinecount; $mostonline['time'] = $time; $cache->update("mostonline", $mostonline);
|
}
| }
|
$recordcount = $mostonline['numusers']; $recorddate = my_date($mybb->settings['dateformat'], $mostonline['time']); $recordtime = my_date($mybb->settings['timeformat'], $mostonline['time']);
|
$recordcount = $mostonline['numusers']; $recorddate = my_date($mybb->settings['dateformat'], $mostonline['time']); $recordtime = my_date($mybb->settings['timeformat'], $mostonline['time']);
|
|
|
// Then format that language string. $lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);
eval("\$forumstats = \"".$templates->get("index_stats")."\";"); }
|
// Then format that language string. $lang->stats_mostonline = $lang->sprintf($lang->stats_mostonline, my_number_format($recordcount), $recorddate, $recordtime);
eval("\$forumstats = \"".$templates->get("index_stats")."\";"); }
|
|
|
// Show the board statistics table only if one or more index statistics are enabled. if($mybb->settings['showwol'] != 0 || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0)) { if(!is_array($stats))
|
// Show the board statistics table only if one or more index statistics are enabled. if($mybb->settings['showwol'] != 0 || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0)) { if(!is_array($stats))
|
{
| {
|
// Load the stats cache. $stats = $cache->read("stats"); }
|
// Load the stats cache. $stats = $cache->read("stats"); }
|
| $post_code_string = ''; if($mybb->user['uid']) { $post_code_string = "&my_post_key=".$mybb->post_code; }
|
eval("\$boardstats = \"".$templates->get("index_boardstats")."\";"); }
| eval("\$boardstats = \"".$templates->get("index_boardstats")."\";"); }
|