Forum Replies Created

Viewing 15 replies - 1 through 15 (of 29 total)
  • Player lists offer a date option within the “details” tab. So you can create a player list and choose a specific time period or date range.

    Unfortunately the player list shortcode option does not have the “Date” option therefore multiple player lists would be necessary to show different stats for different periods of time (within a season or seasons).

    You can do this using custom CSS and make it so it only does it on specific pages (by adding the page ID to your css code)

    I have this on my front page to highlight the first place team.

    /* FRONT PAGE STANDINGS - 1st PLACE HIGHLIGHT */
    .post-583 .table-standings .sp-row-no-0{
    background-color: #F2F2F2 !important;
    }

    I have also looked elsewhere and I still browse from time to time but I have yet to find that one that is both cost friendly and easy to use/manipulate and has third party themes/addons.

    I do share the same concerns and I hope that we’re wrong but that may be a bit hard to believe with the lack of actual updates and upgrades happening and no real updates on the sportspress website since I basically first heard of sportspress some years ago (or at least nothing substantial).

    I feel like the advanced h2h and game by game stats that Savvas created are the biggest ones we’ve seen in a while and those were made by someone who wanted those options and made them available.

    If their GITHUB page is any indication, I think it’ll be a while before we hit version 3. Development roadmap for SportsPress version 2.8 has been in the works since 2021 and I haven’t seen many updates to that other than some fixes and answers to people’s inquiries.

    I figured it was easier to apply some of the features listed in their 2.8 roadmap myself rather than wait for the version to be released.

    I hope that I am wrong and that we’ll see a full new release (3.0) with a lot of different tweaks/updates and new features but I’m also not holding my breath. Thankfully, sportspress does what I need it to do to run my ball hockey league – but I also don’t use Gutenberg

    In terms of using sportspress pro’s Tournament feature – Off the shelf, the tournament feature does not specifically allow series between teams but I believe you can achieve this by using round robins and attaching those to the tournament – only for the 1st round*. You would then simply put those 2 teams (2nd and 3rd) that will be playing a best of series in that round robin attached to a specific bracket of the tournament and then hide other brackets in the tournament.

    My Monday league is a 6 team league. So an 8 team bracket is out of the question. What I do is 1st and 2nd place teams after regular season get byes into the semis. Playoff quarter finals are 3rd vs 6th and 4th vs 5th. I hide 1 bracket on each side. This leaves just 2 match-ups in the quarter-finals. Winning team advances to the semis and we can choose a team to add into that other semi final spot (1st or 2nd place in season that got a bye) and then you have the rest of your bracket play out.

    In your case, for a 3 team playoff, you would choose a 3-4 team bracket and hide one of the 1st round brackets so that it turns it into a straight semi-final and then the winner moves on to the finals. Again, the issue here is that for your finals, you don’t have the option to have a series (best of X games) between those 2 teams.

    A work-around to all of this is to simply forego the tournament feature and instead create a new “Season” and make that your playoffs. Create the games you need for all involved. You can create the best of 5 matchup for 2nd vs 3rd and then your series for the finals and use the “Day” field to mark which round/game# it is. For my league. i added an extra “Event Spec” called “Game #”. My “day” field has become the “Week #” and then I also have the “game #” to number each individual game throughout the season and playoffs.

    Not sure if this helps a little bit… if you have further questions about this, feel free to ask. Someone else might have a better option as well but this has so far worked for me.

    RobJr

    (@robjr14)

    You can use custom CSS to add this to your tables. I use the following code to add a light highlight to a specific table on a specific page but this can be changed to make it appear on ALL tables. Unless you want to make it appear on just a few specific pages. For that, you would simple add the post ID at the start of the code. Important to note that I use Alchemist theme therefore the actual code may be slightly different if you’re using another theme. But this is just to show that it is possible to do what you want via CSS.

    .post-4118 .table-standings > tbody > tr:nth-child(1) {
    background-color: #f9f9f9 !important;
    }
    .post-4118 .table-standings > tbody > tr:nth-child(2) {
    background-color: #f9f9f9 !important;
    }

    The post date is what is used as the match date. You can edit/change it. What date is appearing in the table row exactly? What theme are you using?

    Just an FYI – If you’re using Sportspress Pro – It’s against the rules of these forums to provide support so you’d have to go through Themeboy’s support (on their website).

    But to answer your question – This is available even with the Free sportspress – You can use Player Lists to do what you’re looking for. Create a player list for a team, add the players to that team (either manually or automatically) and the you can edit their stats directly in the player list after they’ve been added – similar to how you can update stats for individual players in their profiles.

    RobJr

    (@robjr14)

    @ozgurgedikli – If you’re referring to the changes I made to create a 2nd “widget” for a players past teams in Alchemist – it involved about 12-14 files. Now, mind you – I’m not a programmer. I actually don’t know how to code but I am sometimes able to modify certain things and I was able to re-create the gbg stats widget and make that one use a players “past_team”. I know that there is a much much simpler way to make that main widget include both a players current and past teams, but since I am not a programmer – this was the only way I knew how to do it. I did reach out to Dan earlier today to ask about them potentially updating the widget so that it actually includes both current & past teams but I’m not sure if or when that would be done.

    But I did not make any modifications to savvas’ detailed player stats plugin. With his latest update, the detailed player stats works out of the box with Alchemist.

    Main changes were done to alc_player_stats.php on line 157. I copied Get Current Team and then re-pasted below but changed current_team to past_team

    // Get current team
    $sp_current_teams = get_post_meta( $id, 'sp_current_team' );
    $sp_current_team = '';
    if ( ! empty( $sp_current_teams[0] ) ) {
    $sp_current_team = $sp_current_teams[0];
    }


    // Get Past team
    $sp_past_teams = get_post_meta( $id, 'sp_past_team' );
    $sp_past_team = '';
    if ( ! empty( $sp_past_teams[0] ) ) {
    $sp_past_team = $sp_past_teams[0];
    }

    I also copied the alc_player_gbg_stats.php in “/vc_template/ and named the copy “alc_player_gbg_stats_past.php” and in this file, I edited line 50 from…

    // Get player's current team(s)
    $team = get_post_meta( $player_id, 'sp_current_team' );

    Changed to:
    // Get player's past team(s)
    $team = get_post_meta( $player_id, 'sp_past_team' );

    Also had to make a copy of Alchemist’s sportspress template file “player-event-game-by-game.php” and rename it “player-event-game-by-game-past.php” and change every line that had “current_team” to “past_team” – this file has I think 20 or 21 “current_team” occurrences that had to be changed to “past_team”

    A variety of other files had to be edited so that this Past Team widget would be visible and functional in wpBakery. Those files are:

    alchemist\languages\alchemists.pot
    alchemist\inc\vc-functions.php
    alchemist\admin\images\js_composer\alc_player_gbg_stats.png
    alchemist\assets\css\sportspress-soccer.css.map
    alchemist\assets\css\sportspress-soccer-rtl.css.map
    alchemist\sass\sportspress\player_player-game-by-game-stats.scss
    alchemist\sass\sportspress\player_player-game-by-game-stats–skin.scss
    alchemist\sass\sportspress.scss
    alchemist\sass\sportspress-skin.scss
    alchemist\sportspress\single-player.php
    alchemist\config.codekit3
    alchemist\wpml-config.xml

    Some of the above files were simply copied and renamed by adding “-past” to them, while others had to have lines added. All I’d do is copy the main code for the game-by-game stats and add it again and re-name it with “-past” or “_past” – so it would point to the new files for “past_team”.

    Hopefully what you were questioning is somewhere in what I wrote above.

    • This reply was modified 5 months ago by RobJr.
    RobJr

    (@robjr14)

    @savvasha I can confirm that both options (popup or inline) function with the Alchemist theme. I’ve played around with it a little bit and tried it on 2 separate installations – running different versions of both sportspress and Alchemist theme and everything seems good!

    Amazing work!

    thats amazing! I will be testing it out after work this evening. Will let you know how it goes!

    Thank you!!!

    The detailed player stats for Sportspress created by @savvas works out of the box with themes by Themeboy and default themes as well (I’m guessing) but it does not work when using the theme that marocco is using (Alchemist). You would need to modify the template file to incorporate the detailed player stats into the Alchemist theme. – This is something I want to dive into but just don’t have the time – because I’d love to be able to use this plugin with this theme.

    Side Note: If you’re also looking at using the “advanced h2h” to enhance sportspress sorting capabilities (also created by @savvas), this is an easy fix to get it to work with the alchemist theme. You just need to modify a small piece of code in alchemist’s sportspress’ “league_table” template file to make that little helpful plugin work.

    Now back to the detailed player stats – There is a little widget/element available with the Alchemist theme though that does allow you to list the specific game by game stats for your players. The issue is you have to manually add this widget to the player pages. The widget is called “ALC: Player Game-by-Game stats” Important to note that this will only pick-up the player’s CURRENT team. If the player has both current and past teams under his profile, it won’t show the game-by-game stats of the past teams.

    I did create a work-around for this by copy pasting the element and changing the code so that it pulls the past_team info (instead of the current_team). But there are about 10-12 files that need to be copied/pasted + modified to create a secondary element for the past teams. The end-result is what you see in the picture.

    https://ibb.co/fx5VJJ7

    • This reply was modified 5 months, 3 weeks ago by RobJr.
    • This reply was modified 5 months, 3 weeks ago by RobJr.

    You can do this through shortcodes (event list) and then just use the filtering options it provides.

    This is a known issue but there is a fix for it. You’ll need to modify a few lines on a few of the sportspress files. The links below bring you to SportsPress Github pages for Least condition fix (2 part fix)

    Fix 1:

    Fix 2:

    This is a known issue….

    Hi there,

    It is a known bug which will be fixed on next update.

    In the meantime, you can apply the following patch:

    https://github.com/ThemeBoy/SportsPress/commit/….182

    Thanks,
    Savvas

Viewing 15 replies - 1 through 15 (of 29 total)