Find and Modify a Single Topic Based on uid and Custom Field in my Plugin

Unsolved Plugin Development
  • Hello,

    First of all, absolutley love nodebb! Keep up the amazingly good work. With that said I am a little stuck.

    I am working on a plugin that can (will) process a stripe payment for each new post. I have created an end-point hook for stripe to let me know when payment transactions have been completed. The problem that I have is I can't figure out how to find a topic based on uid and a custom session ID that I was successfully able to attach to every new topic. Once I can identify the topic I would like to mark it as paid by updating a custom field. Any ideas?

    I have looked into src/topics but I can't seem to figure out how to use any of the functions for what I am trying to do. I might be missing something a little bit more fundamental here.

    Thank you in advance!


  • Hi @avan-sardar, welcome!

    find a topic based on uid and a custom session ID

    Is this a requirement? If your plugin is listening for something like, then you can process the stripe payment.

    The action hook itself also sends the post data, which contains the pid and tid. Without more context, I am afraid I will not be able to help further.

Suggested Topics

  • 0 Votes
    8 Posts

    @baris this is work! 👍 Thank you!


  • 4 Votes
    7 Posts

    Very good. test ASAP 😉

  • 0 Votes
    1 Posts

    I have begun work on a custom email plugin, and while looking at some others that are available to see how they went about things I noticed that all of the available plugins (at least that I have found so far) already have an entry in the email setup list, regardless of if you have downloaded the associated plugin for that service (ex. Sendgrid, Mailgun, etc).

    So my questions is, if I have a custom email plugin, how exactly would I go about making it selectable / usable by the forum? Does it need to be present in the default email list? Is there a way to have my plugin inject itself into that list of providers or is there a way to override that list so that the forum knows not to use the credentials and settings in there, but instead use the ones in the plugin?

    The only real switch I have found is the "Use an external email server to send emails", which I would imagine that if it is turned off, that would not be much help either.

    If anyone has any insight on how the system works in regards to this and can point me in the right direction, I would appreciate it!


  • 0 Votes
    1 Posts

    I'm looking to include custom forms on my site so that users can post uniform data for certain categories.

    What would be the best way to tackle this? Would I need to create an entire plugin for a new composer, just make a custom .tpl file, etc.?

    Looking for any suggestions or help! Attached are a few mockups of the form from an older website-

    0_1488395869241_Screen Shot 2017-03-01 at 1.11.29 PM.png
    1_1488395869241_Screen Shot 2017-03-01 at 1.12.33 PM.png

  • 0 Votes
    17 Posts

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