Probleme mit Firefox und dem "Wer ist Online" Mod
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.
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.
Probleme mit Firefox und dem "Wer ist Online" Mod
Hi
Ich habe ein sehr komisches Problem. Wenn ich mit dem IE auf meine Portal seite gehe (ezportal) wird der "Wer ist Online?" MOD normal angezeigt und es läuft ganz langsam ein Name nach dem anderen durch. Wenn ich mit dem firefox draufgehe Prassen die Namen nur so da durch das man nix erkennen kann. Woran kann das liegen? Bzw wie kann ich das beheben?
Ich habe ein sehr komisches Problem. Wenn ich mit dem IE auf meine Portal seite gehe (ezportal) wird der "Wer ist Online?" MOD normal angezeigt und es läuft ganz langsam ein Name nach dem anderen durch. Wenn ich mit dem firefox draufgehe Prassen die Namen nur so da durch das man nix erkennen kann. Woran kann das liegen? Bzw wie kann ich das beheben?
-
- Mitglied
- Beiträge: 3907
- Registriert: 17.07.2002 14:03
- Wohnort: Graz
firefox hat offenbar eine andere scrollgeschwindigkeit, das hab ich bei meinem newsblock hack schon miterlebt. du kannst nur das script abändern, so dass firefox das auch richtig darstellt. aber die meisten scripts sind auf ie ausgelegt... das heißt du müsstest mal das script raussuchen oder die entsprechende datei hier reinverlinken.
A Bus Station is where buses stop. A Train Station is where trains stop. On my desk, there is a Work Station.
ich glaube das müsste diese Stelle hier sein in der portal_body.tpl :
Code: Alles auswählen
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<TR>
<TD class=catHead height=25><div align="left"><SPAN
class=genmed><B>Wer war Online?</B></SPAN></div></TD></TR>
<TR>
<tr>
<td class="row1" align="center"><span class="genmed">{FEROZ_DAY_LIST}</span></td>
</tr>
</table>
<br />
-
- Mitglied
- Beiträge: 3907
- Registriert: 17.07.2002 14:03
- Wohnort: Graz
Hi,
ich glaube du hast mich falsch verstanden... was gesucht ist, ist nicht der Anzeigeteil aus der tpl Datei, sondern der Teil in dem programmiert ist, was die Anzeige machen soll. Die Datei musst du finden und verlinken. Dann kann dir auch eher geholfen werden.
ich glaube du hast mich falsch verstanden... was gesucht ist, ist nicht der Anzeigeteil aus der tpl Datei, sondern der Teil in dem programmiert ist, was die Anzeige machen soll. Die Datei musst du finden und verlinken. Dann kann dir auch eher geholfen werden.
A Bus Station is where buses stop. A Train Station is where trains stop. On my desk, there is a Work Station.
Ich poste hier mal die install:
ich hoffe das hilft
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
portal.php
#
#-----[ FIND ]------------------------------------------
#
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
//start top poster
//
$total_poster = '3'; // total of top poster
$avatar_height = '45'; // the avatar's height
$sql = "SELECT username, user_id, user_posts, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_posts DESC LIMIT $total_poster";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$username = $row['username'];
$user_id = $row['user_id'];
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
$poster_avatar = '';
if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
{
switch( $row['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" height="' . $avatar_height . '" />' : '';
break;
case USER_AVATAR_REMOTE:
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" height="' . $avatar_height . '" />' : '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" height="' . $avatar_height . '" />' : '';
break;
}
}
$template->assign_block_vars('topposter', array(
'USERNAME' => $username,
'POSTS' => $posts,
'AVATAR_IMG' => $poster_avatar,
'U_VIEWPOSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
);
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
//
//end top poster
//
#
#-----[ FIND ]------------------------------------------
#
'L_VOTE_BUTTON' => $lang['Vote'],
#
#-----[ AFTER ADD ]-----------------------------------
#
// Top Poster
'L_TOP_POSTER' => $lang['Top_poster'],
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/portal_body.tpl
#
#-----[ FIND ]----------------------------------------
#
# Make sure to edit this file for every theme installed
# You can place the block wherever you want. I put it under the poll block
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_POLL}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<form method="post" action="{S_POLL_ACTION}">
<center><b>{S_POLL_QUESTION}</b></center><br />
<!-- BEGIN poll_option_row -->
<input type="radio" name="vote_id" value="{poll_option_row.OPTION_ID}">{poll_option_row.OPTION_TEXT} [{poll_option_row.VOTE_RESULT}]<br />
<!-- END poll_option_row -->
<br />
<!-- BEGIN switch_user_logged_out -->
<center>{L_LOGIN_TO_VOTE}</center>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
<input type="hidden" name="mode" value="vote">
<!-- END switch_user_logged_in -->
</form><br />
</span></td>
</tr>
</table>
<br />
#
#-----[ AFTER ADD ]-----------------------------------
#
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" align ="left" colspan="2" nowrap="nowrap"><span class="genmed"><b>{L_TOP_POSTER}</b></td>
</tr>
<!-- BEGIN topposter -->
<tr>
<td class="row1" align="right" valign="middle" width="30%"><span class="gen"><a href="{topposter.U_VIEWPOSTER}" class="gen">{topposter.AVATAR_IMG}</a></span></td>
<td class="row1" align="center" valign="middle"width="70%"><span class="genmed">{topposter.USERNAME} ({topposter.POSTS})</span></td>
</tr>
<!-- END topposter -->
</table>
<br />
#
#-----[ OPEN ]--------------------------------------------
#
# Make sure to edit this file for every language installed
#
#
language/lang_english/lang_main.php
#
#-----[ FIND ]--------------------------------------------
#
//
// That's all, Folks!
//
#
#-----[ BEFORE, ADD ]--------------------------------------
#
// TopPoster Mod
$lang['Top_poster'] = 'Top Poster';
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
-
- Mitglied
- Beiträge: 3907
- Registriert: 17.07.2002 14:03
- Wohnort: Graz
sorry ich habe dir die falsche install gepostet ich trottel!!
so hier die richtige:
so hier die richtige:
Code: Alles auswählen
##############################################################
## MOD Title: Last visit
## MOD Author: Niels < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
## MOD Author, Secondary: acoolwelshbloke < acoolwelshbloke@yahoo.com > (Paul Norman) http://www.tec2spec.co.uk/forum/
## MOD Description: This mod will register when the user last logged in, allong with the info about how many users have visited the board.
## MOD Version: 1.2.9em
## MOD Compatibility: 2.0.18 - 2.0.19
##
## Installation Level: Intermediate
## Installation Time: 25 minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit: 14
## index.php
## memberlist.php
## search.php
## admin/admin_board.php
## includes/functions.php
## includes/page_header.php
## includes/sessions.php
## includes/usercp_viewprofile.php
## language/lang_english/lang_admin.php
## language/lang_english/lang_main.php
## templates/subSilver/index_body.tpl
## templates/subSilver/member_body.tpl
## templates/subSilver/profile_view_body.tpl
## templates/subSilver/admin/board_config_body.tpl
##
## Included Files: 0
##
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## 1. EasyMOD
## -----------
## This MOD is compatible with EasyMOD and can be installed
## by it but is not yet certified EMC (EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## Warning 1! At the minimum, you need EasyMOD beta 1 (0.3.0)
## + this fix...
## http://area51.phpbb.com/phpBB/viewtopic.php?sid=&p=130605#130605
## ...or more recent to install this MOD by EM!
##
## Warning 2! At the present time, EM is not able to install
## automatically other languages than English.
## This gap will be solved in future releases but in the meantime,
## if you need to install any other language than English provides
## with this MOD, please proceed manually (cf. comments in
## the DIY action).
##
## 2. Compatibility
## -----------
## This MOD is phpBB 2.0.19 compliant (prior release not tested)
##
## 3. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://mods.db9.dk/viewtopic.php?t=5
##
##############################################################
##
## MOD History:
##
## 2005-12-16 - Version 1.2.9
## - phpBB template & EasyMOD compliance enhancement
## - Upgrade the instructions to be phpBB 2.0.19 compliant
##
## 2003-12-15 - Version 1.2.8
## - phpBB template & EasyMOD compliance enhancement
## - Chinese Traditional Taiwan, Danish, Deutsch, Dutch,
## French, Hungarian, Italian, Polish & Thai translations
## now provide with the MOD
##
## 2003-08-10 - Version 1.2.7
## - search.php was missing - now added again
##
## 2003-08-10 - Version 1.2.6
## - Merge part 1, 2, 3 & 4
## - Add French translation if needed
## - Update instructions to work with 2.0.5/2.0.6
## - How-to rewrite to be EasyMOD compatible
##
## ????-??-?? - Version 1.2.5
## - change the code in index.php - minor speed different
##
## ????-??-?? - Version 1.2.4
## - add, posibilty to log guest users time
##
## ????-??-?? - Version 1.2.3
## - removed som added code in session.php
##
## ????-??-?? - Version 1.2.2
## - fixed that guest users was not counted rigth if
## mixed timezones
##
## ????-??-?? - Version 1.2.1
## - typo, missed a comma in session.php
##
## ????-??-?? - Version 1.2.0
## - BETA for phpBB2 version 2.0.2.
##
## ????-??-?? - Version 1.0.19
## - guest was still beeing reset, new change to
## session.php $dato
##
## ????-??-?? - Version 1.0.18
## - fixed session.php that guest users are reset from
## the "today list"
##
## ????-??-?? - Version 1.0.17
## - moved some changes from page_header.php over to
## index.php, for incresed performance
##
## ????-??-?? - Version 1.0.16
## - missed something in the page_header.php file
##
## ????-??-?? - Version 1.0.15
## - added extra feature, that how meny guest visited
## the board today are also countet
##
## ????-??-?? - Version 1.0.14
## - fixed that the language part was missing from the
## last hour addition
##
## ????-??-?? - Version 1.0.13
## - Now includes the number of users witch have visited
## the board the last hour
##
## ????-??-?? - Version 1.0.12
## - corection to follow phpBB2 coding guidelines
##
## ????-??-?? - Version 1.0.11
## - corrected a typo in how timezones are handled
##
## ????-??-?? - Version 1.0.10
## - History started, change in how timezones are handled
##
## ????-??-?? - Version 1.0.0
## - initial release for RC-2
##
## ????-??-?? - Version 0.9.0
## - initial BETA for RC-2
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------------
#
#
# This MOD needs a database update.
#
# copy last_visit_update.php to /phpbbRootDir/last_visit_update.php
#
# Once you have copied the above file to your phpBB root
# directory, run it with your navigator as shown below...
#
# http://www.yourWebSite.xxx/phpbbRootDir/last_visit_update.php
#
# Once this step has been completed you need to delete it from the
# phpBB root directory!!!
#
# Please, do it NOW! Before editing phpBB files by EM or manually!!!
# Otherwise, you may have an error message during your next
# connection.
#
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Start output of page
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Last visit MOD
$time_now=time();
$time1Hour=$time_now-3600;
$minutes = date('is', $time_now);
$hour_now = $time_now - (60*($minutes[0].$minutes[1])) - ($minutes[2].$minutes[3]);
$dato=create_date('H', $time_now,$board_config['board_timezone']);
$timetoday = $hour_now - (3600*$dato);
$sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399).' GROUP BY session_ip';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve guest user today data", "", __LINE__, __FILE__, $sql);
while( $guest_list = $db->sql_fetchrow($result))
{
if ($guest_list['session_time'] >$time1Hour) $users_lasthour++;
}
$guests_today = $db->sql_numrows($result);
$sql = 'SELECT user_id,username,user_allow_viewonline,user_level,user_lastlogon FROM ' . USERS_TABLE . ' WHERE user_id!="'.ANONYMOUS.'" AND user_session_time >= '.$timetoday.' AND user_session_time< '.($timetoday+86399).' ORDER BY username';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve user today data", "", __LINE__, __FILE__, $sql);
while( $todayrow = $db->sql_fetchrow($result))
{
$style_color = "";
if ($todayrow['user_lastlogon']>=$time1Hour)
{
$users_lasthour++;
}
switch ($todayrow['user_level'])
{
case ADMIN :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
}
$users_today_list.=( $todayrow['user_allow_viewonline'])?' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'>' . $todayrow['username'] . '</a>,' : (($userdata[user_level]==ADMIN) ? ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'><i>' . $todayrow['username'] . '</i></a>,' : '');
if (!$todayrow['user_allow_viewonline']) $logged_hidden_today++;
else $logged_visible_today++;
}
if ($users_today_list)
{
$users_today_list[ strlen( $users_today_list)-1] = ' ';
} else
{
$users_today_list = $lang['None'];
}
$total_users_today = $db->sql_numrows($result)+$guests_today;
$users_today_list = $lang['Registered_users'].' ' . $users_today_list;
$l_today_user_s = ($total_users_today) ? ( ( $total_users_today == 1 )? $lang['User_today_total'] : $lang['Users_today_total'] ) : $lang['Users_today_zero_total'];
$l_today_r_user_s = ($logged_visible_today) ? ( ( $logged_visible_today == 1 ) ? $lang['Reg_user_total'] : $lang['Reg_users_total'] ) : $lang['Reg_users_zero_total'];
$l_today_h_user_s = ($logged_hidden_today) ? (($logged_hidden_today == 1) ? $lang['Hidden_user_total'] : $lang['Hidden_users_total'] ) : $lang['Hidden_users_zero_total'];
$l_today_g_user_s = ($guests_today) ? (($guests_today == 1) ? $lang['Guest_user_total'] : $lang['Guest_users_total']) : $lang['Guest_users_zero_total'];
$l_today_users = sprintf($l_today_user_s, $total_users_today);
$l_today_users .= sprintf($l_today_r_user_s, $logged_visible_today);
$l_today_users .= sprintf($l_today_h_user_s, $logged_hidden_today);
$l_today_users .= sprintf($l_today_g_user_s, $guests_today);
// End add - Last visit MOD
#
#-----[ FIND ]------------------------------------------------
#
'FORUM_LOCKED_IMG' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
'USERS_TODAY_LIST' => $users_today_list,
'L_USERS_LASTHOUR' =>($users_lasthour)?sprintf($lang['Users_lasthour_explain'],$users_lasthour):$lang['Users_lasthour_none_explain'],
'L_USERS_TODAY' =>$l_today_users,
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------------
#
$mode_types_text =
#
#-----[ IN-LINE FIND ]----------------------------------------
#
$lang['Sort_Joined']
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, $lang['Last_logon']
#
#-----[ FIND ]------------------------------------------------
#
$mode_types =
#
#-----[ IN-LINE FIND ]----------------------------------------
#
'joined'
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, 'lastlogon'
#
#-----[ FIND ]------------------------------------------------
#
for($i = 0
#
#-----[ IN-LINE FIND ]----------------------------------------
#
0
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
($userdata['user_level'] == ADMIN ) ? 0:1
#
#-----[ FIND ]------------------------------------------------
#
'L_JOINED' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
'L_LOGON' => $lang['Last_logon'],
// End add - Last visit MOD
#
#-----[ FIND ]------------------------------------------------
#
case 'joined':
$order_by =
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
case 'lastlogon':
$order_by = ($userdata['user_level'] == ADMIN ) ? "user_lastlogon $sort_order LIMIT $start, " . $board_config['topics_per_page'] : "username $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
// End add - Last visit MOD
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT username
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, user_regdate
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_lastlogon, user_allow_viewonline
#
#-----[ FIND ]------------------------------------------------
#
'JOINED' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
'LAST_LOGON' => ($userdata['user_level'] == ADMIN || (!$board_config['hidde_last_logon'] && $row['user_allow_viewonline'])) ? (($row['user_lastlogon'])? create_date($board_config['default_dateformat'], $row['user_lastlogon'], $board_config['board_timezone']):$lang['Never_last_logon']):$lang['Hidde_last_logon'],
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT session_id
FROM " . SESSIONS_TABLE;
#
#-----[ REPLACE WITH ]----------------------------------------
#
// Start replacement - Last visit MOD
$expiry_time = $current_time - $board_config['session_length'];
$sql = "SELECT session_id
FROM " . SESSIONS_TABLE ." WHERE session_time>$expiry_time";
// Start replacement - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
$prune_no = (
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
$hidde_last_logon_yes = ( $new['hidde_last_logon'] ) ? "checked=\"checked\"" : "";
$hidde_last_logon_no = ( !$new['hidde_last_logon'] ) ? "checked=\"checked\"" : "";
// End add - Last visit MOD
#
#-----[ FIND ]------------------------------------------------
#
"L_ENABLE_PRUNE" =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
"L_HIDDE_LAST_LOGON" => $lang['Hidde_last_logon'],
"L_HIDDE_LAST_LOGON_EXPLAIN" => $lang['Hidde_last_logon_expain'],
// End add - Last visit MOD
#
#-----[ FIND ]------------------------------------------------
#
"PRUNE_NO" =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
"HIDDE_LAST_LOGON_YES" => $hidde_last_logon_yes,
"HIDDE_LAST_LOGON_NO" => $hidde_last_logon_no,
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Last visit MOD
function make_hours($base_time)
{
global $lang;
$years = floor($base_time/31536000);
$base_time = $base_time - ($years*31536000);
$weeks = floor($base_time/604800);
$base_time = $base_time - ($weeks*604800);
$days = floor($base_time/86400);
$base_time = $base_time - ($days*86400);
$hours = floor($base_time/3600);
$base_time = $base_time - ($hours*3600);
$min = floor($base_time/60);
$sek = $base_time - ($min*60);
if ($sek<10) $sek ='0'.$sek;
if ($min<10) $min ='0'.$min;
if ($hours<10) $hours ='0'.$hours;
$result=(($years)?$years.' '.(($years==1)?$lang['Year']:$lang['Years']).', ':'').
(($years || $weeks)?$weeks.' '.(($weeks==1)?$lang['Week']:$lang['Weeks']).', ':'').
(($years || $weeks || $days) ? $days.' '.(($days==1)?$lang['Day']:$lang['Days']).', ':'').
(($hours)?$hours.':':'00:').(($min)?$min.':' :'00:').$sek;
return ($result)?$result:$lang['None'];
}
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Get basic
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Last visit MOD
if ( !$userdata['user_level']==MOD )
{
$template->assign_block_vars('switch_user_is_not_moderator', array());
} else
{
$template->assign_block_vars('switch_user_is_moderator', array());
}
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------------
#
if (
{
$last_visit = (
#
#-----[ IN-LINE FIND ]----------------------------------------
#
if
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ FIND ]------------------------------------------------
#
if (!$admin)
{
$sql = "UPDATE " . USERS_TABLE . "
SET
#
#-----[ IN-LINE FIND ]----------------------------------------
#
user_lastvisit = $last_visit
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_lastlogon = " . time() . ", user_totallogon=user_totallogon+1
#
#-----[ FIND ]------------------------------------------------
#
$sessiondata['userid'] = $user_id;
}
#
#-----[ IN-LINE FIND ]----------------------------------------
#
}
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ FIND ]------------------------------------------------
#
if ( !empty($session_id) )
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
$expiry_time = $current_time - $board_config['session_length'] ;
// End add - Last visit MOD
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.*, s.*
FROM
WHERE
AND
#
#-----[ IN-LINE FIND ]----------------------------------------
#
";
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
AND session_time > $expiry_time
#
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
#
#-----[ IN-LINE FIND ]----------------------------------------
#
if
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ FIND ]----------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $thispage_id
#
#-----[ IN-LINE FIND ]----------------------------------------
#
$thispage_id
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_totalpages = user_totalpages+1, user_totaltime = user_totaltime+($current_time-".$userdata['session_time'].")
#
#-----[ FIND ]----------------------------------------
#
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ REPLACE WITH ]---------------------------------
#
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
//}
#
#-----[ FIND ]------------------------------------------------
#
WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
#
#-----[ IN-LINE FIND ]----------------------------------------
#
session_time < ' . (time() - (int) $board_config['session_length']) . "
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
' . "UNIX_TIMESTAMP() - session_time >=172800
#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------------
#
'JOINED' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Last visit MOD
'L_LOGON' => $lang['Last_logon'],
'LAST_LOGON' => ($userdata['user_level'] == ADMIN || (!$board_config['hidde_last_logon'] && $profiledata['user_allow_viewonline'])) ? (($profiledata['user_lastlogon'])? create_date($board_config['default_dateformat'], $profiledata['user_lastlogon'], $board_config['board_timezone']):$lang['Never_last_logon']):$lang['Hidde_last_logon'],
'L_TOTAL_ONLINE_TIME' => $lang['Total_online_time'],
'TOTAL_ONLINE_TIME' => make_hours($profiledata['user_totaltime']),
'L_LAST_ONLINE_TIME' => $lang['Last_online_time'],
'LAST_ONLINE_TIME' => make_hours($profiledata['user_session_time']-$profiledata['user_lastlogon']),
'L_NUMBER_OF_VISIT' => $lang['Number_of_visit'],
'NUMBER_OF_VISIT' => ($profiledata['user_totallogon']>0) ? $profiledata['user_totallogon']: $lang['None'],
'L_NUMBER_OF_PAGES' => $lang['Number_of_pages'],
'NUMBER_OF_PAGES' => ($profiledata['user_totalpages']) ? $profiledata['user_totalpages']: $lang['None'],
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Last visit MOD
$lang['Hidde_last_logon'] = "Hidden last logon time";
$lang['Hidde_last_logon_expain'] = "If this is set to yes, users last logon time, is hidden to other users except administrators";
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Last visit MOD
$lang['Last_logon'] = 'Last Visit';
$lang['Hidde_last_logon'] = 'Hidden';
$lang['Never_last_logon'] = 'Never';
$lang['Users_today_zero_total'] = 'In total <b>0</b> users have visited this site today :: ';
$lang['Users_today_total'] = 'In total <b>%d</b> user have visited this site today :: ';
$lang['User_today_total'] = 'In total <b>%d</b> users have visited this site today :: ';
$lang['Users_lasthour_explain'] = ', %d of them within the last hour.';
$lang['Users_lasthour_none_explain'] = ''; //showen of none have visited the last hour, fill if you like
$lang['Years'] = 'Years';
$lang['Year'] = 'Year';
$lang['Weeks'] = 'Weeks';
$lang['Week'] = 'Week';
$lang['Day'] = 'Day';
$lang['Total_online_time'] = 'Total Online Duration';
$lang['Last_online_time'] = 'Last Online Duration';
$lang['Number_of_visit'] = 'Number of visits';
$lang['Number_of_pages'] = 'Number of page hits';
// End add - Last visit MOD
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/memberlist_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
{L_POSTS}
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Last visit MOD -->
<th class="thTop" nowrap="nowrap">{L_LOGON}</th>
<!-- End add - Last visit MOD -->
#
#-----[ FIND ]------------------------------------------------
#
{memberrow.POSTS}
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Last visit MOD -->
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.LAST_LOGON}</span></td>
<!-- End add - Last visit MOD -->
#
#-----[ FIND ]------------------------------------------------
#
<td class="catBottom"
#
#-----[ IN-LINE FIND ]----------------------------------------
#
colspan="8"
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
colspan="9"
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<td width="100%"><b><span class="gen">{JOINED}</span></b></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Last visit MOD -->
<tr>
<td valign="middle" align="right"><span class="gen">{L_LOGON}: </span></td>
<td width="100%"><b><span class="gen">{LAST_LOGON}</span></b></td>
</tr>
<!-- BEGIN switch_user_is_moderator -->
<tr>
<td valign="middle" align="right"><span class="gen">{L_TOTAL_ONLINE_TIME}: </span></td>
<td width="100%"><b><span class="gen">{TOTAL_ONLINE_TIME}</span></b></td>
</tr>
<tr>
<td valign="middle" align="right"><span class="gen">{L_LAST_ONLINE_TIME}: </span></td>
<td width="100%"><b><span class="gen">{LAST_ONLINE_TIME}</span></b></td>
</tr>
<tr>
<td valign="middle" align="right"><span class="gen">{L_NUMBER_OF_VISIT}: </span></td>
<td width="100%"><b><span class="gen">{NUMBER_OF_VISIT}</span></b></td>
</tr>
<tr>
<td valign="middle" align="right"><span class="gen">{L_NUMBER_OF_PAGES}: </span></td>
<td width="100%"><b><span class="gen">{NUMBER_OF_PAGES}</span></b></td>
</tr>
<!-- END switch_user_is_moderator -->
<!-- End add - Last visit MOD -->
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
{PRUNE_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Last visit MOD -->
<tr>
<td class="row1">{L_HIDDE_LAST_LOGON}<br /><span class="gensmall">{L_HIDDE_LAST_LOGON_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="hidde_last_logon" value="1" {HIDDE_LAST_LOGON_YES} /> {L_YES} <input type="radio" name="hidde_last_logon" value="0" {HIDDE_LAST_LOGON_NO} /> {L_NO}</td>
</tr>
<!-- End add - Last visit MOD -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM