ActionsThemes

Started by maestrosite.ru, September 17, 2012, 01:48:45 AM

Previous topic - Next topic

maestrosite.ru

Link to Mod

Allow change themes for selected actions - admin, help, profile, search, calendar, pm, etc.

Demo http://smf2.maestrosite.ru/index.php/topic,35.0.html
Support http://MaestroSite.ru/
E-mail [email protected]

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.




Изменение тем оформления в заданных разделах (action) - админка, справка, профиль, поиск, календарь, личные сообщения и тд

Пример работы мода http://smf2.maestrosite.ru/index.php/topic,35.0.html
Сопровождение http://MaestroSite.ru/
E-mail [email protected]

Этот мод доступен по лицензии Creative Commons Attribution-ShareAlike (Атрибуция — С сохранением условий) 3.0 Непортированная.
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

NekoJonez

Dear users

Be warned, if you have multiple mods installed with SMF 2.0.7, this mod might mess up the theme select.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

dougiefresh

I think this is an interesting mod.  However, I see several problems I wanted to bring to your attention.

First, your hooks are incorrect, in that they don't add the subsection to the Admin menu properly.  Certain mods that move the Modification Settings out of it's standard place will not properly show this mod without considerable assistance.  The code within hook_ActionsThemes.php is currently:
function hook_ActionsThemes_modify( &$subActions )
{
//Set subaction handler
$subActions['ActionsThemes'] = 'hook_ActionsThemes_modify_sa';

//Add subaction to admin menu (modsettings area tabs)
global $context;
$context[$context['admin_menu_name']]['sections']['config']['areas']
['modsettings']['subsections']['ActionsThemes'] = array('label' => 'ActionsThemes');
}

It really should be:

function hook_ActionsThemes_admin( &$admin_areas )
{
// Add subaction to Modification area in Admin Menu:
$admin_areas['config']['areas']['modsettings']['subsections']['ActionsThemes'] = array('ActionsThemes');
}

function hook_ActionsThemes_modify( &$subActions )
{
//Set subaction handler
$subActions['ActionsThemes'] = 'hook_ActionsThemes_modify_sa';
}


Second, the hooks.php becomes incomplete once you make the above modification.  So, below this line:
'integrate_modify_modifications' => 'hook_ActionsThemes_modify',
add this:
'integrate_admin_areas' => 'hook_ActionsThemes_admin',

This will get a working mod that should play nice with all the other mods (as far as I can see).  I've attached the modified version to this post.

Advertisement: