Home | Webstore
Latest News: OOTP Update 20.1.32 - OOTP 20 Available - FHM 5 Available

OOTP Baseball 20 - AVAILABLE NOW!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 20 > OOTP Mods > OOTP Mods - Database Tools

OOTP Mods - Database Tools Do you need to take a dump? SQL gurus welcome

Reply
 
Thread Tools
Old 11-29-2012, 05:56 PM   #1
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,455
Thanks: 165
Thanked 1,174x in 441 posts
StatsLab

StatsLab 13 v3.0

I've had a lot of inquiries about StatsLab lately, so here is finally an update to the utility.

StatsLab is a set of web pages and utilities for use with online leagues. It requires PHP and MySQL on a webserver. The intention is to enhance the online league experience by covering some gaps in what can be done via OOTP itself. For those of you familiar with the old version of StatsLab, everything has been rewritten to hopefully provide a better experience.

Downloads
Downloads are now accessible at the work in progress StatsLab Wiki.

Versions are available for OOTP13, OOTP14, OOTP15, OOTP16, and OOTP18. For OOTP17, please use the OOTP16 version. Questions about installation and configuring the MySQL load in OOTP can be found via the Installation link on the left.

Be sure to download the appropriate version for your league.

Documentation
The zip files include basic installation instructions, as well as instructions for upgrading from the old version of StatsLab12 and draft utility instructions.

Full documentation is not yet available, but will be written up in the near future.
If in doubt, check out the old StatsLab11 documentation - most of the settings function similarly.

Key Features:
  • League selector - one install can give StatsLab level reports from High School up to the Majors.
  • Season module containing last sim, playoff, milestone reports, and more.
  • Historical module containing detailed league, team, and player reports.
  • Stat of the Day with a year's worth of unique insight into your league.
  • Vote for All-Stars, End-of-season Awards, and Hall of Famers
  • Draft Module
  • Development Tracker
  • Front office module including trade block, team injury reports, payroll projections, and projected FA reports
  • Export Tracker
  • Dynamic widgets that can be used to put stats on your online league's home page

Now the disclaimer... I haven't had as much testing from live leagues as I would have liked. The PEBA has been using the StatsLab12 version for some time now, and while I've shared the util with some OOTP13 leagues, I haven't had a lot of feedback.

I'm sure it's possible that some things have been missed, so questions/bug reports/enhancement suggestions and the like are all welcome. The best way to get a response from me is to PM me on these forums, although there's enough StatsLab experience floating around the OOTP community that posting in this thread may get your question answered by a forum member faster than I will get to it.

Acknowledgements
The original idea for StatsLab came from Catobase and OOTP:OU, as well as Markus' inclusion of a MySQL data dump. Many thanks also to Corsairs, and the rest of the PEBA for putting up with some bugs and botched fixes along the way.

Donate to StatsLab - StatsLab is free to use. Donations are not required, but greatly appreciated given the amount of time that has gone into this.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.

Last edited by fhomess; 03-25-2017 at 12:03 AM.
fhomess is offline   Reply With Quote
14 thanks for this post:
bulldog55 (01-01-2013), cody8200 (12-05-2012), Corsairs (11-29-2012), gRaider2001 (12-03-2013), Kaaosaste (12-10-2012), Killebrew (01-21-2013), kleric (05-11-2013), McLite (04-17-2015), mikezone13 (04-22-2014), mstreeter06 (06-03-2013), ootpFox07 (12-10-2012), scotto313 (11-29-2012), Spindel (12-11-2012), stealofhome (04-10-2019)
Old 11-30-2012, 11:18 PM   #2
Bonedwarf
All Star Starter
 
Bonedwarf's Avatar
 
Join Date: Jan 2004
Posts: 1,339
Thanks: 0
Thanked 1x in 1 post
Ah, Catobase, I remember that well.

Look forward to trying this.
Bonedwarf is offline   Reply With Quote
Old 12-09-2012, 08:56 AM   #3
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,378
Thanks: 1,834
Thanked 1,147x in 474 posts
I just wanted to post a live version of a StatsLab 13 game for people who may never have seen it in action. This is just my single player league I play. Just the first year in so a lot of the cool history stuff isn't working yet. Amazing work as always Frank!

