Related topics in [nodebb-plugin-widget-essentials] should be filterable by the category of their parent
-
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. https://github.com/NodeBB/NodeBB/blob/master/src/topics/suggested.js#L11-L41
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.
-
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.
-
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 ?