MyBB Community Forums

Full Version: Section Moderator permissions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

I'm trying to make a plugin which allows section moderator (users who are in a 'normal' group but moderator of a particular forum section) to have the set prefix possibility for threads. But the problem I'm facing is that I have no idea where the hook for this option is located to get it working.

Soo my questions to you are actually those:
- Is there a hook for set thread prefixes in the send/edit thread template?
- Is there a hook for the prefix ACP so I can add a new field like 'Allow for section mods (in the set forums)'.

Thanks in advance!

Tankey
thread related files might not have hooks related to prefixes

./inc/class_moderation.php --> class_moderation_apply_thread_prefix

admin module related hooks for prefixes configuration exist in ./admin/modules/config/thread_prefixes.php

Edit: see http://docs.mybb.com/MyBB_Plugin_Hooks.html
Yep found that already, only not how to display the prefix dropdown on the thread edit/post page Sad

Any idea where I can modify that part?
Since there is still a bug in the thread prefixes which causes them not to be validated upon post, I got it working by adding this:

MyBB v1.6.10
inc/functions.php rule 2675 add:
$modcache = $cache->read('moderators');
$user = $mybb->user['uid'];

inc/functions.php rule 2704 change
if(in_array($group, $prefix_groups) && !isset($prefixes[$prefix['pid']]))
to
if((in_array($group, $prefix_groups) || !empty($modcache[$fid]['users'][$user])) && !isset($prefixes[$prefix['pid']]))

It's dirty work around, but it works.. If anyone has a better option like a plugin or something that would be cool Wink
I would like to know this as well... this plugin would be great to easily add a single member as a moderator to a specific forum
Isn't this already built in? Can't you assign moderators to forums individually?

On mobile so might be a bit big but...
[Image: IXf5DMl.png]

Or am I misunderstanding this? I read moderators, permissions, single forum, so concluded that. But it is 12 AM and I'm tired so can't think right. Anyways. Hopefully I read right and helped you out.