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

mattyoung’s picture

Version: 6.x-1.7 » 6.x-1.0
Status: Needs work » Active

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

liliplanet’s picture

Assigned: Unassigned » mattyoung

Fabulous, thank you!

mattyoung’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Active » Fixed

This feature is added in version 6.x-1.1

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dnotes’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new2.06 KB

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

dnotes’s picture

StatusFileSize
new2.62 KB

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

mattyoung’s picture

I think this problem should be fixed in CVS HEAD and latest dev release. Please test and patch.

thx!

stella’s picture

StatusFileSize
new1.83 KB

patch re-roll. The checking for menu-customize path doesn't seem to be needed any more, so removed that.

mattyoung’s picture

Version: 6.x-1.1 » 6.x-1.7
Status: Needs review » Fixed

1.7

roball’s picture

Status: Fixed » Needs work

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.

mattyoung’s picture

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

roball’s picture

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).

mattyoung’s picture

Version: 6.x-1.0 » 6.x-1.7
Status: Active » Closed (fixed)

~

davidlark’s picture

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.