PDA

View Full Version : Any MODs to Help "Brighten" Up the Box Scores?


manooly
12-03-2007, 10:10 AM
I was just curious if someone has created a MOD for FOF 2007 to help make the box scores/html look a little better and easier to read? does anyone know if this exists or not? If so, could you provide a link or some information as to how to get it?

Thanks for your time!

cuervo72
12-03-2007, 11:51 AM
Heh, this is funny timing.

I was playing around with this just last week actually in an attempt to have prettier FOFL box scores. What I came up with can be accessed through the "box" links here:

http://www.thefobl.com/forums/showpost.php?p=203937&postcount=3

Ok...so what is going on here exactly. Well, I made a perl script that basically makes mass substitutions, stripping out font tags (there are appx 1600 per box) and BGCOLOR tags, and inserts css styles here and there, then saves the html in-place. The script is run on the server though the unix command line, though I suppose it could be run locally if you have perl installed.

The css styles are generic ones - "home" and "away" basically. The css file itself is really a php script, which reads the year, home id and away id and retrieves the appropriate colors (and team abbr for the logos) from the FOFL database. This can get a little funky if you open a bunch up in the same browser and then hit the back key (it will cache the styles, even though I *though* I told it to have an expire = -1)...but it works ok. The only problem is that you can't really cut and paste the html with the correct styles.

I had been thinking of at least making the perl script available for those wanting to do the substitutions (doing this makes file size go from ~140k to ~40k). That still leaves the task of creating the correct css though, and I'm guessing most folks aren't running that dynamically. I did it dynamically because a) I didn't want to create 32 sets of css, and b) those colors will change in future years, and this is the easiest way to proceed forward (and also, to go BACK, as I have colors for past teams in the db).

cuervo72
12-03-2007, 12:44 PM
Ok....SOMEBODY uploaded the html again at 12:50 (great timing!), erasing the work of my script. The snappier look should be there now.

manooly
12-03-2007, 01:01 PM
Thanks for your reply! I'm really not sure what I need to do though. This is a script that you have created correct? What do I need to do to see boxscores similar in style to what you have?

Thanks!

cuervo72
12-03-2007, 01:15 PM
Well, that's where I'm undecided. One option is to provide a generic "home" and "away" stylesheet style that can be used in the background rather than my dynamic one. Another option would be to make the styles team specific, like style00, style01, etc. That might take a bit to build though given 32 sets of colors.

But yes, this is a perl script that does substitutions on the game-generated html.

Yoda
12-03-2007, 03:41 PM
I am currently working on a c++ script to do something similar. Execpt that instead of ging through and stripping out and replacing, I was going to go in, mine out the data and output the data into an html.

Maybe it would be easier your way....I'll have to think about it.

cuervo72
12-03-2007, 04:08 PM
If you're looking to capture the data and do other things with it (putting it in a db), that would be a better approach I think. I was just looking for a quick restyle, and perl's always been my favorite approach for doing things quick and dirty. :)

headtrauma
12-03-2007, 07:24 PM
If you're looking to capture the data and do other things with it (putting it in a db), that would be a better approach I think. I was just looking for a quick restyle, and perl's always been my favorite approach for doing things quick and dirty. :)

I've messed around with a web query that populates an Excel worksheet, which then strips out the results. The results then have to be uploaded into a MySQL database, then queried with PHP. It's clumsy, but it seems to work okay. I'd love to find a way to avoid the Excel step in this process, but I know it MUCH better than I do PHP or MySQL.

Anthony
12-05-2007, 11:47 AM
why isn't it as simple as just being able to edit the html with Dreamweaver or some other html editor and create your own boxscore html?

Yoda
12-05-2007, 12:04 PM
why isn't it as simple as just being able to edit the html with Dreamweaver or some other html editor and create your own boxscore html?

You can. But then you would have to do it each time you generate the html. Which for you, if you have the time, that's great. But I don't have the time to sit down everytime a game is played to import it into DW, make the changes and then upload it to the site.

Honestly, it's a time saver, and once the program is done, it works over and over and over. Why do the same task over and over and over when you can write a program to do it for you?

cuervo72
12-05-2007, 12:08 PM
why isn't it as simple as just being able to edit the html with Dreamweaver or some other html editor and create your own boxscore html?

Which html? You mean each box score, one by one? That could become a PITA after a while. Now if there was a template you could edit that adjusted how the html was generated, that might work.

What I have currently takes only about a few seconds to run (via the command line) and update the html for a week (or more). That beats hand editing as far as I'm concerned.

As for something that anyone can use, I'm going to wait to see if GS can parse the .fgr color file. If he can, then what I'll do is use that output to generate a set style sheet using those colors (so in that case, they'll be similar to the game's but with some exceptions). That, and I'll set it to use the logoXX.jpg files by default (I use something different now that doesn't have borders...unfortunate that these are jpg and not gif or png).

Week 2 output for FOFL:
http://www.thefobl.com/forums/showpost.php?p=204183&postcount=3


(ahh, Yoda beat me to it)

gstelmack
12-05-2007, 12:49 PM
As for something that anyone can use, I'm going to wait to see if GS can parse the .fgr color file.

