WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Share (New) Button
Some fixes for the Statistics page (4 posts)

  1. RPG84
    Member
    Posted 3 years ago #

    Fixes for the stats:
    First row not showing properly:
    Adjust row 153 from:
    $url = 'http://api.facebook.com/restserver.php?method=links.getStats&urls="'.$urls.'"';
    to
    $url = 'http://api.facebook.com/restserver.php?method=links.getStats&urls='.$urls.'';

    Footer showing on top:
    Adjust row 103 from:

    $get_analytics = fb_read_analytics($urls);
    	 }

    to:

    $get_analytics = fb_read_analytics($urls);
    	echo "</table>";
    }

    Showing pages and posts:
    Adjust row 88 from:
    query_posts('posts_per_page=30');
    To:
    query_posts( 'post_type=post&posts_per_page=-1&orderby=title&order=ASC');

    Adjust row 102 from:
    wp_reset_query();
    To:

    wp_reset_query();
    		query_posts( 'post_type=page&posts_per_page=-1&orderby=title&order=ASC');
    		//The Loop
    		if ( have_posts() ) : while ( have_posts() ) : the_post();
    		if (get_post_status($post->ID) == 'publish') {
    			$urls .= get_permalink().",";
        	  	}
    		endwhile; endif;
  2. nemeshsingh
    Member
    Posted 3 years ago #

    Thanks RPG84. We have fixed this issue.

  3. RPG84
    Member
    Posted 3 years ago #

    Thanks for the quick response.

    I have some adjustment because the analytics did not work for people with a lot of pages/posts. Also made the stats colorised so you can see how well you are linked (you can decide if you like it and want to implement it)

    This will create 1 table
    Then after every 20 posts/pages it will get the stats from facebook. This to make sure that people with a lot of pages/post will still see stats
    Change:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    To:
    [Code moderated as per the Forum Rules. Please use the pastebin]

  4. RPG84
    Member
    Posted 3 years ago #

    Put the changes in a pastebin:
    http://pastebin.com/vCyY0c2x

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic