forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: specular on January 29, 2011, 05:58:12 am

Title: Who's Online Plugin for 1.5.x
Post by: specular on January 29, 2011, 05:58:12 am
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.
Title: Re: Who's Online Plugin for 1.5.x
Post by: cmfa on January 29, 2011, 08:37:49 am
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
Title: Re: Who's Online Plugin for 1.5.x
Post by: Αndré on January 29, 2011, 11:00:11 am
If you want to completely remove that part, just delete (or comment out)
Code: [Select]
        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>');
        }
Title: Re: Who's Online Plugin for 1.5.x
Post by: specular on January 30, 2011, 10:32:27 pm
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.
Title: Re: Who's Online Plugin for 1.5.x
Post by: specular on January 30, 2011, 10:34:35 pm
@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)
Title: Re: Who's Online Plugin for 1.5.x
Post by: specular on January 30, 2011, 10:36:28 pm
Never mind guys...codebase.php - got it...thanks!
Title: Re: Who's Online Plugin for 1.5.x
Post by: specular on January 30, 2011, 10:43:13 pm
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!