PDA

View Full Version : Who Was Online Today on forums


Pages : [1] 2 3

Gary King
01-02-2004, 10:00 PM
PLEASE CLICK THE INSTALL BUTTON IF INSTALLED! :)

What does this hack do?

It shows the users who visited your forums in the last 24 hours (or today). This hack works similiarly like the one released for vBulletin 2.

NOTE: If you want to show 'Who was online today' on a separate page from forumhome, then download instructions-newpage.txt and onlinetoday.php instead of instructions-regular.txt

Modifications
1 file modification 3 template modifications 0 queries to run

Features
supports and uses phrases
usernames are formatted properly
invisible users only show to people who are supposed to see them (admins and whoever else you allowed)
integrated (makes it so that the Who Was Online bar is now collapseable :)


Screenshots
Look below :)

Credits: Thanks goes to Mystics, where this hack is based on his :)

Dan
01-03-2004, 04:41 PM
thanks for the great hack Gary I think I'll use it on my site.

MindTrix
01-03-2004, 04:48 PM
Ima go install this now because i was waiting for it :) Cheers mate

Hotte
01-03-2004, 04:50 PM
why did it take so long to release? :D
was waiting for this hack :)
*install*

Gio Takahashi
01-03-2004, 04:59 PM
Installing now. Good job.

Link14716
01-03-2004, 05:01 PM
This is the third version of the Who Was Online Today hack for vB3 that I've seen.

sharjah
01-03-2004, 05:14 PM
One of the 5 hacks I'm looking for.
Great Job!

redd
01-03-2004, 05:17 PM
Can this also be set to show the total number of guests today?

Princeton
01-03-2004, 05:17 PM
great job!

Link14716
01-03-2004, 05:17 PM
Can this also be set to show the total number of guests today?
It would be insanely inaccurate no matter how it is done.

Asterik
01-03-2004, 05:18 PM
it has the exact same text *bad grammar* as Chroder's one

Princeton
01-03-2004, 05:32 PM
some errors ...
this
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid" title="Last online at $lastactivetime">$username</a>$invisibleuser
should be
<a href="member.php?s=$session[sessionhash]&amp;action=getinfo&amp;userid=$userid" title="Last online at $lastactivetime">$username</a>$invisibleuser

I would also recommend using vb phrases (add new ones)
Also, add template names to $globaltemplates array

MGM
01-03-2004, 05:33 PM
thanks Gary!!

MGM out

sabret00the
01-03-2004, 05:39 PM
you gonna make one for the WOL?

Zelda-King
01-03-2004, 05:44 PM
Mods and admins don't show in formatted text (bold/italic).

Princeton
01-03-2004, 08:23 PM
Mods and admins don't show in formatted text (bold/italic).
try (not tested)
Replace
if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$todayuser[username]</i></b>";
} else if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$todayuser[username]</b>";
} else {
$username = $todayuser['username'];
}
with
$username = fetch_musername($todayuser);

Zelda-King
01-03-2004, 08:38 PM
That did the trick, thanks! :)

amykhar
01-03-2004, 09:07 PM
Invisible users show for all and not just admins. The fix is as follows:

Find:

$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if ($todayuser['invisible']==1) and ($bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible']==1) { // Invisible User but show to Admin
$invisibleuser = '*';
}



Replace with:

$todayusers=$DB_site->query("SELECT userid,(user.options & $_USEROPTIONS[invisible]) AS invisible, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']!=6)) {
$numbertodayonlineinvisible++;
continue;
}
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']==6)) { // Invisible User but show to Admin
$invisibleuser = '*';
}




-----------
In case my copying and pasting are screwy, what needs to be fixed is the query. It needs to check the options field in the table. invisible was a vb2 field and isn't in vb3. It also needs to change the if statements because invisible will not equal 1. It just won't equal zero.

I also moved the templates to the cache on my board, but didn't bother with the phrases. Things seem to be working ok now.

Amy

amykhar
01-03-2004, 09:22 PM
Another glitch. This one in the forumhome_todayloggedinusers template.

Find:

Number of Active Users Today: $numbertodayonline</b></div>


Replace with:


Number of Active Users Today: $todayonline</b></div>

uae
01-04-2004, 05:15 AM
Thanks Gary ...

Boofo
01-04-2004, 07:09 AM
This is off a bit, I think. My unigue registered users shows 1 today (reason=crappy site ;)) and this hack shows 2. Also, can someone fix the most users on a single day time to follow what we have set for the board (like detailed time, etc.)?

trackpads
01-04-2004, 04:10 PM
Mine too, it shows 20 but this script shows 23, not sure. Nice hack though!

himerus
01-04-2004, 08:32 PM
Is it possible to run the queries from the php_include_start template? I'd like to use this, but I'd like to avoid hacking the actual PHP files. I've done a few hacks to my board that were originally file hacks, and I was able to modify them to pull the data in the php_incllude sections.

If it can be, what is the variable to control it only being called on the index....

something like:

if ($page = 'INDEX')
{
get 24 hr users
}

aidler
01-04-2004, 09:02 PM
Invisible users show for all and not just admins. The fix is as follows:

Find:

$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if ($todayuser['invisible']==1) and ($bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible']==1) { // Invisible User but show to Admin
$invisibleuser = '*';
}



Replace with:

$todayusers=$DB_site->query("SELECT userid,(user.options & $_USEROPTIONS[invisible]) AS invisible, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']!=6)) {
$numbertodayonlineinvisible++;
continue;
}
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']==6)) { // Invisible User but show to Admin
$invisibleuser = '*';
}




-----------
In case my copying and pasting are screwy, what needs to be fixed is the query. It needs to check the options field in the table. invisible was a vb2 field and isn't in vb3. It also needs to change the if statements because invisible will not equal 1. It just won't equal zero.

I also moved the templates to the cache on my board, but didn't bother with the phrases. Things seem to be working ok now.

Amy
Your modification is not working. I'm getting a MySQL error.

Link14716
01-04-2004, 09:04 PM
That's a whole lot of information. :rolleyes:

Boofo
01-04-2004, 09:09 PM
Your modification is not working. I'm getting a MySQL error.
I am using the same mod and it works fine here. What is the error you are getting? Can you post it and maybe we can help.

ogden2k
01-04-2004, 09:15 PM
Gary, have you updated your attachment so we don't have to apply all of these fixes?

Mamochka
01-04-2004, 09:18 PM
Good job. Work easy and fine.

bspiller82
01-05-2004, 12:19 AM
THanks. I have also been awaiting for this one as I used it in my 2.x days :)

Boofo
01-05-2004, 06:51 AM
Gary, are you still suppoerting this hack? If so, you need to fix it. The recordusers keeps resetting itself daily.

monstergamer
01-05-2004, 04:00 PM
to make this hack were it can collapse
also in my code i took out the
Most users ever online on a day was $todayrecordusers on $todayrecorddate.
you can take a look at www.monstergamer.net/vb/index.php (http://www.monstergamer.net/vb/index.php)

go to forumhome_todayloggedinusers

replace all with
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('forumhome_todayactiveusers')"><img id="collapseimg_forumhome_todayactiveusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayactiveusers].gif" alt="" border="0" /></a>
Users Been on Today: $numbertodayonline
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayactiveusers" style="$vbcollapse[collapseobj_forumhome_todayactiveusers]">
<tr>
<td class="alt1" colspan="6"><div class="smallfont">
<strong><nobr>The following members have already visited the forums today:</nobr></strong><br />
$todayloggedinuser<br />
</div></td>
</tr>
</tbody>

Gary King
01-05-2004, 08:12 PM
I'll be working on the hack in a bit, so stay tooned for a new release of this hack :)

Gary King
01-05-2004, 11:27 PM
Newest version has been released! I hope you guys like it ;)

By the way, phrases support will be added in a little later (hopefully within the next hour or so) I just had to release this one before I left the computer for a bit :))

Gary King
01-05-2004, 11:29 PM
This is off a bit, I think. My unigue registered users shows 1 today (reason=crappy site ;)) and this hack shows 2. Also, can someone fix the most users on a single day time to follow what we have set for the board (like detailed time, etc.)?
I think it already does follow the date / time formatting? :)

Gary King
01-05-2004, 11:48 PM
Phrases support now available :D

