Unknown Soldier
Mapping a map
- Joined
- Oct 30, 2010
- Messages
- 263
- Solutions
- 11
- Reaction score
- 621
Hello everyone,
currently I am trying to implement one feature to ACC forum, which is replacing phpbb [ url= with html <a href>
It is already done the simple way:
1 - www.adress.com
but I was also trying to do it this way:
2 - Description
which is a lot nicer, but... I failed... Original code for first option is:
So I've been trying with just editing this code, but I guess I might need something which I have no idea of... this is why I am asking for help
currently I am trying to implement one feature to ACC forum, which is replacing phpbb [ url= with html <a href>
It is already done the simple way:
1 - www.adress.com
but I was also trying to do it this way:
2 - Description
which is a lot nicer, but... I failed... Original code for first option is:
PHP:
while(stripos($text, '[url]') !== false && stripos($text, '[/url]') !== false && stripos($text, '[url]') < stripos($text, '[/url]'))
{
$url = substr($text, stripos($text, '[url]')+5, stripos($text, '[/url]') - stripos($text, '[url]') - 5);
$text = str_ireplace('[url]'.$url.'[/url]', '<b>[Link]</b><a href="'.$url.'" target="_blank">'.$url.'</a>', $text);
}
So I've been trying with just editing this code, but I guess I might need something which I have no idea of... this is why I am asking for help