Author Topic: Image rating doesn't work  (Read 3271 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Image rating doesn't work
« on: January 28, 2006, 01:48:36 AM »
... I made some modifications in the last days on my Website ...
... and now my problem : image rating doesn't work ...
... I restored some backups of the modifyed files ... but ...
... the rating form works well ... the page reloaded ... but than ... nothing ... no message, no voting, no saved rating ...  :?

... now my question for restoring backups ...
... which files are involved for a image rating ... ?
1. page_header.php --- Save Rating ---  (no changes in this time)
2. sessions.php ---> $session_info  (no changes in this time)
3. functions.php ?  (some changes in this time)
4. details.php ?  (some changes in this time)
5. details.html ?  (some changes in this time)
6. rate_form.html  (no changes in this time)
... still other files ?

... has someone an / another idea to solve that problem ... ?

Thanks for the assistance ... mawenzi

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Image rating doesn't work
« Reply #1 on: January 28, 2006, 02:09:35 AM »
1) Are your votes saved in the database? or you are using the default type with cookies?
2) did you check the categories permissions, maybe somehow voting is not allowed?
3) even though you say page_header.php was not changed recently, still try to use "Save Rating" code block from a fresh 4images. I should not break your site, but atleast you should be able to determin if the problem is somewhere in that block or in functions.php
4) you can try to debug, starting with functions.php
There is update_image_rating() function that update the rating. Try add echo $image_id." - ".$rating; in it see if it shows the correct image id and the rating when voted.

Good luck.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image rating doesn't work
« Reply #2 on: January 28, 2006, 03:14:07 AM »
@ V@no
... your assistance ... your Good luck ... and now it works again ... thanks ... :D
... the bug was in functions.php above "update_image_rating()" ... 

thanks again ... mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...