squawell
01-06-2004, 12:01 AM
nice hack~Gray!:D:D

* squawell clicked install....

monstergamer
01-06-2004, 02:22 AM
good work
like it better since you can collapse it now :)

Davey-UK
01-06-2004, 11:54 AM
Would it be difficult to integrate this into a non-Vb page?

Gary King
01-06-2004, 07:14 PM
Would it be difficult to integrate this into a non-Vb page?
Non vB, or just a separate page by itself like the original hack for vB 2 was able to? (But still a part of vBulletin)?

Davey-UK
01-07-2004, 02:30 AM
Just as a standalone page, such as the index page of your site instead of actually having to go to the forum to see it.

SnowBot
01-07-2004, 03:43 AM
What's Going On?https://vborg.vbsupport.ru/external/2004/01/6.gif (http://www.synergyforums.com/forum/index.php?#top) Currently Active Users (http://www.synergyforums.com/forum/online.php?): 5 (1 members and 4 guests) https://vborg.vbsupport.ru/external/2004/01/6.gif (http://www.synergyforums.com/forum/online.php?)Most users ever online was 44, 15th October 2003 at 7:25.
Snowy (http://www.synergyforums.com/forum/member.php?u=1)

https://vborg.vbsupport.ru/external/2004/01/6.gif (http://www.synergyforums.com/forum/index.php?#top) Number of Active Users Today: 1 Most users ever online on a day was 1 on 7th January 2004. | The following members have already visited the forums today:
Snowy (http://www.synergyforums.com/forum/member.php?u=1)






hhhmmm they dont match up, how can i fix this?

Gary King
01-07-2004, 12:47 PM
What's Going On?https://vborg.vbsupport.ru/external/2004/01/6.gif (http://www.synergyforums.com/forum/index.php?#top) Currently Active Users (http://www.synergyforums.com/forum/online.php?): 5 (1 members and 4 guests) http://www.synergyforums.com/forum/images/gold/statusicon/forum_link.gif (http://www.synergyforums.com/forum/online.php?)Most users ever online was 44, 15th October 2003 at 7:25.
Snowy (http://www.synergyforums.com/forum/member.php?u=1)

https://vborg.vbsupport.ru/external/2004/01/6.gif (http://www.synergyforums.com/forum/index.php?#top) Number of Active Users Today: 1 Most users ever online on a day was 1 on 7th January 2004. | The following members have already visited the forums today:
Snowy (http://www.synergyforums.com/forum/member.php?u=1)






hhhmmm they dont match up, how can i fix this?
What do you mean by that..?

It looks fine when I visited http://www.synergyforums.com/forum/ (correct URL?)

Rids
01-07-2004, 02:27 PM
Installed and working well :)

SnowBot
01-07-2004, 03:38 PM
What do you mean by that..?

It looks fine when I visited http://www.synergyforums.com/forum/ (correct URL?)
ok, well on the original What's Going On
Most users ever online was 44, 15th October 2003 at 7:25.

On your hack it says (at time of posting this)
Most users ever online on a day was 14 on 7th January 2004

I know thats from when i installed your hack but is there anyway to sync them as untill i get 44 users back in 1 day they dont match up and look silly.

The Quibbler
01-07-2004, 04:09 PM
*clicks install*

Great hack, worked perfectly for me :)

Zeitgeist
01-07-2004, 06:14 PM
For those who want to remove the space between the username and the following "," open the template "forumhome_todayloggedinuser" and delete the last invisible line at the bottom of the text.

idwf
01-07-2004, 06:30 PM
using it. thanks :)

SnowBot
01-08-2004, 12:43 AM
Why are some of the user titles bold and others are not, i mean the ones in the same usergroup?

Kewl
01-08-2004, 09:31 AM
Great hack! I have been wanting this one

One question though
now that in vb3 you gotta run an install script for some hacks if you decide you want to unistall how do you do that?

Thanks

dumb question though

I can't figure how to add a template in vb3

I bet I am looking right at it but can't find it

Davey-UK
01-08-2004, 01:02 PM
Originally Posted by Davey-UK
Would it be difficult to integrate this into a non-Vb page?

Non vB, or just a separate page by itself like the original hack for vB 2 was able to? (But still a part of vBulletin)?


How could it be done with an include on my sites homepage? (Not VB).

I managed it with the 2x version, but have since lost the file.

ogden2k
01-08-2004, 02:59 PM
How do you uninstall this?

Zelda-King
01-08-2004, 04:34 PM
dumb question though

I can't figure how to add a template in vb3

I bet I am looking right at it but can't find itIt's in the style option dropdown menu. You need to scroll up to see 'Add Template'.

gmarik
01-08-2004, 05:40 PM
This is the one we all love.

Gary King
01-08-2004, 07:20 PM
How do you uninstall this?
There is an uninstall option in the installer.

Zeitgeist
01-08-2004, 10:18 PM
Sorry, but hack is not working correctly. It resets the most online users on a day-statistic always at midnight. But in vB2 which is nearly the same code it works perfectly. What's the reason for this?

Gio Takahashi
01-08-2004, 10:20 PM
It WAS working correctly for me, Zeit. Explain more.

Kewl
01-08-2004, 11:12 PM
There is an uninstall option in the installer.
Thanks did not know that

hack works GREAT!

Kewl
01-08-2004, 11:12 PM
It's in the style option dropdown menu. You need to scroll up to see 'Add Template'.
Thanks got it

Kewl
01-09-2004, 07:42 AM
I noticed 2 things from last hack

1- Most ever on-line resets everyday and starts over . Am I doing something wrong?
2- In the ver for 2.0 if you highlighted the person it showed what time they were last there also

Thanks

Zeitgeist
01-09-2004, 11:40 AM
1- Most ever on-line resets everyday and starts over . Am I doing something wrong?That's the same problem I'm having, too. The hack isn't working! Didn't the author noticed that? Where's the bug? :ermm:

eXtremeTim
01-09-2004, 12:00 PM
That's the same problem I'm having, too. The hack isn't working! Didn't the author noticed that? Where's the bug? :ermm:
I have the same problem as them. The most users ever online in a day resets at midnight.

I will look and see if i can figure out what is going on in a little while.

Zeitgeist
01-09-2004, 12:08 PM
I have the same problem as them. The most users ever online in a day resets at midnight.

I will look and see if i can figure out what is going on in a little while.
Thanks, extreme. I think you can compare the code from the vB 2.x.x hack with this new hack and so you might be able to find the wrong code in this hack.

Jean147
01-09-2004, 12:30 PM
was looking for that. Thx a lot. :top

eXtremeTim
01-09-2004, 12:31 PM
Fixed it.

Here are my changes

Find:
if ((int)$maxusers['maxonline'] <= $totalonline)
{
$time = time();
$maxloggedin = "$totalonline " . $time . " " . $maxusers['maxonline'] . " " . $maxusers['maxonlinedate'];
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}

Replace with:
if (intval($maxusers['maxonline']) <= $totalonline)
{
$maxusers[0] = $totalonline;
$maxusers[1] = TIMENOW;
}

Now Find:
if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}

Replace with:
if (intval($maxusers['maxonline']) <= $totalonline) {
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . TIMENOW;
$maxusers[2] = $numbertodayonline;
$maxusers[3] = TIMENOW;
$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('maxloggedin', '" . addslashes(serialize($maxusers)) . "')");
}

Zeitgeist
01-09-2004, 01:33 PM
Sorry, it doesn't work. It resets the date to 01-01-1970 and hides the most users ever online on a day completly.

eXtremeTim
01-09-2004, 01:51 PM
This hack only works if whosonline is on so make sure that you have it turned on.

eXtremeTim
01-09-2004, 02:07 PM
I have not been able to recreate your problem I have check all the code im using and this looks like the only parts i changed. Check and make sure you did the replaces correctly.

Zeitgeist
01-09-2004, 06:15 PM
That's a screenshot of my forum after replacing the variables with yours. I'm 100% sure that I've made exactly what you've posted. Who's online is enabled and I haven't made any other changes to index.php *confused*

