|
|
Autor |
Wiadomość |
Innos
Przywódca
Dołączył: 18 Maj 2013
Posty: 70
Przeczytał: 0 tematów
Pomógł: 18 razy
Ostrzeżeń: 0/5
|
Wysłany:
Czw 15:37, 04 Lip 2013 |
|
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
// Which timezone?
$tz = ($user->data['user_id'] = ANONYMOUS) strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
#
#-----[ AFTER ADD ]------------------------------------------
#
//--- [ + ] --- who viseted today ----
$sql = 'SELECT user_id, username, user_type, user_colour, user_lastvisit
FROM ' . USERS_TABLE . '
WHERE user_type <> 2
AND user_lastvisit >=' . strtotime("-1 day") . '
ORDER BY user_colour DESC';
$result = $db->sql_query($sql);
while( ($row = $db->sql_fetchrow($result)) && ($row['username'] = '') )
{
$last24h_userlist = '';
$user_last24h_link = $row['username'];
if ($row['user_colour'])
{
$user_colour = ' style="color:#' . $row['user_colour'] . '"';
$row['username'] = '<strong>' . $row['username'] . '</strong>';
}
else
{
$user_colour = '';
}
if ($row['user_type'] <> USER_IGNORE)
{
$user_last24h_link = '<a title ="'. $user->format_date($row['user_lastvisit'], $config['default_dateformat'], true) . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) . '"' . $user_colour . '>' . $user_last24h_link . '</a>';
}
else
{
$user_last24h_link = ($user_colour) '<span' . $user_colour . '>' . $user_last24h_link . '</span>' : $user_last24h_link;
}
$last24h_userlist .= ($last24h_userlist = '') ', ' . $user_last24h_link : $user_last24h_link;
if ($last24h_userlist)
{
$$last24h_userlist = $user->lang['NO_ONLINE_USERS'];
}
$template->assign_block_vars('last24h', array(
'LAST24H_USERLIST' => $last24h_userlist,
)
);
}
$db->sql_freeresult($result);
$msql = 'SELECT count(user_id) as total
FROM ' . USERS_TABLE . '
WHERE user_type <> 2
AND user_lastvisit >=' . strtotime("-1 day") . '';
$mresult = $db->sql_query($msql);
if( $mresult )
{
$mrow = $db->sql_fetchrow($mresult);
$wisited_user_count = $mrow['total'];
}
//--- [ - ] --- who viseted today ----
#
#-----[ FIND ]------------------------------------------
#
'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'LAST24H_WISITED_USER_COUNT' => $wisited_user_count,
'WHO_WISITED_TODAY' => $user->lang['WHO_WISITED_TODAY'],
#
#-----[ OPEN ]------------------------------------------
#
index_body.html
#
#-----[ FIND ]------------------------------------------
#
<-- IF S_DISPLAY_ONLINE_LIST -->
<h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
#
#-----[ AFTER, ADD ]------------------------------------------
#
<br />Przez ostatnie 24 godziny byli na forum:<b><br />
<-- BEGIN last24h -->
{last24h.LAST24H_USERLIST},
<-- END last24h_login -->
</b>
#
#-----[ OPEN ]------------------------------------------
#
language/en/common.php
#
#-----[ FIND ]------------------------------------------
#
'WRONG_PASSWORD' => 'You entered an incorrect password.',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'WHO_WISITED_TODAY' => 'Who wisited today',
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
|
Post został pochwalony 0 razy
|
|
|
|
|
|
|
fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB
© 2001/3 phpBB Group :: FI Theme ::
Wszystkie czasy w strefie EET (Europa)
| |