Plugin Development
  • #1

    I'm trying to modify the shoutbox plugin a bit, so I can style own shouts differently. Therefore, I need the current users UID, so I can do something like

    if  (shout.fromuid === app.uid) {
      // add custom class in template

    Now I tried different variables which I saw at other points in the code (app.uid) or work in the developer console (app.user.uid) But they are both undefined.

    Any hints on how to get the UID?

    Disclaimer: I'm a noob with JS. But I learn, so bare with me 😄

  • NodeBB

    Client side app.user.uid should be defined. Where are you trying to call it?

  • #3

    Inside of the client script... Anyway, I just restarted NodeBB and tried it again, it works fine now 🙂 Thank you!

Suggested Topics

| | | |