Skip to content

Plugin Development

Have a question about building a plugin? Ask here
444 Topics 1.9k Posts
  • Parsing posts and markdown plugin with auto-linking

    Unsolved
    17
    0 Votes
    17 Posts
    5k Views
    A
    My YouTube plugin needs updating. But I'm in London tomorrow to Thursday. Then spending alternate weeks in gibraltar. So its hard to find the time.
  • Posts with widgets

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    N
    @psychobunny ok https://github.com/NodeBB/NodeBB/issues/3777
  • Templates preloading

    Solved
    3
    1 Votes
    3 Posts
    2k Views
    P
    templates.render ('tpl/name', {}, function() { // templates.cache['tpl/name'] }); I think so anyways, I'm writing this from my phone
  • Which hook should I use?

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    NivixN
    Thank you @baris! I totally forgot about this. I've included my code for future reference. $(document).on('click', '.my-class', function() { // do stuff });
  • Plugin updates in ACP

    Unsolved
    1
    1 Votes
    1 Posts
    1k Views
    N
    How much time does it take to see updated version (available for upgrade) of the plugin in ACP?
  • Plugins in coffeescript?

    9
    0 Votes
    9 Posts
    4k Views
    NivixN
    Coffeescript might be dead in a few years, but I still love it and feel it has a solid place in the JS community at present. At my work work we converted from using plain Javascript to Typescript for almost a year now, but I still use Coffeescript when bashing out a quick script or test file. I love the syntax..it's very relatable to Python or Ruby. And plus I just love do something if something? syntax. [image: S8QEyc0.jpg]
  • Plugin with CDN hosted script

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    N
    @julian What do you think about an idea to extend .json configuration for plugins, to have something related to external scripts (scripts.external = [])? Also will minifier use external js? So every reboot of forum will give latest version to the user.
  • Notifications with HTML

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    N
    @psychobunny https://github.com/NodeBB/NodeBB/issues/3647
  • Offcanvas sidebar with categories?

    3
    0 Votes
    3 Posts
    1k Views
    lulzdevL
    Awesome. I chose Nodebb for flexibility; become the forum/CMS that I need. Nodebb never ceases to surpass expectations.
  • ACP: Current User

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    barisB
    app.user doesn't work?
  • Adding a button to each post

    4
    0 Votes
    4 Posts
    4k Views
    D
    The loop to add buttons was merged into persona. A similar addition should probably be added to vanilla. I now add buttons in my plugin via hook filter:post.getPosts and in the hook: Plugin.postsBuild = function(params, cb) { var histButton = {action: 'posts/edithistory', icon: 'fa-file-text', html: 'Edit History'}; async.map(params.posts, function(post, next) { if(!post) return next(); if(!!post.tools) { post.tools = []; } post.tools.push(histButton); }); cb(null, params); };
  • Help with SSO plugin (my first plugin)

    6
    0 Votes
    6 Posts
    4k Views
    julianJ
    I'd add some client side code that checks for the cookie existing, and react (redirect) appropriately
  • Way to get req (and maybe res) objects during a widget render?

    9
    0 Votes
    9 Posts
    3k Views
    J
    Cool! Just signed it.
  • angular app plugin

    14
    0 Votes
    14 Posts
    6k Views
    P
    https://github.com/NodeBB/NodeBB/issues Don't forget to add as much information as you can
  • Using highlight.js for code blocks as posts load

    3
    0 Votes
    3 Posts
    2k Views
    drewD
    @baris thanks. I realised there's some issues with redactor munging the data. When code is insered inside a <pre/> block, switching between HTML and WYSIWYG views will munge the content to HTML entitites. You can recreate this issue on this page: http://imperavi.com/redactor/examples/typography/ Switch to code view and add some HTML inside the <pre/> block. I entered: <p>test</p> Switch to WYSIWYG and back to code and it has been replaced by: &lt;p&gt;test&lt;/p&gt; This breaks the ability to parse that code later with syntax highlighters. I've raised it with Imperavi.
  • Override the default reply behaviour

    5
    0 Votes
    5 Posts
    2k Views
    drewD
    @psychobunny issues raised: https://github.com/NodeBB/NodeBB/issues/3468
  • Referencing a template less attribute in a plugin

    3
    0 Votes
    3 Posts
    1k Views
    drewD
    Fixed this by stripping CONTENT STYLES and wrapping the composer in spans for topics, posts, content classes so it inherits.
  • How can I add a script tag to the page from a plugin

    3
    0 Votes
    3 Posts
    2k Views
    P
    Off course, tha'll work! Thanks heaps for that!
  • find objects with wildcard

    Solved
    6
    2 Votes
    6 Posts
    3k Views
    T
    In case someone comes to this thread in the future, here is the solution I came up with: https://github.com/exo-do/nodebb-plugin-reputation-rules/blob/master/ReputationManager.js A main object and 3 sets as I said, nothing complex (in fact working with sets is pretty easy) but a bit confusing. When I save or update the main object I have to also call 3 times db.setAdd() or db.setRemove() depending on vote type (upvote, downvote or undo) but thats all. Thanks again for your help guys
  • nodebb-plugin-embed-videos

    2
    2 Votes
    2 Posts
    3k Views
    ogerlyO
    i have added Dailymotion and Vine https://github.com/ogerly/nodebb-plugin-embed-videos