HQ NETWORK:   XBOX ONE |  XBOX 360 |  AIDELUXE HQ Network: 8,600 | Guests: 2376 | Members: 1 


   Current Location: Forums please help. trying to use core ftp   |   need help on an og XBOX modchip   |   Replacing A Broken HDD   |   Help Identifying: 2ND Hand XB Chip   |   A box without the X?   |   20 years ago...   |   No HD   |   Can I reduce F: partition to increase E:?   |   (Solved) Game's crash if custom music is played   |   New Game - Fursan al-Aqsa - Knights of al-Aqsa Mosque   |   
  Home | Active Topics | CD/DVD Media | Downloads | Forums | Feedback | Games | HardDrives | Homebrew | My Profile | ModChips | Reviews | Search | SoftMods | Tutorials

Xbox Forums

Discuss all aspects of the original Xbox Console in our Interactive Xbox Forums..

Get Xbox Game Pass Ultimate
Xbox-Hq.Com :: View topic - No high scores recorded
Xbox-Hq.Com Forum Index -> pnFlashGames Project
Post new topic Reply to topic  Goto page 1, 2  Next  
 No high scores recorded View previous topic :: View next topic  
 
 
 
 
screamingfrog
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Feb 20, 2005
Posts: 1

Post Posted: Fri Sep 09, 2005 6:01 pm   
Post subject: No high scores recorded
Reply with quote
 
Hello,

Well, I just installed pnflashgames 0.6b (free) and no high scores are being recorded. I do have the required code inserted into my index.php
Code:
require_once("mainfile.php");
// Save Score for Old pnFlashGames Component
include("modules/Flash_Games/includes/oldcomponent.php");

Everything installed fine and the games play but no highscores. I am using PHP-Nuke 7.7 with chatserv security patch installed. Any ideas?? Thanks!

Rob


View user's profile Send private message
 
 
 
 
forahobby
Administrator
Administrator


Joined: May 22, 2003
Posts: 23945
Location: NSW, Australia

Post Posted: Sun Sep 11, 2005 5:40 am   
Post subject:
Reply with quote
 
more then likely you will find because you are using a security patch it is not accepting the scores via the POST COMMAND.. Sad

I know it works fine on the normal phpnuke 7.7 but havent tested with your version.. Do you want to send me the version you have in FULL so i can test for you and get it working??

Im sure it will be benficial for more then just the two of us anyway..

Let me know how you go.. Try different games.. Some older ones and some newer ones to see if they work..

Maybe only the older hiscores wont be working.. then we can see whats going on there.

l8r and sorry for any troubles..

hope your enjoying my hard work

l8r

Fh
http://www.xbox-hq.com

_________________
HQ Network:
www.xbox-hq.com | www.xboxone-hq.com | www.360-hq.com | www.c64-hq.com


View user's profile Send private message Send e-mail Visit poster's website
 
 
 
 
kalak
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: May 17, 2004
Posts: 6

Post Posted: Sun Sep 25, 2005 6:48 pm   
Post subject:
Reply with quote
 
I have the same problem, with games not saving scores. Old and newer games are not saving score

Yes I'm using a chatserv patched php-nuke 7.8

Hope you'll find a fix for our problem.

Keep up the good work.


View user's profile Send private message
 
 
 
 
forahobby
Administrator
Administrator


Joined: May 22, 2003
Posts: 23945
Location: NSW, Australia

Post Posted: Mon Sep 26, 2005 2:48 am   
Post subject:
Reply with quote
 
can someone send me alink to this CHATSERVE version of PHPNUKE..
I have heard of it before but have no ideas where to get it..

Thanks for any info guys!

_________________
HQ Network:
www.xbox-hq.com | www.xboxone-hq.com | www.360-hq.com | www.c64-hq.com


View user's profile Send private message Send e-mail Visit poster's website
 
 
 
 
kalak
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: May 17, 2004
Posts: 6

Post Posted: Mon Sep 26, 2005 11:50 am   
Post subject:
Reply with quote
 
Hi !

I'm using one from http://www.nukeresources.com/


View user's profile Send private message
 
 
 
 
forahobby
Administrator
Administrator


Joined: May 22, 2003
Posts: 23945
Location: NSW, Australia

Post Posted: Tue Sep 27, 2005 1:57 am   
Post subject:
Reply with quote
 
Hi guys,

I can get the scores working for you but someone will have to give me a full version already patched and working for me to help.

I dont have the time to download only the patched files and go through it all espeically when im not using it myself.

Basically i believe in the MAINFILE.PHP there is some new code which stops your phpnuke site from being able to receive POSTS.. Without the full code i cant really test so someone will have to get back to me.

l8r all and sorry i couldnt find the fix soon.

another tip: Make a topic in the chatservs forums.. Hopefully somneone will know exactly what is wrong.

Just remember SCORES for pnFlashGames for PHPNUKE are saved POSTED TO: http://www.mysites.com/modules.php?name=Flash_Games&func=StoreScore

and

http://www.mysites.com/index.php
(there is a include file in the top of index.php).

_________________
HQ Network:
www.xbox-hq.com | www.xboxone-hq.com | www.360-hq.com | www.c64-hq.com


View user's profile Send private message Send e-mail Visit poster's website
 
 
 
 
KOMAPA
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Oct 01, 2005
Posts: 1

Post Posted: Sat Oct 01, 2005 3:14 pm   
Post subject:
Reply with quote
 
HI

I use PHPNUKE 7.6 3.1 patched

