Bräke
Dateien ersetzen, Sprachpaket importieren, ggf. Sprache anpassen.
Sollte passen und klappen.
blackeagle1075
Ok. Ich danke dir für den superschnellen support. hat wunderbar geklappt
AMD-Fan
In großen Foren mit >30.000 Hits pro Tag, kann folgende Optimierung in der global.php eine Menge Performance sparen:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
|
// *** STATISTIK ***
$today = mktime(0,0,0, date("m", time()), date("d", time()), date("Y", time()));
$todayhour = date("G", time());
if ($todayhour <= 03) {
list($todaysentries) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_statistics WHERE date >= ".$today.";");
if($todaysentries > 1) {
$db->unbuffered_query("DELETE FROM bb".$n."_statistics WHERE date >= ".$today." LIMIT 1;");
} elseif($todaysentries == 0) {
$db->unbuffered_query("INSERT INTO bb".$n."_statistics VALUES ('".time()."', '', '', '', '', '', '')");
}
}
if ($todayhour >= 22) {
list($result) = $db->query_first("SELECT COUNT(*) AS count FROM bb".$n."_users WHERE lastactivity >='$today';");
$db->unbuffered_query("UPDATE bb".$n."_statistics SET users=$result,hits=hits+1 WHERE date>=$today;");
} else {
$db->unbuffered_query("UPDATE bb".$n."_statistics SET hits=hits+1 WHERE date>=$today;");
}
// *** STATISTIK *** |
|
hardcore-punk
dankeschön :-)
SpahnRanche
Bei mir funktioniert "Auszulassende Foren" nicht. eingegeben hab ich die Board id der threads: ,111,234 etc.
Es liegt wahrscheinlich an meinem Borad, dass dort was nicht funzt diesbezüglich. Genau das gleiche Problem hatte ich bei dem Top5 Hack, dass ich dort keine Themen ausschleissen konnte, dort bekam ich sogar eine Fehlermeldung sobald ich eine ID eingegeben habe. Bei diesem Hack ist alles unverändert, also es werden keine Threads ausgeblendet.
Bräke
Du musst die "boardid" eintragen aus den Foren, aus denen nichts gezeigt werden soll. Keine Kategorie.
Du willst keine Anzeige in der Statistik aus dem Forum: "Foren Regeln und Informationen zum Board" Dann ist das die ID = 12
Kategorie: "Informationen über das Horrorfilm Forum" ID = 11 | Funktioniert nicht, da Kategorie.
SpahnRanche
Ok alles bestens!

