Roundcube Community Forum

 

Render message toolbar through plugin..

Started by pratik_1712, February 03, 2011, 02:04:12 AM

Previous topic - Next topic

pratik_1712

function renderedpage($args){
  if($args['template'] == 'mail'){
    $content = $args['content'];
   
    $content = $content  // How to edit this part to add a label in the messagetoolbar div..??

    $args['content'] = $content;
  }
  return $args;
}



I need to add a label in the toolbar. I found that i have to edit messagetoolbar div in the template 'mail'..
I need to know how to edit this inside the function..??

Say i need to add Undo label to the toolbar..

Thanks and Regards,
Pratik

SKaero


pratik_1712

I stumbled to that part but i need that value to change everytime. How to pass the value to JavaScript for display..??

So i thought that will be more appropriate..

any idea how to do it by this method..??
can't i select a particular div and add to it.??

SKaero

You can pass a variable to JavaScript by using the set_env function, like:

$rcmail->output->set_env('button_value', 'data');

Then in the Javascript access it by calling rcmail.env.button_value, like:

alert(rcmail.env.button_value);

Alternatively you could try using the template_container hook Plugin_Hooks ? Roundcube Webmail

pratik_1712

Thanks a lot that was very helpful.. It worked as i needed.. Cheers mate..