Box Scores - StatsLab for OOTP13
__________________
Web Design and Digital Marketing Agency - Sharp Guys Web Design -
Twitter: @sharpguysweb
cody8200 is offline   Reply With Quote
Old 12-09-2012, 09:10 AM   #4
Cooleyvol
Hall Of Famer
 
Cooleyvol's Avatar
 
Join Date: Dec 2001
Location: Union City, TN
Posts: 6,283
Thanks: 66
Thanked 611x in 364 posts
Quote:
Originally Posted by cody8200 View Post
I just wanted to post a live version of a StatsLab 13 game for people who may never have seen it in action. This is just my single player league I play. Just the first year in so a lot of the cool history stuff isn't working yet. Amazing work as always Frank!

Box Scores - StatsLab for OOTP13
Dead link (actually got a Trojan warning initially from Avast).
Cooleyvol is offline   Reply With Quote
Old 12-09-2012, 09:57 AM   #5
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,378
Thanks: 1,834
Thanked 1,147x in 474 posts
Weird. I just tried it again after logging out and it still works.
__________________
Web Design and Digital Marketing Agency - Sharp Guys Web Design -
Twitter: @sharpguysweb
cody8200 is offline   Reply With Quote
Old 12-10-2012, 10:06 AM   #6
Kaaosaste
Minors (Double A)
 
Join Date: Apr 2010
Posts: 118
Thanks: 49
Thanked 33x in 23 posts
I was able to get this up and running last night for my league. No hitches to report. Thanks for all your work on this!
Kaaosaste is offline   Reply With Quote
Old 12-13-2012, 12:09 PM   #7
Halara
Minors (Single A)
 
Join Date: Apr 2010
Posts: 64
Thanks: 14
Thanked 8x in 5 posts
This is great news! Thanks!
Halara is offline   Reply With Quote
Old 12-13-2012, 10:38 PM   #8
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,378
Thanks: 1,834
Thanked 1,147x in 474 posts
I'm loving all of the new graphs, positional leaderboards and history. I would love to see the preseason prediction make a comeback though! Awesome stuff Frank!
__________________
Web Design and Digital Marketing Agency - Sharp Guys Web Design -
Twitter: @sharpguysweb
cody8200 is offline   Reply With Quote
Old 12-14-2012, 04:08 PM   #9
Buane
Minors (Double A)
 
Join Date: Mar 2006
Posts: 161
Thanks: 28
Thanked 106x in 34 posts
Really happy to see this back and updated. You do a great job, and I know my league is super appreciative to have something as cool as StatsLab available to it.

Having installed this two nights ago, it's run perfectly. I haven't run into any bugs save for the following small one: the Development tracker is reporting changes in a pitcher's Control as changes in Contact. For example: http://buane.net/risingstar/StatsLab...=all&split=all
__________________
Commissioner - Rising Star League
Congratulations to the 2054 Champion New York Titans!
Buane is offline   Reply With Quote
Old 12-15-2012, 01:57 AM   #10
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
When I run validate I get the following two errors.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/pcjbl/pcjbl.com/StatsLab/session_functions.php on line 79

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/pcjbl/pcjbl.com/StatsLab/nav_functions.php on line 335



Although for the life of me I can't see the issues with those rows after looking through the code.

Also in the manual it says to put the path of the StatsLab install folder in config.txt but I think you meant for it to include the path to the sql folder.... right?
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 12-15-2012, 05:40 AM   #11
Spindel
All Star Reserve
 
Spindel's Avatar
 
Join Date: Oct 2003
Location: Lambertville, NJ
Posts: 715
Thanks: 96
Thanked 305x in 137 posts
I seem to have a problem with running win shares. I get a whole bunch of messages like:

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1010

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1077

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1281

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1292


That last two appear a bunch of times.

Any ideas?
__________________
ULB - Commissioner, Owner of the Phoenix Fire
Home Page | Report | File | StatsLab | ULB on Twitter | ULB Forum

Simcentral.net

My MLB Uniforms

