Home | Webstore
Latest News: OOTP Update 20.6 - OOTP 20 Available - FHM 6 Available

FHM 6 Available 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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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, 176 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,627
Thanks: 256
Thanked 176x in 104 posts
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: 546
Thanks: 6
Thanked 33x in 24 posts
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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
 
captaincoop17's Avatar
 
Join Date: Apr 2013
Location: Pennsylvania
Posts: 688
Thanks: 190
Thanked 156x in 112 posts
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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
Thank you for this post:
captaincoop17 (01-27-2016)
Old 01-27-2016, 09:09 PM   #8
captaincoop17
All Star Reserve
 
captaincoop17's Avatar
 
Join Date: Apr 2013
Location: Pennsylvania
Posts: 688
Thanks: 190
Thanked 156x in 112 posts
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
Thank you for this post:
Andreas Raht (01-29-2016)
Old 01-29-2016, 12:26 AM   #9
byzeil
All Star Starter
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 1,586
Thanks: 2,360
Thanked 814x in 469 posts
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
Thank you for this post:
Andreas Raht (01-29-2016)
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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
All Star Starter
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 1,586
Thanks: 2,360
Thanked 814x in 469 posts
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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
 
captaincoop17's Avatar
 
Join Date: Apr 2013
Location: Pennsylvania
Posts: 688
Thanks: 190
Thanked 156x in 112 posts
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,840
Thanks: 857
Thanked 4,833x in 1,563 posts
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
 
captaincoop17's Avatar
 
Join Date: Apr 2013
Location: Pennsylvania
Posts: 688
Thanks: 190
Thanked 156x in 112 posts
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
All Star Starter
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 1,586
Thanks: 2,360
Thanked 814x in 469 posts
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
 
captaincoop17's Avatar
 
Join Date: Apr 2013
Location: Pennsylvania
Posts: 688
Thanks: 190
Thanked 156x in 112 posts
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
Thanks: 0
Thanked 0x in 0 posts
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
All Star Starter
 
byzeil's Avatar
 
Join Date: Aug 2009
Location: NJ, US
Posts: 1,586
Thanks: 2,360
Thanked 814x in 469 posts
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:04 AM.

 

Major League Baseball trademarks and copyrights are used with permission of MLB Advanced Media, L.P. Minor League Baseball trademarks and copyrights are used with the permission of Minor League Baseball. All rights reserved.

The Major League Baseball Players Association (www.MLBPLAYERS.com ) is the collective bargaining representative for all professional baseball players of the thirty Major League Baseball teams and serves as the exclusive group licensing agent for commercial and licensing activities involving active Major League baseball players. On behalf of its members, it operates the Players Choice licensing program and the Players Choice Awards, which benefit the needy through the Major League Baseball Players Trust, a charitable foundation established and run entirely by Major League baseball players. Follow: @MLB_Players; @MLBPAClubhouse; @MLBPlayersTrust

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 © 2017 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

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