| Code:
|
#
#-----[ OPEN:]-----------------------------------------
#
/portal.php
#
#-----[ FIND:]-----------------------------------------
#
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
#
#-----[ AFTER, ADD:]-----------------------------------
#
//
// START: Last Seen MOD
//
// START: CONFIGURE NUMBER OF LAST SEEN
//*************************************
$CFG['last_seen'] = '10';
// END: CONFIGURE NUMBER OF LAST SEEN
//*************************************
$sql = "SELECT username, user_id, user_level, user_allow_viewonline, user_lastvisit FROM " . USERS_TABLE. "
WHERE username <> 'Anonymous'
ORDER BY user_lastvisit DESC LIMIT " . $CFG['last_seen'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query last seen information', '', __LINE__, __FILE__, $sql);
}
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_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
}
else
{
$user_online_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 )
{
$template->assign_block_vars('last_seen_row', array(
'L_LSEEN_USERNAME' => $user_online_link,
'L_LSEEN_TIME' => create_date($board_config['default_dateformat'], $row['user_lastvisit'], $board_config['board_timezone']))
);
}
}
//
// END: Last Seen MOD
//
#
#-----[ FIND ]-----------------------------------
#
'WELCOME_TEXT' => $CFG['welcome_text'],
#
#-----[ AFTER ADD ]-----------------------------------
#
'L_LAST_SEEN' => $lang['Last_Seen'],
#
#-----[ OPEN:]-----------------------------------------
#
/language/lang_english/lang_main.php
#
#-----[ FIND:]-----------------------------------------
#
$lang['Vote'] = 'Vote';
$lang['No_poll'] = 'No poll at the moment';
#
#-----[ AFTER, ADD:]-----------------------------------
#
$lang['Last_Seen'] = 'Last Seen';
#
#-----[ OPEN:]-----------------------------------------
#
portal_body.tpl: [All Template Folders]
place block where needed. reference other block docs for details.
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25" colspan="2"><center><span class="genmed"><b>{L_LAST_SEEN}</b></span></center></td>
</tr>
<tr>
<td align="left" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<!-- BEGIN last_seen_row -->
<tr>
<td class="row1" align="left" valign="middle"><span class="gensmall">» <a href="{last_seen_row.U_LSEEN_LINK}">{last_seen_row.L_LSEEN_USERNAME}</a></span></td> </tr>
<tr> <td class="row1" align="left" valign="middle"><span class="gensmall">{last_seen_row.L_LSEEN_TIME} </span></td>
</tr>
<!-- END last_seen_row -->
</table>
</td>
</tr>
</table>
<br />
=============== for smartDark =============================
<table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" colspan="2">{L_LAST_SEEN}</th>
</tr>
<tr>
<td align="left" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<!-- BEGIN last_seen_row -->
<tr>
<td class="row1" align="left" valign="middle"><span class="gensmall">» <a href="{last_seen_row.U_LSEEN_LINK}">{last_seen_row.L_LSEEN_USERNAME}</a></span></td> </tr>
<tr> <td class="row1" align="left" valign="middle"><span class="gensmall">{last_seen_row.L_LSEEN_TIME} </span></td>
</tr>
<!-- END last_seen_row -->
</table>
</td>
</tr>
</table>
<br />
================== for iCGstation ==========================
<table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr><td class="tbtl"><img src="images/spacer.gif" alt="" width="22" height="22" /></td><td class="tbtbot"><span class="genmed"><b>{L_LAST_SEEN}</b></span></td><td class="tbtr"><img src="images/spacer.gif" alt="" width="124" height="22" /></td></tr></table>
<table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline">
<tr>
<td align="left" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<!-- BEGIN last_seen_row -->
<tr>
<td class="row1" align="left" valign="middle"><span class="gensmall">» <a href="{last_seen_row.U_LSEEN_LINK}">{last_seen_row.L_LSEEN_USERNAME}</a></span></td>
<td class="row1" align="right" valign="middle"><span class="gensmall">{last_seen_row.L_LSEEN_TIME} </span></td>
</tr>
<!-- END last_seen_row -->
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
#
#-----[ SAVE/UPLOAD ALL FILES ]------------------------------------------
# EoM
|