Last edited by Spindel; 12-15-2012 at 05:42 AM.
Spindel is offline   Reply With Quote
Old 12-15-2012, 07:19 PM   #12
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,455
Thanks: 165
Thanked 1,174x in 441 posts
Quote:
Originally Posted by dangarion View Post
When I run validate I get the following two errors.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/pcjbl/pcjbl.com/StatsLab/session_functions.php on line 79

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/pcjbl/pcjbl.com/StatsLab/nav_functions.php on line 335
Dan, try this: Ignore these errors for now, do the steps for the admin page config, and come back and see if they reappear. If you're still having issues, please send me a link via PM.

Quote:
Originally Posted by Spindel View Post
I seem to have a problem with running win shares. I get a whole bunch of messages like:

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1010

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1077

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1281

Warning: Division by zero in /home/spindel/public_html/unionleague/StatsLab/winshares.php on line 1292


That last two appear a bunch of times.

Any ideas?
My guess is that you've got some leagues that haven't played games yet that are causing these. I believe they're safe to ignore and it looks like some of your leagues do have win shares values getting calculated. I'll have to look into getting taking care of these, but they appear to be benign.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 12-16-2012, 03:36 AM   #13
Spindel
All Star Reserve
 
Spindel's Avatar
 
Join Date: Oct 2003
Location: Lambertville, NJ
Posts: 715
Thanks: 96
Thanked 305x in 137 posts
Yeah, a few leagues seasons are over.
__________________
ULB - Commissioner, Owner of the Phoenix Fire
Home Page | Report | File | StatsLab | ULB on Twitter | ULB Forum

Simcentral.net

My MLB Uniforms
Spindel is offline   Reply With Quote
Old 12-16-2012, 04:08 PM   #14
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Quote:
Originally Posted by fhomess View Post
Dan, try this: Ignore these errors for now, do the steps for the admin page config, and come back and see if they reappear. If you're still having issues, please send me a link via PM.
Ok I'm ignoring that.

I was getting the ERROR: OOTP SQL Utilities not configured properly (no ootp_sql_admin table)


Interesting, I went ahead and clicked on "Admin" from the validator and it said the db wasn't loaded and to click on a link to load it. I did that and it actually was able to load the whole db... with no timeouts (remember how the old version used to do that???). And it looks like I can login now.

Wow... Statslab has really progressed from the last time I was able to use it with our old league... Amazing.
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!

Last edited by dangarion; 12-16-2012 at 04:57 PM.
dangarion is offline   Reply With Quote
Old 12-16-2012, 05:12 PM   #15
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Just figured I would ask the genius behind Statslab, is there some type of automated way/process to get the MySql uploaded to the server without having to upload things twice (the league file, and then the MySql)? I'm not the commish but I'm the website cocommish guy for our league (just as I've always been for any league I've been in).

I'm just wondering how other leagues do it all because that's quite a bit of waiting around for things to process and uploading to do...
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 12-16-2012, 11:31 PM   #16
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Code:
<?php
include("/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1");
?>
That's the type of coding I should use for the widgets right? For the life of me it's not working in my sidebars and I've been at it for awhile trying a number of different PHP Text widgets in Wordpress...

Getting this error.

Warning: include(/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1) [function.include]: failed to open stream: No such file or directory in /home/pcjbl/pcjbl.com/wp-content/plugins/enhanced-text-widget/enhanced-text-widget.php(53) : eval()'d code on line 2

Warning: include() [function.include]: Failed opening '/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/pcjbl/pcjbl.com/wp-content/plugins/enhanced-text-widget/enhanced-text-widget.php(53) : eval()'d code on line 2


I tried to switch it a bit with this...

Code:
<?php
include $_SERVER['document_root'].’/StatsLab/widget.php?show=leaders’;
?>
Parse error: syntax error, unexpected '=' in /home/pcjbl/pcjbl.com/test.php on line 2

Right now I'm just trying to call the code to a php file to see if I can get it to work. I can get the links themselves to work perfectly fine, but once I put the parameter everything seems to break down... The sad part is I know it's just a simple fix, I'm just not thinking straight.

It appears you can't sent parameters via include with local php files, the only way to do that is with external links (which is a big security no no).

