Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
shaochun
Mitglied
Beiträge: 42 Registriert: 27.04.2004 11:39
Beitrag
von shaochun » 21.08.2004 22:18
ich bin fast fertig mit installieren des users of the day mod,doch was soll hier gemacht werden :
Code: Alles auswählen
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}
//
// End of MOD
//
thx @ all
shaochun
shaochun
Mitglied
Beiträge: 42 Registriert: 27.04.2004 11:39
Beitrag
von shaochun » 21.08.2004 22:22
das heißt, ich versteh zwar das edit below ( editiere darunter) und das edit above (editiere darüber), doch was ich jetzt genau machen soll und wo ich die codes einbauen soll versteh ich nicht.
shaochun
Mitglied
Beiträge: 42 Registriert: 27.04.2004 11:39
Beitrag
von shaochun » 21.08.2004 22:25
vorher habe ich dieses hier ausgeführt:
Code: Alles auswählen
#
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//
// ############ Edit below ############
...
Andy120
Mitglied
Beiträge: 3430 Registriert: 02.01.2004 11:21
Wohnort: Basel (Schweiz)
Kontaktdaten:
Beitrag
von Andy120 » 21.08.2004 22:28
Poste doch mal bitte die ganze Anleitung... Also den Teil, bei dem du nicht weiter kommst....
Also mit Add after usw...
shaochun
Mitglied
Beiträge: 42 Registriert: 27.04.2004 11:39
Beitrag
von shaochun » 21.08.2004 22:30
der teil mit dem ich net weiterkomme habe ich im ersten Post geschrieben,hier nochmal die ganze anleitung:
Code: Alles auswählen
########################################################
##
## MOD Title: Users of the day
## MOD Version: 2.0
## Author: ZoZo <zozo@etoiles.net>
##
## Description:
## Displays, under the online users list, a list of the users
## who come during the last XX hours. Can also display the list
## of the users who didn't come. (see "Edit below")
##
## Installation Level: easy
## Installation Time: 2-3 minutes
##
## Files To Edit: 3
## - /templates/subSilver/index_body.tpl
## - /language/lang_english/lang_main.php
## - /includes/page_header.php
##
## Included Files: None
##
########################################################
## VERSION HISTORY:
##
## June 20th 2003: v2.0
## 1. The list's delay is customizable, but you must give a number in hours, 24 by default.
## 2. There's now a counter for each list.
## 3. The MOD doesn't display the list of the users who didn't visit by default.
##
## October 28th 2002: v1.1
## 1. The MOD uses the database variable "user_session_time" instead of "user_lastvisit", which is updated only when the user logs out.
##
## October 15th 2002: v1.0
## 1. Created main features.
##
########################################################
## TODO LIST:
##
## 1. Don't restrict the time unit to hours.
##
########################################################
## PLEASE REPORT ANY BUGS OR SUGGESTIONS ##
########################################################
#
#-----[ ACTION: open ]---------------------------------
#
/templates/subSilver/index_body.tpl
#
#-----[ ACTION: find ]---------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
#
#-----[ ACTION: replace by ]---------------------------
#
<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
#
#-----[ ACTION: find ]---------------------------------
#
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
#
#-----[ ACTION: add after ]----------------------------
#
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{USERS_OF_THE_DAY_LIST}</span></td>
#
#-----[ ACTION: repeat for all templates ]-------------
#
#
#-----[ ACTION: open ]--------------------------------
#
/language/lang_english/lang_main.php
#
#-----[ ACTION: find ]--------------------------------
#
$lang['Registered_users'] =
#
#-----[ ACTION: add before ]--------------------------
#
$lang['Day_users'] = '%d registered users visit during the last %d hours:';
$lang['Not_day_users'] = '%d registered users <span style="color:red">DIDN\'T</span> visit during the last %d hours:';
#
#-----[ ACTION: repeat for all languages ]------------
#
#
#-----[ ACTION: open ]--------------------------------
#
/includes/page_header.php
#
#-----[ ACTION: find ]--------------------------------
#
'LOGGED_IN_USER_LIST' => $online_userlist,
#
#-----[ ACTION: add after ]---------------------------
#
'USERS_OF_THE_DAY_LIST' => $day_userlist,
#
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}
//
// End of MOD
//
#
#-----[ ACTION: save/close all ]----------------------
#
#
#-----[ ACTION: upload the modified files ]-----------
#
#
#-----[ ACTION: enjoy ]-------------------------------
#
#
#-----[ PLEASE REPORT ANY BUGS OR SUGGESTIONS]--------
#
Andy120
Mitglied
Beiträge: 3430 Registriert: 02.01.2004 11:21
Wohnort: Basel (Schweiz)
Kontaktdaten:
Beitrag
von Andy120 » 21.08.2004 22:33
Es heisst ja
ACTION: find , dann findest du dies Passage...
Danach fügst du es (Code)
ACTION: add before vor diesen Code...
Code: Alles auswählen
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}
//
// End of MOD
//
shaochun
Mitglied
Beiträge: 42 Registriert: 27.04.2004 11:39
Beitrag
von shaochun » 21.08.2004 22:36
also ist das alles ein Code :
Code: Alles auswählen
//
// Users of the day MOD
//
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}
//
// End of MOD
//
Aber bei "Edit above" muss ich doch garnichts editieren.Nur die Passage bei "edit below" ?
shaochun
Mitglied
Beiträge: 42 Registriert: 27.04.2004 11:39
Beitrag
von shaochun » 21.08.2004 22:40
also wäre der code,den ich einbauen möchte dieser
Code: Alles auswählen
//
// Users of the day MOD
//
//
//
$display_not_day_userlist = 0;
$users_list_delay = 24;
//
//
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY user_level DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br />' . $not_day_userlist;
}
//
// End of MOD
//
Sachen wie
"edit above und below" oder "// change to 1 here if you also want the list of the users who didn't visit to be displayed"
nicht oder ?
Acid
Ehrenadmin
Beiträge: 12195 Registriert: 26.04.2001 02:00
Wohnort: Berlin
Beitrag
von Acid » 21.08.2004 23:31
ja, und hier..
Code: Alles auswählen
$display_not_day_userlist = 0;
$users_list_delay = 24;
..könntest du Einstellungen vornehmen, wenn du was an der Grundeinstellung ändern möchtest.
rabbit
Ehemaliger Übersetzer
Beiträge: 4199 Registriert: 14.06.2003 22:09
Wohnort: Hildesheim
Kontaktdaten:
Beitrag
von rabbit » 22.08.2004 00:56
Code: Alles auswählen
$display_not_day_userlist = 0;
$users_list_delay = 24;
der erste teil fragt dich, ob du auch alle user, die nicht da waren, anzeigen möchtest, oder nur die die da waren. 0=nein; 1=ja
der zweite teil fragt dich, um wieviele stunden du 'zurückblicken' möchtest.