Hi,

thanks for your code snippet. I am pretty sure the hook is being called 
because when I made a typo I got an error message that the method get() could 
not be called on a non-object. It seems to me that this is a runtime error and 
thus the hook method must have been called.

> and now in javascript you can use rcmail.env.messageid variable.

Unfortunately I don't find this attribute in the rcmail.env object. I inspect 
it with Firebug. I also tried to add another variable with a static string 
just in case the result of the function is undefined or something alike. 
However I cannot get any additional attribute into rcmail.env.


        public $task = 'mail';

        function init() {
                // include our files
                $this->include_script('my_plugin.js');
                $this->include_stylesheet('my_plugin.css');
                
                // register hook for message headers being processed
                $this->add_hook('message_headers_output', array($this, 
'headers'));
        }
        
        // provide message ID from message header
        function headers($args) {
                $rcmail = rcube::get_instance();

                // BOTH NOT VISIBLE
                $rcmail->output->set_env('foo', 'bar');
                $rcmail->output->set_env('messageid', 
$args['headers']->get('message-
id'));

                // DOCUMENTATION SAYS method for this hook shall return the
                // (possibly modified) output argument
                return $args['output'];
        }


I only know the list of available hooks found at [1]. Can you point me at 
documentation for $rcmail->output->set_env or $args['headers']. I cannot find 
it.


Daniel

-- 
Daniel Böhmer, Diplominformatiker (BA)
Freelance Software Developer

Diese E-Mail ist mit GnuPG digital signiert. Wenn GnuPG nicht verwendet 
wird, bitte die Datei "signature.asc" einfach ignorieren. //
This e-mail is digitally signed with GnuPG. If GnuPG is not used, 
please just ignore the file "signature.asc".

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev

Reply via email to