$leaderboard_q = $DB_site->query("SELECT game,userid,comment,date,max(score) as maxscore
FROM arcade
WHERE game='$gamename'
GROUP BY userid
ORDER BY maxscore DESC
LIMIT $top_number");
in place of the standard leaderboard_q code, I get no records returned.
John I ran that query in PHPadmin and it works perfect. I used order by userid and no limit to check (after a checked there was multiple record for the same user) and the query returned only the highest score for each user. I think this is the ticket to your arcade hack with dual display mode, I had doctored up another way after out conversation earlier but this is much better.
I had already come up with this SQL earlier, but it didn't get me anywhere - just like it's not getting me anywhere now. I have no idea why this is not working in my code, but it is working in phpMyAdmin :\
I've come up with a solution - the code just didn't like the admin cp selection system I put in place to allow users to choose how they want their leaderboards to run.
Got the basis of something that works now tho, which can't be bad...
Originally posted by Souly I have try to add Levels. i can not test it, because i am an admin and i have no time to play much hours ... I have never work before yesterday with flash, plz. test it on your own risk
[Changes]
*16 Levels: 11-16 are new and i think they are very hard, but i don?t play tetris, i can?t test it
3 new tetris.swf: --> plz make a backup of all your previous tetris.swf Files before you test my new version!
1 Version:
------------
english, 16 Levels (6 new) very hard! pause is disabled
2 Version:
------------
english, 16 Levels (6 new) very hard! pause is enabled
3 Version:
------------
german, gray background, 16 Levels (6 new) very hard! pause is disabled
Here are Number ONE: (english, 16 Levels (6 new) very hard! pause is disabled)
[INSTALL]
Download the tetris.zip File, unpack it and copy the tetris.swf File in your forum root and let test your user the 6 new level!
.................................................. .................................................. ..
Cheers for that, I'm using your second version and let's see what the pro's say once they've finished the 10th level
Originally posted by kypdurron If Im using Ie6, after playing for awhile, I get a "access denied" error when the game is over...why is that and how can I disable it?
My users are complaining about the same thing. They are playing for a long time and when thy finish... Acces Denied
It is possible that because John's version has the timeout set to 60 minutes, the security check is failing after the game. An hour is a long time, though, so that might not be it. You could try increasing that value just for kicks.
Another option is to change where the calls to show_nopermission() are being made to see if that affects it. I use the following nopermission code:
PHP Code:
// access check
switch($action) {
case "leaderboard":
break;
case "play":
case "reg":
if (($bbuserinfo[usergroupid] != 2) and
($bbuserinfo[usergroupid] != 5) and
($bbuserinfo[usergroupid] != 6) and
($bbuserinfo[usergroupid] != 7)) {
show_nopermission();
}
break;
default:
if (($bbuserinfo[usergroupid] != 2) and
($bbuserinfo[usergroupid] != 5) and
($bbuserinfo[usergroupid] != 6) and
($bbuserinfo[usergroupid] != 7)) {
show_nopermission();
}
$action = "play";
break;
}
That code is near the top of the file and is only executed once. There are no further permission checks (aside from security stuff) and it seems to work great.
However, since I have moved pretty far away from the original hack, I wouldn't recommend trying that code out unless you know what you're doing. I don't want to screw anybody's thing up!