Show all games that day of a league
-
Football League.
It can create a shortcode to show a league and the matches that day?For example:
[matches league_id=2 day=2]You only have the option to show one game a day (we have to choose which game) or show all the games.
There is no such option to show all games that day of a league.
-
@kolja Perfet. I Will use “by_matchday-tabs: matchdays with jQuery UI tabs functionality”. I dont like accordion template. And this option é very good: current matchday item/tab open by default.
See homepage from my website: https://www.estrelamondegofc.com
You can add that options:
– Position of home team (shortcode or php code)
– Last match with score (shortcode or php code)
– Next match (shortcode or php code)In another topic, I asked these codes, but did not answer me. I had to walk to look for the code in several php files to be able to do that.
And in your plugin, you are missing the file with the standings-slim.php, if you see this page: https://estrelamondegofc.com/blog/?cat=3 gives this error: Could not load standings-slim.php template .
In the past, i had created the standings-slim.php file, but with the update, the file has been deleted.
If you created the standings-slim.php file and put it into the plugin template directory this is of course delete when you update the plugin. If you want to use custom templates put them in your theme directory in a directory called leaguemanager.
What was the slim template doing? There is a standings-compact.php (template=”compact”), which only shows some data
You did not understand. I created the standings-slim.php because your plugin does not have this file.
And if I create a custom file, the file, after update, was replaced not deleted.
you have 3 templates in TAB “Table”, Extended, Compact and SLIM. The SLIM file (standings-slim.php) is missing.
@kolja
sorry for delay… i use defalt templates only@1999999: sorry, the template in the TinyMCE button list must have gotten there by accident or I forgot to remove it.
@mrmobile: the match day issue should be resolved
Now, with logo foulder update, the code i wrote, dont get the image foulder.
I use this code:
(this is a simple and patched code since I am not a programmer)<?php
$team = $wpdb->get_results( $wpdb->prepare(“SELECTrank
FROM {$wpdb->leaguemanager_teams} WHEREid
= ’12′”, $team_id) );
$team = $team[0];$team->id = sprintf(’12’);
$prev_matches = $leaguemanager->getMatches(array(“team_id” => $team->id, “time” => “prev”, “limit” => 1, “orderby” => array(“date” => “DESC”)));
$prev_match = $prev_matches[0];
$prev_match->jornada = sprintf(__(“%d”, ‘leaguemanager’), $prev_match->match_day);
$prev_match->scorehome = sprintf(“%s”, $prev_match->home_points, $prev_match->away_points);
$prev_match->scoreaway = sprintf(“%s”, $prev_match->away_points, $prev_match->home_points);
$prev_match->testehome = sprintf(“%s”, $prev_match->home_team, $prev_match->away_team);
$prev_match->testeaway = sprintf(“%s”, $prev_match->away_team, $prev_match->home_team);
$prev_match->data = sprintf(__(“%s”, ‘leaguemanager’), $prev_match->date);
$homeTeam = $leaguemanager->getTeam( $prev_match->testehome );
$awayTeam = $leaguemanager->getTeam( $prev_match->testeaway );
$homeTeamName = $homeTeam->title;
$awayTeamName = $awayTeam->title;
$homeTeamLogo = $homeTeam->logo;
$awayTeamLogo = $awayTeam->logo;
?>The team ID i want is 12 and if i use:
<img src=”<?php echo $homeTeamLogo ?>”/>
or your code:
<img src=”<?php echo $leaguemanager->getImageUrl($homeTeamLogo, false, ‘thumb’) ?>”/>
on my homepage, the img url go always to 2nd league folder, and dont return any image on this case, “home team” because the image is in 1st league foulder.
I will need more information in order to help you. In what context do you use the code? If you only want to show the team page, I recommend you use the shortcode
[team id=X]
See my website:
https://www.estrelamondegofc.com
Look to the homepage. I use this code to get previews game with teams logo and name and score, next game with team logo and name e for last, the team position in table.
The teams logo now works beacause i put logos (manual) on league 2 foulder…
Hi,
Thanks for the great plugin.
I use the 4.0.8 version.I have two troubles at this time:
– Games displayed in the schedules are the FIRST game of the season. People must select the good day in the tab to see the schedules of their next game. How could I display the schedules of the next games? It worked perfectly in previous versions (during two or three days the results were displayed and after it was the schedules for the next game).https://www.lasm.ca/calendrier/
– In standings, the line for the promoted teams does not display in a different colour. Only the figures, before the name of the teams are underlined in a different colour. It is strange because it worked perfectly in the previous versions.
https://www.lasm.ca/classements-2/
Thanks you so much for your help!
@1999999: I think it’s easiest that I include a function to get the previous or next match of a team
@chleray
– you can set the default match day to current match day in your matches using the shortcode[matches match_day='current']
. This will either show the last or next match day, depending on what is closer to the current date. Alternatives are ‘last’ and ‘next’– I changed the style of the standings table as I found it looks better without the whole row colored. You can, however, overwrite the style in your theme stylesheet. Check out css/colors.css.php in the plugin (tr.ascend, tr.descencd, tr.relegation-up, tr.relegation-down)
Thanks Kolja,
But it does not work…
It displays every games from the beginning and just the first game of the current day.I tried to change numbers (why 039) but it remains the same.
If I use next, every next games are displayed (till the end of the season).
But I just want to display the games of the day.
It worked great in previous versions and I will install an older version (3.8.9 certainly, even if there are a couple of bugs like zero wich appear in the backend) because my people don’t understand when they play.About row colour, thanks, I found the location in colour.css but I am a beginner and I don’t know what is the code to underline all the line and not just the figure at the beginning of the line.
Thank you so much for your help and your time!
Hi,
I am in big trouble!
I installed version 3.8.9, and now the site does not work anymore!It displays:
Forbidden
You don’t have permission to access / on this server.
Server unable to read htaccess file, denying access to be safeAdditionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Crazy!!
I don’t know what to do!@chleray the code work, only the imagens dont.
If you can make a function, I appreciate it. but would have to include: day, time, teams, teams logos, and score.
And then if possible, the next game: Day, Time, Teams and teams logos.
it’s possible?
I am sorry, I am a beginner, how can I do that?
Thanks!
- The topic ‘Show all games that day of a league’ is closed to new replies.