I've been using Drupal 4.7's forums for a couple of months now. The site is still in beta and is being migrated from several CMS and many static pages (fwiw, drupal 4.6, geeklog, gallery, wordpress and phpbb).

I've seen a lot of unconstructive posts on here whinging about integrating Drupal with phpbb or just saying "Drupal forums suck", and alongside those quite a few posts replying with "start a forum post with the features you'd like". So here is one! I've tried to link to existing bug reports, forums requests and feature requests as I go along for more detail, although that hasn't made this post any shorter...

First I should point out that when people say "Drupal forums suck", what they mean is forum.module without any customisation doesn't work like a normal forum. What they don't mention is that both core Drupal and many contributed modules do some things far better than a lot of dedicated forums software (or at least different / more interestingly). On the other hand I've not seen much about scalability of forum.module and a few other issues which can be very difficult to work out - those I'll get to later.

As non-coders, and only using Drupal casually for a year before we decided to run our entire site on it, we've spent a fair bit of time trying to work through the process of migrating across, and getting things comfortable for us and our users. Some issues we've found solutions for and I'll include those in this post as well - which'll be the first stage towards some howtos for the handbook hopefully. Some issues we're still working on and are feature requests or bug reports, or in some cases just require some pointers/documentation.

I'll start with what we've managed to get working, then put the outstanding issues at the end:

First, some basic information about the forums.

We run 47 different forums including half a dozen quite busy ones, some slower regional and group forums, and private forums (both for groups and administration). We have forums in English, Turkish and Japanese - and at least some ui localisation with Drupals built in locale.module there are 2415 registered users, 6502 topics and 117729 replies so far.

(To get that information, stick this in a block.

<?php
  $userTotal = db_fetch_array(db_query("select count(distinct(uid)) from users"));

    foreach ($userTotal as $index => $valueu) {
    echo $valueu . " users,\n";
}

  $postTotal = db_fetch_array(db_query("select count(distinct(nid)) from node where type = 'forum';"));

    foreach ($postTotal as $index => $value) {
    echo $value . " topics and\n";
}

$commentTotal = db_fetch_array(db_query("select count(distinct(cid)) from comments"));

foreach ($commentTotal as $index => $valuec) {
echo $valuec . " replies so far.\n";
}

?> 

)

We use a few modules to get things looking and working how we want.

First: phpbb2drupal - this worked great after we learned how to convert latin1 to utf-8 - would've been easier if our old forum wasn't on cheapo share hosting.

To get flat forums:
flatforum.module

We also used some of the ideas on this thread quite heavily in addition to the flatforum template:
http://drupal.org/node/58532
and drupalart's instructions

In addition, custom titles (which requires an entire MOD on phpbb), we did with profile.module - just calling the relevant information in node-forum.tpl.php

For BBCODE: http://drupal.org/project/bbcode
For quicktags: http://drupal.org/project/quicktags
For easy quoting of posts: http://drupal.org/project/quote

We've hacked both the core forum.module and comment.module a little. The main thing was taking out the hard-coded display of user signatures - we hate signatures and didn't want them at all, and users found it very confusing/annoying having them appear in the text area every time they posted.

To get rid of signatures - we commented out the relevant bit on this line:

$form['comment_filter']['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment'] /*? $edit['comment'] : $user->signature*/, '#required' => TRUE);

For private forums we use taxonomy access. This has scalability issues for us, since we also use free-tagging and a couple of fixed taxonomies (c.1000 terms on c.3000 non-forum nodes), the tac administration page currently uses a php memory limit of close to 64mb and this is increasing rapidly as we transfer more content. This is enough of a problem that we may have to split our private forums into a seperate install running OG or similar, however Keve has been discussing potential solutions to this at http://drupal.org/node/77023

Private messages we use this: http://drupal.org/project/privatemsg
It'd be great to have inbox quotas though, since our private message table by itself just hit 10mb: http://drupal.org/node/69856

To split threads, comment mover: http://drupal.org/project/comment_mover - this works great, but it'd be lovely to be able to multiple comments at the same time: http://drupal.org/node/84012

We've also made a custom tracker view (and custom block with accompanying rss feed) for the forums using views.module

