Hi
I wuld like to see forum statistics like popular posts, views, total postsĀ members etc. But I'd like to see them only as an administrator - that is , other members or visitors to my forum should not be able to see this data.
Please advise how to achieve this. Thanks !
my forum:
https://lawforall.in/ipforum
Install attached plugin (PHP in templates)
Then >
Themes & Templates >
Your Theme >
Index Templates >
index_boardstats
Insert at top line:
<if $mybb->user['usergroup'] == 4 then>
And at the end insert:
</if>
If you are using the default MyBB template.. you can copy & paste the following:
<if $mybb->user['usergroup'] == 4 then>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead{$collapsedthead['boardstats']}">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.png" id="boardstats_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$whosonline}
{$birthdays}
{$forumstats}
<tr>
<td class="tfoot" style="text-align: right">
<span class="smalltext">
{$logoutlink}
{$showteamlink}
{$statspage}
</span>
</td>
</tr>
</tbody>
</table>
<br />
</if>
Thanks much Jason.
As I am a novice at myBB / PHP etc. would appreciate if you can walk me through. As of now I can upload files (need location / directory to upload to ) and edit files ( if file name and location is provided ).
Please provide , thanks.
^ you can upload it directly to the
plugins folder
(~/inc/
plugins)
however I prefer using a different plugin for the same purpose
(#
link)