Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: martinbocek on May 12, 2015, 07:32:57 AM

Title: Only default skin on logout page
Post by: martinbocek on May 12, 2015, 07:32:57 AM
Hello,
I have tried to go thru forum, rc config files etc. but I did not found any solution.

I would like to use only one default skin (on login and) on logout page (https://boček.eu/?_task=logout&_token=xxxx - logout task) and allow user to set up individual skin for other rc tasks as well.

The problem is that after user set up some other skin thank default one and logs out, logout page uses does not use default skin (which is behaviour we do not need).

Thank you for your help

Title: Re: Only default skin on logout page
Post by: JohnDoh on May 14, 2015, 03:04:18 AM
I think you need to make a plugin which will forcibly change the skin on logout.
Title: Re: Only default skin on logout page
Post by: martinbocek on May 15, 2015, 03:59:13 AM
Thank you, that's a good idea.

Here are some simple ideas I have added to my existing login plugin - it might be useful for someone in future. Of course, this is not the smartest way, but it works for my situation:

   public $task = 'login|logout;

    function init()
    {
        $this->add_hook('startup', array($this, 'set_default_skin'));
    }

    function set_default_skin($args)
    {
        $rcmail = rcmail::get_instance();
        $rcmail->output->set_skin(rcube_config::DEFAULT_SKIN);
        return $args;
    }

Title: Re: Only default skin on logout page
Post by: brumc on May 21, 2015, 11:05:06 PM
hi,

you made a new plugin or changed the existing php code ?

Title: Re: Only default skin on logout page
Post by: martinbocek on May 22, 2015, 02:07:30 AM
It's a part of my plugin code - no modification in RC code. My plugin implements some internal actions to our servers before and after login as well, it is not supposed to be public, I am sorry. But the code ilustrates the idea I have used.
Title: Re: Only default skin on logout page
Post by: brumc on May 22, 2015, 10:11:33 AM
Hi,

Thank you , interesting. Going to try a few things out.