Author Topic: Retrive Env Variable Value inside the plugin  (Read 5382 times)

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrive Env Variable Value inside the plugin
« on: February 08, 2011, 06:12:38 AM »
I have set an env variable and altered its value in JavaScript.. Now i need its value inside the plugin(.php).. How to retrieve it..

Thanks and Regards,
Pratik

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Retrive Env Variable Value inside the plugin
« Reply #1 on: February 08, 2011, 02:14:48 PM »
You'd need to pass it to the php using a custom action http://trac.roundcube.net/wiki/Doc_Plugins#Customactions

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrive Env Variable Value inside the plugin
« Reply #2 on: February 09, 2011, 12:15:18 AM »
I added this code in my plugin
Code: [Select]

rcmail->output->set_env('user_value', 'myvalue');


And on certain event i am changing the value in the javascript as:
Code: [Select]

rcmail.env.user_value = 'newvalue';


Now how to get this value inside my plugin(.php)..??

Offline pratik_1712

  • Jr. Member
  • **
  • Posts: 43
Retrive Env Variable Value inside the plugin
« Reply #3 on: February 09, 2011, 01:50:26 AM »
Found the solution..
Got the value through get_input_value

Thanks for help skaero