• Resolved Ferguson

    (@maartenferguson)


    First, let me say all league tables for each individual league work fine. But now I want to do something a little more advanced.

    Our club has 5 youth teams and 1 adult team. Each has it’s own competition, page and its own league table. All our teams are listed under ‘Clubs’ as are ALL their competitors and we build a semi automated script to import all results each week, so everything goes smooth.

    But now I want to take just our 6 own teams, from various competitions, list them in a table to use in a widget that shows stuff like position and win streaks (‘form’). This way we can have a fairly small part on the homepage highlighting our own teams, with the bigger and complete league tables of each individual team in their own section.

    I managed to create a league table with manually selected teams (our 6 teams) from 6 different competitions. I can select which columns to show. It is almost perfect except from one thing…. It sorts the table by position, acting as if these 6 teams would compete with each other, which they are obviously not, since they are in 6 different competitions. Instead I want them to stay in a fixed position, no matter the results, most likely in order of seniority. Something like

      Pos Name of team Score Winstreak
      1. Adults H1 23 Points W W L L W
      2. Youth u17 (A) 17 Points L L D L W
      3. Youth u15 (B) 37 Points W W W W W
      4. Youth u13 (C) 19 Points W D L D L

    etc

    The Pos column is not wanted, but its autogenerated as part of the league table code, we can live with that as long as we can fixate the order

    Instead we get now:

      Pos Name of team Score Winstreak
      1. Youth u15 (B) 37 Points W W W W W
      2. Adults H1 23 Points W W L L W
      3. Youth u13 (C) 19 Points W D L D L
      4. Youth u17 (A) 17 Points L L D L W

    etc

    So to summarize, the table is created fine, with all the information I want but the order shifts around based on their score.

    Is this possible to change to a fixed position? In fact I wouldn’t mind if the whole Position column could be gotten rid of, as it is not needed, it;s not a real ‘standings’ table after all, just a summary of our own teams performances.

    If this result can be found outside of the ‘league table’ code that would be fine too, as long as I can include those fancy Win Loss Win Win Draw bits.

    • This topic was modified 8 years, 9 months ago by Ferguson.
    • This topic was modified 8 years, 9 months ago by Ferguson.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Roch

    (@rochesterj)

    Hi!

    Thanks for reaching out and for your detailed ticket.

    As for your issue, I believe the easiest way to fix it is using a new column in your league table for the order. You can use that as your first ordering criteria and hide it.

    This way you can add it in the league adjustments just to change how the teams are displayed.

    Also, we can hide the pos with a bit of CSS, we’ll just need a link to your site.

    Thanks!

    Kind Regards,
    -Roch

    Thread Starter Ferguson

    (@maartenferguson)

    Thanks for the swift reply. Our site will be online live on August 30th, in a few days. I will get back with a link then, right now it’s online but in maintenance mode.

    I will try the column suggestion. I made a new column, but I am not sure how to set the sort order here without screwing up the actual real league tables.

    I managed to sort the table that is the subject of this support issue by setting it at 1 ascending, but then the real league tables got mixed up. and if I set it at 1 descending, the real tables are fine, but the special table isn’t sorted anymore

    edit: nm I found it, I had to adjust the values in the hidden column in reverse order. very obvious once you think it over 😀

    I will keep this open for a few days more for your CSS suggestion, the order issue is resolved! thanks a ton!

    • This reply was modified 8 years, 9 months ago by Ferguson.
    • This reply was modified 8 years, 9 months ago by Ferguson.
    Roch

    (@rochesterj)

    That’s amazing! I’m glad it’s resolved for now.

    Please post back your link once you are live then, I’m sure we can hide it via CSS (specially if you have it just in one page).

    Thanks!

    Kind Regards,
    -Roch

    Thread Starter Ferguson

    (@maartenferguson)

    Hi again

    Our site is online now. It’s made with Sportspress and the Football Club Theme from Themeboy

    http://www.rb-lingen.de/

    What I would like to adjust is the part in the sidebar called Formtabelle. The first column named ‘Pos’ should be invisible if possible.

    I have one additional issue. After I set the site to the German language 95% of it translated fine, except the ‘Read mores’ in the news section . I changed it manually in a php file in the theme directory (Read more -> ‘Weiterlesen’ ) This is fine for now, but I think it might be a dirty hack that gets overwritten again with any update, is that correct? Should I do this somehow within the Child Theme?

    Roch

    (@rochesterj)

    Hi!

    Thanks for sending that!

    Add the following code in your custom css field ( Wp admin > SportsPress > Settings > General > Custom CSS ) and let us know how it works:

    .home #secondary #DataTables_Table_0 tr td:nth-child(1), .home #secondary #DataTables_Table_0 tr th:nth-child(1) {
      display: none;
    }

    As for the translation, actually we’d greatly appreciate if you could help us with that. We rely on user generated translations, that’s why not always it’s 100% translated.

    If possible, please kindly translate it here directly:
    https://translate.wordpress.org/projects/wp-plugins/sportspress

    This way it’s going to be 100% for you and all other German users. But as for your fix, that should work fine for now, when we update the plugin you may need to redo this change if the translation isn’t complete again.

    Thanks!

    Kind Regards,
    -Roch

    Thread Starter Ferguson

    (@maartenferguson)

    Thank you Roch, that worked like a charm and it also taught me a bit about the underlying structures so I can try applying that in other situations.

    As for the german translation, I was not able to find any untranslated ‘read more’ or Read More’ or anything like that in your link. You linked to the sportspress plugin, but it might be in another part, namely football club theme?

    Roch

    (@rochesterj)

    Hi @maartenferguson!

    I’m glad that worked for you.

    As for the translation, that could also be the issue.

    Just to confirm, what happens when you switch to the twenty sixteen theme? That theme probably has a full german translation and it’s a quick way to confirm if it’s a translation missing in our theme files.

    Thanks!

    Kind Regards,
    -Roch

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Can I do something complex, see text, with league tables?’ is closed to new replies.