PDA

View Full Version : Auto Code ALL Links


SiK xGODx
09 Jul 2007, 06:15
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
09 Jul 2007, 06:16
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
09 Jul 2007, 07:11
Hey nice work, I can see this being very useful on a fair few sites.

Jibreil
09 Jul 2007, 09:06
Thank you for this mod.

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

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

projectego
09 Jul 2007, 10:19
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
09 Jul 2007, 10:57
Installed!

dartho
09 Jul 2007, 11:35
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
09 Jul 2007, 12:53
awesooooooooooome .. thanks aloooooot

SiK xGODx
09 Jul 2007, 20:13
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
09 Jul 2007, 21:12
Great idea,subscribe first,may be installed later,not need it for now maybe later.

princeedward
09 Jul 2007, 21:33
great and thanks for this... ;)

Xplorer4x4
10 Jul 2007, 06:16
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
10 Jul 2007, 11:26
Maybe this will be usefull for me. Installed. :)

Mecho
11 Jul 2007, 14:27
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
12 Jul 2007, 17:58
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
15 Jul 2007, 08:40
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
19 Jul 2007, 03:23
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
19 Jul 2007, 03:34
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
19 Jul 2007, 06:18
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
10 Nov 2007, 16:48
Nice... Is there a way to keep it specific to a specific forum/subforum only?

360junkie
24 Jan 2008, 23:14
did u still this iv seen this post a diff website about 3months ago

takworld
27 Jan 2008, 18:35
Hi , i change the url to code but does n't work curretly :(

irfreedownload
27 Jan 2008, 22:53
i cant finde these cod?!!!!!!

ReaperUK
29 Jan 2008, 00:16
Nice... Is there a way to keep it specific to a specific forum/subforum only?

would like this feature also

takworld
29 Jan 2008, 18:25
Thanks

Nitro212
30 Jan 2008, 21:28
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
17 Mar 2008, 00:48
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
17 Mar 2008, 12:27
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
17 Mar 2008, 21:49
Sorry , Post Edited !
I Forgot To Put One Line ;):D .

sunny_girl
18 Mar 2008, 00:23
Nice idea

ReaperUK
18 Mar 2008, 00:48
thnx again...

F0xy
18 Mar 2008, 11:55
great thanks a million, it works a charm

wage the war
06 Apr 2008, 19:36
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
01 May 2008, 16:22
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
01 May 2008, 17:21
nevermind

Big Barry
06 May 2008, 11:36
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
06 May 2008, 14:30
sorry, i'm new in vB, where can i find and edit "includes/functions_newpost.php"

dancue
06 May 2008, 17:49
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
16 May 2008, 15:01
Sorry , Post Edited !
I Forgot To Put One Line ;):D .

not working for me . each link goes separately :(

wtfsoccerdude
27 May 2008, 10:25
awesome! :D

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

patrick1110
02 Aug 2008, 20:24
i have done this but it does not work on my new skin, why?

parseforum
22 Aug 2008, 12:59
How to active this mod just for registered user group and disable for moderator and administrators ?

zero5854
31 Oct 2008, 23:40
awesome code thanks@

wtfsoccerdude
06 Nov 2008, 18:57
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
10 Nov 2008, 10:00
thanks

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

sherwood
15 Nov 2008, 19:31
thank you this is awesome!

mr.reza
30 Nov 2008, 18:49
its not work in 3.7

d3v1L
21 Dec 2008, 14:53
works in 3.7.3 thanks

d3v1L
21 Dec 2008, 16:06
anyway to add code tags to existing url's?

f4vn
24 Dec 2008, 17:40
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
03 Apr 2009, 23:18
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 Apr 2009, 19:23
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
05 Apr 2009, 23:12
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
13 May 2009, 11:35
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
30 May 2009, 16:53
I wanna know how to do that too.

skol
12 Jul 2009, 21:30
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
20 Jul 2009, 14:27
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
22 Jul 2009, 13:51
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
18 Mar 2012, 20:30
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
28 Mar 2012, 10:05
Can the code be modified so that it is compatible with "AME - The Automatic Media Embeding System"?

ringnews24
16 Dec 2012, 13:28
This stopped my auto rss from posting properly.

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

jimnyc
03 Apr 2013, 02:15
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
14 Aug 2013, 02:14
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";