Access pid when post's vote increments or decrements

Solved Plugin Development

Suggested Topics


  • 0 Votes
    5 Posts
    620 Views

    @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

  • 0 Votes
    1 Posts
    433 Views

    Hello! I was wondering if anyone has a working version of Steam Authentication for NodeBB 1.12.0, I'd like to make that my only form of signup since my forum is for Source games only, the current versions listed (I've tried 3 different ones on the plugins list) and none of them work.

    Thank you!

  • 0 Votes
    4 Posts
    3k Views

    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); };
  • 0 Votes
    3 Posts
    2k Views

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

  • 1 Votes
    9 Posts
    5k Views

    @madwyn said:

    debugging a clustered app

    It actually looks like this was fixed (or made much nicer, anyway) in 0.11:
    https://strongloop.com/strongblog/whats-new-nodejs-v0-12-debugging-clusters/