ThemeBoy / SportsPress

An open source league statistics plugin for WordPress created by ThemeBoy.
Other
152 stars 98 forks source link

CSV Exporter #27

Closed ThemeBoy closed 3 years ago

ThemeBoy commented 10 years ago

Events, teams, players, and staff can be imported via CSV. We need to add exporters (for backups and transferring data the other way)

dukuo commented 6 years ago

Can't believe it's been almost 4 years AND THERE'S NO PROGRESS IN THIS. I bought this plugin thinking it would have an exporter feature since I have to export almost 300 matches and lots of teams. Is there any solution for this? @ThemeBoy

ptkdev commented 6 years ago

@dukuo i find easy solution:

[EXPORT]

  1. go to: wp-admin
  2. go to: tools --> export
  3. Export team
  4. Save xml file

[CLEAN]

  1. go to: wp-admin
  2. go to sportpress --> team
  3. delete team information (delete from wordpress trash)

[IMPORT]

  1. go to: wp-admin
  2. go to: tools --> import
  3. On bottom install "wordpress" official importer
  4. Import team.xml and assign author
  5. Import

All work :)

kylekeesling commented 5 years ago

Would really like to be able to export my team rosters to share with captains. Is there any progress on this?

kylekeesling commented 5 years ago

In the meantime if you have access to the database and are comfortable w/ SQL I've whipped up this script that will give you the basics:

select distinct
teams.post_title as "team_name",
players.post_title as "player_name"

from wp_posts players
join wp_postmeta team_meta on players.id = team_meta.post_id
join wp_posts teams on team_meta.meta_value = teams.id

where 
players.post_type = "sp_player"
and team_meta.meta_key = "sp_current_team"

order by
team_name,
player_name
savvasha commented 3 years ago

There is a PR for this https://github.com/ThemeBoy/SportsPress/pull/401