plou
Forum Replies Created
-
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Next and previous matchHello,
I use a similar code on my website. I put it in the event-detail.php file, which is in the plugin’s template folder! I hope this helps you.
/* Previous match */
<?php
$previous_post = get_previous_post();
if (!empty( $previous_post )): ?>
<a href="<?php echo esc_url( get_permalink( $previous_post->ID ) ); ?>" title="Previous match">Previous match</a>
<?php else:
echo " ";
endif; ?>
/* Next match */
<?php
$next_post = get_next_post();
if (!empty( $next_post )): ?>
<a href="<?php echo esc_url( get_permalink( $next_post->ID ) ); ?>" title="Next match">Next match</a>
<?php endif; ?>Forum: Plugins
In reply to: [Detailed Player Stats for SportsPress] Offensive and defensiveHello,
Yes, actually I think there is a problem with my Sportspress installation, I can’t choose which statistics (offensive or defensive) to assign to the positions. When I save, the box remains empty. I will investigate and find the origin of the “bug”.
Sorry for the inconvenience.
Forum: Plugins
In reply to: [Detailed Player Stats for SportsPress] Offensive and defensiveHello,
Here’s how to quickly set up a test environment.
Step One Create a position (/wp-admin/edit-tags.php?taxonomy=sp_position) with offensive statistics, and another position with defensive statistics. For example:
- Position: Forward, offensive statistics.
- Position: Goalkeeper, defensive statistics.
Step Two Create statistics (/wp-admin/admin.php?page=sportspress-config) for each type, offensive and defensive. For example, let’s create two “Player Performance” types:
- Performance 1: Goals scored, under offensive statistics.
- Performance 2: Goals conceded, under defensive statistics. For both performances, remember to check the box to make them visible in player profiles.
Step Three Create a player with the forward position, for example, Wayne Rooney, and another player with the goalkeeper position, for example, Fabien Barthez.
Step Four In the Sportspress configuration page (/wp-admin/admin.php?page=sportspress&tab=players), check the “Offensive → Defensive” box.
Normally, if you go to Wayne Rooney’s player page, you should see the number of goals he has scored, as it is an offensive statistic. The number of goals conceded will not be visible. Conversely, on Fabien Barthez’s page, only goals conceded will be visible.
This setup works well with the Sportspress plugin, but not with your plugin. All statistics are visible without distinction between offensive and defensive.
Thank you in advance for your help, and thank you for all the development work you do for Sportspress!
Hello @savvasha,
Thanks for the help and the quick response. The code you gave me was returning a wordpress error, so I modified it a little, it works perfectly, thank you! Here is my code:
function custom_modify_officials_event_formats( $formats ) {
$formats[] = 'league';
$formats[] = 'friendly';
return $formats;
}
add_filter( 'sportspress_competitive_event_formats', 'custom_modify_officials_event_formats' );Regards,
- This reply was modified 1 year, 8 months ago by plou.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] View statisticsHello,
There is a plugin called “Detailed Player Stats for SportsPress” created by @savvas.Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Club countryUse emoji.
Forum: Plugins
In reply to: [Detailed Player Stats for SportsPress] Tabs ?Hello,
I also have a lot of seasons! But I just wanted to set up a single tab for all the detailed reports. The matches would be in a row in a single tab, as is already the case for events.https://archivesreimsfootball.fr/personnalites/fischer-lucien
In fact with my site now. The season is already using a link to the season page. If this is not possible to display all statistics in one and the same tab. Is it possible to do something like this:
1935-36 (+).The (+) will then be used to display detailed statistics. I think this will work for me, but my PHP skills are not developed enough to do this! ;(
You should use this. This fixes the bug with the “0” data when using the Offense / Defense stats. This bug has been present since the implementation of this function, it has never been corrected.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Event import limitDivise ton fichier … C’est rapide …
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] New Updates???I had asked the same question two months ago (https://ww.wp.xz.cn/support/topic/roadmap-progress/), I did not get an answer. It is true that the plugin has been the same for several years now.
It’s a shame because there are some great ideas on the ideaboard (like detailed player stats), some have been on it for 5 years (and in top vote and still haven’t been added.
ou only have to look at the changelog to see that the plugin has not moved forward for several years now. I don’t know what to think about the future of the plugin. Y
Interesting
Personally, I have over 1,600 games, 5,200 players. No problem on the match lists (regardless of the number of matches). But I have some problem with the list of players. I have a list of 200-300 players and it is common to have memory limit errors, but not all the time. For example, yesterday a list indicated memory error and today it is working. I already have 512 mb of active memory on my Ionos hosting. I think there would be optimization to do on the players (and player list)! (And I have 512 mb.)Adding goals to player records or lists is purely cosmetic.
For example if you have a player with 10 goals (from the match sheets), if you add 5 goals to his total in his player page and you create a player list that displays the goals he will only have 10 goals.
If you want the goals to apply everywhere you have to create a sort of “false match” where you put the number of goals he scored.
Do you use a “cache” or “lazy loading” image plugin? It may be related!
Impossible without a custom code.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] players to the matchYes it’s normal. The displayed players are not filtered (league, seasons, etc.). This displays all the players on the team.