Ik wil dus als er in de url, van de [url] tag, websiteforum.nl/kb.php voor komt, dat de target="_blank" verwijderd word. Maar ik snap niet wat er aan mijn code fout is.
Code: Selecteer alles
// We do URLs in several different ways..
$bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']);
$bbcode_tpl['url1'] = (stristr($bbcode_tpl['url1'],'websiteforum.nl/kb.php') != FALSE) ? str_replace('target="_blank" ','',$bbcode_tpl_['url1']) : $bbcode_tpl['url1'];
// print($bbcode_tpl['url1']);
$bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']);
$bbcode_tpl['url2'] = (stristr($bbcode_tpl['url2'],'websiteforum.nl/kb.php') != FALSE) ? str_replace('target="_blank" ','',$bbcode_tpl_['url2']) : $bbcode_tpl['url2'];
// print($bbcode_tpl['url2']);
$bbcode_tpl['url3'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']);
$bbcode_tpl['url3'] = (stristr($bbcode_tpl['url3'],'websiteforum.nl/kb.php') != FALSE) ? str_replace('target="_blank" ','',$bbcode_tpl_['url3']) : $bbcode_tpl['url3'];
// print($bbcode_tpl['url3']);
$bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);
$bbcode_tpl['url4'] = (stristr($bbcode_tpl['url4'],'websiteforum.nl/kb.php') != FALSE) ? str_replace('target="_blank" ','',$bbcode_tpl_['url4']) : $bbcode_tpl['url4'];
// print($bbcode_tpl['url4']);
Iemand een idee wat ik fout doe?