Related topics in [nodebb-plugin-widget-essentials] should be filterable by the category of their parent

  • @baris Well.. it's not ! 😭
    It seemed like a bug to me too.. at least, not what i expected.
    Then i noticed the mention :

    If placed on a page other than categoy will pull from all recent posts

  • NodeBB Admin

    Yeah that help text is just wrong, that input field has no effect. If you place that widget on a topic page it does this.

    It will get the topics that have the same tags as the current topic you are in(these could be from other categories) then it will search for topics with similar titles and then it will get topics from the same category. So if you are only displaying 10 suggested topics and there are 10 topics with the same tag, you won't see any topics from the same category. Maybe we could change the code a bit so it does display a mix of all three instead of prioritizing tags.

  • @baris Thnxx for your explanation ! I got it now : the concat thing 🤓
    I almost agree with the priority given to tag matching over titles matching..
    But what is clearly missing is the category filter ! 🙂

  • @baris But yes.. you're right : there should be a better way to do this by matching topics on tags and titles at the same time, with some ponderation.. and with a category filter if given...

  • NodeBB Admin

    The problem with category filter is if you specify a category id on the widget it will only work on a single category, that's why that setting doesn't make sense. For example if you set it to cid=3 and put the widget on topic.tpl, it will only display topics from category 3 even if the topic you are looking at is in a different category. That's why we get the category id from the database by looking at the category id of the topic you are in.

    I think we can improve the code by showing a mix of the 3 options(same tag, similar title, same category) instead of prioritizing tags. So essentialy we just shuffle the results.

  • NodeBB Admin

    I changed the code a bit so now it searches in the same category and shuffles the results.

  • Excellent work @baris (i noticed the routine maintenance screen) 😅
    Here is how i see it :
    The category filter is useful in my mind : sometimes it's just what we want because results from other sections of the forum could be totally irrelevant.. (it really depends on how your forum is divided...)
    If a category is given, we should be able to filter on the requested category, if not, maybe topics within the same category should just be given a higher weight to sort the requested n results..
    What do you think ? 🙂

  • If we look at the newly Suggested Topics on bottom of this post.. they don't really seem to be particularly relevant to our discussion 🙂

  • NodeBB Admin

    That's correct, yet they are all from the same Plugin Requests category 😆

  • Awesome @baris : i should have a look at your changes ! 👏
    I think we should be able to display more relevant topics by sorting the results with a good mixed ponderation...

Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.