Automatic coded

xasanofa

New Member
Hi all senior here, i wanna ask a question and need you help to get ready to implement on my forum.

How to url link coded automaticaly if any member post a url link in the room ? so the url link will be auto turn and get in the coded
 
This mod involves editing a PHP file from vBulletin.

open the includes/functions_newpost.php

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

Replace With:
PHP:
        $urlReplaceArray = array(
            "[code]\\2\\4[/code]"
        );


Find:
PHP:
    $text = preg_replace($urlSearchArray, $urlReplaceArray, $messagetext);

Add this after:
PHP:
$text = str_replace("[/code]\r\n[code]","\r\n",$text);
$text = str_replace("[/code]\n[code]","\n",$text);

Remember everytime you upgrade you will need to re-edit this file.
 
Back
Top