We currently get the "next" and "previous" topics of a forum topic by means of a rather expensive query (3rd most expensive in accumulated drupal.org stats). I think it would make sense to store this structure in a table so you don't need to run this expensive query. Merlin pointed out, that the result of the query is dependent on the forum_order variable. I don't think this is a problem, we only need to re-create the table if that variable is set to another value.
the table could have the following structure:
tid | nid1 | nid 2
tid is neccessary because a node can be in more than one forum.
nid1 would be the next topic of nid2, to get both next and previous topic we'd need to join the table on itself. As an alternative we could store both previous and next topic directly.
Comments
Comment #1
moshe weitzman commentedmaybe ... i would just as soon get rid of those links. i don't think they are used much in practice.
Comment #2
killes@www.drop.org commentedI wouldn't mind to remove it, but then the people who want Drupal's forums to be more "like other forums" will complain bitterly. Then again, they could probably put it into their "make drupal forums like other forums".module.
Comment #3
sime+1 to remove. I have actually tried to using the previous/next on forum topics, but it really is counter-intuitive when the subject matter can vary so much.
Comment #4
michelle+1 on getting rid of them from me also. That's the first thing I thought of when I read this issue when it was posted but I wasn't brave enough to be first to say it. LOL. I find those links more annoying than anything. I keep thinking they're somehow related to the post I'm reading (like a more info link section) and have to remind myself what they actually are.
Michelle
Comment #5
pwolanin commentedI think killes' move towards caching this information might be a better approach: http://drupal.org/node/72617
especially when combined with moving the generating functions out of the theme function. I think to insure some efficiency (such as the suggested caching) with this ordering it should remain part of core, especially since it's easy to remove at the theme level.
I thought about this before (http://drupal.org/node/70578) and while it was also my initial reflex I don't think having the ordering in a table is necesarily a good idea, since the table will have to be written frequently.
Comment #6
liam mcdermott commentedComment #7
Gurpartap Singh commented+1 to remove topic navigation links from forum posts. It's also a obstacle when you are making your forum look more like phpBB or vBulletin. I'm sure I never used those links.
Comment #8
minesota commentedPlease keep it. Many people need it. And they may not be knowing even if this is
silently removed.
Comment #9
michelle@minesota - If they don't notice it's gone, then they must not need it too badly. People can always add it in if they need it. And, yes, the reverse is also true but, as killes pointed out, it's an expensive query. So it makes more sense for people to add it if they really want it.
Michelle
Comment #10
minesota commented@Michelle - many people will not be going to see this discussion, and then they will clamor for it.
And I guess killes is suggesting a way to keep it yet minimizing "expensiveness" of the query.
+1 to keep those links.
Comment #11
Gurpartap Singh commentedChange the topic of this issue with the currect debate?
Comment #12
Flying Drupalist commentedI agree with removing. Is there someway to remove the links in a theme without having to wait for D7? I've display to none, but that just feels very wasteful.
Comment #13
michelle@Miraploy - This is how it's done in advanced forum:
@Gurpartap - Changed title
@minesota - As I said, it can always be added back. Changing it to a less expensive process would work as well if someone is willing to roll the patch for it.
Michelle
Comment #14
Flying Drupalist commentedMichelle, would you adapt that for vanilla forum please?
Comment #15
michelle@Miraploy - I haven't used Vanilla and know nothing about how it handles this sort of thing.
Michelle
Comment #16
moshe weitzman commentedNoone who wants to save the links has proposed a solution to generate them in an efficient manner. @pwolanin linked to an ancient, dead issue about caching. thats not so practical IMO. Out they go, for now. They can come back when someone implements them with acceptable performance. Right now, they are a stain on Drupal's credibility.
Comment #17
jody lynnThe links were killed: #556136: Remove theme_forum_topic_navigation()