Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
profile.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2008 at 19:52 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
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 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 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 commentedGabor, ping! :P
Comment #6
dpearcefl commentedIs this still an issue using current Drupal 6?