1. 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

Discussion in 'XenForo Questions and Support' started by rusman, Sep 14, 2012.

  1. rusman

    rusman Member

    How do I make links within a post open in the same window? By default, it opens in a "_blank" window.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Remove the red 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);
  3. rusman

    rusman Member

    Great! Thanks.

Share This Page