Hide Info Center to everyone

in Tutorials on 11 Mar 2013


This easy to implement code will hide the info center to guests, members and admins. Hidden completely. Useful for those who dont care about the forum stats to be displayed. I use it here on idesignSMF for a long time, makes the board index look much cleaner.


The code:
In BoardIndex.template.php find:
// Here's where the "Info Center" starts...
echo '


...add before:
// Turn the info center Off.
if (!$settings['turn_off'])
{


...find:
?>

...add before:
}


In Themes/YOUR THEME/Settings.template.php
Find:
$context['theme_settings'] = array(

...add after:
               array(
'id' => 'turn_off',
'label' => $txt['turn_off'],
),
          '',


In Themes/YOUR THEMElanguages/ThemeStrings.english.php
Find:
global $scripturl;

...add after:
$txt['turn_off'] = 'Turn OFF the Info Center';

The settings are found in the theme settings page. Just tick the box to hide the info center.



idesignSMF Team
Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF.com and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded idesignSMF in 2009 to which he is dedicated full time.

idesignSMF.com | SimpleMachines.org



11 Comments

Thanks for this good info. nice tut due.
#1
Quote from: michael.sears.351 on 11 Mar 2013
Thanks for this good info. nice tut due.
I was messing in my boardindex and thought i'd share it.  :wink:
#2
that is so much more subtle, and pleasing that the method i employed :D
#3
Quote from: Dave (Dim) on 12 Mar 2013
that is so much more subtle, and pleasing that the method i employed :D
How have you done it?
#4
Quote from: Mick on 12 Mar 2013
How have you done it?

dont totally remember, i think i just deleted entire chunks of code, never to return.. I go for the sledgehammer approach.
#5
Quote from: Dave (Dim) on 12 Mar 2013
dont totally remember, i think i just deleted entire chunks of code, never to return.. I go for the sledgehammer approach.

Hahaha right on.
#6
works good lol, I'm not much on the info. center anyways.
#7
Quote from: michael.sears.351 on 20 Mar 2013
works good lol, I'm not much on the info. center anyways.
Awesome.  :wink:
#8
Hmm there is no Boardindex.template.php  in 'relax' theme how can i do ?
#9
Quote from: El?onore McWell on 24 Apr 2013
Hmm there is no Boardindex.template.php  in 'relax' theme how can i do ?

Do this on the 'default' theme as Relax theme uses it by default when it doesnt have one.
#10
Or you can copy  Boardindex.template.php  into 'relax' theme from the default theme and then do the edits. Either way.

#11

local_fire_department You might also like


rocket_launch

Tutorials. We have a great selection of tutorials to help you make the most of your theme.