Roundcube Community Forum

 

Quick Question from an amateur

Started by Aodhan, July 12, 2010, 01:20:55 PM

Previous topic - Next topic

Aodhan

How would I display a message in the same place all the confirmation messages come up from a plugin ?

So lets say for example I wanted a message to come up saying 'Well Done!' after the 'Message Sent Successfully' Message.

I guess I'd use the 'message_sent' hook ? but how to display the message ?

SKaero


rcmail.display_message('Well Done!', 'confirmation');

qnrq

What skaero posted above is Javascript, if you want to hook it in message_sent then you can include the script like this:

$this->include_script ('welldone.js');

Aodhan

Thanks for the replys...

I'll try that out now.

corbosman

There is a much easier method.. from PHP you can just say:


$rcmail = rcmail::get_instance();
$rcmail->output->show_message('my_plugin.my_label', 'confirmation');


Where my_label is a label from your localization strings. Look through existing plugins for examples.