Sorry thinkdreams, still did not work. I did all the changes carefully in .htaccess and zp_config.php to switch off mod_rewrite. Anyway, at least we know that it will work perfectly (with mod_rewrite ON and without full URL) of we insert:
if (mysql_num_rows($query) == 0) {
$sql = "INSERT INTO $tableName (id,
total_votes, total_value, used_ips)
VALUES ('$id', '0', '0', '')";
$result = mysql_query($sql);
}
After the line:
$query=mysql_query("SELECT total_votes, total_value, used_ips FROM $tableName WHERE id='$id' ")or die(" Error: ".mysql_error());
Sorry I don't know what isn't working. Your MySQL query to create the table isn't working? Is that the problem?
Sorry I'll check back on this thread more often and try to help. I do have another worthwhile change to make though, for those of you who want valid code:
In _drawrating.php, change:
&q=&t=&c=" title=" out of " class="r-unit rater">
To:
&q=&t=&c=" title=" out of " class="r-unit rater">
It just escapes the ampersands, just that little change got rid of 18 perceived W3C errors for me.
script works good (though after adding the INSERT-statement in _drawrating.php), thanx thinkdreams and other developers.
@subjunk: I tried to add that line with "behavior.js" but that makes the rating fuction hang at the loading sign (try it here: http://www.bewoog.nl/zp/natuurgetrouw/IMG_8014.JPG.php). Did you get it to work properly without it needing to reload?