• HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Get in touch
    Get in touch
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    • Sign in
    • Start free trial
    • Get in touch
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    • Documentation
      • Home
      • Read API
      • Write API
      • Plugin Development
    1. Home
    2. Tags
    3. plugin
    Log in to post
    • All categories
    • R

      Plugin for Videos
      NodeBB Plugins • plugin • • Ronny

      5
      0
      Votes
      5
      Posts
      182
      Views

      crazycells

      @ronny good to hear that 👍

      I was going to suggest iframely plugin if this did not work.

      https://github.com/NodeBB-Community/nodebb-plugin-iframely

    • Sebastián Cisneros

      custom plugin with custom POST url
      Plugin Development • post api plugin • • Sebastián Cisneros

      2
      0
      Votes
      2
      Posts
      134
      Views

      julian

      @sebastián-cisneros In static:api.routes, you'll want to call controllerHelpers.setupAPIRoute to mount the route to the appropriate /api/v3/plugins mount point.

      You can see an example of how we do it in the quickstart plugin

    • baris

      [nodebb-plugin-glossary] Glossary Plugin for NodeBB
      NodeBB Plugins • plugin glossary • • <baris>

      53
      7
      Votes
      53
      Posts
      716
      Views

      volanar

      @crazycells said in [nodebb-plugin-glossary] Glossary Plugin for NodeBB:

      @volanar said in [nodebb-plugin-glossary] Glossary Plugin for NodeBB:

      @baris can you change the code so that the plugin doesn't look for keywords in the url?

      I think it is not checking URLs.

      No
      glossary.png

    • Sebastián Cisneros

      how can I check if a user is querying this through API and with a valid bearer token?
      Plugin Development • token plugin bearer token api • • Sebastián Cisneros

      9
      0
      Votes
      9
      Posts
      253
      Views

      Sebastián Cisneros

      @julian I will give it a try, Thanks so much.

    • MehrazarDev

      Solved Access pid when post's vote increments or decrements
      Plugin Development • plugin hook • • MehrazarDev

      5
      0
      Votes
      5
      Posts
      227
      Views

      MehrazarDev

      @antosik @baris
      Nice, Thank you all!

    • G

      what is the name of the webhook when loading a profile?
      NodeBB Development • plugin • • GameStep

      2
      0
      Votes
      2
      Posts
      113
      Views

      baris

      A hook is fired when that page is loaded it is filter:account/profile.build

    • E

      Calendar Plugin/API?
      General Discussion • plugin calendar • • Esha

      3
      0
      Votes
      3
      Posts
      176
      Views

      dunlix

      @esha search in ACP plugins for nodebb-plugin-calendar

    • M

      Parent theme hooks in child theme
      Plugin Development • theme plugin.json plugin themes beginner • • Max 0

      2
      0
      Votes
      2
      Posts
      193
      Views

      M

      After some more code digging and experiments I can answer my own question. A theme is a normal plugin and as such does not inherit any behavior from other plugins.
      So you need to copy everything you need from the base theme library.js to your child theme. And of course, you need to declare client scripts explicitly.
      Loading of missing templates from base theme is the only link between the base and the child theme.

    • baris

      How to write hooks
      Tutorials • plugin development hooks 1.17.0 • • <baris>

      3
      5
      Votes
      3
      Posts
      361
      Views

      baris

      The hooks module has the same functionality as $(window).on() but it also allows having async filter hooks client side which was not possible with $(window).trigger/on

    • Varun Ganesh D

      On v1.17 carousal slider issue
      Technical Support • carousel slider homepage plugin • • Varun Ganesh D

      3
      0
      Votes
      3
      Posts
      202
      Views

      Varun Ganesh D

      @dogs thank you
      Issue resolved

    • phenomlab

      How to make custom JS persist
      Technical Support • javascript plugin spa scrolling • • phenomlab

      5
      0
      Votes
      5
      Posts
      257
      Views

      phenomlab

      @dogs this worked a treat - thanks. For anyone else who might be looking for something similar, here's a simple scroll to top function that you can place into your Custom JS

      // Scroll to top button $(window).on('action:ajaxify.end', function(data) { var btn = $('#btt'); $(window).scroll(function() { if ($(window).scrollTop() > 300) { btn.addClass('show'); } else { btn.removeClass('show'); } }); btn.on('click', function(e) { e.preventDefault(); $('html, body').animate({scrollTop:0}, '300'); }); })

      Then place this into your Custom Header

      <a id="btt"><i class="fas fa-chevron-up"></i></a>

      Obviously, you would need to provide some CSS to style this. An example of this can be found on https://phenomlab.com

    • יצחק מרדכי טאבאק

      iframely plugin doesn't work...
      Technical Support • plugin • • יצחק מרדכי טאבאק

      17
      1
      Votes
      17
      Posts
      546
      Views

      phenomlab

      Hi All,

      As much as I dislike cross posting, can anyone help with this ?
      https://community.nodebb.org/topic/16231/iframely-help

    • dogs

      [Tutorial] How to add custom data to a post > serverside > in a nutshell
      Plugin Development • data nodebb plugin template tutorial • • dogs

      1
      0
      Votes
      1
      Posts
      228
      Views

      dogs

      This is just a little snippet.

      This is about the question How can I add custom data to a post? a small tutorial

      How to add custom data permanently to a post It will be saved into the object:

      You need the following hook:

      { "hook": "filter:post.create", "method": "postCreate" }

      This hook is fired, when a Post is created. So it contains RAW Data.

      A filter:hook like "hook": "filter:post.create" can be edited before beeing proceeded.

      plugin.postCreate = function(data, callback){ // Edit data here callback(null, data); }

      You can access all Data you can work with via the data object.

      All those filter-hooks needs callbacks. The callback contains the modified / added / removed data.

      Whats inside the data object?

      The data object contains two main objects.

      this.post this.data post: { pid: 259, uid: 2, tid: 111, content: '### This is just a little snippet.', timestamp: 1617150411838 }, data: { uuid: '7277s31-6d23-43sa-1284-ad27e42yx879', title: 'How to add custom data to post serverside - in a nutshell', content: '### This is just a little snippet.', thumb: '', cid: '2', tags: [], uid: 2, req: { [...] }, timestamp: 1617150411838, fromQueue: false, tid: 111, ip: '111.123.2123.21', isMain: true } }

      With all the data you can work with. But only this.post is directly effected (lol) to the post Object.
      If you add data here. It will be attached to the post forever and you can access it any time. Even after plugin disable.

      So now add custom data:

      plugin.postCreate = function(data, callback){ // adds data **PERMANENT** to post // before any other procession -> RAW DATA (markdown) //data.post.myData = "directly effected to post you can work with it in next step"; //data.data.myData = "other data for other things I don't know"; var myData = {}; myData.name = "Schmock"; myData.signature = "raz0rn"; // Stick myData to post object data.post.myData = myData; // Debug? // console.log("POST CREATE", data); // finish the process() - passes on modified data callback(null, data); }

      So myData has added to post:

      post: { pid: 259, uid: 2, tid: 111, content: '### This is just a little snippet.', timestamp: 1617150411838, myData: { name = "Schmock", signature = "raz0rn", } }

      The data is stored. Everybody is happy.

      dance minions

      How to add dynamic data before render a post in template It wont be saved to the object. You can use this for dynamic things or logic before rendering the page.:

      You need the following hook:

      { "hook": "filter:topics.addPostData", "method": "addPostData" }

      This hook is fired before engine renders the template.
      It also needs a callback because its a filter-hook.

      plugin.addPostData = function(data, callback){ // modify data temporarily before it gets passed on to next step callback(null, data); }

      Same thing as above. Only the hook is different. And the data we are changing is temporarily.
      Data contains all data we can use for the dynamicness lol: .

      plugin.addPostData = function(data, callback){ // You can work with pre-parsed and already saved data .... // or put in something very flexible without saving to db like jquery-like dynamic etc etc // Debug? // console.log("addPostData?", data) var _posts = data.posts; _posts.forEach(function(post){ if(post.myData){ // add data to post if "myData" is there post.content = "THIS POST HAS MY OWN DATA -> CONTENT IS OVERWRITTEN"; } // this here affects all posts post.user.signature = "Ihr seid alle Schmocks!"; }); // Overwrite data and pass modified data on to the template engine data.posts = _posts; callback(null, data); }

      Now you can work with posts like a boss.

      Bildschirmfoto 2021-03-31 um 03.10.32.png

      dab

      Thanks and bye

      Important Note:

      Remind, that myData is available via API.

      https://nodebb.development.fail/api/topic/114/new-post

      returns your added data

      "content": "THIS POST AS MY OWN DATA -> CONTENT IS OVERWRITTEN", "myData": { "name": "Schmock", "signature": "raz0rn" }
    • dogs

      Solved Is there a equivalent to 'req.session.returnTo' clientside?
      Plugin Development • nodebb plugin redirect • • dogs

      5
      0
      Votes
      5
      Posts
      278
      Views

      dogs

      @pitaj Nice that was easy! Thank you 🙂

    • E

      Unsolved Inserting additional template data into composer template
      Plugin Development • composer custom plugin development • • erichbb

      5
      0
      Votes
      5
      Posts
      219
      Views

      E

      @dogs Thanks.
      Can you point me to some materials explaining how the frontend and hooks interact?
      I don't complete follows their discussion on data.submittedData and is still confused about which variable is the post data stored in and which hooks are involved when it is passed around.

      Edit:
      Also found this, maybe relevant
      Difference between templateValues and templateData

    • dogs

      Solved Custom route in plugin drops 404 error on not defined client script
      Plugin Development • custom nodebb plugin route • • dogs

      18
      0
      Votes
      18
      Posts
      351
      Views

      baris

      Yes you can use them inside the AMD module but keep in mind once you add an event listener on the window object it will be called everytime there is an action:ajaxify.end. If you don't want it triggered after you leave that page you need to turn it off with $(window).off('eventName', myMethod)

    • P

      Unable to install plugin
      NodeBB Plugins • plugin plugin issue • • Piyush

      2
      0
      Votes
      2
      Posts
      188
      Views

      dunlix

      @piyush try installing with npm after opening a terminal in your nodebb folder.

      npm install nodebb-plugin-whitelist-email-domains

      then go to plugin page and activate it, rebuild and restart.

    • dogs

      Unsolved How can I display widgets in other templates too?
      Plugin Development • development nodebb plugin widgets • • dogs

      11
      0
      Votes
      11
      Posts
      318
      Views

      Keng Her

      @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!

    • dogs

      Short & Quick: Rendered STL-Model Viewer inside Topics - in under 2 minutes
      Tutorials • model nodebb plugin • • dogs

      3
      2
      Votes
      3
      Posts
      272
      Views

      dogs

      @aleksei I read your topic: https://community.nodebb.org/topic/15252/execute-custom-js-on-infinite-scroll and saw you're dealing with C4D-Files. 😄

    • dogs

      [nodebb-plugin-makesmart-gallery] - Image Slider for topics
      NodeBB Plugins • gallery images plugin • • dogs

      6
      10
      Votes
      6
      Posts
      584
      Views

      Spin0us

      @dogs thank for this plugin 👍
      Here is the way i installed it :

      npm install git+https://github.com/me-cooper/nodebb-plugin-makesmart-gallery.git

      Hope this help.

    Get Started

    • Product
    • Pricing

    Resources

    • Demo Site
    • Answers
    • Docs
    • Bug Bounty

    Company

    • About
    • Blog
    • Contact
    Start Free Trial
    Github Facebook Instagram Twitter
    © 2014 – 2022 NodeBB, Inc. — Made in Canada.
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact
    Menu
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact