I want to change theme dynamically - in plug-in.
For example if I have in url: ?skin=new_skin
The theme will be changed in "new_skin" without changes in global configuration file.
I tried this:
class sa_mobile extends rcube_plugin
{
public $task = '';
function init() {
$rcmail = rcmail::get_instance();
if (isset($_GET['skin'])) {
$rcmail->config->set('skin', $_GET['skin']);
}
}
}
But theme is not changed. Config variable is changed but skin is the same.
Can you help please?
Give remember_skin plugin a chance. Download see signature.
Basically your plugin should work too after you changed in main.inc.php
the skin definition to dynamic value:
$rcmail_config['skin'] = get_input_value('skin', RCUBE_INPUT_GPC);
Alternatively try to move the config overwrite from init to startup hook.
i will try this later
Best Mercedes Parts (//%5Burl=http://www.incarparts.com)]Best Mercedes Parts (http://www.incarparts.com)[/URL]