Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: ba_tux on March 02, 2010, 05:24:22 AM

Title: Access roundcube config from javascript
Post by: ba_tux on March 02, 2010, 05:24:22 AM
Hi, I want to customize functions.js. I need a value from Roundcube configuration file (main.inc.php). How to access that value from javascript?
Title: Access roundcube config from javascript
Post by: SKaero on March 02, 2010, 05:56:03 AM
Try making a plugin it can get variable from the config an you shouldn't have to modify functions.js
Title: Access roundcube config from javascript
Post by: ba_tux on March 02, 2010, 06:24:27 AM
It's a great idea, but i just need a little change in js. So, can I access Roundcube configuration via javascript?
Title: Access roundcube config from javascript
Post by: JohnDoh on March 06, 2010, 04:14:54 AM
to access a config from the js it first needs to be added to the env, in a plugin you can do something like
$rcmail->output->set_env('myconfig', 'value');and then in the js you can access it at
this.env.myconfig
Title: Access roundcube config from javascript
Post by: rosali on March 07, 2010, 02:49:19 AM
... or by rcmail.env.myconfig ...