Hide Page Views In Statistics Center

Started by OnlineFunCorner, August 21, 2010, 02:43:14 PM

Previous topic - Next topic

OnlineFunCorner

Hy EveryBody
As Subject Indicated
I Want To Know How To Hide Or Remove Page Views In Statistics Center
Same As In This Picture

rajanpert

If you are using SMF 2.X, then

1. Go to administration Center
2. Click on feature and options
3 uncheck the Track daily page views (must have stats enabled) option

OnlineFunCorner

I Want That Only Administrator Can View Page Views (Not Moderator,Regular Member Or Guests)

Kill Em All

For the stats page, you might want to add this code:

if (!$context['user']['is_admin'])


Do you want to hide the entire stats page, or just a part of it?


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

OnlineFunCorner

Quote from: Dr.IT on August 22, 2010, 01:10:23 AM
I Want That Only Administrator Can View Page Views (Not Moderator,Regular Member Or Guests)

Only Page Views Hide To The Moderator,Regular Member Or Guests
But Administrator Can See Everything In Stats Including Page Views

Kill Em All

replace this:

if (!empty($context['yearly']))
{
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="tborder" id="stats">
<tr class="titlebg" valign="middle" align="center">
<td width="25%">', $txt['yearly_summary'], '</td>
<td width="15%">', $txt['stats_new_topics'], '</td>
<td width="15%">', $txt['stats_new_posts'], '</td>
<td width="15%">', $txt['stats_new_members'], '</td>
<td width="15%">', $txt['smf_stats_14'], '</td>';

With this:

if (!empty($context['yearly']) && ($context['user']['is_admin']))
{
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="tborder" id="stats">
<tr class="titlebg" valign="middle" align="center">
<td width="25%">', $txt['yearly_summary'], '</td>
<td width="15%">', $txt['stats_new_topics'], '</td>
<td width="15%">', $txt['stats_new_posts'], '</td>
<td width="15%">', $txt['stats_new_members'], '</td>
<td width="15%">', $txt['smf_stats_14'], '</td>';


Tell me how you like that....


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

OnlineFunCorner

Thanks
I Try It
Admin Can View Everything In Forum History (using forum time offset)
As     Yearly Summary      New Topics      New Posts     New Members     Most Online      Page Views
But Non Admin As Guests, Regular Member Etc
Can Not See Yearly Summary      New Topics      New Posts     New Members     Most Online      Page Views
I Want To Hide Just Page Views To Non Admins
See Atachment!

Kill Em All

Oh, I thought you just wanted to hide that entire section.

Try this.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Advertisement: