|
||||
|
01-26-2016, 02:29 PM | #1 |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Improved online scripts for reports
I improved the PHP scripts which unpack the report files to the MySQL database. They unpack it to multiple tables now and they also update only records where the report data has changed. That should help to reduce problems with huge report databases.
All you need to do is:
Obviously there will always be changes on each report page because there's a timestamp at the bottom of each page. To get rid of the timestamp, remove the [%VERSION] token from the page_bottom_line.tpl template (you'll find the template files inside the folder /templates). Please give us some feedback here. Thanks! Last edited by Andreas Raht; 03-02-2016 at 03:18 PM. |
01-26-2016, 04:36 PM | #2 |
Global Moderator
Join Date: Dec 2001
Location: Oconomowoc, WI
Posts: 2,754
|
I've always found this method very confusing and difficult to setup. Is it really that hard? Why can't I figure it out?
__________________
Matt Rectenwald Commissioner, GM: Las Vegas Hustlers, The Brewster Baseball Association- fictional league (JOIN NOW) |
01-26-2016, 10:45 PM | #3 |
All Star Reserve
Join Date: Jul 2003
Posts: 628
|
failure
fails to work
|
01-27-2016, 04:38 AM | #4 |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Works for me. Could you give some more information please? Did you use the old scripts and did they work?
|
01-27-2016, 04:42 AM | #5 |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Yes, it is. You have to setup a MySQL database and you have to enter the correct connection info on the dialog in OOTP. If one of the several things you need to do is not 100% correct, then it will fail. For admins, programmers or just talented DIY guys it will work. But it's not trivial.
|
01-27-2016, 02:58 PM | #6 |
All Star Reserve
Join Date: Apr 2013
Posts: 869
|
Does this speed up the time it takes to generate all the reports? Or does this just speed up the upload process?
|
01-27-2016, 03:31 PM | #7 |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Report creation speed and upload speed is the same, but the number of files on the server is almost zero instead of some 10,000 files.
|
01-27-2016, 09:09 PM | #8 |
All Star Reserve
Join Date: Apr 2013
Posts: 869
|
I've managed to get the new scripts installed, but removing the timestamp is causing an error in OOTP?
Can you post the page_bottom_line.tpl template file as well? |
01-29-2016, 12:26 AM | #9 |
Hall Of Famer
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
|
The new scripts seem to be working as advertised.
But I am noticing something, and not sure if it was happening before, but some player pages seem to be getting cut off at the bottom. I'm seeing many players cut off and many not. You can go to this team page and select different players and you should see what I am talking about. Check the first 2 pitchers, Rivera (not cut off) and Blackburn (cut off). On pitcher Ocura only the final link to the OOTPD site is cut off. Also, there is a league date at the top of each page, in the header I guess, won't that cause all generated pages to be different even though the report may not have changed? Last edited by byzeil; 01-29-2016 at 12:47 AM. |
01-29-2016, 06:55 AM | #10 | |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Quote:
Yes, the league date will have to be removed from the header, too. Edit the templates which names start with "page_header_" and remove the line that contains the [%Date], for example: PHP Code:
|
|
01-29-2016, 06:58 AM | #11 | |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Quote:
PHP Code:
PHP Code:
|
|
01-29-2016, 10:19 AM | #12 | |
Hall Of Famer
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
|
Quote:
Last edited by Andreas Raht; 01-29-2016 at 10:22 AM. |
|
01-29-2016, 10:22 AM | #13 |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
Fixed. Thanks!
|
01-29-2016, 10:50 AM | #14 |
All Star Reserve
Join Date: Apr 2013
Posts: 869
|
Still getting this error when loading a saved game or trying to view any reports in game.
Also prevents the game from simming and I have to force quit. Last edited by captaincoop17; 01-29-2016 at 10:52 AM. |
01-29-2016, 10:53 AM | #15 |
Administrator
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
|
The game cannot fnd or cannot open the file in the templates folder. Did you restart OOTP? Is the file still there and has the proper name?
|
01-29-2016, 11:07 AM | #16 |
All Star Reserve
Join Date: Apr 2013
Posts: 869
|
|
01-29-2016, 05:59 PM | #17 | |
Hall Of Famer
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
|
Quote:
It looks like something went wrong when you altered the template file. |
|
01-29-2016, 07:51 PM | #18 |
All Star Reserve
Join Date: Apr 2013
Posts: 869
|
|
02-03-2016, 07:25 PM | #19 |
Bat Boy
Join Date: Feb 2016
Posts: 16
|
where are the reports located that need to be deleted?
|
02-04-2016, 10:40 AM | #20 |
Hall Of Famer
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
|
It is the 'reports' table in your MYSQL database. Only applies if you are loading your reports into MYSQL. The script updates your reports in MYSQL. If you are just uploading your reports as HTML this script really don't do anything for you.
|
Bookmarks |
|
|