2010-08-30, 12:51 PM
Hi guys,
I developed and just tested out on mybb 1.6 a code modification to showing up thread prefixes on forum index.
Original dev-link:
http://www.methack.it/forum/thread-modif...forum.html
Follow these simple steps and enjoy...
Open /inc/functions_forumlist.php
Find:
Replace with:
Find:
Replace with:
Find:
Replace with:
I developed and just tested out on mybb 1.6 a code modification to showing up thread prefixes on forum index.
Original dev-link:
http://www.methack.it/forum/thread-modif...forum.html
Follow these simple steps and enjoy...
Open /inc/functions_forumlist.php
Find:
global $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;
Replace with:
global $db, $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;
Find:
elseif($hideinfo != true)
{
Replace with:
elseif($hideinfo != true)
{
/************** Show prefix on index ************ */
// @Author: Mattia
// @Web: www.methack.it/forum/
// Get the thread details from the database.
$thread = get_thread($lastpost_data['lastposttid']);
// Get thread prefix if there is one.
$thread['threadprefix'] = '';
$thread['displayprefix'] = '';
if($thread['prefix'] != 0)
{
$query = $db->simple_select('threadprefixes', 'prefix, displaystyle', "pid='{$thread['prefix']}'");
$threadprefix = $db->fetch_array($query);
$thread['threadprefix'] = $threadprefix['prefix'].' ';
$thread['displayprefix'] = $threadprefix['displaystyle'].' ';
}
/************** End show prefix ***************** */
Find:
$lastpost_subject = $full_lastpost_subject = $parser->parse_badwords($lastpost_data['lastpostsubject']);
Replace with:
$lastpost_subject = $full_lastpost_subject = $thread['threadprefix'] . $parser->parse_badwords($lastpost_data['lastpostsubject']);