Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1042)
Admin Lock Thread v1.1
By Bananas21ca
DescriptionLocks threads from posting by anyone who is not an admin. This Includes Global Moderators.
Great way to prevent moderators from unlocking topics you don't want reopened.
InstallationSimply install the package to install this modification on the Default theme.
You will have to manually edit if you have a custom theme.
To add this mod to a custom theme, open the Display.template.php file for your theme and search for:
$mod_buttons = array(
'move' => array('test' => 'can_move', 'text' => 132, 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 63, 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt[162] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
And add:
'adminlock' => array('test' => 'can_alock', 'text' => empty($context['is_alocked']) ? 'smf281' : 'smf282', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=alock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
Like so:
$mod_buttons = array(
'adminlock' => array('test' => 'can_alock', 'text' => empty($context['is_alocked']) ? 'smf281' : 'smf282', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=alock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'move' => array('test' => 'can_move', 'text' => 132, 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 63, 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt[162] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
How Do I Use This Mod?After the mod is installed a new button will be available on the Moderator Control Panel at the bottom of every thread.
Simply click "Admin Lock" and the thread will be locked to admins only
Changelog1.0o Initial release
1.1o Embedded Admin Lock function inside LockTopic.php
1.2o Bug: Fixed "Undefined index: is_alocked" Errors in Subs.php
tnx for mod. ;)
Nice work man...
i like that mod
Nice job! I'm impressed. This should help prevent staff members from spamming.
The next version im working on will prevent Moderators from Editing, Moving, Merging, deleting or any other feeble attempts to get around the Admin Lock.
Also if anyone wants to come up with a better looking GIF for the Admin Lock feel free to. I'll give you full credit if I use it in the mod. Im not much of an artist myself :P
Anyway,
Thanks for the Support guys, I really appreciate it ;)
nice one
everything is ok but why a lot of these errors:
8: Undefined index: is_alocked
File: /home2/crazyzonews/www/Sources/Subs.php
Linea: 3340
edi67 try
Open subs.php
FIND
if ($topic_context['is_alocked'])
$topic_context['class'] = 'alocked';
REPLACE
if (!empty($topic_context['is_alocked']))
$topic_context['class'] = 'alocked';
Quote from: karlbenson on December 28, 2007, 02:47:50 PM
edi67 try
Open subs.php
FIND
if ($topic_context['is_alocked'])
$topic_context['class'] = 'alocked';
REPLACE
if (!empty($topic_context['is_alocked']))
$topic_context['class'] = 'alocked';
thx for your help Karl i will do
Quote from: edi67 on December 28, 2007, 01:39:31 PM
everything is ok but why a lot of these errors:
8: Undefined index: is_alocked
File: /home2/crazyzonews/www/Sources/Subs.php
Linea: 3340
oops! I'll have to fix that.
Thanks for the fix Karl
I just posted the updated package.
I hope thats all the bugs..... :-\
Bananas.
In another topic there was an issue that this mod wouldn't go through a Package Parser because you've structured the mod inside a folder
Package (inside it)
->Folder
- -- > File
- -- > File
Without being inside a folder, it will go through a package parser like
http://sleepycode.com/PackageParser/index.php
making it alot easier for some people to manually install it on other themes and manually as is necessary.
cannot put an image as this:
(http://maxupload.com/img/E405AA18.jpg) (http://maxupload.com/img/E405AA18.jpg)
where that is marked would have an image to say locked
Quote from: karlbenson on December 28, 2007, 05:34:01 PM
Bananas.
In another topic there was an issue that this mod wouldn't go through a Package Parser because you've structured the mod inside a folder
Package (inside it)
->Folder
- -- > File
- -- > File
Without being inside a folder, it will go through a package parser like
http://sleepycode.com/PackageParser/index.php
making it alot easier for some people to manually install it on other themes and manually as is necessary.
The v1.2 package seems to work with the Package Parser. Might have something to do with the fact it was a tar.gz the first time. If it's easier for everyone i'll package it as a .zip on my next release.
Quote from: ne.miguelito on December 28, 2007, 05:50:36 PM
cannot put an image as this:
(http://maxupload.com/img/E405AA18.jpg) (http://maxupload.com/img/E405AA18.jpg)
where that is marked would have an image to say locked
That will be included in my next release. Forgot all about it.
In the meantime just regular lock it too, to show the lock symbol.
Quote
That will be included in my next release. Forgot all about it.
In the meantime just regular lock it too, to show the lock symbol.
but if it is alone locked with the Admin Lock Thread doesn't appear anything...
Quote from: ne.miguelito on December 28, 2007, 08:42:38 PM
Quote
That will be included in my next release. Forgot all about it.
In the meantime just regular lock it too, to show the lock symbol.
but if it is alone locked with the Admin Lock Thread doesn't appear anything...
It won't appear on the board index, but there is a custom "Admin Locked" graphic on the actual thread.
Like I said earlier i'll be putting some sort of lock symbol on the board index in the next version of the mod.
I dont see Display.template.php. I am using Dilber MC Theme. How do I add this one?
Thanks.
Could prove a handy mod for my forum.
Thanks
Cool i'm looking forward to any new release of this mod (with included locking-picture)....
Keep up the good work...
Quote from: ManilaGurL on January 17, 2008, 08:38:38 AM
I dont see Display.template.php. I am using Dilber MC Theme. How do I add this one?
Thanks.
if your theme don't have the Display.template.php file, its using the default themes file which means it should be installed. This may not be true for all themes though, all the ones i've worked with followed the same format.
If you could show me a link to the theme i'll take a look when I have a sec to spare.
I don't seem to see the button showing up... I am using the Babylon Theme, and when I switch to the smf default or whatever, I see the button... How can I get this functioning in the Babylon Theme? Also, is there going to be addition of admin lock option in the moderation pulldown menu?
Awesome mod!
Thanks!
Pip
Quote from: Pip2andahalf on January 29, 2008, 06:11:29 PM
I don't seem to see the button showing up... I am using the Babylon Theme, and when I switch to the smf default or whatever, I see the button... How can I get this functioning in the Babylon Theme? Also, is there going to be addition of admin lock option in the moderation pulldown menu?
Awesome mod!
Thanks!
Pip
Quote from: Pip2andahalf on January 29, 2008, 06:11:29 PM
I don't seem to see the button showing up... I am using the Babylon Theme, and when I switch to the smf default or whatever, I see the button... How can I get this functioning in the Babylon Theme? Also, is there going to be addition of admin lock option in the moderation pulldown menu?
Awesome mod!
Thanks!
Pip
Sorry for the long delay in my reply. To add the mod to the Babylon Theme you need to edit the Display.template.php file.
Near the bottom of the file add the following snippet of code:
if ($context['can_alock'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=alock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_lock.gif" alt="' . (empty($context['is_alocked']) ? $txt['smf281'] : $txt['smf282']) . '" border="0" />' : (empty($context['is_alocked']) ? $txt['smf281'] : $txt['smf282'])) . '</a>';
Before:
return implode($context['menu_separator'], $moderationButtons);
The mod will now work. However since I dident make a button for the mod it will use the same one as the Lock Topic button. Minor cosmetic issue, however the mod still works perfect.
Ways to make it work on v2.0?
Swedish translation
Admin.swedish.php
$txt['modlog_ac_alocked'] = 'Endast admins kan skriva';
index.swedish.php
$txt['smf281'] = 'Endast admins kan skriva';
$txt['smf282'] = 'Alla kan skriva';
Quote from: bananas21ca on March 03, 2008, 09:06:56 PM
Quote from: Pip2andahalf on January 29, 2008, 06:11:29 PM
I don't seem to see the button showing up... I am using the Babylon Theme, and when I switch to the smf default or whatever, I see the button... How can I get this functioning in the Babylon Theme? Also, is there going to be addition of admin lock option in the moderation pulldown menu?
Awesome mod!
Thanks!
Pip
Quote from: Pip2andahalf on January 29, 2008, 06:11:29 PM
I don't seem to see the button showing up... I am using the Babylon Theme, and when I switch to the smf default or whatever, I see the button... How can I get this functioning in the Babylon Theme? Also, is there going to be addition of admin lock option in the moderation pulldown menu?
Awesome mod!
Thanks!
Pip
Sorry for the long delay in my reply. To add the mod to the Babylon Theme you need to edit the Display.template.php file.
Near the bottom of the file add the following snippet of code:
if ($context['can_alock'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=alock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_lock.gif" alt="' . (empty($context['is_alocked']) ? $txt['smf281'] : $txt['smf282']) . '" border="0" />' : (empty($context['is_alocked']) ? $txt['smf281'] : $txt['smf282'])) . '</a>';
Before:
return implode($context['menu_separator'], $moderationButtons);
The mod will now work. However since I dident make a button for the mod it will use the same one as the Lock Topic button. Minor cosmetic issue, however the mod still works perfect.
Does this info relate to all custom themes or only the Babylon theme?
I have the mod installed and placed a copy of the alocked.gif file in the same folder ( /Themes/theme name/images/topic ) as the default, but I'm still not seeing the 'locked' button in my theme. I'm not even sure it is working.
UPDATE : created a test moderator and the admin lock mod is not working for me. ???
any way to get this to work on SMF 2 Beta 3.1?
Does author plans updating this mod for SMF 2.X?
I'm using RC1.
Is there any similiar mod for this purpose?
I am using 2.0RC2, and would love this mod, or another one from scratch created for 2.0 RC2!!!
This would be a really nice mod that I would use for announcement topics that need to be locked, among other topics...
*BUMP*
Seriously, bumping it like this isn't going to get it updated - the mod site listing hasn't been updated in 2 years. I doubt it'll be updated now.
Currently I have the SMF Core theme installed. I've download the file from the mod's page to my computer.
In Admin > Packages > Download Packages > used the upload file option at the bottom.
Selected Install Mod, but it won't install what I have done wrong? :-[
:( It's just this would be a awesome mod/feature!!
Hi Arantor. Tried what you advised but no luck mate! Any clues what I've done wrong?
Rgds E.S
euroslob; Please don't bump, I note it didn't work.
Did you get an error? Warning? Blank screen? Something else?
Hi Arantor, Many thanks for your reply
God I've been pulling my hair out as to why this mod won't configure!
This what I did: Admin> Packages> Download Packages> Upload A Package> Browse> Selected file on my PC> Uploaded> Apply Mod> Install Now.
A message box then appears "Extracting Manager" saying: The package was installed successfully. You should now be able to use whatever functionality it adds or changes; or not be able to use functionality it removes.
Is there anything else I should do?
Rgds E.S
So.. SMF version, mod package used?
At present I'm using "SMF Default Theme -Core"
If I try to lock a topic now Arantor I get this message appear on a white screen:
Fatal error: Cannot redeclare adminlocktopic() (previously declared in /home/essexvw1/public_html/forum/Sources/LockTopic.php:106) in /home/essexvw1/public_html/forum/Sources/LockTopic.php on line 224
It's been installed twice somehow. You'll need to look at the code on http://custom.simplemachines.org/mods/index.php?action=parse;mod=1042;attach=45325;smf_version=1.1.11 and see where it's been added twice - and remove one of them.
Arantor, how do I get to the option to open the Display.template.php on the current installed theme?
Admin > Current Theme...
Hi Arantor, sorry for my absence. OK so far Ive selected: Admin> Current Theme.. where do I get in to edit the files?
For what its worth I loaded up a new forum on a sub domain so I could reload the "Admin Lock Thread" I tried again using the "Core" theme and still no luck!
How about the friendly "Modify Themes" option...
Yep been in there Arantor but because I'm using the "Default Core Theme" there is only two listed: "Classic YaBB SE Theme" and "Babylon Theme"
Which is why I am a bit confused here trying to edit "Core"!
Oh, I forgot it doesn't actually let you edit the default theme. Only way to edit it then is with FTP.
I thought that this maybe the case Arantor.
I've just carried out a before and after, this is before uploading the Admin Lock file:
$mod_buttons = array(
'move' => array('test' => 'can_move', 'text' => 132, 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 63, 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt[162] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
And this is after uploading Admin Lock Thread:
$mod_buttons = array('adminlock' => array('test' => 'can_alock', 'text' => empty($context['is_alocked']) ? 'smf281' : 'smf282', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=alock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'move' => array('test' => 'can_move', 'text' => 132, 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 63, 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt[162] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
I've carried out the checks in FTP file manager which shows the upload was a success. BUT! no red button is appearing at the bottom of a thread!
There will be an edit elsewhere relating to $context['can_alock']... was that added?
Cant find it Arantor, where abouts in the scripting should it be?
Display.php.
I understand that Arantor, but what I meant is where abouts in the script of Display.php will $context['can_alock'] be listed?
Personally I would have assumed it should have been in the red script I posted !
That's from Display.template.php is it not?
I'm using Just Host File Manager, here's my path Themes> Default> DisplayTemplate.php> Show File
The copied file below is the section I thought covered the Admin Lock Button:
$mod_buttons = array('adminlock' => array('test' => 'can_alock', 'text' => empty($context['is_alocked']) ? 'smf281' : 'smf282', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=alock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'move' => array('test' => 'can_move', 'text' => 132, 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 63, 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt[162] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
);
if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
$mod_buttons[] = array('text' => 'quickmod_delete_selected', 'image' => 'delete_selected.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit"', 'url' => 'javascript:document.quickModForm.submit();');
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 1ex;">
<tr>
', template_button_strip($mod_buttons, 'bottom') , '
</tr>
</table>';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
echo '
<input type="hidden" name="sc" value="', $context['session_id'], '" />';
if (empty($settings['use_tabs']))
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
document.getElementById("quickmodSubmit").style.display = "none";
// ]]></script>';
echo '
</form>';
There's part of it in Sources/Display.php too, relating to $context['can_alock']
You may want to check the mod's parse instructions to see exactly what it should have added.
This is what is really confusing me as it implied it was a simple install to the theme I have currently installed! There should not have been the need to modify the scripting! ???
Installation
Simply install the package to install this modification on the Default theme.
You will have to manually edit if you have a custom theme.
The mod will install in the source - which is common to every theme, then you only need to make the changes to custom themes manually.
Arantor I have purposely created a new forum on a sub domain for testing out mods in order not to break the one I have in regular use at present. I have successfully tried all kinds of other mods such as themes, smileys etc.
I have tried deleting the test forum and re installing it, then uploading the Admin Lock file. But time after time no luck!
I really cannot see where I have gone wrong, I have followed the installation guide and the fact that I am using the standard forum theme this mod should have installed with no problems.
There really should not have been the need to start looking at scripting as the mod author states " You will have to manually edit if you have a custom theme"
Hello!
an update is scheduled for SMF 2.0 RC3 ????
Like the idea of this mod but haven't seen the original owner of this mod online since 2008 as it would be nice to get it updated.
Is there a 2.0 version of this mod?
No, but if you don't trust your global moderators, don't give them the power.
Note that general users can't undo a moderator lock normally even if they themselves can lock a topic.