Topic: [release] Lock topic (for moderators)
Hello
First I was doing it only for myself, but then decided to share. Thats why description is so long and maybe complex.
This extension let moderators to lock selectable topics for unruly users. You can select lock method in Administration » Settings » Features:
-Just disable posting - it mean that user can't post/quote in locked topic
-Disable posting and hide - like before + topic is hidden on viewforum and search pages (including search actions like "Show new posts"). User can access locked topics only manually
-Disable access - User can't access locked topics at all
Locks are turned off for assigned moderators and administrators, but there is one known bug (ONLY if option 2 or 3 is set). There is no moderator assign check on search pages, so existing locks are turned off only for administrators. It mean that:
case 1. user is moderator on forum X and is subscribed to locked topic Y (on this forum). He will be able to see this topic on viewforum (he should), but unable to find it through "New posts" or "Active topics" or "Show my subscriptions" (if subscribed) (he should too).
case 2. user is moderator on forum X and someone post into locked topic Y (on this forum). This topic will be marked as new on viewforum.php (it should), he will see "New posts" on index.php (he should), but after clicking it, there will be no result for this topic (it should be). If it was only topic with new posts, there will be "No results" info.
Of course it is strange situation when someone with locked topics became moderator
case 3. user is moderator on forum Z and had subscribed to locked topic Y (on X forum). In this case lock is working properly.
Bug exist only on forums moderated by this moderator and only in seach.php. On index.php, viewforum.php, viewtopic.php, post.php moderators are fully recognized.
I decided that there is very low probability for situation like this so I'm not planing to fix it.
There is no possibility to lock administrator or assigned moderator.
There is no admin/moderator check while sending subscriptions. All subscriptions for locked users are aborted.
If option 1 is selected subscriptions are sent normally.
Lock/Unlock option is displayed before "Report". If you will delete locked user post, then you can still unlock him using locked users list.
List is displayed in topic footer. I created new div for this, and I'm sharing this solution between 4 extensions:
-Favorite topic (check for new version)
-Hide topic (check for new version)
-Lock topic
-Show subscriptions
It mean that there is only one div (frame) created for all of them. Of course is working separately as well.
Version 0.9.5 beta
it's beta, but there should be no errors, others than described.
lock_topic_0.9.5_beta.zip
Away. I will be back soon.