تفضل
CODE
<?php
$TopSubjectVisitorArr = array();
// Order data
$TopSubjectVisitorArr['order'] = array();
$TopSubjectVisitorArr['order']['field'] = 'visitor';
$TopSubjectVisitorArr['order']['type'] = 'DESC';
// Ten rows only
$TopSubjectVisitorArr['limit'] = '10';
// Clean data
$TopSubjectVisitorArr['proc'] = array();
$TopSubjectVisitorArr['proc']['*'] = array('method'=>'clean','param'=>'html');
$PowerBB->_CONF['template']['while']['TopSubjectVisitor'] = $PowerBB->core->GetList($TopSubjectVisitorArr,'subject');
?>
<table width="100%" border="0" cellspacing="0" align="center">
<tr align="center">
<td width="80%" class="row1">
{$lang['subject_title']}
</td>
<td width="20%" class="row1">
{$lang['num_visitors']}
</td>
</tr>
{Des::while}{TopSubjectVisitor}
<?php
$src = "http://www.wasfat-mama.com/wasafat/styles/mobile/images/logo.png"; // الصورة الافتراضية
$textimg = $PowerBB->_CONF['template']['while']['TopSubjectVisitor'][$this->x_loop]['text'];
$textimg = str_ireplace('[IMG]' ,'<img src="',$textimg);
$textimg = str_ireplace('[/IMG]' ,'"/>',$textimg);
$images = array();
preg_match_all('/src=([\\'"])?((?(1).*?|\\S+))(?(1)\\1)/', $textimg, $images);
foreach ($images[2] as $src){
break;
}
?>
<tr align="center">
<td width="80%" class="row1">
<a href="index.php?page=topic&show=1&id={$TopSubjectVisitor['id']}">
<span style="float:right"><img src="<?php echo $src; ?> " alt="{$TopSubjectVisitor['title']}" width="60px" border="0"></span>
{$TopSubjectVisitor['title']}</a>
</td>
<td width="20%" class="row1">
{$TopSubjectVisitor['visitor']}
</td>
</tr>
{/Des::while}
</table>