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.
Hello,
Thank you for this great module. I have been able to customize it greatly to be unique for my website!
I was wondering if it is possible to theme username to show as my content profile's first name field throughout the website?
I would appreciate any pointers or support.
Thank you
Comments
Comment #1
Bilmar CreditAttribution: Bilmar commentedI'm still having trouble with the above and would appreciate any pointers.
I'm using Email Registration Module so username is hidden at registration and automatically set to the characters before the @ in the email address (making username not usable in situations where username is used). I would like to therefore have the cck/content profile firstname field show instead when other modules call username (modules such as privatemsg).
Is this something possible?
Comment #2
rburgundy CreditAttribution: rburgundy commentedAttempted code from http://drupal.org/node/316009#comment-1189756 into theme_username but crashed my site.
Can't seen to find any information to set the theme_username to always be the content profile first name field.
Any suggestions?
Comment #3
Bilmar CreditAttribution: Bilmar commentedI unfortunately wasn't able to figure it out.
Using http://drupal.org/project/realname at the moment until I can get better direction from someone in the community.
Comment #4
safetypinI'm not sure if this is the best way to do it, I got this code originally from someone else on this site, but I can't seem to find it at the moment. Modified to display the title of the content profile as a link to the user profile:
This seems to work for v1.0 (not dev). All I need to figure out now is how to modify the user profile page title.
Comment #5
YK85 CreditAttribution: YK85 commentedsubscribing - would anyone familiar with programming be able to comment on code at #4?
Thanks!
Comment #6
honorfield CreditAttribution: honorfield commentedTry this one here, it might be a solution for your problem: http://drupal.org/node/285367
Comment #7
rjbrown99 CreditAttribution: rjbrown99 commentedOne suggestion for #4 - implement cache_get and cache_set. Otherwise you are running a node_load constantly to pull up the profile fields.
Comment #8
doublejosh CreditAttribution: doublejosh commentedThis is lovely, but it also seems to have caused an issue in forums for me. A valid author can't be found.
Seems odd since this is a theme layer change not effecting usernames on user objects.
Comment #9
int_ua CreditAttribution: int_ua commentedWhat about profile_load_profile function?
Comment #10
int_ua CreditAttribution: int_ua commentedI've succeeded with the following code in template.php without activating Content Profile module: