TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 291
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 150
  • Total: 150

Pulling in high scores from smfarcade into a block. Has anybody tried this?

Started by houston, November 08, 2005, 03:43:51 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

RoarinRow

where did you install that script, in a block?  or in your index.template.php file or something?

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0


G6Cad

You have to manually fo in to your database through phpmyadmin or what ever program you have to maintain your DB and remove the block manuallyfrom the tables, that will bring your forum back again.

And this code should work fine in a php block with out errors, i use the exact same block on my forum

IchBin

Quote from: alhaudhie on February 07, 2007, 04:53:42 AM
i cannot acces my forum also in admin panel...
This is the reason you should leave blocks set to off in your admin panel. So that if you have an error in a block it doesn't nerf your whole forum.

saurin

I tried to put code as PHP but I am getting error:

"Table 'lamhai_smf.smf_games' doesn't exist"

G6Cad

Please start your own topic on SMFARCADE.INFO as the arcade is their mod to give you the support on.

eeek

There are 2 arcades...the database tables are different. Code for arcade1 wont work with Arcade2. 

MYBESTHOMESnet

I use this code but it wont display. using smf 1.1.3 arcade version 2.0.9


require('./Settings.php');

$top = highscore();
//echo "<pre>".print_r($top,true)."</pre>";

foreach($top as $temp){

echo"<table align=\"center\" width=\"100%\"><tr><td align=\"center\" class=\"smalltext\">{$temp['realName']}</td></tr>";
echo "<tr><td align=\"center\" class=\"smalltext\">{$temp['name']} - {$temp['score']}</td></tr><tr><td width=\"100%\"><hr></td></tr></table>";
}
function highscore($count = 5, $game = "", $cutoff = 0)
{
global $link,$db_prefix,$boarddir,$boardurl;

if($game == "")
$query = "SELECT * FROM {$db_prefix}games,{$db_prefix}games_high,{$db_prefix}members WHERE {$db_prefix}games.game={$db_prefix}games_high.game AND {$db_prefix}games_high.member={$db_prefix}members.ID_MEMBER ORDER BY score DESC LIMIT 0,{$count}";
else
$query = "SELECT * FROM {$db_prefix}games,{$db_prefix}games_high,{$db_prefix}members WHERE {$db_prefix}games.game={$db_prefix}games_high.game AND {$db_prefix}games_high.member={$db_prefix}members.ID_MEMBER AND {$db_prefix}games.game='{$game}' ORDER BY score DESC LIMIT 0,{$count}";
$res = mysql_query($query) or die(mysql_error());
$top = array();
while($x = mysql_fetch_array($res))
{
$x['score'] = (string)$x['score'];
$top[] = $x;

}
return $top;
}


error: Table 'smf.smf_games' doesn't exist


thanks in advance

G6Cad

Just what eeek say, you cant use the code for the older arcade for the new arcade, they dont use the same files or DB

gffb


This website is proudly hosted on Crocweb Cloud Website Hosting.