Home | Webstore
Latest News: OOTP 25 Available - FHM 10 Available - OOTP Go! Available

Out of the Park Baseball 25 Buy Now!

  

Go Back   OOTP Developments Forums > Prior Versions of Our Games > Out of the Park Baseball 16 > OOTP 16 - Online Leagues

OOTP 16 - Online Leagues Want to create or join an OOTP 16 online league? This is the right forum for you.

Reply
 
Thread Tools
Old 01-26-2016, 02:29 PM   #1
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
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:
  • delete the existing reports table from the MySQL database on your web server
  • unzip and copy the attached scripts to the /online_scripts folder on your computer, replacing the original script files index.php and unpackreports.php
  • Have fun!
On the first run it will create the tables and import all reports. On all following runs it will only update records where the report content changed.
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!
Attached Files
File Type: zip online_scripts_2016-01-29.zip (3.5 KB, 350 views)

Last edited by Andreas Raht; 03-02-2016 at 03:18 PM.
Andreas Raht is offline   Reply With Quote
Old 01-26-2016, 04:36 PM   #2
Recte44
Global Moderator
 
Recte44's Avatar
 
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)
Recte44 is offline   Reply With Quote
Old 01-26-2016, 10:45 PM   #3
strzepeksc
All Star Reserve
 
Join Date: Jul 2003
Posts: 628
failure

fails to work
strzepeksc is offline   Reply With Quote
Old 01-27-2016, 04:38 AM   #4
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by strzepeksc View Post
fails to work
Works for me. Could you give some more information please? Did you use the old scripts and did they work?
Andreas Raht is offline   Reply With Quote
Old 01-27-2016, 04:42 AM   #5
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by Recte44 View Post
I've always found this method very confusing and difficult to setup. Is it really that hard? Why can't I figure it out?
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.
Andreas Raht is offline   Reply With Quote
Old 01-27-2016, 02:58 PM   #6
captaincoop17
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?
captaincoop17 is offline   Reply With Quote
Old 01-27-2016, 03:31 PM   #7
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by captaincoop17 View Post
Does this speed up the time it takes to generate all the reports? Or does this just speed up the upload process?
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.
Andreas Raht is offline   Reply With Quote
Old 01-27-2016, 09:09 PM   #8
captaincoop17
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?
captaincoop17 is offline   Reply With Quote
Old 01-29-2016, 12:26 AM   #9
byzeil
Hall Of Famer
 
byzeil's Avatar
 
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.
byzeil is offline   Reply With Quote
Old 01-29-2016, 06:55 AM   #10
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by byzeil View Post
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?
Thank you! Yes, you're right, there was a bug in the unpack script. I updated the attachment in the opening post with the new script. Please download, unpack and copy to your server. Then delete the report tables from the database (important!) and import the reports again.

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:
<div style="text-align:center; color:#FFFFFF; padding-top:4px;">[%DATE]</div
Andreas Raht is offline   Reply With Quote
Old 01-29-2016, 06:58 AM   #11
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by captaincoop17 View Post
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?
This is the original page_bottom_line.tpl:
PHP Code:
<!-- OOTP IGNORE START PAGE BOTTOM --><table cellspacing="0" cellpadding="0" align="center" width="968px">    <tr>        <td style="padding-top:10px; font-size:11px; text-align:center;">            [%POWERED_BY]        </td>    </tr>    <tr>        <td style="padding-top:2px; font-size:11px; text-align:center;">            [%VERSION]        </td>    </tr>    </table><!-- OOTP IGNORE END PAGE BOTTOM --> 
Remove the [%VERSION] This is the edited template:
PHP Code:
<!-- OOTP IGNORE START PAGE BOTTOM --><table cellspacing="0" cellpadding="0" align="center" width="968px">    <tr>        <td style="padding-top:10px; font-size:11px; text-align:center;">            [%POWERED_BY]        </td>    </tr>    <tr>        <td style="padding-top:2px; font-size:11px; text-align:center;">            [%VERSION]        </td>    </tr>    </table><!-- OOTP IGNORE END PAGE BOTTOM --> 
Andreas Raht is offline   Reply With Quote
Old 01-29-2016, 10:19 AM   #12
byzeil
Hall Of Famer
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
Quote:
Originally Posted by Andreas Raht View Post
This is the original page_bottom_line.tpl:
PHP Code:
<!-- OOTP IGNORE START PAGE BOTTOM --><table cellspacing="0" cellpadding="0" align="center" width="968px">    <tr>        <td style="padding-top:10px; font-size:11px; text-align:center;">            [%POWERED_BY]        </td>    </tr>    <tr>        <td style="padding-top:2px; font-size:11px; text-align:center;">            [%VERSION]        </td>    </tr>    </table><!-- OOTP IGNORE END PAGE BOTTOM --> 
Remove the [%VERSION] This is the edited template:
PHP Code:
<!-- OOTP IGNORE START PAGE BOTTOM --><table cellspacing="0" cellpadding="0" align="center" width="968px">    <tr>        <td style="padding-top:10px; font-size:11px; text-align:center;">            [%POWERED_BY]        </td>    </tr>    <tr>        <td style="padding-top:2px; font-size:11px; text-align:center;">    </td>    </tr>    </table><!-- OOTP IGNORE END PAGE BOTTOM --> 
the edited version that you posted still has the 'version' in it.

