how to hide all count numbers? (users, topic, messages)

Started by asdolo, June 29, 2007, 10:37:11 AM

Previous topic - Next topic

asdolo

i'd like to hide the count numbers in forum...like how many registered user i have or how many topics i have etc.
how?

codenaught

Well you can first disallow the permission to view the forum stats in:

Admin / Permissions / Group name - Modify / View forum statistics  (Uncheck)

Then I suppose you would want to remove the stats from Themes/<theme_name>/BoardIndex.template.php.

Find everything from:

// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{


Until:

}

// "Users online" - in order of activity.


(Shouldn't be far below the above code)

And delete all of it expect for the comment: // "Users online" - in order of activity.

Trying to make it generic so that if you have custom theme changes you can still find the code needed.
Dev Consultant
Former SMF Doc Coordinator

asdolo


asdolo

ok i have deselected View forum statistics for guest and members...nothing is changing...why?
but i have deletted the code and now works...but then the permission is useless!!!

there is also another part to hide
[nofollow]

codenaught

Quote from: asdolo on June 29, 2007, 03:32:48 PM
ok i have deselected View forum statistics for guest and members...nothing is changing

i havn't understand what i have to do then
Go to www.yourforumaddress.com/forums/index.php?action=stats as a guest. You will notice you cannot view it. You need to do the template changes I mentioned in order for it to be removed from the info center on the board index.
Dev Consultant
Former SMF Doc Coordinator

asdolo

then i can't make it view in main page only by admin, for example...right?
and for eliminate the middle column but leaving the "last post" column as it is?

i have found
// Show some basic information about the number of posts, etc.

but if i delette the code below i get "template parse error"

codenaught

Okay I just noticed your edit to your post with the screenshot.

To remove the middle column you would want to find and remove:

<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'],' ', $txt[330], '
</span></td>


Quotethen i can't make it view in main page only by admin, for example...right?
The stats in the info center? It wouldn't be viewable by anyone if you directly take out the code from the template. Do you want admins to still be able to see it?
Dev Consultant
Former SMF Doc Coordinator

asdolo

Quote from: akabugeyes on June 29, 2007, 05:39:22 PM
Do you want admins to still be able to see it?
yes thx
because i want to understand

codenaught

In a way it is even easier to do that then. Instead of removing that code I mentioned to you before, just find this code:

if ($settings['show_sp1_info'])

And change it to:

if ($context['user']['is_admin'] && $settings['show_sp1_info'])
Dev Consultant
Former SMF Doc Coordinator

Advertisement: