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

Make Message Links open in Same Window

Jake Bunce

XenForo moderator
Staff member
#2
library/XenForo/Helper/String.php

Remove the red code:

Code:
	public static function getLinkClassTarget($url)
	{
		$target = '_blank';
		$class = 'externalLink';
		$type = 'external';

		$urlInfo = @parse_url($url);
		if ($urlInfo)
		{
			$host = $urlInfo['host'] . (!empty($urlInfo['port']) ? ":$urlInfo[port]" : '');
			if ($host == XenForo_Application::$host)
			{
				$target = '';
				$class = 'internalLink';
				$type = 'internal';
			}
		}

		return array($class, $target, $type);
	}