The Arcive of vBulletin Modifications Site. |
|
# of users in forum on forumhome Details »»
|
|||||||||||||||||||||||||
Ok here it is.. I have seen a few requests for it... so here it is.
Info: What it does is show the number users in a forums on your forum home / main page. Install Info: 2 File Adds 6 template edits Thats it. I will post images below if you need an idea of what it looks like ![]() Here is the new version of it. " Thanks Chen :bunny: " The first file will be posted below it you need to unistall or would like to use it O__O Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Image
|
|
#3
|
||||
|
||||
|
Very cool.
|
|
#4
|
||||
|
||||
|
Nice
|
|
#5
|
||||
|
||||
|
Thanks for sharing neo! Nice hack!
|
|
#6
|
||||
|
||||
|
Thanks neo - I modified it so that I can show how many users are using a particular forum in the header of every page - My java chat is actually a forum on my site, and this is what I've been looking for to show who's chatting.
|
|
#7
|
||||
|
||||
|
This adds another query for each forum you have... ouch.
|
|
#8
|
||||
|
||||
|
This is how I did it, only adds one query to the index page and the query is quite fast as well.
I added this somewhere: Code:
// Users browsing each forum
$getforumbrowsers = $DB_site->query('
SELECT COUNT(*) AS count, inforum
FROM user
WHERE lastactivity>'.($ourtimenow - $cookietimeout).'
AND lastvisit<>lastactivity
GROUP BY inforum
');
$forumbrowsers = array();
while ($getforumbrowser = $DB_site->fetch_array($getforumbrowsers)) {
$forumbrowsers[$getforumbrowser['inforum']] = $getforumbrowser['count'];
}
Code:
global $forumbrowsers;
$browsers = $forumbrowsers[$forum['forumid']];
if (intval($browsers) < 1) {
$browsers = 0;
}
|
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
||||
|
||||
|
No, just index.php.
|
![]() |
|
|