BZFlag Image Submitter

Important stuff goes here.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

BZFlag Image Submitter

Post by RPG » Thu May 18, 2006 10:12 pm

As you all know, BZflag can download textures from the internet to apply to BZFlag maps, making the map more enjoyable. Also, in your downloadaccess.txt file, you can only download textures from bzflag sites by default. This discourages some mapmakers, as they need images on their maps, but do not have the credentials to put them on a bzflag server so that they may be downloaded by every client set to the default downloadaccess configuration.

BZflag Image Submitter

This is where the BZFlag Image Submitter comes in. This is a script that makes it easy for anyone to get their images hosted on images.bzflag.org , and thus be available to every client with a default downloadaccess file.

BZIS

The BZFlag Image Submitter scrpit does a few things.

1. You use global login to authenticate yourself.
2. You upload your images to the server.
3. You wait as an admin approves or rejects your image.
4. You will get a notice via e-mail when your image is approved/rejected.
5. You will recieve the URL to your image (if it was accepted).
6. You can use your image in your maps!

Note that you must have the sufficent permissions to upload images.

If you need help with the script, or find a bug, you can tell RPG about it:
garrett@garrettsites.net (email)
RPG405 (aim)
#planetmofo (irc)


BZIS

User avatar
^nightmare^
Private First Class
Private First Class
Posts: 1264
Joined: Sun Feb 20, 2005 7:14 pm
Location: Alabama
Contact:

Post by ^nightmare^ » Thu May 18, 2006 11:01 pm

Im having problems with this...
It says my image is not a png image when i know it is
Need bzflag help? Try looking here: http://www.freewebs.com/bznightmare/map ... aghelp.htm

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Thu May 18, 2006 11:21 pm

What browser are you using?
Can you e-mail me the PNG file?

BZIS uses two ways of validating that an image is a PNG image. First off, it checks the file's extention, it MUST end in .png . ANYTHING ELSE AND IT WON'T BE UPLOADED! This is a security feature to prevent people from uploading malicious files.

The second way is to see what MIME type the browser supplied when uploading the image. This is where I think your error is occuring. You have no direct control over what MIME types are assigned to what types of files, your browser automatically does that. If we find out that you just have a buggy browser, you can still submit your image the old-fashioned way, by e-mailling it to a BZFlag admin.

User avatar
[dmp]
Captain
Captain
Posts: 282
Joined: Mon Dec 09, 2002 3:20 pm
Location: CPH, Denmark
Contact:

Post by [dmp] » Thu May 18, 2006 11:24 pm

RPG: You need to allow image/x-png too (browsers like IE uses this mime-type).
I don't need huge pictures here.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Fri May 19, 2006 12:21 am

[dmp]
thanks for the tip :). The fix has been applied.

User avatar
Winny
Grouchy
Grouchy
Posts: 2381
Joined: Wed Aug 24, 2005 12:27 am
Location: Ottawa eh?
Contact:

Post by Winny » Fri May 19, 2006 7:56 pm

Cool, glad hosting textures is now easy.


Out of curiosity; is this still hosted on the bzbb server?

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5173
Joined: Fri Dec 13, 2002 4:11 am
Location: https://discord.gg/NN9uAvx
Contact:

Post by JeffM » Fri May 19, 2006 8:03 pm

yes, it is still hosted here.

but here is a difrent here.

User avatar
Winny
Grouchy
Grouchy
Posts: 2381
Joined: Wed Aug 24, 2005 12:27 am
Location: Ottawa eh?
Contact:

Post by Winny » Fri May 19, 2006 8:05 pm

O yeah, of course, the move...

*smacks self on head*

User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1403
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom
Contact:

Post by Spazzy McGee » Fri May 19, 2006 10:40 pm

ah, cheers. i'm glad it's finally done ;) good work RPG and all that worked on it.
"Life is what happens to you while you're busy making other plans." - John Lennon

User avatar
tw1sted
Private First Class
Private First Class
Posts: 849
Joined: Tue Feb 21, 2006 10:21 pm

Post by tw1sted » Fri May 19, 2006 10:45 pm

thats RPG... now i can start making some awsome maps :D

Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ » Fri May 19, 2006 10:47 pm

RPG
Great work!! Can you change the code to send a bzbb pm instead of a email? SOME of us may not have a working email that we are ready to give out.

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5173
Joined: Fri Dec 13, 2002 4:11 am
Location: https://discord.gg/NN9uAvx
Contact:

Post by JeffM » Fri May 19, 2006 11:27 pm

the email is only sent to the admins, aka ME. so it's not like you are giving it out to anyone who can't go find it if they need it.

you must have a valid e-mail address to use the froums... so it should not be a problem just giving it the e-mail address you have on file for the forums.


it's a field in case you want the notification sent to another address.

User avatar
^nightmare^
Private First Class
Private First Class
Posts: 1264
Joined: Sun Feb 20, 2005 7:14 pm
Location: Alabama
Contact:

