• I am using the Popularity Contest Plugin by Alex King and wordpress, 2.1. Upon saving a post, i get the following error.

    Warning: Invalid argument supplied for foreach() in wp-content/plugins/popularity-contest.php on line 1295 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘)’ at line 3

Viewing 8 replies - 16 through 23 (of 23 total)
  • hey great plugin.
    just wanted to know if there’s anyway to make certain posts “exempt” from the plugin contest counter?

    you might be wondering what situation would require something like that. well, i have a “sticky” annoucement posts that stay at the top of the blog for all visitors, and i’m trying to take those completely out of the popularity contest because they aren’t really much content, and also they are bound to get high popularity scores simply because they are “stuck” to the top of the blog.

    thanks!
    Ronny.

    That’s an interesting problem. One “solution” would be to put the content of that post in your theme rather than havng it be retrieved from the database each time. Another would be to create your own copy of the_content() that doesn’t have the hooks that PC uses. Another would be to create an “exclude” list in PC that could be set to ignore certain posts.

    Of course, the purist in me says, “People are viewing that content, it *should* be counted.” ??

    ok, here comes another problem:

    I have been battling around with the problem that after posting, editing or deleting a post from the admin menue I always got an error:

    You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘)’ at line 3

    I have just now disabled all plugins and posted after each disabling and found out if I disabled popularity contest my post, edit and delete worked again.

    is this an issue of the plugin or maybe an interaction with some other plugin?

    my wp version is 2.0.4

    oh, found out is is still interacting with google sitemaps…
    any solution to this?

    I did some troubleshooting and fixed the error and warning. Starting at line 1298 of the 1.2b3 file:

    foreach ((array)$ak_posts as $post) {
    $ids[] = $post->ID;
    }

    $result = mysql_query(“
    SELECT post_id, total
    FROM $wpdb->ak_popularity
    WHERE post_id IN (‘”. implode(“‘,'”, $ids). “‘)
    “) or die(mysql_error());

    Basically the $ak_posts needed to be casted to an array and SQL syntax for the IN qualifier needed signle quotes added.

    Mike

    Hi –

    I have a fresh WordPress install (latest version) and added in the popularity contest plugin. I downloaded both versions (the 1.1 release from Alex’s site and the 1.0 version referenced above, available on the wp-plugins site) and both ways the plugin isn’t recording any views at all. What can I do to resolve this?

    Thanks,
    Lindsey

    Huh. On a whim I decided to install that Thunderguy Pop. Contest plugin just for the heck of it, although I really don’t want to track pages – and it does work for that…

    Any word on releasing the orginal Pop. Contest plugin so it’s compatible with the latest WP?

    Best,
    Lindsey

    EDIT: Ok, wait it’s not totally working – I have it set to display the 5 most popular articles and it doesn’t show anything ?? All it says is (none)

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Popularity Contest Plugin and WordPress, 2.1’ is closed to new replies.