@julian Yus! I have been waiting forever for this.
thesbros
Posts
-
Subfolder installation -
Problem with widget plugin@psychobunny It's a plugin for a Minecraft server website I am developing. (switching over from Enjin)
-
Problem with widget plugin@psychobunny Ah, figured it out, in the plugin.json I called the plugin "mcpartyzone" where it was actually called "nodebb-plugin-mcpartyzone". Now it works, thanks for the help!
-
Problem with widget plugin@psychobunny Ah, did ./nodebb dev, and look what popped up:
warn: [plugins] Plugin 'mcpartyzone' not found
How would I fix that?
(plugin is called mcpartyzone btw) -
Problem with widget plugin@psychobunny I was running the version without the opening bracket with node app.js and didn't get any errors, so I guess it's not printing errors or something.
-
Problem with widget plugin@psychobunny Still isn't working http://puu.sh/7bll8.png
-
Problem with nodebb-plugin-static-page@Luciano-Miranda Because it is a static page. There is no loading bar, the loading bar is the browsers bar. The loading bar is only if you are using ajax.
-
Problem with widget plugin@psychobunny Yup, activated plugin in admin panel and hit the Restart NodeBB button. (also tried forever restart)
-
Problem with widget pluginI have made a widget plugin for my website, and it shows in the plugin list but the widget does not get added to the widget list. Here is the code:
plugin.json:
{ "id": "test", "name": "Test", "description": "Test plugin.", "url": "http://example.com", "library": "./lib/plugin.js", "hooks": [ { "hook": "filter:widgets.getWidgets", "method": "defineWidgets", "callbacked": true }, { "hook": "filter:server.create_routes", "method": "addRoutes", "callbacked": true }, { "hook": "filter:widget.render:status", "method": "renderStatusWidget", "callbacked": true } ] }
lib/plugin.js:
function(module) { "use strict"; var Widget = { templates: {} }; Widget.renderStatusWidget = function(widget, callback) { var html = Widget.templates["status.tpl"]; callback(null, html); }; Widget.defineWidgets = function(widgets, callback) { widgets = widgets.concat([ { widget: "status", name: "Server Status", description: "Minecraft Server Status.", content: Widget.templates["admin/status.tpl"] } ]); callback(null, widgets); }; Widget.addRoutes = function(custom_routes, callback) { var templatesToLoad = [ "status.tpl", "admin/status.tpl" ]; function loadTemplate(template, next) { fs.readFile(path.resolve(__dirname, './templates/' + template), function (err, data) { Widget.templates[template] = data.toString(); next(err); }); } async.each(templatesToLoad, loadTemplate, function(err) { if (err) { throw new Error("Error loading templates: " + err); } callback(err, custom_routes); }); }; module.exports = Widget; }(module));
(code tags are all messed up, so excuse me for the half-formatted code)
(this code is taken from nodebb-widget-essentials and edited)