[REL]Handy fake map status display system!


Waldo
10-18-2005, 05:37 PM
As a joke for Fuzzdad, I wrote a little PHP script the other day that generates a dynamic "status chart" for maps. It's totally random what it shows, not real data.

Here is an example URL for it.

http://web.engr.oregonstate.edu/~holtt/mapstat.php?m=dod_hill&a=Waldo

Once you view it, hit reload a few times to see how it's randomized.

Notice that you give the script two parameters: m, which is the name of the map to show, and a which is the author's name.

PS
If anyone knows how I can make this look like a real png/jpg/gif link but still run the PHP script, let me know. If you insert it as an image in a post, it doesn't work as the VB code decides it's not an image (as it ends in "php").

--- EDIT ---
Got info on how to do this and upated. Here ya go...

http://web.engr.oregonstate.edu/~holtt/mapstat.jpg

Maxey
10-18-2005, 06:02 PM
Waldo your driving simulatr thingy blocked my computer a while ago.

I demand something! :angry:

Soiled Undergarment
10-18-2005, 06:21 PM
the neverending dod_hill rebuild?

:(

[CS] Jedi
10-18-2005, 06:30 PM
Originally posted by Waldo
PS
If anyone knows how I can make this look like a real png/jpg/gif link but still run the PHP script, let me know. If you insert it as an image in a post, it doesn't work as the VB code decides it's not an image (as it ends in "php").

Wow - I can actually answer this. I had to do the same thing to get my phpUA signature to work.

1. In the folder on the webserver where you are keeping this *.php file, add a .htaccess file that contains the following:

AddType application/x-httpd-php .jpg

2. Now, on the webserver, change the file extension of your *.php file to *.jpg.

So, if your file was called script.php, change it script.jpg (no need for File - Save As...just change the file name).

It should work great after that. Basically, the .htaccess file tells the webserver to treat any *.jpg file in that folder as *.php. On the site that you want to display the image, it sees a*.jpg file and displays it just fine.

I'm no pro on this, but I got it to work using that method - thanks to help from the phpUA forums. Here are my images/php scripts:

http://www.dodchristiansoldiers.com/phpUA/image.jpg
http://www.dodchristiansoldiers.com/phpUA/image2.jpg (http://www.dodchristiansoldiers.com/index.php?option=com_wrapper&Itemid=41)

Hope that helps.

Jibba-Jabba
10-18-2005, 06:32 PM
Wow, I thought that was a real thing that Fuzzdad had...hahaha.

Neutrino
10-18-2005, 07:10 PM
btw, if anyone is wondering about my current mapping progress...

http://web.engr.oregonstate.edu/~holtt/mapstat.php?m=dod_paysage&a=Neutrino

tinfoil

Soiled Undergarment
10-18-2005, 07:15 PM
unfortunatly i believe that 100% will never appear in every colum for some reason.

:p

travis
10-18-2005, 07:16 PM
rofl waldo you have too much spare time on your hands! get to work!

Furyo
10-18-2005, 07:17 PM
Lol I just refreshed three times Neutrino's link and it showed as 75-95% everywhere except for "PR/Marketing" 2%. That made me laugh ;)

Waldo
10-18-2005, 07:20 PM
Originally posted by [CS] Jedi
Wow - I can actually answer this. I had to do the same thing to get my phpUA signature to work.

-- snip --

Hope that helps.


Absolutely does - w00t! Thanks! Had to basically drop the arguments with map name and author name, but it still looks good...

http://web.engr.oregonstate.edu/~holtt/mapstat.jpg

http://web.engr.oregonstate.edu/~holtt/mapstat.jpg

Soiled Undergarment
10-18-2005, 07:31 PM
i love the pointless catagories... as if animals and weather even need a bar.

then gameplay gets a 1% pppffff!!!!

lol!

siron
10-18-2005, 07:40 PM
Originally posted by Waldo
Absolutely does - w00t! Thanks! Had to basically drop the arguments with map name and author name, but it still looks good...


I don't know if this would work, but it would help you keep your arguments.. changing the .htaccess to something like this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourhost.com$
RewriteRule ^\.jpg /home/user/public_html/folder/picture.jpg

which would rewrite /folder/anything.jpg to picture.jpg

so you could enter something like.. siron-dod_veghel.jpg, which would direct to picture.jpg, and then parse that in your php file (use $REQUEST_URI and explode using the '-' char to set the values of each).

just an idea :/

Apollo
10-18-2005, 07:53 PM
hahahaha, that's great.

StreamlineData
10-18-2005, 08:45 PM
lol... I thought FD's map status was real, too! :( :P

Bo0stBo0st
10-18-2005, 09:45 PM
does this mean hill is comming back?

StreamlineData
10-18-2005, 09:51 PM
Originally posted by Bo0stBo0st
does this mean hill is comming back? well, i have seen a version of dod_hill show up on some source servers a few days ago... but i'm not sure if this map version was by the original author or not.

alby13
10-18-2005, 10:38 PM
i want hill!!!!!!!!!!

i love it. :crown:

Propaganda
10-18-2005, 10:50 PM
Pointless yet somehow amusing....

Bo0stBo0st
10-18-2005, 10:53 PM
there were servers playing hill for source?

Waldo
10-19-2005, 01:02 AM
Originally posted by siron
I don't know if this would work, but it would help you keep your arguments.. changing the .htaccess to something like this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourhost.com$
RewriteRule ^\.jpg /home/user/public_html/folder/picture.jpg

which would rewrite /folder/anything.jpg to picture.jpg

so you could enter something like.. siron-dod_veghel.jpg, which would direct to picture.jpg, and then parse that in your php file (use $REQUEST_URI and explode using the '-' char to set the values of each).

just an idea :/

Sweet! I'll hack that in tomorrow. Great use of configs on the web server side!

Ca-Chicken-Soup
10-19-2005, 01:32 AM
Am I allowed to use it for my sig? (see below). Want me to add thanks or a link?

Waldo
10-19-2005, 10:42 AM
Originally posted by Ca-Chicken-Soup
Am I allowed to use it for my sig? (see below). Want me to add thanks or a link?

No problem - it's the university's bandwidth not mine :^)

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.