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 > Out of the Park Baseball 25 > 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, 06:56 PM   #1
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,584
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 OOTP21, through OOTP13. See the wiki for which version to use depending on your version of OOTP. PHP 7.2 support was added in the OOTP20 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; 06-08-2020 at 06:03 PM.
fhomess is online now   Reply With Quote
Old 12-01-2012, 12:18 AM   #2
Bonedwarf
All Star Starter
 
Bonedwarf's Avatar
 
Join Date: Jan 2004
Posts: 1,341
Ah, Catobase, I remember that well.

Look forward to trying this.
Bonedwarf is offline   Reply With Quote
Old 12-09-2012, 09:56 AM   #3
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,431
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, 10:10 AM   #4
Cooleyvol
Hall Of Famer
 
Cooleyvol's Avatar
 
Join Date: Dec 2001
Location: Union City, TN
Posts: 6,383
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, 10:57 AM   #5
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,431
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, 11:06 AM   #6
Kaaosaste
Minors (Double A)
 
Join Date: Apr 2010
Posts: 118
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, 01:09 PM   #7
Halara
Minors (Single A)
 
Join Date: Apr 2010
Posts: 64
This is great news! Thanks!
Halara is offline   Reply With Quote
Old 12-13-2012, 11:38 PM   #8
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,431
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, 05:08 PM   #9
Buane
Minors (Double A)
 
Join Date: Mar 2006
Posts: 163
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 2060 Champion Buffalo Rangers!
Buane is offline   Reply With Quote
Old 12-15-2012, 02:57 AM   #10
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
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, 06:40 AM   #11
Spindel
All Star Reserve
 
Spindel's Avatar
 
Join Date: Oct 2003
Location: Lambertville, NJ
Posts: 751
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?
__________________
Union League Baseball Commissioner since 2011.

Last edited by Spindel; 12-15-2012 at 06:42 AM.
Spindel is offline   Reply With Quote
Old 12-15-2012, 08:19 PM   #12
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,584
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 online now   Reply With Quote
Old 12-16-2012, 04:36 AM   #13
Spindel
All Star Reserve
 
Spindel's Avatar
 
Join Date: Oct 2003
Location: Lambertville, NJ
Posts: 751
Yeah, a few leagues seasons are over.
__________________
Union League Baseball Commissioner since 2011.
Spindel is offline   Reply With Quote
Old 12-16-2012, 05:08 PM   #14
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
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 05:57 PM.
dangarion is offline   Reply With Quote
Old 12-16-2012, 06:12 PM   #15
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
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-17-2012, 12:31 AM   #16
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
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 03:04 AM.
dangarion is offline   Reply With Quote
Old 12-17-2012, 02:12 AM   #17
cody8200
Hall Of Famer
 
cody8200's Avatar
 
Join Date: Jan 2003
Location: Indianapolis
Posts: 2,431
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 02:17 AM.
cody8200 is offline   Reply With Quote
Old 12-17-2012, 08:32 PM   #18
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,584
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 online now   Reply With Quote
Old 12-18-2012, 02:08 AM   #19
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
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, 03:21 PM   #20
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,584
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 03:23 PM.
fhomess is online now   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 05:59 PM.

 

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