Topic: Guests online text + little improvement on user count
Hello,
In lang/index.php we have 'Users plural', 'User single' and 'Users none' that's great, but we should also have a 'Guest none'.
Because I think "There are 0 guests and.." shoud be "There are 0 guest and..." or "There are no guest and..."
Perhaps by replacing this :
<?php (($num_guests != 1) ? printf($lang_index['Guests plural'], forum_number_format($num_guests)) : printf($lang_index['Guest single'], $num_guests)) ?>by something like this :
<?php
if ($num_guests < 1)
printf($lang_index['Guest none'], $num_guests);
elseif ($num_guests == 1)
printf($lang_index['Guest single'], $num_guests);
else
printf($lang_index['Guests plural'], forum_number_format($num_guests));
?>By the way, I think this piece of code :
<?php ((count($users) > 1) ? printf($lang_index['Users plural'], forum_number_format(count($users))) : printf(((count($users) == 0) ? $lang_index['Users none'] : $lang_index['User single']), count($users))) ?>Should be replace by a similare piece than the one for pluralize the guest count. A variable could be added just before 'in_users_online_pre_online_info_output' hook.
$num_users = count($users);
[...]
<?php
if ($num_users < 1)
printf($lang_index['Users none'], $num_users);
elseif ($num_users == 1)
printf($lang_index['User single'], $num_users);
else
printf($lang_index['Users plural'], forum_number_format($num_users));
?>So like this we could have just one count($users) and the possibilty to use this number in previous hook, plus the possibility to use textual for "none" and "one" like "... and one registered user online"
Last edited by vincent (2008-08-01 21:58:40)