post-page

WP Plugin: Top 10 posts with Widgets Support

6
responses
by
 
on
June 3rd, 2006
in
LinkyLoo, WordPress Plugins

WP Plugin: Top 10 posts with Widgets Support Paul has added widgets support to my old Top 10 Posts plugin. Thanks Paul. Also, there is a news section of weblogtoolscollection that makes it easier to post new items to weblogtoolscollection.

heading
heading
6
Responses

 

Comments

  1. tzMartin (2 comments.) says:

    I have modified this plugin so that it will work with Polyglot (i.e. the original one does not). The modifications are marked between “Polyglot begins/ends”, just in case anybody interested.

    function show_pop_posts() {
    global $wpdb, $siteurl, $tableposts, $id;
    $results = $wpdb->get_results("select postnumber, cntaccess from mostAccessed ORDER BY cntaccess DESC LIMIT 10");
    echo "";
    if ($results) {
    foreach ($results as $result) {
    // Polyglot begins
    if (function_exists('lang_picker_respect_more')) {
    $result->postnumber = lang_picker_respect_more($result->postnumber);
    }
    // Polyglot ends
    echo 'postnumber).'">'.lang_picker_respect_more(get_the_title($result->postnumber)).' ('.$result->cntaccess.')';
    }
    }
    echo "";
    }

    Just cut and paste the function into the Top10.php plugin. If you have problems, you can download the mod file here:
    http://www.tzmartin.com/downlo.....top10.phps

    (just rename the file and upload it to your ‘plugins’ folder.)
    http://www.tzmartin.com/blog/files/

  2. tzMartin (2 comments.) says:

    I have modified this plugin so that it will work with Polyglot (i.e. the original one does not). The modifications are marked between “Polyglot begins/ends”, just in case anybody interested.

    function show_pop_posts() {
    global $wpdb, $siteurl, $tableposts, $id;
    $results = $wpdb->get_results("select postnumber, cntaccess from mostAccessed ORDER BY cntaccess DESC LIMIT 10");
    echo "";
    if ($results) {
    foreach ($results as $result) {
    // Polyglot begins
    if (function_exists('lang_picker_respect_more')) {
    $result->postnumber = lang_picker_respect_more($result->postnumber);
    }
    // Polyglot ends
    echo 'postnumber).'">'.lang_picker_respect_more(get_the_title($result->postnumber)).' ('.$result->cntaccess.')';
    }
    }
    echo "";
    }

    Just cut and paste the function into the Top10.php plugin. If you have problems, you can download the mod file here:
    http://www.tzmartin.com/downlo.....top10.phps

    (just rename the file and upload it to your ‘plugins’ folder.)
    http://www.tzmartin.com/blog/files/

  3. Lincoln says:

    Just reporting a bug: the Top 10 posts also lists PRIVATE posts that you have made, though clicking on them results in a 404 error. Still, I’d prfer the private posts not show up at all on the list. :-(

  4. Joern (1 comments.) says:

    In WordPress 2.1 this plugin doesn’t count correctly



Trackbacks/Pingbacks

  1. […] la même façon, vous pourrez modifier les plugin équivalents comme Top 10 posts ou Daily Top 10 […]

  2. […] Top 10 Posts With Widgets Support – The name says it all. Click here to find the original Top 10 Posts […]

Obviously Powered by WordPress. © 2003-2013

page counter
css.php