Modify File source\class\block\forum\block_thread.php
if($messagearr) { foreach($messagearr as $tid=$var) { $thread=$_g[' Block_thread '] [$tid]; if($nospecial) { $thread[' special '] = 0; } if($thread[' special '] = = 1) { $polloptions=Array(); $multiple= Db::result_first ("Select multiple from". Db::table (' Forum_poll '). " WHERE tid= '$tid‘"); $optiontype=$multiple? ' checkbox ': ' Radio '; $query= Db::query ("Select Polloptionid, Polloption from". Db::table (' forum_polloption '). " WHERE tid= '$tid' ORDER by Displayorder '); while($polloption= Db::fetch ($query)) { $polloption[' polloption '] =Preg_replace("/\[url= (https?) {1}:\/\/([^\[\ "']+?) \](.+?) \[\/url\]/i "," <a href=\ "\\1://\\2\" target=\ "_blank\" >\\3</a> ",$polloption[' Polloption ']); $polloptions[] =$polloption; } } ElseIf($thread[' special '] = = 2) { $trade= C::t (' Forum_trade ')->fetch_first_goods ($tid); $trade[' aid '] =$trade[' Aid ']? Getforumimg ($trade[' Aid ']) : ‘‘; $trades[$tid][] =$trade; } ElseIf($thread[' special '] = = 3) { $extcredits=$_g[' Settings '] [' Extcredits ']; $creditstransextra=$_g[' Settings '] [' Creditstransextra ']; $rewardend=$thread[' Price '] < 0; $rewardprice=ABS($thread[' Price ']); $message= Messagecutstr (Preg_replace('/\[[^\]]*\]/', ',$var),$messagelength, ‘‘); } ElseIf($thread[' special '] = = 4) { $message= Messagecutstr (Preg_replace('/\[[^\]]*\]/', ',$var),$messagelength, ‘‘); $activity= Db::fetch_first ("Select aid, Number, applynumber from". Db::table (' forum_activity '). " WHERE tid= '$tid‘"); $activity[' aid '] =$activity[' Aid ']? Getforumimg ($activity[' Aid ']) : ‘‘; $activity[' aboutmember '] =$activity[' Number ']-$activity[' Applynumber ']; } ElseIf($thread[' special '] = = 5) { $message= Messagecutstr (Preg_replace('/\[[^\]]*\]/', ',$var),$messagelength, ‘‘); $debate= C::t (' forum_debate ')->fetch ($tid); $debate[' affirmvoteswidth '] =$debate[' Affirmvotes ']?intval(80 * ($debate[' affirmvotes '] + 1)/($debate[' affirmvotes '] +$debate[' negavotes '] + 1)): 1; $debate[' negavoteswidth '] =$debate[' Negavotes ']?intval(80 * ($debate[' negavotes '] + 1)/($debate[' affirmvotes '] +$debate[' negavotes '] + 1)): 1; $debate[' affirmpoint '] = Discuzcode ($debate[' Affirmpoint '], 0, 0, 0, 1, 1, 0, 0, 0, 0, 0); $debate[' negapoint '] = Discuzcode ($debate[' Negapoint '], 0, 0, 0, 1, 1, 0, 0, 0, 0, 0); } Else { $message= Messagecutstr (Preg_replace('/\[[^\]]*\]/', ',$var),$messagelength, ‘‘); } includeTemplate (' Common/block_thread '); $returnarr[$tid] =$return; } }
Discuz DIY Module Content introduction UBB code filtering incomplete solution