Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.3k views
in Q2A Core by

Hi,

I'm wondering whether there's any tutorial for assigning moderators in Q2A when I'm under Wordpress integration?

I'm using the latest Q2A with Wordpress 3.3.2.

 

I saw this question: http://www.question2answer.org/qa/15204/how-to-make-a-user-into-an-expert-editor-moderator-or-admin

 

and it says that I need to do something in qa_get_logged_in_user(...) function in qa-external-users-wp.php. But honestly, I'm not familiar with this and I'd like to ask for some guidelines.. what do I need to do here exactly?

 

I just want to assign some users to be moderators, but rather than based on points, it should be based on the wordpress roles.

 

Alternatively, if anyone have any simpler make-do for this purpose, I'd really appreciate it if you could share it.

 

Thank you :)

by
moved by
Anybody knows anything about this? I figured out that using minimum points for moderating permission, and giving my moderators bonus points would work.

But, it would be very discouraging to other users as they will see a user with abnormal points-count moderating their questions. Since i'm starting a new site this would not be a good solution.

 

By the way, the above question is mine, but I forgot to log in when I posted it.

1 Answer

+2 votes
by

There's no specific mapping for moderators, but a WordPress editor will be assigned as a Q2A editor as well. Here's the relevant code from qa-external-users-wp.php:

 

if (current_user_can('administrator'))
  $level=QA_USER_LEVEL_ADMIN;
elseif (current_user_can('editor'))
  $level=QA_USER_LEVEL_EDITOR;
elseif (current_user_can('contributor'))
  $level=QA_USER_LEVEL_EXPERT;
else
  $level=QA_USER_LEVEL_BASIC;
 
current_user_can(...) is a WordPress function.
by
I tried this: elseif (current_user_can('moderator'))
                $level=QA_USER_LEVEL_MODERATOR;
But that doesn't seem to make moderators in Q2A out of moderators assigned in wordpress with both sharing the same database
...