Posted: Wed Jul 20, 2005 5:50 pm Post subject: No scores kept except for PacMAn NEED HELP
Hello i downloaded and installed 050627_pnFlashGames_v0.6b(free) on our clan web site http://bf-dogs.com/modules.php?name=Flash_Games , and then i downloaded some flash games from http://www.pnFlashGames.com (High Score Enabled) as it said to do in the readme file, and they work ok ,but it dont keep the scores,the only score it keeps is for PacMan , so if 1 works why not the rest?, (PacMan was already included in the Zip file, could that be it?).
We are using a clan php website info below
-------------------------------------------------------------
PHPNUKE-CLAN v.2.1.0
The PHPNUKE-CLAN is a package of PHP-Nuke Platinum v.7.6.0 with over 100 preinstalled mods and security fixes all in one free package.
In PHPNUKE-CLAN (PNC) you have VWAR module already installed on it with some block!
Features overview:
- 100% size reduction in comparison to PHP-Nuke 7.6 default.
- Custom user friendly theme, T-Platinum.
- Optimizational Tweaks.
- Over 200% of newly added features and mods.
- Latest nuke security fixes and updates.
- Secure and customise themes with anti-theft management using
- ThemeConsole.
- Upgrade to something amazing, the easy way.
- Run PHP-Nuke Platinum from home using Inferno™
- Server Viewer
------------------------------------------------------------------
i checked the DB and all tables r there, all added games r there, it just dont put in any info,
if any 1 hase any ideas would love to here them ,reply to this thread or email me at webmaster@bf-dogs.com thanks.....
its a great bit of gear, the lads would love it
forahobby Administrator
Joined: May 22, 2003 Posts: 23945 Location: NSW, Australia
Posted: Thu Jul 21, 2005 9:18 am Post subject:
Hi,
Sounds like you forgot to add one (1) line of code to your MAIN index.php..
Did you add the include"oldcomponent.php" line??
You need to add that include line as per the readme..
Once you have the include in your !ROOT/index.php file all scores will save just fine..
Get your games from pnFlashgames.com or from XBOXHQ downloads section (not many at the moment),,
enjoy..
btw.. i know its working 100% so it has to be something small.
i checked the code in the index.php and its there, as i said in the first post pacman scores work, i have since then downladed 2 games from this site and there scores work as well, i seems to be the games i downloaded from http://www.pnFlashGames.com (High Score Enabled)
that dont work,r they not compatable or is there a snip of code i need to insert somewhere to enable them?
forahobby Administrator
Joined: May 22, 2003 Posts: 23945 Location: NSW, Australia
Posted: Thu Jul 21, 2005 3:14 pm Post subject:
something is wrong.. You are the first EVER to have this issue.
Maybe try removing the module totally and reinstalling..
I find it strange that one set of pnFlASHGAMEs enabled games work and the others do not.. If you remove the INCLUDE FILE from the !ROOT!/index.php does PACMAN stop saving??
let me know as much info as possible and i will test.
Also please attach a game now via the forum here which DOES NOT work for you..
ill test it.. Im sure you must have done something wrong or you may be the first to notice the error but i doubt the second one very much.. We have 100's of sites running the module now.
ok i tried all that and there in no change ,
the bit of code looks like this now ( from the bottom of the root index.php)
require_once("mainfile.php");
// Save Score for Old pnFlashGames Component
//include("modules/Flash_Games/includes/oldcomponent.php");
$_SERVER['PHP_SELF'] = "modules.php";
$row = $db->sql_fetchrow($db->sql_query("SELECT main_module from ".$prefix."_main"));
$name = $row['main_module'];
$home = 1;
i disabled it with putting the // infront of the line
but in the last post u said ( Move the INCLUDE file from below:
INCLUDE"MAINFILE.PHP")
which i could not find,but i take it u ment (require_once("mainfile.php"); which is the line above.
no change , pacman and the other game still keep the high scores, and the 18 or so others dont
alpah Xbox-HQ Newbie
Joined: Jul 20, 2005 Posts: 6
Posted: Sun Jul 24, 2005 9:32 am Post subject: Fixed
think i fix it , you where on the right track
i deleted the code i added from the mod index file
Quote:
require_once("mainfile.php");
// Save Score for Old pnFlashGames Component
include("modules/Flash_Games/includes/oldcomponent.php");
$_SERVER['PHP_SELF'] = "modules.php";
$row = $db->sql_fetchrow($db->sql_query("SELECT main_module from ".$prefix."_main"));
$name = $row['main_module'];
$home = 1;
if ($httpref==1) {
$referer = $_SERVER["HTTP_REFERER"];
$referer = check_html($referer, nohtml);
if ($referer=="" OR eregi("^unknown", $referer) OR substr("$referer",0,strlen($nukeurl))==$nukeurl OR eregi("^bookmark",$referer)) {
} else {
$result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '$referer')");
}
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_referer"));
if($numrows>=$httprefmax) {
$result2 = $db->sql_query("DELETE FROM ".$prefix."_referer");
}
}
if (!isset($mop)) { $mop="modload"; }
if (!isset($mod_file)) { $mod_file="index"; }
$name = trim($name);
$file = trim($file);
$mod_file = trim($mod_file);
$mop = trim($mop);
if (ereg("\.\.",$name) || ereg("\.\.",$file) || ereg("\.\.",$mod_file) || ereg("\.\.",$mop)) {
echo "You are so cool...";
} else {
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/module.php")) {
include("themes/$ThemeSel/module.php");
if (is_active("$default_module") AND file_exists("modules/$default_module/".$mod_file.".php")) {
$name = $default_module;
}
}
if (file_exists("themes/$ThemeSel/modules/$name/".$mod_file.".php")) {
$modpath = "themes/$ThemeSel/";
}
$modpath .= "modules/$name/".$mod_file.".php";
if (file_exists($modpath)) {
include($modpath);
} else {
$index = 1;
include("header.php");
OpenTable();
if (is_admin($admin)) {
echo "<center><font class=\"\">"._HOMEPROBLEM."</font><br><br>[ "._ADDAHOME." ]</center>";
} else {
echo "<center>"._HOMEPROBLEMUSER."</center>";
}
CloseTable();
include("footer.php");
}
}
to the top of my root index.php under the line
require_once("mainfile.php"); which was already there, and the other game have higi score now as well.
thanks for the help m8
forahobby Administrator
Joined: May 22, 2003 Posts: 23945 Location: NSW, Australia
Posted: Mon Jul 25, 2005 2:25 am Post subject:
glad you got it mate.. I knew you must have done something so small wrong.. heheh lol.. its all good.. Enjoy the module..
God knows its taken me long enough to code by myself hehehe lol
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum