Решение для версии 1.9
файл /components/board/model.php (строка ~302):находим в
public function getAdverts($show_all = false, $is_users = false, $is_coments = false, $is_cats = false)... .......... 302. //подготовим условия
$sql = "SELECT i.*{$r_select}
$pub_where = ($show_all ? '1=1' : 'i.published = 1'); $r_join = $is_users ? " LEFT JOIN cms_users u ON u.id = i.user_id \n" : ''; $r_join .= $is_users ? " LEFT JOIN cms_user_profiles up ON up.user_id = u.id \n" : ''; $r_join .= $is_cats ? " INNER JOIN cms_board_cats cat ON cat.id = i.category_id" : ''; $r_select = $is_users ? ', u.login, u.nickname, u.is_deleted as author_out' : ''; $r_select .= $is_users ? ', up.imageurl as author_avatar' : ''; $r_select .= $is_cats ? ', cat.title as cat_title, cat.obtypes' : '';
$item['file'] = 'nopic.jpg'; }
include_once($_SERVER['DOCUMENT_ROOT'].'/components/users/includes/usercore.php'); } $item['avatar'] = usrImageNOdb($item['user_id'], 'small', $item['author_avatar'], $item['author_out']);
{if $cfg.photos} <td width="30" valign="top"> <img class="bd_image_small" src="/images/board/small/{$con.file}" border="0" alt="{$con.title|escape:'html'}"/>{***добавлено***}{$con.avatar}{***добавлено***} </td> {/if}
public function getRecord($item_id) { $this->deleteOldRecords(); $this->clearOldVips(); $sql = "SELECT i.*, a.id as cat_id, a.form_id, a.NSLeft as NSLeft, a.NSRight as NSRight, a.title as cat_title, a.title as category, a.public as public, a.thumb1 as thumb1, a.thumb2 as thumb2, a.thumbsqr as thumbsqr, u.nickname as user, u.login as user_login, u.is_deleted as author_out, up.imageurl as author_avatar FROM cms_board_items i LEFT JOIN cms_board_cats a ON a.id = i.category_id LEFT JOIN cms_users u ON u.id = i.user_id LEFT JOIN cms_user_profiles up ON up.user_id = u.id WHERE i.id = '$item_id' "; $result = $this->inDB->query($sql); if (!$this->inDB->num_rows($result)){ return false; } $record = $this->inDB->fetch_assoc($result); $record['is_overdue'] = round($timedifference / 86400) > $record['pubdays'] && $record['pubdays'] > 0; $record['fpubdate'] = $record['pubdate']; $record['pubdate'] = cmsCore::dateFormat($record['pubdate']); $record['vipdate'] = cmsCore::dateFormat($record['vipdate']); $record['moderator'] = $this->checkAccess($record['user_id']); $record['file'] = ''; } include_once($_SERVER['DOCUMENT_ROOT'].'/components/users/includes/usercore.php'); } $record['avatar'] = usrImageNOdb($record['user_id'], 'small', $record['author_avatar'], $record['author_out']); if (!$record['formsdata']){ } else { $record['form_array'] = $this->inCore->yamlToArray($record['formsdata']); } $record = cmsCore::callEvent('GET_BOARD_RECORD', $record); return $record; }
например так:
<table width="100%" height="" cellspacing="" cellpadding="0" class="bd_item_full"> <tr>{***добавлено***}<td>{$item.avatar}</td>{***добавлено***}