This may be a bit. I've got some web stuff to do for WOOF first.

cuervo72
12-05-2007, 12:56 PM
This may be a bit. I've got some web stuff to do for WOOF first.

Not a problem.

Yoda
12-05-2007, 02:00 PM
That, and I'll set it to use the logoXX.jpg files by default (I use something different now that doesn't have borders...unfortunate that these are jpg and not gif or png).


That's an easy fix, but PITA fix though, even paint can save the files in a different format (though, honestly, I'd probably use Photoshop CS3).

cuervo72
12-05-2007, 02:33 PM
Well, it's not that the images can't be saved another way, just that the ones used by the default html are like that. Take for instance this page (and nevermind the ugly color scheme, as the html generator is using the default colors...):

http://www.thefofl.com/fofl/6roster.html

That uses logo06.jpg . By default, it would be nice if this could be something using transparency, as I'd really like to not have that white border there (and don't want to have to fill up the entire 128x128 space, and don't want to have to color match the background). Why jpg? No idea - the logos on the main page (again, custom) are gifs: http://www.thefofl.com/fofl/ .

For FOFL, I'm actually using images in a completely different location. But for standard leagues, using one of the base image sets (by location/name) is probably the best for everyone involved.

Yoda
12-05-2007, 02:53 PM
Well, it's not that the images can't be saved another way, just that the ones used by the default html are like that. Take for instance this page (and nevermind the ugly color scheme, as the html generator is using the default colors...):

http://www.thefofl.com/fofl/6roster.html

That uses logo06.jpg . By default, it would be nice if this could be something using transparency, as I'd really like to not have that white border there (and don't want to have to fill up the entire 128x128 space, and don't want to have to color match the background). Why jpg? No idea - the logos on the main page (again, custom) are gifs: http://www.thefofl.com/fofl/ .

For FOFL, I'm actually using images in a completely different location. But for standard leagues, using one of the base image sets (by location/name) is probably the best for everyone involved.

That's true enough.

Then again, I would like to see it where you could specify the image to be used for each time when the HTML is generated.

Something like:
Team : File
Arizona: \images\customYodaArizonalogo.png
Atlanta : \images\customYodaAtlantalogo.png

Anthony
12-05-2007, 03:40 PM
not that i would want to recreate the html everytime i load it, i want to be able to take this:

http://www.thefofl.com/fofl/box2017060011.html and change up the look (and not just the colors). maybe create an ESPN/Sportscenter type theme. maybe add in a snazzy background, that sort of thing. that sort of stuff should be more customizable. i thought it was as simple as just replacing the css file, couldn't we just create a template that the html box scores load from? i want to be able to create my own template, put it in the FOF folder and when the game loads the box score it just inputs the raw numbers/stats, but in the format i created. why is that so hard?

Yoda
12-05-2007, 04:17 PM
If you wanted to just make a generic template, then you would need a database to pull from. Or to have FoF programmed to look for the template you created and use that instead of the default one.

The game just isn't designed for that. Which is why we are talking about data mining, clearing things out and putting in our own stuff.

cuervo72
12-05-2007, 06:30 PM
not that i would want to recreate the html everytime i load it, i want to be able to take this:

http://www.thefofl.com/fofl/box2017060011.html and change up the look (and not just the colors). maybe create an ESPN/Sportscenter type theme. maybe add in a snazzy background, that sort of thing. that sort of stuff should be more customizable. i thought it was as simple as just replacing the css file, couldn't we just create a template that the html box scores load from? i want to be able to create my own template, put it in the FOF folder and when the game loads the box score it just inputs the raw numbers/stats, but in the format i created. why is that so hard?

Ok...then you may wish to explore that route. If you can hack the Solecismic program code and such. Go for it, sounds simple.

Anthony
12-06-2007, 11:42 AM
but there has to be a file that dictates how the info is presented? i'm sure there isn't code in the game that says "create a spreadsheet where this table goes on the upper left, that table with X stats goes in the lower left, etc". i'm sure there's a box score template that jim's numbers feed into. like where is the box score html being generated from? where is the file/code that dictates that's how the html boxscore is formated like that? why can't jim just make it so that you can create your own template and his numbers will populate in the data fields? this isn't researching the cure for cancer. i'm sure it makes sense from his end to do it that way, but how hard can it be to jazz it up by allowing the user to alter the html file that's generated? why would the game care if there's a plain yellow background or a user generated background?

Yoda
12-06-2007, 01:03 PM
Evidently even inside the code tags html code still works.....

Anyway, I would say that the html generation is hard coded into the program and isn't just a seperate file or template.

cuervo72
12-06-2007, 05:11 PM
why can't jim just make it so that you can create your own template and his numbers will populate in the data fields?

Heh...where to start with this one? Sure, he could.

Anthony
12-06-2007, 05:31 PM
like for the sound folder, i recorded my own voice speaking in a german girl's accent for Grid Iron Greta and i replaced the default sound clips. the game didn't care what's in the sound files or if they were altered. the code just wants to know which folder to grab the files from and which files to use.