Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 08 Jun 2012, 20:45
Chris8's Avatar
Chris8 Chris8 is offline
 
Join Date: Nov 2009
Bunny! Message Edit Time Limit in Social Group Discussions

Similarly to post editing time limit option it would be great if social group discussions would offer an option to limit edit time of a message to certain period only.
It seams there is only option to allow or disallow message editing by usergroup (Can manage own messages [Yes][No]) which is not good enough.
Does anyone could help with writing the plugin for that? I'm not sure were to start.
I would like to limit poster to 30 minutes to edit his/her messages within social group discussions.
Of course the ability of Admin to edit all messages anytime should stay intact.
I would be grateful for any help/ideas.
__________________
Reply With Quote
  #2  
Old 09 Jun 2012, 01:47
kh99's Avatar
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Well, you could make the "Edit" control go away by creating a plugin using hook group_messagebit_display_complete and setting $message['edit'] to false. I guess strictly speaking that doesn't stop someone from editing the message, but someone would have to be really desperate to figure out how to do it without having the control. (Or you could just use a second plugin to guard against that).

Anyway, you could do something like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


but that doesn't account for admins being able to edit forever. It's easy enough to check if the current user is an admin, but what you really want is to know if they have permission to edit that discussion and that message. (The code that figures that out is in includes/class_groupmessage.php, in class vB_Group_Bit_Message, if that helps).
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread.

Last edited by kh99 : 09 Jun 2012 at 01:52.
Reply With Quote
  #3  
Old 10 Jun 2012, 21:34
Chris8's Avatar
Chris8 Chris8 is offline
 
Join Date: Nov 2009
Thank you Kevin. Once again your suggestions were crucial to achieve the target.
Yup, that was great start and gave me the whole idea how to use the dateline info, now all stuff works like a charm! And this plug itself is also helpful.
I'm sure you've already got loads of good karma for helping here!
__________________
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quote functionality in social group discussions BlackThorn vBulletin 4.x Add-ons 12 25 Apr 2013 08:45
Social Group Discussions Like Postbit Legacy MrEyes vBulletin 3.8 Template Modifications 27 19 Jan 2011 20:23

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 11:39.

Layout Options | Width: Wide Color: