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.
Hi, just wanted to know if you will make a D7 version of this?
Comment | File | Size | Author |
---|---|---|---|
#13 | alterprofilepage7.patch | 2.99 KB | crazyrohila |
#12 | alterprofilepage7.patch | 2.22 KB | crazyrohila |
Comments
Comment #1
SeryiMysh CreditAttribution: SeryiMysh commentedPlease, port this module for D7?
Comment #2
alexbk66- CreditAttribution: alexbk66- commented+1
Comment #3
Starminder CreditAttribution: Starminder commented+1
Comment #4
laVera CreditAttribution: laVera commented+1
Comment #5
nothinghere CreditAttribution: nothinghere commented+1
Comment #6
Verscienta CreditAttribution: Verscienta commented+1
Comment #7
sw3b CreditAttribution: sw3b commented++1
Comment #8
ebieymjunior CreditAttribution: ebieymjunior commentedAny update yet?
Comment #9
crazyrohila CreditAttribution: crazyrohila commentedI created a patch for drupal7. Please Review patch.
--sanjay
Comment #10
crazyrohila CreditAttribution: crazyrohila commentedSorry I forgot to attach patch file. :P
Comment #11
crazyrohila CreditAttribution: crazyrohila commentedSorry I forgot to attach patch file. :P
Comment #12
crazyrohila CreditAttribution: crazyrohila commentedOppss Sorry Sorry Sorry :(
Comment #13
crazyrohila CreditAttribution: crazyrohila commentedThe Patch creation way was wrong. So new patch is here.
Comment #14
gabor_h CreditAttribution: gabor_h commentedThe hook_user_view_alter() would be better than hook_user_view().
Example:
Comment #15
jerdiggity CreditAttribution: jerdiggity commentedComment #16
jerdiggity CreditAttribution: jerdiggity commentedThanks crazyrohila for the patch... D7 version has been released.
Comment #17
gabor_h CreditAttribution: gabor_h commentedDear jerdiggity,
Are you sure that you want to use hook_user_view instead of hook_user_view_alter?
hook_user_view:
"The module should format its custom additions for display and add them to the $account->content array."
hook_user_view_alter:
"The user was built; the module may modify the structured content.
This hook is called after the content has been assembled in a structured array and may be used for doing processing which requires that the complete user content structure has been built."
The hook_user_view was not meant to modify things, and there is no guarantee that the modules are called in the right order. What happens if the alterpageprofile is the very first module that is called in the hook_user_view?