Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Guys,
If i enable the Author Information block, the user picture only is displayed IF another profile field is created and displayed too. If i deselect all fields, the picture is gone too. I can let only the user page link, with no difference.
regards,
massa
Comment | File | Size | Author |
---|---|---|---|
#1 | theme_profile_block.patch | 4.66 KB | Pancho |
Comments
Comment #1
PanchoYes, I consider this a bug. The
if (!empty($fields))
check in profile_block is too strict. It should show the block, if any element can be displayed, which may also be the user picture or the link to the profile page. I therefore changed the check toif (!empty($profile) || $picture || $profile_link)
. Admins can further restrict this in the theme layer, the other way around this was not possible.At the same time, there is another problem with profile_block: The rendering of the user page link is hardcoded and appended to the themed output. Instead it should be themeable as well. I therefore moved the url composition to the preprocess layer (template_preprocess_profile_block) and the link creation to the theme layer (profile-block.tpl.php).
What I wasn't sure about is why a parameter TRUE is being appended when calling the theme function in line 181 (now: 183). I guessed this means "end of arguments", so I let it in, but maybe someone can bring this to my mind...
Comment #2
brmassa CreditAttribution: brmassa commentedBernd,
Your patch works fine.
massa
PS: there is another issue that might be subject for another report, but... Since all sites that use this block needs some pages that are from the Admins (like "about", "welcome apge", etc), selecting on which node types this block is displayed is a requirement. No one wants to show that the "admin" created all these nodes.
Comment #3
Pancho@brmassa: Well, that is surely something for a contrib module, as new features won't go into D6 anymore. As far as pages (like "about", "welcome page" etc.) are concerned, this is no problem, though: You just need to create these pages with the nodetype "page" instead of "article". Then the line with author & creation date isn't displayed by default.
Let's focus on this issue first, but feel free to file another issue for the other one against D7. This needs more reviews though, so I set it back to CNR.
Comment #4
brmassa CreditAttribution: brmassa commentedBernd,
about the patch: its working, as i said. Well... there is no option to either use or not the user picture, the arguments listed on hook_theme are not the same and i dont know much why using template_preprocess_profile_block() while it can be calculated before, but its mainly working.
about the "new feature": once you enable this block, it will be displayed on EVERY page/content created. It is probably a undesired effect that might turn the whole feature unusable. Its not about the "submitted by" tag on stories and page node types. But i understand about new features on D6. I will start a new issue so day.
regards,
massa
Comment #5
brmassa CreditAttribution: brmassa commentedGabor, ping! :P
Comment #6
dpearcefl CreditAttribution: dpearcefl commentedIs this still an issue using current Drupal 6?