vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   Latest Arcade Score (more than one?) (https://vborg.vbsupport.ru/showthread.php?t=198866)

Nintendo-Daily 12-27-2008 06:36 PM

Thanks KatieG, I'll try and get up with that person from the site.

Nintendo-Daily 01-04-2009 08:24 AM

bump...I can't seen to find any support/ solution to this.

Does anyone know what file I need to edit so that more than one result is listed for the "Latest Arcade Score" area?

The Stifmeister2 referred me here so I am thinking someone here might know how to do this.

Thank You

Gemma 01-04-2009 10:18 AM

Quote:

Originally Posted by Nintendo-Daily (Post 1701132)
bump...I can't seen to find any support/ solution to this.

Does anyone know what file I need to edit so that more than one result is listed for the "Latest Arcade Score" area?

The Stifmeister2 referred me here so I am thinking someone here might know how to do this.

Thank You

In your arcade.php search for

Code:

//latest score and champions
There should be a database query that can be edited so you can show more than one latest score

KatieG 01-04-2009 11:04 AM

Quote:

Originally Posted by Stifmeister2 (Post 1694807)
Maybe he bought the branding-free version. :)


ha ha there is No branding Free version :D

edytwinky 01-04-2009 05:58 PM

Here's what I see, I don't see anything to change from 1 latest score to more:

PHP Code:

//latest score and champions
       //Added g.decpoints after g.title
                
$DB->query("SELECT s.*, g.gtitle, g.decpoints, c.password FROM ibf_games_scores AS s, ibf_games_list AS g, ibf_games_cats AS c WHERE s.gid=g.gid AND g.gcat=c.c_id AND g.active=1 AND trim(password)='' ORDER BY datescored DESC LIMIT 0,5");
                
$newest_score $DB->fetch_row();

        
//$newest_score['score'] = $this->arcade->t3h_format($newest_score['score']);
                // Replaced
                
$newest_score['score'] = $this->arcade->do_arcade_format($newest_score['score'],$newest_score['decpoints']);

                if (
$this->arcade->settings['use_announce'])
        {
            
$announce $this->arcade->settings['announcement_parsed'];
                    
$tourneyinfo['announcement'] = $this->html->generalbox($ibforums->lang['arcade_announcements'], $announce);
        }
                else
                
$tourneyinfo['announcement'] = "";


        
$latestinfo $ibforums->lang['newest_score'];
        
$latestinfo preg_replace("/<% NAME %>/i" $newest_score['name'] , $latestinfo);
        
$latestinfo preg_replace("/<% SCORE %>/i" $newest_score['score'] , $latestinfo);
        
$latestinfo preg_replace("/<% GAME %>/i" $newest_score['gtitle'] , $latestinfo);


        
$newtext "";
        
$DB->query("SELECT c.*, g.gcat, cat.password FROM ibf_games_champs AS c, ibf_games_list AS g, ibf_games_cats AS cat WHERE c.champ_gid=g.gid AND g.gcat=cat.c_id AND g.active=1 AND trim(password)='' ORDER BY champ_date DESC LIMIT 0,5");
        while( 
$row $DB->fetch_row() )
        {
                        
$row['champ_date'] = $std->get_date($row['champ_date'],'ARCADE');
                if( 
$row['champ_date'] == date("{$ibforums->lang['timeformat4']}") )
                {
                                
$row['champ_date'] = $ibforums->lang['today'];
                        }
                else
                {
                if (
$ibforums->lang[timeformat1] == "de")
                {
                                
$yesterday date("{$ibforums->lang['timeformat4']}"mktime(000date("d")-1  date("m"), date("Y")));
                }
                else
                {
                                
$yesterday date("{$ibforums->lang['timeformat4']}"mktime(000date("m")-1  date("d"), date("Y")));
                }

                                if( 
$row['champ_date'] == $yesterday )
                    {
                                        
$row['champ_date'] = $ibforums->lang['yesterday'];
                                }
                        } 


Nintendo-Daily 01-04-2009 09:14 PM

Yeah, that's the part of the code I was playing around with as well and couldn't figure out how to manipulate it. I really think this is the right part to modify though.

Any ideas?

Think adding another one of these:

Code:

$latestinfo = $ibforums->lang['newest_score'];
        $latestinfo = preg_replace("/<% NAME %>/i" , $newest_score['name'] , $latestinfo);
        $latestinfo = preg_replace("/<% SCORE %>/i" , $newest_score['score'] , $latestinfo);
        $latestinfo = preg_replace("/<% GAME %>/i" , $newest_score['gtitle'] , $latestinfo);

under the original will do the trick?

Stifmeister2 01-05-2009 01:17 PM

Quote:

Originally Posted by Nintendo-Daily (Post 1701720)
Yeah, that's the part of the code I was playing around with as well and couldn't figure out how to manipulate it. I really think this is the right part to modify though.

Any ideas?

Think adding another one of these:

Code:

$latestinfo = $ibforums->lang['newest_score'];
        $latestinfo = preg_replace("/<% NAME %>/i" , $newest_score['name'] , $latestinfo);
        $latestinfo = preg_replace("/<% SCORE %>/i" , $newest_score['score'] , $latestinfo);
        $latestinfo = preg_replace("/<% GAME %>/i" , $newest_score['gtitle'] , $latestinfo);

under the original will do the trick?

You can try, but I'm afraid it will just display the same score twice. :( Dunno though, so it's worth a test. ;)

GreasySpoon 01-05-2009 01:37 PM

arcade.php

Find:
PHP Code:

//latest score and champions
       //Added g.decpoints after g.title
                
$DB->query("SELECT s.*, g.gtitle, g.decpoints, c.password FROM ibf_games_scores AS s, ibf_games_list AS g, ibf_games_cats AS c WHERE s.gid=g.gid AND g.gcat=c.c_id AND g.active=1 AND trim(password)='' ORDER BY datescored DESC LIMIT 0,5");
                
$newest_score $DB->fetch_row();

        
//$newest_score['score'] = $this->arcade->t3h_format($newest_score['score']);
                // Replaced
                
$newest_score['score'] = $this->arcade->do_arcade_format($newest_score['score'],$newest_score['decpoints']);

                if (
$this->arcade->settings['use_announce'])
        {
            
$announce $this->arcade->settings['announcement_parsed'];
                    
$tourneyinfo['announcement'] = $this->html->generalbox($ibforums->lang['arcade_announcements'], $announce);
        }
                else
                
$tourneyinfo['announcement'] = "";


        
$latestinfo $ibforums->lang['newest_score'];
        
$latestinfo preg_replace("/<% NAME %>/i" $newest_score['name'] , $latestinfo);
        
$latestinfo preg_replace("/<% SCORE %>/i" $newest_score['score'] , $latestinfo);
        
$latestinfo preg_replace("/<% GAME %>/i" $newest_score['gtitle'] , $latestinfo); 

Replace with:
PHP Code:

//latest score and champions
       //Added g.decpoints after g.title 
$newest_score_query $DB->query("SELECT s.*, g.gtitle, g.decpoints, c.password FROM ibf_games_scores AS s, ibf_games_list AS g, ibf_games_cats AS c WHERE s.gid=g.gid AND g.gcat=c.c_id AND g.active=1 AND trim(password)='' ORDER BY datescored DESC LIMIT 0,5");
        while (
$newest_score $DB->fetch_row($newest_score_query))
        {
            
$newest_score['score'] = $this->arcade->do_arcade_format($newest_score['score'],$newest_score['decpoints']);

            if (
$this->arcade->settings['use_announce'])
            {
                
$announce $this->arcade->settings['announcement_parsed'];
                
$tourneyinfo['announcement'] = $this->html->generalbox($ibforums->lang['arcade_announcements'], $announce);
            }
            else
            
$tourneyinfo['announcement'] = "";

            
$tmplatestinfo $ibforums->lang['newest_score'];
            
$tmplatestinfo preg_replace("/<% NAME %>/i" $newest_score['name'] , $tmplatestinfo);
            
$tmplatestinfo preg_replace("/<% SCORE %>/i" $newest_score['score'] , $tmplatestinfo);
            
$tmplatestinfo preg_replace("/<% GAME %>/i" $newest_score['gtitle'] , $tmplatestinfo);
            
            
$latestinfo[] = $tmplatestinfo;
            
            
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
            
$click_links[] = $this->arcade->links['click'];
        }
        
        
$viewerav "";
        
$this->arcade->links['click'] = $click_links

Find:
PHP Code:

//header
        
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
        
$viewerav ""

Replace with:
PHP Code:

//header
        //$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
        //$viewerav = ""; 

skin_Arcade.php im am using the blockstyle (check in our arcade) so this modification will only work if you are using also the blockstyle.

Edit: skin_v3Arcade.php is the same. Do the same steps.

Find (in the function start()):
PHP Code:

$totalstext $totalstext $ibforums->lang['infobox_title7']; 

Add below:
PHP Code:

