News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Admin Lock Thread

Started by bananas21ca, December 26, 2007, 06:14:15 PM

Previous topic - Next topic

Pip2andahalf

#20
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

bananas21ca

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.

xyxis_fahim

Ways to make it work on v2.0?

Marcus Forsberg

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';


neil h

#24
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.  ???

bros

any way to get this to work on SMF 2 Beta 3.1?

AlenNS

Does author plans updating this mod for SMF 2.X?

I'm using RC1.

AlenNS

Is there any similiar mod for this purpose?

KensonPlays

I am using 2.0RC2, and would love this mod, or another one from scratch created for 2.0 RC2!!!

KensonPlays

This would be a really nice mod that I would use for announcement topics that need to be locked, among other topics...

KensonPlays


Arantor

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.

euroslob

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?  :-[

KensonPlays

:( It's just this would be a awesome mod/feature!!

euroslob

Hi Arantor. Tried what you advised but no luck mate! Any clues what I've done wrong?

Rgds E.S

Arantor

euroslob; Please don't bump, I note it didn't work.

Did you get an error? Warning? Blank screen? Something else?

euroslob

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

Arantor

So.. SMF version, mod package used?

euroslob

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

Arantor

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.

Advertisement: