PDA

View Full Version : Members who have visited today (with last 24 hours option).


Pages : 1 2 [3]

Nokia Tech
08-31-2005, 07:01 PM
Just had Jelsoft update my VB today, Oohh, I lost this in the update..

Not for long though, In it goes again..

Nice feature, Keep up the good work.... Thanks

hotwheels
08-31-2005, 09:44 PM
Installed.........Great hack

Mikecp421
09-05-2005, 08:27 PM
installed! worked great! thanks

mfizzel
09-07-2005, 02:07 AM
is there anyway to make the tab closed by default? When you have 900+ members visiting daily it's a huge frickin' list...

I only ask cause I fear some members may not realize they can close the tabs themselves...I'd also like it closed for guests, it just looks cleaner.

mfizzel
09-07-2005, 02:14 AM
also, when I run the query I get this error:

Table 'mysitename.user' doesn't exist

any idea?

Paul M
09-07-2005, 02:16 AM
is there anyway to make the tab closed by default? When you have 900+ members visiting daily it's a huge frickin' list...

I only ask cause I fear some members may not realize they can close the tabs themselves...I'd also like it closed for guests, it just looks cleaner.The way to do this is buried in this thread somewhere (or the 3.5.0 version, I can't remember which). I don't have time to search the thread atm, maybe later today. Of course, you a free to search yourself. :)

Paul M
09-07-2005, 02:17 AM
also, when I run the query I get this error:

Table 'mysitename.user' doesn't exist

any idea?Presumably you have a table prefix so you need to add that to the table name in the command. BTW, feel free to click on install if you have. :)

ReZ
09-09-2005, 02:27 PM
Can this display the amount of members who logged in within the last 48 hours etc? Basically can i increase the time frame from "24"?

Paul M
09-09-2005, 03:52 PM
Can this display the amount of members who logged in within the last 48 hours etc? Basically can i increase the time frame from "24"?You could, just by uncommenting the '24 hour' line and changing the value in it. However, it would make the time displayed when you hover over a member a bit confusing.

ReZ
09-09-2005, 05:54 PM
Ok, thanks for replying ^

armstrong
09-10-2005, 02:11 AM
Worked fine. Thanks! *clicks install*

ZeryabPhone
09-12-2005, 11:33 PM
the old version of this hack work fine with me i just reinstall it today when i finish my vb upgrade to v3.0.9

Regards

tomf688
09-13-2005, 12:34 AM
Is there any way I can display the total number of visitors including guests in the "total users online today" box? Basically I'm looking at how it says in the "currently active users" box: Currently Active Users: 13 (6 members and 7 guests).

Paul M
09-13-2005, 02:27 AM
Is there any way I can display the total number of visitors including guests in the "total users online today" box? Basically I'm looking at how it says in the "currently active users" box: Currently Active Users: 13 (6 members and 7 guests).Hi, you are not showing as having this installed ? - Anyway, if I understand your question correctly then nope, there is no mechanism to count the total guests each day.

Quillz
09-13-2005, 02:29 AM
Great hack, thanks!

tomf688
09-13-2005, 10:27 AM
Hi, you are not showing as having this installed ? - Anyway, if I understand your question correctly then nope, there is no mechanism to count the total guests each day.

Ah ok, thanks. Still a good hack though. ;)

SamirDarji
09-13-2005, 02:57 PM
Hi, you are not showing as having this installed ? - Anyway, if I understand your question correctly then nope, there is no mechanism to count the total guests each day.This is the 3rd time I've seen this request. I know phpbb does it in one of their versions/addons. How do they do it? How is it different than in vb? I'm just curious as to why it is not possible/too difficult to do.

Paul M
09-13-2005, 04:07 PM
vB does not keep an historic record of guests, so there is no way to count them.

SamirDarji
09-13-2005, 04:41 PM
How hard would it be to code such a system?

RaceJunkie
09-15-2005, 02:12 AM
Any way to keep guests from seeing it? I have no clicked in the Admincp for guests to see whos online.

Paul M
09-15-2005, 02:38 AM
Surround the template code in a check like this ;

<if condition="$bbuserinfo[userid]">

