• Hi Antoine,
    still working on expanding the already extensive plugin you created.
    I’m working on a plugin that add the prizemoney people could win based on their ranking (so it’s visible in the ranking page).

    I added a new td next to the score with a %prize% placeholder, but it’s not working (i just see “%prizes%”), so i assume it’s not really possible to run a foreach loop with a placeholder?

    Perhaps you could point me into the right direction in your spare time?

    Here is my current file which outputs just the placeholders.
    https://codefile.io/f/TPVqsdqnxW

    Thanks in advance

    • This topic was modified 5 months, 2 weeks ago by pixelhouse18.
Viewing 1 replies (of 1 total)
  • Plugin Author AntoineH

    (@antoineh)

    If you want to display the data, you’ll also have to add it to the params array via a filter. During the render of the template the code will search for elements in that array with the same name as the placeholder. You’ll have to use the footballpool_ranking_ranking_row_params filter for this. Just add the element to the array and return the entire array. And example of this (although more extensive because it adds more data), is the score breakdown plugin. Link can be found in this topic.

    If you are using only one ranking and no leagues, you can also go for an easy CSS approach, e.g. something like this:

    .pool-ranking tr:nth-child(1) td.user-name::after {
    content: " € 50";
    }
    .pool-ranking tr:nth-child(2) td.user-name::after {
    content: " € 40";
    }
    .pool-ranking tr:nth-child(3) td.user-name::after {
    content: " € 30";
    }
    /* etc */
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.