![]() |
PBW Emergency Site files v1.51 Finished and fixed.
Se it working, press games here:
PBW or NGC3 Emergency Site Files are here: Complete ver 1.2 A patch to latest Version is here: Patch to ver 1.2 The patch updates index.php and adds news.htm and updates readme.txt ----------------------------------------- You need a http server capable of handling php files. The starting file is index.php You can set up as many sites as you wish but each site needs their own directory with a gamefile and turnfiles subdirectories. You can alter all data in simple textfiles, the configuration.txt set up is before the site is turned on and then shouldn't have to be altered anymore. The playerdata.txt needs to be altered when players drop and are replaced. The deadline.txt needs to be altered when the deadline is updated. Hopefully I'll fix a better deadline handler in the future, and a progress bar for the uplaod turnfile, that script has been giving some players troubles, I'll look into that (Not working for some). The gamefile that lies in the GAMEFILE directory must be named in PBW standard, that is: Gamename_turnnumber.zip and the gamename the same as in configuration.txt i e: NGC3_57.zip The uploaded turnfiles in TURNFILES directory should be named accrdingly in PBW standard: Gamename_playernumber(4 numbers).plr i e: ngc3_0001.plr These are the textfiles that needs to be altered: NEWS.HTM: Add all news here. #1. Configuration.txt: Game name Site name Host name Host e-mail Info line i e: NGC3 Newbie Galactic Combat 3 PBW Emergency Site Ruatha james@visit.se Made 2003 by James Johansson aka Ruatha with Wordpad. #2. Playerdata.txt : Number of players Player1 Player1 e-mail Player1 empire name --------------------------------------------------------------------------------- If you name the empires without player with player name "-" it won't be marked red and will be displayed with the name "(none)". If the empire is dead name the player "-" and name the empire for example "Dead" or whatever. (The " shouldn't be included in the textfile) -------------------------------------------------------------------------------- i e: 3 Ruatha james@visit.se Swedish Democracy James james@storuman.nu Storuman Republic - - Dead #3. Deadline.txt year Month Day hour i e: 2003 8 22 20 ------------ Good luck. James aka Ruatha [ October 31, 2003, 05:34: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
se it working : PBW Emergency Web site
Cosmetic update. Patch 1.3 Complete ver 1.3 Fixed: Changed news.htm to news.html Changed colour of (none) to green If deadline is negative it doesnt display it. ver 1.2 was a critical update Fixed get turn, now works. Added mail all button. Added news. If name of player is - it's displayed as none, not red. [ October 26, 2003, 08:08: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Is it possible to make a script that will automatically send an email to the game owner when the Last .plr file is uploaded?
Geoschmo |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Updated ver 1.31:
patch 1.31 Complete 1.31 Fixed: If e-mail of player is - it won't be included in "mail all". Geo- Seems possible. Wait for ver 1.4 (Tonight I hope) [ October 26, 2003, 20:38: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Updated again.
readme isn't fixed. Complete 1.4 patch 1.4 What is it: If you add Yes in configuration.txt it will mail the host when all has uploaded if in MAIL.PHP $mailnotify="yes"; You must in mail.php add the servers SMTP and perhaps the Server owners account. Good Geo?? Will fix readme tomorrow, nighty! If it malfunctions you still have ver 1.31 to download. |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Ok, the email doesn't seem to work. Doesn't give me an errors or anything, but I never get an email.
Doesn't the smtp email need a password? Maybe that's what's wrong? Geoschmo |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Hi.
It depends. Some servers require a password. Most don't, they only accept mails coming from within their own net. if we add passwords to the mail.php we need to move it out from the game directory. As I guess Fyron don't want to share his SMTP password with everyone... Have you set Yes in both mail.php and configuration.txt? In configuration.txt it should be added as a Last line. AND it only mails when the Last file is uploaded, it doesn't check if all files already are there! [ October 27, 2003, 06:56: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
No I did not set a yes in the configuration file, only the mail file. I saw that you added an attribute to the config file but I did not see what it was for so I made it a NO just like your example file. I will try that.
|
Re: PBW Emergency Site files v1.51 Finished and fixed.
Yes, it was redundant, but added in case passwords is needed, then mail.php can be moved to another directory.
And both the owner of the server and the game both have an option of turning it off, sorry for that complex way, I'm not proud of it. This ver 1 is a botch job.... Another update; patch 1.421 Complete 1.421 What is new? -Added new readme. -Autodirects to main page after upload, pauses 5 seconds first. -Refreshes main page when it's loaded. -When all has uploaded, if mail notify host is set to Yes in both configuration.txt and mail.php a message will appear saying that the host is being notified. [ October 27, 2003, 11:12: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Adding the Yes to the config file did it. I got the email. The only odd thing is that the email appeared to come from geoschmo @ s2.ebart.net. Is there a way I can change that? If I can't it's not a big deal. just looks odd.
The only other things I'd really like to see then are two things I think you already have planned. One would be a button to download all the .plr files at once for the host. The other would be a button to upload the new gamefile.zip. This button should remove the current .plr files which will reset the list for the players, replace the gamefile, and email all the players a message that there is a new turn. I think you were planning on doing this from an admin page or something? These two buttons would eliminate the need for my ftp program after I have the game all setup. Geoschmo |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Sure, I can set the sender to something generic.
Working some on a admin page: Progress here Admin page example (work in progress) |
Re: PBW Emergency Site files v1.51 Finished and fixed.
I've set the Host's e-mail as sender, so you'll send the mail to yourself.
I've finished most of the admin screen. Now you can: -Change all data in configuration.txt -Change all data in deadline.txt including deadline length -Download all player files zipped into one, clear turnfiles dir. -upload new turnfile and notify all players that new turn is out. What to do before I post: -Ability to change all player data. -Password protect admin screen. -Update readme.txt =will be fixed tomorrow. Nightie |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Well, generic wasn't really what I was looking for. I wanted to be able to set that and make it show my email as the return address. I imagine that's possible right? Maybe another line in the mail.php file?
|
Re: PBW Emergency Site files v1.51 Finished and fixed.
Ruatha, you are doing a great job, keep it up! You're much appreciated by us addicted PBW players. http://forum.shrapnelgames.com/images/icons/icon7.gif
I don't know PHP, nor any programming language that well, so this may be a elementary question... but here goes anyway. I was having a hard time getting the upload flag to work right. It looked like the IF test for the game name wasn't assigning a value to $testname if the $test1 and $test2 variables were equal. Thus throwing off the second IF statement. So I changed the code in Index.php ---From this--- $test1=strtolower(substr($file,0,-9)); $test2=strtolower("$gamename"); $ett=strlen($test1); $tva=strlen($test2); $tre=$tva-$ett; if ($tre>0) { $testname=substr($gamename,0,-$tre); } if (strtolower(substr($file,0,-9)) == strtolower("$testname")) ---To this--- $test1=strtolower(substr($file,0,-9)); $test2=strtolower("$gamename"); $ett=strlen($test1); $tva=strlen($test2); $tre=$tva-$ett; if ($tre>0) { $testname=substr($test2,0,-$tre); } else { $testname = $test2; } if ($test1 == $testname) After making the changes the upload verification did seem to work OK. I changed the second IF statement so it wouldn't have to process the 'strtolower' (Convert string to lowercse I guess?) command again when the lowercase data was already in the $test1 and $test2 variables. I'm afraid to say this minor little change took me over 1-hour to figure out. I don't know why the upload notification wasn't working for me, especially since I didn't see anyone else report any problems with it. But, I thought I would let you know incase anyone else was having this problem. [ October 28, 2003, 05:32: Message edited by: Rambie ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Thanks Rambie.
This site wasn't supposed to be this complex, so it's bad code. I'm impressed you understood it, I almost doesn't anymore! Included your change in thi s Last Version: Complete ver 1.5 Patch 1.5 What's new? Complete admin page, no more text files editing. Upload and download turnfiles for the host through admin page. Added history page. All new readme. Problems, report them. I know the host get's the turnfiles in ACE compressed format, but I can't find a zip utility that supports long filenames through the command line??? (it must be a small exe file)! The totally rewritten ver 2 is aimed at next PBW downtime, may it never come! [ October 28, 2003, 08:55: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
For all who has older Versions than 1.4 and need all files except CONFIGURATION.TXT DEADLINE.TXT and PLAYERDATA.TXT
here is your Version: Get up to date to ver 1.5 It's the same as patch 1.5 but with MAIL.PHP included. MAIL.PHP is the configuration file for automatic mails sent out from the server. If you've already set up auto mails in MAIL.PHP use patch 1.5 instead. (In MAIL.PHP data for the SMTP server and server mail account is entered, and auto mail must be enabled manually there to work!) Hmm, I realized something - there was a Bug: When turn was uploaded, deadline was old deadline + lenght of deadline, should be current time+ deadline length. Is fixed now in all three archives. Latest Version is now 1.51 (in zipfiles 1.5) [ October 28, 2003, 14:56: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
All is well ( I thought there was a bug but I had forgotten to update my own site.... http://forum.shrapnelgames.com/image...s/rolleyes.gif )
I need to find a way to make the page refresh every time it is visited. The meta tag I'm using now doesn't seem to work. And I don't want it to refresh every X second. And I don't want to use Java, only HTML or PHP..... EDIT 1: Problem seems solved, stand by for ver 1.52 coming soon. (hours) EDIT2: Nope not that easy! Edit3: I've tried: </font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"><script language=" JavaScript" ><!-- function MyReload() { window.location.reload(); } //--></script> Then change your <Body> to say; <Body onLoad=" MyReload()" > </pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">and </font><blockquote><font size="1" face="sans-serif, arial, verdana">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"><META HTTP-EQUIV="Pragma" CONTENT="no-Cache"> <META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 31 Dec 2001 23:59:59 GMT"></pre><hr /></blockquote><font size="2" face="sans-serif, arial, verdana">Still don't work. If players after uploading their turnfiles doesn't press refresh on their browsers they think the upload has failed! Needs to fix this! [ October 29, 2003, 08:05: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Ruatha,
Problems with the 1.51 files on my game. I can't change the admin password. Get errors in the log: [30-Oct-2003 16:14:30] PHP Warning: fopen(password.php): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 5 [30-Oct-2003 16:14:30] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 10 [30-Oct-2003 16:14:30] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 11 [30-Oct-2003 16:14:30] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 12 [30-Oct-2003 16:14:30] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/setpassword.php on line 14 Also, the link to download turn files and clear the directory doesn't work. I get a 404 error on that one. The button to upload the new gamefile works partialy. It uploads teh new game file, but it doesn't move the old one to the backup folder. I end up with both of them in the gamefile directory. Not sure if the players get their email. I am checking on that. error log for this one: [30-Oct-2003 16:19:48] PHP Warning: fopen(deadline.txt): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 195 [30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 197 [30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 198 [30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 199 [30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 200 [30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 201 [30-Oct-2003 16:19:48] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 203 [30-Oct-2003 16:19:48] PHP Warning: fopen(history.html): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 210 [30-Oct-2003 16:19:48] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 213 [30-Oct-2003 16:19:48] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/nextturn.php on line 215 News update does not work: [30-Oct-2003 16:31:52] PHP Warning: fopen(news.html): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 7 [30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 8 [30-Oct-2003 16:31:52] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 9 [30-Oct-2003 16:31:52] PHP Warning: fopen(history.html): failed to open stream: Permission denied in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 13 [30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 14 [30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 15 [30-Oct-2003 16:31:52] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 16 [30-Oct-2003 16:31:52] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/spaceemp/public_html/pbw/geoschmo/kothasvge/set_news.php on line 17 Geoschmo [ October 30, 2003, 20:33: Message edited by: geoschmo ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Hi, sorry Geo.
The upload button doesn't move the old file, it stays there as backup until the directory is cleared (stupid but so is it), the players will still get the right file though. All the others is due to missing files, my fault, thought they where included in the older Versions but in some they where not. Here is the fixed archives: (Geo, use the patch below, not getuptodate!) patch 1.5 fixed complete 1.5 fixed Getuptodate [ October 31, 2003, 06:11: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Nice work!
[ October 31, 2003, 14:04: Message edited by: Imperator Fyron ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
NB:
After applying the patch, remember to enter (OR RE-ENTER) manually the data in MAIL.PHP. i e; SMTP, account and YES, if you wish to use auto mail functions. This file is intended for the server owner and is therefore not accessible from the web with ver 1. [ October 31, 2003, 12:01: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Ruatha,
I still cannot get any of the admin functions to work. I get the admin page, but nothing I do there has any effect on the files and I get the same errors I was getting before. TO make sure it wasn't a missing file or somethign I made a new folder and put a fresh install of the 1.51 complete files in it. Same deal. Can't change admin password, or game details, or anything. Geoschmo |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Ok, I think it's some settings the host must propably do on the server.
You don't seem to have permission to change those files. I'd think that as uploads of turnfiles is allowed it would be allowed to change the other files aswell. But ask Fyron to check his settings for the gamedirectory aswell, now it's propably only the turnfiles directory that is open. As it works on my server it (propably..) has to be that. Do you still get that 404 error on downloading? If so I guess it's the same problem, the script isn't allowed to make that file. I guess ver 2 might be ready sooner than expected, and then the server just needs to open a subdirectory games and all it's subdirectories, not the folder where the scripts are located as in ver 1. I understand that is no comfort now, but there is nothing I (think) can do about these errors, now it's up to the server owner (I hope). Thanks Fyron, but here is my pride and joy: http://pbw.ath.cx/betafiles/new/index.php Admin password "ett" Feel free to set up and delete games, but leave the NGC3 game as that is my testgame (It's not the actual NGC3 game but as I can use those plar files it makes things easier for me..) [ October 31, 2003, 17:38: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
That makes sense. I am not going to worry about it then. What you have given me will get me through till PBW is back up. It's not that big a deal to do a little file swapping manually.
Geoschmo |
Re: PBW Emergency Site files v1.51 Finished and fixed.
You do realize that you can use linebreaks in echo commands, right? You do not need a separate one for every line of HTML...
Why is it still reading in from text files? What happened to the variables php file to include? http://forum.shrapnelgames.com/images/icons/icon9.gif The admin script should NOT instantly auto-redirect to index.php! It should display a dialogue telling whether it was successful or not, and provide a link back to the index! I can not even see the errors it is trying to tell me about. http://forum.shrapnelgames.com/images/icons/icon9.gif The Readme needs to mention that you need to set chmod permissions to 646 (allow public write) on all the "configuration" files to be edited by the admin scripts. Things like "set password" would IMO be better handled as functions in the admin.php, rather than as separate files. http://forum.shrapnelgames.com/images/icons/icon12.gif You should look into cookies... it is annoying to have to keep typing in the password over and over and over again... http://forum.shrapnelgames.com/images/icons/tongue.gif Your complete Version 15 file has the index.php copied into the gamefile folder. Please include a blank index.html file in each subfolder so that snooping browsers can't see their contents. http://forum.shrapnelgames.com/images/icons/icon12.gif If the email for a player is blank, then the page should not generate a mailto: link for it. It should just display the (none) text, and that is it. No sense making a link that doesn't do anything. [ November 08, 2003, 06:15: Message edited by: Imperator Fyron ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Hi.
I'm not going to rewrite ver 1.5, I was clear on that. It's a botch job. The Version 2 is complete as the PHP is concerned, and it covers most of what you have stated below. It can be used as a one game site or multi game site. you can check it out at http://pbw.ath.cx All is done in PHP and no BATCH files or external exe's is used (so far, the autoturn.exe is still to be done). What is left to do is the help files, that will be intead of most of the readme file. And it is much easier to set up and aminister than ver 1, no text files, all is done in web pages and all configuration data is in PHP files. As PBW ougth to be up soon I won't release ver 2 now as that would mean that all data in the text files would have to be entered into ver 2, instead I'll rout out bugs and finish the autoturn.exe app and have it ready for (may they never come) the next PBW down-time. Setting up the site should take a minute, and then setting up games is how fast you can enter the player names and e-mails in the text boxes. Yep, I do realize I can add linebreaks, and I sometime does, but mostly I add a new line to make it easier to read for myself, ver 1 isn't easy to read, that's why I abandonded it and started fresh, writing cleaner and better commented code, now that I know PHP. When writing ver 1 I learned it along the way. I won't use cookies, set your browser to auto complete and you'll just have to type the first letter and click the text that shows up. Edit2: Removed the index.php in the gamefile in the arrchive 15 complete. Edit3: The problem is that I constantly remimber new "features" to add, but it won't become bloatware, as the zip functions is included in the PHP script it ougth to have a lesser size footprint than ver 1.51. Ver 2 thread [ November 09, 2003, 07:12: Message edited by: Ruatha ] |
Re: PBW Emergency Site files v1.51 Finished and fixed.
Quote:
|
All times are GMT -4. The time now is 04:42 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.