Hi,

Sorry for my non-rtfm attitude.

Here's how I did the trick for my virtualhosts to have the hostname printed in the login form.

config/main.inc.php - set the actual domain in the username_domain config var
<code>
// get the virtual host used
$recherche = "^.*\.(.*\..*)$";
$rcmail_config['username_domain'] = EREGI_REPLACE($recherche,"\\1", $_SERVER['SERVER_NAME']);
</code>

program/include/main.inc : function rcmail_login_form($attrib) - inform the user that login is easy now!
// happend the username_domain to $fields['user'] variable
// this magicaly works but I don't know what show() and get_input_value() exactly do. $fields['user'] = $input_user->show(get_input_value('_user', RCUBE_INPUT_POST)) . " @". $CONFIG['username_domain'] ;

skins/default/templates/login.html : in the login form style declaration - adds a little space for the new printed string
width: 500px;

Hope this helps !



--
Samuel Krieg



Thomas Bruederli a écrit :
From config.inc.php:

 // Automatically add this domain to user names for login
 // Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
 $rcmail_config['username_domain'] = '';

With this option the "@domain.tld" will be added automatically. Set
this parameter and add a text label behind the input field on the
login page. The according template can be found at
skins/default/templates/login.html

~Thomas


2007/4/25, Samuel Krieg <[EMAIL PROTECTED]>:
Hi there,

First of all I just want to greet all devs because roundcube is really nice.

I would like to set the "@domain.com" string in the login field if
nothing is set and set the focus just before the string.

I first editied the get_input_value function of file
program/include/main.inc ( around line 1130). But this way is bad
because javascripts changes the focus just after the login field is filled.

I think this feature should be done in the javascript part ( around line
274 of program/js/app.js, in the 'login' case ) to be able to set the
focus just before the string.

Am I right ? Should I submit this feature on trac.roundcube.net ?

Thanks

--
Sam











Reply via email to