Hello all

I'm trying out core Forum in Drupal 6 and I'm thinking of doing a bit of tinkering with its layout.

I'm aware that Advanced Forum exists, but I'm not sure I actually need that. At any rate I'd like to try out first what I can do with the core one.

Just wondering what there is by way of documentation. In particular it would be nice to find a list or diagram for how the different forum templates call each other. No doubt it would be good exercise for my brain to derive the structure by looking at the PHP and thinking :-) but it would save me some time if that's all written down somewhere already. I've tried some searches but not found that. (of course any search based on "forum" and "documentation" tends to pull up lots of stuff about documentation on this forum :-) )

Any pointers welcome.

Thanks

Jennifer

Comments

dnewkerk’s picture

A good trick is to use the Themer tool in Devel module. Enable it and then point and click on the various forum pages and it will tell you which template is generating the thing you clicked on. Every part of the forum in Drupal 6 is in an easy to use template file now (it was much harder in previous versions), and the templates are in the /modules/forum directory to be copied to your theme and edited if desired. The top of each template file also includes info about what that template does.

*Edit: forgot to mention, in the core forum, the actual forum topics themselves are nodes (node-forum.tpl.php) and the replies are comments (comment-forum.tpl.php)... you can use the default node/comment templates or override them with copies by the names I just mentioned.

If you decide on Advanced Forum, most of the template files are the same files as core I believe (though maybe with some different content), though it uses a single file that handles forum topics and replies.

scoutbaker’s picture

There's also the Drupal 6 theme guide that has a Core templates and suggestions page that may give you a starting point.

michelle’s picture

Core forum doesn't have a lot of templates.

forum-icon.tpl.php - This is the icon on each topic in the topic list (hot, new, etc)
forum-list.tpl.php - This is the list of forums on the main page
forums.tpl.php - This is a wraper around both the forum list and topic list pages
forum-submitted.tpl.php - This is the "last reply" info on both the main forum list and the topic list pages
forum-topic-list.tpl.php - This is the list of topics in a particular forum
forum-topic-navigation.tpl.php - This is the previous / next post bit that gets plonked at the end of the node content

In addition, as was mentioned, it uses node.tpl.php and comment.tpl.php for the first post and replies.

You can do a lot to make core forum look nicer than it does out of the box but I do suggest using Advanced Forum if you want something that functions more like a normal forum.

Of course, I'm a bit biased. ;)

Michelle

Jennifer_M’s picture

Thanks all - that helped. I've had a bit of a poke around core forum (which for me is a learning experience on how templates and module files work as well as on this particular module).

I do suggest using Advanced Forum if you want something that functions more like a normal forum.

Of course, I'm a bit biased. ;)

::grins::

Well that is another story, and I'd be most interested in your opinions on that too... new post here about which modules I'm actually gonna end up with.