I'm trying to find where the login page (skins/default/templates/login.html) is linked at. I need to know how, when you go to say mail.domain.com it goes to the login.html page and same as when you logout it goes to the login.html page. I just want to change the extension from html to php but have looked and couldn't find where to change that was.
what controls it is that the main index.php is what calls the proper template and include files.
Why would you want to change the extension?
I'm trying to do the same thing.
I want to add some php scripting to my login page and I can't figure out where I can tell roundcube to load "skins/default/templates/login.php" instead of "skins/default/templates/login.html".
--Rick
http://webmail.saintmail.net/
Quote from: Grim I'm trying to find where the login page (skins/default/templates/login.html) is linked at. I need to know how, when you go to say mail.domain.com it goes to the login.html page and same as when you logout it goes to the login.html page. I just want to change the extension from html to php but have looked and couldn't find where to change that was.
Look in the includes/rcmail_template.inc file and if not there rcmail_template.html.... I believe that there is a method in each class called "parse" or "write". I'm not sure which one retrieves the template off the top of my head; however, it's pretty apparent when you open the files.
From there, you need to flag when the parameter "login" is passed to the method. The one problem is that if you put PHP into your login.html page, then you have to call eval() on it, which means that while you have valid PHP in there, the HTML won't be accessible to you. So you'd have to change the form of the login.html file to be all html contained in a variable, then use that variable in the class. It's a whole lot more work than it's worth. You'd be better off just defining a new element as part of the roundcube xml parser and putting in your items there, doing the real PHP work where it's supposed to be done.
That's not to mention the fact that if you were to put PHP into the template file(s), then you'd negate the reason for using an MVC in the first place. So if you're going to include custom coding (like side-bars and stuff), you're better off adding a new tag type so that you can reference it via "" or something like that. Then let the PHP code in the template parser take care of it. Make sense?