Skip to content

Plugin Development

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

    10
    0 Votes
    10 Posts
    879 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
    673 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
    796 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
    482 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(); }); }); });
  • 0 Votes
    3 Posts
    338 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.

  • 0 Votes
    18 Posts
    3k 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.

  • 0 Votes
    10 Posts
    852 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.

  • 0 Votes
    2 Posts
    346 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
    841 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
    435 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
    478 Views
    Yu JinY

    @baris Thanks for your help! It works 🙂

  • Bypass category permissions to post topic

    4
    0 Votes
    4 Posts
    523 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
    823 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 text44d40b8f-0553-4ce2-b67f-7363edb19dc2-image.png

  • 0 Votes
    5 Posts
    748 Views
    蘇泰霖

    @baris
    thx a lot !!!!
    it's work finally!

  • 0 Votes
    5 Posts
    735 Views
    M

    @antosik @baris
    Nice, Thank you all!

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
  • 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
    187 Views
    שמח לעזורש

    איך אני בונה תוסף?

  • Advanced Search Widget

    2
    0 Votes
    2 Posts
    353 Views
    יושב אוהליםי

    @chez said in Advanced Search Widget:

    רוצה לדעת כיצד להוסיף לחלונית החיפוש את האפשרות "חיפוש מתקדם" כפי שיש בסגנון התחמוצת

    You can embed Google search in the forum,
    If you want you can ask me for the code here
    987.JPG