The MU forums have moved to WordPress.org

How to update for 2.3 Most Popular Categories by Posts (4 posts)

  1. iolaire
    Member
    Posted 16 years ago #

    The plugin Most Popular Categories by Posts http://bloghelper.is-there.net/plugins/wordpress/most-popular-categories-by-posts/
    was rendered no working by the upgrade to 2.3. To fix it replace the select statement around line 17 with the following.

    SELECT p.ID, p.post_title, p.post_date, c.term_id as cat_ID, c.name as cat_name, p2c.object_id as post_id, p2c.term_taxonomy_id  as category_id
    		FROM $wpdb->posts p
    			LEFT JOIN $wpdb->term_relationships p2c
    				on p.ID = p2c.object_id
    			LEFT JOIN $wpdb->term_taxonomy tt
    				ON p2c.term_taxonomy_id = tt.term_taxonomy_id
    			LEFT JOIN $wpdb->terms  c
    				ON tt.term_id = c.term_id
    		WHERE post_status = 'publish'
    			AND p.post_date > DATE_ADD(CURDATE(), INTERVAL -$zmpc_days DAY)
    		ORDER BY p.post_date DESC

    Also looking at the code it seems to make sense to do all the counting in SQL rather than php, but I've not yet done that in this code.

  2. Konstan
    Member
    Posted 16 years ago #

    Are you sure you're on the right forum? Wpmu1.3 or WP2.3?

  3. iolaire
    Member
    Posted 16 years ago #

    Yes - Wpmu1.3 then, but I'd guess it works for normal Wp also.

    ** Off topic, any reason why the current version no longer shows up in the admin view of WPMU 1.3? That is where I usually look for the version number, with it missing I have to rely on my memory.

  4. andrea_r
    Moderator
    Posted 16 years ago #

    I think they stripped out publicly-viewable version numbers on purpose. You can always see what version you have by reading the file /wp-includes/version.php. (I think it's in the includes folder)

About this Topic

  • Started 16 years ago by iolaire
  • Latest reply from andrea_r