Free Forever. Our themes will always be free. Forever. Period.

Hide Info Center to everyone

Mick in Tutorials
Mar 11, 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.

Tagged with: hide info center tut smf 


Mick

Mick G

Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF 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 and has a weakness for Tacos and Pizza.

Website: https://www.idesignsmf.com/

    


11 Comments

michael.sears.351
Mar 11, 2013
Thanks for this good info. nice tut due.
1

Mick
Mar 12, 2013
Thanks for this good info. nice tut due.
I was messing in my boardindex and thought i'd share it.  :wink:
2

Dave (Dim)
Mar 12, 2013
that is so much more subtle, and pleasing that the method i employed :D
3

Mick
Mar 12, 2013
that is so much more subtle, and pleasing that the method i employed :D
How have you done it?
4

Dave (Dim)
Mar 12, 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

Mick
Mar 12, 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

michael.sears.351
Mar 20, 2013
works good lol, I'm not much on the info. center anyways.
7

Mick
Mar 22, 2013
works good lol, I'm not much on the info. center anyways.
Awesome.  :wink:
8

El?onore McWell
Apr 24, 2013
Hmm there is no Boardindex.template.php  in 'relax' theme how can i do ?
9

Mick
Apr 24, 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

michael.sears.351
Apr 25, 2013
Or you can copy  Boardindex.template.php  into 'relax' theme from the default theme and then do the edits. Either way.

11



Connect with us:


Improve SMF

If you wish to contribute to the development of SMF you can contribute to the coding discussions taking place on Github. You are also welcome to suggest features which you would like to see added to the software in the Feature Requests board.

  Receive our monthly newsletter right in your inbox.


Advertisement  




 Tutorials
In this section you will find in-depth how-to's involving common SMF development and design techniques.



go up