Closed (fixed)
Project:
Account menu
Version:
6.x-1.7
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 Jul 2009 at 11:05 UTC
Updated:
24 Aug 2010 at 03:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
mattyoung commentedLilian,
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
Comment #2
liliplanet commentedFabulous, thank you!
Comment #3
mattyoung commentedThis feature is added in version 6.x-1.1
Comment #5
dnotes commentedHi!
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
Comment #6
dnotes commentedWell, I just discovered that this still gets messed up on the menu-customize pages, so here's a new patch with a fix.
David
Comment #7
mattyoung commentedI think this problem should be fixed in CVS HEAD and latest dev release. Please test and patch.
thx!
Comment #8
stella commentedpatch re-roll. The checking for menu-customize path doesn't seem to be needed any more, so removed that.
Comment #9
mattyoung commented1.7
Comment #10
roball commentedI 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.
Comment #11
mattyoung commentedthe 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
Comment #12
roball commentedAh, 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).
Comment #13
mattyoung commented~
Comment #14
davidlark commentedDocumentation 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.