@Bri Thanks, it's helpful!
Tivon
Posts
-
What's the best practice to make tpl, back-end function work together in plugin? -
What's the best practice to make tpl, back-end function work together in plugin?@psychobunny @baris @yariplus @julian @PitaJ Could you give me some tip or plugin as sample? Thanks a lot!
-
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!
-
possible to let user only see their own posts by default permissions system?Re: Private Posts
@julian
Hi julian, curious for your reply below:
Fairly slim, as it is not in use so there is no incentive to keep it updated. A dedicated forum with stripped down permissions is doable already in core (though you don't get to allow users to reply to their topics only...)I have tried some but didn't make it possible for user to see only their own posts in a forum. Otherwise I have to make a new plugin, but maybe I don't need to reinvent the wheel
-
Help: How to modify the register UI?Hi guys,
Now I start to write my plugin, and I have learned how to hook with "filter:register.build" and add some new input in the hook function, just by:
function(params,callback) {
params.templateData.regFormEntry.push(phoneInput); // phoneInput is some html input elementIt works well, but just add a new input in the "Registration Question" location, and I'd like to modify some about the Email Input, like the tip or check logic. So how can I do this? Thanks!
-
Help: can I add these functions just by develop a Plugin?@PitaJ Thanks! I will learn these plugins from you and hope I can contribute some to the nice ecosystem in future.
-
Help: can I add these functions just by develop a Plugin?Hi guys,
I'm new to NodeBB, I intend to modify the forum for our specific customers, so I'd like to make the new user registering with phone number and real name, also with a unique invitation code. So I guess I need to customize the register page, and add some new field in the database. Please tell me, can these be done just by a new plugin? from what I seen in the doc I feel the answer is not. If I'm wrong, please also give me a plugin example who has completed similar things.
Thanks a lot!