I can get the include to work with if I just include widget.php I get the same output on my Wordpress install as I do when I go to the direct link, but that doesn't provide anything useful.
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!

Last edited by dangarion; 12-17-2012 at 02:04 AM.
dangarion is offline   Reply With Quote
Old 12-17-2012, 01:12 AM   #17
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,378
Thanks: 1,834
Thanked 1,147x in 474 posts
Hi Frank, a few things:

I noticed the option to include the Sim Preview screen was included in admin settings but the actual simPreview.php is missing. Was this on purpose or a mistake?

The StatsLab player cards link to the development report is currently broken.

And while Markus finally distinguished between round 1, pick 1 players and round 1 pick 1 supplemental draft, statslab still doesn't (that may just be a export issue).

Thanks.
__________________
Web Design and Digital Marketing Agency - Sharp Guys Web Design -
Twitter: @sharpguysweb

Last edited by cody8200; 12-17-2012 at 01:17 AM.
cody8200 is offline   Reply With Quote
Old 12-17-2012, 07:32 PM   #18
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,455
Thanks: 165
Thanked 1,174x in 441 posts
Quote:
Originally Posted by dangarion View Post
Just figured I would ask the genius behind Statslab, is there some type of automated way/process to get the MySql uploaded to the server without having to upload things twice (the league file, and then the MySql)? I'm not the commish but I'm the website cocommish guy for our league (just as I've always been for any league I've been in).
No, OOTP doesn't provide a way to do them together.

Quote:
Originally Posted by dangarion View Post
Code:
<?php
include("/home/pcjbl/pcjbl.com/StatsLab/widget.php?show=standings&division=1&sub_league=1");
?>
I always test it first by pulling it up in a browser window by itself, first replacing the first part of the URL with "http://". From that, I can see that the code you entered works just fine. I don't use Wordpress myself, and have had no trouble getting it to work with Joomla by creating a menu item that linked to the specific widget URL. I suspect the problem you're having is related to Wordpress or the PHP plugin you're using with it. Are you able to get other, non-StatsLab php scripts to be included? Do they take parameters? There may be something that's not interacting well with the StatsLab widget.

Quote:
Originally Posted by cody8200 View Post
I noticed the option to include the Sim Preview screen was included in admin settings but the actual simPreview.php is missing. Was this on purpose or a mistake?
simPreview.php is not ready yet, but coming.

Quote:
Originally Posted by cody8200 View Post
The StatsLab player cards link to the development report is currently broken.
Will be fixed in 3.0.1.

Quote:
Originally Posted by cody8200 View Post
And while Markus finally distinguished between round 1, pick 1 players and round 1 pick 1 supplemental draft, statslab still doesn't (that may just be a export issue).
Will be fixed in 3.0.1.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Thank you for this post:
cody8200 (12-18-2012)
Old 12-18-2012, 01:08 AM   #19
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Quote:
Originally Posted by fhomess View Post

I always test it first by pulling it up in a browser window by itself, first replacing the first part of the URL with "http://". From that, I can see that the code you entered works just fine. I don't use Wordpress myself, and have had no trouble getting it to work with Joomla by creating a menu item that linked to the specific widget URL. I suspect the problem you're having is related to Wordpress or the PHP plugin you're using with it. Are you able to get other, non-StatsLab php scripts to be included? Do they take parameters? There may be something that's not interacting well with the StatsLab widget.
Well yeah I got the whole http:// part to work. These are supposed to be inserted as php includes right? It's not like RSS or XML or something?
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 12-18-2012, 02:21 PM   #20
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,455
Thanks: 165
Thanked 1,174x in 441 posts
Quote:
Originally Posted by dangarion View Post
Well yeah I got the whole http:// part to work. These are supposed to be inserted as php includes right? It's not like RSS or XML or something?
Ok, I installed WordPress on my site. It seems the PHP widgets won't work for this, but if you use the ****** Widget plugin, then it will work.

EDIT... apparently "eye-Frame" is a bad word here? Replace the asterisks with eye-Frame, but change "eye" to "I".
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.

Last edited by fhomess; 12-18-2012 at 02:23 PM.
fhomess is offline   Reply With Quote
Thank you for this post:
Spindel (12-18-2012)
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 04:20 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