eXtremeTim
01-09-2004, 06:35 PM
That's a screenshot of my forum after replacing the variables with yours. I'm 100% sure that I've made exactly what you've posted. Who's online is enabled and I haven't made any other changes to index.php *confused*
Mind posting the whole whosonline block of code you have? I will compare it to mine and see if there are anymore differences. That way i can see if you messed up or if i left something out or if its working becuase of some other change i have done on my board. Seing as my board is already heavily modified. You can check it out on mine running the code i have posted. http://www.extremechatforums.com/forum/index.php

Zeitgeist
01-09-2004, 06:48 PM
That's the whole code of the hack:
// ### WHO WAS ONLINE TODAY ########################
if (intval($maxusers['maxonline']) <= $totalonline)
{
$maxusers[0] = $totalonline;
$maxusers[1] = TIMENOW;
}
$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, options FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");

while ($todayuser=$DB_site->fetch_array($todayusers))
{
$todayuser['options'] = intval($todayuser['options']);
foreach($_USEROPTIONS AS $optionname => $optionval)
{
$todayuser["$optionname"] = iif($todayuser['options'] & $optionval, 1, 0);
}
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);

if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6)
{
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible'] == 1)
{ // Invisible User but show to Admin
$invisibleuser = '*';
}
$username = fetch_musername($todayuser);

if (!$todayloggedinuser)
{
eval("\$todayloggedinuser = \"".fetch_template('forumhome_todayloggedinuser')."\";");
}else{
eval("\$todayloggedinuser .= \", ".fetch_template('forumhome_todayloggedinuser')."\";");
}
}
$DB_site->free_result($todayusers);
if ($bbuserinfo[usergroupid] == 6) {
$todayonline = $numbertodayonline;
} else {
$todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}
if (intval($maxusers['maxonline']) <= $totalonline) {
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . TIMENOW;
$maxusers[2] = $numbertodayonline;
$maxusers[3] = TIMENOW;
$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('maxloggedin', '" . addslashes(serialize($maxusers)) . "')");
}
$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($vboptions['dateformat'],$maxusers[3]);
eval("\$todayloggedinusers = \"".fetch_template('forumhome_todayloggedinusers')."\";");

Zeitgeist
01-09-2004, 08:46 PM
I've used another hack from vBulletin.nl now(http://www.vbulletin.nl/community/showthread.php?t=1475). At the moment it's working perfectly. I'll see what will happen if we reach 0:00 ... This hack here resets the statistics every day on this time.

eXtremeTim
01-09-2004, 11:29 PM
I've used another hack from vBulletin.nl now(http://www.vbulletin.nl/community/showthread.php?t=1475). At the moment it's working perfectly. I'll see what will happen if we reach 0:00 ... This hack here resets the statistics every day on this time.
are you on vb3 rc2???

Spencer F.
01-10-2004, 04:36 AM
I got this error when installing:

Database error in vBulletin 3.0.0 Release Candidate 2:

Invalid SQL: INSERT INTO phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, 0, 'last_online_at_x', 'Last online at {1}', 1)
mysql error: Duplicate entry 'last_online_at_x-0-1' for key 2

mysql error number: 1062

Date: Saturday 10th of January 2004 12:35:53 AM
Script: http://www.musicbanter.com/test/admincp/installer.php?do=install
Referer: http://www.musicbanter.com/test/admincp/installer.php?do=install
Username: admin
IP Address: ***

But I think it worked? Is this normal?

P.Jackson
01-10-2004, 10:16 AM
works for me good job

Kewl
01-10-2004, 03:11 PM
Sorry, it doesn't work. It resets the date to 01-01-1970 and hides the most users ever online on a day completly.
hmmm same thing for me

did this get fixed? or does it fix itself at midnight?

doesn't give a total either

thanks

Zeitgeist
01-10-2004, 03:26 PM
are you on vb3 rc2???
Yes, why?

Gary King
01-10-2004, 04:40 PM
I got this error when installing:

Database error in vBulletin 3.0.0 Release Candidate 2:

Invalid SQL: INSERT INTO phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, 0, 'last_online_at_x', 'Last online at {1}', 1)
mysql error: Duplicate entry 'last_online_at_x-0-1' for key 2

mysql error number: 1062

Date: Saturday 10th of January 2004 12:35:53 AM
Script: http://www.musicbanter.com/test/admincp/installer.php?do=install
Referer: http://www.musicbanter.com/test/admincp/installer.php?do=install
Username: admin
IP Address: ***

But I think it worked? Is this normal?
No that shouldn't happen, and as for the problem with counting the most users online on one day record, I will see what I can do to fix this :)

eXtremeTim
01-10-2004, 06:49 PM
try this who was online today code.

This is the exact code from my index.php file for it so.

// ### WHO WAS ONLINE TODAY ########################
// $maxusers = unserialize($datastore['maxloggedin']);
if (intval($maxusers['maxonline']) <= $totalonline)
{
$maxusers[0] = $totalonline;
$maxusers[1] = TIMENOW;
}
$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, options FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");

while ($todayuser=$DB_site->fetch_array($todayusers))
{
$todayuser['options'] = intval($todayuser['options']);
foreach($_USEROPTIONS AS $optionname => $optionval)
{
$todayuser["$optionname"] = iif($todayuser['options'] & $optionval, 1, 0);
}
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);

if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6)
{
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible'] == 1)
{ // Invisible User but show to Admin
$invisibleuser = '*';
}
$username = fetch_musername($todayuser);

if (!$todayloggedinuser)
{
eval("\$todayloggedinuser = \"".fetch_template('forumhome_todayloggedinuser')."\";");
}
else
{
eval("\$todayloggedinuser .= \", ".fetch_template('forumhome_todayloggedinuser')."\";");
}
}
$DB_site->free_result($todayusers);
if ($bbuserinfo[usergroupid] == 6) {
$todayonline = $numbertodayonline;
} else {
$todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}
if (intval($maxusers['maxonline']) <= $totalonline) {
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . TIMENOW;
$maxusers[2] = $numbertodayonline;
$maxusers[3] = TIMENOW;
$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('maxloggedin', '" . addslashes(serialize($maxusers)) . "')");
}
$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($vboptions['dateformat'],$maxusers[3]);
eval("\$todayloggedinusers = \"".fetch_template('forumhome_todayloggedinusers')."\";");

Kewl
01-10-2004, 07:02 PM
strange still same thing

]

eXtremeTim
01-10-2004, 07:57 PM
strange still same thing

here is the link if you want to see what it is doing

http://www.pcinnovations.com/forum/index.php?s=
Is that code i put right after the whos online tracking code? Hmm this is strang :-/

Kewl
01-10-2004, 08:02 PM
Is that code i put right after the whos online tracking code? Hmm this is strang :-/
I just cut and paste the new code above to the index.php

jancarlo
01-10-2004, 09:42 PM
@ Gary W

if the tables of the db have it begins them "vb3_==>" what I must
modify?

thanks
jancarlo

Italian

se le tabelle del db hanno iniziale "vb3_==>" cosa devo modificare?

grazie
jancarlo

Gary King
01-10-2004, 09:52 PM
@ Gary W

if the tables of the db have it begins them "vb3_==>" what I must
modify?

thanks
jancarlo



Italian

se le tabelle del db hanno iniziale "vb3_==>" cosa devo modificare?

grazie
jancarlo
Nothing :)

duncan99
01-12-2004, 02:13 PM
After I installed this hack, my web page got the error var IMGDIR_MISC is undefined.

Anybody know whats the problem?

Gary King
01-12-2004, 11:09 PM
After I installed this hack, my web page got the error var IMGDIR_MISC is undefined.

Anybody know whats the problem?
Wow I'm not even sure if that has anything to do with this hack, or you didn't decribe the problem accurately :surprised:

PranK
01-13-2004, 01:24 AM
/me clicks install.

Thanks!

SnowBot
01-13-2004, 05:18 AM
has this been updated so nolonger resets itself?

firefighter99
01-14-2004, 05:43 AM
This hack seems to have a bug. I installed it and it seem to work just fine, but everyday the "Most users ever online on a day was..." get's recounted. The hack doesnt seem to save the last record from the day with the most members being online.

You might wanna look into this. vbb3 RC2+ your last release..........

Gary King
01-14-2004, 07:14 PM
This hack seems to have a bug. I installed it and it seem to work just fine, but everyday the "Most users ever online on a day was..." get's recounted. The hack doesnt seem to save the last record from the day with the most members being online.

