1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Strip link to profile from username

Discussion in 'Styling and Customization Questions' started by The Forum Heroes, Sep 15, 2011.

  1. The Forum Heroes

    The Forum Heroes Well-Known Member

    Been searching all night but can seem to locate in lib/xenforo where is is handled. I want to strip or change the link to the member profile in message_user_info

    If you look at http://apps.facebook.com/facebookforumco/threads/test-thread-2.2/ you'll see I have this working for the avatar. It links to the posters fb profile but I can't get it to work with the username for same result. Grateful for any help on this.
     
  2. The Forum Heroes

    The Forum Heroes Well-Known Member

  3. Jake Bunce

    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}
    
     
  4. The Forum Heroes

    The Forum Heroes Well-Known Member

  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh you mean in the helper:

    XenForo_Template_Helper_Core::getUserHref

    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.
     
  6. The Forum Heroes

    The Forum Heroes 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?
     
  7. Jake Bunce

    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
     
  8. The Forum Heroes

    The Forum Heroes 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.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That shouldn't matter.

    I am guessing this is a problem with a modification. Troubleshooting is required.
     
  10. The Forum Heroes

    The Forum Heroes 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.
     
  11. Jake Bunce

    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.
     
  12. ragtek

    ragtek Guest

    You shouldn't change any original xf file!
    Use the eventlistener system to overwrite/extend the original xf classes!
     
    Jake Bunce likes this.
  13. The Forum Heroes

    The Forum Heroes Well-Known Member

    NP Jake. Thanks for all the help!
     

Share This Page