Advertisement:

Author Topic: how to modifi url link  (Read 535 times)

Offline Dhayzon

  • Sophist Member
  • *****
  • Posts: 1,068
  • Gender: Male
  • DhayZone RevolutioN
    • Dhayzon on GitHub
    • @dhayzon on Twitter
    • http://dhayzon.com/
how to modifi url link
« on: March 19, 2017, 12:17:44 PM »
how to  auto modify URL link ?

example here

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

this  is an url , click here
Code: [Select]
[url=http://www.simplemachines.org]this  is an url , click here[/url]
Code: [Select]
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>',

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,327
  • Gender: Male
    • Kindred-999 on GitHub
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Dhayzon

  • Sophist Member
  • *****
  • Posts: 1,068
  • Gender: Male
  • DhayZone RevolutioN
    • Dhayzon on GitHub
    • @dhayzon on Twitter
    • http://dhayzon.com/
Re: how to modifi url link
« Reply #2 on: March 19, 2017, 01:37:20 PM »
it  don't work in wap or print , it use javascript, :( I'll keep looking

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 66,996
    • Arantor on GitHub
Re: how to modifi url link
« Reply #3 on: March 19, 2017, 06:38:05 PM »
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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

Offline Dhayzon

  • Sophist Member
  • *****
  • Posts: 1,068
  • Gender: Male
  • DhayZone RevolutioN
    • Dhayzon on GitHub
    • @dhayzon on Twitter
    • http://dhayzon.com/
Re: how to modifi url link
« Reply #4 on: March 20, 2017, 09:18:26 AM »
is possible filter content bbcode?   [tag=url] Filter http:// or img with replace function[/tag] for example

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

to

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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,327
  • Gender: Male
    • Kindred-999 on GitHub
Re: how to modifi url link
« Reply #5 on: March 20, 2017, 10:27:55 AM »
what??

and why??

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