RHSeeger
09-20-2011, 04:09 PM
I'm trying to add an additional check to determine if a user is allowed to moderate a post/thread. Specifically:
We're only concerned with forum threads/posts
Each thread has an new field added to it
Each user has values for that field that, if a given thread has the same value, indicates they can moderate that thread/post
If the thread/post was originally created, the check is bypassed
I have the code for the described checks written via functions (can_moderate_posts($userid, $postids) and can_moderate_threads($userid, $threadids)), and I'm to the point where I need to determine exactly how to tell the system that these checks need to happen... and that's where I'm hoping to ask for some insight.
From what I can tell, the following pages implement actual thread/post moderation actions:
postings.php
Moderation actions taken from the moderation control panel. It looks like I'd want to hook off threadmanage_start since the values of the user taking the action, the action, and the items (threads of posts) are known by this time. This appears to be the only place this hook is called.
inlinemod.php
Moderation actions taken from the normal forums via the inline moderation capabilities. It looks like I'd want to hook off inlinemod_start since the values of the user taking the action, the action, and the items (threads of posts) are known by this time. This appears to be the only place this hook is called.
member_inlinemod.php
I'm not sure on this one. The code "seems" like it's handling moderation, but I'm not sure how it's actually used. Is this file used for actually moderating forum threads and posts, or is it used for a different purpose (like moderating visitor messages on profile pages, etc)
Any suggestions, comments, or corrections would be very much appreciated.
Thanks in advance.
We're only concerned with forum threads/posts
Each thread has an new field added to it
Each user has values for that field that, if a given thread has the same value, indicates they can moderate that thread/post
If the thread/post was originally created, the check is bypassed
I have the code for the described checks written via functions (can_moderate_posts($userid, $postids) and can_moderate_threads($userid, $threadids)), and I'm to the point where I need to determine exactly how to tell the system that these checks need to happen... and that's where I'm hoping to ask for some insight.
From what I can tell, the following pages implement actual thread/post moderation actions:
postings.php
Moderation actions taken from the moderation control panel. It looks like I'd want to hook off threadmanage_start since the values of the user taking the action, the action, and the items (threads of posts) are known by this time. This appears to be the only place this hook is called.
inlinemod.php
Moderation actions taken from the normal forums via the inline moderation capabilities. It looks like I'd want to hook off inlinemod_start since the values of the user taking the action, the action, and the items (threads of posts) are known by this time. This appears to be the only place this hook is called.
member_inlinemod.php
I'm not sure on this one. The code "seems" like it's handling moderation, but I'm not sure how it's actually used. Is this file used for actually moderating forum threads and posts, or is it used for a different purpose (like moderating visitor messages on profile pages, etc)
Any suggestions, comments, or corrections would be very much appreciated.
Thanks in advance.