Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We need to review the comment.tpl and make sure the HTML structure, the CSS, the variable names, and the contents of the variables are the best they can be for D7.
I apologize for not having a concrete list of to-dos to start out the discussion. :-(
Comment | File | Size | Author |
---|---|---|---|
#4 | garland_before_comment_cleanup.png | 57.47 KB | kika |
#4 | garland_after_comment_cleanup.png | 59.23 KB | kika |
#2 | comment-cleanup.patch | 1.14 KB | kika |
Comments
Comment #1
kika CreditAttribution: kika commentedcore/stark comment.tpl.php:
garland:
- $zebra should documented in the core comment.tpl.php
- $zebra should added to outer div in core comment.tpl.php
- any specific reason why Garland uses extra wrapper and not clearfixing in outer div?
core:
garland:
- why we ucfirst only in garland, not in core? where else we ucfirst?
core:
garland:
- <div>—</div> seems really sloppy
- why not have "user-signature" class for Garland?
core:
garland:
- Why not have a links div class in core?
Looking at all this -- why we need garland's comment.tpl.php at all? Why not just clean up the core one, bringing over the sensible bits from garland's comment template?
Comment #2
kika CreditAttribution: kika commentedHere's the patch to introduce the suggestions for Stark's comment.tpl.php
- Document $zebra variable
- Adding $zebra variable to outer div
- Wrapping $links into a div class="links" class
Next steps:
1. Test the patch with user pictures (either my installation or current state of CVS build are acting up)
2. Drop temporarily Garland comment.tpl.php and see what visually breaks in Garland comments. Likely a lot, because:
- Garland uses extra wrapper div for clearfix
- different order of variables:
-- core: $picture, $new, $title, $submitted
-- Garland: $submitted, $new, $picture, $title
- span instead of div for $submitted
3. Fix those visual issues based on proposed core comment.tpl.php and Garland CSS
4. Remove Garland's comment.tpl.php
Any takers?
Comment #3
kika CreditAttribution: kika commentedNext steps bit further in the horizon: as comments will become fieldable and their output will be converter to render arrays #504666: Make comments fieldable we might need to move $links being part of the $content[] array (in style of #339929: Move node links into $node->content http://drupal.org/node/224333#node_links) and re-engineer hook_link() and hook_link_alter() but this is way beyond of this issue.
Comment #4
kika CreditAttribution: kika commentedBack with screenshots: Garland does break when comments are based on stark comment.tpl.php
The problems:
garland/style.css 233:
replacing span.submitted with div.submitted or .submitted gets us back the styling. Which one is preferred?
I do not have enough skills to fix the submitted float. As said in #2, Garland uses a different order of $title and $submitted.
Comment #5
kika CreditAttribution: kika commentedProcess for Garland testing:
1. Apply the patch from #2
2. Rename themes/garland/comment.tpl.php to something else
3. Reset theme cache (easiest way is to visit /admin/build/themes/ and submit)
Comment #6
geerlingguy CreditAttribution: geerlingguy commentedMarking for subscribe. If I have some time later this evening, I'll hop in and try to do more of the steps outline in #2.
Comment #7
catchBump. This can probably go in during code slush, but needs to happen pretty quick.