aboutsummaryrefslogtreecommitdiffstats
path: root/trunk
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-03-12 21:45:59 +0100
committerEgil Moeller <egil.moller@freecode.no>2010-03-12 21:45:59 +0100
commit91df2b2bb7e174f5b81657830dd1835b7d3c2ab8 (patch)
treeb30d7b310791a181770ad67cb7e66bb4a374af63 /trunk
parent01aab6c2fbbc22d13b7e5187e829fda64661e636 (diff)
downloadetherpad-91df2b2bb7e174f5b81657830dd1835b7d3c2ab8.tar.gz
etherpad-91df2b2bb7e174f5b81657830dd1835b7d3c2ab8.tar.xz
etherpad-91df2b2bb7e174f5b81657830dd1835b7d3c2ab8.zip
Added header/footer hooks for pages
Diffstat (limited to 'trunk')
-rw-r--r--trunk/etherpad/src/etherpad/utils.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/trunk/etherpad/src/etherpad/utils.js b/trunk/etherpad/src/etherpad/utils.js
index 8e572dd..e60c08a 100644
--- a/trunk/etherpad/src/etherpad/utils.js
+++ b/trunk/etherpad/src/etherpad/utils.js
@@ -35,6 +35,7 @@ import("etherpad.pro.pro_config");
import("etherpad.pro.pro_accounts");
import("etherpad.pro.pro_accounts.getSessionProAccount");
import("etherpad.log");
+import("etherpad.admin.plugins");
jimport("java.lang.System.out.print");
jimport("java.lang.System.out.println");
@@ -92,6 +93,9 @@ function renderTemplate(filename, data, plugin) {
function renderHtml(bodyFileName, data, plugin) {
var bodyHtml = renderTemplateAsString(bodyFileName, data, plugin);
+ bodyHtml = plugins.callHookStr("renderPageBodyPre", {bodyFileName:bodyFileName, data:data, plugin:plugin}) +
+ bodyHtml +
+ plugins.callHookStr("renderPageBodyPost", {bodyFileName:bodyFileName, data:data, plugin:plugin});
response.write(renderTemplateAsString("html.ejs", {bodyHtml: bodyHtml}));
if (request.acceptsGzip) {
response.setGzip(true);