• Resolved lebo69

    (@lebo69)


    Hi Antoine,

    is there a simple way to add the flags to the groups table? Preferably to the left of the Team name.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author AntoineH

    (@antoineh)

    Hi,

    I found this extension in my archives. If it still works, you’re lucky ??

    Excellent AntoineH extension, but I wanted to rename the headers of the table that would be this one:

    $ template_start. = '<tr>
    <th class = "team"> Teams </ th>
    <th class = "plays"> Games </ th>
    <th class = "wins"> <span title = "% wins_expl%">% wins_thead% </ span> </ th>
    <th class = "draws"> <span title = "% draws_expl%">% draws_thead% </ span> </ th>
    <th class = "losses"> <span title = "% losses_expl%">% losses_thead% </ span> </ th>
    <th class = "points"> Point </ th>
    <th class = "goals"> Dif. </ th>
    </ tr>
    </ thead>
    <tbody> ';

    But he does not show it to me. Would you help me?
    Thank you so much!

    Plugin Author AntoineH

    (@antoineh)

    If you want to change the header row, then you’ll have to hook into that filter, create the $template_start you wish and return that string.

    So, something like:

    
    add_filter( 'footballpool_group_table_start_template', array( __CLASS__, 'change_group_start_template' ), null, 2 );

    And then the function that returns the new string:

    
    public static function change_group_start_template( $template_start, $layout ) {
      return 'my new template string';
    }
    

    My contribution will add the following to the code:

    add_filter ('footballpool_group_table_start_template', array (__CLASS__, 'change_group_start_template'), null, 2);
    
    public static function change_group_start_template ($ template_start, $ layout) {
    
    $ template_start = '<div class = "ranking group-ranking -'. $ layout. '% css_class%"> <h2>% group_name% </ h2>
    <table class = "ranking group-ranking">
    <thead> ';
    if ($ layout == 'wide') {
    $ template_start. = '<tr>
    <th class = "team"> Teams </ th>
    <th class = "wins"> <span title = "Played"> JUG </ span> </ th>
    <th class = "wins"> <span title = "% wins_expl%">% wins_thead% </ span> </ th>
    <th class = "draws"> <span title = "% draws_expl%">% draws_thead% </ span> </ th>
    <th class = "losses"> <span title = "% losses_expl%">% losses_thead% </ span> </ th>
    <th class = "wins"> <span title = "points"> PTS </ span> </ th>
    <th class = "goals"> <span title = "Goals for and find"> GF-GC </ span> </ th>
    </ tr>
    </ thead>
    <tbody> ';
    }
    
    return $ template_start;
    }

    Thanks, and I hope another user can use it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Flags to Groups Table’ is closed to new replies.