mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
added footer.build and page.load hooks
This commit is contained in:
2
app.js
2
app.js
@@ -113,7 +113,9 @@
|
||||
], customTemplates);
|
||||
|
||||
|
||||
plugins.ready(function() {
|
||||
templates.ready(webserver.init);
|
||||
});
|
||||
|
||||
Notifications.init();
|
||||
} else {
|
||||
|
||||
@@ -80,7 +80,8 @@ var ajaxify = {};
|
||||
hook: 'page.load',
|
||||
args: {
|
||||
template: tpl_url,
|
||||
url: '/' + url
|
||||
url: url,
|
||||
uid: app.uid
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
|
||||
<footer id="footer" class="container footer">
|
||||
{footerHTML}
|
||||
<div class="copyright">Copyright © 2013 <a target="_blank" href="http://www.nodebb.org">NodeBB</a> by <a target="_blank" href="https://github.com/psychobunny">psychobunny</a>, <a href="https://github.com/julianlam" target="_blank">julianlam</a>, <a href="https://github.com/barisusakli" target="_blank">barisusakli</a> from <a target="_blank" href="http://www.designcreateplay.com">designcreateplay</a></div>
|
||||
</footer>
|
||||
|
||||
|
||||
@@ -309,7 +309,11 @@ var path = require('path'),
|
||||
|
||||
// translate all static templates served by webserver here. ex. footer, logout
|
||||
translator.translate(templates.footer.toString(), function(parsedTemplate) {
|
||||
templates.footer = parsedTemplate;
|
||||
plugins.fireHook('filter:footer.build', '', function(err, appendHTML) {
|
||||
templates.footer = templates.footer.parse({
|
||||
footerHTML: appendHTML
|
||||
});
|
||||
});
|
||||
});
|
||||
translator.translate(templates.logout.toString(), function(parsedTemplate) {
|
||||
templates.logout = parsedTemplate;
|
||||
|
||||
Reference in New Issue
Block a user