... template code ...

</if>

Paul M
09-15-2005, 02:39 AM
How hard would it be to code such a system?Not a quick job. You could always start a topic in the requests forum.

Sarver
09-16-2005, 04:04 PM
Will this "Hack" work for V. 3.0.7?

cause this is exactly what i want, but it says v. 3.0.9 , so i want to know if it will still work for me :)


Thanks

-Sarv.

Paul M
09-16-2005, 04:10 PM
It will work on any 3.0.x version.

Tulsa
09-16-2005, 11:41 PM
I'm using 3.07 currently and my members love it!

Thanks! :)

caliman
09-17-2005, 01:00 AM
Possible bug?

I am not sure but it appears that the sql command affects whether threads are shown in bold or not. Example. When I posted a reply to a post it still showed the thread title in bold even though I was the last to post and had look at it. Is there a way to remove the sql?

EDIT - hmm perhaps I posted on thread prior to running the sql command for lastactivity. This might explain it.

Paul M
09-17-2005, 08:20 AM
The sql adds an index to the user table, it cannot affect how threads are displayed. :)

SCRIPT3R
09-17-2005, 04:40 PM
<-- clicks INSTALL :)

RWDF1
09-21-2005, 09:18 AM
is their any version of this for 3.5.xxx I used it on 3.0.xxx and loved it, it was a very handy tool to see who was visiting the forum, but not post, and since I am not online 24hours per day, its hard to see who has been on and not posted.

Boofo
09-21-2005, 09:36 AM
is their any version of this for 3.5.xxx I used it on 3.0.xxx and loved it, it was a very handy tool to see who was visiting the forum, but not post, and since I am not online 24hours per day, its hard to see who has been on and not posted.

https://vborg.vbsupport.ru/showthread.php?s=&threadid=82769

Hint: Aways check the author's profile for the prior version. Chances are, he upgraded it for the new version. ;)

pedrovazquez10
09-21-2005, 09:49 AM
how to view it only admin thanks!

mustang_lex
09-21-2005, 11:32 AM
It took me 2 minutes to install this!!!! I have tons of hacks and I'm surprised I waited this long for this one and yes it works for 3.0.7. I lvoe it. Thanks... Clicked install

Gizmo99
09-21-2005, 07:47 PM
Installed Whicked :)

Paul M
09-21-2005, 09:53 PM
how to view it only admin thanks!Surround the hacks template code with a check like this ;

<if condition="$bbuserinfo[userid] == 6">

... template code ...

</if>

pedrovazquez10
09-22-2005, 07:24 AM
thank! its works but we are 3 admin and only view one how to view the 3 thanks

pedrovazquez10
09-22-2005, 08:49 AM
<if condition="$bbuserinfo[usergroupid] == 6">

its work for admin group 6, but not view group 5 what is the code for this ??

pedrovazquez10
09-22-2005, 03:26 PM
upssss

Paul M
09-22-2005, 06:17 PM
upsssseh ?

pedrovazquez10
09-23-2005, 12:49 AM
Pardon but my English one is not good and i want to do a question but I saw that was not in this section and I am wrong it I sit a greeting

Paul M
09-23-2005, 01:17 AM
<if condition="$bbuserinfo[usergroupid] == 6">

its work for admin group 6, but not view group 5 what is the code for this ??Group 5 is not administrators, which is what you asked. To do more than one group try this;

<if condition=" in_array($bbuserinfo[usergroupid],array('5,6') ">

pedrovazquez10
09-23-2005, 05:18 AM
Parse error: parse error, unexpected ':' in /home/httpd/vhosts/myforum.com/httpdocs/includes/adminfunctions_template.php(3098) : eval()'d code on line 157

this is the messaje give after paste this code
<if condition=" in_array($bbuserinfo[usergroupid],array('5,6') ">

thanks!

Paul M
09-23-2005, 09:53 AM
Parse error: parse error, unexpected ':' in /home/httpd/vhosts/myforum.com/httpdocs/includes/adminfunctions_template.php(3098) : eval()'d code on line 157


