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

Other Auto Code ALL Links

#1
Hello,
is there a way that I can auto code links similar to a modification that vb has on their .org forum where someone showed on how to modify the PHP file, for example:

Find

PHP:
 $urlReplaceArray = array(
"[url]\\2\\4[/url]"
);
And replace with

PHP:
$urlReplaceArray = array(
            "[code]\\2\\4[/code]"
        );
If so which file and line can I find it on and would it be similar to this if not how would I go about doing this modification. Thanks in advance
 

Aayush Agrawal

Well-known member
#3
File:
Code:
library/XenForo/BbCode/Formatter/BbCode/AutoLink.php
Method:
PHP:
protected function _autoLinkUrl($url)
Find:
PHP:
if ($link['url'] === $link['linkText'])
Add Above:
PHP:
return '[CODE]' . $link['url'] . '[/CODE]';
This will only auto code links which are not wrapped inside URL tag