show the statistics

Discussion forum for MOD Writers regarding MOD Development.
Locked
indra
Registered User
Posts: 104
Joined: Fri Dec 31, 2010 8:20 am
Location: North Sumatra - Indonesia
Name: Indra Gunawan
Contact:

show the statistics

Post by indra » Wed Jan 05, 2011 10:37 am

please help me. i want the statistics is show in all the page (every where)
example: in index, viewforum, viewtopic, ucp, pm message
when i reply a topic, etc.. in every link.
Image

where is the code and how to show it.

User avatar
AGC
Registered User
Posts: 292
Joined: Sat Sep 15, 2007 10:26 pm
Contact:

Re: show the statistics

Post by AGC » Thu Jan 06, 2011 9:59 pm

the code is in the index.php file
and it's shown with the index_body.html template file.
(phpBB 2.0.x): []Admin Topics List[] MOD. << Description & Download. , []Highlight Author[] MOD.

Donate-paypal
(phpBB 3.0.x)[ver] MODs: [RC1] >Import old *.pak files MOD. + . . .[8] > ACP - Modules Quick Access (MQA) MOD. + . . . [7-PL1] > Multi Smile (actions) MOD

sohixe
Registered User
Posts: 11
Joined: Wed Dec 12, 2007 3:08 am

Re: show the statistics

Post by sohixe » Thu Jan 13, 2011 8:56 pm

I am also interested in how to accomplish this.

I would like the Statistics module to show on every page, just like it does on the index page. Does anyone know how this is done?

Thank you.

User avatar
AGC
Registered User
Posts: 292
Joined: Sat Sep 15, 2007 10:26 pm
Contact:

Re: show the statistics

Post by AGC » Fri Jan 14, 2011 3:16 pm

if you had check the index,php file you those lines:

Code: Select all

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts	= $config['num_posts'];
$total_topics	= $config['num_topics'];
$total_users	= $config['num_users'];

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER'; 
and

Code: Select all

	'TOTAL_POSTS'	=> sprintf($user->lang[$l_total_post_s], $total_posts),
	'TOTAL_TOPICS'	=> sprintf($user->lang[$l_total_topic_s], $total_topics),
	'TOTAL_USERS'	=> sprintf($user->lang[$l_total_user_s], $total_users),
	'NEWEST_USER'	=> sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])), 
so every where you want it, paste it.

And the index_body.html lines

Code: Select all

<!-- IF NEWEST_USER -->
	<h3>{L_STATISTICS}</h3>
	<p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
<!-- ENDIF --> 
(phpBB 2.0.x): []Admin Topics List[] MOD. << Description & Download. , []Highlight Author[] MOD.

Donate-paypal
(phpBB 3.0.x)[ver] MODs: [RC1] >Import old *.pak files MOD. + . . .[8] > ACP - Modules Quick Access (MQA) MOD. + . . . [7-PL1] > Multi Smile (actions) MOD

indra
Registered User
Posts: 104
Joined: Fri Dec 31, 2010 8:20 am
Location: North Sumatra - Indonesia
Name: Indra Gunawan
Contact:

Re: show the statistics

Post by indra » Fri Jan 28, 2011 2:17 pm

thanks for helping me..

User avatar
AGC
Registered User
Posts: 292
Joined: Sat Sep 15, 2007 10:26 pm
Contact:

Re: show the statistics

Post by AGC » Sun Jan 30, 2011 2:04 am

You're welcome.
:)
(phpBB 2.0.x): []Admin Topics List[] MOD. << Description & Download. , []Highlight Author[] MOD.

Donate-paypal
(phpBB 3.0.x)[ver] MODs: [RC1] >Import old *.pak files MOD. + . . .[8] > ACP - Modules Quick Access (MQA) MOD. + . . . [7-PL1] > Multi Smile (actions) MOD

jackirock
Registered User
Posts: 1
Joined: Tue Mar 22, 2011 11:43 am

Re: show the statistics

Post by jackirock » Tue May 31, 2011 7:44 am

I m not getting you...can you please explain me the index.php code you mentioned..where should i paste it..i mean in which pages?.

Thanks :roll:

User avatar
AGC
Registered User
Posts: 292
Joined: Sat Sep 15, 2007 10:26 pm
Contact:

Re: show the statistics

Post by AGC » Tue May 31, 2011 3:08 pm

The first and second codes you put in the .php files (viewforum.php, viewtopic.php ext.)
and the third one you put in the .html (template) files.
For example:
if the php is viewtopic.php => his template would be viewtopic_body.html, and so on and on.
(phpBB 2.0.x): []Admin Topics List[] MOD. << Description & Download. , []Highlight Author[] MOD.

Donate-paypal
(phpBB 3.0.x)[ver] MODs: [RC1] >Import old *.pak files MOD. + . . .[8] > ACP - Modules Quick Access (MQA) MOD. + . . . [7-PL1] > Multi Smile (actions) MOD

Locked

Return to “[3.0.x] MOD Writers Discussion”