• HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Get in touch
    Get in touch
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    • Sign in
    • Start free trial
    • Get in touch
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    • Documentation
      • Home
      • Read API
      • Write API
      • Plugin Development
    1. Home
    2. shayan
    3. Posts
    • Profile
    • Following 0
    • Followers 1
    • Topics 4
    • Posts 12
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by shayan

    • RE: Add custom privileges

      Sorry, did not want to be rude.
      Since I had some post asking for help without tagging anyone and did not get any answer, thought tagging appropriate groups helps for more people to see.

      posted in NodeBB Plugins
      shayan
      shayan
    • Add custom privileges

      Hi,
      I want to create some custom privileges in mange/privilege of ACP and use them to add some functionality to specific groups or users.
      Is there any hooks I can use to achieve this?
      @administrators
      @3rd-Party-Developers

      posted in NodeBB Plugins
      shayan
      shayan
    • RE: running interstitial step before creating an user

      also in nodebb-plugin-sso-oauth there is a comment that says nodebb requires email for creating a user, but I have been able to create one with an empty string for email.
      does something goes wrong later if some users don't have an email?
      @Staff

      posted in NodeBB Plugins
      shayan
      shayan
    • running interstitial step before creating an user

      Hi,
      I'm trying to create a sso-oauth plugin for my site. the problem is my forum already has users and I don't want to create a new user for them when they register with this provider, but the OAuth provider does not return an email in user's profile, so I can't check if the request is for a new user or an existing one.
      Now I'm trying to add an interstitial step to get the email from users when they register with my plugin. but I only managed to ask the users their email after creating a new user which is not ideal.
      Is there a way to ask users additional information before creating a user?

      posted in NodeBB Plugins
      shayan
      shayan
    • RE: reference to objects in benchpress

      @pitaj
      -- [email protected]

      posted in Plugin Development
      shayan
      shayan
    • RE: reference to objects in benchpress

      @pitaj I copied exactly my data (after fixing the syntax error before "b"😅) that I wrote here and your code. it did not work.

      posted in Plugin Development
      shayan
      shayan
    • RE: reference to objects in benchpress

      @pitaj
      I want to have a list for every key in people object and populate that list with the names of people I have in array of every key, something like this:
      for a:

      • john
      • dave

      for b:

      • sam
      • eli
      • nicole

      I did not mention that but I also tried using ./name. it also didn't show any names, just an empty bullet.
      the only way I could reference the object was with @value but when I tried to access a value of a specific key (like {@value.name}) it just wrote {[object Object].name} instead of actual value

      posted in Plugin Development
      shayan
      shayan
    • RE: reference to objects in benchpress

      @julian

      (Unless there's some crazy behaviour in benchpress that allows for iterating through objects...)

      there is an example in the documentation (https://github.com/benchpressjs/benchpressjs/blob/master/docs/iteration.md#example-2-1) which has a similar structure to my data but it is kind of vague on how should I Iterate and reference the values if every value of a key like jumpbugger is an array of objects.

      However I would really not recommend naming both nested objects people. That is confusing 🙂

      maybe how I structured the data is not standard but my problem was that the nested objects (like the second and third people key in your structure) has a dynamic key (like a and b) and not a static one (like people which you said) , so I couldn't iterate over it no matter what I did.
      fortunately I can change the structure so tnx😃 .

      posted in Plugin Development
      shayan
      shayan
    • reference to objects in benchpress

      hi
      I'm trying to write a template for a plugin with some data that looks like this:

      const data = {
         people:{
             "a": [
                {name:'john',id:1},
                {name:'dave',id:2}
             ]
             "b": [
                {name:'sam',id:1},
                {name:'eli',id:2},
                {name:'nicole',id:3}
             ]
          }
      }
      res.render('path/template-name', data)
      

      my code in template is something like this:

      {{{ each people}}}
          <div>
              <ul>
                  {{{each people}}}
                  <li>
                      {people.name}
                  </li>
                  {{{end}}}
              </ul>
          </div>
      {{{ end }}}
      

      when I render the template it does create two lists with 2 and 3 items but it doesn't show the names. I tried doing it with @value.name instead of people.name too but it just writes {[object Object].name}.
      can anyone show me what I'm doing wrong?
      @3rd-Party-Developers

      posted in Plugin Development
      shayan
      shayan
    • RE: New in 1.2.0?

      @julian I know this is an old thread but did this feature ever moved to a plugin?
      there seems to be some harmful behavior in chats of some of my forum's users, so I need to give admins, means to monitor the chats if someone is suspicious of doing that.

      posted in General Discussion
      shayan
      shayan
    • RE: mongodb database structure and Queries document

      tnx, quess you are right. now I have to scan the whole source code for any use of database 😢

      posted in NodeBB Development
      shayan
      shayan
    • mongodb database structure and Queries document

      Hi,
      I'm trying to redesign mongodb database for better performance.
      I didn't see a complete document at https://docs.nodebb.org/development/database-structure/ (for example there was no mention of documents for analytics).
      if there is any document or guideline for mongodb queries and/or database design currently used in nodeBB it would speed up the process tremendously, if someone could share it.
      @Community-Representatives
      @administrators

      posted in NodeBB Development
      shayan
      shayan

    Get Started

    • Product
    • Pricing

    Resources

    • Demo Site
    • Answers
    • Docs
    • Bug Bounty

    Company

    • About
    • Blog
    • Contact
    Start Free Trial
    Github Facebook Instagram Twitter
    © 2014 – 2022 NodeBB, Inc. — Made in Canada.
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact
    Menu
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact