Aditional protocols | ed2k links

Started by otario, February 06, 2005, 10:11:58 PM

Previous topic - Next topic

otario

Hello,

I've been trying to get my smf board to accept ed2k links, at least in <a href> statements, but either it doesn't link at all or it links with a http:// prefix or it links only until the first tube (|). Can someone help me with this, I've got few experience with php and am having a really difficult time with this. I get the chills just from looking at that preg_replace() on line 780...

Thanks in advance :)

PS: subs.php line 989
$message = preg_replace('~&lt;a\s+href=(?:&quot;)?(?:\[url\])?((?:http://|ftp:/\|https://|ftps://|mailto:).+?) (...)
Shouldn't it be ftp:// ?

[Unknown]


gandyman

Hello ppl

I have the same problem ????
Its impossible to make an active ed2k link.

I see the answer is ,, solved,,
but ? how what why ??
What must I do.?

and yes I have the latest version from MSF  ;D

I use it very short now but its most impressive end best looking forum program I ever seen.

thx for creating it 

EkSeS

Hi,

Have  try to add ed2k tags in Subs.php

(?:http|https|ftp|ftps|irc|ed2k|ed2k://|[EDK]ed2k://|file|)://


doesn't match.  ::)



ufuk.exe

#4
There should be a way to add them to SMF to be supported without a mod,

maybe there is a way to disable protocol check.. by removing the whole line.

So that even if someone types

telnet://127.0.0.1
it does not automatically put html in front of it...


<a href="telnet://telnet.link">Telnet Link A HREF </a>

www.34tr.com - Nostalgia Istanbul
www.jeepprojects.com - Jeep Projects

That's It Simple Machines Forum,
It just couldn't be simpler.

7mSeni

Find (subs.php):
$data = preg_replace(array('~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data);

add: |ed2k



Dannii

shouldn't be too hard to make a mod for a BBCode which doesn't parse the protocol. I'll think about it.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

ufuk.exe

www.34tr.com - Nostalgia Istanbul
www.jeepprojects.com - Jeep Projects

That's It Simple Machines Forum,
It just couldn't be simpler.

Advertisement: