Pages (2):    1 2
Member
Member
jayray999   2007-01-05, 01:06
#21
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());
Member
Member
SubJunk   2007-01-05, 03:00
#22
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:

<?php echo $ncount ?>&q=<?php echo $id ?>&t=<?php echo $ip ?>&c=<?php echo $units ?>" title="<?php echo $ncount ?> out of <?php echo $units ?>" class="r<?php echo $ncount ?>-unit rater"><?php echo $ncount ?>

To:

<?php echo $ncount ?>&q=<?php echo $id ?>&t=<?php echo $ip ?>&c=<?php echo $units ?>" title="<?php echo $ncount ?> out of <?php echo $units ?>" class="r<?php echo $ncount ?>-unit rater"><?php echo $ncount ?>

It just escapes the ampersands, just that little change got rid of 18 perceived W3C errors for me.
Member
Member
SubJunk   2007-01-05, 03:02
#23
Haha okay well that didn't work. How silly of me :p
Replace all the ampersands (&) with:
& amp; (remove the space between & and a)
Member
Member
SubJunk   2007-01-08, 00:07
#24
Okay, a few little bugs. The line 122 "behaviour undefined" error is fixed by just adding:

`<script type="text/javascript" language="javascript" src="<?= $_zp_themeroot ?>/js/behavior.js"></script>`

Then another error occurs when a star (or whatever image you use for rating) is clicked, the error is:

`Line 60, character 2: Null is null or an invalid object'`

No filename is given in the error but I expect it is in rating.js
On line 63 of rating.js there is:

`xmlhttp.send(null);`

Anyone have any ideas of how to fix this error?
Member
Member
altaphista   2007-01-08, 15:01
#25
script works good (though after adding the `INSERT`-statement in _drawrating.php), thanx thinkdreams and other developers.
Member
Member
curiouz   2007-05-13, 10:14
#26
@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?
Member
Member
SubJunk   2007-05-21, 21:39
#27
Hi, yes I got working but I've forgotten how. If you send me an email at subjunkNO@SPAMgmail.com I can send you my code so you can see what I changed by comparing mine and yours
Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.