You might wanna look into this. vbb3 RC2+ your last release..........
Yeah I'm working on this at the moment, but also have many other things to do. I will send an update when this has been fixed, so if you guys want to be notified about this then you will have to hit the Install button.

trackpads
01-14-2004, 08:26 PM
Yeah I'm working on this at the moment, but also have many other things to do. I will send an update when this has been fixed, so if you guys want to be notified about this then you will have to hit the Install button.
Gary, thanks for all the hard work!

mikeB
01-15-2004, 01:50 PM
where does the "installer.php" go - in the instructions it says /forum/admin/ folder - does that mean admincp folder?

NTLDR
01-15-2004, 02:02 PM
Yep the admincp directory or whatever you have renamed it too :)

mikeB
01-15-2004, 02:10 PM
what's the purpose of it? the hack seems to be working ok w/out it!>

mikeB
01-15-2004, 04:49 PM
what's the purpose of it? the hack seems to be working ok w/out it!>

anyone? I never used it and mine is working ok: http://www.bakermedia.com/learn -

Gary King
01-16-2004, 12:38 AM
anyone? I never used it and mine is working ok: http://www.bakermedia.com/learn -
The installer? It's for supporting phrases.

mikeB
01-16-2004, 03:10 AM
one last thing - is it supposed to reset at 12 midnight?

mikeB
01-16-2004, 03:12 AM
one last thing - is it supposed to reset at 12 midnight?

Gary King
01-16-2004, 06:53 PM
one last thing - is it supposed to reset at 12 midnight?
No that's a bug, I've been busy with other things and I've been working on this as well, but if someone else would like to help out and add instructions on how to fix this problem then that'd be great too :)

Boofo
01-16-2004, 07:19 PM
Maybe you ought to move this to Beta Hacks until all the bugs are out of it?

Gary King
01-16-2004, 07:29 PM
Maybe you ought to move this to Beta Hacks until all the bugs are out of it?
Or maybe I could take out the feature of recording the max users online on one day, that's another option :) Either way though is fine with me, just until I find the time to work on this some more.

ogden2k
01-19-2004, 12:29 PM
What's the point of the installer? I don't want to bother with this if I have to use an installer.

Also, what's the point of having "The most online users ever?" when vB has it built in? How do we remove this query?

Gary King
01-19-2004, 10:06 PM
What's the point of the installer? I don't want to bother with this if I have to use an installer.

Also, what's the point of having "The most online users ever?" when vB has it built in? How do we remove this query?
The installer is for phrases support - it installs the phrases for you, instead of having you add about 5-10 phrases manually. It simplifies life :p

Also, it's not most online users ever, it is "Most Online Users Ever on One Day".

ogden2k
01-20-2004, 12:38 AM
What's the call for the title tag to show when the user was last online? The one for vb2x showed the last time the user was online when you hovered over their name.

Gary King
01-20-2004, 12:41 AM
What's the call for the title tag to show when the user was last online? The one for vb2x showed the last time the user was online when you hovered over their name.
It does for this version too.

ogden2k
01-20-2004, 09:44 AM
Hmm, I must of left it out on accident then. Did you get the bug resolved with the users not getting reset after midnight?

budlite74
01-21-2004, 12:36 AM
??? bump

Lissa
01-25-2004, 11:05 AM
This should be in beta releases. It doesn't keep track of "most users ever online." Yesterday I had 250 members visit. Today it says "most users ever online was 105. Everyone else is having the same problem.

You going to fix it?

Zelda-King
01-25-2004, 11:17 AM
I find it quite ambiguous as it shows right under the "Who's Online" 'most users ever online' and the figure tends to be lower for me in 'Online Today' at the moment.

dookie
01-25-2004, 09:06 PM
This hack doesn?t work.
After I installed it, it works perfectly. But since midnight the number of active users today is 0 and no active users are displayed. Take a look at www.devinity.de

I saw this on another board too. This is really a beta Hack.



//edit: It doesn?t work between 0:00 and 1:00 @ night. Any ideas?

apokphp
01-26-2004, 03:50 AM
/clicks Uninstall.

Terribly supported. Doesn't work. Too much time passes without a fix.

I'll check back if it is moved to full releases.

eXtremeTim
01-26-2004, 04:38 AM
/clicks Uninstall.

Terribly supported. Doesn't work. Too much time passes without a fix.

I'll check back if it is moved to full releases.
Umm one thing. This is the full releases forum. :-/

apokphp
01-26-2004, 11:02 PM
lol so it is. IMO, this should be in the beta forums. There is still a lot of work to do it seems.

Mr. Brian
01-28-2004, 11:14 PM
Is it poosible to include guest as well?

BTW, I found that after installing this, I keep getting error message inside my admincp=dohome.

Gary King
01-28-2004, 11:18 PM
Is it poosible to include guest as well?

BTW, I found that after installing this, I keep getting error message inside my admincp=dohome.
If you include guests, it would be highly inaccurate :)

MaDCaT75
01-29-2004, 03:17 AM
hey.... any way to make staff names different colors..... admin: red - supermod: blue - mod: green ?

Gary King
01-29-2004, 10:50 AM
hey.... any way to make staff names different colors..... admin: red - supermod: blue - mod: green ?
Isn't that already built-in to vB3..? ;)

Just edit the usergroups :)

ogden2k
01-29-2004, 12:32 PM
When are you going to fix the issue with the Current active users today not resetting itself after midnight??

trackpads
02-01-2004, 12:07 PM
Gary, I upgraded to RC3, reinstalled the latest version above but now when I hold my cursor over the names it doesnt give me the last on time anymore.

Any idea what I have done wrong?

Thanks again

(Keeps Bashing "Install")

DigitalEclipse
02-04-2004, 04:47 PM
I installed it and I'm having the same problem with the most users in a day reseting. The other Admin on my site is great with PHP and is going to take a look at it and see if he can fix it. If/When he does, I'll post it.

thuffner
02-04-2004, 11:47 PM
I installed it and I'm having the same problem with the most users in a day reseting. The other Admin on my site is great with PHP and is going to take a look at it and see if he can fix it. If/When he does, I'll post it.
THANK you! :)

trackpads
02-05-2004, 12:00 AM
Please post it if you have a fix, thanks!!!

DigitalEclipse
02-05-2004, 12:31 AM
THANK you! :)
NP, its driving me crazy too. I dont have a huge board, so this was a tool I was using to show people that the board was active and get more people to register/post.

ogden2k
02-05-2004, 01:07 PM
Any news on the fix for the Actice users today not resetting itself????

94DROPTOPZ
02-06-2004, 11:06 AM
This looks like an awesome hack if somebody can come up with a fix...

I will definately use it :banana:

Boofo
02-06-2004, 11:40 AM
It looks as though the author has decided to abandon this hack, fellas. Sorry. ;)

94DROPTOPZ
02-06-2004, 11:42 AM
It looks as though the author has decided to abandon this hack, fellas. Sorry. ;)

It looks that way but we can all still hope :ermm:

Boofo
02-06-2004, 11:44 AM
I don't honestly think he knows how to fix it. ;)

Gary King
02-06-2004, 07:53 PM
I don't honestly think he knows how to fix it. ;)
Well I do, but I was hoping someone else could spend the extra few minutes to fix it because I really don't have time to work on this :ermm: By the way, is that a challenge? ;) :p

Sorry about this guys, but I hope someone else can come up with an answer. Otherwise if not then I'll fix it in the next few hours/days.

94DROPTOPZ
02-06-2004, 08:03 PM
Well I do, but I was hoping someone else could spend the extra few minutes to fix it because I really don't have time to work on this :ermm: By the way, is that a challenge? ;) :p

Sorry about this guys, but I hope someone else can come up with an answer. Otherwise if not then I'll fix it in the next few hours/days.

Thanks Gary!

Boofo
02-06-2004, 08:05 PM
Ok, let's call it a challenge. I'm game. How about you? ;)

DigitalEclipse
02-06-2004, 11:26 PM
I've got two people working on it here, LOL. we'll see who fixes it first.

94DROPTOPZ
02-07-2004, 03:31 AM
Please keep us informed I'm really looking forward to this one :nervous:

