Moderation in drupal - code attached!

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
vik4's picture

I've made some modifications to the nmoderation module to allow for indymedia style moderation in drupal. It isn't ideologically 'nice' mainly due to the way parts of the drupal core are implemented. I have contacted the author of nmoderation about getting the patches into the module, but he hasn't responded, so we might want to look at forking it into a seperate moderation module - people's thoughts?

Instructions:
1) install drupal. 4.7.3 (or possibly a later 4.7 branch). I think CVS/4.8 changes a few fundamentals, so this is unlikely to work.

2) install the following modules: nmoderation, views, votingapi, taxonomy_block. You will want others for other IMC functionality; these are the ones you need for moderation and access of moderated content.

3) download the attached patch, and apply it to modules/nmoderation/nmoderation.module.

4) Set up access control. We have used the following user roles (others may be appropriate for your site):
* Anonymous - can view everything, and post to the low priority newswire.
* Authenticated - Anonymous + has access to certain site features (blogs, themes, profile etc). Can save user options
* Trusted User - Authenticated + posts go straight to high priority newswire.
* Editor - Trusted User + can promote low priority news to high priority news, and post/edit features.
* Admin - Can do everything
User roles are complicated and detailed - be sure you know what you are doing, or copy someone else. Crucially, moderating users must have the 'nmoderate votes' permission set.

5) Set up Node Moderation:
A) In Administer -> Settings -> nmoderation:
1. For node types, choose story and comment (unless you want others too)
2. No to Promote/Unpublish on thresholds
3. Yes to Hide comments below threshold
B) In Administer -> node moderation:
1. Choose the tab 'moderation votes'
2. Type in four names of votes. The scores associated with these are not entered yet, but can be written in the label if desired so the voter knows the score. The weight column is for determining which label appears first - it does not affect the actual score.
3. In 'moderation roles', give each user a starting score. The initial set up is that the high priority newswire is score 2 or more, so trusted (and higher) users should be 2 or more. 0 or less defaults to hidden, so non-trusted users should probably be put at 1.
4. In 'moderation matrix', put the actual value for each vote in. e.g. Great -> 2, Good -> 1, Bad -> -1, Terrible -> -2. Higher privileged users can be given more clout here, if desired.
5. In 'viewing thresholds' put the types of views you wish users to have. e.g. High Quality Post -> 2, All non-hidden posts -> 1, All posts -> 0. Or something like that. Then set the default to what you want users to have by default.

6) Set up Views: Views are complex and powerful. It would be nice to provide pre-rolled views for basic things. But we haven't got them yet. So try to learn a little about how they work, or everything above will be for nought.

Clear as mud? Feel free to ask questions here or you can try #oceania on irc.indymedia.org

AttachmentSize
nmoderation.module.vik_.patch_.txt14.68 KB

Indymedia

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week