We're in the early stages of moving our site to a single drupal 4.7.2 (+gallery) install. We currently use about 5 cms withabout 4000 articles between them, and have several hundred static pages. This includes a phpbb forum with 115000 posts, 2000 users and about 50 forums which we've just tested phpbb2drupal on fairly successfully.

We previously used the cat_hierarchy mod for phpbb to make subforums. Drupal has unlimited subforums, but no option to control how they're displayed on the main /forum page. That's what this thread is for. We're fine with html and css, but have very, very limited php, so please bear with us.

drupal displays subforums like this:
--
Container
Parent forum...........................................................topics....posts...last post
parent forum description
--subforum1............................................................topics....posts...last post
--subforum description
--subforum2............................................................topics....posts...last post
--subforum description
--subforum3............................................................topics....posts...last post
--subforum description

Container
--
with 50 forums this makes for a very large front page.

what we'd like is something like this:

--
Container
Parent forum.........................................................topics.....posts...last post
parent forum description
subforum1 (new posts icon?) subforum2 (new posts icon?) subforum3 (new posts icon?)

Container
--

We've been following the recent threads on forum-node.tpl.php and flatforum.module:
http://drupal.org/node/58532
http://drupal.org/node/60939

which are a great help, but don't deal with the main forum page itself. I've seen a couple of forum posts asking about this, but couldn't find any resolutions.

Looks like we need to do this:
http://drupal.org/node/56819
to get /forum themed

and this to pass the container and forum variables to page-forum.tpl.php
http://drupal.org/node/11811

using: theme_forum_display and theme_forum_list from what I can see.

i think this is the relevant bit from theme_form_list

        $description  = '<div style="margin-left: '. ($forum->depth * 30) ."px;\">\n";
        $description .= ' <div class="name">'. l($forum->name, "forum/$forum->tid") ."</div>\n";

        if ($forum->description) {
          $description .= ' <div class="description">'. filter_xss_admin($forum->description) ."</div>\n";
        }
        $description .= "</div>\n";

        $rows[] = array(
          array('data' => $description, 'class' => 'forum'),
          array('data' => $forum->num_topics . ($new_topics ? '<br />'. l(format_plural($new_topics, '1 new', '%count new'), "forum/$forum->tid", NULL, NULL, 'new') : ''), 'class' => 'topics'),
          array('data' => $forum->num_posts, 'class' => 'posts'),
          array('data' => _forum_format($forum->last_post), 'class' => 'last-reply'));
      }
    } 

So you can see ($forum->depth * 30) ."px;\">\n";

This means 0 * 30, 1 * 30, 2* 30 to get the indents.
Instead of that, is it possible to do something in page-forum.tpl.php like:

if ($forum->depth = 0) // print the forum as usual
else // print the forum title

(now you can see how limited my php is!)

If anyone has done this, or is working on the same thing, it'd be great to see what you've got. We'll be making a start in the next couple of days and will post what we come up with up here.

Comments

gurukripa’s picture

hi..any good examples of better forums..and hwo to configure them?
pls post.