94DROPTOPZ
02-10-2004, 09:35 AM
Did anybody figure this out yet??? :ermm:

Okiewan
02-11-2004, 12:23 PM
... and it's up for HOTM! Maybe that will encourage the author to fix it :laugh:

Boofo
02-11-2004, 12:28 PM
You would hope so, huh? ;)

Gary King
02-11-2004, 10:00 PM
I fixed 'Most users online on a day' so please re-download this guys ;)

eXtremeTim
02-12-2004, 01:20 AM
Its about time. :) Its good to hear that it is fixed.

Gary King
02-12-2004, 01:22 AM
You would hope so, huh? ;)
Also this seems pretty negative, same with most of your other responses regarding this hack :) Hopefully you don't have any grudges against some lines of code? ;)

DigitalEclipse
02-12-2004, 01:31 AM
I just put it on mine. We'll find out if its working at midnight. Thanks Gary.

Edit: I adjusted my time zone settings to test it and it does work. Thanks Gary!!

thuffner
02-12-2004, 04:31 AM
Thanks for the update Gary. It works great so far! ;):)

Gary King
02-12-2004, 11:17 AM
Glad I could help :D

ogden2k
02-12-2004, 03:42 PM
How about the issue with the hack not resetting Active Users today? That seems to be the more important part of the hack....

DTC
02-12-2004, 06:46 PM
Is there anyway to get the Number of Active Users Today: total to count invisible users?

Even though we don't display the usernames to most usergroups, it should still count them in the totals, no?

Gary King
02-12-2004, 07:43 PM
How about the issue with the hack not resetting Active Users today? That seems to be the more important part of the hack....
That's already fixed.

ogden2k
02-12-2004, 11:51 PM
I have it installed now, but the hack says there have been 37 users online, but, in my ACP this is what it says:
Unique Registered Visitors Today 35

It looks like something is off..?

Gary King
02-13-2004, 01:11 AM
I have it installed now, but the hack says there have been 37 users online, but, in my ACP this is what it says:
Unique Registered Visitors Today 35

It looks like something is off..?
Yeah it's with the time I believe; as in, the acp calculates 'today' differently from this hack of mine.

elefekt
02-13-2004, 02:25 AM
Maybe its just the one i downloaded but where it has:

$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);

you have to add the quote marks where it says lastactivity --------^

$lastactivetime = vbdate($vboptions['timeformat'], $todayuser['lastactivity']);

Gary King
02-13-2004, 02:39 AM
Maybe its just the one i downloaded but where it has:

$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);

you have to add the quote marks where it says lastactivity --------^

$lastactivetime = vbdate($vboptions['timeformat'], $todayuser['lastactivity']);
It's not entirely necessary, only for certain key names.

ogden2k
02-13-2004, 09:21 AM
This still is not working. My server is set to EST -5, and in the ACP it's set to -5 and my time zone is set to -5. Half of the Active Users today from yesterday are showing today....

astra-sri
02-13-2004, 10:54 AM
Can anyone help with this? I've just installed the hack and it's not displaying properly. Everything else is fine.

Lissa
02-13-2004, 11:23 AM
Ok, maybe I'm being anal, but look at the attached screenshot. See the circled area? It doesn't exactly fit in with the rest of the design of vBulletin. Maybe you should make it so that "who was online today" will indent and fit vBulletin's style. :nervous:

Boofo
02-13-2004, 12:45 PM
Just do a <td>&nbsp;</td> in there and that should take care of it.

astra-sri
02-13-2004, 01:03 PM
Can anyone help with this? I've just installed the hack and it's not displaying properly. Everything else is fine.
Can anyone help with this, It's looking a bit c**p and I don't want to have to uninstall.

Lissa
02-13-2004, 01:13 PM
Just do a <td>&nbsp;</td> in there and that should take care of it.
There where?

Gary King
02-13-2004, 02:02 PM
Can anyone help with this, It's looking a bit c**p and I don't want to have to uninstall.
Try adding the phrases manually. I have updated the hack instructions because seems like several people were having this issue (but what's even stranger is that after an hour or two it seems to fix itself, that happened on my forums and on another as well :confused:).

Anyways, as I said, re-download instructions.txt and add the phrases manually; also, delete the old ones if you have to.

astra-sri
02-13-2004, 02:21 PM
Thanks mate.

That's worked :)

* astra-sri clicks install

Logikos
02-14-2004, 01:21 AM
/me clicks install

Boofo
02-14-2004, 02:01 AM
There where?
After the tr that shows the stats and before the stats themselves.

Logikos
02-14-2004, 02:51 AM
Do this:
In forumhome_todayloggedinusers
Replace everything with the following.


<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('forumhome_todayactiveusers')"><img id="collapseimg_forumhome_todayactiveusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayactiveusers].gif" alt="" border="0" /></a>
$vbphrase[active_users_today]: $todayonline
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayactiveusers" style="$vbcollapse[collapseobj_forumhome_todayactiveusers]">

<tr>

<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt=" Number of Active Users Today" border="0" /></td>

<td class="alt1" colspan="0"><div class="smallfont">
<nobr><phrase 1="$todayrecordusers" 2="$todayrecorddate">$vbphrase[most_users_ever]</phrase></nobr> |
<nobr>$vbphrase[already_visited_today]:</nobr><br />
$todayloggedinuser<br />
</div></td>
</tr>
</tbody>



Go to http://www.computerproblems.org/forums

to see what that will do. Hope that helps.

Lissa
02-14-2004, 04:02 AM
WOW thanks []\[]emesis! That worked perfectly :D

Gary King
02-14-2004, 12:31 PM
\[]emesis']Do this:
In forumhome_todayloggedinusers
Replace everything with the following.


<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('forumhome_todayactiveusers')"><img id="collapseimg_forumhome_todayactiveusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayactiveusers].gif" alt="" border="0" /></a>
$vbphrase[active_users_today]: $todayonline
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayactiveusers" style="$vbcollapse[collapseobj_forumhome_todayactiveusers]">

<tr>

<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt=" Number of Active Users Today" border="0" /></td>

<td class="alt1" colspan="0"><div class="smallfont">
<nobr><phrase 1="$todayrecordusers" 2="$todayrecorddate">$vbphrase[most_users_ever]</phrase></nobr> |
<nobr>$vbphrase[already_visited_today]:</nobr><br />
$todayloggedinuser<br />
</div></td>
</tr>
</tbody>



Go to http://www.computerproblems.org/forums

to see what that will do. Hope that helps.
I added that to the instructions now, looks better than what I have right now :)

trinitym
02-14-2004, 02:43 PM
Woohoo! Everything is now working like a well-oiled machine. Erm, or something like that. Thanks for the fix, I really love this hack. :) Now I can click the happy button.

* trinitym clicks install

Logikos
02-14-2004, 07:24 PM
No problem guys, love the hack! :) Nice smooth install, thats what i like to see.

94DROPTOPZ
02-15-2004, 01:14 AM
The phrases are missing on mine I think since I redid the install...

How do I manually add the phrases? I know that I goto the phrase manager and click add new phrase but :

what phrase type?

what Varname?

what text?

I also re read through the next install.txt file and all I see are the phrases (but not the rest of how to add them), sorry for the stupid question but I'm new to this

Also if you click on some of the usernames at the bottom it shows their last active date as being 2/13/04 and today is the 14th hmmm just wondering?

Gary King
02-15-2004, 01:20 AM
The phrases are missing on mine I think since I redid the install...

How do I manually add the phrases? I know that I goto the phrase manager and click add new phrase but :

what phrase type?

what Varname?

what text?

I also re read through the next install.txt file and all I see are the phrases (but not the rest of how to add them), sorry for the stupid question but I'm new to this

Also if you click on some of the usernames at the bottom it shows their last active date as being 2/13/04 and today is the 14th hmmm just wondering?
Phrase type, use GLOBAL, varname is the text before the / and text is after that.

94DROPTOPZ
02-15-2004, 01:31 AM
Phrase type, use GLOBAL, varname is the text before the / and text is after that.


Thanks for answering such a ridiculous question I figured it out right after I posted and I apologize... I manually added the phrases and it fixed that problem now I'm just not too sure why some of the members it said visited the board today when you look at their profile it says last avtivity 2/13

