Advertisement:

Hide Child Boards

Aloittaja artistwantab, toukokuu 13, 2011, 12:42:06 AP

« edellinen - seuraava »

artistwantab

I want to hide the child boards of my forum.    I would like to hide the child boards on the front page so that they are seen when the member click on the main link.

Tried doing it via css and it messes a lot of things up.

Looked in the index and used firebug and I can do it but I can't seem to find the php file that its hidden in.

Thank you

Matthew K.

Hey there!

Can you attach your themes BoardIndex.template.php?

Sir Osis of Liver


In Board.index.php, find this -



// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))



...change it to this -



// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)

$board['children'] = "";

if (!empty($board['children']))



Should do exactly what you want.  It's probably a bad idea, but I'm too tired to figure out why.  Make a backup before you change it.

When in Emor, do as the Snamors.
                              - D. Lister

Matthew K.

First of all, the edit you provided isn't the best way to accomplish this, which is why I asked them to attach the file. And how would it be a bad idea? There's nothing wrong with it.

Sir Osis of Liver


It's easy to find, simple edit, doesn't require changing existing code, just adding a line, easily reversed if it goes sideways, and it seems to work fine on my 1.1.13 install.

Too easy - gotta be something wrong with it.
When in Emor, do as the Snamors.
                              - D. Lister

artistwantab

Thank you both.   Here is the file requested.

Matthew K.

Here you go, let me know how it works for you.

artistwantab

Thank you.

Close but the structure of the table is off a bit.

http://eliocamacho.com/theCommunity/index.php

Matthew K.


artistwantab

Works great!   Thank you.

Sir Osis of Liver


Ok, Lab, just looked at your mod.  You removed a block of code, rather than adding one line.  Does the same thing, but it's more difficult to reverse.  Why is that better?

When in Emor, do as the Snamors.
                              - D. Lister

Matthew K.

To be honest, there isn't a whole lot of a difference, except I prefer to directly address the issue rather than manipulate the output.

artistwantab

It works great but I have a question...

I was expecting to be able to move the child boards up and down like with the other boards but it doesn't seem to work. 

Am I missing something or is this not possible or with this change did it affect the ability to move it up and down?


Sir Osis of Liver

#13

Do you mean reorder them?  You should be able to go to Admin -> Boards -> Modify Boards and reorder them just like parent boards.

You can use either the Move or Modify functions.

When in Emor, do as the Snamors.
                              - D. Lister

artistwantab

It allows you to move it but above or below another board.

It will not allow you to move a child from one area to another within the same board.

If you attempt to move it it moves it above or below the parent.

Sir Osis of Liver

#15

Tried it in 1.1.13, works fine.  I can reorder the child boards within the parent board, which I believe is what you want to do.  Did not try Lab's mod, but shouldn't make any difference.  I'll try it now.

Works for me with either mod.  Maybe you're doing it wrong?

When in Emor, do as the Snamors.
                              - D. Lister

artistwantab

sigh....Right again. 

I was hitting the after or before arrow.   

Didn't notice there was a child of button.   Sigh.

Sometimes the most obvious are so often missed.

Matthew K.

Glad to see you got everything figured out :)

savy118

ive got 2 board index templates both the same size and name which one should i replace as i would like to hide child boards visible to clean up space.

thanks

savy

Advertisement: