Skip to content

Plugin Development

Have a question about building a plugin? Ask here
424 Topics 1.9k Posts
  • No topics from getCategoryById

    3
    0 Votes
    3 Posts
    1k Views
    WarbleSyncW

    Awesome ty so much 🙂
    I ended up making the call to Categories.getCategoryTopics() but I may switch back to the method you posted above 👍

  • Change metadata to Plugin generated page

    3
    0 Votes
    3 Posts
    1k Views
    G

    @PitaJ Thanks for the answer!
    I don't really know what do you mean by "template base object", do you mean the template file, or the template renderer?

    EDIT:
    Or it's just by doing like data.title = "blabla" before the render?

    Also can I add other metadata to improve the SEO of the page?

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    69 Views
  • 0 Votes
    3 Posts
    2k Views
    marcelo-lopesM

    @pichalite said in Restrict access on /users and /api/users if not logged:

    ACP -> Settings -> Guests

    Thanks @pichalite .
    Actually the guests can access the /users page and /api/users.
    The setting will hide the search fields, but they can see the page anyway and use the pagination to see the users.

    I've finally added this on my routeSetup:

    routeHelpers.setupPageRoute( router, '/users', middleware, [middleware.checkGlobalPrivacySettings, middleware.requireUser], usersController.index);

    and now I get the "Access denied" page that I wanted.

    Thanks for the help.

  • Save Nested Object or Array Into Topic Data

    5
    0 Votes
    5 Posts
    2k Views
    barisB

    Client side you can call ajaxify.refresh() to refresh the page.

  • Users skins

    2
    0 Votes
    2 Posts
    1k Views
    barisB

    You might be able to use config.bootswatchSkin

  • Profile route

    1
    0 Votes
    1 Posts
    942 Views
    A

    I cloned @CCob's OneSignal push notification plugin, which is basically the Pushbullet plugin.
    However, whenenver I try to visit the route to enter my user specific settings a 404 error is returned.
    If you hit F5 to reload the page it will show up, leading me to the conclusion something is wrong with Ajax/the route itself.

    Is there any way to correct this?

  • Recent Cards Not Working After 1.4.4 upgrade?

    7
    0 Votes
    7 Posts
    3k Views
    julianJ

    Thanks all 😄

  • Why is making a theme such a bad experiance?

    3
    0 Votes
    3 Posts
    2k Views
    julianJ

    Sorry to hear that making a theme is difficult for you 😞

    Like @Pitaj says, using grunt to autocompile assets immediately on save is the best way to reduce the time in between changes.

    @psychobunny also has some tips and tricks that may be helpful for you 😄

  • 1 Votes
    5 Posts
    3k Views
    marcelo-lopesM

    ahh nice! Thanks @PitaJ
    I could not find any info on the docs:
    https://docs.nodebb.org/en/latest/plugins/create.html

    will give it a try.

    Thanks

  • 0 Votes
    1 Posts
    1k Views
    B

    Similar to something like <!-- IF !isTopicOrMain --> or <!-- IF !isEditing -->, is there some variable I can check in my .tpl file to see which category or subcategory I'm in?

    I'm building out a custom composer that changes based on where the topic is being posted. For instance, it would know that I'm currently in the "NodeBB Plugins" category and display a particular part of my .tpl file, otherwise it wouldn't.

  • 0 Votes
    1 Posts
    1k Views
    B

    I'm looking to include custom forms on my site so that users can post uniform data for certain categories.

    What would be the best way to tackle this? Would I need to create an entire plugin for a new composer, just make a custom .tpl file, etc.?

    Looking for any suggestions or help! Attached are a few mockups of the form from an older website-

    0_1488395869241_Screen Shot 2017-03-01 at 1.11.29 PM.png
    1_1488395869241_Screen Shot 2017-03-01 at 1.12.33 PM.png

  • 2 Votes
    7 Posts
    3k Views
    jareyJ

    @Tomas-Pavlacky seems that we will have to submit a PR to update those dependencies. Did you managed to make it work?

  • 'Seeing' scoped npm packages

    2
    0 Votes
    2 Posts
    1k Views
    PitaJP

    @smi-jonathan This is something we'd like to support. Please open an issue on Github so we can track it more easily. Thanks

  • Read and write to the database!

    5
    0 Votes
    5 Posts
    3k Views
    G

    @Jenkler IMO the best example is their code!

    You could replicate and modify what in NodeBB are categories as groups (Movie/games/tv show), and what in NodeBB are topics as actual elements (a movie, a tv-series, a game). The best examples of code are their one and you can find them in /src 🙂

    In order to use these things in your plugin, check official plugins code ^^

    In my opinion is the best way to learn 😉

  • Plugin Idea - Movies / Games

    4
    0 Votes
    4 Posts
    3k Views
    JenklerJ

    I Guess it would be better to build a plugin that can handle registration of different types of media (Movies, Games,)

    I Changed back to IMDB open api because FreeBase sucked. Still looking for good input on this.

    @yariplus, any good input on this?

  • This topic is deleted!

    2
    0 Votes
    2 Posts
    24 Views
  • Serverhooks with external platform

    8
    0 Votes
    8 Posts
    2k Views
    julianJ

    Seconding the recommendation to use request. That's the server side equivalent to making an xhr on the client side.

  • Error loading plugin in production mode

    1
    0 Votes
    1 Posts
    1k Views
    G

    Hi guys,
    I used ./nodebb dev to develop my first plugin, everything worked smoothly, but when I activated it in production, the server didn't started at all with this error:

    nodebb[12835]: {"level":"error","message":"[meta/js] Could not compile nodebb.min.js: SyntaxError: Unexpected token: name (bool)","timestamp":"2016-11-22T18:24:25.854Z"} nodebb[12835]: {"message":"SyntaxError: Unexpected token: name (bool)","stack":"Error: SyntaxError: Unexpected token: name (bool)\n at ChildProcess.<anonymous> (/var/nodebb/src/meta/js.js:182:15)\n at emitTwo (events.js:106:13)\n at ChildProcess.emit (events.js:191:7)\n at process.nextTick (internal/child_process.js:744:12)\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\n at process._tickDomainCallback (internal/process/next_tick.js:122:9)","level":"error","timestamp":"2016-11-22T18:24:25.855Z"}

    the point is that on dev it never happened before, what I'm doing wrong?

  • Plugin websocket communication security

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    D

    Again, thank you for the prompt answer!