• 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. yeelan0319
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 13
    • Best 2
    • Controversial 0
    • Groups 1

    yeelan0319

    @yeelan0319

    2
    Reputation
    557
    Profile views
    13
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    yeelan0319 Unfollow Follow
    GNU/Linux

    Best posts made by yeelan0319

    • How to use plugin-custom-homepage??

      Hi all,

      I wonder if anyone has previously used nodebb-plugin-custom-homepage before?

      It is not working somehow and I looked into the implementing logic for it. It re-route the / to a new rendering logic defined within the plugin called renderHomepage and in that function it called res.render('homepage', {}).

      As far as I see, it does put the template file under public/template folder. However, {widgets.html} seems not getting the corresponding value and somehow all the widget element was attached a class called 'hidden', which I guess is because it doesn't get the widget value?

      For one more thing I would also willing to know is how does the single page application logic wired up? Because this plugin does override the initial HTTP request. However, if you click the logo later on, it still does the default action, which render the forum and ruin the purpose for the plugin.

      I really appreciate if someone can help me with it.

      PS: By the way, the original plugin does a little bug, so you need to change app.get('/', params.middleware.buildHeader, renderHomepage); to app.route('/').get(params.middleware.buildHeader, renderHomepage);. Because express will take the action as soon as it find out a matching route and stop further search for the following route. As we are trying to override the original action, I use route to get the original object and re-route it for the new action.

      posted in General Discussion
      yeelan0319
      yeelan0319
    • RE: Custom profile fields

      @Ted & @esiao

      I wonder if you may share some experience on it? I am working on a similar thing but haven't get a clear clue how this could be done. Thanks!

      posted in Feature Requests
      yeelan0319
      yeelan0319

    Latest posts made by yeelan0319

    • RE: Custom profile fields

      @Ted & @esiao

      I wonder if you may share some experience on it? I am working on a similar thing but haven't get a clear clue how this could be done. Thanks!

      posted in Feature Requests
      yeelan0319
      yeelan0319
    • RE: Cannot get through setup with Mongo

      @julian Thanks, I will pull and merge the latest master now. Thanks for the quick response😆

      posted in Bug Reports
      yeelan0319
      yeelan0319
    • Want to customize composer and really need your advice

      I am planning writing a plugin that can customize the composer due to our applications need.

      The thing I am trying to do is splitting the main composer to two parts: content and reference and store them separately for search purpose, since our forum is related to some research topics so we need to make sure that users are aware that they need to fill that part.

      I really appreciate if anyone familiar with the composer may tell me which module might be affected in this case, especially I really care much about the modules related to search functionality. It is kind of complicate since this is the core functionality of nodebb and there are so many related modules. I am still digging around the code to see how things got wired up and hopefully I can get some helps from you.

      If I am not on the right track or you may have some better ideas around this topic, just feel free to tell me. Thanks so much!

      posted in NodeBB Plugins
      yeelan0319
      yeelan0319
    • RE: Cannot get through setup with Mongo

      Thanks @baris & @TomFrost . I encountered exactly the same problem and this is greatly helpful. 😄

      posted in Bug Reports
      yeelan0319
      yeelan0319
    • RE: Webhooks before search result render filter:search.render

      @baris Great hint acutally!

      I traced down to the hook.js and see how things got wired up.

      So it happens when I called plugins.fireHook('filter:search.render', params, callback), where callback as I posted in the first place only takes one parameter results.
      So in my registered plugin function summarizeCategories, I take exactly two parameter as following:

      function summarizeCategories(results, callback){
          //do something with the results
          callback(results);
      }
      

      Since I thought callback is the one I passed in!! 😱
      However, in hook.js, the callback function got wrapped around another callback function and the parameter that function takes are (err, values). Inside that the function, the original callback function was called, of course with with callback(err, results) but not callback(results).

      So in my registered function summarizeCategory I was passing in the result as err parameter and of course it gives me an err message. But then the falling call of original callback(err, results) still gives me the correct results information I needed in render. lol

      That's was have happened. It's kind of complicated to trace the error down since so many things named similar but it was great fun and I really enjoyed how thing get beautifully wired up in NodeBB. Great job guys!👏

      I wonder if there is any place that I can jot the point down so others may not fall in the same pitfall later? I saw your documentation is a bit out dated but you did mentioned it is going under a overhaul. I am looking forward to it.😆

      posted in Feature Requests
      yeelan0319
      yeelan0319
    • RE: Webhooks before search result render filter:search.render

      @baris look at this:

      19/3 09:53 [37042] - error: [plugins] filter:search.render,   undefined
      

      That's the information I have got with no other output. I tried to isolate which line trigger it, it seems to be the line in the dbsearch plugin callback(results), which content is

      function(err ,v){
          memo = v;
          callback(err);
      }
      

      if there is no more wrapping's around the second callback, I guess it should trigger the callback function which was passed when the filter:search.render event is fired.

      posted in Feature Requests
      yeelan0319
      yeelan0319
    • RE: Webhooks before search result render filter:search.render

      @baris That's great! I will go and pull the latest one.

      By the way, I wonder what is the reason for it triggering filter:search.render, undefined error? I didn't see anywhere in the module check the registration for the hooks and I wonder what I have missed. Just very curious about that. Thanks!

      By the way, your avatar looks soooooo cute, cannot staring at it☺

      posted in Feature Requests
      yeelan0319
      yeelan0319
    • RE: Webhooks before search result render filter:search.render

      @baris Which version are you currently running? I am using v0.6.1, which I believe is the latest version?

      As far as I see, there is only one hook related to search which is filter:search.query. That hook run before the search is performed and is used by the dbsearch plugin. For my purpose, I want to perform some minor tweak to the results and render my own format, so if filter:search:build do exist, I think that fits my purpose.

      Thanks!😄

      posted in Feature Requests
      yeelan0319
      yeelan0319
    • Webhooks before search result render filter:search.render

      Hi NodeBB team,

      I am working on a project that requires some aggregation of the search results like following picture shows. I currently added a little customized hook with the controller search.js, but I would really like to have an official hook from the general release because though it doesn't affect usage right now it gives me a error of filter:search.render undefined.
      Screen Shot 2015-03-19 at 8.56.39 AM.png

      Following is my implementation and if you would like, I can also do a fork and pull request and implement the way according to your convention. Thanks!

              if (!plugins.hasListeners('filter:search.render')) {
      			res.render('search', results);
      		}
      		else{
      			plugins.fireHook('filter:search.render', results, function(results){
      				res.render('search', results);
      			});	
      		}
      
      posted in Feature Requests
      yeelan0319
      yeelan0319
    • RE: [nodebb-plugin-header-extend] Custom links in the site's main menu

      @pitaj I am not sure whether you intend to incorporate the functionality for adjusting the original navigation item or not. I made some change to your plugin and send you the pull-request😃

      The basic idea behind the change is that I remove the original render logic from menu.tpl and all the navigation is actually rendering through the plugin right now. I remained the admin render logic since it request extra checking logic, which I am not sure how to get via plugin yet. So if the user activate the plugin, it won't render any navigation item before user set it up. In case user do want to revise from the default setting, I provided an extra button within the plugin page called "reset to default", so it will reset the navigation items to the original menu.tpl one.
      See if you like it.

      posted in NodeBB Plugins
      yeelan0319
      yeelan0319

    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