Last edited by Andreas Raht; 01-29-2016 at 10:22 AM.
byzeil is offline   Reply With Quote
Old 01-29-2016, 10:22 AM   #13
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by byzeil View Post
the edited version that you posted still has the 'version' in it.
Fixed. Thanks!
Andreas Raht is offline   Reply With Quote
Old 01-29-2016, 10:50 AM   #14
captaincoop17
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.
Attached Images
Image 

Last edited by captaincoop17; 01-29-2016 at 10:52 AM.
captaincoop17 is offline   Reply With Quote
Old 01-29-2016, 10:53 AM   #15
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by captaincoop17 View Post
Still getting this error when loading a saved game or trying to review any reports in game.

Also prevents the game from simming and I have to force quit.
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?
Andreas Raht is offline   Reply With Quote
Old 01-29-2016, 11:07 AM   #16
captaincoop17
All Star Reserve
 
Join Date: Apr 2013
Posts: 869
Quote:
Originally Posted by Andreas Raht View Post
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?
Yes, restarted OOTP multiple times. File is still in the same place and has the same name.
captaincoop17 is offline   Reply With Quote
Old 01-29-2016, 05:59 PM   #17
byzeil
Hall Of Famer
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
Quote:
Originally Posted by captaincoop17 View Post
Yes, restarted OOTP multiple times. File is still in the same place and has the same name.
FYI I have implemented the changes, including altering the templates as suggested, and everything is working OK.

It looks like something went wrong when you altered the template file.
byzeil is offline   Reply With Quote
Old 01-29-2016, 07:51 PM   #18
captaincoop17
All Star Reserve
 
Join Date: Apr 2013
Posts: 869
Quote:
Originally Posted by byzeil View Post
FYI I have implemented the changes, including altering the templates as suggested, and everything is working OK.

It looks like something went wrong when you altered the template file.
Can someone post the template file then?
captaincoop17 is offline   Reply With Quote
Old 02-03-2016, 07:25 PM   #19
motnagoh79
Bat Boy
 
Join Date: Feb 2016
Posts: 16
where are the reports located that need to be deleted?
motnagoh79 is offline   Reply With Quote
Old 02-04-2016, 10:40 AM   #20
byzeil
Hall Of Famer
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 2,002
Quote:
Originally Posted by motnagoh79 View Post
where are the reports located that need to be deleted?
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.
byzeil is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

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 Off

Forum Jump


All times are GMT -4. The time now is 01:45 AM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments