team widget logo
-
hello, when you add the widget, select compact version and not shows the logo of the teams. Why?
Thx for your help!
-
Because the code isn’t in the widget to add the logo. If you want to test some for me, I’ll post it here and you can see if it works for you…
Head to his post, I put up some code you can test that gives a checkbox to add logos as well as designate a group to show with the widget.
http://wordpress.org/support/topic/groups-in-championship?replies=10
Save a copy of your widgets.php file in your lib folder and replace it with the code posted, let me know how it works for you.
ok friend, I hope :3
works great, thanks friend! :3
You’re welcome. Work with it and let me know if anything comes up, I’ll plan on committing the code if there aren’t any problems.
hello again, you can set limits?
for example, show only 10 teams ranked widgetYeah, that could be added, give me some time before I have an update for it though, probably sometime in the next day or two.
ok hope :3
and friend, how do I show only 10 teams last?
Sorry, got busy…
In the template that you are using through the Widget (compact or extended) do the following:
Find:
<?php if ( $teams ) : ?> <?php foreach( $teams AS $team ) : ?> <tr class='<?php echo $team->class ?>'>and change it to:
<?php if ( $teams ) : ?> $x=0; <?php foreach( $teams AS $team ) : ?> $x++; if ($x <= 10) { <tr class='<?php echo $team->class ?>'>Then find (at the end):
<?php endforeach; ?> <?php endif; ?>and change it to:
<?php endforeach; ?> } <?php endif; ?>This line controls the number of teams to show:
if ($x <= 10) {
If you want 5 or 15, just change the ’10’
ok lo probe, pero me gustaria que se le puede dar limites en el widget porque al postear tambien me muestra 10 teams, plis 🙂
There are a couple of things that we want to add to the Widget, so it’s possible…
hello friend, update the version but now I get error in the widget.
This code http://wordpress.org/support/topic/groups-in-championship?replies=10 is no longer compatible with the version 3.8.8.1
could you fix it? please.
thank you!
What error are you getting?
I get the following error when I select “next & lost matches”.
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘
league_id= ‘2’ ANDfinal= ” ANDseason‘ at line 1]
SELECTgroup,home_team,away_team, DATE_FORMAT(date, ‘%Y-%m-%d %H:%i’) AS date, DATE_FORMAT(date, ‘%e’) AS day, DATE_FORMAT(date, ‘%c’) AS month, DATE_FORMAT(date, ‘%Y’) AS year, DATE_FORMAT(date, ‘%H’) AShour, DATE_FORMAT(date, ‘%i’) ASminutes,match_day,location,league_id,home_points,away_points,winner_id,loser_id,post_id,season,id,customFROM wp_leaguemanager_matches WHEREleague_id= ‘2’ ANDfinal= ” ANDseason= ‘2014’ AND TIMEDIFF(NOW(),date) <= 0 ORDER BYdateASCWordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘
league_id= ‘2’ ANDfinal= ” ANDseason‘ at line 1]
SELECTgroup,home_team,away_team, DATE_FORMAT(date, ‘%Y-%m-%d %H:%i’) AS date, DATE_FORMAT(date, ‘%e’) AS day, DATE_FORMAT(date, ‘%c’) AS month, DATE_FORMAT(date, ‘%Y’) AS year, DATE_FORMAT(date, ‘%H’) AShour, DATE_FORMAT(date, ‘%i’) ASminutes,match_day,location,league_id,home_points,away_points,winner_id,loser_id,post_id,season,id,customFROM wp_leaguemanager_matches WHEREleague_id= ‘2’ ANDfinal= ” ANDseason= ‘2014’ AND TIMEDIFF(NOW(),date) > 0 ORDER BYdateDESC,idDESCbut works in classification: version compact & version extended.
The topic ‘team widget logo’ is closed to new replies.