The lines in minefile.php are:
Code:
if ($_SERVER['REQUEST_METHOD'] == "POST") {
  if (isset($_SERVER['HTTP_REFERER'])) {
    if (!stripos_clone($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) {
        die('Posting from another server not allowed!');
    }
  } else {
    die($posttags);
  }
}

If I comment this lines like this:
Code:
/*
if ($_SERVER['REQUEST_METHOD'] == "POST") {
  if (isset($_SERVER['HTTP_REFERER'])) {
    if (!stripos_clone($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])) {
        die('Posting from another server not allowed!');
    }
  } else {
    die($posttags);
  }
}
*/

All works, but it's not recomended by security reasons.

Maybe with some
Code:
IF ELSE
statement it will be work?...


View user's profile Send private message
 
 
 
 
forahobby
Administrator
Administrator


Joined: May 22, 2003
Posts: 23945
Location: NSW, Australia

Post Posted: Sun Oct 02, 2005 2:13 am   
Post subject:
Reply with quote
 
i dont have that code in my phpnuke install. lol
Do you see XBOX-HQ.Com getting hacked??

NOPE!!!!

I think you are all OVERKILLING it.. Totally.
Xbox-Hq.Com is one of the worlds largest PHPNUKE websites and even we dont run chatserv patches.. There is just no need.. Why not setup your website and add your own custom protection..

anyway, what a joke.. I cant believe chatserv thinks this helps against hackers. Really there is only one line of code you should have as security against posts and that is the domain naim security..

anyway, l8r

FH
http://wwww.xbox-hq.com

_________________
HQ Network:
www.xbox-hq.com | www.xboxone-hq.com | www.360-hq.com | www.c64-hq.com


View user's profile Send private message Send e-mail Visit poster's website
 
 
 
 
keg01
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Nov 28, 2005
Posts: 2

Post Posted: Tue Nov 29, 2005 4:28 am   
Post subject: My 2 cents
Reply with quote
 
I tried commenting out the _POST filtering as above and it had no effect on my standard phpnuke 7.9 install with old or new games high score recording.

I think there are additional issues between the games module and phpnuke > 7.7. I have poked around the phpnuke 7.9 code and have not been able to isolate where the high scores are falling out.

Looking forward to someone with greater understanding of phpnuke to figure this one out. Not man enough here ... Embarassed


View user's profile Send private message
 
 
 
 
keg01
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Nov 28, 2005
Posts: 2

Post Posted: Tue Nov 29, 2005 2:06 pm   
Post subject: CORRECTION
Reply with quote
 
I took another look at this in the light of day and, in fact, the old style high score games will post results in phpnuke 7.9 if you comment out the statement above. So, testing games like frogger and ms. pacman produced high scores stored but trying pingu failed. Just for those who come after ...


View user's profile Send private message
 
 
 
 
forahobby
Administrator
Administrator


Joined: May 22, 2003
Posts: 23945
Location: NSW, Australia

Post Posted: Tue Nov 29, 2005 2:27 pm   
Post subject:
Reply with quote
 
Hi keg01,

I must have missed your post.. Sad
Thanks for the info.

Open your ROOT/PHPNUKE/index.php file (not the flashgames index.php) and double check that you have the include file from the flashagems readme.txt file.. Or open the index.php which is in the pnFlashGames for PHPNUKE package and copy and paste the 2 x lines from the top.

Heres the code you need anyway in your main PHPNUKE index.php:
Code:

// Save Score for Old pnFlashGames Component
include("modules/Flash_Games/includes/oldcomponent.php");


If you have that in place everything should work fine..

Also, Im going to tidy up soon and hopefully fix any of these little bugs for each version.. The pnFlashGames will even carry more stats soon on how many games you have played, 1st postions etc etc.

enjoy the module

FH
http://www.xbox-hq.com

_________________
HQ Network:
www.xbox-hq.com | www.xboxone-hq.com | www.360-hq.com | www.c64-hq.com


View user's profile Send private message Send e-mail Visit poster's website
 
 
 
 
wibbers
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Jan 15, 2006
Posts: 6

Post Posted: Mon Jan 16, 2006 1:01 am   
Post subject:
Reply with quote
 
im using the latest version of php nuke, i can get the games working but not the high scores

here is what my index.php looks like

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2005 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

require_once("mainfile.php");
global $prefix, $db, $admin_file;

if (isset($op) AND ($op == "ad_click") AND isset($bid)) {
   $bid = intval($bid);
   $sql = "SELECT clickurl FROM ".$prefix."_banner WHERE bid='$bid'";
   $result = $db->sql_query($sql);
   list($clickurl) = $db->sql_fetchrow($result);
   $db->sql_query("UPDATE ".$prefix."_banner SET clicks=clicks+1 WHERE bid='$bid'");
   update_points(21);
   Header("Location: ".htmlentities($clickurl));
   die();
}

$modpath = '';
define('MODULE_FILE', true);
$_SERVER['PHP_SELF'] = "modules.php";
$row = $db->sql_fetchrow($db->sql_query("SELECT main_module from ".$prefix."_main"));
$name = $row['main_module'];
define('HOME_FILE', true);

if (isset($url) AND is_admin($admin)) {
   Header("Location: $url");
   die();
}

if ($httpref == 1) {
    if (isset($_SERVER['HTTP_REFERER'])) {
    $referer = $_SERVER['HTTP_REFERER'];
    $referer = check_html($referer, "nohtml");
    }
    if (!empty($referer) && !stripos_clone($referer, "unknown") && !stripos_clone($referer, "bookmark") && !stripos_clone($referer, $_SERVER['HTTP_HOST'])) {
    $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);
if (isset($file)) { $file = trim($file); }
$mod_file = trim($mod_file);
$mop = trim($mop);
if (stripos_clone($name,"..") || (isset($file) && stripos_clone($file,"..")) || stripos_clone($mod_file,"..") || stripos_clone($mop,"..")) {
   die("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 {
      define('INDEX_FILE', true);
      include("header.php");
      OpenTable();
      if (is_admin($admin)) {
         echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"".$admin_file.".php?op=modules\">"._ADDAHOME."</a> ]</center>";
      } else {
         echo "<center>"._HOMEPROBLEMUSER."</center>";
      }
      CloseTable();
      include("footer.php");
   }
}

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/*                                                                      */
/************************************************************************/
/* Additional security checking code 2003 by chatserv                   */
/* http://www.nukefixes.com -- http://www.nukeresources.com             */
/************************************************************************/

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=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"admin.php?op=modules\">"._ADDAHOME."</a> ]</center>";
   } else {
       echo "<center>"._HOMEPROBLEMUSER."</center>";
   }
   CloseTable();
   include("footer.php");
    }
}

?>


