Log in

View Full Version : Auto Code ALL Links


SiK xGODx
07-08-2007, 10:00 PM
This mod involves editing a PHP file from vBulletin.

open the includes/functions_newpost.php

Find

$urlReplaceArray = array(
"\\2\\4"
);


And replace with

$urlReplaceArray = array(
"\\2\\4"
);


What this will do is make any link such as http://google.com appear like this: http://google.com

SiK xGODx
07-09-2007, 04:16 AM
Reserved

NOTE: You can still make clickable URL's you just have to use the [url] tag. It just doesnt auto do the urls anymore.

Hornstar
07-09-2007, 05:11 AM
Hey nice work, I can see this being very useful on a fair few sites.

Jibreil
07-09-2007, 07:06 AM
Thank you for this mod.

p.s. I guess this needs to be moved to the Template Modification forum

grandfso
07-09-2007, 08:09 AM
And where do you see any template modified here? I'll consider using this mod later, thanks!

projectego
07-09-2007, 08:19 AM
Nice idea, SiK xGODx. It's not something I need at the moment but I'm sure plenty others will find it useful. :)

Symbian Galaxy
07-09-2007, 08:57 AM
Installed!

dartho
07-09-2007, 09:35 AM
just a suggestion - wouldn't it be tidier to use NOPARSE rather than CODE tags?

then http://www.google.com = http://www.google.com

Mecho
07-09-2007, 10:53 AM
awesooooooooooome .. thanks aloooooot

SiK xGODx
07-09-2007, 06:13 PM
i like the code tags because i have a download site and it makes the downloads stick out more

and ya if staff thinks this should b in template mods feel free

HDT
07-09-2007, 07:12 PM
Great idea,subscribe first,may be installed later,not need it for now maybe later.

princeedward
07-09-2007, 07:33 PM
great and thanks for this... ;)

Xplorer4x4
07-10-2007, 04:16 AM
Sorry but i dont see any practicality in this hack when you can already disable urls from being parsed using other hacks that do not require code edits.

Good job all the same just dont find it practical. Sorry.

Triky
07-10-2007, 09:26 AM
Maybe this will be usefull for me. Installed. :)