this is the messaje give after paste this code
<if condition=" in_array($bbuserinfo[usergroupid],array('5,6') ">

thanks!

Try ;

<if condition="in_array($bbuserinfo[usergroupid],array(5,6)">

pedrovazquez10
09-23-2005, 11:59 AM
Try ;

<if condition="in_array($bbuserinfo[usergroupid],array(5,6)">


Parse error: parse error, unexpected ':' in /home/httpd/vhosts/myforum.com/httpdocs/includes/adminfunctions_template.php(3098) : eval()'d code on line 157

Line 157 of adminfunctions_template.php ----> return 'col-c';



same error :disappointed: thanks! for help

Paul M
09-23-2005, 12:12 PM
I give up - I can't see what's wrong with that, just use the old fashioned method ;

<if condition="$bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 5">

If you have an error now then there is something else wrong with your template.

pedrovazquez10
09-23-2005, 03:54 PM
I give up - I can't see what's wrong with that, just use the old fashioned method ;

<if condition="$bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 5">

If you have an error now then there is something else wrong with your template.


Ok this method works thanks!

pedrovazquez10
09-23-2005, 03:57 PM
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>

<style type="text/css">
#vbpopup { position:absolute; height:1; width:1px; top:0; left:0; }
</style>
<if condition="$show['guest']"><script type="text/javascript" src="clientscript/vbulletin_vbpopup.js"></script></if>
</head><body>
$header
$navbar

<!-- main -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<if condition="$show['guest']">
<!-- guest welcome message -->
<tr>
<td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
</tr>
<tr>
<td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
<phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
</td>
</tr>
<!-- / guest welcome message -->
</if>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead>
$forumbits
<tbody>
<tr>
<td class="tfoot" align="center" colspan="
<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
<a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a>
&nbsp; &nbsp;
<a href="showgroups.php?$session[sessionurl]">$vbphrase[view_forum_leaders]</a>
</strong></div></td>
</tr>
</tbody>
</table>
<!-- /main -->
<CENTER><embed src="http://www.foroateneo.com/html/webamigas.swf" width="800" height="119" quality="best" type="application/x-shockwave-flash"></CENTER>
<br />
<br />

<!-- what's going on box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
</tr>
</thead>
<if condition="$show['loggedinusers']">
<!-- logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
<a href="online.php?$session[sessionurl]">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end logged-in users -->


<!-- Todays posters -->

<if condition="$bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 5">

<tbody>
<tr>

<td class="thead" colspan="2">

<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayposters')"><img id="collapseimg_forumhome_todayposters" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayposters].gif" alt="" border="0" /></a>
Usuarios que han escrito hoy: $posterstoday
</td>
</tr>
</tbody>

<tbody id="collapseobj_forumhome_todayposters" style="$vbcollapse[collapseobj_forumhome_todayposters]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">$posttoday</div></td>
</tr>
</tbody>
</if>
<!-- End Todays posters -->

<!-- Todays active users -->
<if condition="$bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 5">


<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayusers].gif" alt="" border="0" /></a>
Total usuarios registrados que nos han visitado hoy: $totaltoday
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayusers" style="$vbcollapse[collapseobj_forumhome_todayusers]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">$whotoday</div></td>
</tr>
</tbody>
</if>
<!-- Todays active users -->

