Thrill Xbox-HQ Experienced Xbox Version: V1.1 Modded: Xecuter 2 lite
Joined: Feb 13, 2005 Posts: 138 Location: UK
Posted: Tue Feb 15, 2005 1:31 am Post subject: PHPNUKE v7.6 Active Gamers [Solution] (no my_header.php)
I upgraded your mod from 0.4beta to VIP++ all seems to be working ok, after a couple of problems I ran into.
I just cant seem to get the Active Gamers part of the mod to list online players? I have 3 pc's here at home and logged onto my site with 2 of the computers using diffrent accounts opened a game but 0 players listed as playing?
Any ideas?
Im running PHP-Nuke 7.6.0.2.8 with pnFlashGames v0.1plusplus(++) _________________ Mega Flash Game packs @ http://main.games4nuke.com
Thrill Xbox-HQ Experienced Xbox Version: V1.1 Modded: Xecuter 2 lite
Joined: Feb 13, 2005 Posts: 138 Location: UK
Posted: Tue Feb 15, 2005 2:03 am Post subject:
One thing I have noticed is with phpnuke 7.6 I have no my_header.php in root/includes/
The mod comes with that file and says it needs to be replaced! This must be a file name change or something in nuke 7.6 for the my_header.php...
Any ideas where this peace of needed code goes now?? _________________ Mega Flash Game packs @ http://main.games4nuke.com
forahobby Administrator
Joined: May 22, 2003 Posts: 23948 Location: NSW, Australia
Posted: Tue Feb 15, 2005 2:10 am Post subject:
Hi mate,
i cant see why phpnuke would have removed this feature as it is needed.
Anyway, heres a copy of the file that called includes/my_header.php
open your 'header.php' file in the ROOT of your phpnuke installation and find this code:
Thrill Xbox-HQ Experienced Xbox Version: V1.1 Modded: Xecuter 2 lite
Joined: Feb 13, 2005 Posts: 138 Location: UK
Posted: Tue Feb 15, 2005 2:40 am Post subject:
Ok, with some nosing about the area of code you said, my code was going on about a file called:
custom_header.php
located @ root/includes/custom_files/
When going there to look there was no file...So this got me thinking that maybe this was the file I had been looking for..maybe..lol I renamed my_header.php to custom_header.php and dropped it in the custom folder, bingo! the active gamer is kind of working
I now get errors on me site located on me header...lol 3 errors:
Warning: main(ipban.php): failed to open stream: No such file or directory in /home2/sub002/sc10288/www/includes/custom_files/custom_header.php on line 15
Warning: main(ipban.php): failed to open stream: No such file or directory in /home2/sub002/sc10288/www/includes/custom_files/custom_header.php on line 15
Warning: main(): Failed opening 'ipban.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/sub002/sc10288/www/includes/custom_files/custom_header.php on line 15
Could you shine some light on this as im no php writter and im in deep!
Oh well hope this helps you on a new update of patch for support for PHP-Nuke 7.6.0.2.8
P.S. all games working fine and all scores submitting _________________ Mega Flash Game packs @ http://main.games4nuke.com
forahobby Administrator
Joined: May 22, 2003 Posts: 23948 Location: NSW, Australia
Posted: Tue Feb 15, 2005 2:59 am Post subject:
Are you sure your custom_header.php file had nothing in it.. You dont want to overwrite it unless you are positive it has nothing in it. I would just open the my_header.php i have included and then copy and paste the code from that directly in your /!ROOT/includes/custom_files/custom_header.php file..
Man.. phpnuke 7.6 eh.. I cant believe that they would change so much and am very un-impressed if they have. Are you positive you are using the real PHPNUKE v7.6..?? Ill have to go and download this now.. I dont actually have the time because i have work and to support thousands of xbox users etc etc.
phpnuke 7.6..:
That means that every module written for previous versions of nuke will never work on your site ever. Most require a my_header.php file.
what a nightmare.
Joined: May 22, 2003 Posts: 23948 Location: NSW, Australia
Posted: Tue Feb 15, 2005 3:03 am Post subject:
btw.,. I tried to register on your site yesterday and still no email activation.. Can you turn on the FlashGames so visitors can browse them.. I cant see how it looks.
anyway, your nearly there.. This small problem will be simple to fix BUT AFTER TWEAKING!
Joined: May 22, 2003 Posts: 23948 Location: NSW, Australia
Posted: Tue Feb 15, 2005 3:17 am Post subject:
hi,
alright!
Now the error you getting is this:
Code:
Warning: main(ipban.php): failed to open stream: No such file or directory in /home2/sub002/sc10288/www/includes/custom_files/custom_header.php on line 15
I will copy and paste the exact code you should have in your 'custom_header.php' file ok.. Make sure you have this and only this:
Code:
// Start Active Users for FlashGames
$content = "";
global $user, $themesel, $cookie, $prefix, $user_prefix, $dbi, $anonymous,$name,$REQUEST_URI;
cookiedecode($user);
$ip = getenv("REMOTE_ADDR");
$username = $cookie[1];
sql_query("DELETE FROM $prefix"._flashgames_activeusers." WHERE time < $past", $dbi);
$result = sql_query("SELECT time FROM $prefix"._flashgames_activeusers." WHERE username='$username'", $dbi);
$ctime = time();
if ($row = sql_fetch_array($result, $dbi)) {
sql_query("UPDATE $prefix"._flashgames_activeusers." SET username='$username', time='$ctime', host_addr='$ip', guest='$guest',module='$name',url='$REQUEST_URI' WHERE username='$username'", $dbi);
} else {
sql_query("INSERT INTO $prefix"._flashgames_activeusers." (username, time, host_addr, guest,module,url) VALUES ('$username', '$ctime', '$ip', '$guest','$name','$REQUEST_URI')", $dbi);
}
Thrill Xbox-HQ Experienced Xbox Version: V1.1 Modded: Xecuter 2 lite
Joined: Feb 13, 2005 Posts: 138 Location: UK
Posted: Tue Feb 15, 2005 3:27 am Post subject:
thx altho its your work Just need to fix the colouring in the active gamers, remove the white and set the same as site...then im done.. 100% working on nuke 7.6 _________________ Mega Flash Game packs @ http://main.games4nuke.com
forahobby Administrator
Joined: May 22, 2003 Posts: 23948 Location: NSW, Australia
Posted: Tue Feb 15, 2005 3:32 am Post subject:
when you happy and done any chance you could zip up the files which you changed to work with phpnuke 7.6??? Then you can attach the file to this topic here by using the file attachments below..
Is that ok? It will just help others in the future too..
thanks for replying and im very pleased to see your site 100% functional like i knew it would be.
Thrill Xbox-HQ Experienced Xbox Version: V1.1 Modded: Xecuter 2 lite
Joined: Feb 13, 2005 Posts: 138 Location: UK
Posted: Tue Feb 15, 2005 4:03 am Post subject:
Ok tried my best and it didn't work... Fixing the bg colour and font colour for active members @ top of games page.. its white & font white??
also when you open active gamers page and it lists all member playing, got the bg to match but the font is the same colour??
bg colour my site uses is bgcolor=#212121
Font colour will do as a light gray..
Can you help when you get time... no rush. _________________ Mega Flash Game packs @ http://main.games4nuke.com
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