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.

Files: 
CommentFileSizeAuthor
#10 20046_user_picture_in_poll_1.patch468 bytesSivaji
PASSED: [[SimpleTest]]: [MySQL] 19,017 pass(es). View
#10 localhost 2010-3-27 12:7.png32.4 KBSivaji
#3 poll_picture_display_bluemarine.png22.28 KBbaudolino
#1 poll_picture_display.png29.09 KBbaudolino

Comments

baudolino’s picture

FileSize
29.09 KB

Screenshot attached for clarification.

TDobes’s picture

Assigned: Unassigned » TDobes

hrm... 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.

baudolino’s picture

You ARE right, it's a general issue. I can confirm it with both bluemarine and pushbutton.

bluemarine screenshot attached for confirmation.

baudolino’s picture

Your proposed quick patch solves indeed the problem (at least for Goofy).

On a global level, do you think the solution is patching theme.inc?

verber’s picture

Another 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)) {

fgm’s picture

Project: Goofy » Drupal core
Version: master » 6.x-dev
Component: User interface » theme system

This appears to be a general themeing issue, not a Goofy specific one. Is it still alive in D6, though ?

Dave Reid’s picture

Version: 6.x-dev » 7.x-dev
Assigned: TDobes » Unassigned
Issue tags: +themability, +user pictures, +poll

Bumping up to 7.x.

effulgentsia’s picture

Component: theme system » markup

The bug does indeed exist in D7 with Garland. Only for poll.module. Article node body wraps around the picture ok.

effulgentsia’s picture

Priority: Minor » Normal

.

Sivaji’s picture

Status: Active » Needs review
FileSize
32.4 KB
468 bytes
PASSED: [[SimpleTest]]: [MySQL] 19,017 pass(es). View

Attached patch will fix this. Tested with FF, opera and chrome.

james.elliott’s picture

Status: Needs review » Reviewed & tested by the community

Tested in FF 3.5, FF 3.6, IE7, IE8, Chrome 4, Safari 4, Opera 10.51

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -themability, -user pictures, -poll

Automatically closed -- issue fixed for 2 weeks with no activity.