From 91df2b2bb7e174f5b81657830dd1835b7d3c2ab8 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Fri, 12 Mar 2010 21:45:59 +0100 Subject: Added header/footer hooks for pages --- trunk/etherpad/src/etherpad/utils.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'trunk') 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); -- cgit v1.2.3