Hi,
i've tried to make a porting of this plugin with the new plugin feature of RoundCube 0.3 but i have many problems.
I don't know the language of the new plugin structure, I have see all the links to build myself this plugin but without any results
I have previously maked this plugin for RoundCube 0.2.1 and MyRoundcube. With both it works well.
I can't create the structure of the PHP page. The plugin is a simple iframe that contains the links of the qmailadmin with the fields of username and password for authentication. The result with MYRC and RC 0.2.1 is like this screenshoot
The old structure is there:
1) qmailadmin.inc
This is the page with them the plugin get the username from the session and load the plugin page of RC with the iframe
<?PHP
function rcube_qmailadmin_form($attrib)
{
global $RCMAIL, $OUTPUT ;
$url = "qmailadmin_url.php?usr=";
$emailuser = $_SESSION['username'];
$url=$url.$emailuser;
$out .= sprintf("<tr><td\" class=\"title\"><iframe align=\"top\" scrolling=\"yes\"src=\"$url\"; width=\"650\" height=\"690\"></iframe></td></tr>\n");
return $out;
}
$OUTPUT->set_pagetitle(rcube_label("qmailadmin"));
$OUTPUT->add_handler('qmailadminform','rcube_qmailadmin_form');
switch ($RCMAIL->action)
{
case "qmailadmin":
$OUTPUT->send("qmailadmin");
break;
}
?>
2) qmailadmin_url.php
With this page it search the password in MySQL database with the inclusion of the config file and then it make a hidden iframe for hidden autentication.
global $RCMAIL, $OUTPUT;
include("config/qmailadmin_config.php");
$emailuser = $_REQUEST['usr'];
$domain = split("@",$emailuser);
$domain_1 = str_replace(".","_",$domain[1]);
$domain_2 = str_replace("-","_",$domain_1);
$query = mysql_connect($host_mysql, $vpopmail_user, $vpopmail_pwd);
$pwquery = "SELECT pw_clear_passwd FROM $vpopdb.$domain_2 WHERE pw_name='$domain[0]';";
$result = mysql_query($pwquery);
$pwd = mysql_fetch_array($result);
mysql_close($query);
$account_name = $domain[0];
$domain_name = $domain[1];
$account_pwd = $pwd[pw_clear_passwd];
?>
3) qmailadmin_config.php
This is the simple php include of personal fields of usename, password and link of the qmailadmin
$qmailadmin_link= "http://your_domain_ex/cgi-bin/qmailadmin";
$host_mysql = "localhost";
$vpopmail_user = "your_vpopmail_user";
$vpopmail_pwd = "your_vpopmail_password";
$vpopdb = "your_vpopmail_database";
?>
I'm able to make only the tab with the new plugin structure.
In attachment the two files.
Any help would be appreciated.
Thanks