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,972
  • Latest: Lineo
Stats
  • Total Posts: 196,140
  • Total Topics: 21,346
  • Online today: 1,074
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 455
  • Total: 455

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 1 Guest are viewing this topic.

RoarinRow

Quote from: Ray on March 25, 2006, 04:38:55 AM
I looked around and all seemed ok -- have you done this hack -- I think you need to use it

http://www.rranderson.com/arcade/index.php?topic=46.0

try it and see if that will fix it

That didn't work, but thanks for the hack.   :)

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Ray


Looks like you the word category spelled wrong -- their is a fix for this on smfarcade.net -- I will go look to see if I can find it


Here -- go threw here and do the data base fix -- I am sure now it is the data base

http://www.smfarcade.net/index.php/topic,290.15.html

Ray

Think I found your problem-- in the arcade_install.php see if these lines are in their??

$failsc = 0;
$db_version = '1.0.5';
/* Tables to check */
$tables[0][0] = $db_prefix.'games';
$tables[1][0] = $db_prefix.'games_challenge';
$tables[2][0] = $db_prefix.'games_high';
$tables[3][0] = $db_prefix.'games_caterogy';
$tables[3]['create'] = false;
$tables[3]['rename'] = $db_prefix.'games_category';
$tables[4][0] = $db_prefix.'games_category';
//$tables[5][0] = $db_prefix.'games_sessions';
//$tables[6][0] = $db_prefix.'games_champ';
$tables[7][0] = $db_prefix.'games_favorite';
$tables[8][0] = $db_prefix.'games_settings';
$tables[9][0] = $db_prefix.'games_tournament';
$tables[10][0] = $db_prefix.'games_tournament_players';
$tables[11][0] = $db_prefix.'games_tournament_results';
$tables[12][0] = $db_prefix.'games_tournament_scores';
$tables[13][0] = $db_prefix.'games_rate';
$tables[14][0] = $db_prefix.'games_menus';

this renames the caterogy table to category

RoarinRow

Quote from: Ray on March 25, 2006, 08:14:50 AM
Think I found your problem-- in the arcade_install.php see if these lines are in their??

$failsc = 0;
$db_version = '1.0.5';
/* Tables to check */
$tables[0][0] = $db_prefix.'games';
$tables[1][0] = $db_prefix.'games_challenge';
$tables[2][0] = $db_prefix.'games_high';
$tables[3][0] = $db_prefix.'games_caterogy';
$tables[3]['create'] = false;
$tables[3]['rename'] = $db_prefix.'games_category';
$tables[4][0] = $db_prefix.'games_category';
//$tables[5][0] = $db_prefix.'games_sessions';
//$tables[6][0] = $db_prefix.'games_champ';
$tables[7][0] = $db_prefix.'games_favorite';
$tables[8][0] = $db_prefix.'games_settings';
$tables[9][0] = $db_prefix.'games_tournament';
$tables[10][0] = $db_prefix.'games_tournament_players';
$tables[11][0] = $db_prefix.'games_tournament_results';
$tables[12][0] = $db_prefix.'games_tournament_scores';
$tables[13][0] = $db_prefix.'games_rate';
$tables[14][0] = $db_prefix.'games_menus';

this renames the caterogy table to category

Of course it was the one file I didn't check.   :uglystupid2:

I found about 3 instances of 'caterogy' and changed it to 'category', then re-ran the script.

Got this error:

Query failed: RENAME TABLE avs1_games_category TO avs1_games_categoryTable 'avs1_games_category' already exists
Error while updating

Edit - when looking at the code more closely through out the file it looks like it's actually fixing the instances of 'caterogy' to 'category'. 

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0


RoarinRow

I still have the same problem.  I even installed on a fresh forum and still same thing.   >:(

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Ray

Quote from: RoarinRow on March 31, 2006, 05:30:27 AM
I still have the same problem.  I even installed on a fresh forum and still same thing.   >:(

Na your arcade is working now -- well in the default theme, take all the arcade files out of the blue101 folder and you should be ok - enjoy

RoarinRow

Quote from: Ray on March 31, 2006, 06:32:20 AM
Quote from: RoarinRow on March 31, 2006, 05:30:27 AM
I still have the same problem.  I even installed on a fresh forum and still same thing.   >:(

Na your arcade is working now -- well in the default theme, take all the arcade files out of the blue101 folder and you should be ok - enjoy

Can't thank you enough Ray!  That fixed at least 3 pages of errors per person.  You da man!

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

k_4_kelly


alhaudhie

when i install this script

require('./Settings.php');

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

   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%\">
</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;
}


i cannot acces my forum also in admin panel...

This website is proudly hosted on Crocweb Cloud Website Hosting.