total memebers number mod total memebers number mod
 

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

total memebers number mod

Started by dustbunny, March 10, 2006, 06:49:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dustbunny

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

Joachim Müller


dustbunny

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

Nibbler

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


$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

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

Finally add in

global $cpg_udb;

at the top of the get_cat_list() function.

lordprodigy


dustbunny

QuoteThen 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

Joachim Müller

into a line of it's own between$lang_list_categories = array(and the closing tag of this array definition

dustbunny

That is not what I'm asking for.

I was asking where exactly does

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

go in index.php?

lordprodigy

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.