Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: Moderator

Started: August 16, 2010, 08:51 PM  ⋅  Zone: Public Forums  ⋅  Category: FAQ  ⋅  Posts: 8  ⋅  Views 485
Started by: US-WebDesigner  ⋅  Description: Questions about moderating content
Post #1
Member: US-WebDesigner  ⋅  Date: August 16, 2010, 08:51 PM  ⋅ Subject: "Moderator"

The goal

If my client wants to assign a user to have rights to delete/edit content posted in the Forums in Blogs, for example, and allow that user otherwise to have all other member rights, I assume I would create a new user profile in the Profile Builder and choose Yes for Moderator (last column in Permission Masks) for those two modules, and otherwise give that profile the same rights as all other members in how I edited the Members profile?

Is that the way to do it?

Related questions

1. How does the process work.  Does this just add the function to edit content for all blogs and posts for that user profile (via the edit icon listed along with favorites icon, report icon, etc?)  

2. If I also set a module to be moderated for a user group, and as I understand it, those member posts would need to be approved, how does the moderator approve content?  and is there a notification system in place to notify a moderator when there is content for approval, or does the moderator just need to login and go to somewhere (?) and review content up for approval?

Thanks,

Post #2
Member: Markus  ⋅  Date: August 16, 2010, 10:55 PM  ⋅ Subject: "Re: Moderator"

On the goal: Yes, that's exactly how you'd do it.

On the related: As I noted in the permission mask explanations, this feature isn't fully activated as of yet. It is among the more immediate list of features we have flagged for adding into the CMS, and not that hard to code in — but elaborate enough to not start typing in modding instructions here. (90% of implementing this "modification" level tweaking.)

Once the feature is in, a notification system will naturally be included to alert all moderators to the new queued content, along with other "standard" moderator tools.

Do you need this feature for the site you're working on at the moment?

Post #3
Member: US-WebDesigner  ⋅  Date: August 16, 2010, 11:15 PM  ⋅ Subject: "Re: Moderator"

My client will not need to approve content as such, so notification emails needed.  

He will want to assign specific people to look through the content and be able to edit/delete content that is not appropriate - per number 1 in my questions above.  If I create a new user profile and assign it Yes for the Moderator for those modules, will that provide the ability for those users to edit/delete content created by Members?

If so, that is all I need.  Thanks

Post #4
Member: Markus  ⋅  Date: August 23, 2010, 01:53 AM  ⋅ Subject: "Re: Moderator"

As I noted earlier in the context of permission masks, this feature hasn't been fully implemented yet. Now it is, and here's what you need to do to implement it.

To enable members with moderator permissions to edit and delete content that others have posted (as Administrators currently can), you need to do the following changes.

In /core/class_global.php, after function has_admin_rights, add the following:

static function has_moderator_rights()
{
    if ($_SESSION['member']['member_level'] >= 5 || $_SESSION['mask'][MODULE_IDENT]['mask_moderator'] == 1) return true;
}

In the same file, find function check_edit_permission(), and after line #88 (with if (Utility::has_admin_rights())...), add the following line:

if (Utility::has_moderator_rights()) return TRUE;

 

Then, in /core/class_templates.php, find function validate_conditionals(), and place after the if ($cond[1] == "IS_ADMIN") statement, starting at line #1280, the following:

if ($cond[1] == "IS_MODERATOR") {
    if (Utility::has_moderator_rights() === TRUE ) {
        $pass = TRUE;
    }
}

In the same file, line #1251 under "if ($cond[1] == "IS_OWNER") {", change the long line to read as follows:

if ( (!empty($data[$value]) && $data[$value] == $_SESSION['member']['member_id']) || Utility::has_admin_rights() === TRUE || Utility::has_moderator_rights() === TRUE  ) {

This will enable the template code to act as necessary to display the editing features specific to moderators. You will now also be able to use the IS_MODERATOR statement to provide more content for your moderators.

This will enable both global moderators as well as per-module moderators to edit and delete content posted by others. All of these changes have been included in the next release. Please confirm if this solves the question for you.

Post #5
Member: US-WebDesigner  ⋅  Date: August 24, 2010, 08:51 PM  ⋅ Subject: "Re: Moderator"

Haven't had a chance to plug it in, but it looks like it does it.  Consider it done unless I come back for more.  Thanks.

Post #6
Member: Markus  ⋅  Date: August 25, 2010, 02:37 AM  ⋅ Subject: "Re: Moderator"

Excellent — it does work here when I test it. Let me know if you have any problems plugging it in.

Post #7
Member: US-WebDesigner  ⋅  Date: August 25, 2010, 10:54 PM  ⋅ Subject: "Re: Moderator"

I plugged all the code in but will not be using this right now as they decided for now to just give the core moderators Admin rights, but will likely come into play later.

I did want to point out the following for anyone else following this:

Correction, at least from my perspective:  modification to core/class_templates.php, the change referenced for line #1280 is under function validate_conditional rather than parse_conditionals()

Post #8
Member: Markus  ⋅  Date: August 30, 2010, 01:54 AM  ⋅ Subject: "Re: Moderator"

Yes that's correct, thank you for the note. I have edited the post accordingly.

 

FAQ

Add to Favorites
Public Forums
Category  ⋅  Frequently asked questions on all things Wiccle. If it's a common question, see here.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top