Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Who's Online Plugin for 1.5.x  (Read 4440 times)

0 Members and 1 Guest are viewing this topic.

specular

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Who's Online Plugin for 1.5.x
« 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.
Logged

cmfa

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 226
Re: Who's Online Plugin for 1.5.x
« Reply #1 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Who's Online Plugin for 1.5.x
« Reply #2 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>');
        }
Logged

specular

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Who's Online Plugin for 1.5.x
« Reply #3 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.
Logged

specular

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Who's Online Plugin for 1.5.x
« Reply #4 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)
Logged

specular

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Who's Online Plugin for 1.5.x
« Reply #5 on: January 30, 2011, 10:36:28 pm »

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

specular

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Who's Online Plugin for 1.5.x
« Reply #6 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!
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.