Skip to content

Plugin Development

Have a question about building a plugin? Ask here
424 Topics 1.9k Posts
  • 0 Votes
    1 Posts
    314 Views
    MostHatedM

    Hello,
    I have begun work on a custom email plugin, and while looking at some others that are available to see how they went about things I noticed that all of the available plugins (at least that I have found so far) already have an entry in the email setup list, regardless of if you have downloaded the associated plugin for that service (ex. Sendgrid, Mailgun, etc).

    So my questions is, if I have a custom email plugin, how exactly would I go about making it selectable / usable by the forum? Does it need to be present in the default email list? Is there a way to have my plugin inject itself into that list of providers or is there a way to override that list so that the forum knows not to use the credentials and settings in there, but instead use the ones in the plugin?

    The only real switch I have found is the "Use an external email server to send emails", which I would imagine that if it is turned off, that would not be much help either.

    If anyone has any insight on how the system works in regards to this and can point me in the right direction, I would appreciate it!

    Thanks,
    -MH

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    10 Views
  • Custom plugin

    3
    0 Votes
    3 Posts
    595 Views
    S

    Do i need to run the link commands?

  • 1 Votes
    4 Posts
    460 Views
    bubundas17B

    And also if you guys want more third-party developers to make plugins for nodebb, you should write the development docs properly that other developers can contribute. I had a hard time in figuring out the things while writing my first plugin for nodebb.

  • Write to flag note from plugin

    1
    0 Votes
    1 Posts
    243 Views
    M

    What is the best way to write to the notes field of a flag? I am writing a plugin that when a post/user is flagged it will send the information to a ticketing system and return a ticket id. I want to write that ID to the flag and close the flag.

  • 0 Votes
    6 Posts
    830 Views
    jtsimoesJ

    I can tell u what runFunction() is, I just simplified it for a better understanding.
    Because what I just to replace is this condition if( $.inArray( parseInt(ajaxify.data.cid, 10) , CategoriesIds) != -1) instead of going search if the current category is on the array CategoriesIds above (hardcoded), I need to check if the current category is on the selection made by the user on the plugin config page.

    And I'm not realizing how I make that connection between the plugin settings and the function.

    I don't know if I'm making sense to you, but here is the repository with all the code: https://github.com/jtsimoes/nodebb-plugin-nsfw

  • Function ovverride

    4
    0 Votes
    4 Posts
    427 Views
    S

    @Nerus-Kowalski said in Function ovverride:

    But first, is any way to override common functions to register and login?

    Sure is. NTG (which is where I work) has done this commercially for customers. Overriding the existing authentication system is pretty straightforward.

    However, Steam uses OAuth and there is already a plugin framework specifically for OAuth providers.

    Moreso, there is already a Steam integration plugin AFAIK so all you have to do is install the existing plugin and voila, done.

    So to answer the question you asked, yes, companies like us do this and it's not expensive work. But to answer the question you meant to ask, this should already be done for you and you just have to install the plugin.

    Screenshot from 2019-01-26 09-45-06.png

  • Profile item visibility vs access right

    7
    0 Votes
    7 Posts
    550 Views
    PitaJP

    Look in ajaxify.data on the profile page, that should mirror res.locals

  • Jquery datepicker

    9
    0 Votes
    9 Posts
    677 Views
    D

    @baris Didn't work. I will use type="date".
    Thanks.

  • Instance of default composer editor

    1
    0 Votes
    1 Posts
    240 Views
    maelM

    Yo guys, i would want to create a plugin to upload especific file extensions at home page with a form, tho this form will have several inputs to upload the file, thumbnails but i also want to place a textarea with formatting text like the nodebb default composer. So you guys know if is it possible to create a new instance independent of the form for new topics using default composer? or i need to develep a new entire one for this purpose? Please guide me in the right way 😞

  • Custom file uploader

    1
    0 Votes
    1 Posts
    313 Views
    maelM

    Hey guys? im newbie on node so i want to make a custom file uploader button to upload for example ".pdf" extensions at the main page not into replies/topics. you guys know if there are any guide o plugin than i take as guide?, second question is if i able to do this just with the nodebb core or its not possible and i need to use dependencies? Thanks in advance 🙂

  • Recent Cards

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    N

    Sorry to activate this old post. But I need to exclude few categories from Recent Cards. How is this possible?

    Thank you!

  • 0 Votes
    1 Posts
    243 Views
    Huỳnh Phúc HuyH

    I have setup nodebb successfully with plugin mardown installed but the problem is when I redirect to this url (https://vgolang.com/topic/10/test-code) from the topic list in homepage, the highlighter work fine.

    But when I reload the page, the code highlighter has gone with no error in console. Could someone help me check this?, thanks so much!

  • 0 Votes
    2 Posts
    359 Views
    T

    Hello, I really like this plugin: https://github.com/adlerosn/nodebb-plugin-groups-autoassigncategory

    But I really need following changes:

    1. An update (and test!) of all dependencies and changes like:

    [recommended in warning logs] var db = require.main.require("./src/database") [current, deprecated version] var db = module.parent.require('./database');

    2. Setup permissions like this (or give an option in the admin panel):

    Guests, Spiders, Registered Users: No permissions at all (not even read or see)

    Group members: All permissions except "see deleted posts", "permanently delete" and "moderate" (I hope I got the translations right, it's the last three checkboxes).

    My Forum with a lot of users will require this and I'd really appreciate it.

  • 0 Votes
    2 Posts
    458 Views
    G

    This will prevent users without the proper group membership from accessing the category and downloading the file. It will also ensure that the download can only happen from my site. In this way, if a user's membership status is changed, then he wouldn't be able to access the file by accessing the S3 object url.

    0_1542389062982_fc114844-9564-46f8-81b7-d17f7609c991-image.png

  • 1 Votes
    10 Posts
    2k Views
    G

    @PitaJ I just started with VS Code, thanks for the motivation to try something new.

  • 0 Votes
    3 Posts
    691 Views
    Vamsi KrishnaV

    @PitaJ I see. Tks for the update. Do you have this in your roadmap?

  • Using exposed API in templates.

    6
    1 Votes
    6 Posts
    733 Views
    PitaJP

    BTW there's a new syntax:

    {{{ each sso }}} {./name} -> {./url} {{{ end }}}
  • custom post data show in editor

    Solved
    4
    0 Votes
    4 Posts
    830 Views
    am1cableA

    excellent! thank you very much

  • static:app.load

    3
    0 Votes
    3 Posts
    825 Views
    JenklerJ

    @baris said in static:app.load:

    console.log(require('./package.json').version);

    Nice solution man 😉 Thanks . Still trying to get a grip of this 😛