I haven't tested this that much so use at your own risk.
This will change the '
Topic Starter' into the group prefix/suffix format.
Probably others ways of doing it but this is what I have so far.
sql/mysql_queries.phpwe're adding: ,m.mgroup and LEFT JOIN ".SQL_PREFIX."members m ON (t.starter_id=m.id)
make it look like this
this will do the 'I replied' topic listingsCODE
function forums_get_replied_topics_actual( $a )
{
return "SELECT DISTINCT(p.author_id), t.* ,m.mgroup
FROM ".SQL_PREFIX."topics t
LEFT JOIN ".SQL_PREFIX."posts p ON (p.topic_id=t.tid AND p.author_id={$a['mid']})
LEFT JOIN ".SQL_PREFIX."members m ON (t.starter_id=m.id)
WHERE t.forum_id={$a['fid']} AND {$a['query']} AND p.new_topic=0
ORDER BY t.pinned desc,{$a['topic_sort']} {$a['sort_key']} {$a['r_sort_by']}
LIMIT {$a['limit_a']}, {$a['limit_b']}";
}
action_public/forums.phpfind:
CODE
// No point in getting dots again...
a little bit under that you will see this.
CODE
else
{
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'topics t',
'where' => $query . $add_query,
'order' => 't.pinned DESC, '.$topic_sort.' t.'.$sort_key .' '. $r_sort_by,
'limit' => array( intval($First), $this->ipsclass->vars['display_max_topics'] )
) );
$this->ipsclass->DB->simple_exec();
}
change to:
CODE
else
{
$this->ipsclass->DB->simple_construct( array( 'select' => 't.*',
'from' => array('topics' => 't'),
'where' => $query . $add_query,
'order' => 't.pinned DESC, '.$topic_sort.' t.'.$sort_key .' '. $r_sort_by,
'limit' => array( intval($First), $this->ipsclass->vars['display_max_topics'] ),
'add_join' => array( 0 => array( 'select' => 'm.mgroup', 'from' => array( 'members' => 'm'), 'where' => 't.starter_id=m.id', 'type' => 'left' ) )
) );
$this->ipsclass->DB->simple_exec();
}
then find
CODE
$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $topic['starter_name'], $topic['starter_id']) : $this->ipsclass->vars['guest_name_pre'] . $topic['starter_name'] . $this->ipsclass->vars['guest_name_suf'];
change to
CODE
$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $this->ipsclass->make_name_formatted($topic['starter_name'],$topic['mgroup']), $topic['starter_id']) : $this->ipsclass->vars['guest_name_pre'] . $topic['starter_name'] . $this->ipsclass->vars['guest_name_suf'];
that should do it. any problems, let me know.
this is just getting the mgroup from the members table and then making the names formatted in the listings.