Skip to content

Plugin Development

Have a question about building a plugin? Ask here
444 Topics 1.9k Posts
  • A plugin that creates CSS

    10
    0 Votes
    10 Posts
    1k Views
    DownPWD
    arf doesn't work. Possible to update it for last version ? @volanar @julian @psychobunny
  • Storing only hashed email

    Unsolved
    7
    0 Votes
    7 Posts
    969 Views
    Nir SN
    Thanks! I guess I can hook to action:user.email.confirmed for reading the existing email and then replacing it with a hashed version. However, password reset wouldn't work since it wouldn't find the uid for the (non hashed) email address provided (here). We can add a hook for preprocessing the email before looking for the uid, but that won't be enough since later the email is sent according to the email field in the db (i.e. not the email provided by the user when asking to reset). One possible solution is: Add a hook for preprocessing the email used for getting the uid. Pass the provided email in params to emailer.send (here) like it's done for welcome and email verification. And here instead of checking that for the template check if params.email is defined. Does that make sense?
  • Custom email validation

    10
    0 Votes
    10 Posts
    1k Views
    Nir SN
    @baris @baris Thanks guys. It's working well.
  • Unable to load template

    18
    1 Votes
    18 Posts
    2k Views
    gotwfG
    @magnusvhendin Settings->Advanced User Obligatory reading: https://github.com/gorhill/uBlock/wiki/Advanced-user-features Although it still does allow some stuff I'd rather not see, on balance I tend to favor "Medium Mode" : https://github.com/gorhill/uBlock/wiki/Blocking-mode:-medium-mode Once you're "in the advanced user" modes, enable various "noop" rules to season to taste. Speaking of which, you probably also should read up "Dynamic Filtering": https://github.com/gorhill/uBlock/wiki/Dynamic-filtering For those more visual and auditory learners: youtuber link: https://www.youtube.com/watch?v=2lisQQmWQkY Have fun! o/
  • Composer quick search see more results

    3
    0 Votes
    3 Posts
    733 Views
    barisB
    That should work but I added a helper to make this easier. https://github.com/NodeBB/nodebb-plugin-composer-default/commit/7c15eeb85b6d702e0a4a3f6519e03af0208c3342 You can all this from your hook $(document).ready(function() { $(window).on('action:ajaxify.end', function(ev, data) { require(['composer'], function(composer) { composer.minimizeActive(); }); }); });
  • grunt "ad-hoc compilation" for multiple instance installation?

    3
    0 Votes
    3 Posts
    461 Views
    B
    @pitaj It's an issue of preference I guess. I'd like to avoid grunt being a dev tool forcing me to deviate from my integrations needs. If grunt would support multiple instances, it would be great and I'd use it. Else I'd stick with the current big hammer method of always recompiling unconditionally and restarting nodebb afterwards. Accepting the additional penalty of nginx rev proxy streaming timeouts. Not elegant but it works.
  • Plugin development 2021 updated - environment and dev workflow - request

    18
    0 Votes
    18 Posts
    4k Views
    B
    @gotwf said in Plugin development 2021 updated - environment and dev workflow - request: Like all powerful tooling, Emacs doe have its learning curve. But it is free and pretty much does any and everything. .. and even coffee. As does vim with a couple of bundles. This is what I'm used to and also working with on nodebb. It's just that you have to pick one and try it or learn how to do it.
  • Topics - GetSortedTopics Multiple tags and/or

    10
    0 Votes
    10 Posts
    1k Views
    barisB
    @sebastián-cisneros said in Topics - GetSortedTopics Multiple tags and/or: const method = params.sort === 'old' ? 'getSortedSetUnion' : 'getSortedSetRevUnion'; Yeah you can change to this in getTagTids function if you want to get topics with any of the tags passed in.
  • is there a way to get topics sorted by view count?

    2
    0 Votes
    2 Posts
    445 Views
    barisB
    This will be available in 1.18.4 https://github.com/NodeBB/NodeBB/issues/9845
  • Composer default category

    8
    0 Votes
    8 Posts
    1k Views
    Sebastián CisnerosS
    @baris Thanks! I got one more question about the composer, but I will post in a different topic.
  • Composer list of tags available

    4
    0 Votes
    4 Posts
    589 Views
    barisB
    Once you define a list of tags in the category page, it will show a dropdown with them instead of the typebox.
  • Save user input from a form

    6
    0 Votes
    6 Posts
    759 Views
    Yu JinY
    @baris Thanks for your help! It works
  • Bypass category permissions to post topic

    4
    0 Votes
    4 Posts
    794 Views
    B
    @julian unfortunately I will be using the support plugin in the same category because I only want the people to see their own topics and have access to reply to our responses
  • Markdown plugin not working in profile

    8
    0 Votes
    8 Posts
    1k Views
    G
    @julian I have a block with a code in my profile, but the markdown does not work for a block with a code, only for plain text[image: 1628965839492-44d40b8f-0553-4ce2-b67f-7363edb19dc2-image.png]
  • How can I get all posts of topic with getTopic api

    5
    0 Votes
    5 Posts
    994 Views
    蘇泰霖
    @baris thx a lot !!!! it's work finally!
  • Access pid when post's vote increments or decrements

    Solved
    5
    0 Votes
    5 Posts
    971 Views
    M
    @antosik @baris Nice, Thank you all!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
  • How can I display widgets in other templates too?

    Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    Keng HerK
    @dogs Not sure if this is still relevant to you, but I followed your code and was getting the same results. The code wasn't firing despite having a console log in the theme.js file. Then I decided to click on the 'Clone widgets from...' and selected 'Categories'. After that all of the .tpl names showed up in the drop down. After that any changes to the theme.js file are firing as should. Make sure you build and restart. I am using the included GRUNT to make development faster. Cheers!
  • איך אני בונה תוסף?

    1
    0 Votes
    1 Posts
    241 Views
    שמח לעזורש
    איך אני בונה תוסף?
  • [SSO-OAuth-keycloak] Need help troubleshooting

    1
    0 Votes
    1 Posts
    250 Views
    M
    Hi there, I am trying to customize plugin: https://github.com/julianlam/nodebb-plugin-sso-oauth I have made my own: https://github.com/MaxWaldorf/nodebb-plugin-sso-keycloak I know the sso works since I am testing it with other systems like wordpress, etc... But even though I enter the right info in config file, I don't succeed to anything so far... Here is my code in config file: "oauth": { "id": "my_id", "secret": "my_key", "type": "oauth", "name": "nodebb", "scope": "email profile openid", "auth2": "https://<SSO_domain>/auth/realms/Public/protocol/openid-connect/auth", "token2": "https://<SSO_domain>/auth/realms/Public/protocol/openid-connect/token", "user": "https://<SSO_domain>/auth/realms/Public/protocol/openid-connect/userinfo" } The login page shows and I am able to enter my credentials but... After that, I receive an error: Internal Error. /auth/nodebb/callback undefined Am I missing something? I feel I don't understand correctly the scope part... If anyone has an idea, it would be greatly appreciated... Cheers