Mecho
07-11-2007, 12:27 PM
today i saw live links in my board :D he used like this :
[url=http://link here.com]live link[/url*

is there anyway to fix this too ? thanks

Hendrizius
07-12-2007, 03:58 PM
today i saw live links in my board :D he used like this :
[url=http://link here.com]live link[/url*

is there anyway to fix this too ? thanks

same problem

Luky
07-15-2007, 06:40 AM
today i saw live links in my board :D he used like this :
[url=http://link here.com]live link[/url*

is there anyway to fix this too ? thanks
Put [url in the filtered bad words?

Lag
07-19-2007, 01:23 AM
You can still have "live" links. The purpose of this mod is to keep most links coded. This is not to eliminate all live links.

Yours
07-19-2007, 01:34 AM
A fix you should make:

It attempts to put the [code] tag around url's in the SHOUTBOX as well. make it so it doesn't do this would be greatly appreciated!

Luky
07-19-2007, 04:18 AM
You can still have "live" links. The purpose of this mod is to keep most links coded. This is not to eliminate all live links.
Yes but some forums want that. It may possibly be for privacy reasons? If they stop clickable links, the website they link too cannot easily track their location before that let them know of that site. Its a very common method for illegal sites and sites who just wish to remain unkown.

edongski
11-10-2007, 02:48 PM
Nice... Is there a way to keep it specific to a specific forum/subforum only?

360junkie
01-24-2008, 09:14 PM
did u still this iv seen this post a diff website about 3months ago

takworld
01-27-2008, 04:35 PM
Hi , i change the url to code but does n't work curretly :(

irfreedownload
01-27-2008, 08:53 PM
i cant finde these cod?!!!!!!

ReaperUK
01-28-2008, 10:16 PM
Nice... Is there a way to keep it specific to a specific forum/subforum only?

would like this feature also

takworld
01-29-2008, 04:25 PM
Thanks

Nitro212
01-30-2008, 07:28 PM
meh this is good and sucks at the same time.. cuz if u add more then one url u going to have 10 code boxes.. should be better to include all url's in the same code box :)

free-offline
03-16-2008, 10:48 PM
Last Way Just Can Put Code Tag Near Every URl And Cant Code Multi Urls Near Like It :

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

If You Want To Code Links Like That To This:

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

Just Do It :

Replace This :

$urlReplaceArray = array(
"\\2\\4"
);

With This :

$urlReplaceArray = array(
"\\2\\4"
);


And After This :

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

Put This Line :


$text = str_replace("[/code]\r\n","\r\n",$text);
$text = str_replace("\n[code]","\n",$text);

F0xy
03-17-2008, 10:27 AM
Last Way Just Can Put Code Tag Near Every URl And Cant Code Multi Urls Near Like It :

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

If You Want To Code Links Like That To This:

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

Just Do It :

Replace This :

$urlReplaceArray = array(
"\\2\\4"
);

With This :

$urlReplaceArray = array(
"\\2\\4"
);


And After This :

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

Put This Line :

$text = str_replace("[/code]\r\n[code]","\r\n",$text);

i did this but it still codes each link separately

free-offline
03-17-2008, 07:49 PM
Sorry , Post Edited !
I Forgot To Put One Line ;):D .

sunny_girl
03-17-2008, 10:23 PM
Nice idea

ReaperUK
03-17-2008, 10:48 PM
thnx again...

F0xy
03-18-2008, 09:55 AM
great thanks a million, it works a charm

wage the war
04-06-2008, 05:36 PM
Would be great if this was developed a little more. If members put their own code tags around the url it gets double coded :(

dancue
05-01-2008, 02:22 PM
anyone know what the code would be to only do the change on certain forums?

Within those specified forums the urls should have the [code] tags. Any other forum should have the default [url].

I imagine it would be something using IF and ELSE but I'm still a noob.

dancue
05-01-2008, 03:21 PM
nevermind

Big Barry
05-06-2008, 09:36 AM
Is it possible to make this only happen on a certain extension? for example if it was a .mp3 it would automatically code? If it is possible, this would rock as I could use it to auto embed mp3 files (as I have the [mp3] bb code :D :D

smonabav
05-06-2008, 12:30 PM
sorry, i'm new in vB, where can i find and edit "includes/functions_newpost.php"

dancue
05-06-2008, 03:49 PM
sorry, i'm new in vB, where can i find and edit "includes/functions_newpost.php"

This is a file uploaded when you first installed vbulletin. If you were to search for it on your server it would be located within your forum under the includes foler.

Mecho
05-16-2008, 01:01 PM
Sorry , Post Edited !
I Forgot To Put One Line ;):D .

not working for me . each link goes separately :(

wtfsoccerdude
05-27-2008, 08:25 AM
awesome! :D

SmileyR
07-08-2008, 08:26 AM
i may be late to post this but i dont think it will change the previously posted links only the newer ones...

patrick1110
08-02-2008, 06:24 PM
i have done this but it does not work on my new skin, why?

parseforum
08-22-2008, 10:59 AM
How to active this mod just for registered user group and disable for moderator and administrators ?

zero5854
10-31-2008, 09:40 PM
awesome code thanks@

wtfsoccerdude
11-06-2008, 04:57 PM
Will this work on 3.7?

It worked once but then didn't work after that :/.

I previewed a post, and the links were coded but when I posted it, the links were just text links. Now it doesn't even code it in previews.

raja811
11-10-2008, 08:00 AM
thanks

wtfsoccerdude
11-14-2008, 04:24 AM
Doesn't work for me anymore. It was coding links perfectly before but now it only works sometimes. What could be the problem?

sherwood
11-15-2008, 05:31 PM
thank you this is awesome!

mr.reza
11-30-2008, 04:49 PM
its not work in 3.7

d3v1L
12-21-2008, 12:53 PM
works in 3.7.3 thanks

d3v1L
12-21-2008, 02:06 PM
anyway to add code tags to existing url's?

f4vn
12-24-2008, 03:40 PM
hello,

If link like:

http://www.domain.com

http://www.domain.com

http://www.domain.com

http://www.domain.com

Can you tell me how to fix ?

dxflw
04-03-2009, 09:18 PM
today i saw live links in my board :D he used like this :
[url=http://link here.com]live link[/url*

is there anyway to fix this too ? thanks


Same problem

Davros
04-04-2009, 05:23 PM
Doesn't work for me usin 3.8.1

what happens is when I submit a url like www.test-forum.com it turns out like test forum (www.test-forum.com)

Davros
04-05-2009, 09:12 PM
I'd be very carefull when using this as I've decided to revert the code back to the [url] tags yet it has not taken effect, I've just upgraded to 3.8.2 but it has still had no effect, so I can only assume something has been written to the database.

algert
05-13-2009, 09:35 AM
just a suggestion - wouldn't it be tidier to use NOPARSE rather than CODE tags?

then http://www.google.com = http://www.google.com

Yeah how can I do this? :S

ACiD619
05-30-2009, 02:53 PM
I wanna know how to do that too.

skol
07-12-2009, 07:30 PM
Got a problem with this in 3.8.3 it auto codes the links in a new thread but dosen't in replies..
Anyone!

Andy69
07-20-2009, 12:27 PM
You can also disable live links in your newthread / newreply templates by setting urlparsing to 0.
and its the best one, the other ways have loopholes where if you write it right, it will still be live link, with his, its 100% no live links will get thru

Mecho
07-22-2009, 11:51 AM
You can also disable live links in your newthread / newreply templates by setting urlparsing to 0.
and its the best one, the other ways have loopholes where if you write it right, it will still be live link, with his, its 100% no live links will get thru

still if they use [url] , links will be live .

millardjb
03-18-2012, 07:30 PM
This mod involves editing a PHP file from vBulletin.

open the includes/functions_newpost.php

Find

$urlReplaceArray = array(
"\\2\\4"
);


And replace with

$urlReplaceArray = array(
"\\2\\4"
);


What this will do is make any link such as http://google.com appear like this: http://google.com


Is there a way to make this a conditional so that it applies to ONLY a single forum? And the other forums use the original auto-hyperlink?

millardjb
03-28-2012, 08:05 AM
Can the code be modified so that it is compatible with "AME - The Automatic Media Embeding System"?

ringnews24
12-16-2012, 12:28 PM
This stopped my auto rss from posting properly.

It left web codes in the middle of the text description.

jimnyc
04-03-2013, 12:15 AM
The code doesn't even show in that file in version 4.2.

I wouldn't suppose anyone would know how to make this work in 4.2?

Thanks!

fai99al99
08-14-2013, 12:14 AM
The code doesn't even show in that file in version 4.2.

I wouldn't suppose anyone would know how to make this work in 4.2?

Thanks!
its still work in vb4.2

look for $urlReplaceArray[] = "\\2\\4"; inside functions_newpost
chenge it to
$urlReplaceArray[] = "\\2\\4";

chudvs
08-08-2019, 08:15 AM
I had a custom mod made (which does "Enable/Disable Active Links posting in specific forum") just for this in the mid 2000's glad to say it still works today on 4.2.5 :)