Der Fehler war so ähnlich, hab die ID von den Beiträgen genommen.
SpahnRanche
Geht es auch, dass man die Statistik so ausbaut, dass die einzelnen Kategorien je eine eigene Spalte bekommen? Ich nutzte die Statistik hauptsächlich für die Themenbewertung (in meinem Fall Filmbewertung). Wäre super, würde ich auch als Job vergüten.
KleenMicha
@SpahnRanche: beschreibe dein Anliegen etwas genauer.
Welche Angaben sollen für eine Kategorie angezeigt werden?
Sollen alle Informationen auf eine Seite oder auf mehrere Seiten verteilt werden?
SpahnRanche
"Top X bewertete Themen | Anzeige aktivieren" hab ich auf ja, dass andere bis auf die ersten 4 Punkte die ich noch drin habe, brauch ich nicht, eigentlich brauch ich nur die Themenbewertung.
http://www.nightmare-horrormovies.de/statsinfo.php
Dort kann man ja "Auszulassende Foren" eingeben. Ich bräuchte diese Funktion einfach nur in 10 facher Ausführung. (dann würde ich natürlich alles auch etwas begrenzen sonst wird das zu lang)
Ob die Infos auf eine oder mehrere Seite verteilt werden ist mir egal, würd es so oder so nehmen.
KleenMicha
Sollte nicht das problem sein das umzusetzen. meine frage ging nur in die Richtung wenn du viele Kategorien / Foren hast, so wird die Liste ja recht lang. Sprich wenn du für jeden Bereich die jeweils am Besten bewerteten Themen sehen möchtest.
Die Umsetzung ist kein Problem für mich.
SpahnRanche
Wenn es auf mehrere Seite geht, wäre es wohl besser dann.
KleenMicha
Ich habe den Hack einmal überarbeitet und dir im Anhang ein Demobild wie das Ganze nun aussieht beigefügt.
Vlt. entspricht es schon deinen Vorstellungen. Bei Bedarf könnte man die Forenreihenfolge (nach a-Z, Z-A) umsortierbar machen.
SpahnRanche
Ja das ist echt toll. so hab ich mir das vorgestellt.
KleenMicha
Tja wie kann ich dir die Codeänderungen mitteilen.
Prinzipiell würde ich diese ja für alle zugänglich machen, wenn es dich nicht stört.
SpahnRanche
Entweder sagst mir was haben willst oder du machst es öffentlich, stört mich nicht.
KleenMicha
Ausgabe von Topbewerteten Themen verteilt auf einzelne Foren:
Öffne die Datei: ./statsinfo.php
Suche nach:
php: |
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:
|
/* ############## TOP VOTET THREAD ############## */
if ($ywstats_topvotes == 1) {
$result = $db->query ("SELECT bb".$n."_threads.*, bb".$n."_boards.boardid, bb".$n."_boards.password, bb".$n."_boards.allowratings FROM bb".$n."_threads LEFT JOIN bb".$n."_boards ON (bb".$n."_threads.boardid=bb".$n."_boards.boardid) WHERE bb".$n."_threads.boardid AND bb".$n."_threads.boardid IN (0".getSearchableBoards().") AND bb".$n."_boards.boardid NOT IN (0$ywstats_topnovotes) AND bb".$n."_boards.password = '' AND bb".$n."_boards.allowratings = '1' AND bb".$n."_threads.voted >= '$showvotes' ORDER BY bb".$n."_threads.votepoints DESC LIMIT 0,$ywstats_toplimitvotes");
$i = 1;
while ($num = $db->fetch_array($result)) {
if ($i=="1" && $num['votepoints'] > 0) {
$multip = 100 / $num['votepoints'];
}
if(strlen($num['topic']) > 35) $topic=substr($num['topic'], 0, 38)."...";
else $topic = $num['topic'];
$topic = htmlconverter($topic);
if ($num['voted'] != 0) {
$voteavarage = ($num['votepoints'] / $num['voted']);
$voteavarage = number_format($voteavarage, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
} else {
$voteavarage = 0;
}
$width = round($num['votepoints'] * $multip);
if ($num['votepoints'] >= 1000) $num['votepoints'] = number_format($num['votepoints'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if ($num['voted'] >= 1000) $num['voted'] = number_format($num['voted'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
eval ("\$topvotes .= \"".$tpl->get("yw_statstopvotebit")."\";");
$i++;
}
$lang->items['LANG_STATSINFO_TOPS_TITLETOPVOTES'] = $lang->get("LANG_STATSINFO_TOPS_TITLETOPVOTES", array('$ywstats_toplimitvotes' => $ywstats_toplimitvotes));
} |
|
Und ersetze es durch Folgendes:
php: |
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:
|
/* ############## TOP VOTET THREAD ############## */
if ($ywstats_topvotes == 1) {
$boards = explode(',',getSearchableBoards());
$lang->items['LANG_STATSINFO_TOPS_TITLETOPVOTES'] = $lang->get("LANG_STATSINFO_TOPS_TITLETOPVOTES", array('$ywstats_toplimitvotes' => $ywstats_toplimitvotes));
$topvoteboards = '';
foreach($boards as $boardid)
{
if ($boardid != '') {
$result = $db->query ("SELECT bb".$n."_threads.*, bb".$n."_boards.boardid, bb".$n."_boards.password, bb".$n."_boards.allowratings, bb".$n."_boards.title FROM bb".$n."_threads LEFT JOIN bb".$n."_boards ON (bb".$n."_threads.boardid=bb".$n."_boards.boardid) WHERE bb".$n."_threads.boardid ='$boardid' AND bb".$n."_boards.boardid NOT IN (0$ywstats_topnovotes) AND bb".$n."_boards.password = '' AND bb".$n."_boards.postcount > 0 AND bb".$n."_boards.isboard = '1' AND bb".$n."_boards.allowratings = '1' AND bb".$n."_threads.voted >= '$showvotes' ORDER BY bb".$n."_threads.votepoints DESC LIMIT 0,$ywstats_toplimitvotes");
$i = 1;
$num = '';
$topvotes = '';
$ywstats_toplimitboard = '';
while ($num = $db->fetch_array($result)) {
if ($i=="1" && $num['votepoints'] > 0) {
$multip = 100 / $num['votepoints'];
}
$ywstats_toplimitboard = $num['title'];
if(strlen($num['topic']) > 35) $topic=substr($num['topic'], 0, 38)."...";
else $topic = $num['topic'];
$topic = htmlconverter($topic);
if ($num['voted'] != 0) {
$voteavarage = ($num['votepoints'] / $num['voted']);
$voteavarage = number_format($voteavarage, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
} else {
$voteavarage = 0;
}
$width = round($num['votepoints'] * $multip);
if ($num['votepoints'] >= 1000) $num['votepoints'] = number_format($num['votepoints'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
if ($num['voted'] >= 1000) $num['voted'] = number_format($num['voted'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
eval ("\$topvotes .= \"".$tpl->get("yw_statstopvotebit")."\";");
$i++;
}
if ($topvotes != '') {
eval ("\$topvoteboards .= \"".$tpl->get("yw_statstopvoteboard")."\";");
}
}
}
} |
|
Öffne das Template: yw_stats
Suche nach:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td align="left" colspan="4" class="tabletitle"><span class="normalfont"><b>{$lang->items['LANG_STATSINFO_TOPS_TITLETOPVOTES']}</b></span></td>
</tr>
<tr>
<td align="left" class="tablecat" style="width:1%"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_NUMBER']}</b></span></td>
<td align="left" class="tablecat"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_THREAD']}</b></span></td>
<td align="left" style="width:22%" class="tablecat"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_POVO']}</b></span></td>
<td align="left" style="width:35%" class="tablecat"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_STASIMAGE']}</b></span></td>
</tr>
$topvotes
</table> |
|
Und ersetze es durch Folgendes:
Erstelle ein neues template mit Namen: yw_statstopvoteboard
Und folgendem Inhalt:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td align="left" colspan="4" class="tabletitle"><span class="normalfont"><b>{$lang->items['LANG_STATSINFO_TOPS_TITLETOPVOTES']} $ywstats_toplimitboard</b></span></td>
</tr>
<tr>
<td align="left" class="tablecat" style="width:1%"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_NUMBER']}</b></span></td>
<td align="left" class="tablecat"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_THREAD']}</b></span></td>
<td align="left" style="width:22%" class="tablecat"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_POVO']}</b></span></td>
<td align="left" style="width:35%" class="tablecat"><span class="smallfont"><b>{$lang->items['LANG_STATSINFO_TOPS_STASIMAGE']}</b></span></td>
</tr>
$topvotes
</table> |
|
Das war es bereits. Viel Spaß damit.
KleenMicha
Wenns geht super. Und wenn du das Bedürfnis hast mir dafür zu danken, dann gibt es sowas wie Flattr.
16V-Cabrio
Zitat: |
Original von MarkusDippold
Edit 2:
Ich habe die einzelnen Statistik-Template-Bits und die statsinfo.php etwas aufgebohrt, daß
1. die Balken-Grafiken verwendet werden, wie sie auch für die Umfragen verwendet werden
2. sich das auch immer nach den 5 verschiedenen Balken immer wiederholt, wie bei den Umfragen eben auch.
Einfach mal in den Anhang (Screenshot) reinsehen. So sieht das jetzt aus. |
HI Zusammen,
hätte gerne gewusst was Ich ändern müsste um das auch so zu bekommen wie bei Markus.
Lg