Enhanced Import for SportsPress

설명

Enhanced Import for SportsPress extends the default SportsPress CSV importers with advanced features, specifically designed to import fixtures with scores and results data.

What This Plugin Does

This plugin enhances the standard SportsPress Fixtures (CSV) and Players (CSV) importers.

For Fixtures it adds support for:

  • Score/Results Import: Import match scores directly from CSV files
  • Automatic Results Processing: Automatically creates and updates match results using SportsPress’s native results system
  • Auto creation of Calendar and League table: Teams are auto assigned to League Table.
  • Backward Compatibility: Works with existing SportsPress CSV formats while adding new capabilities

For Players it adds support for:

  • Player ID column (update by ID): When a Player ID is provided, the matching player is updated; otherwise a new player is created. Without a Player ID it behaves like the native importer (using the Merge duplicates option).
  • Metric columns: All registered metrics (sp_metric) are available as columns, so metric values can be imported into players. Blank metric cells preserve existing values on updates.

Key Features

  • Score Support: Import home and away scores directly from CSV
  • Outcome calculation: Use native SportsPress functionality to calculate the outcome of an event.
  • Auto create League Table and Calendar: Gives the ability to the user to automacally create a new League Table or/and a new Calendar.
  • Teams assignment to League Table: Handles teams assignment to League Table to avoid false positives.

Import Fixtures: CSV Format

The enhanced importer for Fixtures adds the following CSV columns:

  1. Home Score – Home team score (optional)
  2. Away Score – Away team score (optional)

Example Fixtures CSV

Date,Time,Venue,Home,Away,Home Score,Away Score,Match Day
2024/01/15,19:30,Stadium A,Team Alpha,Team Beta,2,1,GW1
2024/01/20,20:00,Stadium B,Team Gamma,Team Delta,0,3,GW2
2024/01/25,18:45,Stadium A,Team Beta,Team Gamma,1,1,GW2

Import Players: CSV Format

The enhanced importer for Players supports these additional columns:

  1. Player ID – If provided, updates the existing player by ID; if not, a new player is created. (optional)
  2. Metric Columns (sp_metric) – All registered SportsPress metrics will appear as columns; you may import metric values for each player. Any blank metric cell will keep the player’s existing value for that metric.

Example Players CSV

Player ID,First Name,Last Name,Team,Goals,Assists,Yellow Cards
1234,John,Doe,Team Alpha,2,1,0
,Jane,Smith,Team Beta,0,0,1
1236,Tom,Johnson,Team Gamma,1,,2

Credits

  • Built for SportsPress by Savvas
  • Based on the original SportsPress importers by ThemeBoy
  • Licensed under GPLv2 or later

스크린샷

설치

  1. Upload the plugin files to the /wp-content/plugins/enhanced-import-for-sportspress/ directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Ensure SportsPress plugin is installed and activated.
  4. Go to Tools > Import and select “Import Fixtures (CSV) Enhanced” or “Import Players (CSV) Enhanced”.

FAQ

Does this plugin require SportsPress?

Yes, this plugin requires SportsPress to be installed and activated. It extends the existing SportsPress import functionality.

Can I use this with existing CSV files?

Yes! The plugin is backward compatible with existing SportsPress CSV formats. The score columns are optional, so your existing CSV files will work without modification.

What happens if teams don’t exist?

The plugin automatically creates teams if they don’t exist in your SportsPress installation. Teams are created with the same name as specified in the CSV.

How are scores processed?

Scores are processed using SportsPress’s native functions, ensuring proper integration with the SportsPress results system.

Can I import partial data?

Yes, you can import CSV files with missing optional columns. Only Date, Home team, and Away team are required.

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“Enhanced Import for SportsPress”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Enhanced Import for SportsPress”(이)가 1 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Enhanced Import for SportsPress”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

2.1

  • Fixed: the selected League (and Season) was not assigned to imported events, teams, calendars, or league tables when the taxonomy term used a non-Latin (e.g. Greek) slug. Such slugs are stored percent-encoded and were being stripped by sanitize_text_field(); they are now handled with sanitize_title() and validated against existing terms.
  • Fixed: existing calendar/league table detection used an invalid WP_Query property (->ID), which could break re-imports; it now reads the queried post correctly.
  • Fixed: the home team’s venue is now auto-assigned to imported events even when the Venue column is disabled/omitted (not only when left blank), restoring parity with the native SportsPress fixture importer.

2.0

  • Added an enhanced Players (CSV) importer with a Player ID column (update existing players by ID) and dynamic metric columns.

1.0

  • Initial release