Strip link to profile from username

Jake Bunce

XenForo moderator
Staff member
You need the facebook_auth_id? This works in the templates if the user has an auth_id:

Code:
{$visitor.facebook_auth_id}
 

Jake Bunce

XenForo moderator
Staff member
Oh you mean in the helper:

XenForo_Template_Helper_Core::getUserHref

Rich (BB code):
	public static function getUserHref(array $user, array $attributes = array())
	{
		if (empty($attributes['href']))
		{
			if ($user['user_id'])
			{
				$href = 'http://www.facebook.com/profile.php?id=' . $user['facebook_auth_id'];
			}
			else
			{
				$href = '';
			}
		}
That will take care of the profile links in posts and a few other places. But you will find this doesn't cover all areas as xf_user_profile is not always joined.
 

Mike Edge

Well-known member
Thanks! That did the trick. One final thing I'm still stuck on. Even my 1st user that you create when you install XF. When using FB connect, the front end of the forum, i'm treated like a member, not super admin. I can't delete, sticky or close any threads. Any ideas on this?
 

Jake Bunce

XenForo moderator
Staff member
Just make sure you are an admin:

Admin CP -> Users -> Administrators

...and a moderator if you want those abilities:

Admin CP -> Users -> Moderators
 

Mike Edge

Well-known member
Yeah, I have both of them and they both show me listed. If I log in normally, I have access, but I don't using fb connect.
 

Jake Bunce

XenForo moderator
Staff member
That shouldn't matter.

I am guessing this is a problem with a modification. Troubleshooting is required.
 

Mike Edge

Well-known member
It can't be a mod though as I haven't installed any add-ons yet, only core change is the changing in core.php to go to fafebook profile instead of member in XF. Its a default install with color changes to the default skin.
 

Jake Bunce

XenForo moderator
Staff member
That one file edit wouldn't cause this. Nor would style changes affect mod permissions. I don't have any other suggestions. I would offer to take a look but I don't use facebook.
 
R

ragtek

Guest
You shouldn't change any original xf file!
Use the eventlistener system to overwrite/extend the original xf classes!
 
Top