Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
theme system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 May 2007 at 04:13 UTC
Updated:
30 Jun 2007 at 05:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
webchickHere's a patch.
Comment #2
merlinofchaos commentedSimple and straightforward. I see no reason not to just RTBC it.
Comment #3
morphir commentedJust giving my BIG +1 to this one!
Comment #4
webchickThanks, folks! Assigning to myself so I can keep track of this.
Comment #5
kbahey commentedBig +1 on the functionality too.
Comment #6
Gurpartap Singh commentedIf this gets in, it'll be easier to prepare a patch for flatforum for drupal 6. i.e. bumping :D
Comment #7
michelleOooh, I like this. +1 from me. :)
Michelle
Comment #8
dries commentedOne question -- does this code get triggered when loading the recent comments block? If so, it would add x node loads to the page view where x is likely to be 10.
This patch looks good, but maybe double-check to see whether that node_load is _really_ needed. It's an expensive call if the only thing you need is the node's type.
Comment #9
merlinofchaos commentedNo, the recent comments block does not do a theme('comment').
Comment #10
webchickThe alternative to the node_load is this approach, which appends a $comment->type property. Unfortunately, there is no single place to do this, so it needs to be added to the code about 50 times. It still requires a node_load in preview, but otherwise can take it from the $node object already in scope.
Comment #11
merlinofchaos commentedI don't think an alternative to node_load is necessary, or a good idea. theme('comment') is only called, in Drupal, when something is known about the node.
Comment #12
moshe weitzman commentednice one. i agree that we are safe for comment block and don't need anything beyond the patch in #1
Comment #13
dries commentedPersonally, I'd be more leaning towards having a solution where both the $comment and the $node object are passed into the various theme functions. Looking at the code, this seems like this might require a bit more work but it will be more elegant/transparent in the end.
Comment #14
Gurpartap Singh commentedDoes this look good?
Comment #15
Stefan Nagtegaal commentedNice patch!
Reviewing atm...
Comment #16
Stefan Nagtegaal commentedSorry, I hitted the Submit button faster than I had planned todo.
This works pretty well, and gives us *a lot* more interesting things to keep in mind when theming!
Code looks also clean and straight forward! Tested on my local copy of head and did some modification to Garland to see if thing work like I expected..
It does, no need to hold this up any longer.. :-)
Comment #17
dries commentedCommitted to CVS HEAD. I'm marking this as 'code needs work' because I don't think it fully implements the original patch's needs.
Comment #18
Gurpartap Singh commentedThanks for committing it!!
Do you mean the basic styling for forum comments?
Comment #19
webchickThe purpose of this patch was to make flat forum styling possible, so since there's a patch for that now I think it's ok to mark this fixed.
I documented the change at Converting 5.x themes to 6.x
Comment #20
(not verified) commented