Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Aisar G.
    • Profile
    • Following 0
    • Followers 1
    • Topics 7
    • Posts 18
    • Best 3
    • Groups 0

    Aisar G.

    @Aisar G.

    5
    Reputation
    2
    Profile views
    18
    Posts
    1
    Followers
    0
    Following
    Joined Last Online

    Aisar G. Unfollow Follow

    Best posts made by Aisar G.

    • RE: Who is using NodeBB?

      @baris hello Baris, can you please add my forum to this list?

      It´s Decentrade. It´s a place where people can buy and sell commodities using cryptocurrency.

      Thanks for helping me with the problems that I encountered. I hope I can contribute to Nodebb; it can be pushing fixes to the core or creating plugins. I love this project and it´s people.

      posted in General Discussion
      Aisar G.
      Aisar G.
    • Hello, I want to get all the posts from a Topic

      Hello,

      I'm using I wrote this to get all the posts from a Topic...

      const topicData = {
               posts: posts.posts,
               category: topic[0].cid,
               cid: topic[0].cid,
               tid: topic[0].tid,
               mainPid: topic[0].mainPid,
             };
             const topicWithPosts = await Topic.getTopicWithPosts(
               topicData,
               undefined,
               posts.uid
             );
      

      But i'm getting this...

      {
        posts: [],
        category: {
          bgColor: '#fda34b',
          cid: 1,
          class: 'col-md-3 col-xs-6',
          color: '#fff',
          description: 'Announcements regarding our community',
          descriptionParsed: '<p>Announcements regarding our community</p>\n',
          disabled: 0,
          icon: 'fa-bullhorn',
          imageClass: 'cover',
          isSection: 0,
          link: '',
          name: 'Announcements',
          numRecentReplies: 1,
          order: 1,
          parentCid: 0,
          post_count: 30,
          slug: '1/announcements',
          topic_count: 4,
          minTags: 0,
          maxTags: 5,
          totalPostCount: 30,
          totalTopicCount: 4
        },
        cid: 1,
        tid: 6,
        mainPid: 37,
        tags: [],
        tagWhitelist: [],
        minTags: 0,
        maxTags: 5,
        thread_tools: [],
        isFollowing: false,
        isNotFollowing: true,
        isIgnoring: false,
        bookmark: null,
        postSharing: [],
        deleter: null,
        merger: null,
        related: [],
        unreplied: false,
        icons: []
      }
      

      I just want to get all the posts from that topic when a person clics to see the replies from a post. Nodebb gives me the replies from that specific post, but I want to get all the posts from that specific topic.

      You can see that the posts array are empty. For your information, i'm using filter:post.getPosts hook and
      const topic = await Topic.getTopicsByTids([posts.posts[0].tid], posts.uid) method before the Topic.getTopicWithPosts() method to get the topic info I needed to pass in.

      Thanks.

      posted in Plugin Development
      Aisar G.
      Aisar G.
    • RE: Whats the best way to hide the votes column?

      @taloche thank you 🙂

      posted in Technical Support
      Aisar G.
      Aisar G.

    Latest posts made by Aisar G.

    • RE: It's there a way to pass data between two plugin hook methods without using global variables?

      @pitaj Hello,

      I wan't to get all the posts from a topic when I enter the topic, that's why I'm using 'filter:post.getPosts' filter to push the posts to getPosts method.

      In the getPosts method, I filter the posts that I want the user to see: their own posts and the posts that other people reply him. So, let's say that I ended up with 4 posts from the original 10 posts.

      I can just use that data, but the "X Reply" counter in the posts is determinated by the 'filter:topics.getPostReplies' filter, so I need to filter the replies too. So I need to first get all the replies, and then filter them. I'm going to get all the replies with that hook using getReplies method.

      I want to pass the data returned by getPosts method to the getReplies method. That way I can using the posts I want to show to filter all the replies. The problem is that, If I invoke the getReplies method, the posts data that I pass, will be override with the replies that the hook pass it.

      I'm running out of ideas, like using getPostsByPids inside getReplies, but that way it gets to an infinite loop in the console, because i'm using filter:post.getPosts hook to filter the posts.

      The solution I found is passing the filtered posts to a global variable, an then using that variable in getReplies to filter the replies; but I think it can give memory leak problems.

      Thanks for helping me.

      posted in NodeBB Plugins
      Aisar G.
      Aisar G.
    • It's there a way to pass data between two plugin hook methods without using global variables?

      I want to pass the return data from plugin.getPosts to plugin.getReplies, and both methods are hooks: that means both are receiving data from the hooks, so I can't just invoke the methods because the data received from the method overrides.

      I just want to filter some posts in getPosts method that I recieve from 'filter:post.getPosts' hook, and then pass the filtered data to getReplies method; this method is a hook too (filter:topics.getPostReplies); I want to do this because I want to compare the two data and return the result.

      I just can solve the problem creating a global variable and assing the filtered data from getPosts to it, and then use the data in getReplies, but I don't think its the optimal way.

      Thanks.

      posted in NodeBB Plugins
      Aisar G.
      Aisar G.
    • RE: Who is using NodeBB?

      @baris hello Baris, can you please add my forum to this list?

      It´s Decentrade. It´s a place where people can buy and sell commodities using cryptocurrency.

      Thanks for helping me with the problems that I encountered. I hope I can contribute to Nodebb; it can be pushing fixes to the core or creating plugins. I love this project and it´s people.

      posted in General Discussion
      Aisar G.
      Aisar G.
    • RE: I want my homepage to have a different Title Layout than the rest of the forum

      @baris I just tested it changing the code manually and it worked perfectly; but I want to upgrade the branch changing to master.

      I'm in the 1.15.x branch. If I want to change the branch to master, I need to do...

      $ git fetch
      $ git checkout master
      $ git merge origin/master
      

      Right?

      I just did the following commands for upgrading my 1.15.x branch, and it worked fine; but the change you did is ahead of 1.15.x.

      $ git fetch
      $ git reset --hard origin/v1.15.x
      
      posted in Technical Support
      Aisar G.
      Aisar G.
    • RE: I want my homepage to have a different Title Layout than the rest of the forum

      @baris Yeah, I prefer to write a plugin; i'm making a plugin using 'filter:middleware.renderHeader' hook for changing the title in the first loading of the web, so I just will change the client side too.

      Thanks.

      posted in Technical Support
      Aisar G.
      Aisar G.
    • RE: I want my homepage to have a different Title Layout than the rest of the forum

      @baris

      Thanks for the help 🙂

      So, I need to make the same change that you did in the source code, and use that client side plugin?

      Where should I add that client side plugin? In the javascript section on the panel admin?

      Thanks.

      posted in Technical Support
      Aisar G.
      Aisar G.
    • RE: I want my homepage to have a different Title Layout than the rest of the forum

      @baris Hello, baris; thanks for the help.

      I'm testing this hook and it only fires up when I enter the web from the url. If i'm moving on the site, and clic the logo to go back home, the plugin doesnt fire up. That means that the title doesn't change. I hope that make sense to you.

      Theres a way to fix this?

      Thanks.

      posted in Technical Support
      Aisar G.
      Aisar G.
    • I want my homepage to have a different Title Layout than the rest of the forum

      Hello,

      Like the title says, I want that my homepage to have a different Title Layout than the rest of my forum.

      I want my title homepage to be...

      {browserTitle} | {pageTitle} => Decentrade | Buy and sell products and commodities with crypto
      

      And my other pages to be...

      {pageTitle} | {browserTitle} => Create an account | Decentrade
      

      Right now I have the last example to all of my site, and my homepage says...

      Buy and sell products and commodities with crypto | Decentrade
      

      That's because my Settings > Home Page is set to 'Buy and sell products and commodities with crypto', and my {browserTitle} is Decentrade. I set that way because I want my pagetitle to be first, and my browserTitle to be second, but In my homepage I want the inverse of that.

      I can do it creating a plugin? What hook should I use?

      Thanks.

      posted in Technical Support
      Aisar G.
      Aisar G.
    • RE: Hello, I want to get all the posts from a Topic

      @baris Thanks. It worked 🙂

      posted in Plugin Development
      Aisar G.
      Aisar G.
    • Hello, I want to get all the posts from a Topic

      Hello,

      I'm using I wrote this to get all the posts from a Topic...

      const topicData = {
               posts: posts.posts,
               category: topic[0].cid,
               cid: topic[0].cid,
               tid: topic[0].tid,
               mainPid: topic[0].mainPid,
             };
             const topicWithPosts = await Topic.getTopicWithPosts(
               topicData,
               undefined,
               posts.uid
             );
      

      But i'm getting this...

      {
        posts: [],
        category: {
          bgColor: '#fda34b',
          cid: 1,
          class: 'col-md-3 col-xs-6',
          color: '#fff',
          description: 'Announcements regarding our community',
          descriptionParsed: '<p>Announcements regarding our community</p>\n',
          disabled: 0,
          icon: 'fa-bullhorn',
          imageClass: 'cover',
          isSection: 0,
          link: '',
          name: 'Announcements',
          numRecentReplies: 1,
          order: 1,
          parentCid: 0,
          post_count: 30,
          slug: '1/announcements',
          topic_count: 4,
          minTags: 0,
          maxTags: 5,
          totalPostCount: 30,
          totalTopicCount: 4
        },
        cid: 1,
        tid: 6,
        mainPid: 37,
        tags: [],
        tagWhitelist: [],
        minTags: 0,
        maxTags: 5,
        thread_tools: [],
        isFollowing: false,
        isNotFollowing: true,
        isIgnoring: false,
        bookmark: null,
        postSharing: [],
        deleter: null,
        merger: null,
        related: [],
        unreplied: false,
        icons: []
      }
      

      I just want to get all the posts from that topic when a person clics to see the replies from a post. Nodebb gives me the replies from that specific post, but I want to get all the posts from that specific topic.

      You can see that the posts array are empty. For your information, i'm using filter:post.getPosts hook and
      const topic = await Topic.getTopicsByTids([posts.posts[0].tid], posts.uid) method before the Topic.getTopicWithPosts() method to get the topic info I needed to pass in.

      Thanks.

      posted in Plugin Development
      Aisar G.
      Aisar G.