Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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 ).

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   . (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.
 



 
InformproSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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.

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




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.   { 
  4.     $template->assign_block_vars('switch_lock_post', array()); 
  5.     $lock_post = request_boolean_var('post_locked', false); 
  6.     $template->assign_var('S_LOCK_POST', $lock_post ? ' checked="checked"' : ''); 
  7.   } 
  8.   else if ($post_info['post_locked']) 
  9.   { 
  10.     message_die(GENERAL_MESSAGE, 'Message_locked'); 
  11.   } 
  12.   else 
  13.   { 
  14.     $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.
 



 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Moderator Messages / Message Locking ? 
 
The switch is here :

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

 



 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Moderator Messages / Message Locking ? 
 
Sorry, I missed it.

I think I will integrate this.

Can you please test it?
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Moderator Messages / Message Locking ? 
 
Well, the code I posted is from my local installation and working great :).
 



 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Moderator Messages / Message Locking ? 
 
I don't think it works only with the code listed here...

Anyway I have added the missed code and integrated it.

On next PUSH you will see the code on GIT.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron