Need This Modification [Auto Code ALL Links]

anantthakor

New Member
Auto Code ALL Links


Code:
http://www.vbulletin.org/forum/showthread.php?t=151746&highlight=code+around+links

And also please tell me will it work on 3.7.x ?
 

JonDS

New Member
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);


It says its for 3.6.7, noone has replyed to say if it works on 3.7 and i have not tried it - Sorry
 
mertoxin said:
JonDS thank u so much...

how do i
PHP:
[hide][code] & [/hide][/code]
bbcode in this style ?

you just want HIDE bbcode? Many hacks will give you this. Maybe you can add the HIDE tags to your edits above?

Also, your tags should be [noparse][hide]
Code:
[/hide][/noparse]
 

mertoxin

New Member
psilocybin said:
you just want HIDE bbcode? Many hacks will give you this. Maybe you can add the HIDE tags to your edits above?

Also, your tags should be [noparse][hide]
Code:
[/hide][/noparse]

Thanks for reply but i don't want to do this.

I want to make a hide code combination for this soulition...

JonDS said:
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);


It says its for 3.6.7, noone has replyed to say if it works on 3.7 and i have not tried it - Sorry
 

mertoxin

New Member
psilocybin said:
you just want HIDE bbcode? Many hacks will give you this. Maybe you can add the HIDE tags to your edits above?

Also, your tags should be [noparse][hide]
Code:
[/hide][/noparse]

Thanks your reply but i don't want to do this.

I want to make hide code combination on this soulition...


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

[url=http://www.google.com]Google[/url]
[url=http://www.google.com]Google[/url]
[url=http://www.google.com]Google[/url]
[url=http://www.google.com]Google[/url]

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);


It says its for 3.6.7, noone has replyed to say if it works on 3.7 and i have not tried it - Sorry
Code:
 

mertoxin

New Member
Thanks for reply but i don't want to do this.

I want to "hide" & "code" combination on this style...
Any soulition ?

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);


It says its for 3.6.7, noone has replyed to say if it works on 3.7 and i have not tried it - Sorry
 

mertoxin

New Member
I found the soulition for hide & code combination;

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

PHP:
$text = preg_replace($urlSearchArray, $urlReplaceArray, $messagetext);
$text = str_replace("[/code][/hide]\r\n[hide][code]","\r\n",$text);
$text = str_replace("[/code][/hide]\n[hide][code]","\n",$text);

Thanks all...
 

AtiQ

New Member
so.........if i use hide + code both combination then how ppl/memebrs would be able to see the link?

do they hv to replay? press thanks button? or how they are gonna see the links if i hide the link?
 
Top