Thanks Gary

Gary King
02-15-2004, 01:38 AM
Thanks for answering such a ridiculous question I figured it out right after I posted and I apologize... I manually added the phrases and it fixed that problem now I'm just not too sure why some of the members it said visited the board today when you look at their profile it says last avtivity 2/13

Thanks Gary
Because the hack checks 'today' differently from the actual server times, etc. so it would probably be a few hours off.

natralis
02-15-2004, 08:15 AM
installed and working took 5 mins thankyou gary appreciated m8

trilOByte
02-15-2004, 12:13 PM
Is there any way to get this to reset to different timezones? My site is for the UK (server is in the US) and this seems to start it's daily calculation at about 5am GMT (which is roughly midnight where my server is). Also, the last activity "mouseover" doesnt reflect the difference in timezones - it's 5hrs out for 99% of my users.

What I would like is the count to reset itself to mkidnight GMT, not midnight server time, and the last activity to reflect GMT not EST.

M.C.
02-15-2004, 09:27 PM
start making phrases self and then saw, that you already add that to hack ;) Cool!

Just question - is that hack add query to DB and if yes how many...

And last - can you do it like it was on vB2., when list of online users can be shown on single page (like onlinetoday.php) instead of index.php?

Thanks!

bigreefer
02-15-2004, 10:12 PM
Nice Hack thx for it.

But I have a question.

What that means ? ---> Most users ever online on a day was {1} on {2}.

Every Day the "Most users ever online on a day was {1} on {2}." reset to 0.
Why ? I want that the user record to stand remains.

who can I do this ?

Sorry for my bad English.

Gary King
02-15-2004, 11:44 PM
Nice Hack thx for it.

But I have a question.

What that means ? ---> Most users ever online on a day was {1} on {2}.

Every Day the "Most users ever online on a day was {1} on {2}." reset to 0.
Why ? I want that the user record to stand remains.

who can I do this ?

Sorry for my bad English.
Did you run the query that you're supposed to at the beginning of instructions.txt?

bigreefer
02-16-2004, 03:41 AM
Yea I did,

Today I reinstall the Hack one more times and at 24h i post the Results :)

I have a another problem to, when I logged in as Admin, the counter say "User Online Today : 21" so but when I logged in as a test user Acc, the Counter say " User Online Today : 29" why is there a different ?

Greets
Big

Gary King
02-16-2004, 11:10 AM
Yea I did,

Today I reinstall the Hack one more times and at 24h i post the Results :)

I have a another problem to, when I logged in as Admin, the counter say "User Online Today : 21" so but when I logged in as a test user Acc, the Counter say " User Online Today : 29" why is there a different ?

Greets
Big
It's the time the hack uses, it uses the server's midnight as GMT.

bigreefer
02-16-2004, 08:03 PM
So I donĀ“t understand this Problem. Pleace help

If I Logged in as Admin the stats hack say to my a different number.
Logged in as user the stats hack say also a different number.

where is the problem?

I am the only who had this Problem ?

The 2 Pics shows one time logged in as user and one logged in as Admin.
Plz help me !

Ps. IfI count the nics in the list maualy, the results ist 104 for this reason i think that 104 Member is the correct count. But only if I logged in as an user the Hack shows me the 104 Users --> See the Pics.

Greetz
Big

Gary King
02-16-2004, 08:09 PM
So I don?t understand this Problem. Pleace help

If I Logged in as Admin the stats hack say to my a different number.
Logged in as user the stats hack say also a different number.

where is the problem?

I am the only who had this Problem ?

The 2 Pics shows one time logged in as user and one logged in as Admin.
Plz help me !

Ps. IfI count the nics in the list maualy, the results ist 104 for this reason i think that 104 Member is the correct count. But only if I logged in as an user the Hack shows me the 104 Users --> See the Pics.

Greetz
Big
Wow really weird, but looks like you modified phrases. Make sure you changed correctly; maybe show me what the content of that phrase is?

bigreefer
02-16-2004, 09:00 PM
Wow really weird, but looks like you modified phrases. Make sure you changed correctly; maybe show me what the content of that phrase is?


Hi,

thanks for helping me.

Show at the Pics to see the phrase I have changed.

bigreefer
02-16-2004, 09:15 PM
So its midnight and I can see that the first probelm are solved the stats save the "most user ever" part and reset the Today Part ! great :)

But Problem Nr. 2 still there, de Member see more users Today as the Admin.

Greetz
Big

FleaBag
03-01-2004, 12:16 AM
Sweet hack - installed in under two minutes. Thanks. :)

Beermonster
03-02-2004, 06:40 PM
Thanks installed :)

ryancooper
03-02-2004, 09:22 PM
installed! Thanks

elefekt
03-06-2004, 05:35 AM
About that resetting at the end of the day. I had the installer.php run the queries before. What part of the new instructions fix the problem?

Thanks

Gary King
03-06-2004, 11:43 AM
About that resetting at the end of the day. I had the installer.php run the queries before. What part of the new instructions fix the problem?

Thanks
Okay then just re-apply the code changes, that's the ones that are changed (some minor template changes but not required to function properly.)

mmw
03-06-2004, 12:03 PM
nm all works fine now. Ta for this :)

Mr. Brian
03-10-2004, 08:36 PM
As usual, is it possible to include guest as well? I think I ever saw it somewhere but just couldn't remember "where".

Gary King
03-10-2004, 09:12 PM
As usual, is it possible to include guest as well? I think I ever saw it somewhere but just couldn't remember "where".
https://vborg.vbsupport.ru/showpost.php?p=470195&postcount=114

Okiewan
03-12-2004, 07:56 PM
Didn't see it in the thread... has this been modified to just have a link to users online today, rather than displaying them on forum home? 1500 users takes too much space.
Thanks and sorry if this has been addressed!

Mr. Brian
03-12-2004, 09:14 PM
Hi,

Thanks for your response, your inaccurate refer to members or guest?

Thanks. :)

https://vborg.vbsupport.ru/showpost.php?p=470195&postcount=114

Gary King
03-12-2004, 09:19 PM
Hi,

Thanks for your response, your inaccurate refer to members or guest?

Thanks. :)
Guests :) I guess I could implement this, though, and also another modification which will put the 'Who was online today' info on a separate page but link to it :)

Okiewan
03-12-2004, 09:33 PM
Thanks for considering it!

Mr. Brian
03-12-2004, 10:24 PM
Hey thats great baby,

Looking forward to hear from you soon! :nervous:

Guests :) I guess I could implement this, though, and also another modification which will put the 'Who was online today' info on a separate page but link to it :)

Leah
03-13-2004, 07:10 PM
Great hack! :)
Does anyone know how I can let supermods also se those who has chosen to be invisible?

Wifey
03-15-2004, 06:19 PM
Great hack! I just installed it and it's working perfectly ^_^ Thanks!

joeychgo
03-16-2004, 05:24 PM
Question:

How does one incorporate this into the VBadvanced homepage as well?

Gary King
03-16-2004, 06:49 PM
Hey thats great baby,

Looking forward to hear from you soon! :nervous:
Download these instructions, let me know if they work :)

https://vborg.vbsupport.ru/attachment.php?attachmentid=17349

joeychgo
03-16-2004, 07:09 PM
Gary -- I have this hack installed on my forum page and its great.

What do I need to do to get it on my vb advanced page also? I have a who's online now box there arlready and would like to add this to it.

lincolnvscadillac.com

Gary King
03-16-2004, 07:13 PM
Gary -- I have this hack installed on my forum page and its great.

What do I need to do to get it on my vb advanced page also? I have a who's online now box there arlready and would like to add this to it.

lincolnvscadillac.com
I don't use vbadvanced, but I'm sure it isn't too complicated. Just add the required code for this hack, into the index.php for vbadvanced and then put the template additions into a custom block in vbadvanced, or wherever you want it to show up.

Also FYI, vbindex supports 'Who was online today on forums' :)

pdk2tr
03-17-2004, 01:21 AM
Is there any way to get this to reset to different timezones? My site is for the UK (server is in the US) and this seems to start it's daily calculation at about 5am GMT (which is roughly midnight where my server is). Also, the last activity "mouseover" doesnt reflect the difference in timezones - it's 5hrs out for 99% of my users.

What I would like is the count to reset itself to mkidnight GMT, not midnight server time, and the last activity to reflect GMT not EST.

THANKS Gary W,
ITS A VERY GOOD HACK!

BUT STILL SOME PROBLEMS IN DIFFERENT TIMEZONES!
MY TIMEZONE IS IN GMT+8(SEVER TIME IS ALSO GMT+8)

HOW CAN I FIX IT? :(
ILL TRY TO FIX.. BUT COULD U DO ME A FAVOR?
THANKS VERY MUCH! ;)

pdk2tr
03-17-2004, 02:42 PM
I find the way to slove it..

MY TIMEZONE IS +8

find
(($bbuserinfo['timezoneoffset']-$timeoffset)*3600))

increase -8
(($bbuserinfo['timezoneoffset']-$timeoffset-8)*3600))

now

The following members have already visited the forums today:

is correct.. :mad:

Gary King
03-17-2004, 03:19 PM
I find the way to slove it..

MY TIMEZONE IS +8

find
(($bbuserinfo['timezoneoffset']-$timeoffset)*3600))

increase -8
(($bbuserinfo['timezoneoffset']-$timeoffset-8)*3600))

now

The following members have already visited the forums today:

is correct.. :mad:
Thanks! I fixed that in the instructions now. It's a little different from yours but you helped me find that :)

Mr. Brian
03-17-2004, 04:39 PM
Broken link? :ermm:

"Invalid Attachment specified. If you followed a valid link, please notify the sososo"


Download these instructions, let me know if they work :)

https://vborg.vbsupport.ru/attachment.php?attachmentid=17349

Gary King
03-17-2004, 04:40 PM
Broken link? :ermm:

"Invalid Attachment specified. If you followed a valid link, please notify the sososo"
Because I updated attachments. Download the latest instructions for this hack :)

Mr. Brian
03-17-2004, 06:18 PM
Because I updated attachments. Download the latest instructions for this hack :)
Hi, thanks for that but what I actually want is to have guest to be included aswell. So does the updated zip file have this funtion?

thanks

Gary King
03-17-2004, 11:13 PM
Hi, thanks for that but what I actually want is to have guest to be included aswell. So does the updated zip file have this funtion?

thanks
Nope it doesn't have that feature, and I'm not sure if I will be including it because I can forsee the many problems that it shall cause :)

DaPro
03-20-2004, 10:59 AM
I tried to install onto vB3 Gold, works fine for me.

Roody
03-20-2004, 06:55 PM
Is there a way to make this hack reflective of actual numbers? Here is what I mean. Under "Currently Active Users" on my site it says there was 55 members in Nov. 2003. Under "Number of Active Users Today" it says 34. That seems a bit incorrect. Is there a way to resolve this?

bah never mind stupid me. I just realized one doesnt equate guests and the other one does.

blakkboy
03-22-2004, 04:31 AM
******************************
NOW CREATE THE FOLLOWING PHRASES:
******************************
last_online_at_x / Last online at {1}
******************************
active_users_today / Number of Active Users Today
******************************
most_users_ever / Most users ever online on a day was {1} on {2}.
******************************
already_visited_today / The following members have already visited the forums today


where does that bit of code go...... i dont understand the CREATE THE FOLLOWING PHRASES thing

SnowBot
03-22-2004, 05:18 AM
where does that bit of code go...... i dont understand the CREATE THE FOLLOWING PHRASES thing
Goto Admincp > Languages & Phrases and choose ADD new phrase.

blakkboy
03-22-2004, 05:27 AM
thanx plenty

SnowBot
03-22-2004, 05:30 AM
Anytime. :)

blakkboy
03-22-2004, 05:39 AM
sory i figured it out....

thanx again

SnowBot
03-22-2004, 05:47 AM
cool, glad you got it sorted :)

idwf
03-24-2004, 06:09 AM
Can anyone get this working on VB3 GOLD?

I cant find anything in the form home that looks like 'todaymaxonline'???

joeychgo
03-24-2004, 06:57 AM
worked fine when i upgraded to gold.

idwf
03-24-2004, 10:31 AM
worked fine when i upgraded to gold.
urm...I'll try again when i get home, but...This is a fresh copy of VB Gold, urm...in my index.php, i cant find where to insert the code. Can you help me atall?

I've made the database, but..am stuch now. I got it working on RC1,2,3,4.:ermm:

Gary King
03-24-2004, 06:59 PM
urm...I'll try again when i get home, but...This is a fresh copy of VB Gold, urm...in my index.php, i cant find where to insert the code. Can you help me atall?

I've made the database, but..am stuch now. I got it working on RC1,2,3,4.:ermm:
That's strange because I find the code just fine in vB3 Gold :)

idwf
03-24-2004, 07:02 PM
That's strange because I find the code just fine in vB3 Gold :)I'll redownload it, its probably me :P


EDIT : I done it! It turns out, i was using the wrong index.php. :nervous:

MooMan65
03-25-2004, 12:48 AM
Hrm. I'm having a problem which is probably just because I'm doing something silly on my part, but it's worth a shot.

I've never been able to get this hack to work, I've run the query, edited the index.php file, added and modified the templates and added in the phrases and yet, while it displays all phrases and template-based things correctly, it refuses to parse the PHP code. At least I think it is, as I'm never getting any Usernames in the list or numbers in the stats. I've tried multiple times but with no success either way.

I'm trying to do an install from scratch on vB3 Gold btw.

Any help would be greatly appreciated! It does sound like I'm doing something wrong in the php file mods, or maybe the query, but I'm not too sure.

Nj?rd Eriksson
03-25-2004, 10:17 AM
First, let me state that this is an awesome hack, and that I would like to keep it. Thanks to the author and all coders for their work, fixes and improvements.

"Most members ever online on a day" works now. Invisible users are suppressed what is great. The formatting of special users (such as moderators, administrators, &c.) in bold, italics, &c. works, too. The layout is great.

There is, however, still a problem related to time zones. It doesn't matter to what one sets the Default Time Zone Offset in the Admin CP: there are always problems. For demonstration purposes, I set it to GMT:

https://vborg.vbsupport.ru/attachment.php?attachmentid=17505&stc=1

Every member has now the possibility to define his own Time Zone in the User CP under Edit Options. If I set it to GMT, this is what I get:

https://vborg.vbsupport.ru/attachment.php?attachmentid=17506&stc=1

If I set it to GMT-9, this is the result:

https://vborg.vbsupport.ru/attachment.php?attachmentid=17507&stc=1

And worst, and that's the real problem, if I set it to GMT+9, this is the result:

https://vborg.vbsupport.ru/attachment.php?attachmentid=17508&stc=1

The results obviously depend on the time of the day, but there are always Time Zones for which 0 members are displayed (and this state can last for hours), albeit there are even members online and active at the moment, regardless to what one sets the Default Time Zone Offset in the Admin CP.

Can some advanced coder maybe fix this for all of us who love this hack, please? :)

(Automatic and static DST offsets in the Admin CP and User CP would have to be considered as well, I assume, but I'm no coder.)

Actually, if possible, best would be if the hack would be totally dynamic, i. e. if it displayed the users of the last 24 hours for everyone, regardless of his time zone.

Thanks for all your efforts. Much appreciated. ;)

dillon
03-25-2004, 07:31 PM
It seems like I've got my working. However, the Admin/Mods aren't showing up in bold/italics. Any suggestions? I replaced my existing code in index.php as suggested earlier in this thread, but that didn't work.
Thanks.

Yuber
03-27-2004, 01:11 PM
PLEASE CLICK THE INSTALL BUTTON IF INSTALLED! :)

What does this hack do?

It shows the users who visited your forums in the last 24 hours (or today). This hack works similiarly like the one released for vBulletin 2.

NOTE: If you want to show 'Who was online today' on a separate page from forumhome, then download instructions-newpage.txt and onlinetoday.php instead of instructions-regular.txt

Modifications
1 file modification 3 template modifications 0 queries to run

Features
supports and uses phrases
usernames are formatted properly
invisible users only show to people who are supposed to see them (admins and whoever else you allowed)
integrated (makes it so that the Who Was Online bar is now collapseable :)


Screenshots
Look below :)

