I have seen dozens of references to the following issue with no resolution or time frame mentioned. When realname is enabled on your site and you are using panels and ctools the later is somehow blocking realname from working. The easiest way to show this is through a screenshot that I have attached. Please not I am using the advanced profile kit. Here you will see the name John Doe the "real name" that works throughout the site. However, you will notice that gitotech is used in the grey areas which is the username. I checked several forums that mentions this to be an issue with ctools and realname. Does anyone have a solution to correct this or has run into this issue as well.

Thank you - chules

CommentFileSizeAuthor
realname_issue.jpg41.83 KBchules

Comments

locomo’s picture

subscribe

babycourageous’s picture

subscribe

merlinofchaos’s picture

Title: realname is not working with ctools and panels » Small piece of code needed to make realname work with CTools/Panels
Project: Chaos Tool Suite (ctools) » Real Name
Version: 6.x-1.3 » 6.x-1.x-dev
Component: Code » Miscellaneous
Category: support » feature

Ok, I have done what I could.

The Realname module wants us to use theme('username') for all instances of the user name. Unfortunately, theme('username') does not allow us to not have the user name as a link, so while this is good advice, it is also unsuitable for our proposes here. Oh I suppose I could strip_tags() the result, but that's not a great idea.

If you have the realname.module included, however, it extends theme_username. This is handy. I've extended CTools to make sure the default conversion of %user goes through the converter alter hook (prior to my checkin just now it doesn't). Then for realname, you can simply add this to the module and as near as I can tell, everything will work exactly as we want:

function realname_ctools_context_converter_alter($context, $converter, &$value) {
  if ($context->type == 'user' && $converter == 'name') {
    $value = theme('username', $context->data, array('plain' => TRUE));
  }
}

Combined with hook_ctools_context_convert_list_alter($plugin, $converters), realname could add additional, realname.module specific keywords. I'm not sure there's any need to do that, since token.module may already be doing this as needed.

Moving this to the realname queue. Nancy can put this piece of code in or not, as she chooses. (I'm hoping that since she already put in the piece of code to allow page manager overrides to co-exist with realname overrides, this small piece of code will also be okay).

dave reid’s picture

Status: Active » Fixed

Looks fine to me, so committed to CVS.
http://drupal.org/cvs?commit=442870

liquidcms’s picture

for those stmbling upon this, i have 2.11 of Views and grabbed Oct 30/10 of Realname dev as per Dave's commit above.

When using APK and a User page override, under Content where i can set title, this still does not work "%user:realname's Home" as the Substitutions list might suggest; but, "%user:name's Home" now does.

thanks guys.

Status: Fixed » Closed (fixed)

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