Livo [Usunięty]
|
Wysłany:
2007-01-05, 19:46 [IPB] Group Name Indicator v3.3
|
|
|
1. Ściągamy "Universal Mod Installer v1.3.2": http://www.megaupload.com/?d=H2KV31V5
2. Wrzucamy katalog "mod_install" do głównego katalogu, w którym znajdują się pliki forum.
3. Ustawiamy CHMOD'y katalogu "mod_install" oraz "images" (który w nim się znajduje) na 755.
4. Ściągamy "Group Name Indicator v3.3": http://www.megaupload.com/?d=HHY5XF7N
5. Wrzucamy katalogi "mod_install", "sources" oraz "images" do głównego katalogu, w którym znajdują się pliki forum.
6. W przeglądarce internetowej wpisujemy adres:
Kod www.TWOJADOMENA/mod_install/index.php
zamiast "TWOJADOMENA" wpisz adres swojego forum (np. "muonline.org.pl")
7. Zainstaluj modyfikacje (tego chyba nie trzeba tłumaczyc:))
8. Otwórz plik "index.php".
*znajdz:
Kod 'moderators', 'stats', 'languages'
*dodaj za tym:
*zapisz plik.
9. Otwórz plik "forums.php" w katalogu "sources\action_public\".
*znajdz:
Kod $this->ipsclass->DB->cache_add_query('forums_get_active_users', array( 'fid' $this->forum['id'], 'time' $time ) );
$this->ipsclass->DB->simple_exec();
*podmień na:
Kod if ( !$this->ipsclass->vars['group_display_active'] )
{
$this->ipsclass->DB->cache_add_query('forums_get_active_users', array( 'fid' $this->forum['id'], 'time' $time ) );
$this->ipsclass->DB->simple_exec();
}
*znajdz:
Kod //-----------------------------------------
// FETCH...
//-----------------------------------------
while ($r = $this->ipsclass->DB->fetch_row() )
{
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
}
krsort( $rows );
*podmień na:
Kod if ( $this->ipsclass->vars['group_display_active'] )
{
$this->ipsclass->DB->build_query( array( 'select' 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time',
'from' array( 'sessions' 's' ),
'where' => "s.location_2_type = 'forum' AND (s.location_2_id = {$this->forum['fid']} OR t.forum_id = {$this->forum['fid']}) AND s.running_time > {$time} AND s.in_error = 0",
'add_join' array( 0 array( 'select' 't.forum_id',
'from' array( 'topics' 't' ),
'where' 't.tid=s.location_1_id',
'type' 'left' ),
1 array( 'from' array( 'groups' 'g' ),
'where' 'g.g_id=s.member_group',
'type' 'left' ) ),
'order' => 'g.g_display ASC, s.running_time DESC' ) );
$this->ipsclass->DB->exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$rows[] = $r;
}
}
else
{
//-----------------------------------------
// FETCH...
//-----------------------------------------
while ($r = $this->ipsclass->DB->fetch_row() )
{
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
}
krsort( $rows );
}
*zapisz plik.
10. Otwórz plik "topics.php" w katalogu "sources\action_public\".
*znajdz:
Kod $this->ipsclass->DB->cache_add_query( 'topics_get_active_users',
array( 'tid' $this->topic['tid'],
'time' time() - $cut_off,
) );
$this->ipsclass->DB->simple_exec();
*podmień na:
Kod if ( !$this->ipsclass->vars['group_display_active'] )
{
$this->ipsclass->DB->cache_add_query( 'topics_get_active_users',
array( 'tid' $this->topic['tid'],
'time' time() - $cut_off,
) );
$this->ipsclass->DB->simple_exec();
}
*znajdz:
Kod //-----------------------------------------
// FETCH...
//-----------------------------------------
while ($r = $this->ipsclass->DB->fetch_row() )
{
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
}
krsort( $rows );
*podmień na:
Kod if ( $this->ipsclass->vars['group_display_active'] )
{
$time = time();
$this->ipsclass->DB->build_query( array( 'select' 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time',
'from' array( 'sessions' 's' ),
'where' => "s.location_1_type = 'topic' AND s.location_1_id = {$this->topic['tid']} AND s.running_time > {$time} - {$cut_off} AND s.in_error=0",
'add_join' array( 1 array( 'from' array( 'groups' 'g' ),
'where' 'g.g_id=s.member_group',
'type' 'left' ) ),
'order' => 'g.g_display ASC, s.running_time DESC' ) );
$this->ipsclass->DB->exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$rows[] = $r;
}
}
else
{
//-----------------------------------------
// FETCH...
//-----------------------------------------
while ($r = $this->ipsclass->DB->fetch_row() )
{
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
}
krsort( $rows );
}
*zapisz plik.
11. Otwórz plik "func_boardstats.php" w katalogu "sources\lib\".
*znajdz:
*podmień na:
Kod if ( $this->ipsclass->vars['group_display_active'] )
{
$this->ipsclass->DB->build_query( array( 'select' 's.id, s.member_id, s.member_name, s.login_type, s.running_time, s.member_group',
'from' array( 'sessions' 's' ),
'where' => "running_time > {$time}",
'add_join' array( 1 array( 'from' array( 'groups' 'g' ),
'where' 'g.g_id=s.member_group',
'type' 'left' ) ),
'order' => 'g.g_display ASC, s.running_time DESC' ) );
$this->ipsclass->DB->exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$rows[] = $r;
}
}
else
{
$this->ipsclass->DB->simple_construct( array( 'select' 'id, member_id, member_name, login_type, running_time, member_group',
'from' 'sessions',
'where' "running_time > $time",
//'order' "running_time DESC" // Sort in PHP to avoid filesort in SQL
) );
$this->ipsclass->DB->simple_exec();
//-----------------------------------------
// FETCH...
//-----------------------------------------
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
}
krsort( $rows );
}
*znajdz:
Kod $active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON'];
*dodaj powyżej:
Kod if ( $this->ipsclass->vars['group_display_board'] )
{
$active['NAMES'] .= "<br /><br />";
$gni = array();
foreach ($this->ipsclass->cache['grouporder_cache'] as $gid $order)
{
$gni[] = "<a href='{$this->ipsclass->base_url}act=members&max_results=30&filter={$this->ipsclass->cache['group_cache'][$gid]['g_id']}&sort_order=asc&sort_key=members_display_name'>{$this->ipsclass->cache['group_cache'][$gid]['prefix']}{$this->ipsclass->cache['group_cache'][$gid]['g_title']}{$this->ipsclass->cache['group_cache'][$gid]['suffix']}</a>";
}
$active['NAMES'] .= implode( " | ", $gni );
}
*zapisz plik.
12. Aby przejsc do zarządzania zainstalowanym modem należy zalogowac się do ACP, a następnie przejsc do "Components -> (FSY21) Group Name Indicator".
To wszystko. Modyfikacja jest gotowa do użytku:)
Copyright: FSY21
Przetłumaczone przez: Livo (www.muonline.org.pl)
|
|