This has allowed us to filter the latest forum topics to ignore things like the bin and our flaming/community (yes it's used for both!) forum.

views module is my favourite thing about Drupal at the moment, and along with CCK and panels is making me a very happy admin. http://drupal.org/project/views

Here's the feature requests, bugs and general whingeing:

Jump to last post
If you've got more than one page (and we often get 100 posts in a few hours on a single topic), the new posts link doesn't work. One of our users fixed it for us with some core hacking, then we upgraded to 4.7.3, broke it, and he's disappeared... This bug report running since 2004 deals with the issue: http://drupal.org/node/6162 would be lovely if it worked in 5.0

Permissions:

If you allow users to edit their own forum posts, you allow them to delete the entire thread as well on a whim (or by accident). Splitting "edit" and "delete" permissions would fix this. Feature request here: http://drupal.org/node/81395

Also, users can't edit their own comments once someone else has repied to them. This could be dealt with via "edit own comments" permissions: http://drupal.org/node/79693

flat forums - if a user edits a comment, it can jump around in the listing and appear after the post they were replying to, very confusing. This feature request deals with the issue in more depth: http://drupal.org/node/81373 and I'd love to see the option to remove the hierarchy entirely or otherwise stop this from occuring.

There's also no "edit all forum posts" permission - which means either hacking core or giving users "administer nodes" or "administer comments" for forum moderation. There might be a workaround with taxonomy access I've not worked out yet, but say you wanted ten different moderators on ten different forums, that'd be ten new roles to create. Maybe having OG forums and normal forums running concurrently would work for this? That's not something I've tried yet though.

scalability and hard-coding of indexes
We moved away from phpbb mainly after we got hacked twice in two months, and because having more than one level of subforums was impossible without a MOD which required a complete database and code rewrite and very complex upgrade path.

With Drupal there's unlimited sub forums (and forums within forums as well!), but the display of the forums index is hard-coded - even the 30px indent for subforums.

Our forums index also takes nearly 300 database queries to display, the longest ones being forum_get_forums. This regularly brought our server to a screeching halt on a 256mb ram VDS. We upgraded to 512mb of ram recently, and got enough courage to switch back to the default index from a hardcoded one we aliased over it, and nearly crashed on that - some apache and mysql tweaking later and it's just about running OK fingers crossed.

It'd be great to have the option to display top level forums, then subforums just as links, with maybe a "new posts" icon next to them. I reckon this could be done with a lot less mysql queries, certainly the tracker can display as much information with less overhead. I tried to explain this in more detail visually here when we just started out: http://drupal.org/node/74620 We may end up replacing the forums index with a "view", but haven't worked out how to do that satisfactorily yet. If I work it out I'll report back.

RSS feeds - rss feeds per forum out of the box is great. Easy to make custom feeds with views. However this ignores comments. There's commentrss, but last time I tried it, it bypassed tac access permissions. It's also fairly confusing have a feed for new topics, and a feed for new replies - a forums rss feed which combined both automatically would be great.

trolls - I had some very bad teething problems with troll.module (it promoted the first banned user to admin view rights on the forums! and doesn't seem to be maintained). An easier way to keep track of user ips, bannees etc. would be great.

That's long enough for now. I'm planning to update and expand on this as we go along, and contribute some of the solutions we've found to the handbook eventually.

I'm very glad we went for Drupal's forums rather than messing around trying to integrate phpbb or vbulletin, since the advantages far outweigh the niggles. If anyone's already dealt with some of the issues I've outlined above, pointers in the right direction would be great. I'm not sure if/what the development on forums looks like for 5.0 so it may be some of these are going to be dealt with already, but this is as far as I've got working it all out, and I hope some of the outline of what we've done helps people setting up their own forums with Drupal as well.

Comments

pwolanin’s picture

even though this thread deals with usernames: http://drupal.org/node/83738
a comment there about speed/scalability issues with (freetagging) taxonomies may be of interest to you.

Also, the no-edit-after-a-reply feature of comments actually seems like an important feature rather than a problem for a community site- in what situations do you want to allow it?

---
Work: BioRAFT

catch’s picture

Also, the no-edit-after-a-reply feature of comments actually seems like an important feature rather than a problem for a community site- in what situations do you want to allow it?

A couple of reasons:

* When you have flat forums, the threaded structure is completely hidden, and people use the reply link to add to the thread, not to reply to a specific comment (generally we'd use "quote" for this). So not being able to edit comments appears completely arbitrary to end users - if no-one hits the reply link next to their comment, they can still edit, if they do, they can't, regardless of how this relates to the actual dynamic of the discussion. I can see how it'd be useful for threaded discussions to prevent rewriting of history, but don't think it applies to a flat forum structure.

2. Posters regularly want to go back and correct links or spelling errors, or more critically to update a post near the top of the thread with new information - many of our posters will start a thread or comment in a holding position, then go back in and edit details later (say arranging a meet up). This becomes impossible after someone has replied.

A choice between:

"edit own comments"
"edit non-replied to comments"
and "no editing permissions whatsoever" would give much more flexibility for different setups.

Actually this brings another thing up - when you reply, you're presented with the post you're replying to. Again on flat forums this isn't always user friendly - many posters would like to be able to review the entire thread ("topic review" in phpbb) - and reply to several posts at once with the ability to view what happened, or as already pointed out, may not even be replying to the post they happened to click on. At the moment this requires a new tab/window open. If you know what's going to happen then you can adapt to it, but years of phpbb usage make it counter-intuitive.

The scalability discussion on LOWER is interesting, am I right in thinking this'd affect forum_get_forums when it's implemented?

Heine’s picture

http://drupal.org/project/flatcomments allows one to set certain node types to have completely flat comments regardless of the reply link a user clicked on.

Module is for Drupal 4.7 and has not yet been released, but you can test the cvs version.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

catch’s picture

Spamming a project
Heine - September 15, 2006 - 08:58

http://drupal.org/project/flatcomments allows one to set certain node types to have completely flat comments regardless of the reply link a user clicked on.

Module is for Drupal 4.7 and has not yet been released, but you can test the cvs version.

That's not spamming, that's lovely! Will try to test out over the weekend.

catch’s picture

I tried this - it doesn't stop comments jumping around when you edit them. Is it supposed to? To be honest it seems to excacerbate this.

Being able to continue edit comments for longer though is great! Thanks for that.

This cropped up on an issue I started - for "comment mover" it'd be handy to be able to split everything after a post - requiring that all comments would be children of the previous post on the thread. Is that something that could be incorporated? I realise this would reverse the effect on editing comments though.

Heine’s picture

Thanks for testing. I've changed the module to no longer work on existing comments (during edits).
What do you mean with jumping around? Perhaps it's best to open a bug report.

Threaded comments are a bit harder because one has to account for concurrency & race conditions. I'm extremely time limited coming weeks, so it might be a while before I can do this.

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

catch’s picture

What do you mean with jumping around? Perhaps it's best to open a bug report.

Hi, I opened one about a month ago when I noticed it, not sure it explains very well though: http://drupal.org/node/80082

I think it's only relevant to a flat forums setup.

If a user posts a comment, then a few people reply (not necessarily to that comment), then the user goes back to their post to edit it, the location in the thread changes, and the edited post will appear after the original replies.

For example:

Forum topic
reply1
reply2
reply3
reply4

after editing

Forum topic
reply2
reply3
reply4
reply1 after edit.

I'm going to cross post to my original issue. In fact I think I'll start a thread on here and see if I can reproduce it on Drupal.org

catch’s picture

Here you go. Couldn't do it on drupal.org, but reproduced on our site here:
http://libcom.org/forums/feedback/comment-jumping-test-again-please-dont...

The first reply appears after subsequent replies when it's edited. This happens both for user 1 and a regular user. IME it only happens when replies are to the original post (rather than threaded) - hence why your module, which makes all replies to the first post, made the issue far, far more obvious.

I'll have a go trying out the updated version a bit later on.

I assume this is something to do with comment updated time being used instead of comment posted time, but wouldn't know where to start fixing it and would rather not hack core any more than we already have.

Heine’s picture

I've noticed and added some (ugly, ugly) code to flatcomments to prevent updating of the timestamp.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

catch’s picture

Cool. I've installed it. Comments still seem to be moving a bit, but sometimes moving back to the right place afterwards.

If you can make sense of this thread (I can't!) it might help:

http://libcom.org/forums/feedback/comment-jumping-fix

ryivhnn’s picture

Thaqnks for this, was getting tired of finding forty billion whinge posts every time I had anything to do with forum or comment in my searches ;) And you've nicely covered issues I've brought up plus seen a lot of other people bring up so hopefully it will eventually be helpful.

Personally I think there should be a way to disable editing of comments as well, maybe there is but I still haven't been able to find it :P I really don't mind preventing editing of comments after they've been replied to but that flatforum issue bugs me and confuses users, generally most of the time don't have a problem as they generally don't edit their posts anyway but for the ones that do, it pulls everything out of context and is just weird.

works at bekandloz | plays at technonaturalist

catch’s picture

One more thing I forgot.

Especially with the "new" links not working on multiple page threads, having the pager at the bottom of threads means, in the words of one of our users:

It takes me four fucking clicks to see new posts now, instead of the traditional one.

http://libcom.org/node/8917

i.e.

click on the post
scroll down to the bottom
click on the "last" link in pager
scroll down again.

instead of - click on the #new link which will take you to an a named comment on the correct page.

We've initially hacked core to display it just under a post, are working on doing it at theme level but still very much at cut, paste and hack level with phptemplate.

pwolanin’s picture

This is again a case where the difference between flat and threaded forms become really significant. In the threaded view, the "new" comment may be anywhere in the thread, so there's no way to calculate which page to go to. Worse- under the current system, comment controls can be put on the page that allows the user to switch between threaded and flat.

---
Work: BioRAFT

catch’s picture

that makes sense. But with threaded forums, generally, it'd make sense to keep them to one page for that reason no?

I can't see a good reason for user controlled switching, not if it messes up the tracker and indexes, does anyone actually use this?

ryivhnn’s picture

I do!

We're having the dramas with the pager and my friend that I'm building the website for is concerned about long threads on one page being hell for dialup users.

My current solution is developing a theme sans the eye candy of the current one so said dialup users can switch to it if they think the site is slow.

I'm all for user selecting the amount of comments they want on a page (given a choice I usually set mine to as high as possible as I have broadband and 1600x1200 on a 19"), but woudl like the option of not letting them switch between flat and threaded. i guess it could work out in certain communities if the forums aren't highly structured, aside from that silly comment jumping when edited in flat mode.

works at bekandloz | plays at technonaturalist

krzysiek@palikowski.vel.pl’s picture

this is most actual list of really needed feature requests and features that are available for drupal forums...

i can add only "mark posts on this forum as read" or "mark all posts as read" buttons, that are one of the most requested feature on my forums...

i would also like to see #new links working right, even if i have to make all comments flat...

one thing i can 'sell' to you right now is this http://drupal.org/node/85135 . maybe it is nothing special, but my users wanted it badly...

I am working on this code http://drupal.org/node/24883 right now, trying to make it work on 4.7. I managed to mark all forum posts as read, but now it has broken some things (new posts indicator shows only on tracker lists)...

and also i want throw pager links (first, previous 1 2 3 next last) on top of the page, but i think it will be much easier

if anybody can help - please do it!

catch’s picture

I forgot about mark forums as read.

There's been some work done on it here, but it doesn't look like it got all the way there:

http://drupal.org/node/63416

Thanks for the link to the hack - we commented out that code in forum.module completely, although next time will use display:none - might try the links up top though, that sounds good.

pager links - we've sort of managed that: http://libcom.org/node/7983

But only by hacking core quite dirtily. Been trying to do it at the theme level but no luck yet.

krzysiek@palikowski.vel.pl’s picture

well, pager on top and bottom was easy to do, as you can see here

http://basoofka.net/node/898

another disadvantage is that tracker/forums doesn't have "last page" link... this is rather helpful if you visit some forum as guest... "last post" icon would be also handy for non logged users...

but next thing gives me and my user a thrill

When somebody replies to my post i cannot edit my post anymore! I know - it is because i could delete my post and the all subposts would become 'parentless'... you can see that on drupal.org forums, and on my site too... i think it is very bad idea to block editing - better disable deleting post if there are replies, but i want to edit it whenever i want to!

and now i am thinking if flat comments module is best in this situation... if i install it i will lost threading ability, which i love... grrr... maybe somebody know the fix?

bye

StuartMackenzie’s picture

Enjoyed reading your post as you said it makes a change from just flaming what is at heart not a bad basic building block of a forum.

I have been playing with forums alot lately to try and mimic a hosted fourm that a community I am involved with is using from conforums. I have implemented quite a few of the things you mention above and have run into a similar wishlist that I cannot solve.

I did manage to get replies to posts to be completely flat by applying a small hack to comment module. Not ideal for some people though as this has obviously effected comments site wide and has also meant I cannot use the quote module, but my need for truly flat forums out-weighed my need for quote (still usauable by copying and pasting content into bb/quicktags, happy to say comment mover still works. All comments regardless of what link is clicked are replies to the node rather than comments to comments.

BuZZ the limey

merlinofchaos’s picture

Instead of taxonomy_access, if you are using it only for forums, may I suggest grabbing the na_arbitrator module and using forum_access.module instead?

It lets you choose forum moderators per forum...without the weight of taxonomy_access, and will only affect your forums.

(This module will be available as a standalone for Drupal 5.0)

-- Merlin

[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

catch’s picture

merlin, that sounds great. Hadn't even heard of forum_access module, will take a look and thanks for the heads up!

We've had trouble with our server running fine for a while and crashing every few days (with load about 14), so had to reduce php memory limit, which meant backing up restricted forums to subdomain and uninstalling taxonomy access one evening. it'd be nice to have them back again where they belong.

x2l2’s picture

still we dont have a better way to change the signature thing?

i hate change core files everytime we need to update drupal version

Michelle’s picture

What "signature thing" are you wanting to change? Signature handling is much improved in D6 and is made even better with signature_forum. There is no need to hack core.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.