OA Top Gamers on Portal

Forum rules
This forum is not for support requests.

Only post Modifications for Board3 Portal 1.0.x in this forum.
Locked
User avatar

Topic author
MorpheusEZ
Active Member
Posts: 5
Joined: 21. November 2008 22:07
Contact:

OA Top Gamers on Portal

Post by MorpheusEZ »

OA Top Gamers on Portal

Description : Add a custom block for display the Top Gamers on Portal (only available for Olympus Arcade)

Author : rainman
Revision : Morpheus

Open portal.php

Find :

Code: Select all

page_header($user->lang['PORTAL']); 
Before add :

Code: Select all

// Top gamers on index
    $PLAYERS = '';
    $sql_array = array(
                'SELECT'    => 's.gamer_id, COUNT(s.game_id) AS cups_nbr, u.username, u.user_colour, u.user_id',
                   
                'FROM'        => array(
                    SCORES_TABLE    => 's',
                    USERS_TABLE    => 'u'
                ),
                   
                'WHERE'        => 'u.user_id = s.gamer_id AND s.is_ultim = 0 AND s.is_valid = 1 AND s.is_first = 1',
                'GROUP_BY'    => 's.gamer_id',
                'ORDER_BY'    => 'cups_nbr DESC'
            );
            $sql = $db->sql_build_query('SELECT', $sql_array);
            $result = $db->sql_query_limit($sql, 3);
           
            $i=0;
            while( $row = $db->sql_fetchrow($result))
            {
                $i = $i+1;
            
   $template->assign_block_vars('winners', array(
                      'NAME_WINNER'      => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
                       'GOT_CUPS'          => $row['cups_nbr'],
                  'NUM_WINNER'        => $i,
                  ));            
            }   
    // Top gamers on index 
For Prosilver style, open portal_body.html

Find :

Code: Select all

<!-- IF S_DISPLAY_MAINMENU -->
            <!-- INCLUDE portal/block/main_menu.html -->
        <!-- ENDIF --> 
After add :

Code: Select all

<!-- INCLUDE portal/block/winners.html --> 
Create a new page html winners.html

Copy the same following code :

Code: Select all

<div class="portal-panel">
   <div class="inner">
      <span class="portal-corners-top"><span></span></span>
         <h3><img src="{T_THEME_PATH}/images/portal/portal_top_gamers.gif" width="18px" height="18px" alt=""/>&nbsp;Arcade Top Gamers</h3><br />
         <!-- BEGIN winners -->
         <span style="float:left;">{winners.NAME_WINNER} {winners.GOT_CUPS} Cups</span>
         <span style="float:right;padding-right:10px;"><img src="images/qualitycup_{winners.NUM_WINNER}.gif" title="First"></span><br style="clear:both" />
         <!-- END winners -->
      <span class="portal-corners-bottom"><span></span></span>
   </div> 
Upload the gif to root/Your Style/images/portal/
Image
Locked

Return to “board3 Portal v1.0.x - Modifications in Dev”