A few months back I started looking at Drupal as a successor for the forum system I use on a site I run, and began investigating the access control permissions for controlling access to the different forum sections. I looked at various modules and built-in functionality, but came away a bit confused. Then I left it (as mentioned) for a few months and have only just begun to pick up the threads.

It seems that in the intervening months new versions of Drupal have been and gone, and versions of the modules I had in use have changed. I intend to start again from scratch, but I'd like to be certain I'm doing this the right way from day one. So, without further ado, here are my requirements:

  1. A group-based user system, whereby individuals can be assigned as members of one or more groups
  2. A variable-level permissions system for groups, which can assign the permission to (at various levels) edit posts, write posts, read posts, see forum categories

Essentially, for those who are familiar with it, I want all the flexibility of phpBB's permissions system (apart from the 'user' level permissions) such that sections of the forum will be completely invisible to guests and registered users, others only accessible as read-only to certain groups, and others still essentially invisible to everyone except a specified group.

So what would be the best way of going about implementing this system? I would like to use as few modules as possible, so if this is possible with out-of-the-box Drupal now that'd be smashing. Any tips, suggestions or thoughts?

Comments

daniel.hunt’s picture

You'll probably be happy to know that I am currently working on, and am almost finished a public version of, a forum module for drupal.

It's a drupal-port of a homegrown forum system, but revolves around many of the main forum features that have become a defactor standard, and that drupal's built in forum happily ignores.

It won't be too long now until it's ready for public use, so I'll keep you informed if you'd like.
The main selling point of the module is it's security system (that actually works ;)) - so you should have little or no trouble whatsoever with access groups or permissions.

The module itself is remaining nameless to prevent googlers from finding it if it's already been spotted by it's crawlers ;) but rest assured, odds are that you'll be pleasantly surprised :)

kapowaz’s picture

Excellent news! I'll await this in eager anticipation.

daniel.hunt’s picture

np :)

Dublin Drupaller’s picture

HI Zoro..

I was playing around with an alternative forum script as well to sit beside Drupal...do you have any screenshots or a demo of your new forum?

Here's a demo of the forum I'm working on...am slightly out of my depth with the coding - am very new to php/sql etc. so I'm keen to see which way your forum is going in case that satisfies my needs instead of teaching myself how to tweak the one I'm working on..

I'm only half way there...the posts and user info. on the test-bed forum is in the Drupal dbase. I need to write an integration module that uses Drupals session cookies instead of it's own (like a single-sign on module) with a forum settings page for it next, which is the tricky bit.

If you're further down the road..it would be great to see screen shots/a demo if you've got time.

Cheers
Dub

P.S. your contact form isn't switched on.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

daniel.hunt’s picture

Sorry about that - my contact form's on now.

I assume you're based in Dublin? As am I! :) Coincidence or what? :D

The forum that I'm working on is 100% home made. It's been designed for security as we (over at www.unreal.ie) didnt want to use any of the prebuilt forums due to them all being so completely insecure.
The forum that's currently active on the unreal.ie site is the first revision of what I wrote (with help from a few others of course). It's what I used as a basis for the drupal port, so if you want to see how the forum will function, it works almost identically to that. *edit* --> the current site is NOT drupal powered, just in case you're wondering

That said though, it has been almost completely rewritten from the ground up, and could still do with more optimization. Either way though, it works, and that's what matters first :)

I've designed the forum to use it's own database tables, so it's completely separate in structure to the drupal node/comments system (which, basically, just doesn't lend itself in any way shape or form to forums as they are known today), and had to rewrite my user authentication and management system so that it was completely controlled by drupal (instead of the homegrown one that we use on the live site at the moment)

Anyway, have a gander over there if you're interested in what the module will look like, as I said, it's based on the code that powers that forum.

Daniel

daniel.hunt’s picture

I missed this the first time I read your reply...

"I'm only half way there...the posts and user info. on the test-bed forum is in the Drupal dbase. I need to write an integration module that uses Drupals session cookies instead of it's own (like a single-sign on module) with a forum settings page for it next, which is the tricky bit."

My own work on the integration of what was essentially a standalone system was tricky to say the least. But after thinking about it logically, I came up with a nice solution.

Each user on the current live site has a user id. All I needed to do to get the forum module to work with drupal (as the forum already has some 24000 posts, and will need to be kept after the swap over), was to create drupal users for each of these existing users in the forum's database, and ensure that they kept their user id's.
That way, no database manipulation of the forum's data would be needed. It would all "just work" as it were, when the forum was viewed.

As the drupal system was essentially starting from scratch itself, it wasn't difficult to modify the uid's of any existing admin users that were testing the drupal site to see if it suited our needs. Once that was done, I imported the entire user database from the original source, and populated the drupal user table with it. (I wrote my own PHP script to output the required INSERT INTO statements to text, then checked them, and pasted them into mysql)

Once this was complete I hadn't any need for my own auth system, as drupal then took care of everything I needed! (including session control and whatnot)

It would appear that I am "further down the road" than you, but it also appears as though we're on 2 very different roads! :) Your own forum module looks and feels quite different to the one I'm working on. And while that's certainly not a bad thing, it does hinder comparisons a good bit.

Feel free to contact me if you have any direct questions about what I've done, or use the forum for more general stuff so that others may benefit from your questions!

Daniel

Dublin Drupaller’s picture

Wow. looks impressive. Just had a quick look...fair play to ya. and yeah, I'm in Dublin at the moment as well.

there's a few Irish drupallers out there..

I agree, we're definitely going down different roads in terms of layout. Which is a good thing. Variety and choice is good..methinks.

I work with mostly music based projects where the threaded style forums and discussions are more intuitive or fluid than the phpbb style boards..which is quite niched...more suitable to a band site probably rather than a technical discussion/support type thing. So I think your forum will be a popular choice for many as it lends itself to more applications.

Subtle features

There are a few subtle features with the forum that maybe worth mentioning...in particular the ability to have a seperate "side forum" to a site while at the same time have public/private categories. Without the sheer weight of installing one of the big third party php forum software packages and being able to control it all via Drupals ADMIN -->> SETTINGS pages.

  • option of posting using a pseudonym or your "real name".
  • option of switching quickly from "board table style view" to "threaded fluid discussion style view". The default on my test forum is threaded Just click on BOARD VIEW to see the alternative skin/layout.
  • email notification when someone has replied to your post
  • simple management of pulbic/private categories
  • multilingual management
  • appoint specific forum category editors
  • more intuitive and expansive settings options for the site admin
  • using seperate database tables for the forum posts making it easier to backup, restore, migrate etc.
  • seperate password reminder system for the forum

Post using a pseudonym or using your full name

The "tricki-ness" with the forum I'm trying to tweak is that I'd like the option of using Drupal authentification or the board's own authentification. which lends itself more to a public/private style forum.

That might sound unecessary but I have realworld examples where professionals who are subscribed to an insiders music industry magazine, for example, would prefer to post comments/opinions on an open forum under a pseudonym, rather than their own full name.

So having the 2 authentifications allows the person to login to the forum as themselves...or log in under their own pseudonym. It's also common for the same person to use the same pseudonym over a long period..so the extra authentification not only allows them to "protect" their pseudonym, but they can also benefit from the other extra features in the forum. email reminders etc.

I'm not sure if that's making any sense...bottom line is that there was a specific set of needs that drove me to start looking around for alternatives to the out-of-the-box Drupal forum - which is very good by the way - and I thought I'd mention the subtle extra features that come with it in case it sparked any ideas with your forum.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

daniel.hunt’s picture

I have to say that I don't like the idea of posting under a name other than your account. It would lead to all sorts of hassles with double-registration safeguarding and stuff like that.

