On 2012-11-18 00:42, Cor Bosman wrote:
If you turn on a plugin in the main config, it gets loaded no matter what. So you decide to load it or not. Early in the loading process of roundcube it checks the list of plugins, and calls the init() function in all plugins. This happens regardless of skin. My plugin checks the user's skin inside the init function, and if it's classic it will not do anything. You can easily see this yourself in the source :)
I think this type of checks ( eg. rcmail->config->get('skin') == "larry") not too good. If I create some new skins based on Larry with names like 'skin1', 'skin2', etc. all skin-name-checks will fail. Is there any chance to change the 'skin' variable to an array, like this: array( 'skin_name' => 'skin1', 'skin_type' => 'larry', 'skin_desc' => 'My new larry based skin named skin1', 'skin_author' => 'Skin Author skin_author@myskin.org' )
With this modification the plugins (and the core too) can check the skin_type property.