Hey all! I love Adv. Forums, but I need to find a way to keep my gi-hugic forum better organized. I'd like to be able to display only the containers on the main page, then when you click on the container you want, it displays the forums inside, or perhaps even sub-containers.

Is there a way to do this already that I'm missing, or is there a way to add this functionality?

Thanks for your attention.

Comments

michelle’s picture

Category: feature » support
Status: Active » Fixed

You can edit advf-forum-list.tpl.php and remove the "else" case under <?php if ($forum->is_container): ?> to only display containers. When you click on containers, they already show the containers/forums inside, so that part of the functionality is already there.

Michelle

MaramonJ’s picture

Thanks for getting to my question Michelle. You rock.

Let me go try it out!

michelle’s picture

No problem. Good luck with it. FWIW, AF 2.x condenses subforums. That's not quite what you're looking for, but it might help some.

Michelle

MaramonJ’s picture

Boxy style doesn't appear to have that file.

michelle’s picture

The templates are in the Naked style directory.

Michelle

MaramonJ’s picture

I found those, but the change there does not appear to affect other styles.

...Until I renamed the file correctly, of course. Sorry for my error. :)

Now it works! Thank you very much for your help!

Is there any way that I can get it to stop displaying sub-containers now?

Ex:

I have:

Welcome (container)
-Welcome and FAQ (sub container)
--Welcome (Actual Forum)
--FAQ (Actual Forum)
Member Forums (container)
-Chapter Forums (sub container)
--Central Chapter Forums (sub sub Container)
---General Discussion (Actual Forum)
---Player Stories (Actual Forum)
-Rules Discussion (sub Container)
--General Rules Discussion (Actual Forum)

Right now, the top level displays:

Welcome (container)
-Welcome and FAQ (sub container)
Member Forums (container)
-Chapter Forums (sub container)
--Central Chapter Forums (sub sub Container)
-Rules Discussion (sub Container)

But I would like it to display:
Welcome (container)
Member Forums (container)
-Chapter Forums (sub container)
-Rules Discussion (sub Container)

or:
Welcome (container)
Member Forums (container)

Is that possible? Our org has dozens of chapters, and if the Chapter Forum Containers are all visible from the top, it will be unnavigable.

Thanks again for the help!

MaramonJ’s picture

Also: The change you suggested (removing the else) prevents the forums from displaying ANYWHERE. I probably did it wrong.

michelle’s picture

Ah, true, that same code would be used on the container pages. You'll need to check arg(1) to make sure you're on the main page. As for not displaying subcontainers, $forum->depth should help with that. It's been a long time since I looked at any of that, but I believe what you want is to only print containers with a depth of 0.

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fuerst’s picture

Check $forum->depth right below the foreach statement in advf-forum-list.tpl.php. Leave the current loop cycle if $forum->depth is greater than 0:

    <?php foreach ($forums as $child_id => $forum): ?>
      <?php if (0 < $forum->depth): ?>
        <?php continue; ?>
      <?php endif; ?>
      ...
MaramonJ’s picture

I finally got some time to get it working, and it works!

Now I have another question, of course. Is there any way to get it to display when there's a new post under a container?