Credits: Thanks goes to Mystics, where this hack is based on his :)
Thanks for the hack. Will this work with vB 3.0.0 Gold?

sabret00the
03-27-2004, 04:11 PM
anyway managed to get this to work on the WOL / online.php yet :(

Gary King
03-27-2004, 05:21 PM
anyway managed to get this to work on the WOL / online.php yet :(
Managed, or not managed? lol

sabret00the
03-27-2004, 09:40 PM
Managed, or not managed? lol
managed i want the who was online today to sit on the bottom of my online.php rather than on the bottom of the Currently Active Users table (forumhome)

Gary King
03-28-2004, 01:02 AM
managed i want the who was online today to sit on the bottom of my online.php rather than on the bottom of the Currently Active Users table (forumhome)
Ah, your original post should have had 'anyway' be 'anyone' you mean, right?

BlackxRam
03-28-2004, 08:37 AM
Ok... can someone please either upload correct DIRECTIONS for this hack or is there a better one out there? Im not sure if theres 15 pages of errors to be fixed... whats the deal with this hack.... shouldnt this be in BETA?!?!

joeychgo
03-28-2004, 08:39 AM
it works fine for gold as is.

Gary King
03-28-2004, 02:08 PM
Ok... can someone please either upload correct DIRECTIONS for this hack or is there a better one out there? Im not sure if theres 15 pages of errors to be fixed... whats the deal with this hack.... shouldnt this be in BETA?!?!
What bugs..?

Ocean
03-29-2004, 12:39 AM
This is a nice hack!


But, out of curiosity, what needs to be done in order to make it so that this hack is only visible by Admins or certain User Groups?

Gary King
03-29-2004, 01:33 AM
This is a nice hack!


But, out of curiosity, what needs to be done in order to make it so that this hack is only visible by Admins or certain User Groups?
In the template, put around the code:

<if condition="is_member_of($bbuserinfo,6) OR is_member_of($bbuserinfo,X)"><!-- code goes here --></if>

That's for admins and 1 extra usergroup, replace X with the usergroup ID besides 6.

Ocean
03-29-2004, 02:35 AM
That did the job perfectly.


Thanks, and thanks for a great hack! :)

sabret00the
03-29-2004, 06:37 AM
Ah, your original post should have had 'anyway' be 'anyone' you mean, right?
yup my mind was elsewhere :o

vhoang
03-29-2004, 06:48 AM
How come i downloaded the hack on 3/28 and installed it successfully but it resets at midnite? From what i have read in this thread, Gary should have fixed the problem.

Whats wrong with me? Did i get the un-updated instruction?

vhoang
03-29-2004, 07:02 AM
I have another problem, that is, when i change time-zone, for some timezones it doesnt show any active users (it said 0 and list noone) while there r definitely many users that logged in.

Anyone knows what's going on?

KarateKid
03-29-2004, 09:52 AM
I have another problem, that is, when i change time-zone, for some timezones it doesnt show any active users (it said 0 and list noone) while there r definitely many users that logged in.

Anyone knows what's going on?
Hi Gary,

thanks for this nice hack. But I have a problem. Every day 0:00 the saved number of visitors refreshs to 0. The entries aren't saved correctly. Did I make a mistake somwhere during installing this hack?

Best Regards

Sebastian

Ocean
03-29-2004, 10:31 AM
Well, Karatekid - for what it's worth, I prefer it that way.


After all, this hack is Who Was Online Today, not Who Was Online in the Last 24 Hours.

So, for me, I actually *do* want it to reset at midnight. But that's just my own opinion. :)

KarateKid
03-29-2004, 11:31 AM
Well, Karatekid - for what it's worth, I prefer it that way.


After all, this hack is Who Was Online Today, not Who Was Online in the Last 24 Hours.

So, for me, I actually *do* want it to reset at midnight. But that's just my own opinion. :)
oh I'm sorry. I meant the record is reset every day.

Tri@de
03-29-2004, 11:52 AM
Great!
Installed! :)

Ocean
03-29-2004, 12:04 PM
oh I'm sorry. I meant the record is reset every day.

Ah! Now, I understand. :)

Well, for what it's worth - I installed this yesterday, and today it's still showing yesterday for the Record of Most Users Ever Online in a Day. So, if there is still a glitch - it doesn't appear to be affecting all installations.

trafix
03-29-2004, 12:30 PM
i just installed ... but

it shows this..

Number of Active Users Today: 0

Most users ever online on a day was 12 on Yesterday. | The following members have already visited the forums today:

But no names are being displayed ... is this dynamic?

Gary King
03-29-2004, 07:00 PM
i just installed ... but

it shows this..

Number of Active Users Today: 0

Most users ever online on a day was 12 on Yesterday. | The following members have already visited the forums today:

But no names are being displayed ... is this dynamic?
Yep it's dynamic. Are you checking it at midnight or something when it just reset itself? :)

Gary King
03-29-2004, 07:00 PM
For those who are having reset problems, make sure you run the query required.

Hellburn
03-29-2004, 07:07 PM
I dont know what this hack do at the full releases forum. The user record reset at midnigt and the newpage shows difference todayusernumber how to the index.php. The hack from Mystics works fine but this is only a beta in my eyes.

Gary King
03-29-2004, 07:29 PM
I dont know what this hack do at the full releases forum. The user record reset at midnigt and the newpage shows difference todayusernumber how to the index.php. The hack from Mystics works fine but this is only a beta in my eyes.
Did you run the query? And I'm not really supporting the newpage since I only made it because someone requested it, although it should be working fine.

Hellburn
03-29-2004, 07:50 PM
Yes i have run the query. Now i have tested the instructions-normal.txt and he dont reset at midnight but the instructions-newpagedeutsch.txt reset at midnight.

trafix
03-29-2004, 09:49 PM
Yes i have run the query. Now i have tested the instructions-normal.txt and he dont reset at midnight but the instructions-newpagedeutsch.txt reset at midnight.
ok so far so goos .... lets see what happens tonight

KarateKid
03-30-2004, 02:44 AM
ok so far so goos .... lets see what happens tonight
I ran the query too, but the record is still resetting all night...

as you can see here: http://www.kampfkunst-board.info/forum/index.php

I installed it somedays ago and had at least a record about 500 active users yesterday, but today the record has been resetted again. :disappointed:

Zero Tolerance
03-30-2004, 08:25 AM
It comes to my attention why exactly do you not use this for max user's online in a day

<phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase>

As your method is incorrect O_o'

I know this is correct, because i use it for the welcome box i made on my forum, plus it will be more optomized if you do use it, because there is no need for any queries or code execution, since its already in vB :)

If anyone wants the corrected version + optomized, do these edits:

Change template 'forumhome_todayloggedinusers'
To this:
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('forumhome_todayactiveusers')"><img id="collapseimg_forumhome_todayactiveusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayactiveusers].gif" alt="" border="0" /></a>
$vbphrase[active_users_today]: $todayonline
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_todayactiveusers" style="$vbcollapse[collapseobj_forumhome_todayactiveusers]">

<tr>

<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt=" Number of Active Users Today" border="0" /></td>

<td class="alt1" colspan="0"><div class="smallfont">
<phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase> |
$vbphrase[already_visited_today]:<br />
$todayloggedinuser<br />
</div></td>
</tr>
</tbody>

Open index.php:
Find:
// ### MAX LOGGEDIN USERS TODAY ################################
$todaymaxusers = unserialize($datastore['todaymaxonline']);
if (intval($todaymaxusers['todaymaxonline']) <= $todaynumberregistered)
{
$todaymaxusers['todaymaxonline'] = $todaynumberregistered;
$todaymaxusers['todaymaxonlinedate'] = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('todaymaxonline', '" . addslashes(serialize($todaymaxusers)) . "')");
}

$todayrecordusers = $todaymaxusers['todaymaxonline'];
$todayrecorddate = vbdate($vboptions['dateformat'], $todaymaxusers['todaymaxonlinedate'], 1);

Remove it

Save and upload, thats it :)

KarateKid
03-31-2004, 08:29 AM
hm, that doesn't change anything with my problem!??!

Hellburn
04-01-2004, 06:42 AM
I dont understand why the userrecord reset at midnigt by the newpage.txt. Nobody a fix for this problem?