Export user's posts in csv

Unsolved Technical Support

Suggested Topics

  • 0 Votes
    19 Posts

    Thanks, that works perfectly. I'm handling the hook in my custom theme, but this probably needs to be in the https://community.nodebb.org/post/95161 plugin as well (without the importedVotes)

    library.setTopicVotes = async function(hookData) { const topicData = await topics.getTopicFields(hookData.post.tid, ['cid', 'importedVotes']); const importedVotes = topicData.importedVotes || 0 const voteData = await db.getSortedSetRangeByScoreWithScores(`tid:${hookData.post.tid}:posts:votes`, 0, -1, 1, '+inf'); let allvotes = voteData.reduce((acc, cur) => acc + cur.score, 0); allvotes = allvotes + importedVotes await db.sortedSetAdd(`cid:${topicData.cid}:tids:votes`, allvotes, hookData.post.tid) }
  • 0 Votes
    10 Posts

    @julian If you use nodebb's IP blacklist option (I do not), it does make a difference 😀

    But in any case something needs to be defined, there are 2 options:

    Set a trusted proxy otherwise the forum will never know the real IP addresses, the cloudflare address will always appear, and IP addresses are a very useful thing to identify duplicate spam users, for example.
    1.1 Optional - define a transform rule that will verify that the received address is real and not faked by a slightly advanced user

    Add the line I brought, and thus actually refer to CF-Connecting-IP

    I don't see any security advantage for trusted proxy (method 1) over the definition I brought.

  • 0 Votes
    12 Posts

    @pitaj Yes, you are right. And I find that post will be marked as spam if there are too many codes.

  • 0 Votes
    4 Posts

    @PitaJ Worked, thanks 🙂 For some reason I had the idea cd wouldn't work there

  • 0 Votes
    2 Posts


    Just in case anyone else runs into a similar problem, I was looking at the wrong api urls to get what I needed.

    I needed to be getting JSON from the topic data, rather than category or post. Most everything is working now.