View Full Version : "Users browsing this thread"
Admin
03-31-2002, 10:00 PM
Here's what I did when I first written the hack for vB.org.
Since nakkid's query was wrong, I got permission from him to post my version. :)
Anyway, this is using vbHacker so you'll need that. See my signature for a link about that.
This hack adds a list of users currently browsing the thread you see. It requires another field in the user table and no new queries except for showthread.php. It's based of the "Users browsing forum" feature so it was easy. :)
Cheers.
Recluse
04-01-2002, 03:26 PM
went off without a single hitch :) thank you sir
Kyomu
04-01-2002, 03:36 PM
Many thanks.
inetd
04-01-2002, 03:41 PM
Hi!
Good! Big thx!
Smellycat
04-01-2002, 04:04 PM
Perfectly installed, without a hitch
Cheers!
Recluse
04-01-2002, 04:06 PM
correction when i edit a post i get Warning: Failed opening '/home/cra****/public_html/forums/editpost.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0
ladyfyre
04-01-2002, 04:07 PM
does anyone have the one nakkid wrote still??
I had already installed it, and can't find it on my computer, and need it again to un-install.....looks like they deleted it from here already :(
Lesane
04-01-2002, 04:08 PM
Could u also post a normal txt file with the instructions? That would be cool, thanks. :)
Smellycat
04-01-2002, 04:14 PM
Originally posted by Recluse
correction when i edit a post i get Warning: Failed opening '/home/cra****/public_html/forums/editpost.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0
I just tried to edit a post on mine and never got a error.
Pheeeww!!!
Admin
04-01-2002, 04:19 PM
ladyfyre: remove the part from "// Get users browsing this thread" until:
eval("\$loggedusers .= \"".gettemplate('showthread_loggedinusers')."\";");
}
}
Recluse: make sure editpost.php is uploaded. The system can't find.
Recluse
04-02-2002, 03:18 AM
Originally posted by FireFly
Recluse: make sure editpost.php is uploaded. The system can't find.
i get it when veiwing attachments also, i let vb hacker edit them, so i never even downloaded them ( well i did backs up first ) im going to try again here in a few and see what happens
Originally posted by Lesane
Could u also post a normal txt file with the instructions? That would be cool, thanks. :) You can tell vBHacker to make you a text file. I'm going to check it out with this one. :)
i was so close to the answer.. ;)
all i missed was to run the query. the code is identical. :) well almost. i didnt see the inforum because i dont have my mysqlmanager installed on my pc. is a done thing now... :p
Admin
04-02-2002, 04:57 AM
Originally posted by nakkid
i was so close to the answer.. ;)
all i missed was to run the query. the code is identical. :) well almost. i didnt see the inforum because i dont have my mysqlmanager installed on my pc. is a done thing now... :p
Yeah, and editing 10 more files to update the inthread field and create it. ;)
Originally posted by FireFly
Yeah, and editing 10 more files to update the inthread field and create it. ;) true. i was referring to the actual hard code.
Recluse
04-02-2002, 05:18 AM
Originally posted by FireFly
Recluse: make sure editpost.php is uploaded. The system can't find.
ok i used vb hacker again, just dident let it run the query or re-edit the templates and it wokrd fine :) thanks for the hack dude
Erwin
04-02-2002, 06:27 AM
Thanks nakkid for the text file - I'm an old-fashion guy! :D
Jawelin
04-02-2002, 07:31 AM
to Lesane & Erwin
I'm an old-fashion lover too... ;)
See this (https://vborg.vbsupport.ru/showthread.php?postid=232970#post232970) Firefly post about the exporter.
Didn't tried yet, but I absolutely hope it works.... ;)
Lesane
04-02-2002, 08:02 AM
Originally posted by nakkid
the text file... ;)
Thanks :up:
(Where is the up Firefly? ;) )
cditty
04-03-2002, 12:45 AM
How would I make this visible to admins and mods only?
Chris
TWTCommish
04-03-2002, 01:12 PM
Originally posted by cditty
How would I make this visible to admins and mods only?
I think you'll want to replace this...
if ($browsers) {
eval("\$onlineusers = \"".gettemplate('showthread_browsing')."\";");
}
...with this...
if ($browsers && ($bbuserinfo[usergroupid] == 5 || $bbuserinfo[usergroupid] == 6 || $bbuserinfo[usergroupid] == 7)) {
eval("\$onlineusers = \"".gettemplate('showthread_browsing')."\";");
}
...I think that should make it visible to Mods, Super Mods, and Admins. Haven't tested it, though. :)
Admin
04-03-2002, 03:32 PM
Or use ... and ismoderator(). :)
TWTCommish
04-03-2002, 03:36 PM
Shhhhh! Do you want EVERYONE to know that I don't know jack squat about vb? :D
Admin
04-03-2002, 03:39 PM
Heh, I was using what you posted as well until very recently, when I discovered ismoderator(). :)
Gutspiller
04-05-2002, 09:10 PM
Can somebody tell me if this hack would work with 2.0.3? And where is the "Who's Browsing This Forum" hack? I want that one too, is that included in 2.2.4/5 :ermm:
I have been looking for a hack that does this ever since I installed my board, but yet again I am stuck with my version and am not willing to upgrade. Somebody please tell me this hack will work or might work with 2.0.3???
Thanks for any help you guys can provide.
Lyric Olympics
04-06-2002, 01:06 AM
i have 2.2.5
and this line isn't in newreply.php
updateuserforum($threadinfo['forumid']);
Originally posted by Lyric Olympics
i have 2.2.5
and this line isn't in newreply.php
updateuserforum($threadinfo['forumid']); It's line 72 of an unhacked 2.2.5 newreply.php.
Admin
04-06-2002, 07:35 AM
That line is changed if you installed my Users Browsing Thred hack, Olympics.
Lyric Olympics
04-06-2002, 02:53 PM
that's odd
i have no hacks and i've uploaded the files
but my newreply is different
i downloaded a fresh copy and reuploaded again
and now i can find that line
odd
thanx anyways
Gutspiller
04-09-2002, 06:18 AM
Firefly does this hack work with 2.0.3? It kinda sounds like it uses a addon from 2.2.4/5 did I read it wrong or is 2.2.4 + a must?
While I'm here, how do I set VBHacker to make backups? It doesn't say in the VBhacker thread how or what to do. If it does it automatically what are the names of the backup files and what if a file of that name already exists?
firefly, i noticed something:
if i view the list of users in showthread.php, there are some users that are not listed in forumdisplay.php (users that actually browsed that specific thread i viewed). to be more clear, if i view this thread, and you are here also, if i go back to the detailed category, you are not listed there. any idea why?
this is happening only when i get out of the showthread.php.
just curious if you could see why it's happening this.
thanks.
Admin
04-09-2002, 11:25 AM
Guts: you must have at least 2.2.0 as it uses the Users browsing this forum engine.
-=dm=-
04-09-2002, 02:09 PM
hmm what does this hack do?
TWTCommish
04-09-2002, 02:11 PM
Originally posted by -=dm=-
hmm what does this hack do?
Um, Chen described what it does in the first post, and a demo is seen right above the "Next Thread" and "Previous Thread" links on this very page. :)
-=dm=-
04-09-2002, 02:24 PM
Thanx
but I can see, on my forum "Users browsing this thread" without I added this hack. how come?
Gutspiller
04-09-2002, 07:59 PM
Originally posted by FireFly
Guts: you must have at least 2.2.0 as it uses the Users browsing this forum engine.
Thanks. :(
I wonder if it would be possible to have to boards same server, but one be for news and one be for chatting. :devious:
Mental Stamina
04-09-2002, 09:02 PM
Originally posted by Gutspiller
I wonder if it would be possible to have to boards same server, but one be for news and one be for chatting. :devious:
as long have you have 2 databases you can have 2 boards
Crazy Mofo
04-13-2002, 02:32 AM
How can one align it on the right like vBulletin.org has here above NEXT THREAD
Crazy Mofo
04-14-2002, 05:40 PM
:(
wooolF[RM]
04-14-2002, 06:26 PM
]Originally posted by Mental Stamina
as long have you have 2 databases you can have 2 boards
And u must pay for 2 boards...
GOD-Dblade
05-01-2002, 03:37 AM
nice job
mADmAX`
05-03-2002, 04:11 AM
I just did this hack and got no errors but its not working. Where it would show the users browsing is nothing but spaces. Does not even say "users browsing this thread". I looked in showthread template and its got $onlinestatus. What could be wrong, I am running 2.2.5
mADmAX`
05-03-2002, 04:26 AM
NM, I figured it out...
Could This Work on other pages......
like just a normal page.. could i have somewhere on that page it saying... "Users Viewing this Page"
bonnmac
05-08-2002, 05:36 PM
I've installed this on my board which is version 2.2.5 and it works great. I'm so happy that you guys are willing to share your hacks with us non-programmers. Thanks again.
^^upppin for answer on previous page...
dont be afraid to say no
amykhar
05-10-2002, 04:43 PM
When I installed it using vbhacker, it was only showing MY name in any given thread. I finally figured out why.
in showthread.php, this code:
// Get users browsing this forum
if ($showforumusers) {
$datecut = $ourtimenow - $cookietimeout;
$browsers = '';
$comma = '';
$threadusers = $DB_site->query("
SELECT username,invisible,userid
FROM user
WHERE inthread=$thread[threadid]
AND lastactivity>$datecut
AND lastvisit<>lastactivity
");
while ($threaduser = $DB_site->fetch_array($threadusers)) {
if ((!$threaduser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $threaduser['userid']) {
$userid = $threaduser['userid'];
$username = $threaduser['username'];
if ($threaduser['invisible'] == 1) {
$invisibleuser = '*';
} else {
$invisibleuser = '';
}
eval("\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
$comma = ', ';
}
}
if ((!$bbuserinfo['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] <> 0) {
$userid = $bbuserinfo['userid'];
$username = $bbuserinfo['username'];
if ($bbuserinfo['invisible'] == 1) {
$invisibleuser = '*';
} else {
$invisibleuser = '';
}
eval("\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
}
if ($browsers) {
eval("\$onlineusers = \"".gettemplate('showthread_browsing')."\";");
}
}
was not being added to the file. This code:
updateuserforum($thread['forumid'], $thread['threadid']);
WAS added to the file though. Once I pasted in the missing code block, everything worked fine.
Amy
tweak
05-14-2002, 03:53 AM
Help i installed this Hack but it wont work. I checked all the code over and over its all there in the right spots But it wont show up on my forum??
The Code is in the templates and the created template is there.
the query is there.
Admin
05-14-2002, 08:53 AM
Is that not a screen shot of forumhome?
Twin-x
05-14-2002, 09:44 AM
Originally posted by tweak
Help i installed this Hack but it wont work. I checked all the code over and over its all there in the right spots But it wont show up on my forum??
The Code is in the templates and the created template is there.
the query is there.
I have the same problem. Nothing is showed.
tweak
05-14-2002, 10:28 PM
Originally posted by FireFly
Is that not a screen shot of forumhome?
Ahhh Ya? Isn't that where it should be? Like this board?
Originally posted by tweak
Ahhh Ya? Isn't that where it should be? Like this board? That's a different hack:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=38012
tweak
05-15-2002, 05:01 AM
OH SH*T Sorry guys ................. Thanx.
Admin
05-15-2002, 09:36 AM
LOL. :)
tweak
05-15-2002, 10:06 PM
Originally posted by FireFly
LOL. :)
LOL You would not believe how much this stressed me. Spent hour checking everything over and over .LOL I was like WTF am i missing. But hey this hack is install and working great now that i really know what it does. :surprised:
FleaBag
05-21-2002, 11:56 AM
Working well on 2.2.5, thanks FireFly! :)
firefly, i installed your hack today. i was thinking of an interesting mod... to show the actual numbers of users viewing the thread in forumdisplay. here it is what i did...
in forumdisplay.php find:updateuserforum($forumid);replace it with:updateuserforum($forumid,$threadid);find: ORDER BY sticky DESC, $sortfield $sqlsortorder
");BELOW this add::// users browsing each thread
$getthreadbrowsers = $DB_site->query("SELECT COUNT(*) AS count,inthread
FROM user
WHERE lastactivity>".($ourtimenow - $cookietimeout)."
AND lastvisit<>lastactivity
GROUP BY inthread");
$threadbrowsers = array();
while ($threadbrowser = $DB_site->fetch_array($getthreadbrowsers)) {
$threadbrowsers[$threadbrowser['inthread']] = $threadbrowser['count'];
}find: $thread[votenum] = '0';
} else {BELOW this, add: global $threadbrowsers;
$activebrowsers = $threadbrowsers[$forum['forumid']];
if (intval($activebrowsers)<1) {
$activebrowsers = 0;
}now.. there is something i miss, because it will not update the number of users viewing the thread. i also tried this...
find:getforumrules($foruminfo,$getperms);BELOW this, add:updateuserforum($thread['forumid'], $thread['threadid']);i think there is an unset somewhere that stop it from counting. can you let me know if the basic idea is ok and what steps i missed? thanks.
Scott MacVicar
05-23-2002, 01:07 PM
Just copying Chen's code from the forum viewers hack won't get you anywhere...
You can follow the same principle but theres an easier way :)
what do you mean wont get me anywhhere? firefly knows is his code, i dont understand what do you reffer to it.
what's the best way PPN? should i do a count in the $browsers query?
vBHackz
05-30-2002, 04:38 PM
Ummmm, I deleted this hack by re-uploading showthread.php and all the file's i edited, and now there's a gap between:
*Vb Bullet* ://UrBaN-DiAlEcT.NeT\: > Urban-Dialect.net > News and Updates > lol, Another dope hack.
This would be the gap.
Go to first unread post firstnew.gif
I want to get rid of this gap, anyone know how?
vBHackz
05-30-2002, 04:41 PM
I dont think i was too clear, So here's a screenshot:
vBHackz
05-30-2002, 04:59 PM
Someone please help...
vBHackz
05-30-2002, 05:43 PM
That's weird, Now it's not showing " Go To First Unred Post "
vBHackz
05-30-2002, 05:48 PM
Okay, I have fixed it, Thanks to all that helped out tho
CRego3D
06-01-2002, 04:59 AM
I have installed this using the txt file,
when I click on the fourm I get a "users browsing this forum (user)" .. but in the thread I get noting .. just 3 spaces .. any ideas what I can be doign wrong ?
CRego3D
06-01-2002, 05:06 AM
nevermind :) .. fixed ;)
FleaBag
06-20-2002, 10:18 AM
Working on 2.2.6, thanks again FireFly! :D
Schorsch
08-21-2002, 02:19 AM
nice hack FireFly, thank you!
Schorsch
Originally posted by mADmAX`
NM, I figured it out...
Originally posted by vBHackz
Okay, I have fixed it, Thanks to all that helped out tho
Originally posted by CRego3D
nevermind :) .. fixed ;)
Okay ... how? 'Cause I have exactly the same problem. :)
FleaBag
09-03-2002, 02:46 PM
Working on 2.2.7 in under a minute. Cheers.
machiavelli33
10-07-2002, 11:41 PM
great hack firefly! Uploaded files, installed, and now running perfectly! V2.2.8 here!
FleaBag
10-29-2002, 08:23 PM
Working with 2.2.8. :D
Uncle Buck
11-29-2002, 04:25 PM
Is there another mod that has to be installed prior to this one?
I do not have a "showthread_browsing.php" file in any of my directories :(
What am i missing here.... any help is appreciated greatly.
pepitojones
11-29-2002, 05:05 PM
"showthread_browsing" is a template that needs to be created (or is created for you if you use the vbhacker install)..
--
Resolved my issue.. =)
MetroSports82
12-02-2002, 10:20 PM
sorry to bring this back, but i need some help. i just installed this hack, using the .txt file. everything went through without any errors, but when i try to view a thread, i don't get the "users browsing this forum (users)" thing? what could be wrong? I did everything that was said in the .txt file. I am also using vB ver. 2.2.8 ... Any help would be greatly appreciated. thanx!! :)
Metro.
MetroSports82
12-02-2002, 10:44 PM
a43079, alamuae, Uncle Buck, anyone? :D ;)
Metro.
Uncle Buck
12-13-2002, 02:15 AM
Well i got the hack to work, but i have noticed another problem
It does not seem to refresh who is browsing the thread quick enough
For example, it shows a user browsing a thread, but he is not even list in that forum, and by going by "whos' online" it shows him somplace else.....
And vice versa, Whos online will show a user reading a thread, but it does not show him under "users browsing thread"
Here is a link to my forum, i'm sure you could see what i mean, please, any help is a apreciated on this! :)
www.highperformancetoys.com
X-Fan
01-08-2003, 02:06 AM
Sorry in advance if this has been asked before, but is there a way to include the number of guests viewing a particular thread as well as the registered members?
MetroSports82
01-08-2003, 12:27 PM
x-fan, that would be really cool! :) Something similar to what Neo came up with here, (# of users in forum, on forumhome).
https://vborg.vbsupport.ru/showthread.php?s=&threadid=38012&highlight=users+browsing+forum
But, instead having it for # of users in thread, on forum display. :)
GoTTi
01-13-2003, 04:44 AM
i installed the hack on 229, and no dice...
fly, is there a updated version of this hack, or should it be working?
MetroSports82
01-13-2003, 09:48 AM
Da_GoTTi, I got it working on 2.2.9. :)
BaBa2002
02-06-2003, 04:55 PM
got a error when i want to run the mysql query
what do i wrong?
SQL-query :
ALTER TABLE user ADD inthread INT(10) UNSIGNED DEFAULT "0" NOT NULL, ADD INDEX inthread (inthread)
MySQL retourneerde:
Duplicate column name 'inthread'
BaBa2002
02-06-2003, 04:58 PM
sorry already found it
ForKmaN
03-24-2003, 12:18 AM
Because my admin directory has changed form admin to admincp, the vbhacker is not seeing the funtions.php file, can this be fixed easily?
esquared
03-24-2003, 07:40 PM
How do you align it to the right like it is here? :(
Kriek
04-22-2003, 05:37 PM
Experiencing the same problem as Amy here (https://vborg.vbsupport.ru/showthread.php?postid=249940#post249940), though can't seem to figure out why.
WEForums
04-22-2003, 08:59 PM
Need a 'fix' for vB 2.3.0. It appears the script works with no errors other than the query doesn't work:
Database error in vBulletin Control Panel 2.3.0:
Invalid SQL: ALTER TABLE user ADD inthread INT(10) UNSIGNED DEFAULT "0" NOT NULL, ADD INDEX inthread (inthread);
mysql error: Duplicate column name 'inthread'
mysql error number: 1060
Date: Tuesday 22nd of April 2003 03:57:48 PM
Script: http://www.weforums.com/forums/forums/admin/query.php
Referer:
And when I view a thread, it appears the script 'works' but it only shows my name. It also has commas and if a user is invisible, it has a "*" with a space, then a comma. So, the script doesn't show usernames like it should (on vB 2.3.0). Anyone know a way of fixing it?
Also note I installed the hack that makes mods and admins appear in bold and bold and italic for the forum display AND thread display.
WEForums
04-22-2003, 09:49 PM
To help clarify what I mean, this is the problem.
Kriek
04-22-2003, 11:23 PM
WEForums, that's the same problem I am experiencing. See my previous post above yours.
WEForums
04-23-2003, 02:15 AM
I thought it was but Amy's post was of no assistance (and I am guessing it wasn't to you either). Hope someone can help both of us out. :)
Kriek
04-24-2003, 03:15 PM
Indeed, I concur ;)
Koutaru
04-30-2003, 10:01 PM
:) I think it's a template thing
Try
| In the "showthread" template, replace this code: |
$poll
With this: |
$poll
<smallfont><p align="right">$onlineusers</smallfont>
<br>
Move $onlineusers to anywhere you want in the showthread template
I installed it on vB 2.3 with no problems :)
Kriek
05-02-2003, 12:42 PM
04-30-03 at 07:01 PM Koutaru said this in Post #93 (https://vborg.vbsupport.ru/showthread.php?postid=389673#post389673)
:) I think it's a template thing
Try
| In the "showthread" template, replace this code: |
$poll
With this: |
$poll
<smallfont><p align="right">$onlineusers</smallfont>
<br>
Move $onlineusers to anywhere you want in the showthread template
I installed it on vB 2.3 with no problems :)
Koutaru, how is that dissimilar from the original instructions? $onlineusers IS in Show Thread Templates/showthread, that's why it is displaying my username, but the problem is that it is ONLY showing my username.
Thurft
05-26-2003, 05:05 PM
is this hack like the pic that attached?
random_X
07-09-2003, 03:12 AM
hi everyone ...
i need this hack but the orginal Attachment of PHP file is look like corrupted !!!
beside that i read many complaint from this hack tell " the hack is NOT work on VB 2.3.0 "
please ... any one can REPOST the FULL fixed hack agin with instructions of install the hack !!
THanx
Oblivion Knight
08-12-2003, 03:52 PM
07-09-03 at 05:12 AM random_X said this in Post #96 (https://vborg.vbsupport.ru/showthread.php?postid=416320#post416320)
hi everyone ...
i need this hack but the orginal Attachment of PHP file is look like corrupted !!!
beside that i read many complaint from this hack tell " the hack is NOT work on VB 2.3.0 "
please ... any one can REPOST the FULL fixed hack agin with instructions of install the hack !!
THanx The text file instructions were posted here (https://vborg.vbsupport.ru/showthread.php?postid=235488#post235488).. :)
Trust me, this hack works fine on 2.3.0.
Sofa King
11-18-2003, 06:26 PM
I followed everything in the .txt file and it seems to work however I can only see my user as the user browsing the thread. Any ideas?
Andrus
09-17-2004, 10:33 PM
I followed everything in the .txt file and it seems to work however I can only see my user as the user browsing the thread. Any ideas?
The last time that I hacked it in I had the same problem... then I decided to turn my board back on. :D
I am trying to get this hacked into 2.35 and am getting this error
Database error in vBulletin Control Panel 2.3.5:
Invalid SQL: ALTER TABLE user ADD inthread INT(10) UNSIGNED DEFAULT "0" NOT NULL, ADD INDEX inthread (inthread);
mysql error: Duplicate column name 'inthread'
mysql error number: 1060
I can't figure out the fix for the query as I am not savvy... I see that others have had this problem... Anyone know the solution?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.