<!-- Start vBChat Users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatusers')"><img id="collapseimg_forumhome_chatusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatusers].gif" alt="" border="0" /></a>
<a href='vBChat.php?$session[sessionurl]' onclick='return OpenvBChat();'>Usuarios en estos momentos en el chat</a>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_chatusers" style="$vbcollapse[collapseobj_forumhome_chatusers]">
<tr>
<td class="alt2"><a href="vBChat.php?$session[sessionurl]" onclick='return OpenvBChat();'><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt="vBChat" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
{$invBChat}
</div>
</td>
</tr>
</tbody>
<!-- End vBChat Users -->
</if>
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div>$vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div>
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
</div>
</td>
</tr>
</tbody>
<if condition="$show['birthdays']">
<!-- today's birthdays -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
$vbphrase[todays_birthdays]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&amp;day=$today&amp;sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$birthdays</div></td>
</tr>
</tbody>
<!-- end today's birthdays -->
</if>
<if condition="$show['upcomingevents']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
</tr>
</tbody>
</if>
<!-- [START HACK='Latest Threads On Forum Home' AUTHOR='NTLDR' VERSION='1.0.0' CHANGEID= 1 ] -->
<!-- latest threads -->
<if condition="$show['latestthreads']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_latestthreads')"><img id="collapseimg_forumhome_latestthreads" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_latestthreads].gif" alt="" border="0" /></a>
$vbphrase[latest_threads]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_latestthreads" style="$vbcollapse[collapseobj_forumhome_latestthreads]">
<tr>
<td class="alt2">&nbsp;</td>
<td class="alt1"><div class="smallfont">$threadbits</div></td>
</tr>
</tbody>
</if>
<!-- /latest threads -->
<!-- [END HACK='Latest Threads On Forum Home' AUTHOR='NTLDR' VERSION='1.0.0' CHANGEID= 1 ] --></table>
<br />
<!-- end what's going on box -->

<!-- icons and login code -->
<table cellpadding="0" cellspacing="2" border="0" width="100%">
<tr valign="bottom">
<td>
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[contains_new_posts]" border="0" /></td>
<td class="smallfont">&nbsp; $vbphrase[forum_contains_new_posts]</td>
</tr>
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" /></td>
<td class="smallfont">&nbsp; $vbphrase[forum_contains_no_new_posts]</td>
</tr>
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
<td class="smallfont">&nbsp; $vbphrase[forum_is_closed_for_posting]</td>
</tr>
</table>
</td>
<if condition="!$show['guest']">
<!-- member logout -->
<td align="$stylevar[right]"><a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]" onclick="return log_out()"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a></td>
<!-- end member logout -->
</if>
</tr>
</table>
<!-- / icons and login code -->

$footer
$vbpopup
</body>
</html>


this is my template FORUMHOME i paste here to view wrongs thanks

firas
09-23-2005, 08:01 PM
thanx a lot...installed :)

Startinfresh
10-05-2005, 08:48 PM
Is this still good to use for vb 3.5.0??

Paul M
10-05-2005, 09:11 PM
Is this still good to use for vb 3.5.0??No. There is a seperate 3.5 version, just follow the link in my sig.

jmacieira
10-19-2005, 05:04 PM
Hi Paul

Is this still good to use for vb 3.0.3??

Paul M
10-19-2005, 05:22 PM
Yes.

geekay
10-20-2005, 02:13 PM
Hi,
Thanks for the great hack...:rolleyes:
Is it possible to show today's visitors as well?

Thanks again!

jokerz
10-21-2005, 12:15 PM
Hi, Paul M. I am using 3.0.7, I am trying to show last 24 hours instead of today but it doesn't work, only show today.

Index.php -
$cutoff = TIMENOW - (substr($tnow,8,2)*3600 + substr($tnow,10,2)*60 + substr($tnow,12,2));
//$cutoff = TIMENOW - 86400 ; // ## Uncomment this line if you want a rolling 24 hours display ## //

I did try remove the comment line // infront $cutoff. Any clue or am I doing wrong? Thx

Paul M
10-21-2005, 03:12 PM
Hi, Paul M. I am using 3.0.7, I am trying to show last 24 hours instead of today but it doesn't work, only show today.

Index.php -
$cutoff = TIMENOW - (substr($tnow,8,2)*3600 + substr($tnow,10,2)*60 + substr($tnow,12,2));
//$cutoff = TIMENOW - 86400 ; // ## Uncomment this line if you want a rolling 24 hours display ## //

I did try remove the comment line // infront $cutoff. Any clue or am I doing wrong? ThxYep, just remove the '//' - you can remove the first $cutoff line as well if you want.

i.e. those two lines become ;

$cutoff = TIMENOW - 86400 ;

geekay
10-21-2005, 03:55 PM
Hi Paul,

Do u think that I can use this hack an display visitors as well, or should I use another one?

Thanks

Paul M
10-21-2005, 04:19 PM
I don't really understand what you mean by "display visitors", do you mean guests ?

