Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Moving Player Details To Arcade Homepage Details »»
Moving Player Details To Arcade Homepage
Version: , by edytwinky edytwinky is offline
Developer Last Online: Jun 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-05-2009 Last Update: Never Installs: 0
 
No support by the author.

Is it possible to move individuals Player Details to the first page.

The information that shows that particular players 1st Place Finishes, 2nd Place Finishes, 3rd Place finishes, Top Ten Finishes, Total Games Played, etc?

I believe this is the code from the skin_arcade.php file but when I placed it in there, only the word "Player Details For" show up and nothing else, not even the players name.

PHP Code:
           <td width="*" valign="top">
                <
div class="tborder">
                <
table border="0" cellpadding="2" cellspacing="0" width="100%" class="alt1">
                    <
tr>
                        <
td width="100%" align="center" class="thead" colspan="2">{$ibforums->lang['details']}{$rank}</td>
                    </
tr>
                    {
$html['rank_detail_row']}
                </
table>
                </
div>
            </
td>
        </
tr>
    </
table

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-05-2009, 09:43 AM
stangger5's Avatar
stangger5 stangger5 is offline
 
Join Date: Jan 2005
Location: Online
Posts: 1,130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should work if its coded right..

All this info is pulled from arcade/module/mod_report.php
You might need to move some of that code to your skin_arcade.php..
Reply With Quote
  #3  
Old 03-05-2009, 03:27 PM
edytwinky edytwinky is offline
 
Join Date: Aug 2007
Posts: 512
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea which code to move over to the skin_arcade.php file? Here's the mod_report.php

I know this {$html['rank_detail_row']} is the code that has the information but I cannot get it to extract on my arcade homepage when I place it somewhere.

PHP Code:
<?php

class module
{
    var 
$html;

    function 
module()
    {
        global 
$main$ibforums$DB$std;

        
$main->arcade->authorize();  //Makes sure user can see the arcade

        
$main->arcade->top_links($main->html);
        
$this->html .= $main->arcade->extra_links;

        
$tmp_html = array();

    
$mid = (isset($ibforums->input['user'])) ? intval($ibforums->input['user']) : $ibforums->member['id'];

    if( 
$mid <= )
    {
    
$mid $ibforums->member['id'];
    }

        
$DB->query("SELECT name FROM ibf_members WHERE id=".$mid);
        
$user $DB->fetch_row();

        
//Numbers
        
$topten             0;
        
$firstplace         0;
        
$secondplace         0;
        
$thirdplace         0;
        
$totalgames         0;
        
$gamesplayed         0;
        
$totalgamesplayed     0;
        
$game_string         "(0)";
        
//Arrays
        
$games                 = array();
        
$score_totals         = array();
        
$top_scores         = array();
        
$users_place         = array();
        
$users_top             = array();
        
$gid_array             = array();

        
$DB->query("SELECT g.gid, g.gtitle, g.gcount, g.highscore_type, c.password from ibf_games_list AS g, ibf_games_cats AS c WHERE g.active=1 AND g.gcat=c.c_id AND trim(password)='' ORDER BY ".$main->arcade->settings['g_display_sort']." ".$main->arcade->settings['g_display_order']);
        while( 
$this_game $DB->fetch_row() )
        {
            
$games[] = array(
                                
'gid'        => $this_game['gid'],
                                
'gtitle'    => $this_game['gtitle'],
                                
'played'    => $this_game['gcount'],
                                
'type'        => $this_game['highscore_type'],
                       );
            
$gid_array[] = $this_game['gid'];
            
$totalgames++;
        }

        if( 
count($gid_array) > )
        {
            
$game_string "(".implode("," $gid_array).")";
        }

        
$DB->query("SELECT s.*, g.highscore_type AS type FROM ibf_games_scores AS s, ibf_games_list AS g WHERE s.gid=g.gid AND s.gid IN ".$game_string." ORDER BY score DESC, timespent ASC");
        while( 
$this_score $DB->fetch_row() )
        {
            if( !isset( 
$score_totals$this_score['gid'] ] ) )
            {
                
$top_scores$this_score['gid'] ]['score'] = 0;
                
$score_totals$this_score['gid'] ] = 0;
            }

            if( !isset(
$users_place$this_score['gid'] ]) )
            {
                
$users_place$this_score['gid'] ] = 0;
                
$users_top$this_score['gid'] ] = 0;
            }

            if( (
$this_score['score'] > $top_scores$this_score['gid'] ]['score']) && $this_score['type'] == "high" )
            {
                
$top_scores$this_score['gid'] ]['score'] = $this_score['score'];
                
$top_scores$this_score['gid'] ]['time'] = $this_score['datescored'];
            }

            if( ((
$this_score['score'] < $top_scores$this_score['gid'] ]['score']) && $this_score['type'] == "low") || $top_scores$this_score['gid'] ]['score'] == )
            {
                
$top_scores$this_score['gid'] ]['score'] = $this_score['score'];
                
$top_scores$this_score['gid'] ]['time'] = $this_score['datescored'];
            }

            
$score_totals$this_score['gid'] ]++;

            if( 
$this_score['mid'] == $mid )
            {
                
$gamesplayed++;
                if( (
$this_score['score'] > $users_top$this_score['gid'] ]) && $this_score['type'] == "high" )
                {
                    
$users_top$this_score['gid'] ] = $this_score['score'];
                    
$users_place$this_score['gid'] ] = $score_totals$this_score['gid'] ];
                }

                if( ((
$this_score['score'] < $users_top$this_score['gid'] ]) && $this_score['type'] == "low") || $users_top$this_score['gid'] ] == )
                {
                       
$users_top$this_score['gid'] ] = $this_score['score'];
                    
$users_place$this_score['gid'] ] = $score_totals$this_score['gid'] ];
                }
            }
        }

        
$col "row2";
        foreach( 
$games as $the_game )
        {
            if( 
$main->arcade->settings['skin'] != )
            {
                
$col = ($col == "row2") ? "row1" "row2";
            }
            
$score $ibforums->lang['n_a'];
            
$the_age $ibforums->lang['n_a'];
            if( isset(
$top_scores$the_game['gid'] ]['time']) )
            {
                
$the_age $this->thatdatetime() - $top_scores$the_game['gid'] ]['time'] );
            }
            if( 
$users_place$the_game['gid'] ] )
            {
                if( 
$the_game['type'] == "high" )
                {
                    
$rank $users_place$the_game['gid'] ];
                }
                else
                {
                    
$rank = ($score_totals$the_game['gid'] ] - $users_place$the_game['gid'] ]) + 1;
                }

                if( 
$rank == )
                {
                    
$rank "<big><b>".$rank."</b></big>";
                    
$firstplace++;
                }
                elseif( 
$rank <= 10 )
                {
                    if( 
$rank == )
                    {
                        
$secondplace++;
                    }
                    elseif( 
$rank == )
                    {
                        
$thirdplace++;
                    }
                    else
                    {
                        
$topten++;
                    }
                    
$rank "<b>".$rank."</b>";
                }
                
$rank $rank.$ibforums->lang['out_of'].$score_totals$the_game['gid'] ];

                if( 
$users_top$the_game['gid'] ] )
                {
                    
$score $main->arcade->t3h_format($users_top$the_game['gid'] ]);
                }
            }
            else
            {
                
$rank $ibforums->lang['n_a'];
            }

            
$totalgamesplayed += $the_game['played'];

            
$the_game['gtitle'] = $main->arcade->make_links$the_game['gid'] , $the_game['gtitle'] , );

            
$tmp_html['rank_row'] .= $main->html->rankrow$col $main->arcade->links['click'] , $score ,$rank $the_game['played'] , $the_age );
        }

        
$col "row2";
        
$detail_rows = array(
                                  
$ibforums->lang['first_place']                        => $firstplace,
                                
$ibforums->lang['second_place']                        => $secondplace,
                                
$ibforums->lang['third_place']                        => $thirdplace,
                                
$ibforums->lang['top_ten']                            => $topten,
                                
$ibforums->lang['total_games']                        => $totalgames,
                                
$ibforums->lang['total_i_play']    => $gamesplayed,
                                
$ibforums->lang['total_play']                        => $totalgamesplayed,
                       );

        foreach( 
$detail_rows as $header=>$content )
        {
            if( 
$main->arcade->settings['skin'] != )
            {
                
$col = ($col == "row2") ? "row1" "row2";
            }
            
$tmp_html['rank_detail_row'] .= $main->html->rankdetailrow($col $header $content);
        }

        
$this->html .= $main->html->report_main($tmp_html $user['name']);

        
$this->html .= $main->html->copyright($main->version,$ibforums->lang['timeformat1']);
        
$main->arcade->print_it($this->html"Rankings""Rankings");

    }

    function 
thatdate($time)
    {
        global 
$ibforums;

        
$diff $time;
        
$daysDiff floor($diff/60/60/24);
        
$diff -= $daysDiff*60*60*24;
        
$hrsDiff floor($diff/60/60);
        
$diff -= $hrsDiff*60*60;
        
$minsDiff floor($diff/60);
        
$diff -= $minsDiff*60;
        
$secsDiff $diff;

        
$eltime "";
        if(
$daysDiff)
        {
             
$eltime $eltime.$daysDiff." ".$ibforums->lang['acp_day1'];
    if (
$daysDiff == 1) { $eltime $eltime." "; }
    else { 
$eltime $eltime.$ibforums->lang['acp_day2']." "; }
        }

        if(
$hrsDiff)
        {
    if (
$hrsDiff 10) { $hrsDiff="0".$hrsDiff; }
            
$eltime $eltime.$hrsDiff.":";
        }

        if(
$minsDiff)
        {
    if (
$minsDiff 10) { $minsDiff="0".$minsDiff; }
            
$eltime $eltime.$minsDiff.":";
        }

    if (
$secsDiff 10) { $secsDiff="0".$secsDiff; }
            
$eltime $eltime.$secsDiff."";

        return 
$eltime;
    }

}

$module = new module;

?>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04061 seconds
  • Memory Usage 2,360KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete