Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Roundcube Community Forum
»
News and Announcements
»
General Discussion
»
Access roundcube config from javascript
« previous
next »
Print
Pages: [
1
]
Author
Topic: Access roundcube config from javascript (Read 3344 times)
ba_tux
Jr. Member
Posts: 11
Access roundcube config from javascript
«
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?
Logged
SKaero
Administrator
Hero Member
Posts: 5,882
Access roundcube config from javascript
«
Reply #1 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
Logged
SK
aero
ba_tux
Jr. Member
Posts: 11
Access roundcube config from javascript
«
Reply #2 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?
Logged
JohnDoh
Global Moderator
Hero Member
Posts: 2,856
Access roundcube config from javascript
«
Reply #3 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
Code:
[Select]
$rcmail->output->set_env('myconfig', 'value');
and then in the js you can access it at
Code:
[Select]
this.env.myconfig
Logged
Roundcube Plugins
: Contextmenu, SpamAssassin Prefs, and moreā¦
rosali
Hero Member
Posts: 2,533
Access roundcube config from javascript
«
Reply #4 on:
March 07, 2010, 02:49:19 AM »
... or by rcmail.env.myconfig ...
Logged
Regards,
Rosali
__________________
MyRoundcube Project
(commercial)
Print
Pages: [
1
]
« previous
next »
Roundcube Community Forum
»
News and Announcements
»
General Discussion
»
Access roundcube config from javascript