Other Auto Code ALL Links

dandanch

Member
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
 
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
 
I just upgraded to v2, and this code modification no longer works.

can someone please help me with getting this to work on v2.
 
Back
Top Bottom