Advanced search  

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

Pages: [1]   Go Down

Author Topic: total memebers number mod  (Read 3729 times)

0 Members and 1 Guest are viewing this topic.

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
total memebers number mod
« on: March 10, 2006, 06:49:30 pm »

I would like to show to all users the number of users total who registered.

Allow logged in users to view memberlist ( I"ve selected [NO])

Thanks,
Dustbunny
« Last Edit: March 12, 2006, 05:24:33 pm by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: total memebers number mod
« Reply #1 on: March 11, 2006, 09:54:48 am »

is the "who is online" plugin an option for you?
Logged

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: total memebers number mod
« Reply #2 on: March 11, 2006, 08:23:30 pm »

That is not what I'm looking for. All I need is a variable that counts registered users since the beginning so I can show how many have joined. Just like the user manager had in version 1.3 at the bottom of the page. I would like it if that variable was shown as part of the stats in the home page. 

I appreciate your help,
Dustbunny
Logged

Nibbler

  • Guest
Re: total memebers number mod
« Reply #3 on: March 11, 2006, 08:30:43 pm »

Look in your lang file (eg lang/english.php) for the phrase that applies to your gallery

Code: [Select]
$lang_list_categories = array(
  'home' => 'Home',
  'stat1' => '<b>[pictures]</b> files in <b>[albums]</b> albums and <b>[cat]</b> categories with <b>[comments]</b> comments viewed <b>[views]</b> times',
  'stat2' => '<b>[pictures]</b> files in <b>[albums]</b> albums viewed <b>[views]</b> times',
  'xx_s_gallery' => '%s\'s Gallery',
  'stat3' => '<b>[pictures]</b> files in <b>[albums]</b> albums with <b>[comments]</b> comments viewed <b>[views]</b> times',
);

Adjust the wording to include a new [usercount] tag.

Then adjust the corresponding code in the get_cat_list() function in index.php to include

Code: [Select]
'[usercount]' => $cpg_udb->get_user_count(),
Finally add in

Code: [Select]
global $cpg_udb;
at the top of the get_cat_list() function.
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: total memebers number mod
« Reply #4 on: March 12, 2006, 05:24:03 pm »

I tried it and it works.
Logged

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: total memebers number mod
« Reply #5 on: March 12, 2006, 11:05:25 pm »

Quote
Then adjust the corresponding code in the get_cat_list() function in index.php to include

Code:
'[usercount]' => $cpg_udb->get_user_count(),

It goes between where and where exactly? I tried to guess a few places but without knowing exactly I just get error messages for index.php
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: total memebers number mod
« Reply #6 on: March 13, 2006, 09:48:38 am »

into a line of it's own between
Code: [Select]
$lang_list_categories = array(and the closing tag of this array definition
Logged

dustbunny

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: total memebers number mod
« Reply #7 on: March 13, 2006, 08:32:06 pm »

That is not what I'm asking for.

I was asking where exactly does

'[usercount]' => $cpg_udb->get_user_count(),

go in index.php?
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: total memebers number mod
« Reply #8 on: March 13, 2006, 10:35:10 pm »

Instructions were pretty clear. What you need to do is to spend some time to look at your index.php and understand how it works. Once you do that, you will know exactly where to place it. And trust me understanding the code will help you for future mods you may want to do.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.