-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
71 lines (59 loc) · 2.88 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
##
##
## Mod title: Online today
##
## Mod version: 1.2.1
## Works on FluxBB: 1.5.0, 1.4.9, 1.4.8, 1.4.7, 1.4.6, 1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.4-rc3
## Release date: 12-08-03
## Review date: 12-08-03
## Author: Daris ([email protected])
## Orginal author: Vincent Garnier a.k.a. vin100 ([email protected])
##
## Description: This MOD makes it possible to post the lists of the members who connected themselves to the forums during the day.
##
## Repository URL: http://fluxbb.org/resources/mods/online-today/
##
## Affected files: index.php
##
## Affects DB: No
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## FluxBB. Installation of this modification is done at
## your own risk. Backup your forum database and any and
## all applicable files before proceeding.
##
##
#
#-------------[ 1. UPLOAD ]-------------------------------------------------------
#
files/lang/English/online_today.php to lang/English/online_today.php
#
#-------------[ 2. OPEN ]--------------------------------------------------------
#
index.php
#
#-------------[ 3. FIND ]--------------------------------------------------------
#
else
echo "\t\t\t".'<div class="clearer"></div>'."\n";
#
#-------------[ 4. AFTER, ADD ]--------------------------------------------------
#
// users online today
if (file_exists(PUN_ROOT.'lang/'.$pun_user['language'].'/online_today.php'))
require PUN_ROOT.'lang/'.$pun_user['language'].'/online_today.php';
else
require PUN_ROOT.'lang/English/online_today.php';
$date = getdate(time());
$todaystamp = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']);
$result = $db->query('SELECT username, id, last_visit FROM '.$db->prefix.'users WHERE last_visit >= '.$todaystamp.' ORDER BY last_visit DESC') or error('Unable to find the list of the users online today', __FILE__, __LINE__, $db->error());
$users_today = array();
while ($user_online_today = $db->fetch_assoc($result))
{
if ($pun_user['g_view_users'] == '1')
$users_today[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$user_online_today['id'].'" title="'.sprintf($lang_online_today['Last visit'], pun_htmlspecialchars($user_online_today['username']), format_time($user_online_today['last_visit'])).'">'.pun_htmlspecialchars($user_online_today['username']).'</a>';
else
$users_today[] = "\n\t\t\t\t".'<dd><span title="'.sprintf($lang_online_today['Last visit'], pun_htmlspecialchars($user_online_today['username']), format_time($user_online_today['last_visit'])).'">'.pun_htmlspecialchars($user_online_today['username']).'</span>';
}
if (count($users_today) > 0)
echo "\t\t\t".'<dl id="onlinelist" class="clearb">'."\n\t\t\t\t".'<dt><strong>'.$lang_online_today['Online today'].' </strong></dt>'.implode(',</dd> ', $users_today).'</dd>'."\n\t\t\t".'</dl>'."\n";