Status
Not open for further replies.
7 comments
Simple Google helps sometimes :S

Tested vbulletin 4 works

This mod involves editing a PHP file from vBulletin.

open the includes/functions_newpost.php

Find


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

And replace with


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


OR

This mod involves editing a PHP file from vBulletin.

open the includes/functions_newpost.php

Find


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

And replace with


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

What this will do is make any link such as Google appear like this:

Code:
http://google.com


Last Way Just Can Put Code Tag Near Every URl And Cant Code Multi Urls Near Like It :

Google
Google
Google
Google

If You Want To Code Links Like That To This:



Code:
http://www.google.com
http://www.google.com
http://www.google.com
http://www.google.com

Just Do It :

Replace This :



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

With This :



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

And After This :



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

Put This Line :



PHP:
$text = str_replace("[/code]\r\n[code]","\r\n",$text);
$text = str_replace("[/code]\n[code]","\n",$text);
 
I had this working OK but for some reason its stopped. I made sure the file still had the edits mentioned above as well.

EDIT: it was a post with URL tag. For some weird reason the URL tags were not showing when editing the post
 
Status
Not open for further replies.
Back
Top