I've followed the instructions here http://smartcj.com/wiki/doku.php?id=new_rotation_hints and can't get the rating system to work. I get no message upon clicking and no rating is stored in the db.
Another thing is that I am not sure that new thumbs are rotating into the spots I have designated. This is a no skim site, but I do have the required code showing up after all galleries on every page (?7x1x87361) and clicks are being recorded, but I never see new thumbs move onto the main page.
Rating not working
Re: Rating not working
Any help here? Let me know if you need more details or have any suggestions for me to check.
Re: Rating not working
Yes, I added the code to the picture gallery template so that it shows directly under the gallery. The <script> code is also in there above the rating code.
Re: Rating not working
Please let me know about rotating in new thumbs as well. This does not seem to be working either.
Re: Rating not working
are you talking about 7x1x87361 or rating ?
Let talk about 1 problem only in 1 topic.
Let talk about 1 problem only in 1 topic.
Don't forget to run script update
Re: Rating not working
Then let's talk about rating here. Please give me some feedback on what might be causing the issue, or what I should be looking for.
Re: Rating not working
Get firebug for example and check if it posts any data to server plz.
Don't forget to run script update
Re: Rating not working
In firebug I get this when I click:
ReferenceError: post_rating is not defined
[Break On This Error]
post_rating(1);
The exact code in my page is this:
<script src='/scj/includes/js/jquery.js' type="text/javascript"></script>
<script type="text/javascript">
function post_rating(value) {
$.get('/scj/tube/index.php',
{
'content_id': '<!--GALLERY_MD5-->',
'action': 'rating',
'rating': value
},
function(data) {
$('#rating_div').html('Thank you!');
}
);
</script>
and then for the rating images I have this:
<div id='rating_div'>
current rating = <?=(<!--RATING--> == 0) ? 'not rated' : round( (<!--RATING--> - 1) * 100 ) . '%'?> <br>
Rate This Set!
<span onclick='post_rating(2)' style="cursor: pointer"><img src="/images/thumbsup.png" alt="I like this gallery!" /></span>
<span onclick='post_rating(1)' style="cursor: pointer"><img src="/images/thumbsdown.png" alt="I dislike this gallery!" /></span>
</div>
ReferenceError: post_rating is not defined
[Break On This Error]
post_rating(1);
The exact code in my page is this:
<script src='/scj/includes/js/jquery.js' type="text/javascript"></script>
<script type="text/javascript">
function post_rating(value) {
$.get('/scj/tube/index.php',
{
'content_id': '<!--GALLERY_MD5-->',
'action': 'rating',
'rating': value
},
function(data) {
$('#rating_div').html('Thank you!');
}
);
</script>
and then for the rating images I have this:
<div id='rating_div'>
current rating = <?=(<!--RATING--> == 0) ? 'not rated' : round( (<!--RATING--> - 1) * 100 ) . '%'?> <br>
Rate This Set!
<span onclick='post_rating(2)' style="cursor: pointer"><img src="/images/thumbsup.png" alt="I like this gallery!" /></span>
<span onclick='post_rating(1)' style="cursor: pointer"><img src="/images/thumbsdown.png" alt="I dislike this gallery!" /></span>
</div>
Re: Rating not working
I figured it out and it's a mistake in the manual, so you should fix it.
In your example code, you forgot the closing } after the );
In your example code, you forgot the closing } after the );