categories for activity items
-
Filters for the activity feed are important, and there are currently a few, but I need to extend that functionality.
My users need to be able to filter activity by categories like:
- Family,
- Philanthropy,
- Business… etc.
I simply want an activity item to have the same categories as the post item it points back to (if it’s a new post item or a related comment).
I see that there’s a plugin for categorizing everything, http://wordpress.org/extend/plugins/bpcontents/ , such as entire blogs, or users, or groups… but first off, it doesn’t extend to activity items, and second it is more focused on allowing users to actively categorize things – mine is passive, categorizing automatically, and simply giving users the ability to filter their lists.
so i came up with a few options, and i think i know which i have to take, but i figured i’d ask the experts, because well… you always have better ideas:)
1. (least flexible, and messy) modify the component or action fields of the activity items to include the cat, like “new-blog-post-PURPLE.” simple, and i can use the current filtering techniques and get_activity functions, but things can only have one category.
2. don’t modify anything in the database, but make a separate function with a custom MYSQL query that looks at the activity items and inner joins all the way through (to the post and then to it’s cat relationships) and return only those with the proper cats… ( allows multiple categorization and no database manipulation, but nothing is cached so it seems like a big drain on the server, and a fairly complex mysql statement to figure out)
3. make a separate Activity-Item-To-Category relationship table. this would bring down the drain on the server per-load a bunch, and allow for multiple categories per activity item… and it would utilize the categories already in the system… but still it would require a custom get-activity function and mysql call to make use of the new db table. this is the one that i think i’ll need to go with however. seems like the most flexible.
i’m actually hoping that i’ll be able to make use of the core bp classes to render the actual activity feed… for example the time_since function and whatnot.
but any suggestions for alternate routes, or perhaps simply tips to expedite it?
Thanks
- The topic ‘categories for activity items’ is closed to new replies.