Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: onlinegamesnz on April 28, 2012, 03:16:25 AM

Title: Roundcube login from different form?
Post by: onlinegamesnz on April 28, 2012, 03:16:25 AM
Hi, i am trying to enable a sererate webmail login form to login a user to roundcube

http://megahosting.co.nz/index2.html

The top right of the page is a webmail login link that executes a login popup window. I am trying to use that form to POST the login details for roundcube webmail.

The roundcube directory is located at http://megahosting.co.nz/webmail/

i am trying to use

        <form name"form" action="./" method="post" class="popup-form">
        <roundcube:object name="loginform" form="form" />
            <fieldset>
            <label class="popup">Username</label>
            <input class="input"  type="text" size="25" />
            <label class="popup">Password</label>
            <input class="input" type="password" size="25" />           
            <button type="submit" class="submit-popup">Webmail Login</button>

But i am getting a HTTP Verb error?

Any ideas?

Thanks!
Title: Re: Roundcube login from different form?
Post by: onlinegamesnz on April 28, 2012, 10:26:51 PM
Anybody?? Please
Title: Re: Roundcube login from different form?
Post by: SKaero on April 29, 2012, 02:16:57 AM
The <roundcube:object> tag will only work in the RoundCube template system. You'll need to use a standard web form for the username and password and a RoundCube plugin to validate the post data to login to RoundCube.
Title: Re: Roundcube login from different form?
Post by: onlinegamesnz on April 29, 2012, 06:25:10 AM
Thanks, is this plugin avaliable for download?
Title: Re: Roundcube login from different form?
Post by: onlinegamesnz on April 29, 2012, 06:29:50 AM
Would i be http_auth??

I have

 <form action="webmail/plugins/http_auth/http_auth.php" method="post" class="popup-form" id="name"form">

Thanks!
Title: Re: Roundcube login from different form?
Post by: SKaero on April 29, 2012, 05:15:07 PM
No it needs to be plugin that marks the post as valid, you can make a modified version of the autologon plugin http://trac.roundcube.net/browser/trunk/roundcubemail/plugins/autologon/autologon.php to do what you want.
Title: Re: Roundcube login from different form?
Post by: onlinegamesnz on April 30, 2012, 03:10:06 AM
Thanks, i have tried the following with no luck.

    <form action="webmail/plugins/autologon/autologon.php" method="post" class="popup-form" name="form">
      <fieldset>
        <label class="popup">Username</label>
        <input class="input"  type="text" size="25" />
        <label class="popup">Password</label>
        <input class="input" type="password" size="25" />
        <button type="submit" class="submit-popup">Webmail Login</button>
      </fieldset>
    </form>

Any ideas? thanks
Title: Re: Roundcube login from different form?
Post by: SKaero on May 01, 2012, 05:00:33 AM
The plugin needs to be modified before it will work with a form, you also have to activate it in the config, and finally you need to post the form to the main RoundCube index.php file not the plugin file itself.
Title: Re: Roundcube login from different form?
Post by: onlinegamesnz on May 02, 2012, 07:05:41 AM
Hi, is there an easier way to do this? would it be easier to directly query the mysql db?

Thanks!
Title: Re: Roundcube login from different form?
Post by: SKaero on May 02, 2012, 07:43:13 AM
The users aren't stored in the MySQL database so you'll need to post through RoundCube to connect the IMAP. Its not really that hard if you have basic knowledge of PHP.
Title: Re: Roundcube login from different form?
Post by: onlinegamesnz on May 25, 2012, 07:03:57 AM
im stuck as im really new to PHP

has anyone got a modified verison of this script that will allow POST from a form?