HideRand} class="hidem"{/if}>
{if $type!=='index'}{/if}
{$skip=array()}
{foreach $articles as $v}
{$skip[]=$v->ID}
{/foreach}
{if !$pagebar||$pagebar&&$pagebar->Count-count($skip)<1}
{$cfg->RandLog=false}
{/if}
{$where=array(array('not in','log_ID',$skip),array('=', 'log_Status', 0),array('=', 'log_IsTop', 0))}
{if $cfg->RandLog}
{$randstr=$zbp->db->type==='sqlite'?'RANDOM()':'RAND()';}
{if $type=='category'}{$where[]=array('=','log_CateID',$category->ID)}{/if}
{$randlogs=$zbp->GetArticleList('',$where,array($randstr),4)}
{else}
{$cmtids=json_decode(isset($modules['zit_cmtids'])?$modules['zit_cmtids'].Content:'',true)}
{if trim($cfg.CmtIds,',')}
{$cmtids=explode(',',$cfg.CmtIds)}
{/if}
{if $cmtids}
{$cmtid=$cmtids[array_rand($cmtids,1)]}
{$cmt=$zbp.GetCommentByID($cmtid)}
{if $cmt.Post.Tags}
{foreach $cmt.Post.Tags as $tag}
{$tag.Name}
{/foreach}
{$tag=null}
{/if}
{SubStrUTF8(TransferHTML($cmt.Post.Content,'[nohtml]'),140)}...
{if $cmt.Post.CommNums>1}{$msg.other} {$cmt.Post.CommNums-1} {$msg.commented}{else}{$msg.expect}{/if}
{$msg.join}{$cmt.Post.ViewNums}{$msg.guys}{$msg.crowds}
{$logs=null}
{else}
{$msg.welcome}
{$msg.advice}
{$gbook=$zbp.GetPostByID(trim($cfg.GbookID))}
{$msg.message}{$msg.sofa}
{/if}
{/if}