.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #11  
Old August 13th, 2003, 03:31 PM

tesco samoa tesco samoa is offline
General
 
Join Date: Jul 2001
Location: Canada
Posts: 4,603
Thanks: 0
Thanked 0 Times in 0 Posts
tesco samoa is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

here is how you do that in php
this file will read everything in the directory and the person can right click and save as
just put this as a file in the directory and then call it download.php or something and get the person to link to that. you can add stuff to it etc... to make it all pretty like

1060781471.zip
__________________
RRRRRRRRRRAAAAAGGGGGGGGGHHHHH
old avatar = http://www.shrapnelgames.com/cgi-bin...1051567998.jpg

Hey GUTB where did you go...???

He is still driving his mighty armada at 3 miles per month along the interstellar highway bypass and will be arriving shortly
Reply With Quote
  #12  
Old August 13th, 2003, 03:32 PM

tesco samoa tesco samoa is offline
General
 
Join Date: Jul 2001
Location: Canada
Posts: 4,603
Thanks: 0
Thanked 0 Times in 0 Posts
tesco samoa is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

installing php is easy... php.net
__________________
RRRRRRRRRRAAAAAGGGGGGGGGHHHHH
old avatar = http://www.shrapnelgames.com/cgi-bin...1051567998.jpg

Hey GUTB where did you go...???

He is still driving his mighty armada at 3 miles per month along the interstellar highway bypass and will be arriving shortly
Reply With Quote
  #13  
Old August 13th, 2003, 03:35 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

I don't want them to be able to download from the list.
The CGI upload form works great.
the do it yourself download form works with fixed file names.

What I want is a table with the files in the turnfiles directory, and a way to get an automatic download of the only file in the gamefile directory when you press the download current gameturn icon

This is how it looks now:

http://ruatha.homelinux.org

[ August 13, 2003, 14:37: Message edited by: Ruatha ]
Reply With Quote
  #14  
Old August 13th, 2003, 03:47 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

Just a way to get all filenames in a directory into a variable would be very helpful.
Reply With Quote
  #15  
Old August 13th, 2003, 04:41 PM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 4 Times in 1 Post
geoschmo is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

Well, the simplest solution would be for you to just name the current .zip file without the turn number. If the latest file is always the same name the download link never changes. You just overwrite it when you upload it for the players to get.

Geoschmo
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #16  
Old August 13th, 2003, 05:11 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

Quote:
Originally posted by Ruatha:
It's the easy way out, but then it's harder for the one's downloading as it then wants to owerwrite the previous zipped turn.
They would also have to download it and unpack it to verify that it is indeed the latest turn and that I haven't messed up.
With the turn number in the file name it's easier for both them and me to know that all is ok.

I'd prefer to keep it to PBW standards.
Reply With Quote
  #17  
Old August 13th, 2003, 05:20 PM

tesco samoa tesco samoa is offline
General
 
Join Date: Jul 2001
Location: Canada
Posts: 4,603
Thanks: 0
Thanked 0 Times in 0 Posts
tesco samoa is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

sorry ruthia i do not know perl at all
__________________
RRRRRRRRRRAAAAAGGGGGGGGGHHHHH
old avatar = http://www.shrapnelgames.com/cgi-bin...1051567998.jpg

Hey GUTB where did you go...???

He is still driving his mighty armada at 3 miles per month along the interstellar highway bypass and will be arriving shortly
Reply With Quote
  #18  
Old August 13th, 2003, 05:27 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

Quote:
Originally posted by tesco samoa:
sorry ruthia i do not know perl at all
I almost doesn't know it either, it's just an acquaintance, not a friend.
Reply With Quote
  #19  
Old August 13th, 2003, 05:28 PM

gravey101 gravey101 is offline
Corporal
 
Join Date: Nov 2001
Location: Knoxville, TN
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
gravey101 is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

Just a way to get all filenames in a directory into a variable would be very helpful.

In perl, just use opendir and readir thus;

$directory = '/tmp/files';
@files = ();
opendir (DIR, $directory);
while ($file = readdir(DIR)) {
push @files, $file;
}
closedir(DIR);

and @files has your list of files.

[ August 13, 2003, 16:30: Message edited by: gravey101 ]
Reply With Quote
  #20  
Old August 13th, 2003, 05:54 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: OT:Is this the right forum for HTML help?

Thanx, will test this!
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:14 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.