Hym, powiem Ci tak - nie interesuj się dalej tymi klasami w głąb, bo wszystko co potrzeba jest w tej klasie i metodzie, co podawaliśmy - tam gdzie jest kod wyświetlający statystyki.
Otwórz plik: admin/applications/forums/modules_public/extras/stats.php
Znajdź:
$this->registry->output->setTitle( $this->lang->words['forum_leaders'] . ' - ' . ipsRegistry::$settings['board_name'] );
Dodaj powyżej:
/* (DP31) Statistics Custom Group */
$this->DB->build( array(
'select' => 'm.*, m.member_id as user_member_id',
'from' => array( 'members' => 'm' ),
'where' => "m.member_group_id = 7",
'add_join' => array(
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=m.member_id',
'type' => 'left',
),
array(
'select' => 's.*',
'from' => array( 'sessions' => 's' ),
'where' => 's.member_id=m.member_id',
'type' => 'left',
),
array(
'select' => 'pf.*',
'from' => array( 'pfields_content' => 'pf' ),
'where' => 'pf.member_id=m.member_id',
'type' => 'left',
),
)
) );
$this->DB->execute();
if ( $this->DB->getTotalRows() )
{
while( $r = $this->DB->fetch() )
{
$customGroup[] = IPSMember::buildDisplayData( $r );
}
}
if( count( $customGroup ) )
{
$this->output .= $this->registry->getClass('output')->getTemplate('stats')->group_strip( $this->caches['group_cache'][7 ]['g_title'], $customGroup );
}
Zapisz i wyślij.
7 to ID nowej grupy.
Efekt:
[ + ]
Spóźniłem się.