[fix #50] spoiler tags suck less now! wow

This commit is contained in:
Xkeeper
2018-11-04 15:54:15 -08:00
parent ff64c3cd2a
commit ffaaed9134
2 changed files with 23 additions and 2 deletions

View File

@@ -529,8 +529,10 @@ function doreplace2($msg, $options='0|0'){
$msg=str_replace('[/quote]','<hr></blockquote>',$msg);
$msg=preg_replace("'\[sp=(.*?)\](.*?)\[/sp\]'si", '<span style="border-bottom: 1px dotted #f00;" title="did you mean: \\1">\\2</span>', $msg);
$msg=preg_replace("'\[abbr=(.*?)\](.*?)\[/abbr\]'si", '<span style="border-bottom: 1px dotted;" title="\\1">\\2</span>', $msg);
$msg=str_replace('[spoiler]','<div class="fonts pstspl2"><b>Spoiler:</b><div class="pstspl1">',$msg);
$msg=str_replace('[/spoiler]','</div></div>',$msg);
$msg=str_replace('[spoiler]','<label class="spoiler spoiler-b"><div class="spoiler-label"></div><input type="checkbox"><div class="hidden"><div>',$msg);
$msg=str_replace('[/spoiler]','</div></div></label>',$msg);
$msg=str_replace('[spoileri]','<label class="spoiler"><span class="spoiler-label"></span><input type="checkbox"><span class="hidden"><span>',$msg);
$msg=str_replace('[/spoileri]','</span></span></label>',$msg);
$msg=preg_replace("'\[(b|i|u|s)\]'si",'<\\1>',$msg);
$msg=preg_replace("'\[/(b|i|u|s)\]'si",'</\\1>',$msg);
$msg=preg_replace("'\[img\](.*?)\[/img\]'si", '<img src=\\1>', $msg);