Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter polimehr

    (@polimehr)

    Amazing. This worked really well.

    Here is what I did (for future reference)

    class FootballPoolExtensionRankingRowTemplate {
    	public static function init_extension() {
    		add_filter( 'footballpool_ranking_ranking_row_template', array( __CLASS__, 'new_template' ), null, 2 );
    		add_filter( 'footballpool_ranking_ranking_row_params', array( __CLASS__, 'custom_value' ), null, 2 );
    	}
    	
    	public static function new_template( $all_user_view, $type ) {
    		
    		$ranking_template = '<tr class="%css_class%">
    								<td class="user-rank">%rank%.</td>
    								<td class="custom-cell">%custom_value%</td>
    								<td class="user-name"><a href="%user_link%">%user_name%</a></td>
    								<td class="user-score ranking score">%points%</td>
    								</tr>';
    		return $ranking_template;
    	}
    	
    	
    
         
        public static function custom_value( $params ) {	
    	$params['custom_value'] = 'custom value with:'.$params['user_id'];		
            return $params;
        }	
    	
    	
    	
    }
    
    add_filter( 'plugins_loaded', array( 'FootballPoolExtensionRankingRowTemplate', 'init_extension' ) );
    

    And yes, the search function sucks 😉

    Cheers and thanks again
    Sascha

    Thread Starter polimehr

    (@polimehr)

    Thanks. I will look into that. 🙂

    Thread Starter polimehr

    (@polimehr)

    Hi, thanks for your reply. Shouldn’t it be “planned” if it is a date/time issue?

    Anyway I’ll send you a debug output as soon as a mail behaves like this again.

    Sascha

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