Quote:
Originally posted by Orlandu
Well Neo, if you don't mind I have a addition to that hack. It will say "1 users" how it is, but I added a little bit and now it will say "1 user" and then "2 users" respectively.
I'll post if, but if you won't allow it then I will remove it.
Instead of add this:
PHP Code:
global $forumbrowsers;
$count = $forumbrowsers[$forum['forumid']];
if (intval($count) < 1) {
$count = 0;
}
Add this for the correct term for 1 user:
PHP Code:
global $forumbrowsers;
$count = $forumbrowsers[$forum['forumid']];
$s = 's';
if (intval($count) < 1) {
$count = 0;
}
if (intval($count) == 1) {
$s = '';
}
That's in both forumdisplay.php and index.php
Then you have to change the counter to something like this:
Code:
($count user$s browsing)
in the right template.
Hope you like
|
Better change code
PHP Code:
if (intval($count) == 1) {
to:
PHP Code:
if (intval($count) == 0 OR intval($count) == 1) {
btw Great hack! also does working on vb 2.2.7