Adding new input field in group mange panel in ACP

Unsolved Plugin Development

Suggested Topics


  • 0 Votes
    3 Posts
    116 Views

    I have tried filter:composer.create and filter:composer.build and both are not firing, the only filter hook that is firing for me is filter:composer.formatting but that does not have the correct data i need (for example the catogory, etc)

    I am using nodebb v3.0

    thx for your help

  • 0 Votes
    3 Posts
    1k Views

    @pichalite thank to your suggest it works I have only topics that aren't "Pin". If I do this:

    0_1470823097376_pinTopic.png

    The topics show in this way:

    0_1470823128648_Schermata del 2016-08-10 11:45:59.png
    In the image I can see that "primo creato " topic that I have PIN it's the last but I want to become the first.

    I want that when I PIN a topic, this must be the first among the topics (now it is the last).

    In plugin.json I put this hook:

    {
    "hook": "filter:category.topics.prepare", "method": "ordina_zero"
    }

    and in library I do this:

    converter.ordina_zero = function(data, callback) { //Prendo quale element del sorted ha cliccato user.getSettings(data['uid'], function(err, settings) { if (settings.categoryTopicSort === 'zero') { data.reverse = false; data.set = 'cid:' + data.cid + ':tids:posts'; } callback(null, data); }); };

    My purpose is show the PIN topic at the beginning and after show the topics with their order. Can you help me?

  • 2 Votes
    18 Posts
    6k Views

    So now, I have questions to the NodeBB development team. @julian

    About @frissdiegurke 's idea.

    What do you think? Is it secure or do you have any better ideas, policies , plans?

    To manage dependencies between plugin,

    Can we enforce to install and activate plugins by dependencies? Or can we give warnings of wrong configurations, dependencies and so on by plugin on admin UI ( dash board? )?

    Do we have secure way to add/remove/modify custom data by plugin in a filtering pipe?

    For example, on filtering hook, data.pluginData.<plugin name> can be always for plugins (means some sure for core will not use it for different reason!! ), whether they are removed or not after filtering. I know if I select good name( random or highly uniq), then it will be quite safe but it will be better if we have an official space.

    If I want to make a npm module which is dedicated to NodeBB while it's not a plugin, then what is good name for. Maybe nodebb-helper-any-name. It may be for individual plugins.

    I had one more, but I forgot what was it while writing.... 🙂

  • 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
    21 Posts
    9k Views

    @pichalite try this 😄

    Dropbox error - 'echo 100000 | sudo tee / proc/sys/fs/inotify/max_user_watches'

    Dropbox gives me an error that mentions echo tee 100000 but then it disappears. How to fix or remove msg?

    favicon

    Ask Ubuntu (askubuntu.com)