Statistik fehlerhaft

N!tro*
Problembeschreibung:

Die Statistik wird nicht richtig angezeigt


Fehlermeldung:
keine

Link zum Forum oder Screenshot:

[IMG]http://img77.imageshack.us/img77/840/fehler9yg.jpg[/IMG]

Was wurde zuletzt geändert oder eingebaut?

Neuer Style

Und man musste was ändern damit man die Statistik links im Menü hat.

und zwar

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
#################################
# /index.php                    #
#################################

1. Suche und lösche: (ganz oben)

$lang->load("START");

2. Suche und lösche: (etwa in der Mitte)

/* ############## STATS ############## */
if($showstats==1) {
 $stats=$db->query_first("SELECT s.*, u.username FROM bb".$n."_stats s LEFT JOIN bb".$n."_users u ON(u.userid=s.lastuserid)");
 $stats['username']=htmlconverter($stats['username']);
 
 $installdays = (time() - $installdate) / 86400;
 if ($installdays < 1) $postperday = $stats['postcount'];
 else $postperday = $stats['postcount'] / $installdays; 
 
 $postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
 
 if($stats['usercount']>=1000) $stats['usercount']=number_format($stats['usercount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
 if($stats['threadcount']>=1000) $stats['threadcount']=number_format($stats['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
 if($stats['postcount']>=1000) $stats['postcount']=number_format($stats['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
}

3. Suche und lösche: (ganz unten)

 if($showpmonindex==1 && $wbbuserdata['can_use_pms']==1 && $wbbuserdata['receivepm']==1) {
  $counttotal=0; $countunread=0; $countnew=0;
  $result = $db->unbuffered_query("SELECT view, sendtime FROM bb".$n."_privatemessage WHERE recipientid = '$wbbuserdata[userid]' AND deletepm <> 1");
  while($row=$db->fetch_array($result)) {
   $counttotal++;
   if($row['view']==0) {
    $countunread++;
    if($row['sendtime']>$wbbuserdata['lastvisit']) $countnew++;
   }
  }
 
  if($countnew==1) $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
  else $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
  
  if($counttotal==1) $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
  else $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
    
  eval ("\$lang->items['LANG_START_PMS'] = \"".$lang->get4eval("LANG_START_PMS")."\";");
 }

4. Speichern und hochladen!


und Nummer 2

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
#################################
# /global.php                   #
#################################

1. Suche nach /** templates & style **/ und füge DAVOR ein:

$lang->load("START");

/* ############## STATS ############## */
if($showstats==1) {
 $stats=$db->query_first("SELECT s.*, u.username FROM bb".$n."_stats s LEFT JOIN bb".$n."_users u ON(u.userid=s.lastuserid)");
 $stats['username']=htmlconverter($stats['username']);
 
 $installdays = (time() - $installdate) / 86400;
 if ($installdays < 1) $postperday = $stats['postcount'];
 else $postperday = $stats['postcount'] / $installdays; 
 
 $postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
 
 if($stats['usercount']>=1000) $stats['usercount']=number_format($stats['usercount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
 if($stats['threadcount']>=1000) $stats['threadcount']=number_format($stats['threadcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
 if($stats['postcount']>=1000) $stats['postcount']=number_format($stats['postcount'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
}

 if($showpmonindex==1 && $wbbuserdata['can_use_pms']==1 && $wbbuserdata['receivepm']==1) {
  $counttotal=0; $countunread=0; $countnew=0;
  $result = $db->unbuffered_query("SELECT view, sendtime FROM bb".$n."_privatemessage WHERE recipientid = '$wbbuserdata[userid]' AND deletepm <> 1");
  while($row=$db->fetch_array($result)) {
   $counttotal++;
   if($row['view']==0) {
    $countunread++;
    if($row['sendtime']>$wbbuserdata['lastvisit']) $countnew++;
   }
  }
 
  if($countnew==1) $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
  else $pms_NEWMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
  
  if($counttotal==1) $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGE'];
  else $pms_TOTALMESSAGE = $lang->items['LANG_START_PMS_MESSAGES'];
    
  eval ("\$lang->items['LANG_START_PMS'] = \"".$lang->get4eval("LANG_START_PMS")."\";");
 }

2. Speichern und hochladen!


Im anhang mal die 2 dateien.
Ich konnte da nix genaues finden unglücklich