Seite 1 von 1

Activity Mod Plus (Top Spiele und Spieler) Seite

Verfasst: 16.01.2006 00:01
von mixmax
Ich möchte gerne eine Seite in meinem Board haben,auf der die Topliste der Spiele und Spieler ist.
Für die Seite habe ich den -->
MOD Title: Activity Mod Plus Stats On Index
MOD Description: Adds Top x Games & Top x Users
in einer neuen Seite eingebunden.

1.Was muß ich am Code ändern das Game und User Limit aufgehoben wird,das alle Games und Mitglider angezeigt werden.
2.Was muß ich ändern das die Top Spieler Tabelle (rechts) oben bleibt.
3.Wäre cool wen die Spielenamen anklickbar wären.
4.Bilder der Games :D

Hier mal die Top Liste wie sie jetzt ist.

Und Hier der Code von aUsTiN

Code: Alles auswählen

############################################################## 
## 
## MOD Title:        Activity Mod Plus Stats On Index 
## 
## MOD Author:        aUsTiN => austin_inc@hotmail.com 
## 
## MOD Description:       Adds Top x Games & Top x Users, "x" Is configurable. 
## 
## MOD Version:           1.0.0 
## 
## MOD Help:        http://phpbb-amod.com/ 
## 
## Installation Level:    Easy 
## 
## Installation Time:     2 Minutes 
## 
## Files To Edit:         3 
## 
## Included Files:        0 
## 
############################################################## 
############################################################## 
## 
## MOD History: 
## 
##   Sep 07th 2004 - Version 1.0.0 
##         - Released 
## 
############################################################## 
## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
## 
############################################################## 
## 
##   Definitions: 
## 
##      Root: Folder your config.php is located 
##      templates/*/: Your template folder (All template folders are suggested) 
##      lang_*/: Your current language folder (All lang folders are suggested) 
## 
############################################################## 

----------------------------------- 
----[ OPEN ]----------------------- 
----------------------------------- 

Root/lang_*/lang_main.php 

----------------------------------- 
----[ FIND ]----------------------- 
----------------------------------- 

?> 

----------------------------------- 
----[ ADD, BEFORE ]---------------- 
----------------------------------- 

/* Start Activity Mod Plus Stats On Index */ 
$lang['amp_M_title']    = 'Some Games Statistics'; 
$lang['amp_L_title']    = 'Top %n% Games'; 
$lang['amp_R_title']    = 'Top %n% Players'; 
$lang['amp_trophy']    = ' Trophies'; 
$lang['amp_plays']       = ' Plays'; 
/* End Activity Mod Plus Stats On Index */ 

----------------------------------- 
----[ CLOSE & SAVE ]--------------- 
----------------------------------- 

----------------------------------- 
----[ OPEN ]----------------------- 
----------------------------------- 

Root/index.php 

----------------------------------- 
----[ FIND ]----------------------- 
----------------------------------- 

   $template->set_filenames(array( 
      'body' => 'index_body.tpl') 
   ); 

----------------------------------- 
----[ ADD, AFTER ]----------------- 
----------------------------------- 

/* Start Activity Mod Plus Stats On Index */ 
   $game_limit = 3; 
   $user_limit = 3; 
    
   $template->assign_block_vars('amp_main', array( 
         "TITLE" => $lang['amp_M_title'], 
         "LEFT"    => str_replace("%n%", $game_limit, $lang['amp_L_title']), 
         "RIGHT"   => str_replace("%n%", $user_limit, $lang['amp_R_title'])) 
      ); 
    
   $u = 1; 
   $q =  "SELECT *    
         FROM ". USERS_TABLE ."    
            ORDER BY user_trophies DESC  
            LIMIT 0, ". $user_limit ."";    
   $r          = $db -> sql_query($q);    
   while($row    = $db -> sql_fetchrow($r)) 
      { 
      if($row['user_id'] != ANONYMOUS) $link = "<a href='profile.". $phpEx ."?mode=viewprofile&u=". $row['user_id'] ."&sid=". $userdata['session_id'] ."'  class='nav'>". $row['username'] ."</a>"; 
      if($row['user_id'] == ANONYMOUS) $link = $row['username']; 
             
      $template -> assign_block_vars("amp_user_rows", array( 
         "POS"    => $u, 
         "WHO"    => $link, 
         "LINK"   => "<a href='activity.". $phpEx ."?page=high_scores&mode=highscore&player_search=". $row['username'] ."&sid=". $userdata['session_id'] ."' class='nav'>". number_format($row['user_trophies']) ."</a>". $lang['amp_trophy']) 
            ); 
      $u++; 
      } 
       
   $g = 1; 
   $q =  "SELECT *    
         FROM ". iNA_GAMES ."    
            ORDER BY played DESC  
            LIMIT 0, ". $game_limit ."";    
   $r          = $db -> sql_query($q);    
   while($row    = $db -> sql_fetchrow($r)) 
      {              
      $template -> assign_block_vars("amp_game_rows", array( 
         "POS"    => $g, 
         "GAME"   => $row['proper_name'], 
         "LINK"   => "<a href='activity.". $phpEx ."?mode=game&id=". $row['game_id'] ."&parent=true&sid=". $userdata['session_id'] ."' class='nav'>". number_format($row['played']) ."</a>". $lang['amp_plays']) 
            ); 
      $g++; 
      }             
