Removing Forum Stats

Started by gmoneyluv, November 18, 2008, 06:57:14 AM

Previous topic - Next topic

gmoneyluv

Hey folks,

You guys were very helpful when i asked about removing the info centre from the default theme (1.17) but i've noticed the stats are still there - Forum Stats. Latest Member, Latest Post, etc

Is there any way of removing this info? I've tried denying access (found on a forum post) and no luck. What am i doing wrong? :(   

G   

Kermit

BoardIndex.template.php

Code (find) Select

// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt[645], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>
</td>
</tr>';
}


Code (replace with) Select

/*

// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt[645], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>
</td>
</tr>';
}
*/
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Antechinus

That's the same code, Duncan.

gmoneyluv, you can get rid of that lot using the guest membergroup permissions.

Kermit

Quote from: antechinus on November 18, 2008, 07:21:28 AM
That's the same code, Duncan.

gmoneyluv, you can get rid of that lot using the guest membergroup permissions.

oh really ,look again,the code is not the same ^^

look carefully at the beginning & ending of the code
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

gmoneyluv

wow you guys are fast!

I'm willing to try both options!
So go to permissions/guests modify/general/and uncheck view forum stats, meberlist and who'sonline

Unfortunately it still shoes up. I've also gone to regular users and checked the deny these permissions and they still show.   

should i try the code?

G   

Dragooon

There should be a option for it in Admin > Current Theme > Settings. If no, try the code(It would work AFAIK).

Kermit

you can not hide the whole forum stats with the permissions,with permission you can hide just the [More Stats] button,if you want to hide the whole forum stats,than you should do,what i wrote above
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

gmoneyluv

#7
ok guys!

I managed to get rid of some of that info via current theme settings but the most online and most online ever sections still remain.

Duncan i tried the code but there was no difference...not sure what i am doing wrong...
   

Kermit

Please attach your BoardIndex.template.php
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

gmoneyluv


Kermit

it should work actually,are you using custom theme ?
i've commented the forum stats line,also what means,the lines have no more effects and would be not showed anymore...
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

gmoneyluv

Hey D,

Thanks for your help.

I'm not using a custom theme...i'll load this later today when i get a chance and let you know how it works.

G

   

gmoneyluv

Sorry Duncan,

Do you have the modified file? Just not sure what is should do next.

G

[SiNaN]

Removed most online and most online ever sections. Attached.
Former SMF Core Developer | My Mods | SimplePortal

gmoneyluv

Thanks Blue Dream!

I'll load it up and let you know how it works out! :D

gmoneyluv

Hey Blue Dream!

This worked like a charm!
Thanks for everyone's help! :D   

illusion_

Have also used Duncan's code to edit out the stats and it works perfectly     BUT   there is one stat I would like to have showing     the "latest member"

If Duncan, or anyone else can help with the code to leave this one in there but edit out the rest it would be much appreciated

Thanks

[SiNaN]

Find:

                  <span class="middletext">
                     ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
                     <br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
                     <a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
                     <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
                  </span>


Replace:

                  <span class="middletext">
                     ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
                  </span>
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: