View Full Version : Latest Arcade Score (more than one?)
Nintendo-Daily
12-14-2008, 03:20 PM
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 :)
Nintendo-Daily
12-15-2008, 04:58 PM
bump...
Nintendo-Daily
12-17-2008, 01:17 AM
bump...
Nintendo-Daily
12-18-2008, 02:16 AM
bump...
Nintendo-Daily
12-19-2008, 11:16 PM
wow...seriously...
bump...
Nintendo-Daily
12-21-2008, 12:06 AM
bump...
Nintendo-Daily
12-22-2008, 05:30 PM
bump...
Nintendo-Daily
12-27-2008, 01:08 AM
bump...
Why can I not get any support here? This is one of the reasons I paid for this software!
KatieG
12-27-2008, 06:12 AM
I do know that stangger5 knows how todo it, his site is on his profile...
And by the way the Arcade is nothing todo with vbulletin, So how did you pay for it !!!!
Stifmeister2
12-27-2008, 03:01 PM
I do know that stangger5 knows how todo it, his site is on his profile...
And by the way the Arcade is nothing todo with vbulletin, So how did you pay for it !!!!
Maybe he bought the branding-free version. :)
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
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
//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
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:
//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(0, 0, 0, date("d")-1 , date("m"), date("Y")));
}
else
{
$yesterday = date("{$ibforums->lang['timeformat4']}", mktime(0, 0, 0, date("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:
$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
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:
$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:
//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:
//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:
//header
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
$viewerav = "";
Replace with:
//header
//$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
//$viewerav = "";
skin_Arcade.php im am using the blockstyle (check in our arcade (http://www.netzwelt.de/forum/arcade.html)) 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()):
$totalstext = $totalstext . $ibforums->lang['infobox_title7'];
Add below:
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):
<tr>
<td align="left">
{$latestinfo}<br />
</td>
<td align="right">
{$clicktoplay['click']}
</td>
</tr>
Replace with:
{$latestscores}
Greetz
Stifmeister2
01-05-2009, 07:53 PM
arcade.php
Find:
//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:
//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:
//header
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
$viewerav = "";
Replace with:
//header
//$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
//$viewerav = "";
skin_Arcade.php im am using the blockstyle (check in our arcade (http://www.netzwelt.de/forum/arcade.html)) so this modification will only work if you are using also the blockstyle. Should be similar to other styles.
Find (in the function start()):
$totalstext = $totalstext . $ibforums->lang['infobox_title7'];
Add below:
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):
<tr>
<td align="left">
{$latestinfo}<br />
</td>
<td align="right">
{$clicktoplay['click']}
</td>
</tr>
Replace with:
{$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 ;)
edytwinky
01-05-2009, 10:44 PM
Worked like a charm thank you!
GreasySpoon
01-06-2009, 06:26 PM
Ok sorted thanks
How many does it show and can you set the amount it shows ?
5 Latest Arcade Scores will be shown with this modification but you can set the amount in the 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");
Set the amount of scores in the bold part (LIMIT 0, 5) of the query. Replace the 5 with a count that you wish.
Greetz
Nintendo-Daily
01-07-2009, 10:51 PM
Wow!! Finally!! Thank you soooo much! This is exactly what I wanted to do. Thanks GreasySpoon!! You're the best!
Nintendo-Daily
01-08-2009, 10:58 PM
Members of my board have brought up a problem after I made these modifications. Here's what's going on:
If I am not logged into my board, the latest scores say "array".
If I am logged into my board, I see the 5 latest scores like I want to.
I am the admin of my board. All other groups (even if logged in) see "array"
Any idea what's going on? I followed the link that GreasySpoon provided for his arcade and I saw the 5 latest scores on his arcade page. What's wrong with mine?
GreasySpoon
01-09-2009, 05:43 AM
arcade.php
Find:
//header
$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
$viewerav = "";
Replace with:
//header
//$this->arcade->make_links($newest_score['gid'] , $newest_score['gtitle']);
//$viewerav = "";
Please check this step. I think you have forget this step or did something wrong in this part.
Do you have the latest arcade installed? It worked for me with ibProArcade v2.6.7+ and with the newest one (ibProArcade v2.6.8+).
Someone else, from above, with this problem?
Greets
Nintendo-Daily
01-09-2009, 10:46 AM
uh oh...I am getting the following error in my arcade.php file:
Parse error: syntax error, unexpected '[' in /abc/abc/abc/arcade.php on line 2327
GreasySpoon, would you mind sharing your //latest score and champions and //header sections of your arcade.php file?
I'm not sure what I did, but now the arcade isn't even accessible :(
GreasySpoon
01-09-2009, 01:13 PM
I cant, because i have modified more then only the scores part. Download ibProArcade and overwrite the modified scripts. And than, try again.
Nintendo-Daily
01-09-2009, 02:59 PM
Overwrite the modified scripts? Do you mean the modified arcade.php and skin_arcade.php files?
GreasySpoon
01-09-2009, 03:07 PM
Yes, reupload that both files and than try again.
Nintendo-Daily
01-09-2009, 04:14 PM
OK, I'll try it and let you know. Thanks GreasySpoon :)
GreasySpoon
01-09-2009, 07:16 PM
You're welcome. I hope you will get it work.
Nintendo-Daily
01-09-2009, 08:15 PM
OK, I just made the changes again and guests still cannot view the latest scores. It still returns "array." If you want to look at the page, just go here:
http://nintendo-daily.com/arcade.php?
GreasySpoon
01-09-2009, 09:04 PM
It looks like you have forget one step in the skin script and it is not the block style for what my modification was.
Could you please attach the skin script, so i can take a look on it?
Nintendo-Daily
01-09-2009, 09:10 PM
the arcade_skin.php?
GreasySpoon
01-09-2009, 09:16 PM
After a have looked at your forum, i think i know what the problem is. You are using an other style for arcade, not this one for which the modification was.
Do the following steps in the skin_v3Arcade.php file.
Find (in the function start()):
$totalstext = $totalstext . $ibforums->lang['infobox_title7'];
Add below:
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):
<tr>
<td align="left">
{$latestinfo}<br />
</td>
<td align="right">
{$clicktoplay['click']}
</td>
</tr>
Replace with:
{$latestscores}
Greets
Nintendo-Daily
01-09-2009, 09:19 PM
I think I figured it out
--------------- Added 1231543207 at 1231543207 ---------------
yep :) That's exactly what it was. I have 2 skins so I have to modify both. Thanks soo much for your assistance :)
GreasySpoon
01-09-2009, 09:20 PM
Congratulation ;)
Have fun and good night.
Nintendo-Daily
01-09-2009, 09:28 PM
Thanks you too...I am kicking myself in the butt for over-looking this. This code is exactrly what I was looking for. If I could rep you for the code I would. Thanks a TON!! Ah what the heck...I am going to rep you anway...
*ND reps GreasySpoon +10 points :)
GreasySpoon
01-09-2009, 09:33 PM
Really, it's not a big deal. I'm happy, that i could help you.
Thanks for the rep ;)
But now, i have to go to bed. It's 12:32 am in Germany.
cu
Nintendo-Daily
01-11-2009, 04:45 PM
One more problem...the arcade's leaderboard doesn't seem to be adding up the scores correctly. Anyone know why this is? Additionally, I cleared the scores but the "King of the Arcade" did not clear. How do I clear the King of the Arcade?
Kimberley
01-19-2009, 10:45 AM
Sighs I have repeatedly tried this and all I get is array
I'd really like someone to help me if they can. I have done exactly what was mentioned every step .. I just cannot get this to work for me.
Kimberley
GreasySpoon
01-19-2009, 04:29 PM
Did you made the steps in both skins? Maybe you have modified the wrong one, like Nintendo-Daily at his first try.
christon26
10-16-2009, 04:17 AM
Thanx for this! Worked like a charm :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.