Headaches galore :/

As for your other list items:

* option of switching from "board view" to "threaded view".
Yeah - I've never liked the threaded view, so I put it to board view as soon as I saw the option ;)

* email notification when someone has replied to your post
I noticed that, and it's very nice aswell. I'll be doing something similar with my own as soon as I figure out subscribing to threads!

* simple management of pulbic/private categories
Done :)

* multilingual management
Never even considered it! ..... Hmmm something to think about maybe

* appoint specific forum category editors
Done :)

* more intuitive and expansive settings options for the site admin
Done :)

* using seperate database tables for the forum posts making it easier to backup, restore, migrate etc.
Done :)

* seperate password reminder system for the forum
forum and drupal user databases are the same so no need to do this.

:)

Dublin Drupaller’s picture

there is a subscriptions.module with Drupal that allows users to subscribe to updates...your forums features are more or less the same as Drupals out-of-the box features albeit with 1 or two add ons, so when you construct the forum nodes, you could just use the subscriptions.module for email reminders.

and I wouldn't worry about the multilngual side of things..u can use the localisation.module for the multilingual aspects.

The needs for a pseudonym/real name type setup would probably only really apply to a professionals site I suppose. Although, I do know quite a few music industry pros who have their own myspace.com spaces in their own name and also have another space using a pseudonym - so they can say what they like basically.

It's not that difficult to setup..I'm just having problems with the single-sign-on. and is particularly helpful when you have public/private forums and you want to appoint a regular fan, for example, to be able to moderate a specific category, without giving them access to the "full site" so to speak or having to jump through hoops with categories, roles and other settings.

Anyway..good to compare and I can see your forum lending itself to more applications.

Just out of curiosity..was it easier for you to work from scratch instead of patching the forum.module to work slightly differently...your feature list looks extremely similar to the out-of-the-box Drupal.

assume you have seen the flatform.module

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

daniel.hunt’s picture

"Just out of curiosity..was it easier for you to work from scratch instead of patching the forum.module to work slightly differently...your feature list looks extremely similar to the out-of-the-box Drupal."

I would DEFINITELY say it was easier to start from scratch.
No doubt about it. The unreal.ie forum has been evolving for the past 12 months, and as a result, I know it inside out and back to front.
That certainly benefitted me when I started the drupal port, but the initial forum setup (12 months ago) was difficult as it was my first time doing something like that.

flatforum.module? Yeah we tried that out but it just didnt feel right. Not in comparison to our own homebrew one anyway

daniel.hunt’s picture

subscriptions module:

I had already resigned myself to writing my own subscriptions code for the module. My reasons behind this were that I would like the forum module I'm developing to be self-sufficient. That is, not require any other modules to work.

Also, I would need a custom layout of subscriptions so that it would mirror the thread-display listing that I have already devloped for use by the forum module itself.

Either way, I've just finished my subscriptions code, and am contemplating adding email notification to the module. It's likely that it'll be requested either way, but it's just a matter of doing it ;)

I'm quite looking forward to the feedback from normal users, and developers alike that will be sure to check this module out. Good, bad or indifferent, feedback is feedback!

Daniel

Dublin Drupaller’s picture

Hi Zoro,

Quick update...the current version of the "watercooler" might make more sense now. I've sussed how to do that AJAX "Frames" thing I mentioned earlier.

It's still a work in progress..but, I have a working proof of concept done on my my temporary test-bed site.

The key objective was to create a simple, intuitive "watercooler" style discussion board for very busy Drupal sites and very high volume message boards.

Instead of loading the whole thread/page every time, it simply displays the post selected in a "frame". Similarly, instead of re-loading or re-compiling the list of messages page every single time someone reads a message and clicks back is unnecessary.

I've left in the option for a BOARD STYLE view for those familiar with PHPbb style message boards or to make it easier to read long discussions.

Best of both worlds stuff..

