thomascube
2009-07-09 742d61aaf32875645f50456d263fe649db5eef0a
Add generic hook when a html page is rendered

1 files modified
6 ■■■■ changed files
program/include/rcube_template.php 6 ●●●● patch | view | raw | blame | history
program/include/rcube_template.php
@@ -372,6 +372,9 @@
        $output = $this->parse_conditions($templ);
        $output = $this->parse_xml($output);
        // trigger generic hook where plugins can put additional content to the page
        $hook = $this->app->plugins->exec_hook("render_page", array('template' => $name, 'content' => $output));
        // add debug console
        if ($this->config['debug_level'] & 8) {
            $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;">
@@ -379,7 +382,8 @@
                <form action="/" name="debugform" style="display:inline"><textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:x-small" spellcheck="false"></textarea></form></div>'
            );
        }
        $output = $this->parse_with_globals($output);
        $output = $this->parse_with_globals($hook['content']);
        $this->write(trim($output));
        if ($exit) {
            exit;