/* End Activity Mod Plus Stats On Index */ 

----------------------------------- 
----[ CLOSE & SAVE ]--------------- 
----------------------------------- 

----------------------------------- 
----[ OPEN ]----------------------- 
----------------------------------- 

Root/templates/*/index_body.tpl 

----------------------------------- 
----[ FIND ]----------------------- 
----------------------------------- 

rowspan="2" 

----------------------------------- 
----[ REPLACE WITH ]--------------- 
----------------------------------- 
# NOTE, if yours is higher, just add oe to it. 

rowspan="3" 

----------------------------------- 
----[ FIND ]----------------------- 
----------------------------------- 

  <tr> 
   <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}   [ {L_WHOSONLINE_ADMIN} ]   [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td> 
  </tr> 

----------------------------------- 
----[ ADD, AFTER ]----------------- 
----------------------------------- 

   <tr>  
<!-- BEGIN amp_main -->  
<table border="0" align="center" width="100%" class="forumline"> 
   <tr> 
        <td class="catHead" align="center" colspan="3"> 
         <span class="cattitle"> 
            {amp_main.TITLE} 
         </span> 
      </td> 
   </tr> 
   <tr> 
      <td width="50%" class="row1"> 
<table border="0" align="center" width="100%"> 
   <tr> 
        <td class="catHead" align="center" width="45%" colspan="3"> 
         <span class="cattitle"> 
            {amp_main.LEFT} 
         </span> 
      </td> 
   </tr>    
<!-- END amp_main -->    
<!-- BEGIN amp_game_rows -->    
   <tr>    
        <td class="row2" align="center" width="33%"> 
         {amp_game_rows.POS} 
      </td> 
        <td class="row2" align="center" width="33%"> 
         {amp_game_rows.GAME} 
      </td> 
        <td class="row2" align="center" width="33%"> 
         {amp_game_rows.LINK} 
      </td> 
   </tr>             
<!-- END amp_game_rows --> 
<!-- BEGIN amp_main -->         
</table> 
      </td> 
      <td width="50%" class="row1"> 
<table border="0" align="center" width="100%"> 
   <tr> 
        <td class="catHead" align="center" width="45%" colspan="3"> 
         <span class="cattitle"> 
            {amp_main.RIGHT} 
         </span> 
      </td> 
   </tr>    
<!-- END amp_main -->    
<!-- BEGIN amp_user_rows -->    
   <tr>    
        <td class="row2" align="center" width="33%"> 
         {amp_user_rows.POS} 
      </td> 
        <td class="row2" align="center" width="33%"> 
         {amp_user_rows.WHO} 
      </td> 
        <td class="row2" align="center" width="33%"> 
         {amp_user_rows.LINK} 
      </td> 
   </tr>             
<!-- END amp_user_rows --> 
<!-- BEGIN amp_main -->        
</table> 
      </td> 
   </tr> 
</table> 
<!-- END amp_main -->    
   </tr> 

----------------------------------- 
----[ CLOSE & SAVE ]--------------- 
----------------------------------- 

EoM 

Verfasst: 16.01.2006 13:56
von Sonnengott
Hallo,
wie ich sehe hast du deine Probleme auf deiner Seite gelöst.
Kannst du uns auch teilhaben lassen, wäre Nett von dir.
Gruß Sonnengott

Verfasst: 16.01.2006 14:06
von mixmax
Hallo,
wie ich sehe hast du deine Probleme auf deiner Seite gelöst.
???


1.Was muß ich am Code ändern das Game und User Limit aufgehoben wird,das alle Games und Mitglider angezeigt werden.
2.Was muß ich ändern das die Top Spieler Tabelle (rechts) oben bleibt.
3.Wäre cool wen die Spielenamen anklickbar wären.
4.Bilder der Games

Verfasst: 16.01.2006 14:12
von Sonnengott
Ach sorry ich hatte auf deiner Portalseite geschaut.....

Verfasst: 17.01.2006 14:02
von mixmax
Keiner der Profis nen Tip,oder Lust.