Posted by Liliplanet on July 8, 2009 at 11:05am
8 followers
| Project: | Account menu |
| Version: | 6.x-1.7 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | mattyoung |
| Status: | closed (fixed) |
Issue Summary
Hi,
Great module, thank you. Easier than to create a block with user information. Is it perhaps possible that we can have 'My Account' as the themed username. Using www.drupal.org/project/realname, so it would be great to have the themed user name in the menu.
Look forward to your reply.
Lilian
Comments
#1
Lilian,
I will add tokens "!name" and "!realname" for the "My account" menu link title, these will be replaced with values from the user profile. You get to use the "%realname" token if you install the realname module, if not, "!realname" is just "!name".
To use, edit the "My account" link to change the "Menu link title" to e.g. "!realname's account", this will become
Lilian's account
#2
Fabulous, thank you!
#3
This feature is added in version 6.x-1.1
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
Hi!
First of all I was ecstatic to find this module - I always end up wanting something like this on my sites.
I had a problem getting !name and !realname to sub out correctly using current dev version, so I made some modifications which you will find attached. I had to add the form_alter to avoid having the form values all messed up when I edited the menu item.
I should also note that I took out the code that capitalized the first letter of username and real name. I did this because some usernames and real names have deliberate capitalization, and the capitalization effect can easily be achieved through CSS by adding "text-transform:capitalize;". At the very least that functionality should be relegated to some theme function if it is going to be there. Anyhow, I probably should have rolled separate patches but I guess I'm lazy.
Cheers!
David
#6
Well, I just discovered that this still gets messed up on the menu-customize pages, so here's a new patch with a fix.
David
#7
I think this problem should be fixed in CVS HEAD and latest dev release. Please test and patch.
thx!
#8
patch re-roll. The checking for menu-customize path doesn't seem to be needed any more, so removed that.
#9
1.7
#10
I have set the "Menu link title" of the link to user/[UID] to "%realname" but that doesn't work! Instead of displaying the real name (of course, having the RealName module installed), "%realname" will be displayed literally.
#11
the token is !realname, not %realname
also there is something wrong with the patch in #8. I made some changes and is checked in to HEAD. Do a cvs checkout from HEAD and see
#12
Ah, thank you - maybe you should then correct your reply #1 above where you have written "%realname" instead of "!realname". It now works fine for me using Account menu 1.7 (without your latest changes commited to CVS).
#13
~
#14
Documentation is inconsistent. !name works, @name doesn't. I don't know about %name, and don't have realname installed yet. This module is so elegantly simple it doesn't need a manual page, but perhaps you should correct the project page.