Yes, the last post on the forum was made 2 days ago. I just created a new post and vuala - it works and also the template is brand new. Looks like the the post statistics somehow was reset after upgrade, this is why it didn't pick up the topics created earlier this week. Thanks for explanation!
What's the best practice to make tpl, back-end function work together in plugin?
-
Hi guys,
What I want is a custom page with some form to submit data to the db. I have learnt quite a few about the plugin system and start with the nodebb-plugin-quickstart, then modify it and make my own custom page visible. But the quickstart's page is for the admin and I guess this is the submit data handling funciton in static/lib/admin.js:
define('admin/plugins/quickstart', ['settings'], function(Settings) { var ACP = {}; ACP.init = function() { Settings.load('quickstart', $('.quickstart-settings')); $('#save').on('click', function() { Settings.save('quickstart', $('.quickstart-settings'), function() { app.alert({ type: 'success', alert_id: 'quickstart-saved', title: 'Settings Saved', message: 'Please reload your NodeBB to apply these settings', clickfn: function() { socket.emit('admin.reload'); } }); }); }); }; return ACP; });
But obviously it's for a ACP page, and I want a form page for all users. So may you tell me how to add the $('#save').on('click', function()... for my form page, and where to write the post function? Thank you very much!
-
@Tivon Hm, maybe the shoutbox plugin could get you pointed in the right direction?