Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

show forum stat in header_welcomeblock_member

Ads
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#1
Member
Hello
I want to show forum stat in header_welcomeblock_member
how can I do it ?

Heart
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#2
Senior Member
You will need a plugin for that. However there is a simple solution! Open Index Page Templates >> index find: {$boardstats} and delete it.

Now find: {$header} and add this code just below.

This conditional only shows for logged in uses not for quests!
PHP Code:
<if $mybb->user['uid'then>
{
$boardstats}
</if> 

For this code to work you'll need to have template conditionals installed.
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#3
Member
Thanks Dear SEO123
I want to show some stat not all of it
for example I want to show number of user's post & number of forum's members
something like these
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#4
Support Team
Go to Admin Control Panel >> Configuration >> Forum Home Options >> Show Who's Online? and select No this will hide Who's Online from Board Statistics. If you want to hide stuff then you can edit either template or core file but if you want to show extra stuff you will need a plugin.
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#5
Member
Thanks marcus_avrelius
but is there any variable that shows number of the forum's post & numbers of the forum's members in Index Templates ?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#6
Support Team
You need a plugin simple one really.

To return all posts.
PHP Code:
$query $db->simple_select("posts""*"); 
To return all users.
PHP Code:
$query $db->simple_select("users""*"); 
lion Offline referral

Posts: 122
Joined: May 2014
Reputation: 0

#7
Member
Thanks Dear marcus_avrelius
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#8
Support Team
PHP Code:
$query $db->simple_select("users""COUNT(*) AS count");
$allusers $db->fetch_field($query"count");

<?
php
    
echo @allusers;
?>

This will show the number of users you have!





User(s) browsing this thread: 1 Guest(s)