News:

Join the Facebook Fan Page.

Main Menu

Boards :: Can I Hide Them

Started by tassie73, April 28, 2012, 01:39:23 AM

Previous topic - Next topic

tassie73

I have a bit of a tricky one here......

I have a number of boards on my forum that I would like to remove from the main forum. I know I can go and move all the topics and condense the boards, but I don't want to mix all the posts into one board..... I need to keep them separate but I just don't want them to appear in the main forum as it makes it too long.

I basically just need to find a way to hide the boards from the main forum, while keeping them intact and accessible through alternate links I already have in place. Is there a way to just "switch off" the ability to see them in the main forum?

Thanks for any advice. I hope I have explained my situation well enough so you know what I am talking about.

Chris

Colin

You would need to go in and add some custom code to filter out the board links that you don't want shown.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tassie73

Thanks Colin.

Any hints on where I can start playing?

Chris

Colin

If you want to take on the project I can guide you in the right direction or I can simply just make the changes to the files for you.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tassie73

If you can guide me, that would be great! Trying to learn on the fly and only way to do it is jump in feet first I guess ;)

Colin

One second, let me do a quick check and see if there is a published mod already available.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin


Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tassie73

Saw that one, but it seems as if it allows the member to decide if they can hide the board or not. I don't want it to be an option, I want to hide these boards from all members and guests in the main forum.

Maybe I can look at that mod and modify it though....

tassie73

That mod is for SMF1.X too.... I'm using SMF2

letavos


Colin

Quote from: tassie73 on April 28, 2012, 02:08:49 AM
That mod is for SMF1.X too.... I'm using SMF2
The mod is Compatible With:
1.0.5, 1.1 RC1, 1.1 RC2, 1.1 RC3, 1.1, 1.1.1, 1.1.4
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin


Colin

It is getting late.  ;) I will give you the manual edit. Let me dig through the code for a second.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tassie73

Thanks mate. I appreciate the assistance!

Colin

Sure. Alright here are the steps below. Luckily it only takes one file to edit.


Bring up your index.template.php file found in /forumdir/Themes/default

Find this piece of code:

foreach ($category['boards'] as $board)
{


Add the following after it:
if ($board['id'] != 4) {

Where I put 4 for my board ID that is where you will put the board ID of the one you want to hide.

Find this piece of code:
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';
}
}


Add this after it:
}

Backup your initial file just in case.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tassie73

Thanks heaps Colin!

Will have a play with it tonight!

Thanks again mate

Chris

Colin

Absolutely, glad to help. Have a great evening.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

tassie73

Okay, ran into an issue at the start..... Unable to find the first bit of code in my index.template.php file :(

Found it in boardindex.template.php though so will have a play with that file and see what happens! ;)

tassie73

No go..... Can't find the code I am looking for.

Will have a look a bit later as I need to get this sorted.....

Advertisement: