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
BoardIndex.template.php
// 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>"' . $context['latest_post']['link'] . '"</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>';
}
/*
// 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>"' . $context['latest_post']['link'] . '"</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>';
}
*/
That's the same code, Duncan.
gmoneyluv, you can get rid of that lot using the guest membergroup permissions.
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
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
There should be a option for it in Admin > Current Theme > Settings. If no, try the code(It would work AFAIK).
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
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...
Please attach your BoardIndex.template.php
ok, here you go.
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...
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
Sorry Duncan,
Do you have the modified file? Just not sure what is should do next.
G
Removed most online and most online ever sections. Attached.
Thanks Blue Dream!
I'll load it up and let you know how it works out! :D
Hey Blue Dream!
This worked like a charm!
Thanks for everyone's help! :D
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
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>"' . $context['latest_post']['link'] . '"</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>