Roundcube Community Forum

Release Support => Requests => Topic started by: vitormfgoncalves on September 27, 2016, 07:21:14 AM

Title: Display username in window title
Post by: vitormfgoncalves on September 27, 2016, 07:21:14 AM
Hi.

I'm trying to insert the username in the window title without success. I want the window title to be like: "username@domain.ltd :: My title"

I already tried to add <roundcube:var name='session:username' /> to /skins/larry/templates/mail.html and it appears for a second and then desapear when the page finishes to load.

The My title is already set in $config['product_name'].

As far I was able to understand the window title is refreshed somewhere else.

Any help will be appreciated.

Thanks!
Title: Re: Display username in window title
Post by: SKaero on September 27, 2016, 12:08:23 PM
The page title is changed by the javascript so that email count and folder names can be added to the page title, I'm not sure there is a simple way to do what you want.
Title: Re: Display username in window title
Post by: vitormfgoncalves on September 27, 2016, 12:15:55 PM
I already found a solution for my case. I edited /program/include/rcmail_output_json.php and added the username variable on line 49:

Before:
Code: [Select]
$name = $this->config->get('product_name');After:
Code: [Select]
$name = $_SESSION['username'] .' :: '. $this->config->get('product_name');
Apparently, if it is changed by javascript it uses this file somehow...

It would be nice to have this option out of the box. Or perhaps someone make a plugin.

Greetings.