Post by ^nightmare^ » Tue May 23, 2006 7:35 pm

How long will it take for somebody to approve or eject it? its been a while and still havnt gotten any response
Need bzflag help? Try looking here: http://www.freewebs.com/bznightmare/map ... aghelp.htm

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5173
Joined: Fri Dec 13, 2002 4:11 am
Location: https://discord.gg/NN9uAvx
Contact:

Post by JeffM » Tue May 23, 2006 9:02 pm

I get an e-mail when you send it, and if I'm infront of my mail I'll do it right then. If not ( like it's night ) it may wait till the next day.

your images were all jacked up and got denied.

the aproval list is empty as I see it now.

you may want to resubmit them, since I think the bug that jacked your images was fixed.

User avatar
Winny
Grouchy
Grouchy
Posts: 2381
Joined: Wed Aug 24, 2005 12:27 am
Location: Ottawa eh?
Contact:

Post by Winny » Fri May 26, 2006 12:20 am

I can't seem to log in, I have cleared all my cookies.

I go to the login screen, I enter my pass, then the site links back to image.bzflag.org, but Im not logged in.

User avatar
BIYA
Corporal
Corporal
Posts: 891
Joined: Fri Dec 03, 2004 1:43 am
Location: Fredericksburg, Virginia
Contact:

Post by BIYA » Sun May 28, 2006 4:49 pm

Hurray!!!!

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Wed May 31, 2006 8:05 pm

Win Xp wrote:I can't seem to log in, I have cleared all my cookies.

I go to the login screen, I enter my pass, then the site links back to image.bzflag.org, but Im not logged in.
You might have cookies disabled. The authenticated sessions are handled with PHP's build in session manager, via the $_SESSION variables. IIRC, it uses cookies to store your Session ID, which is necessary for your session. I am not too sure on how PHP's session feature works, but cookies sounds like the logical option.

User avatar
TD-Linux
Sergeant
Sergeant
Posts: 724
Joined: Wed Apr 27, 2005 8:26 pm
Location: Mountain View, CA

Post by TD-Linux » Fri Jun 02, 2006 12:49 am

Could there be a checkbox to replace a previous texture submitted of the same name?

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Fri Jun 02, 2006 9:09 pm

TD-Linux wrote:Could there be a checkbox to replace a previous texture submitted of the same name?
No, and I'll tell you the reason why.

http://images.bzflag.org/ is a image hosting website for BZFlag. It is not a file storage site of any kind. It's purpose is to store images used for BZFlag maps. Not being a file server, images.bzflag.org is not the kind of site that you would expect to be able to "delete" files on. "Deleting" files and then subsequently adding another one in my mind is like filesharing, one version of the file becomes obsolete, the other replaces it. I do not see how images can become obsolete. Images should not be replaced. The only reason I can see for replacing images is if you are 1) Testing your map with images hosted on I.BZ.BZ instead of having the images locally, or 2) people think your images suck and you need to replace them. Number 1 you should be testing your map on your own local machine and make sure that you like all the images before you upload them. Number 2 is understandable and would make a good reason for supporting image deletion on I.BZ.BZ, but due to my first point, I won't add image deletion into the image submit script.

My decision stands until a higher admin knocks it down with a giant baseball bat. In which case I would add in image deletion.

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r » Fri Jun 02, 2006 9:56 pm

I don't think image replacement should be allowed, because other maps may use your textures.
Optimism is just a milder alternative to denial.

Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ » Mon Jun 19, 2006 4:00 pm

Seems to work well. When you go to http://images.bzflag.org/twgin there is nothing there.

but http://images.bzflag.org/twgin/step5.jpg shows stuff. is that a glitch?

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Wed Jun 21, 2006 3:28 am

Legolas_
Bloody heck, you uploaded a JPEG image! I don't think that passed through my image uploader system... there are three different independent checks to make sure an image is a PNG image. Your image is not being recognized because the system only recognizes PNG images. IIRC, JPG's don't work properly in BZFlag as textures.

Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ » Wed Jun 21, 2006 3:43 am

thats odd. ill try to remember that in the future thanks

User avatar
Spazzy McGee
Sergeant Major
Sergeant Major
Posts: 1403
Joined: Mon Mar 21, 2005 4:59 pm
Location: Planet MoFo, Sheffield Division; United Kingdom
Contact:

Post by Spazzy McGee » Sat Jul 01, 2006 8:39 pm

For some reason i can't log in. my details are totally correct, but it simply sends me back to the front page, without any error message or anything....

any ideas?
"Life is what happens to you while you're busy making other plans." - John Lennon

User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike » Sat Oct 28, 2006 1:03 am

Spazzy, RPG:
PHP uses %_SESSIONS like RPG, says, and that uses Cookies, it's just a higher way to look at cookies, and stops... Session attacks...

So make sure cookies are there, empty your cache and try again.

Post Reply