ThemeBoy
Forum Replies Created
-
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Feature Request: Ice HockeyHi guys,
We’ve just released SportsPress version 1.1.4 with an update to the ice hockey preset. Several variables have been added to reflect statistics used in the NHL, including power play and goalie related variables.
The new preset looks like this:
{ "name": "Ice Hockey", "outcomes": [ "Win", "Loss", { "name" : "Overtime loss", "abbreviation" : "OT" } ], "results": [ { "name" : "1st", "description" : "1st period goals" }, { "name" : "2nd", "description" : "2nd period goals" }, { "name" : "3rd", "description" : "3rd period goals" }, { "name" : "OT", "description" : "Overtime goals" }, { "name" : "PPG", "description" : "Power play goals" }, { "name" : "PPO", "description" : "Power play opportunities" }, { "name" : "T", "id" : "goals", "description" : "Total goals", "primary" : 1 } ], "performance": [ { "name" : "G", "description" : "Goals" }, { "name" : "A", "description" : "Assists" }, { "name" : "H", "description" : "Hits" }, { "name" : "SOG", "id" : "s", "description" : "Shots on goal" }, { "name" : "PIM", "description" : "Penalty in minutes" }, { "name" : "SA", "description" : "Shots against" }, { "name" : "GA", "description" : "Goals against" }, { "name" : "SV", "description" : "Saves" } ], "columns": [ { "name" : "GP", "equation" : "$eventsplayed", "description" : "Games played" }, { "name" : "W", "equation" : "$win", "description" : "Wins" }, { "name" : "L", "equation" : "$loss", "description" : "Losses" }, { "name" : "OT", "equation" : "$overtimeloss", "description" : "Overtime Losses" }, { "name" : "PTS", "equation" : "$win * 2 + $overtimeloss", "priority" : 1, "description" : "Points" }, { "name" : "GF", "equation" : "$goalsfor", "priority" : 3, "description" : "Goals for" }, { "name" : "GA", "equation" : "$goalsagainst", "description" : "Goals against" }, { "name" : "Diff", "equation" : "$goalsfor - $goalsagainst", "priority" : 2, "description" : "Goal differential" }, { "name" : "PPG", "equation" : "$ppgfor", "description" : "Power play goals" }, { "name" : "PPO", "equation" : "$ppofor", "description" : "Power play opportunities" }, { "name" : "PP%", "equation" : "$ppgfor / $ppofor * 1 0 0", "precision" : 1, "description" : "Power play percentage" }, { "name" : "PPGA", "equation" : "$ppgagainst", "description" : "Power play goals against" }, { "name" : "PPOA", "equation" : "$ppoagainst", "description" : "Power play opportunities against" }, { "name" : "PK%", "equation" : "( $ppoagainst - $ppgagainst ) / $ppoagainst * 1 0 0", "precision" : 1, "description" : "Penalty kill percentage" }, { "name" : "L10", "equation" : "$last10", "description" : "Last 10" }, { "name" : "Strk", "equation" : "$streak", "description" : "Current streak" } ], "metrics": [ "Height", "Weight" ], "statistics": [ { "name" : "GP", "equation" : "$eventsplayed", "description" : "Games played" }, { "name" : "P", "equation" : "$g + $assists", "description" : "Points" }, { "name" : "S%", "equation" : "$g / $s * 1 0 0", "precision" : 2, "description" : "Shot percentage" }, { "name" : "SV%", "equation" : "$sv / $sa * 1 0 0", "precision" : 2, "description" : "Save percentage" } ] }Note that you can hide certain columns from appearing in events, player lists, and player profiles. The goalie statistics, for example, can be setup to only display on goalie profiles.
I hope this helps! Please let me know if anything else is missing from this preset 🙂
Hi Joe,
Thanks for the info. It definitely helps.
We just released SportsPress version 1.1.4 with a Table Tennis preset. The preset file looks like this:
{ "name": "Table Tennis", "outcomes": [ "Win", "Loss", "Forfeit" ], "results": [ { "name" : "1", "description" : "1st set" }, { "name" : "2", "description" : "2nd set" }, { "name" : "3", "description" : "3rd set" }, { "name" : "4", "description" : "4th set" }, { "name" : "5", "description" : "5th set" }, { "name" : "Sets", "description" : "Sets won" } ], "performance": [ ], "columns": [ { "name" : "P", "equation" : "$eventsplayed", "description" : "Matches played" }, { "name" : "W", "equation" : "$win", "description" : "Wins" }, { "name" : "L", "equation" : "$loss", "description" : "Losses" }, { "name" : "F", "equation" : "$setsfor", "description" : "Sets for" }, { "name" : "A", "equation" : "$setsagainst", "description" : "Sets against" }, { "name" : "%", "id" : "percent", "equation" : "$setsfor / $setsagainst * 1 0 0", "precision" : 2, "description" : "For/against ratio" }, { "name" : "Points", "equation" : "$win * 3 + $loss" } ], "metrics": [ "Height", "Weight" ], "statistics": [ ] }Please let me know if you notice that anything is missing or inaccurate. Thanks 🙂
Thanks for letting me know!
We’ll fix this in the next update.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Hooks OrderHi Pedro,
I’ve added the filter “sportspress_{$post_type}_content_priority” to all custom post types. It defaults to 10, and the possible positions are:
sportspress_before_single_{$post_type} – 5
sportspress_single_{$post_type}_content – 10
sportspress_after_single_{$post_type} – 15The content will be inserted after the action. For example, changing the player content priority to 5 by using this filter will insert the content between sportspress_before_single_player and sportspress_single_player_content:
add_filter( 'sportspress_player_content_priority', 'my_player_content_priority' ); function my_player_content_priority() { return 5; }The hook is available in version 1.1.4
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Hooks OrderHi Pedro,
Good point! I’ll add a filter that you can use to change the order of the descriptions in custom posts.
Currently, all descriptions are outputted after the templates. I’ll let you know what the hook is called when I release the next update.
Hi there,
Thanks for your question.
The black spacing below the photo is due to the paragraph text being long. There are a couple different solutions for this.
First, you could add the following to SportsPress > Settings > Custom CSS to increase the size of the post slider image:
.widget_tb_post_slider .orbit-container .orbit-slides-container img { max-width: 20rem; width: 20rem; }Another solution is to change the excerpt length via a child theme. The excerpt length function is in includes/theme-functions.php:
if ( !function_exists( 'tb_excerpt_length' ) ) { function tb_excerpt_length( $length ) { return 30; } }Changing that number to 20 would make the excerpt shorter and prevent the box from being too tall.
I hope this helps!
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Error on league tablesHi @poelie,
It looks like your theme may be using previous_post_link() and next_post_link() with 2 arguments. I’ll look into adding a fallback when arguments are not supplied to improve compatibility with other themes.
For now, try replacing the sportspress_hide_adjacent_post_links function in sportspress/includes/sp-template-hooks.php with this:
function sportspress_hide_adjacent_post_links( $output = null, $format = null, $link = null, $post = null ) { if ( is_object( $post ) && property_exists( $post, 'post_type' ) && in_array( $post->post_type, sp_post_types() ) ) return false; return $output; }Hi Joe,
Glad to hear the update fixed the issue!
I’ll definitely look into adding a Table Tennis preset. Version 1.1 includes a Tennis preset and a “Mode” option that can be changed to “Individual”.
Could you help me with a list of key differences between Tennis and Table Tennis?
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Crashed after updateHi @lstephan,
Thanks for the info. Updating the Sponsors plugin to version 1.0.2 should solve the issue. If you’re using Premier, it should also be updated to version 1.0.3.
The latest version of the plugin and theme can be downloaded via your Account page on https://themeboy.com/account
Let me know if this solves the issue 🙂
Hi again!
Great point. We’ll look into adding code snippets to get elements for use in templates.
For now, there are a couple of helper functions that you can use.
First, get the ID. Inside the loop, you can use:
$id = get_the_ID();Or if you have the event as a post object, use:
$id = $post->ID;Get team names as array (do this before displaying team names):
$teams = get_post_meta( $id, 'sp_team' );Display first team name:
echo get_the_title( $teams[0] );Display second team name:
echo get_the_title( $teams[1] );Display event name:
the_title();Display countdown:
sp_get_template( 'countdown.php', array( 'id' => $id ) );Display event details:
sp_get_template( 'event-details.php', array( 'id' => $id ) );Display event performance:
sp_get_template( 'event-performance.php', array( 'id' => $id ) );Display event results:
sp_get_template( 'event-results.php', array( 'id' => $id ) );Hope this helps 🙂
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Feature Request: Ice HockeyThanks for the correction 🙂
@hockeyrivenord thank you for your feedback!
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Fishing LeagueGreat 🙂
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Feature Request: Ice HockeyHi Sven,
Thank you for your feedback. We’ll make those adjustments in the next update and will be in touch again shortly 🙂
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Importing CSVHi @hockeyrivenord,
We’re working on a bit of documentation around this, but here is an outline of how to use the csv importer:
1. Download the sample CSV file via Tools > Import > SportsPress Events (CSV) > “Click here to download a sample.”
2. Open the CSV file in your favorite spreadsheet program. We recommend Google Drive because it ensures proper line endings and encoding.
3. If you’re not using the default soccer preset, change the column names after the “Player” column to reflect the performance values used on your site. To find a list of performance values, go to SportsPress > Settings > Configure > Performance.
4. The date field can be tricky. SportsPress requires the date format:
yyyy/mm/ddYou can change the date format in most spreadsheet programs including Excel and Google Drive.
5. Save (as UTF-8) and upload.
I hope this helps! I’ll let you know when the official documentation becomes available.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Events schedule updateHi @iconoclast50,
A new event will be created for each row when importing events. The current version does not yet have a way to update existing events via the import feature.