If so then you cannot do it, no record is kept of guests.

geekay
10-21-2005, 04:45 PM
yeap I meant guests (i seperate them in 2 groups users and visitors)...
ok, thanks anyway...

jokerz
10-22-2005, 05:38 AM
Hi Paul, thanks for help, I followed what you said.

But "Last 24 hours" text doesn't show, just "visited today"...

Now index.php shows:
$tnow = date('YmdHis',TIMENOW - $vboptions['hourdiff']);
$cutoff = TIMENOW - 86400 ;

Paul M
10-22-2005, 07:00 AM
Hi Paul, thanks for help, I followed what you said.

But "Last 24 hours" text doesn't show, just "visited today"...
You didn't say you meant the text. That will not change unless you edit the template code.

jokerz
10-22-2005, 11:52 AM
oh okay, I've edited the template. No problem so far. This is great mod hack! Thank you :)

Curtis H.
10-22-2005, 08:20 PM
Simple (especially for novices like myself) and effective. Thanks! :)

TEAMBAJAMARINE
10-26-2005, 12:15 AM
Great Hack, I would like to add it to the bottom of my page, I have tried placing it in numerous spots of the FORUM HOME template, and I get it there, just not the right format. Its either vertical or half the page. Any ideas?

Paul M
10-26-2005, 01:17 AM
I don't quite follow, the instructions tell you where to place it in the template.

MickDoneDee
10-26-2005, 05:34 AM
Look at TEAMBAJAMARINE's forum (http://www.teambajamarine.com/forum/index.php). What's Going On is at the top of the page. The original template has What's Going On near the bottom of the page. Does TEAMBAJAMARINE want the Members who have visited today (with last 24 hours option) hack to be seen in What's Going On or be seen separately at the bottom of the page?

Paul M
10-26-2005, 05:52 AM
It's already in the what's going on section, to put it seperately at the bottom would require some extra code to create a table - as the supplied code is for a single row in an existing table.

TEAMBAJAMARINE
10-26-2005, 10:49 AM
It's already in the what's going on section, to put it seperately at the bottom would require some extra code to create a table - as the supplied code is for a single row in an existing table.

Yes sir, exactly the answer I was looking for. Does anyone have the code to put the TOTAL USERS TODAY at the bottom of the page. Thanks for the replys gang!

MickDoneDee
10-26-2005, 11:22 AM
In the original FORUMHOME template the code at the end of the forum table looks like this:

</tbody>
</table>
<!-- /main -->

<br />
<br />

<!-- what's going on box -->

This code includes a couple of line breaks to put a space between the forum table and the What's Going On table. If you want a gap then make sure you put your code after the two <br />'s. If you want Paul's hack to be butted on the end of the forum table then his code must be inserted between </tbody> and </table>.

Try adding this code after the two line breaks:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<!-- Todays active users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayusers].gif" alt="" border="0" /></a>
Total users that have visited today: $totaltoday
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayusers" style="$vbcollapse[collapseobj_forumhome_todayusers]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">$whotoday</div></td>
</tr>
</tbody>
<!-- Todays active users -->
</table>
<br />

TEAMBAJAMARINE
10-26-2005, 11:49 AM
Mick,
Fantastic Work, Thank you! I made a few line break adjustments, but worked like a charm. See it in action here...

http://www.teambajamarine.com/forum/

MickDoneDee
10-26-2005, 12:06 PM
You have put the code here:

</tbody>
Your code
</table>
<!-- /main -->

and added a <br /> before the code to add a gap between the forum and Paul's hack.

Since you added a <tbody> inside the forum table container I don't think you need:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

& </table>.

You only need those lines if you are creating a new table container for Paul's <tbody>. I hope that makes sense. If not, just leave the code as is as it seems to work.

T_Montana
10-28-2005, 02:18 PM
have a question here.......this hack has been working great for a few months now and really makes the forum look nice but i have a problem the past few days.....

i just switched servers and since the switch every night at about 6 p.m. eastern it goes blank (has 0 members visited in last 24 hours) and doesn't start up again until a few hours later (probably like 1 a.m.).

