• Welcome to Simple Machines Community Forum. Please login or sign up.
January 20, 2022, 06:44:46 AM

News:

Follow SMF on Twitter.


how to modifi url link

Started by Dhayzon, March 19, 2017, 12:17:44 PM

Previous topic - Next topic

Dhayzon

how to  auto modify URL link ?

example here

http://www.simplemachines.org
[url=http://www.simplemachines.org]http://www.simplemachines.org[/url]
to

this  is an url , click here
[url=http://www.simplemachines.org]this  is an url , click here[/url]


array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" class="bbc_link" target="_blank">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


            'before' => '<a href="$1" class="bbc_link" target="_blank">',
                                             this  is an url , click here
            'after' => '</a>',

Kindred

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."

Dhayzon

it  don't work in wap or print , it use javascript, :( I'll keep looking

Arantor

It won't work in print mode, because that would be insane to never let people see the URLs they're going to when you print it out.

As for WAP mode, that's also kind of the specification - and the mod only uses JavaScript when posting, not in the forum display.
No good deed goes unpunished
All helpful urges should be circumvented

Dhayzon

is possible filter content bbcode?   [tag=url] Filter http:// or img with replace function[/tag] for example

[tag=http://url]aks blablalbalblab  http://other url[/tag] 

to

[tag=http://url]http://otherurl[/tag]   

Kindred

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."

Advertisement: