Hi, you want to show avatars next to the threads inside "Your Latest Threads" table if so then do this!
Go to
Admin Control Panel >>
Templates & Style >>
Templates >> Your Custom Template >>
User Control Panel Templates >>
usercp_latest_threads_threads
Inside the template find:
PHP Code:
<td class="{$bgcolor}">{$gotounread}{$thread['displayprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">{$thread['subject']}</a><br /><span class="smalltext">{$thread['author']}</span></td>
Replace it with this HTML code:
PHP Code:
<td id="tvatar">{$thread_avatar}</td><td class="{$bgcolor}">{$gotounread}{$thread['displayprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">{$thread['subject']}</a><br /><span class="smalltext">{$thread['author']}</span></td>
Now we need to add some PHP code! Open your
usercp.php file and find:
PHP Code:
if($mybb->settings['threadreadcut'] > 0)
Above it add this PHP code:
PHP Code:
if(!$thread['avatar']) {
$thread_avatar = "<a href='member.php?action=profile&uid={$thread['uid']}'><img src='images/default_avatar.gif' alt='' title='{$thread['username']}' /></a>";
}
else
{
$thread_avatar = "<a href='member.php?action=profile&uid={$thread['uid']}'><img src='{$thread['avatar']}' alt='' title='{$thread['username']}' /></a>";
}
Next find:
PHP Code:
SELECT t.*, t.username AS threadusername, u.username
Replace it with this PHP expression:
PHP Code:
SELECT t.*, t.username AS threadusername, u.username, u.avatar
That is it you are all set. For more info check this thread:
http://letsforum.com/Thread-Display-Avat...ke-XenForo
Please tell me if it works. If you maybe need some CSS style change then feel free to ask