SR Widget Directory

How to build your own

Please note that there are some dangers to using widgets (this is true of all widgets, facebook, twitter, etc). Should our servers go down the content would no longer be served. If our servers get badly taxed, the widgets could slow some of the rendering of your pages. We will always do our best to make sure our site is not a problem, but we must be upfront about the risks.

Widgets require the placement of a script tag in the page to get the widget text.

The overall widget content is wrapped in a div with class sr_widget. The content is wrapped in a div with class sr_widget_content and the footer is wrapped in a div with class sr_widget_footer.

You can use these classes to style the content separately from the page, or we provide css for use if you add the url parameter "&css;=1" to the script request. The example below uses this css and then below that how it would be called without.

Suggest Widgets You'd Like to See


Baseball-Reference.com Widgets

Team Schedule
This will provide the team's last N days and next N days of results.
No Yes
Code for Widget (copy and insert into your webpage to use) :

Team WAR Leaders
This will provide the current team leaders in WAR updated at the same time that Baseball-Reference.com is updated.
No Yes
Code for Widget (copy and insert into your webpage to use) :

Seasonal Division Standings
This will provide the current season standings updated at the same time that Baseball-Reference.com is updated. If division is left blank it will print out the standings for the entire league.
No Yes
Code for Widget (copy and insert into your webpage to use) :

Season Leaders
This will provide the current league leaders updated at the same time that Baseball-Reference.com is updated. If league is left blank it will print out the leader for the entire major leagues.
No Yes
Code for Widget (copy and insert into your webpage to use) :


Basketball-Reference.com Widgets


Hockey-Reference.com Widgets

Division Standings
This will provide the current season standings updated at the same time that Hockey-Reference.com is updated. If division is left blank it will print out the standings for the entire conference.
No Yes
Code for Widget (copy and insert into your webpage to use) :


Pro-Football-Reference.com Widgets

Seasonal Division Standings
This will provide the current season standings updated at the same time that Pro-Football-Reference.com is updated. If division is left blank it will print out the standings for the entire conference.
No Yes
Code for Widget (copy and insert into your webpage to use) :


CFB at Sports-Reference.com Widgets

Conference Standings
This will provide the current season standings updated at the same time that CFB at Sports-Reference.com is updated.
No Yes
Code for Widget (copy and insert into your webpage to use) :


CBB at Sports-Reference.com Widgets

Build your own Widgets

You can also create a widget out of any table of stats on an SR site. The easiest way to get this code is to click on the "Embed" tooltip found just above the stat table you wish to embed.

You can also construct the code yourself, but this is a more advanced technique. The example below is the code for Ray Allen's per-game stats. To convert this to another player, just replace "a/allenra02" with the appropriate id for the player in question. For example, for Larry Bird you would use "b/birdla01". These id's can be retrieved from the player's Basketball-Reference.com page.

To exclude a particular set of columns add a parameter "&del;_col=1,2,3,12". This example would delete columns 1,2,3, and 12.

To exclude a particular set of rows add a parameter "&del;_row=2,3,12". This example would delete rows 2,3, and 12. Note that row 1 is the header.

Ray Allen with CSS

Ray Allen

We can't show this as the css is loaded above.