Node.js based forum software built for the modern web
plugins: filter:server.create_routes - allow plugins to add custom templates and/or modify individual blocks withiin a template
psychobunny42d77080f36f
diff --git a/src/webserver.js b/src/webserver.jsindex 0ac8e00fe7..3606113cc8 100644--- a/src/webserver.js+++ b/src/webserver.js@@ -807,7 +807,8 @@ var path = require('path'),var custom_routes = {'routes': [],- 'api': []+ 'api': [],+ 'templates': []};plugins.ready(function() {@@ -843,6 +844,17 @@ var path = require('path'),}}+ var templateRoutes = custom_routes.templates;+ for (var route in templateRoutes) {+ if (templateRoutes.hasOwnProperty(route)) {+ (function(route) {+ app.get('/templates/' + templateRoutes[route].template, function(req, res) {+ res.send(templateRoutes[route].content);+ });+ }(route));+ }+ }+});});