Any idea how i could fix this or what the problem would be?

Paul M
10-28-2005, 03:11 PM
The timezone on your server is probably wrong, it also sounds like you have an older version of the hack as this shouldn't affect the newer versions. Try installing the latest version of the code (2.31).

RGSMDNR
10-30-2005, 11:24 AM
will this work with 3.5?

Paul M
10-30-2005, 11:41 AM
will this work with 3.5?No.

The 3.5 version is here ;

https://vborg.vbsupport.ru/showthread.php?t=82769

jmacieira
10-30-2005, 10:19 PM
Good job, installed/

97cobracpe
11-17-2005, 10:39 PM
Installed. Works great. Thanks!

chrisisonfire
11-27-2005, 09:58 PM
Hi, I installed this hack about ten minutes ago, but when I refresh the index page and see that there have been other members online, the new box is blank... and still is! What might be wrong?

Paul M
11-27-2005, 10:08 PM
Link ?

At a guess, you either haven't done the edit to index.php correctly, or you haven't uploaded the edited file.

MustangLisa
12-02-2005, 04:10 PM
What do I need to change to show users from the entire month?

Paul M
12-02-2005, 04:16 PM
What do I need to change to show users from the entire month?You're joking right ?

SamirDarji
12-02-2005, 06:05 PM
Not too bad of an idea for smaller sites.

glensmail
12-03-2005, 06:54 PM
Would it at all be possible to display this info on a non vb page.

Could you provide the code?

G-Unot
12-06-2005, 11:27 PM
Thank you dude, I installed ;)

Paul M
12-07-2005, 12:59 AM
Would it at all be possible to display this info on a non vb page.Anything is possible.

Could you provide the code?Sorry but no, I don't have the time to write user specific versions.

glensmail
12-09-2005, 11:45 PM
Anything is possible.

Sorry but no, I don't have the time to write user specific versions.

OK, np's thanks for the reply.

Would any of the other coders be prepared to port this to a stand alone script to be used on a not VB page?

Ingmar
12-16-2005, 10:50 AM
Super simple, super effective! Thanks for the great mod!

Cheers! :)

G-Unot
01-08-2006, 05:40 AM
Nice I love it

I installed

www.gfxlive.com

:)

ThugTheLeet
01-16-2006, 12:30 AM
nicely installed thanks paul

demojames
02-17-2006, 07:43 AM
Thank you, Thank You, Thank You - Easy Install!

headrat
02-23-2006, 01:14 PM
Ok, I have it commented off like this for now$cutoff = TIMENOW - (substr($tnow,8,2)*3600 + substr($tnow,10,2)*60 + substr($tnow,12,2));
//$cutoff = $now - 86400 ;//because if I take the comments off, it shows a list of ALL members. How can this be fixed because I have it set up as a module on my main page (www.RatPackInternational.com) and it works fine. Any help please?

headrat
02-23-2006, 05:53 PM
Also, I've been through ALL 40 pages of this thread and was wondering if you could direct me to a question on the CMP Module? I want to know what to change in the CMP Module to change it to a rolling 24 hours instead of the today which resets at midnight.

Thanks.

Also, to go with the above, I didn't make the same mistake others are making, I removed the "//" and even removed the $cutoff line above it and it shows ALL my users. Much like a member before had mentioned, when I do the mouse over, the time is right of their last log in, but the dates are months ago, so should not show them all like that, help on both would be great.

Paul M
02-23-2006, 06:37 PM
I suggest you upload the file you are actually using in your CMPS so I can see the code.

headrat
02-23-2006, 07:00 PM
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a>$vba_options[portal_blockbullet] Visitors Today: $totaltoday</td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow">
<!-- Todays active users -->
$whotoday
<!-- Todays active users -->
</td>
</tr>
</tbody>
</table>
<br />

Paul M
02-24-2006, 04:08 PM
No, not the template, the (php) file.

headrat
02-25-2006, 04:57 AM
Well, I'm on 3.0.6 because if I upgrade I'm not sure how to keep all my "hacks", but when I uncomment the line for the $cutoff in the php file it shows ALL of my users in the box. Can you help me on that one?

