The default messages "existing_request" and "existing_relationship" contain the name of the requestee and requester. However, when the default message is retrieved through user_relationships_ui_get_message, no relationship object is passed along. Therefore, the function doesn't call theme('username',...) on both values. This leads to a non-unified user experience, because sometimes the username is shown as a link and sometimes not.

Comments

advseb’s picture

In general, before printing the username, it should always call theme('username', $user_obj), because this will ensure a more consistent look of the module output. There are many other occurences in this module, where the theming function is not used.

alex.k’s picture

Could you post a patch that resolves the issues if you have fixed them? Thanks.

rburgundy’s picture

+1 subscribing, this would be great!

rburgundy’s picture

I marked #714778: make 'username' on send request use themed username as a duplicate
Would someone be able to provide a patch that will fix this issue?
Thanks!

Bilmar’s picture

I am moving over from #714778.

Would anyone please be able to look into correcting the consistency of the username used throughout the module?
I think a major one is the send request confirmation page uses '%name' => $requestee->name for the username where as the other pages for approve/disapprove/cancel uses (from user_relationships_ui.forms.inc):

'!name' => theme('username', user_load(array('uid' => ($viewed_id == $relationship->requester_id ? $relationship->requestee_id : $relationship->requester_id))))

I unfortunately don't have programming skills to fix this but will be up for extensive testing of all the pages where the username is shown as soon as a patch may be available.

This is a great module and I hope to see it further develop!
Thank you very much in advance.

alex.k’s picture

Status: Active » Fixed
Bilmar’s picture

wow, thanks for the quick action alex.k!
i will try the latest dev tonight and report back if any issues.

thanks again!

Bilmar’s picture

confirmed that it shows the themed username now =)

I noticed in the committed changes that the old '%name' => $requestee->name is still in the array, but not sure if it should/shoudnt be. Thanks again!

t('Are you sure you wish to send a new %rel_name request to !name?', array('%name' => $requestee->name, '%rel_name' => ur_tt("user_relationships:rtid:$relationship->rtid:name", $relationship->name), '%rel_plural_name' => ur_tt("user_relationships:rtid:$relationship->rtid:plural_name", $relationship->plural_name), '!name' => theme('username', $requestee)))

Status: Fixed » Closed (fixed)

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

rickh’s picture

Status: Closed (fixed) » Active

Sorry to repoen this, but is there maybe a patch available as this is quite a problem for me at the moment. Any help would be greatly appreciated. Thanks

alex.k’s picture

This is available in the current -dev release, can you try it out?

Bilmar’s picture

Version: 6.x-1.0-rc3 » 6.x-1.x-dev
Status: Active » Fixed

Changing status back to Fixed as it is in the latest dev.
The occurrences of username that I was looking at are themed usernames now.

Thanks alex.k!

YK85’s picture

Hi,

I also needed the themed username and confirmed the committed patch added this.

Thanks!

Status: Fixed » Closed (fixed)

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