Brainstorm: what's the best way to handle requests to change membership type?

Events happening in the community are now at Drupal community events on www.drupal.org.
Screenack's picture

I have a web site where we'll be adding a blog. This blog will allow for comments, but only after each member account has been internally reviewed. To support this, will have several roles:

"Blogger" has all CRUD permissions for the blog
"Commenter" can create and edit comments to each blog
"Authenticated" a non-anonymous account but lacks any editing capabilities
"Anonymous" can read the blog and comments but no edit capabilities

So, the first step to commenting would be to become an authenticated user, then the internal review would change membership type to "commenter." I'm trying to wrap my brain around the best way to support this, such as exposing a contextual button on the blog. Anonymous users would see "Wish to comment? Become a member" Non-commenter authenticated users would see "Wish to comment? Apply here." or some such text.

I'd love to hear ideas from others on this.

Thanks!

Comments

This should be pretty easy

sheena_d's picture

This should be pretty easy :)

First, check out the Apply for Role Module - http://drupal.org/project/apply_for_role
That module allows users to check a box on their user page for a role they would like to have, then administrators can approve/deny their request.

Next, to alter the links on blog posts, simply create a custom module with one function in it, implementing hook_link_alter
http://api.drupal.org/api/function/hook_link_alter/6

Don't know how to create a module? Here is a good tutorial - http://geeksandgod.com/tutorials/computers/cms/drupal/creating-simple-dr...

That example uses hook_form_alter, but it's the same concept. the $links variable that is passed into hook_link_alter is an array. You'll want to write your switch statement for $node->type instead of $form_id. If you have the devel module installed (http://drupal.org/project/devel) you can use dsm($links) to see the structure of the $links array.

So, to add a variable to the $links array or to alter one, it looks pretty much the same. Here is an example of how you would add a link that says "Wish to comment? Apply Here"

function custom_link_alter(&$links, $node) {

switch($node->type){

case "blog":

$links['role_apply'] = 'Wish to Comment? <a href="/whatever">Apply Here</a>';

break;

}

}

Or just use a custom block

cgmonroe's picture

A no/little code variation on this would be to create a custom block with text and a link to your apply for role page. Then just limit display to the blog pages and appropriate roles. This might make it easier to make the offer stand out.

Authenticated vs Commenter

kwinters's picture

The registration process has an option for requiring admin approval. Is there something preventing you from just giving comment posting permissions to Authenticated and approving the account, rather than moving them into a specific role? Other than commenting, I'm not seeing anything that Authenticated can do on your site that Anonymous can't do.

Much of Sheena's comment still applies regardless.

Ken Winters

How does one judge?

tarvid's picture

Moderating posts and comments provides the basis for judgment on whether to "trust" a user. I grappled with issue on http://crossleft.org and wound up using modr8 and modr8_bypass.

With spam suppression (mollom, ht:bl) moderation is not too burdensome. Some of my experiences are at

http://drupal.ls.net/content/moderation
http://drupal.ls.net/content/anonymous-authenticated-trusted

You can try them out by registering at http://crossleft.org

Wow

Screenack's picture

This is tremendous, with my profound thanks. I'm going to play with implementation tonight based on these ideas.

salientknight's picture

I am trying to do something similar, but I need the apply for role, tied into an application form. Right now, I have it set up with a flag on the submission form, but when I trigger a rule from that, I don't have form submitter as an option for adding roles.

I guess I need an admin only assign a role button on my submission form that can be affected after submission.

Any thoughts?

triDUG

Group organizers

Group notifications

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