Moderator Messages / Message Locking ?


Subject: Moderator Messages / Message Locking ?
Hey everybody,

I've seen something really interesting while browsing phpBB3 mods :
"Moderator messages"

Basically, this allows a moderator to add a "red box" containing a message that the user won't be able to edit. This is used to make notices etc, because I've had a lot of users removing what moderators put up in their messages, etc (they used to come back after a week or two, even :LOL: ).

Another idea would be message locking. Let's say, if a moderator edits a message, then it's considered "locked" and can't be edited by the user again. That'd fix the problem from the first idea : an user could still delete his message's content, so that the message left by the moderator would not make any sense.
I really like that idea. I actually think phpBB3 has something like this, but even 6 years later, I still can't find willpower to install it :x . (I've installed it once, actually, but that was because it was a premodded board).

/discuss

PS : what about we remove that "clean name" field ? This just confuses the hell out of people.

Profile PM  
Subject: Re: Moderator Messages / Message Locking ?
Clean name was implemented to replace/integrate URL Rewrite... it's like WordPress works... I never finished integrating the feature, but it's something that could be easily done.

I can hide that field... or I can finish coding it... maybe the time required will be the same, so I'd better finish it. :mri:

Regarding other features, try to suggest some code and I will analyze it.

Subject: Re: Moderator Messages / Message Locking ?
Okay, meddled around with "post locking" :

I added "post_locked" tinyint(1) to ip_posts

viewtopic.php line 1765 ($edit_switch stuff)
Inline Add "&& !$postrow[$i]['post_locked']" after "$is_auth['auth_edit']"

posting.php ~line 452 (after limit post edit time)
Add
Code: [Download] [Hide]
  1. if ($mode == 'editpost') 
  2. if ($is_auth['auth_mod']) 
  3. $template->assign_block_vars('switch_lock_post', array()); 
  4. $lock_post = request_boolean_var('post_locked', false); 
  5. $template->assign_var('S_LOCK_POST', $lock_post ? ' checked="checked"' : ''); 
  6. else if ($post_info['post_locked']) 
  7. message_die(GENERAL_MESSAGE, 'Message_locked'); 
  8. else 
  9. $lock_post = $post_info['post_locked']; 


And finally in posting_body, after "END switch_topic_unlock"
Add
Code: [Download] [Hide]
  1. <!-- BEGIN switch_lock_post --> 
  2. <label><input type="checkbox" name="post_locked" {S_POST_LOCK} />&nbsp;{L_LOCK_POST}</label><br /> 
  3. <!-- END switch_lock_post --> 


functions_post.php in submit_post
You just need to pass $lock_post and add it to the query.
Maybe there's a better way to do it, but that seems like the most minimalist solution to me :).
Sorry for the typos I might've made, I posted this from my phone.

Profile PM  
Subject: Re: Moderator Messages / Message Locking ?
I'll have a look at this suggestion and let you know.

Usually I regret adding fields to posts and topics tables... but I'll consider adding a couple of new fields to add new moderation features.

Subject: Re: Moderator Messages / Message Locking ?
I had some extra thoughts about this... and if it has to be implemented, it needs to be switchable, because there could be cases where the Admins or Mods may just want to edit something without disallowing the user from further edits. So we need to add a new checkbox to lock/unlock single posts from further edits...

Subject: Re: Moderator Messages / Message Locking ?
The switch is here :

Quote:
And finally in posting_body, after "END switch_topic_unlock"
Add ...

Profile PM  
Subject: Re: Moderator Messages / Message Locking ?
Sorry, I missed it. :shock:

I think I will integrate this.

Can you please test it?

Subject: Re: Moderator Messages / Message Locking ?
Well, the code I posted is from my local installation and working great :).

Profile PM  
Subject: Re: Moderator Messages / Message Locking ?
I don't think it works only with the code listed here... :P

Anyway I have added the missed code and integrated it. :mri:

On next PUSH you will see the code on GIT.


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.0951s (PHP: 20% SQL: 80%)
SQL queries: 10 - Debug Off - GZIP Enabled