Delete userblurb comma

Morgain

Well-known member
Have tried several things so help please.

Instead of
Female, from London

I want it to say:

Lady of London.

This is for the membercard
but I realise it will change the user strip in memberlist and follows too.

I have changed Female to Lady, and from to of in Phrases, added the final stop.
Cannot find what puts in the comma after the gender.
 
It's in the code:

XenForo_Template_Helper_Core::helperUserBlurb

This function defines all of the parts of the blurb and then combines them with commas:

Rich (BB code):
	public static function helperUserBlurb(array $user, $includeUserTitle = true)
	{
		if (!is_array($user) || empty($user['user_id']))
		{
			return '';
		}

		$parts = array();

		if ($includeUserTitle && $userTitle = self::callHelper('usertitle', array($user)))
		{
			$parts[] = '<span class="userTitle" itemprop="title">' . $userTitle . '</span>';
		}

		if (!empty($user['gender']))
		{
			$parts[] = new XenForo_Phrase($user['gender']);
		}

		if (!isset($user['age']) && !empty($user['show_dob_year']) && !empty($user['dob_year']))
		{
			$user['age'] = self::_getModelFromCache('XenForo_Model_UserProfile')->getUserAge($user);
		}

		if (!empty($user['age']))
		{
			$parts[] = $user['age'];
		}

		if (!empty($user['location']))
		{
			$user['locationCensored'] = XenForo_Helper_String::censorString($user['location']);

			$location = '<a href="'
				. XenForo_Link::buildPublicLink('misc/location-info', '', array('location' => $user['locationCensored']))
				. '" class="concealed" target="_blank" rel="nofollow">'
				. htmlspecialchars($user['locationCensored'])
				. '</a>';

			$parts[] = new XenForo_Phrase('from_x_location', array('location' => $location), false);
		}

		return implode(', ', $parts);
	}
 
It's in library/XenForo/Template/Helper/Core.php

Be aware that any changes made directly to the core files will be overwritten when upgrading.
 
I copied the code for the userblurb into category_view and forum_view
It works OK except it doesn't display location.

Code:
<td><div style="font-size: small; float: left !important; margin-left: 10px;" class="userBlurb dimmed">{xen:helper userBlurb, $user}</div> </td>

On the main memberlist the same code gives

Username + Start Convo button + Usergroup + Gender + Location

On my subsection memberlist on category_view as above I get only

Username + Start Convo button + Usergroup + Gender
 
$user isn't available to category_view. You can use $visitor instead if you want to display information for the logged in user.

oops Jake
I tried
Rich (BB code):
<div style="font-size: small; float: left !important; margin-left: 10px;" class="userBlurb dimmed">{xen:helper userBlurb, $visitor}</div>
That meant the list of members all displayed MY userblurb.

Sorry I guess I wasn't clear I'm trying to display a special memberlist. The right users are showing up, and the userblurb displays their primary usergroup, and gender accurately, but no location comes up.
 
Top Bottom