Jump to:
| Project: | Advanced Forum |
| Version: | 6.x-1.2 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Hi Michelle,
I know you're always looking for good ideas, so I figured I would pass this on.
I am working on a forum that has a lot of sub-forums. Having them all displayed on the forum listing is very over whelming. I used $forum->depth to limit the forum to only display parent forums.
Anyhow, it's an easy enough bit of code, which I have attached. I figure it might be easy for you to work something like this into the adv forum config page, so no one has to edit the template.
I modified Bluee_Lagoon, my changes are on lines 50 and 102. I know enough PHP to be dangerous, so I'm not sure if there is a better way to do this, but it seems to work for me. Hopefully you can think of a more elegant way to include this concept. If not, maybe this will help someone else.
| Attachment | Size |
|---|---|
| advf-forum-list.tpl_.php_.txt | 4.66 KB |
Comments
#1
Merging with #219549: Add options for dealing with subforum display
Thanks,
Michelle
#2
Is there a way to print the forums that are removed as links?
Like.. instead of having a subforum shown on the forum index, we can use that code of yours, and then try to make the subforums display like phpBB3:
http://www.phpbb.com/community/ (Subforums are displayed as links underneath the parent forums description)...
I'm trying to find a solution to this in order to add this feature to my phpBB3 theme for advanced forum, based on prosilver... :)
#3
I'm sure there is, but the easy, no code way would be to simply include the links in the forum descriptions.
#4
Please don't keep adding onto this issue or your posts will be lost as this is marked duplicate.
Michelle
#5
You can easily do this without hacking the core file using pre-process function
function mytemplate_preprocess_forum_list(&$variables) {
foreach($variables['forums'] as $id => $forum) {
if ($forum->depth>=1) {
unset($variables['forums'][$id]);
}
}
}
I know the post is very old but still it may help.