# index.lang.php - Einfügen
$l['exyoung'] = "Jüngstes Mitglied:";
$l['exeld'] = "Ältestes Mitglied:";
$l['exfjoined'] = "First to join:";
$l['extm'] = "Männer Insgesamt:";
$l['extun'] = "Unbestimmte Insgesamt:";
$l['extfem'] = "Frauen Insgesamte:";
$l['exlac'] = "Letzter Aktiver User:";
$l['extp'] = "Top Schreiber: <strong>{1}</strong> (<strong>{2}</strong>) Beiträge";
# Template: index_stats - Ersetzen
<tr>
<td class="trow1">$lang->exyoung<strong> $youngest</strong> (<strong>$youngestd</strong>) </td>
<td class="trow2">$lang->extm <strong>$tmale</strong></td>
<td colspan="2" valign="top" class="trow1">$lang->exlac <strong>$lastvisitor</strong> </td>
</tr>
<tr>
<td class="trow1">$lang->exeld <strong>$aged</strong> (<strong>$agedd</strong>)</td>
<td class="trow2">$lang->extun <strong>$tundi</strong></td>
<td colspan="2" rowspan="2" valign="top" class="trow1">$lang->extp</td>
</tr>
<tr>
<td class="trow1">$lang->exfjoined<strong> $ftreg</strong></td>
<td class="trow2">$lang->extfem <strong>$tfem</strong></td>
</tr>
# Template: index_whosonline - Ersetzen
<tr>
<td class="tcat" colspan="3"><strong>$lang->whos_online</strong> [<a href="online.php">$lang->complete_list</a>]</td>
</tr>
<tr>
<td class="trow1" colspan="3"><span class="smalltext">$lang->online_note<br />$onlinemembers</span></td>
</tr>
# Template: index - Ersetzen
<html>
<head>
<title>$settings[bbname]</title>
$headerinclude
</head>
<body>
$header
$forums
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]" class="tborder">
<thead>
<tr>
<td class="thead" colspan="3">
<div class="expcolimage"><a href="javascript:expandCollapse('boardstats');"><img src="$theme[imgdir]/collapse$collapsedimg[boardstats].gif" id="boardstats_collapseimg" border="0" alt="[-]" /></a></div>
<div><strong>$lang->boardstats</strong></div>
</td>
</tr>
</thead>
<tbody style="$collapsed[boardstats_e]" id="boardstats_e">
$forumstats
$whosonline
$birthdays
</tbody>
</table>
<br/>
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]" class="tborder">
<tr>
<td class="trow1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" align="left">
<table cellspacing="0" cellpadding="2" border="0">
<tr><td><img src="$theme[imgdir]/on.gif" alt="$lang->new_posts" /></td><td class="trow"><span class="smalltext">$lang->new_posts</span></td></tr>
<tr><td><img src="$theme[imgdir]/off.gif" alt="$lang->no_new_posts" /></td><td class="trow"><span class="smalltext">$lang->no_new_posts</span></td></tr>
<tr><td><img src="$theme[imgdir]/offlock.gif" alt="$lang->forum_locked" /></td><td class="trow"><span class="smalltext">$lang->forum_locked</span></td></tr>
</table>
</td>
<td valign="top" align="right">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr><td valign="top" align="right">
<span class="smalltext">$logoutlink<a href="misc.php?action=markread">$lang->markread</a> | <a href="showteam.php">$lang->forumteam</a> | <a href="stats.php">$lang->forumstats</a></span>
</td></tr>
$loginform
</table>
</td></tr>
</table>
</td></tr>
</table>
$footer
</body>
</html>
### Achtung ###
[b]javascript[/b] im Template wieder zusammenschreiben
############
# index.php - Ersetze:
if($mybb->settings['showindexstats'] != "no")
{
$stats = $cache->read("stats");
if(!$stats['lastusername'])
{
$newestmember = "no-one";
}
else
{
$newestmember = "<a href=\"member.php?action=profile&uid=".$stats['lastuid']."\">".$stats['lastusername']."</a>";
}
$lang->stats_posts_threads = sprintf($lang->stats_posts_threads, mynumberformat($stats['numposts']), mynumberformat($stats['numthreads']));
$lang->stats_numusers = sprintf($lang->stats_numusers, mynumberformat($stats['numusers']));
$lang->stats_newestuser = sprintf($lang->stats_newestuser, $newestmember);
// Most users online
$mostonline = $cache->read("mostonline");
if($onlinecount > $mostonline['numusers'])
{
$time = time();
$mostonline['numusers'] = $onlinecount;
$mostonline['time'] = $time;
$cache->update("mostonline", $mostonline);
}
$recordcount = $mostonline['numusers'];
$recorddate = mydate($mybb->settings['dateformat'], $mostonline['time']);
$recordtime = mydate($mybb->settings['timeformat'], $mostonline['time']);
$lang->stats_mostonline = sprintf($lang->stats_mostonline, mynumberformat($recordcount), $recorddate, $recordtime);
eval("\$forumstats = \"".$templates->get("index_stats")."\";");
}
# Durch:
if($mybb->settings['showindexstats'] != "no")
{
$stats = $cache->read("stats");
if(!$stats['lastusername'])
{
$newestmember = "no-one";
}
else
{
$newestmember = "<a href=\"member.php?action=profile&uid=".$stats['lastuid']."\">".$stats['lastusername']."</a>";
}/*
$lang->stats_posts_threads = sprintf($lang->stats_posts_threads, mynumberformat($stats['numposts']), mynumberformat($stats['numthreads']));
$lang->stats_numusers = sprintf($lang->stats_numusers, mynumberformat($stats['numusers']));
$lang->stats_newestuser = sprintf($lang->stats_newestuser, $newestmember);
// Most users online
$mostonline = $cache->read("mostonline");
if($onlinecount > $mostonline['numusers'])
{
$time = time();
$mostonline['numusers'] = $onlinecount;
$mostonline['time'] = $time;
$cache->update("mostonline", $mostonline);
}
$recordcount = $mostonline['numusers'];
$recorddate = mydate($mybb->settings['dateformat'], $mostonline['time']);
$recordtime = mydate($mybb->settings['timeformat'], $mostonline['time']);
$lang->stats_mostonline = sprintf($lang->stats_mostonline, mynumberformat($recordcount), $recorddate, $recordtime);
*/
####################################################
//Eldest Member
$rt = $db->query("SELECT uid, username, birthday FROM ".TABLE_PREFIX."users ORDER BY birthday DESC LIMIT 0,1");
while($nt = $db->fetch_array($rt)){
$usr = $nt['username'];
$aged = "<a href=\"member.php?action=profile&uid=$nt[uid]\">$usr</a>";
$agedd = $nt['birthday'];
}
//youngest Member
$rt = $db->query("SELECT uid, username, birthday FROM ".TABLE_PREFIX."users ORDER BY birthday ASC limit 0,1");
while($nt = $db->fetch_array($rt)){
$usr = $nt['username'];
$youngest = "<a href=\"member.php?action=profile&uid=$nt[uid]\">$usr</a>";
$youngestd = $nt['birthday'];
}
//First Member
$rt = $db->query("SELECT uid, username, regdate FROM ".TABLE_PREFIX."users ORDER BY regdate ASC LIMIT 0,2");
while($nt = $db->fetch_array($rt)){
$usr = $nt['username'];
$ftreg = "<a href=\"member.php?action=profile&uid=$nt[uid]\">$usr</a>";
$ftregd= $nt['regdate'];
}
//last visit
$rt = $db->query("SELECT uid, username, lastvisit FROM ".TABLE_PREFIX."users ORDER BY lastvisit DESC LIMIT 0,1");
while($nt = $db->fetch_array($rt)){
$usr = $nt['username'];
$lastvisitor = "<a href=\"member.php?action=profile&uid=$nt[uid]\">$usr</a>";
$lastvisitord= $nt['lastvisit'];
}
//total males
$rt = $db->query("SELECT count( * ) AS fid FROM ".TABLE_PREFIX."userfields WHERE fid3 = 'Male'");
while($nt = $db->fetch_array($rt)){
$tm = $nt['fid'];
$tmale = "$tm";
}
//total Undisclosed
$rt = $db->query("SELECT count( * ) AS fid FROM ".TABLE_PREFIX."userfields WHERE fid3 = 'Undisclosed'");
while($nt = $db->fetch_array($rt)){
$tu = $nt['fid'];
$tundi = "$tu";
}
//total Females
$rt = $db->query("SELECT count( * ) AS fid FROM ".TABLE_PREFIX."userfields WHERE fid3 = 'Female'");
while($nt = $db->fetch_array($rt)){
$tf = $nt['fid'];
$tfem = "$tf";
}
//top poster
$rt = $db->query("SELECT uid, username, postnum FROM ".TABLE_PREFIX."users ORDER BY postnum DESC LIMIT 0,1");
while($nt = $db->fetch_array($rt)){
$usr = $nt['username'];
$tpost = "<a href=\"member.php?action=profile&uid=$nt[uid]\">$usr</a>";
$tpost2 = $nt['postnum'];
$lang->extp = sprintf($lang->extp, $tpost, $tpost2);
}
eval("\$forumstats = \"".$templates->get("index_stats")."\";");
}