|
Autor |
Nachricht |
boris
Beiträge: 11154
|
Titel: MOD: WMUserTipps v0.2
Verfasst am: So, 02 Jul 2006, 21:14 |
|
|
Und wieder einmal eine Erweiterung für das WM Tipp MOD, so kurz vor Schluß ...
"WMUserTipps" zeigt alle Tips eines Users in einem Popup. Der Link wird in der Rangliste unterhalb der Anzahl der abgegebenen Tips angezeigt.
Für Admins sind auch zukünftige Tips einsehbar (kann über ein Flag in der wm_usertipps.php abgeschaltet werden).
Erste, funktionierende Version, die üblichen sinnfreien Statistiken folgen, sobald ich die Zeit finde.
Änderungen in der v0.2:
wie angekündigt: wer schon immer wissen wollte, welcher User welches Ergebnis wie häufig getipt hat, was die maximal getippte Tordifferenz war, wieviele Punkte im Durchschnitt pro Spiel eingestrichen wurden und mehr desgleichen, der sollte updaten.
____________ beehave - home of humbug ... [we can't afford to be neutral]
|
|
Nach oben |
|
boris
Beiträge: 11154
|
Titel: (Kein Titel)
Verfasst am: Di, 02 Okt 2007, 21:04 |
|
|
Wer WMUserTipps für die EM fitmachen will, sollte folgenden Code ausführen. Da WMUserTipps erst nach Abschluß der Vorrunde der WM erschient, war die Datumsüberprüfung für die Vorrunde nicht eingebaut.
Code: |
#
#-----[ OPEN ]------------------------------------------
#
em_usertipps.php
#
#-----[ FIND ]------------------------------------------
#
if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($row_games['game_time'] < time()) { $arr_userpkt[3]++; }
else if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
#
#-----[ FIND ]------------------------------------------
#
'TIPP_HOME' => $int_tiphome,
'TIPP_AWAY' => $int_tipaway,
#
#-----[ REPLACE WITH ]------------------------------------------
#
'TIPP_HOME' => (($row_games['game_time'] < time()) || ($userdata['user_id'] == $int_userid) || (($admin_sees_all == true) && ($userdata['user_level'] == ADMIN))) ? $int_tiphome %u3a '-',
'TIPP_AWAY' => (($row_games['game_time'] < time()) || ($userdata['user_id'] == $int_userid) || (($admin_sees_all == true) && ($userdata['user_level'] == ADMIN))) ? $int_tipaway %u3a '-',
#
#-----[ FIND ]------------------------------------------
#
if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($row_games['game_time'] > time()) { $arr_userpkt[3]++; }
else if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
#
#-----[ FIND ]------------------------------------------
#
'TIPP_HOME' => (($finals_row[$j]['game_time'] < time()) || (($admin_sees_all == true) && ($userdata['user_level'] == ADMIN))) ? $int_tiphome : '-',
'TIPP_AWAY' => (($finals_row[$j]['game_time'] < time()) || (($admin_sees_all == true) && ($userdata['user_level'] == ADMIN))) ? $int_tipaway : '-',
#
#-----[ REPLACE WITH ]------------------------------------------
#
'TIPP_HOME' => (($finals_row[$j]['game_time'] < time()) || ($userdata['user_id'] == $int_userid) || (($admin_sees_all == true) && ($userdata['user_level'] == ADMIN))) ? $int_tiphome : '-',
'TIPP_AWAY' => (($finals_row[$j]['game_time'] < time()) || ($userdata['user_id'] == $int_userid) || (($admin_sees_all == true) && ($userdata['user_level'] == ADMIN))) ? $int_tipaway : '-', |
Achtung: die Zeile "if ($row_games['game_time'] > time()) { $arr_userpkt[3]++;" ist ZWEImal zu finden und zu ändern.
____________ beehave - home of humbug ... [we can't afford to be neutral]
|
|
Nach oben |
|
boris
Beiträge: 11154
|
Titel: (Kein Titel)
Verfasst am: Fr, 05 Okt 2007, 11:51 |
|
|
Ein Problem mit den Userstatistiken sollte sich hiermit erledigen lassen:
Code: |
#
#-----[ OPEN ]------------------------------------------
#
em_usertipps.php
#
#-----[ FIND ]------------------------------------------
#
if ($row_games['game_time'] > time()) { $arr_userpkt[3]++; }
else if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
else if (($int_tiphome - $int_tipaway) == ($int_goalhome - $int_goalaway)) { $arr_userpkt[1]++; }
else if ((($int_tiphome > $int_tipaway) && ($int_goalhome > $int_goalaway)) || (($int_tiphome < $int_tipaway) && ($int_goalhome < $int_goalaway))) { $arr_userpkt[2]++; }
else { $arr_userpkt[3]++; }
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (isset($int_goalhome) && isset($int_goalaway))
{
if ($row_games['game_time'] > time()) { $arr_userpkt[3]++; }
else if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
else if (($int_tiphome - $int_tipaway) == ($int_goalhome - $int_goalaway)) { $arr_userpkt[1]++; }
else if ((($int_tiphome > $int_tipaway) && ($int_goalhome > $int_goalaway)) || (($int_tiphome < $int_tipaway) && ($int_goalhome < $int_goalaway))) { $arr_userpkt[2]++; }
else { $arr_userpkt[3]++; }
}
#
#-----[ FIND ]------------------------------------------
#
if ($row_games['game_time'] > time()) { $arr_userpkt[3]++; }
else if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
else if (($int_tiphome - $int_tipaway) == ($int_goalhome - $int_goalaway)) { $arr_userpkt[1]++; }
else if ((($int_tiphome > $int_tipaway) && ($int_goalhome > $int_goalaway)) || (($int_tiphome < $int_tipaway) && ($int_goalhome < $int_goalaway))) { $arr_userpkt[2]++; }
else { $arr_userpkt[3]++; }
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (isset($int_goalhome) && isset($int_goalaway))
{
if ($row_games['game_time'] > time()) { $arr_userpkt[3]++; }
else if (($int_tiphome == $int_goalhome) && ($int_tipaway == $int_goalaway)) { $arr_userpkt[0]++; }
else if (($int_tiphome - $int_tipaway) == ($int_goalhome - $int_goalaway)) { $arr_userpkt[1]++; }
else if ((($int_tiphome > $int_tipaway) && ($int_goalhome > $int_goalaway)) || (($int_tiphome < $int_tipaway) && ($int_goalhome < $int_goalaway))) { $arr_userpkt[2]++; }
else { $arr_userpkt[3]++; }
} |
____________ beehave - home of humbug ... [we can't afford to be neutral]
|
|
Nach oben |
|
|
Schreiben: nein. Antworten: nein. Bearbeiten: nein. Löschen: nein. Umfragen: nein.
|