summaryrefslogtreecommitdiff
path: root/program/include/rcube_template.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-07-09 07:54:14 +0000
committerthomascube <thomas@roundcube.net>2009-07-09 07:54:14 +0000
commit742d61aaf32875645f50456d263fe649db5eef0a (patch)
treea074598fe599098c50174fa9b768d0565229224f /program/include/rcube_template.php
parent21c277ee20dd02ebcb8dd4d263acd4d597d6105f (diff)
Add generic hook when a html page is rendered
Diffstat (limited to 'program/include/rcube_template.php')
-rwxr-xr-xprogram/include/rcube_template.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 455bbcfd2..98d8b6057 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -371,6 +371,9 @@ class rcube_template extends rcube_html_page
// parse for specialtags
$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) {
@@ -379,7 +382,8 @@ class rcube_template extends rcube_html_page
<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;