Hide child board display on main forum index ?

Started by MoreBloodWine, December 29, 2011, 10:32:36 PM

Previous topic - Next topic

MoreBloodWine

I made this site for a friend of mine but he was curious about something.

Is there a way ti hide the sub / child board display ?
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Illori


MoreBloodWine

Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Illori


Kays

This should work. In BoardIndex.template.php look for:


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


And add after that:


                                        break;

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Sir Osis of Liver


Or you can do this:



<!--td class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td-->



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

MoreBloodWine

#6
Quote from: Kays on December 30, 2011, 01:10:16 PM
This should work. In BoardIndex.template.php look for:


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


And add after that:

                                        break;

This works, but if there's a board below it with children it hides them, the other boards with child boards.

I tried the other suggestion but there's these little weird offsets with it that are hard to mis because of the TR but if you "hide" the TR then the whole display goes out of whack.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Kays

Two other opitions. :)

BoardIndex.template.php

Look for


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


And add before that:


                                 $board['children'] = array();


Or in Subs-BoardIndex.php look for


// A valid child!
$isChild = true;


And add before that


                         continue;

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

MoreBloodWine

Quote from: Kays on December 30, 2011, 06:33:17 PM
Two other opitions. :)

BoardIndex.template.php

Look for


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


And add before that:


                                 $board['children'] = array();


Or in Subs-BoardIndex.php look for


// A valid child!
$isChild = true;


And add before that


                         continue;

Ok, so scratch original idea then go for either or of the new ones but not both ?
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Kays

Whichever one works best for you. :)

The first is theme specific. The second prevents the child board array from being built. So it's not theme specific.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

MoreBloodWine

Quote from: Kays on December 30, 2011, 06:46:16 PM
Whichever one works best for you. :)

The first is theme specific. The second prevents the child board array from being built. So it's not theme specific.
Well, the second (continue;) one is what did the trick.

http://www.spiritualwarbiblestudies.com/index.php?action=forum

My buddy who I made the site for said he wanted to clean it up a bit and have the child boards hidden til the board is opened up and then the children get displayed.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Kays

Great, glad you got something to work. :)

A simple edit as that will be easy to remove afterwards.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

MoreBloodWine

I didn't know this until now but while the continue; thing stops the child array from being built, it breaks the count child in parent totals thing and I kinda want / need that.

Any ideas how to correct this ?
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Illori

you mean

admin -> boards -> settings Count child's posts in parent's totals 

is enabled?

MoreBloodWine

Quote from: Illori on January 03, 2012, 05:52:47 PM
you mean

admin -> boards -> settings Count child's posts in parent's totals 

is enabled?
Yes, because when I removed the continue; edit to show the child array the count in parent totals comes back as well along with showing the last post by thing etc.

Check out spiritualwarbiblestudies.com and open Second Thessalonians where you will see the one post i nthe child board but not have any of it's data show on the main board.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Kays

Yes, it will do that since the data for the child boards isn't being collected.

Use option A in that post then. I'm pretty certain that it will work.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

MoreBloodWine

Quote from: Kays on January 03, 2012, 06:06:36 PM
Yes, it will do that since the data for the child boards isn't being collected.

Use option A in that post then. I'm pretty certain that it will work.
If you mean $board['children'] = array(); it doesnt, check out spiritualwarbiblestudies, I left it bugged...

Let me know after you look so I can correct the "bugging".

Edit: Option B's the only one that half worked.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Kays

Dang, it used to work for 1.1.x. ::)

Option C. A bit further up the page (~ line 135) look for:


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


and add after it:


$board['children'] = array();

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

MoreBloodWine

#18
Quote from: Kays on January 03, 2012, 06:35:22 PM
Dang, it used to work for 1.1.x. ::)

Option C. A bit further up the page (~ line 135) look for:


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


and add after it:


$board['children'] = array();

So undo the goofy one or leave it to work in conjunction with this new one ?

Edit: OT but how if at all do you enabled line numbers in PuTTy, I'm using vi to do the edits.

Edit 2: Got it but still curious about the OT edit.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Kays

Remove the previous code added. You're just moving it up the page.

I don't use PuTTy, It might be an option in the View menu. If there is one.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: