1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-19 05:28:10 +01:00
CSS class homogenisation with link.bb
This commit is contained in:
marj 2009-10-06 11:05:36 +00:00
parent 838cd31df9
commit 2a6904b274

View File

@ -1,16 +1,19 @@
global $pref;
$parm = trim($parm);
$external = ($pref['links_new_window'] || strpos($parm, 'external') === 0) ? " rel='external'" : "";
$external = ($pref['links_new_window'] || strpos($parm, 'external') === 0) ? ' rel="external"' : '';
if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE)
{
$parm = preg_replace('#^external.#is', '', $parm);
if (strtolower(substr($parm,0,11)) == 'javascript:') return '';
return "<a href='".$tp -> toAttribute($parm)."'".$external.">".$code_text."</a>";
if (strtolower(substr($parm, 0, 11)) == 'javascript:')
return '';
return '<a href="'.$tp->toAttribute($parm).'" class="bbcode"'.$external.'>'.$code_text.'</a>';
}
else
{
if (strtolower(substr($code_text,0,11)) == 'javascript:') return '';
return "<a href='".$tp -> toAttribute($code_text)."'".$external.">".$code_text."</a>";
if (strtolower(substr($code_text, 0, 11)) == 'javascript:')
return '';
return '<a href="'.$tp->toAttribute($code_text).'" class="bbcode"'.$external.'>'.$code_text.'</a>';
}