Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Got the same error too. But it’s WordPress 3.2’s problem.

    I manually modify code wp-admin\includes\class-wp-list-table.php line 80, from
    function __construct( $args = array() ) {
    to
    function WP_List_Table( $args = array() ) {

    Just fixed the problem.

    Forum: Plugins
    In reply to: Popularity Contest 1.0

    Hello,

    I found a bug in release 1.0. Function recalculate_popularity() did not include the score from feed view.

    Add (feed_views * $this->feed_value) and it should read as

    function recalculate_popularity() {
    global $wpdb;
    $result = mysql_query("
    UPDATE $wpdb->ak_popularity
    SET total = (feed_views * $this->feed_value)
    + (home_views * $this->home_value)
    + (archive_views * $this->archive_value)
    + (category_views * $this->category_value)
    + (single_views * $this->single_value)
    + (comments * $this->comment_value)
    + (pingbacks * $this->pingback_value)
    + (trackbacks * $this->trackback_value)
    ") or die(mysql_error());
    }

    I have just hacked the plugin to include the last n days…
    Hope Alexking don’t mind.


    // -- TEMPLATE FUNCTIONS
    function akpc_last_n_days($limit = 10, $n = 30) {
    global $akpc, $post, $wpdb;
    $items = $wpdb->get_results("
    SELECT p.ID AS ID, p.post_title AS post_title, pop.total AS total
    FROM $wpdb->posts p
    LEFT JOIN $wpdb->ak_popularity pop
    ON p.ID = pop.post_id
    WHERE DATE_ADD(p.post_date, INTERVAL $n DAY) > DATE_ADD(NOW(), INTERVAL 0 DAY)
    AND p.post_status = 'publish'
    ORDER BY pop.total DESC
    LIMIT $limit
    ");
    $list = '';
    if (count($items) > 0) {
    foreach ($items as $item) {
    $list .= '<li><a href="'.get_permalink($item->ID).'">'.$item->post_title.'</a> ('.$akpc->get_post_rank(-1, $item->total).')</li>'."\n";
    }
    }
    if (!empty($list)) {
    print($list);
    }
    }

    If you use Apache, just remove the “Indexes” from “Options Indexes FollowSymLinks” of your root directory of httpd.conf. Which is default.

    You can try my blog at https://ying.homedns.org/wp/
    But it is encoded in Chinese, you probably cant read it.

    alexking,
    I found “Last 30 days” list in report is quite useful, but it can only show in report. Can you make a tag for Last_n_days ?

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