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.
Not really a bug, more like an unintended feature...If "show user pictures in content" is enabled, if the node type is poll, then the display (the bar charts showing votes per option) is corrupted, due to the userpic showing up in the upper right corner.
My suggestion would be to just eliminate the picture display if node type = poll.
Comment | File | Size | Author |
---|---|---|---|
#10 | 20046_user_picture_in_poll_1.patch | 468 bytes | Sivaji_Ganesh_Jojodae |
#10 | localhost 2010-3-27 12:7.png | 32.4 KB | Sivaji_Ganesh_Jojodae |
#3 | poll_picture_display_bluemarine.png | 22.28 KB | baudolino |
#1 | poll_picture_display.png | 29.09 KB | baudolino |
Comments
Comment #1
baudolino CreditAttribution: baudolino commentedScreenshot attached for clarification.
Comment #2
TDobes CreditAttribution: TDobes commentedhrm... interesting. I wonder how many other themes have this problem. Does this sort of thing occur with bluemarine and pushbutton too? We might want to look at a more global solution than just changing goofy.
As an (untested) quick fix, open themes/goofy/goofy.theme in a text editor and change the following line:
if (theme_get_setting('toggle_node_user_picture') && $picture = theme('user_picture', $node)) {
to read:
if (theme_get_setting('toggle_node_user_picture') && ($node->type != 'poll') && $picture = theme('user_picture', $node)) {
in the goofy_node function.
This will omit user pictures for polls.
Comment #3
baudolino CreditAttribution: baudolino commentedYou ARE right, it's a general issue. I can confirm it with both bluemarine and pushbutton.
bluemarine screenshot attached for confirmation.
Comment #4
baudolino CreditAttribution: baudolino commentedYour proposed quick patch solves indeed the problem (at least for Goofy).
On a global level, do you think the solution is patching theme.inc?
Comment #5
verber CreditAttribution: verber commentedAnother more global solution is to patch template engine (for example /themes/engines/xtemplate/xtemplate.engine)
On line 58 (function xtemplate_node) replace
if (theme_get_setting('toggle_node_user_picture') && $picture = theme('user_picture', $node)) {
by
if (theme_get_setting('toggle_node_user_picture') && theme_get_setting("toggle_node_info_{$node->type}",true) && $picture = theme('user_picture', $node)) {
Comment #6
fgmThis appears to be a general themeing issue, not a Goofy specific one. Is it still alive in D6, though ?
Comment #7
Dave ReidBumping up to 7.x.
Comment #8
effulgentsia CreditAttribution: effulgentsia commentedThe bug does indeed exist in D7 with Garland. Only for poll.module. Article node body wraps around the picture ok.
Comment #9
effulgentsia CreditAttribution: effulgentsia commented.
Comment #10
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedAttached patch will fix this. Tested with FF, opera and chrome.
Comment #11
james.elliott CreditAttribution: james.elliott commentedTested in FF 3.5, FF 3.6, IE7, IE8, Chrome 4, Safari 4, Opera 10.51
Comment #12
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.