Es ist zum verzweifeln! Ich versuche das Mod Last Login einzufügen. Funzt soweit alles Wunderbar!
Im Profil wird das richtige Datum angezeigt, aber in der Memberlist wird 01.01.1970 angezeit. Woran könnte das liegen?
Hier ist einmal die Installation der Modifikation:
Code: Alles auswählen
##############################################################
## MOD Title: Last Login
## MOD Author: Snakecleaver snakecleaver@1st-geseke-sbvs.de
## MOD Description: Dieser Mod fügt im Profil eine weitere Zeile in der der letzte Login eines User im Forum angezeigt wird
## und in der Mitgliederliste wird die Spalte "Wohnort" mit dem letzten Login ersetzt.
## Dieser MOD ist für Board-Admins gedacht, die faule Eier in ihrer Allianz/ihrem Clan ausfindig
## machen wollen und dabei das phpBB-Board als ihr Ally/Clan-Forum nutzen.
## MOD Version: 1.0.1
## MOD Compatibility: 2.0.6 + 2.0.10
##
## Installation Level: Normal
## Installation Time: 5-10 Minuten
## Files To Edit: 5
## memberlist.php
## /language/lang_german/lang_main.php
## /includes/usercp_viewprofile.php
## /templates/XXXX/memberlist_body.tpl
## /templates/XXXX/profile_view_body.tpl
##
## Included Files: n/a
##
##
##
##############################################################
##
##
##
##
##############################################################
## Author Notes:
## Mein erster MOD.. :)
##
##############################################################
## MOD History:
##
## 01.Nov.2004
## Fehler "Vorletzter Login" wurde behoben
##
## 12.Sep.2004
## Bug in der Sortieroption behoben
##
## 10.Sep.2004
## MOD erstellt
##
##
##
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
/includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------------
#
'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
#
#-----[ ADD BELOW ]------------------------------------------
#
'LASTLOG' => create_date($lang['DATE_FORMAT'], $profiledata['user_session_time'], $board_config['board_timezone']),
#
#-----[ FIND ]------------------------------------------------
#
'L_JOINED' => $lang['Joined'],
#
#-----[ ADD BELOW ]------------------------------------------
#
'L_LASTLOG' => $lang['Last-log'],
#
#-----[ OPEN ]------------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Memberlist sorting
//
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$lang['Sort_Location']
#
#-----[ IN-LINE REPLACE ]------------------------------------------
#
$lang['Last-log']
#
#-----[ FIND ]------------------------------------------------
#
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'location'
#
#-----[ IN-LINE REPLACE ]------------------------------------------
#
'lastlog'
#
#-----[ FIND ]------------------------------------------------
#
'L_JOINED' => $lang['Joined'],
#
#-----[ ADD BELOW ]------------------------------------------
#
'L_LASTLOG' => $lang['Last-log'],
#
#-----[ FIND ]------------------------------------------------
#
case 'location':
$order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
#
#-----[ REPLACE WITH ]------------------------------------------
#
case 'lastlog':
$order_by = "user_lastvisit $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_lastvisit, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_regdate
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_session_time
#
#-----[ FIND ]------------------------------------------------
#
$joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);
#
#-----[ ADD BELOW ]------------------------------------------
#
$lastlog = create_date($lang['DATE_FORMAT'], $row['user_session_time'], $board_config['board_timezone']);
#
#-----[ FIND ]------------------------------------------------
#
'JOINED' => $joined,
#
#-----[ ADD BELOW ]------------------------------------------
#
'LASTLOG' => $lastlog,
#
#-----[ OPEN ]------------------------------------------------
#
/language/lang_german/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
$lang['Joined'] = 'Anmeldungsdatum';
#
#-----[ ADD BELOW ]------------------------------------------
#
$lang['Last-log'] = 'Zuletzt im Forum';
#
#-----[ OPEN ]------------------------------------------------
#
/templates/XXXX/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_JOINED}: </span></td>
<td width="100%"><b><span class="gen">{JOINED}</span></b></td>
</tr>
#
#-----[ ADD BELOW ]------------------------------------------
#
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_LASTLOG}: </span></td>
<td width="100%"><b><span class="gen">{LASTLOG}</span></b></td>
</tr>
#
#-----[ OPEN ]------------------------------------------------
#
/templates/XXXX/memberlist_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
{L_FROM}
#
#-----[ REPLACE WITH ]------------------------------------------
#
{L_LASTLOG}
#
#-----[ FIND ]------------------------------------------------
#
{memberrow.FROM}
#
#-----[ REPLACE WITH ]------------------------------------------
#
{memberrow.LASTLOG}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
Danke im Vorraus!
Gruß
Ray