@yariplus cool, got it , thanks ~!
Filtering topics in category based on topic's tags
-
Hi,
I've been trying to come up with a way to filter the list of topics for a particular category based the topic's tags. So for example I have an "Announcements" category and I want some users to only see the topics that have a tag of "Test" and nothing else. How would I go about doing this? or what is the best hook to use? without breaking the 'load more topics as you scroll' feature?
-
Github issue NodeBB/NodeBB#3762
-
anybody have any ideas how to make this possible?
-
@agarcia17 As the GitHub issue mentioned, there's currently no way to do this. Without the use of a plugin
-
@Kowlin yeah I'm actually just wondering if anybody has any pointers as I don't mind writing the plugin
-
I'm quite not a developer, perhabs one of the guys from @3rd-Party-Developers can help you out
-
@Kowlin yeah hopefully!
I'm actually gonna take another stab at it right now and will update if I make some progress
-
If I were you, I would do this in core. You will need to add functions to get topics filtered by tag, add the necessary elements in the core themes, add socket endpoints for the filtering, and add the necessary client side code to make all it work.
It will still be easier than writing it as a plugin.
-
@pidjab thanks! will work with that
-
Cool, yeah I think this belongs in core as well
-
tried, but couldn't find a way to make it work correctly.. whatever i tried would break the 'load more as you scroll' feature.
-
@agarcia17 I guess I'll have to do it, then -_-
-
@pitaj aaww best of luck
-
@pitaj any luck..?
-
@agarcia17 not yet.
-
@pitaj oh ok, I'll see if I have some time tomorrow so i can give it another shot but anyways good luck!
-
@agarcia17 I've done some work, I've made a method to get the topics by tag. I now need to implement everything everywhere else.
-
@pitaj nice..! all the topics by tag for a particular category?