The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Count users on a certain page
I'm trying to figure out how I could use Vbulletin to report to me how many users are on a particular page, then turn this into a variable that I can plug into the template for navigation?
We have a chat page, let's say it is chat.php, which shows up under "Who's online" as Unknown Location /forums/chat.php Is there a way to use this information to get a count of users accessing the page and set it as a variable so we can display it elsewhere? Thanks! |
#2
|
||||
|
||||
Your best bet would be to ask in the modifications thread, like how they store the users in the chat mod, and if what you want to do is even possible.
|
#3
|
|||
|
|||
It is a flash IRC client running on the chat.php, so the only interaction it has with the board is that it's housed on a forum page and pulls the usernames when you first login to the client. I don't think it stores any info other than showing on the online page that someone is accessing that page.
I was just thinking there would have to be a way to set a number variable for how many user are accessing a particular thread or page at one time and being able to report it. Maybe a SQL query? Admins, if this question needs to be in another area of this board, please move it for me. Thanks! |
#4
|
|||
|
|||
The session table has a column called location, which you can use to count the number of users who are on that specific page.
PHP Code:
|
#5
|
|||
|
|||
If the chat page shows up in "who's online", then you should be able to do a query to find out how many users are showing up as chatting (Edit: like Dave mentioned above). But that would only tell you how many people have looked at the chat page in the last 15 minutes (or whatever your session timeout is set to) and not necessarily how many users are active. The flash client probably knows how many users are active, but unless it has some kind of interface to share that info, then I'm not sure if there's any way to do what you want.
|
Благодарность от: | ||
ozzy47 |
#6
|
||||
|
||||
Well, AFAIK the last known location (as a path relative to forum root) for every active user session. You could just run a count across that table, filtering by location.
That's pretty rough, of course, but the only possibility I can think of. vB itself AFAIK does nothing else for its own active users in forums functionality. --------------- Added [DATE]1416839589[/DATE] at [TIME]1416839589[/TIME] --------------- Yeah, well, three answers, and I come in last *lol*. I blame my wife asking me questions... |
Благодарность от: | ||
ozzy47 |
#7
|
|||
|
|||
Oh, and sorry, but I should have done this instead of answering:
SH0CK, You are currently showing up as unlicensed. To be able to download modifications and/or receive support here at vBulletin.org, we ask you to please click here (vB-Germany users click here) and enter your email address. You will need to use your customer number and password (which will be in the email you got when you paid for your license) to access that page. Please note that your email is case sensitive. To protect our customers privacy you will also need to Opt-In to license validation for all Support Sites. You must authorise vBulletin.org in order to validate your license status here. You can do this at the page linked above for your distributor. Make sure to set the permission to allow vBulletin.org to validate your status. The update of your account can take up to one hour. Thank you. |
#8
|
|||
|
|||
Sorry it took so long to reply back. Had to get that pesky unlicensed thing to go away after updating my email addy here.
Thank you all for the point in the right direction. That SQL query is just the thing I was looking for. Now to work on using that info. Thanks! |
Благодарность от: | ||
ozzy47 |
#9
|
||||
|
||||
Well glad to see you sorted the unlicensed thing.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|