News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

anonym.to

Started by patrikmuse, March 23, 2006, 04:24:18 AM

Previous topic - Next topic

patrikmuse

is possible to add the hxxp:anonym.to [nonactive] in SMF 1.1 RC2?? (sorry for my bad english  :( )

8)

Kindred

do you mean make all [ url] links use anonymn.to/?link ??

if so... then yes, add the code into the url tag processing function in subs.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

patrikmuse

can you explain me precisely (im new with php :D )

Kindred

find

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



I'm not so hot on pregreplace myself... but that's the line that you're going to modify (or add another pregreplace after)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

patrikmuse


Sheepy

Read this.
http://www.php.net/manual/en/reference.pcre.pattern.syntax.php

Read the line given by Kindred.

Then do it yourself.  This is a good chance for you to practice on regular expression, something you'll find useful in you future PHP experience.

Advertisement: