Who's Online Plugin for 1.5.x Who's Online Plugin for 1.5.x
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Who's Online Plugin for 1.5.x

Started by specular, January 29, 2011, 05:58:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

specular

Great plugin, works fine, except for one thing I'd like to change...
Is there an easy way to remove the registered user display shown in bold below?

There are 25134 registered users. The newest registered user is xxxxxxx.  In total there are 2 visitors online: 2 registered users and 0 guests.  Most users ever online: 5 on 01/27/11 at 11:10.  Registered users who have been online in the past 5 minutes: xxxxxxx, cazzy198.

cmfa

Hi,


For example, Codebase.php
find:
printf($lang_plugin_php['onlinestats_we_have_reg_members'], <strong>.$num_users.</strong>);

change in:
printf($lang_plugin_php['onlinestats_we_have_reg_members'], $num_users);

VG
CMFA

ΑndrĂ©

If you want to completely remove that part, just delete (or comment out)
        if ($num_users == 1) {
            printf($lang_plugin_php['onlinestats_we_have_reg_member'], '<strong>'.$num_users.'</strong>');
        } else {
            printf($lang_plugin_php['onlinestats_we_have_reg_members'], '<strong>'.$num_users.'</strong>');
        }

specular

Perhaps I need to clarify - I want to remove the "There are 25134 registered users." part of the display.
I only put it in bold in this forum to highlight the portion  I want to cut out.

So, I am looking for the file name and the line of code I need to edit to remove just that portion.
I just don't need visitors to see the total number of registered users.
It would be nice if the config portion of the plugin included a check box selection for data that you want to exclude (future suggestion perhaps?).
I looked through the code but couldn't find the output section, probably because it is coded to read the language file variables, not the plain English text output.

See below for the output I need...


Original > There are 25134 registered users. The newest registered user is xxxxxxx.  In total there are 2 visitors online: 2 registered users and 0 guests.  Most users ever online: 5 on 01/27/11 at 11:10.  Registered users who have been online in the past 5 minutes: xxxxxxx, cazzy198.

Modified > The newest registered user is xxxxxxx.  In total there are 2 visitors online: 2 registered users and 0 guests.  Most users ever online: 5 on 01/27/11 at 11:10.  Registered users who have been online in the past 5 minutes: xxxxxxx, cazzy198.

specular

@Andre - what file is that code in? Your solution looks correct.
(can we edit these forum posts? Not to be a moron, I can't find the edit button)

specular

Never mind guys...codebase.php - got it...thanks!

specular

Quote//        if ($num_users == 1) {
//            printf($lang_plugin_php['onlinestats_we_have_reg_member'], '<strong>'.$num_users.'</strong>');
//        } else {
//            printf($lang_plugin_php['onlinestats_we_have_reg_members'], '<strong>'.$num_users.'</strong>');
//        }
//        echo '.&nbsp;' . $LINEBREAK;

had to include one more line to remove the period. thanks!