#3177 closed enhancement (no action required)
Member favorite topics
Reported by: | DJPaul | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | needs-patch |
Cc: | johnjamesjacoby, djpaul |
Description
The member profile forum screens (tabs: started, replied to, favourites) all need to be implemented. This involves adding new bbPress queries into bp_forums_get_forum_topics(), as well as making changes to the templates to let users favourite a thread.
Attachments (1)
Change History (18)
#2
@
14 years ago
I'd lean toward your first option, customising the query, for the reasons you put down. Also not sure this would be a very forwards-thinking thing to do with regards to bbPress plugin.
#3
@
14 years ago
- Cc johnjamesjacoby added
Nearly all of our bbPress customizations are going to break when we move to the bbPress plugin anyway. But it's worth getting jjj's feedback, because if there is an approach that will work best for the move to bbPress plugin, then we should take that into consideration.
#4
@
14 years ago
3177-1.patch is a first pass at the Replied To filters (option 1 described above).
I think it's mostly pretty good - it was more straightforward than I thought it would be.
The one remaining puzzle is the issue of group privacy. At the moment, the Replied To query (or the Started query for that matter) does *not* respect group privacy settings. That means that if I reply to a post in a private/hidden group, and then leave the group, I'll still be able to see those items on my Forums pages. (So will others, for that matter.) Of course, when you click through to the topics, group privacy settings are enforced.
I'm not sure what the best way is to deal with this. (a) We could just do what we do on the main Forums directory: show only topics from public groups. Or, (b) we could show only public groups when !bp_is_my_profile(), and show all topics to the profile owner. Or, (c) we could do it the "right" way, and only show a given topic if the viewing user has access to the group. The last way seems best, but it's probably too big a job for 1.3, because there are some performance questions (it'll require at least one more join against the group members table). So maybe (b) is a fair compromise for now?
#5
@
14 years ago
After some discussion with DJPaul, I'm going to go ahead and commit the changes so far. We can iterate as necessary.
To be clear: this changeset will reference Replied To only. As of now, Started and Replied To will be working correctly. Favorites must still be implemented.
#7
follow-up:
↓ 8
@
14 years ago
- Cc djpaul added
- Keywords close dev-feedback added
I've just spent a bit of time messing with Favorites. It's going to mean adding quite a bit of code. Seeing as we are getting closer to release, and I don't want to spend a ton of time writing all the necessary stuff, can I suggest that the Favorites tab is just removed for now, and postponed until a future release?
#8
in reply to:
↑ 7
@
14 years ago
Replying to boonebgorges:
I've just spent a bit of time messing with Favorites. It's going to mean adding quite a bit of code. Seeing as we are getting closer to release, and I don't want to spend a ton of time writing all the necessary stuff, can I suggest that the Favorites tab is just removed for now, and postponed until a future release?
Fine by me.
#11
@
14 years ago
- Summary changed from member profile forum screens to Member favorite topics
Thanks, jjj. I've bumped it to 1.4; this ticket will now refer to filling out the Favorites functionality. For fixes to the other parts of the member forums tab, please open a new ticket for the 1.3 milestone.
#12
@
13 years ago
- Keywords needs-patch added; close dev-feedback removed
- Severity set to normal
Did you ever keep a copy of whatever patch you made for Favourites, or does it need someone to start from scratch?
#13
@
13 years ago
I might have a patch somewhere, but I think it will become moot anyway after converting to bbPress 2.0, as it would all have to be rewritten anyway. If the bbPress integration (or a reasonably close patch) comes early in the dev cycle, I think we can handle this; otherwise we'll have to punt.
I've started poking around with "replied to". It is going to be tricky. bbPress does not appear to have any native method for getting topics replied to, perhaps because it would necessarily involve a join and thus be ugly. It seems to me that there are two strategies we might consider.
1) Write our own query. Or, rather, filter bbPress's query and manipulate it manually, like BP already does to ensure that group privacy settings apply in the forum directory. The SQL would have to look something like (this is totally pseudocode off the top of my head, probably won't work!)
This only involves a single join, which shouldn't be terrible given that the topics table is necessarily smaller than the posts table, but if we structure it as a filter on the BB_Query object, then we may be adding it to an already-existing join. I don't know.
2) Store topics-replied-to as a piece of usermeta (kinda how bbPress currently deals with favorites), so that the Replied To panel will involve querying bbPress for specific topics. This seems better than (1) in part because it avoids messing with the bbPress query. On the other hand, there are a few things to consider: (a) it won't apply to existing posts unless we write an installation routine that loops through existing members and gets their posts (this would be for 1.2-1.3 upgrades only), and (b) the usermeta itself could get quite large if someone is extremely active on forums. That means that the usermeta value itself could get very, very large (especially as topic_ids have more digits). Also, it could mean some inefficiency in BB_Query if the numbers are big - I have no idea how efficient IN(x) queries are when x is a very long string.