Geçerli sürüm : IPB Version: 2.1.x
Kurulum : Basit
Düzenlenecek dosya sayisi : 1
Düzenlenecek dosya : ./sources/action_public/forums.php
CODE
AÇ : ./sources/action_public/forums.php
BUL : //-----------------------------------------
// Show meh the topics!
//-----------------------------------------
ALTINA EKLE :
# Member Group Color in Forum View
$this->ipsclass->DB->build_query( array(
'select' => 't.tid',
'from' => array( 'topics' => 't' ),
'where' => "tid IN(".implode(",", $topic_ids).")",
'add_join' => array(
# MEMBER TABLE JOIN
0 => array( 'select' => 'mg.mgroup as starter_group',
'from' => array( 'members' => 'mg' ),
'where' => 'mg.id=t.starter_id',
'type' => 'left' ),
# MEMBER TABLE JOIN
1 => array( 'select' => 'pg.mgroup as poster_group',
'from' => array( 'members' => 'pg' ),
'where' => 'pg.id=t.last_poster_id',
'type' => 'left' )
),
) );
$this->ipsclass->DB->exec_query();
while( $m = $this->ipsclass->DB->fetch_row() )
{
if( is_array( $topic_array[ $m['tid'] ] ) )
{
$topic_array[ $m['tid'] ]['starter_group'] = $m['starter_group'];
$topic_array[ $m['tid'] ]['poster_group'] = $m['poster_group'];
}
}
BUL :
$topic['last_poster'] = $topic['last_poster_id'] ? $this->ipsclass->make_profile_link( $topic['last_poster_name'], $topic['last_poster_id']) : "-".$topic['last_poster_name']."-";
$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $topic['starter_name'], $topic['starter_id']) : "-".$topic['starter_name']."-";
BUNUNLA DEGiSTiR :
//$topic['last_poster'] = $topic['last_poster_id'] ? $this->ipsclass->make_profile_link( $topic['last_poster_name'], $topic['last_poster_id']) : "-".$topic['last_poster_name']."-";
//$topic['starter'] = $topic['starter_id'] ? $this->ipsclass->make_profile_link( $topic['starter_name'], $topic['starter_id']) : "-".$topic['starter_name']."-";
$pgroup = $this->ipsclass->cache['group_cache'][ $topic['poster_group'] ];
$sgroup = $this->ipsclass->cache['group_cache'][ $topic['starter_group'] ];
$topic['last_poster'] = $topic['last_poster_id'] ? "<a href='{$this->ipsclass->base_url}showuser={$topic['last_poster_id']}'>{$pgroup['prefix']}{$topic['last_poster_name']}{$pgroup['suffix']}</a>" : "-".$topic['last_poster_name']."-";
$topic['starter'] = $topic['starter_id'] ? "<a href='{$this->ipsclass->base_url}showuser={$topic['starter_id']}'>{$sgroup['prefix']}{$topic['starter_name']}{$sgroup['suffix']}</a>" : "-".$topic['starter_name']."-";
-Mod Bitimi-