I'm using a very simple lightweight and unobtrusive piece of AJAX code (I notice some Ajax is to be included in Drupal 4.7) to inject the post into the "frame".

As mentioned, it's still a work in progress....while my original plan was to build a mylittleforum.module to integrate it, I think it might be smarter to create a sideforum.module in the same way the guys did a flatforum.module to bolt on to the existing forums though. I have been looking at the new updates to the Drupal forum.module over the past few weeks and the 4.7 version is looking good.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

snowcrash’s picture

Hello Zoro

I've been waiting for a development a solid forum module, and what you appear to be doing will be appreciated indeed!

Look forward to trying it out when it's ready

regards
snowcrash

daniel.hunt’s picture

Cool - it's always good to hear encouragement :p
It's pretty much already working at the moment, there are still a few minor tweaks to make before making a public beta though.

Bugs galore due to my inexperience with drupal submission forms, but I'm getting there.

As I mentioned above, have a look at www.unreal.ie - it has a primitive version of what will be in the module.

snowcrash’s picture

Hi

I had a quick look at your forum and it has the kind of features sorely lacking in drupal at the moment - so very nice :)

By the way, will this be implemented as a separate stand-alone forum?
Or could it be offered as a commenting system below articles for instance. Currently, commenting features provide no proper user profile info such as post count or member group

I'm still very much a newbie to drupal and getting to grips with it's flexibility, so I hope this isn't a dumb question...

cheers

daniel.hunt’s picture

no question is a dumb question.

It's completely stand alone, save for the user account details. It uses the "users" database table for user information.
After that, it's completely separate. It works using 3 main tables that contain forums threads and posts. Security groups are maintained in another table, and are directly (and automatically) available in the drupal access control system.

pug’s picture

Hi there, I'm also working on unreal.ie with zoro, and I thought I'd mention that the forum you see currently on unreal.ie has some private forums also that can't be seen by the general public so even by looking at the current setup you won't realy see everything it has to offer.

It should also be stressed that the existing forum is very primitive feature wise compaired to what's going to be released for the drupal site.

daniel.hunt’s picture

Good points there pug, I forgot to mention that! :) - the true abilities of the forum really can't be seen without having it installed on your own site so you can see just how it works for yourself.

tester75’s picture

Looking at the number of requests, I have a feeling that this is going to be huge to Drupal users.

When do you think we can have our hands wet with the beta?

daniel.hunt’s picture

daniel.hunt’s picture

I'm currently awaiting CVS access, so until then, I suppose I'll just use our own download section to host it! :)

I'm updating the project page with a link to the first beta release of this module.
Please get back to me with any problems that you may have.

Note that there's a problem with listing forums with no posts in them ... sql is being a right little annoyance atm :/

So - without further ado...
http://www.unreal.ie/index.php?com=downloads&dir=/drupal

The first beta is now online :)

snowcrash’s picture

Wow, look forward to trying it out

I'm wondering if once it is properly released you could consider adding a feature which allows the member profile to be shared in the commenting system

From what I understand, users posting comments don't show any profile info, whereas, in your forum this info would be displayed, especially their post count.

To enhance and integrate community features of drupal, the number of posts in a forum and number of comments could be displayed as only one post count in total; and also displayed next to a member's name when commenting, as well as in the forum. So a user's profile info carries across the site

Just a thought, hope it makes sense

daniel.hunt’s picture

It does indeed - but there are a few major security holes to fix up at the moment.

I was talking to a number of developers in IRC yesterday and they helped identify some glaringly obvious programming mistakes that I knew nothing of.
What I hope when this eventually becomes public, is that it's put to the test by those who use it so that it can be updated and modified to make it even better than it is already.

I'm hoping to have a secure (ish :) ) version soon enough.

daniel.hunt’s picture

*bump*

The code is now public! :)
Have a look at the module's thread:
http://drupal.org/node/38830