This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Sean Schulte (author)
Fri Apr 17 07:17:33 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
BaseballReferenceStatParser.php | ||
| |
LICENSE | ||
| |
README | ||
| |
fire-gardy-stat-grabber.php |
README
This is the FireGardy Baseball-Reference Stat Grabber. http://stat-grabber.firegardy.com It downloads a player's stats from his baseball-reference.com page, and displays some basic statistics on your page. It uses template tags, so you can put them anywhere on your site just by editing your theme's template files. For example, let's say you wanted to display Nick Punto's stats in your sidebar. Step one: Find out Punto's B-R player code. Go to http://www.baseball-reference.com and search for Nick Punto. When you find the player you want, go to his page and look at the URL. The "player code" is the page name, after the final / and before .shtml. So for Nick Punto, the player code is 'puntoni01' Step two: Edit sidebar.php Find the spot you want to display the stat block, and add this line: <?php fire_gardy_stat_grabber('Nick Punto', 'puntoni01', 2008); ?> Make sure you put that line somewhere on the page that will be displayed. (IE, beware of parts of the sidebar that are only displayed on the home page, et cetera.) You can also specify that pitching stats should be used, like so: <?php fire_gardy_stat_grabber('Livan Hernandez', 'hernali01', 2008, 'pitcher'); ?> Advanced: You can specify what stats get displayed on your page. By omitting the 5th parameter, you specify the default: for hitters: array('tripleSlash', array('ab', 'hr'), 'opsPlus') for pitchers: array('winLoss', array('ip', 'k', 'bb'), array('era', 'eraPlus')) If you want to add to that you can enter, for example: <?php fire_gardy_stat_grabber('Nick Punto', 'puntoni01', 2008, 'hitter', array('tripleSlash', array('ab', 'hr'), array('k', 'bb'), 'opsPlus')); ?> or <?php fire_gardy_stat_grabber('Livan Hernandez', 'hernali01', 2008, 'pitcher', array('winLoss', array('ip', 'k', 'whip'), array('era', 'eraPlus')); ?> Step three: Go to your blog and check it out! Punto's stats should be displayed somewhere in your sidebar! Hope you like it.








