diff --git a/editpost.php b/editpost.php
index b12596a..a3b671d 100644
--- a/editpost.php
+++ b/editpost.php
@@ -134,6 +134,7 @@
$ppost['signtext']=$sign;
$ppost['text']=$message;
$ppost['options']=$poptions;
+ $ppost['moodid']=$_POST['moodid'];
// Edited notice
$ppost['edited'] = $edited;
@@ -152,7 +153,7 @@
$tblend
$tblstart
$tccellh width=150> $tccellh colspan=2> 
"; } -function doreplace2($msg, $options='0|0'){ +function doreplace2($msg, $options = null, $mood = 0) { + // @TODO php7.4 or w/e null coalescing + if ($options === null) $options = '0|0'; // options will contain smiliesoff|htmloff $options = explode("|", $options); $smiliesoff = $options[0]; @@ -526,15 +528,19 @@ function doreplace2($msg, $options='0|0'){ } } - $msg=str_replace('[red]', '',$msg); - $msg=str_replace('[green]', '',$msg); - $msg=str_replace('[blue]', '',$msg); - $msg=str_replace('[orange]','',$msg); - $msg=str_replace('[yellow]','',$msg); - $msg=str_replace('[pink]', '',$msg); - $msg=str_replace('[white]', '',$msg); - $msg=str_replace('[black]', '' ,$msg); - $msg=str_replace('[/color]','',$msg); + // &mood& pseudo-tag + $msg=str_replace('&mood&', $mood, $msg); + + $msg=str_replace('[red]', '', $msg); + $msg=str_replace('[green]', '', $msg); + $msg=str_replace('[blue]', '', $msg); + $msg=str_replace('[orange]','', $msg); + $msg=str_replace('[yellow]','', $msg); + $msg=str_replace('[pink]', '', $msg); + $msg=str_replace('[white]', '', $msg); + $msg=str_replace('[black]', '', $msg); + $msg=str_replace('[/color]','', $msg); + $msg=preg_replace("'\[quote=(.*?)\]'si", '". str_replace($list, $list2, $text[0]) ."
Originally posted by \\1
', $msg); $msg=str_replace('[quote]','',$msg); @@ -1114,7 +1120,7 @@ function boardmessage($text, $title = "Message") { function moodlist($sel = 0, $return = false) { global $loguserid, $log, $loguser; - //$sel = $sel; + $sel = intval($sel); $moodlist = array( "(default)", @@ -1141,7 +1147,7 @@ function moodlist($sel = 0, $return = false) { $ret = "\n"; diff --git a/lib/threadpost.php b/lib/threadpost.php index c94653d..9d628d7 100644 --- a/lib/threadpost.php +++ b/lib/threadpost.php @@ -7,9 +7,9 @@ $set['bg'] = ${"tablebg$bg"}; $set['tdbg'] = "
',$msg); $msg=str_replace('[/quote]',''uid'), $linkclass); - unset($postuser); + $linkclass = "url".$post['uid']; + $userlink = getuserlink($post, array('id'=>'uid'), $linkclass); + unset($postuser); $set['userrank'] = getrank($post['useranks'],str_replace(" idiot", $post['title']),$post['posts'],$post['powerlevel']); $set['userlink'] = "{$userlink}"; @@ -37,7 +37,7 @@ $set['threadlink'] = "{$pthread['title']}"; } - $post['text']=doreplace2($post['text'], $post['options']); + $post['text']=doreplace2($post['text'], $post['options'], $post['moodid']); if (filter_int($post['editdate'])) { $post['edited'] = " (last edited by {$post['edited']} at ".date($dateformat,$post['editdate']+$tzoff).")"; @@ -98,8 +98,8 @@ $post['headtext']=doreplace($post['headtext'],$post['num'],($post['date']-$post['regdate'])/86400,$post['name']); $post['signtext']=doreplace($post['signtext'],$post['num'],($post['date']-$post['regdate'])/86400,$post['name']); } - $post['headtext']=doreplace2($post['headtext']); - $post['signtext']=doreplace2($post['signtext']); + $post['headtext']=doreplace2($post['headtext'], null, $post['moodid']); + $post['signtext']=doreplace2($post['signtext'], null, $post['moodid']); // $post['text']=doreplace2($post['text'], $post['options']); return $post; }