Hello,
I am new to this forum and am working on creating a plugin.
Now I am looking for information or a sample to the next in my plugin to be applied.
The plugin comes in 'setting' and has two windows.
Another question is whether it is possible to configure on a easy way to use parts of a configfile of another program (the same building as the rc config file) to read.
example
$CONF['database_type'] = 'mysql'; $CONF['database_host'] = 'localhost';
Regards, Jan Kruis
List info: http://lists.roundcube.net/dev/ BT/aba52c80
Hello,
I recommend You to take a look to existing RC settings code.
On the configuration part, You could include the configuration file and simply use the variables in RC configuration.
In path/to/myexternalconfig.php $CONF = array(); $CONF['database_type'] = 'mysql'; $CONF['database_user'] = 'roundcube'; $CONF['database_pass'] = 'pass'; $CONF['database_db'] = 'roundcubemail'; $CONF['database_host'] = 'localhost';
In config/db.inc.php: require_once('path/to/myexternalconfig.php')
rcmail_config['db_dsnw'] = sprintf('%s://%s:%s@%s/%s', $CONF['database_type'], $CONF['database_user'], $CONF['database_pass'], $CONF['database_host'], $CONF['database_db']);
If external configuration file is not in PHP You could use *NIX commands like cat, grep, awk, cut (assuming You use *NIX like OS) for processing data via PHP system() function or You could parse the configuration file using PHP.
-- Best regards, Günter Kits
On 09.08.2011 23:28, Jan Kruis wrote:
Hello,
I am new to this forum and am working on creating a plugin.
Now I am looking for information or a sample to the next in my plugin to be applied.
The plugin comes in 'setting' and has two windows.
- In the left panel, the three sub components of the plugin
- In the right pane should fill the window of the left pane selected item.
Another question is whether it is possible to configure on a easy way to use parts of a configfile of another program (the same building as the rc config file) to read.
example
$CONF['database_type'] = 'mysql'; $CONF['database_host'] = 'localhost';
Regards, Jan Kruis
List info: http://lists.roundcube.net/dev/ BT/7f575fcd
List info: http://lists.roundcube.net/dev/ BT/aba52c80