2012-04-03, 04:39 PM
2012-04-03, 04:44 PM
2012-04-04, 09:06 AM
oh! thanks you so much .
2014-10-02, 02:24 PM
This mod does NOT work for MyBB 1.8.0
Any solution?
Well, I found a solution for that ^_^
To add post icon in forum index:
1- Open "functions_forumlist.php" file placed in MyBB "inc" folder.
2- Add $cache variable to the function "build_forumbits" globals list:
3- Find this code(line 308 in MyBB 1.8.0 version):
And add this code before it:
4- Go to Admin CP > Templates & Style > Templates > Your template set > Forum Bit Templates > forumbit_depth2_forum_lastpost And replace all code inside it with code below:
Demo: [attachment=32685]
Any solution?
Well, I found a solution for that ^_^
To add post icon in forum index:
1- Open "functions_forumlist.php" file placed in MyBB "inc" folder.
2- Add $cache variable to the function "build_forumbits" globals list:
function build_forumbits($pid=0, $depth=1)
{
// add here ∇
global $cache,$db, $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;
static $private_forums;
3- Find this code(line 308 in MyBB 1.8.0 version):
eval("\$lastpost = \"".$templates->get("forumbit_depth{$depth}_forum_lastpost")."\";");
And add this code before it:
$icons = $cache->read("posticons");
$query = $db->simple_select("threads", "icon", "tid ={$lastpost_data['lastposttid']}");
$thread = $db->fetch_array($query);
$icon = $icons[$thread['icon']];
4- Go to Admin CP > Templates & Style > Templates > Your template set > Forum Bit Templates > forumbit_depth2_forum_lastpost And replace all code inside it with code below:
<span class="smalltext">
<img src="{$icon['path']}" alt="{$icon['name']}" title="{$icon['name']}" />
<a href="{$lastpost_link}" title="{$full_lastpost_subject}">{$full_lastpost_subject}</a> <br />
{$lang->forumbit_lastpost} {$lang->by} {$lastpost_profilelink}<a href="{$lastpost_link}" title="{$full_lastpost_subject}"></a><br /> {$lang->at} {$lastpost_date}
</span>
Demo: [attachment=32685]