My Score Center- Plugin for MediaPortal

Status
Not open for further replies.

juli13

Staff member
Administrator
Messages
10,194
My Score Center ver 0.9 20.08.2009
MyScoreCenter displays sports results from "almost" any web sites.


Code:
[B]
Description[/B]
Since it was difficult to find a site which can give results for all sports, I decided to create a very generic plugin.
The principle is very simple, the plugin just renders an HTML table. A score is represented by an URL and an XPath expression to find the table in the page (see: XPath Tutorial to learn about Xpath).
It works for almost everything displayed in a table. For now the two things which are not working are tennis results and single-elimination tournament, like play-off. But I think we will have some times to solve this before the end of next season.

The scores are displayed by category (or sport) and then by league.
For example: football (or soccer) is a category then each national championship is a league and then for a league you can display the current standings, the last results and the top scorer.
But this is totally configurable, and you can for example decide to display results by countries, then by sports...

The configuration file included in the installer contains definitions for:
Football: all the major championships (19 leagues),
Basketball: NBA (regular season)
Motors: Formula 1 and WRC
Cycling (Tour de France)
Rugby: France only
Tennis: ATP and WTA ranking,
US Football: an example for college football standings
Baseball MLB
Cricket (ICC + last results)

Most of the results are from lequipe.fr which has the advantage of not changing the URL when a new season starts.

Here is a screen shot of the configuration dialog.
It also allows you to enter your own header row, set the size of the columns, and skip some rows.
When you set the size of the column, specify a negative number to align the column to the left and a positive number to align to the right.
The test button allows you to test your setting.
Note that an Xpath expression can return many tables. In this case they all of them will be displayed. So if it is not what you want be sure to give an Xpath that will return only the table you want.

For each items (category, league and score) you can have an icon in the configuration screen.

Skin controls:
There are two main controls:
the list control for the navigation
a textbox control which defines the display area and the font to use.

The following properties can be used to display names and icons:
#ScoreCenter.Title: the name of the plugin,
#ScoreCenter.Category: current category,
#ScoreCenter.CatIco: current category icon,
#ScoreCenter.League: current league
#ScoreCenter.LIco: current league icon,
#ScoreCenter.Results: current results,
#ScoreCenter.ScoreIco: current score icon.
#ScoreCenter.bd: the backdrop to display.

NEW in version 0.9:
  • Management of icons from the configuration
  • Import/Export to exchange settings
  • Set the name of the plugin in configuration
  • Rename categories/leaguea in the tree
  • Enable checkbox in the tree to disabel/enable a full category
  • Context menu in the plugin to deactivate elements
  • Context menu to enable the "Auto Size" mode (in case the website changes the table)
  • Property to set the encoding of the web page, button to go visit the web page from the configuration
  • Variable URL (with date elements like {M_yyyy} ==> 8_2009)
  • XPath can include any type of elements (not just tables), non table element are displayed on a single line (for example a list of div elements)
  • Additional field to retrieve a specific element in the XPath result
  • Post processing rules to format results
 
Status
Not open for further replies.
Top