Paul M
02-25-2006, 05:52 AM
Change the uncommented line to this ;

$cutoff = TIMENOW - 86400 ; // Rolling 24 Hours Display //

headrat
02-25-2006, 09:44 AM
Uh, nope, that didn't do anything but send it back to showing all my users. I'm not sure what the comment line after the code was supposed to do, since it is just a comment line. ??? Any other guesses.

Paul M
02-25-2006, 05:22 PM
It's not a guess.

Sorry, but without access to your files etc I can't really help you as I can't figure out how you have things set-up and what code you are running. BTW, the comment is exactly that, nothing more.

headrat
02-26-2006, 07:37 AM
that's what I thought, it was just a comment. I got the module working, but would like to see it changed to a rolling 24hr deal instead of just showing today, but this is still a good hack. Thanks.

zephy
04-16-2006, 12:16 PM
Cheers PeM :)

Ohiosweetheart
07-29-2006, 02:08 AM
Paul will this work with 3.6? If not, are you going to update it?

please?

Paul M
07-30-2006, 11:42 PM
The version for 3.6 was released last week.

https://vborg.vbsupport.ru/showthread.php?t=121883

bornic
04-17-2008, 04:27 AM
error on VBulletin 3.6.9 Version

bornic
04-17-2008, 04:29 AM
Solve:

Step 1.

In Index.php ;

Find ;

// ### LOGGED IN USERS #################################################

And insert this code above it ;

// ############### Paul M - Who has visited today v2.31 #################

$tnow = date('YmdHis',TIMENOW - $vboptions['hourdiff']);
$cutoff = TIMENOW - (substr($tnow,8,2)*3600 + substr($tnow,10,2)*60 + substr($tnow,12,2));
//$cutoff = TIMENOW - 86400 ; // ## Uncomment this line if you want a rolling 24 hours display ## //
$todaysusers = $db->query("SELECT userid, lastactivity, options, username, user.usergroupid, displaygroupid,
groupa.opentag as opentaga, groupa.closetag as closetaga, groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " . TABLE_PREFIX . "user as user
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE lastactivity > " .$cutoff. " ORDER BY username" );

$totaltoday = 0;
unset ($whotoday);
while ($today = $db->fetch_array($todaysusers))
{
$totaltoday += 1;
$today['opentag'] = $today['opentaga'] ;
$today['closetag'] = $today['closetaga'] ;
if ($today['displaygroupid'])
{
$today['opentag'] = $today['opentagb'] ;
$today['closetag'] = $today['closetagb'] ;
}
$today[visible] = 1 ;
if ($today['options'] & $_USEROPTIONS['invisible'])
{
$today['visible'] = 0 ;
if (($permissions['genericpermissions'] & CANSEEHIDDEN) OR $today['userid'] == $bbuserinfo['userid'])
{
$today['visible'] = 2 ;
}
}
if ($today['visible'])
{
$wrdate = vbdate($vboptions['timeformat'], $today['lastactivity']);
$whotoday .= "<a href='member.php?u=$today[userid]' title='$wrdate' >";
if ($today['visible'] == 2)
{
$whotoday .= $today['opentag'].$today['username'].$today['closetag']."</a>*, ";
}
else
{
$whotoday .= $today['opentag'].$today['username'].$today['closetag']."</a>, ";
}
}
}
if ($whotoday)
{
$whotoday = substr($whotoday, 0, strlen($whotoday)-2);
}

// ############# End of Who has visited today ###############


Step 2.

In the FORUMHOME Template ;

Find;

<!-- end logged-in users -->


and add after;

<!-- Todays active users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayusers].gif" alt="" border="0" /></a>
Total users that have visited today: $totaltoday
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayusers" style="$vbcollapse[collapseobj_forumhome_todayusers]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td>
<td class="alt1" width="100%"><div class="smallfont">$whotoday</div></td>
</tr>
</tbody>
<!-- Todays active users -->


Step 3.

This is optional, but will speed up the query if you have a large number of members;

Run the following SQL query;


ALTER TABLE user ADD INDEX (lastactivity)