Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Andre Mosin
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 18
    • Best 4
    • Groups 0

    Andre Mosin

    @Andre Mosin

    4
    Reputation
    11
    Profile views
    18
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Andre Mosin Follow

    Best posts made by Andre Mosin

    • how to get only current day/week posts of a specific category?

      Hello!

      I am trying to create a custom page that will show only the last 3 posts of the day and another for week of a certain category and if possible sorted by number of votes. I there a way to get that?

      is there a way to query from API something like:

      /api/category/5/ and pass date range and sorted by or this is something I have to work on my script?

      I have tried also:

      /api/popular?cid=5&term=daily

      It seems to get the daily 'popular' posts for category 5 but not sorted by upvotes....

      Thanks!

      Andre

      posted in Technical Support
      Andre Mosin
      Andre Mosin
    • RE: Detecting user with multiple accounts

      @baris I know this is old... but I wanted to write a script to flag users with same IPs.

      SO I can get the IPs going in their info page. Is there anyway I can call API to get that info?

      So i tried with SITE + '/api/user/' + users[0].userslug + '/info'

      but you know only admin can do that.. is there anyway I can give my API call admin access to run that?

      or in MongoDB where is the list of IPs located?

      Thanks!

      posted in Plugin Requests
      Andre Mosin
      Andre Mosin
    • RE: [nodebb-plugin-ns-custom-fields] NS Custom Fields

      @andre-mosin ok... thanks for all the help... I probably will need more help though... lol I think I have all that I need now and I decided to change the route... I was trying to utilize existing plugins but I am having to make so many changes to the existing ones that I decided to start a new one from scratch that will include everything I need. I learned a lot from looking and trying to modify other plugins that I think it makes more sense to write from scratch.

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • RE: Detecting user with multiple accounts

      actually the last question I have a reponse:

      "uid:X:ip"

      posted in Plugin Requests
      Andre Mosin
      Andre Mosin

    Latest posts made by Andre Mosin

    • is there a way to remove all downvotes made so far?

      I decided to increase minimum reputation to a high number before user can downvote because of malicious activities... now I wanted to clean up all the downvotes.. I know I can just remove the users but I would rather not do that right now... I am familiar changes things in DB (mongo)... is there a way to remove all downvotes made so far?

      Thanks!

      posted in Technical Support
      Andre Mosin
      Andre Mosin
    • RE: load client side js library

      @baris Thanks again!

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • load client side js library

      Ok, this might be a popular topic but I am having a hard time to properly load a client javascript library.

      I read about the Requirejs but I couldn't make it work. Can someone point out an example that shows how to do that?

      I am trying to use this one: https://github.com/jackocnr/intl-tel-input

      Example: https://codepen.io/Subversivo58/pen/qpJMjy

      loading the javascript on the template with <script> tags work but not properly...it works fine when I open the url of the route I created but if I load the app and then click on a link pointing to that route it doesn't work. Thanks!

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • RE: how to hide whitelist user field only to owner or admin?

      @baris said in how to hide whitelist user field only to owner or admin?:

      ad the value from db and set it the user is self or admin.

      perfect. Thanks!

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • how to hide whitelist user field only to owner or admin?

      I was able to add user field on user creation by using hook filter:user.create. Now I noticed that the field is not generally available on the profile and to make it available we need to use the filter:user.whitelistFields . Please correct me if I am wrong.

      Now if I add my field to the whitelist I noticed that the field gets exposed to everybody. How can I make this field only available to the owner or admin?

      Thanks!

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • RE: Detecting user with multiple accounts

      actually the last question I have a reponse:

      "uid:X:ip"

      posted in Plugin Requests
      Andre Mosin
      Andre Mosin
    • RE: Detecting user with multiple accounts

      @baris I know this is old... but I wanted to write a script to flag users with same IPs.

      SO I can get the IPs going in their info page. Is there anyway I can call API to get that info?

      So i tried with SITE + '/api/user/' + users[0].userslug + '/info'

      but you know only admin can do that.. is there anyway I can give my API call admin access to run that?

      or in MongoDB where is the list of IPs located?

      Thanks!

      posted in Plugin Requests
      Andre Mosin
      Andre Mosin
    • RE: [nodebb-plugin-ns-custom-fields] NS Custom Fields

      @andre-mosin ok... thanks for all the help... I probably will need more help though... lol I think I have all that I need now and I decided to change the route... I was trying to utilize existing plugins but I am having to make so many changes to the existing ones that I decided to start a new one from scratch that will include everything I need. I learned a lot from looking and trying to modify other plugins that I think it makes more sense to write from scratch.

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • RE: [nodebb-plugin-ns-custom-fields] NS Custom Fields

      @pitaj I was trying to figure that out and I think it is like a sub key in the user object like:

      {
      "_key": "user:1:ns:custom_fields",
      "myField": "test value"
      }

      it doesn't look like a regular field in the user object which is like this:

      {
      "_key": "user:1",
      ....
      "joindate": 1602212738594,
      "lastonline": 1602703044144,
      "status": "online",
      "uid": "1",
      "username": "admin",
      "userslug": "admin",
      ...
      "reputation": 4
      }

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin
    • RE: [nodebb-plugin-ns-custom-fields] NS Custom Fields

      @pitaj said in [nodebb-plugin-ns-custom-fields] NS Custom Fields:

      that field on the user object

      Sorry I am not sure if I understood your question. Using that hook mentioned by Baris I am able to add fields to User object inside of Topic posts, however the values of the fields coming from this ns-custom-fields plugin that are inserted into api/user/$username are not getting loaded. In order to load that I have to basically add an extra hook filter:topics.addPostData and load it from database again.... from what I am understanding that's how it works because the data from the ns-custom-fields plugin is not persistent on the user's object.

      I am getting to understand the hook system and the plugins now and probably what I did has to be done unless there is a better way. I will share my code once I am done. Thanks!

      posted in NodeBB Plugins
      Andre Mosin
      Andre Mosin