• Resolved stacehamilton

    (@stacehamilton)


    Is there some way to display all the users on the statistics page? I am showing just my stats and it says “You can select other users in the chart settings”. thx.

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

    (@antoineh)

    The plugin tries to add an icon to the page title where you can click to open the chart settings. But some themes prevent this. So there is also a shortcode which allows you to add this icon to the content of the page: [fp-chart-settings]

    Thanks for the question and answer! I have the same question – I see the Chart Settings Icon but I have to select each user in order to add users. I have 50+ and don’t want to check all 50 players. Is there a way to add an “Check all” option? Or does that exist already?

    Thanks!

    • This reply was modified 6 years, 5 months ago by latinosamorir.
    Plugin Author AntoineH

    (@antoineh)

    I have some jQuery that adds a ‘select all’ button to the list. But, do you really want to add 50+ users in the same chart?

    /**
     * jQuery extension for the Football Pool plugin
     *
     * The script adds a 'select all users' button to the chart settings user list.
     *
     * (c) 2018 Antoine Hurkmans
     */
     
    jQuery( document ).ready( function() {
    	var user_selector = jQuery( '#fp-charts-settings .user-selector' );
    	var all_users_button = jQuery( '<input type="button" value="select all users" />' )
    		.click( function () {
    			var $this = jQuery( this );
    			$this.toggleClass( 'all-selected' );
    			jQuery( 'input[type=checkbox]', user_selector ).prop( 'checked', $this.hasClass( 'all-selected' ) );
    		} );
    	
    	user_selector.after( all_users_button );
    } );
    

    good point. =)

    newby here – where/how would i add a jQuery extension? by the way, i want to donate $50 to you — this plugin is awesome! how can i do that?

    another question – is there a chart that shows the distribution of predictions per match?

    for example, x% of users predict Russia will win, % say they’ll win 2-0, the largest goal difference prediction is 3,

    thanks!

    Plugin Author AntoineH

    (@antoineh)

    newby here – where/how would i add a jQuery extension?

    You’ll have to add the jQUery to your template. Easy solution is to use a plugin like Scripts n styles.

    by the way, i want to donate $50 to you — this plugin is awesome! how can i do that?

    Easiest way is to use this link https://paypal.me/wpfootballpool
    Or use the button on the options page.

    and to use euros, paypal charges insane percentages for currency exchange rates ??

    another question – is there a chart that shows the distribution of predictions per match?

    for example, x% of users predict Russia will win, % say they’ll win 2-0, the largest goal difference prediction is 3,

    No, not yet. Will add it to my wish list. Maybe if I find some time I can look into it.

    Plugin Author AntoineH

    (@antoineh)

    another question – is there a chart that shows the distribution of predictions per match?

    for example, x% of users predict Russia will win, % say they’ll win 2-0, the largest goal difference prediction is 3,

    I did some searching in my archives, as I remembered I once tried to make something like this. I found something that is not exactly what you want, but it is a good start. Maybe you or someone else can use it as a reference.
    The plugin I found, adds a bar chart with percentages of predictions to the match predictions view when a match is closed, but you may also add the chart somewhere else if you change the output filter the extension hooks into.

    screenshot

    Hi Antoine – thanks again!

    I’ve installed and activated the plugin and the bar is great! I tried figuring out how to display it at the top of the page instead of at the bottom.

    Could you please let me know how to display at the top?

    I see in the plugin code that the output is modified in line 50:

    $output = self::str_insert( $output, '</table>', $chart->draw() );

    I tried modifying the above as follows:

    $output = self::str_insert( $chart->draw(), $output, '</table>', );

    However, only the chart shows up but the table no longer shows up. What am I missing?

    Thank you!

    PS – The donation link worked, I’ve sent a small donation, thank you!

    Plugin Author AntoineH

    (@antoineh)

    The line above the line you changed, does exactly what you want ??
    So, just uncomment line 49 and comment line 50.

    The function str_insert() searches for the second parameter in the first parameter. And inserts the third parameter after that position.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Choose user Statistics’ is closed to new replies.