View user's profile Send private message
 
 
 
 
wibbers
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Jan 15, 2006
Posts: 6

Post Posted: Mon Jan 16, 2006 1:59 am   
Post subject:
Reply with quote
 
ok i changed that and my index.php now looks like this
(high scores still arnt working with any games Sad )

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2005 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

require_once("mainfile.php");
global $prefix, $db, $admin_file;
// Save Score for Old pnFlashGames Component
include("modules/Flash_Games/includes/oldcomponent.php");

if (isset($op) AND ($op == "ad_click") AND isset($bid)) {
   $bid = intval($bid);
   $sql = "SELECT clickurl FROM ".$prefix."_banner WHERE bid='$bid'";
   $result = $db->sql_query($sql);
   list($clickurl) = $db->sql_fetchrow($result);
   $db->sql_query("UPDATE ".$prefix."_banner SET clicks=clicks+1 WHERE bid='$bid'");
   update_points(21);
   Header("Location: ".htmlentities($clickurl));
   die();
}

$modpath = '';
define('MODULE_FILE', true);
$_SERVER['PHP_SELF'] = "modules.php";
$row = $db->sql_fetchrow($db->sql_query("SELECT main_module from ".$prefix."_main"));
$name = $row['main_module'];
define('HOME_FILE', true);

if (isset($url) AND is_admin($admin)) {
   Header("Location: $url");
   die();
}

if ($httpref == 1) {
    if (isset($_SERVER['HTTP_REFERER'])) {
    $referer = $_SERVER['HTTP_REFERER'];
    $referer = check_html($referer, "nohtml");
    }
    if (!empty($referer) && !stripos_clone($referer, "unknown") && !stripos_clone($referer, "bookmark") && !stripos_clone($referer, $_SERVER['HTTP_HOST'])) {
    $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);
if (isset($file)) { $file = trim($file); }
$mod_file = trim($mod_file);
$mop = trim($mop);
if (stripos_clone($name,"..") || (isset($file) && stripos_clone($file,"..")) || stripos_clone($mod_file,"..") || stripos_clone($mop,"..")) {
   die("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 {
      define('INDEX_FILE', true);
      include("header.php");
      OpenTable();
      if (is_admin($admin)) {
         echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"".$admin_file.".php?op=modules\">"._ADDAHOME."</a> ]</center>";
      } else {
         echo "<center>"._HOMEPROBLEMUSER."</center>";
      }
      CloseTable();
      include("footer.php");


   }
}

?>


View user's profile Send private message
 
 
 
 
wibbers
Xbox-HQ Newbie
Xbox-HQ Newbie



Joined: Jan 15, 2006
Posts: 6

Post Posted: Mon Jan 16, 2006 1:16 pm   
Post subject:
Reply with quote
 
can anyone see anything wrong with that code?


View user's profile Send private message
 
 
 
 
forahobby
Administrator
Administrator


Joined: May 22, 2003
Posts: 23945
Location: NSW, Australia

Post Posted: Tue Jan 17, 2006 3:41 am   
Post subject:
Reply with quote
 
hi wibbers,

That code looks fine to me mate..
Its good to see you added the code to your index.php like the instructions state.. Smile

Quote:
// Save Score for Old pnFlashGames Component
include("modules/Flash_Games/includes/oldcomponent.php");


Now i believe the thing that is causing your probs is a update to the phpnuke mainfile.php.. Thats just my first guess.

Can you paste the top portion of your mainfile.php here for me.
I want to see the POST CODE.. It must be stopping all POST COMMANDS to the index.php file to stop hacking for somereason..

anyway, keep at it.. Im sure you will get it.. Your site is coming along nicely too.

l8r

FH
http://www.xbox-hq.com

_________________
HQ Network:
www.xbox-hq.com | www.xboxone-hq.com | www.360-hq.com | www.c64-hq.com


View user's profile Send private message Send e-mail Visit poster's website
 
Display posts from previous:   
  Post new topic  
 
  Reply to topic  
Goto page 1, 2  Next |
 All times are GMT | Page 1 of 2
Jump to:  
 

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
 


Get Xbox Game Pass Ultimate