Meet the dev's Q&A

Moved NodeBB Development
  • We were thinking about this, and we'll do this if there's some significant interest 🙂 If we do it, it'll be about a month-ish from now, just "sign up" by replying here.

    Will be an evening at some point, let's say tentatively the first thursday of next month. To make things interesting we'll offer a very small prize for the best question (most upvotes as usual!) asked during that session.

    I'm looking forward to some very awkward personal questions and flaming + QQ on why we haven't implemented X, Y, or Z feature yet.

  • Assuming it's a time I can make and not elbow deep in child rearing duties I promise to ONLY bring creepy and potentially dangerous personal questions to the table. Let the rest of the villagers crucify you over Feature X.

    Great idea though and it will help you connect with a lot of the fringe audience that may not be here as often as some of the regulars.

    Cross promote yourselves and answer the questions as a Google Hangout session.

  • This idea sounds great. Then if you do a successful reddit AMA (We make the sleekest new forum software around...AMA!), you'll get all the nerds.

  • julianJ julian moved this topic from Announcements on

Suggested Topics


  • 0 Votes
    1 Posts
    2k Views

    I am writing a plugin.

    Can anybody pl. write the code pattern for this requirement of mine...

    When a logged in user enters some data, the backend should do the following in response:

    The user sends the data to the NodeBB backend in the following format:
    { key1: data-value1, key2: data-value2, ... }

    Get the user id of the user and check if the key1, key2, etc. already exists in the Mongo DB (the user's collection/document)

    If yes, overwrite the data

    If not, store the data

    Tell the client that the action has been taken

    Actually, it is quite simple if you're writing an app from the scratch. What I am looking for is the pattern/way the NodeBB is currently handling this scenario and I want to code using the same pattern.

    Thanks

  • Harf & Link Sorunu

    NodeBB Development
    0 Votes
    1 Posts
    841 Views

    Linklerde harf sorunu nasıl çözülebilir?

    ş Ş
    ı İ
    ö Ö
    ü Ü
    ğ Ğ
    ç Ç

    Bu harfler konu başlığı olarak eklendiğinde nasıl çevrilebilir;

    Örneğin;

    ş Ş = s
    ı İ = i

  • 0 Votes
    4 Posts
    2k Views

    Nice way to debug. I am still using console.log() 🙂 I guss my stuff is to simple

  • 0 Votes
    3 Posts
    2k Views

    Those userrs are stored in groups with special names, here are the names assuming the category id is 1.

    cid:1:privileges:find
    cid:1:privileges:read
    cid:1:privileges:topics:create
    cid:1:privileges:topics:reply

    You can get the user ids from these groups by.

    Groups.getMembers('cid:1:privileges:find', 0, -1, callback); This will give you all the user ids that have the find permission for category 1.

    If you want to get their basic info like username picture slug so you can show user icons you can just use Groups.getMemberUsers('cid:1:privileges:find', 0, -1, calllback);

  • 0 Votes
    1 Posts
    2k Views

    Well, I have this issue that I need to do following things:
    1.Mongo Find
    2. Foreach
    3. MongoFind
    4 one more Foreach.

    because of asynchronaus mongo calls it is difficult to get proper result, however process.nextTick should handle this problem and still I have problem:

    function find(dbComm) {

    dbComm.forEach(function (current) { id= parseFloat(current.ID); db.anotherCollection.find({ ID: id}, function (error, result) { result.forEach(function (rank) { if (parseFloat(result.ID) == parseFloat(current.ID)) { rank.rank = 'Some calculations'; } }); }); });

    }

    app.get('/someparams', function (req, res) {

    db.collection.find().sort({ "rank": order }).skip(pagenumber).limit(5, function (err, result) { process.nextTick(function () { find(result, function () { }) }); process.nextTick(function () { res.send(result); }); });

    And on client side I should recive an array where the rank equals 'Some Calculations'
    but unfortunetly it is not...
    However...! If I add setTimeout(function(){}) before res.send(result) (and res.send(result) will be placed inside setTimeout) it actually does work and on client side I recive data with "Some Calculations" but it is just timeout and it fails sometimes and client dont recive "Some Calculations"
    if I put process.nextTick instead of setTimeout it doesnt work and "Some calc..." are not sent.

    Something is beeing done eralier then it should (probably in forEach in find() function)
    and my question is how to deal with it? maybe I should put process.nextTick in different function ?