for ($i 0$count count($latestinfo); $i $count$i++)
{
    
$latestscores .= "<tr>
        <td align=\"left\">
            " 
$latestinfo[$i] . "<br />
        </td>
        <td align=\"right\">
            " 
$clicktoplay['click'][$i] . "
        </td>
    </tr>"
;


Find (in the "return <<<EOF" part):
PHP Code:

<tr>
                                                                            <
td align="left">
                                                {
$latestinfo}<br />
                                                                                </
td>
                                            <
td align="right">
                                                {
$clicktoplay['click']}
                                            </
td>
                                        </
tr

Replace with:
PHP Code:

{$latestscores

Greetz

Stifmeister2 01-05-2009 07:53 PM

Quote:

Originally Posted by GreasySpoon (Post 1702281)
arcade.php

Find:
PHP Code:

//latest score and champions
       //Added g.decpoints after g.title
                
$DB->query("SELECT s.*, g.gtitle, g.decpoints, c.password FROM ibf_games_scores AS s, ibf_games_list AS g, ibf_games_cats AS c WHERE s.gid=g.gid AND g.gcat=c.c_id AND g.active=1 AND trim(password)='' ORDER BY datescored DESC LIMIT 0,5");
                
$newest_score $DB->fetch_row();

        
//$newest_score['score'] = $this->arcade->t3h_format($newest_score['score']);
                // Replaced
                
$newest_score['score'] = $this->arcade->do_arcade_format($newest_score['score'],$newest_score['decpoints']);

                if (
$this->arcade->settings['use_announce'])
        {
            
$announce $this->arcade->settings['announcement_parsed'];
                    
$tourneyinfo['announcement'] = $this->html->generalbox($ibforums->lang['arcade_announcements'], $announce);
        }
                else
                
$tourneyinfo['announcement'] = "";


        
$latestinfo $ibforums->lang['newest_score'];
        
$latestinfo preg_replace("/<% NAME %>/i" $newest_score['name'] , $latestinfo);
        
$latestinfo preg_replace("/<% SCORE %>/i" $newest_score['score'] , $latestinfo);
        
$latestinfo preg_replace("/<% GAME %>/i" $newest_score['gtitle'] , $latestinfo); 

Replace with:
PHP Code:

//latest score and champions
       //Added g.decpoints after g.title 
$newest_score_query $DB->query("SELECT s.*, g.gtitle, g.decpoints, c.password FROM ibf_games_scores AS s, ibf_games_list AS g, ibf_games_cats AS c WHERE s.gid=g.gid AND g.gcat=c.c_id AND g.active=1 AND trim(password)='' ORDER BY datescored DESC LIMIT 0,5");
        while (
$newest_score $DB->fetch_row($newest_score_query))
        {
            
$newest_score['score'] = $this->arcade->do_arcade_format($newest_score['score'],$newest_score['decpoints']);

            if (
$this->arcade->settings['use_announce'])
            {
                
$announce $this->arcade->settings['announcement_parsed'];
                
$tourneyinfo['announcement'] = $this->html->generalbox($ibforums->lang['arcade_announcements'], $announce);
            }
            else
            
$tourneyinfo['announcement'] = "";

            
$tmplatestinfo $ibforums->lang['newest_score'];
            
$tmplatestinfo preg_replace("/<% NAME %>/i" $newest_score['name'] , $tmplatestinfo);
            
$tmplatestinfo preg_replace("/<% SCORE %>/i" $newest_score['score'] , $tmplatestinfo);
            
$tmplatestinfo preg_replace("/<% GAME %>/i" $newest_score['gtitle'] , $tmplatestinfo);
            
            
$latestinfo[] = $tmplatestinfo;
            
            
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
            
$click_links[] = $this->arcade->links['click'];
        }
        
        
$viewerav "";
        
$this->arcade->links['click'] = $click_links

Find:
PHP Code:

//header
        
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
        
$viewerav ""

Replace with:
PHP Code:

//header
        //$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
        //$viewerav = ""; 

skin_Arcade.php im am using the blockstyle (check in our arcade) so this modification will only work if you are using also the blockstyle. Should be similar to other styles.

Find (in the function start()):
PHP Code:

$totalstext $totalstext $ibforums->lang['infobox_title7']; 

Add below:
PHP Code:

for ($i 0$count count($latestinfo); $i $count$i++)
{
    
$latestscores .= "<tr>
        <td align=\"left\">
            " 
$latestinfo[$i] . "<br />
        </td>
        <td align=\"right\">
            " 
$clicktoplay['click'][$i] . "
        </td>
    </tr>"
;


Find (in the "return <<<EOF" part):
PHP Code:

<tr>
                                                                            <
td align="left">
                                                {
$latestinfo}<br />
                                                                                </
td>
                                            <
td align="right">
                                                {
$clicktoplay['click']}
                                            </
td>
                                        </
tr

Replace with:
PHP Code:

{$latestscores

Greetz

Wow, that's very nice. :) Thank you. ;)

GreasySpoon 01-05-2009 08:12 PM

No problem ;)

Searched weeks ago for the same feature and did find nothing. So i decided to do it self ;)


All times are GMT. The time now is 10:43 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.01374 seconds
  • Memory Usage 1,947KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (17)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete