Need help with rating script...

jmarcus

Junior Member
Hi

I've been trying for a few days to get Ryan Masuga's Masuga Design - Web Design and Development Located in Grand Rapids, MI star rating script to work. I've read through the comments, etc. My problem seem fairly common, yet I can't figure out what's going on.

It must be something to do with the paths to two files: db.php & rpc.php. The javascript is working, and everything works fine, EXCEPT it does not process the votes into the database. I don't know why the path would be wrong, since all the php files are on the root level with the index file.

Does anyone know what the proper path should be, as it should be listed in the configuration file? Those documents are on the root level....

I'm not getting an error about connecting to database, so I don't know exactly what's going on...

Hopefully I explained it well enough...

Thanks
 
They've discontinued this product and there's no demo.
So it's hard to tell without code examples, is anything else going into the database?
Test database connection with a simple update to rule that out.

Otherwise try another solution: I've used these in the past jQuery Star Rating Plugin v3.10 (2009-03-23)
without any problem, essentially they are just radio buttons and you need to cycle through the radio buttons to see which is selected and store to db.
 
I just had a quick 5 minute look at this and it seems like it is a simple script similar to one i wrote a site a whila ago.

It allows you to update two tables with the rating information; ip addresses to limit the votes and the votes and item id.

Assuming you have set everything up right and have the correct database details in _config-rating.php, you will need to do some debugging.

Note that db.php is only called if javascript is disabled, rpc.php will be called at all other times and since 9x% of people have javascript enabled I would look here. I know you said that the javascript is working but I would still start with the following;

./js/rating.js

file and look for this line

//for testing alert('sndReq('+theVote+','+theratingID+','+theuserIP+','+theunits+')'); return false;

uncomment this and upload to your website. Make sure to completely clear your cache before you reload the page as browsers have a bad habbit of caching the js files that are loaded.

If possible use Firefox with the WebDev or Javascript debugging console extensions and that will show you if there is an error with it.

If you dont see a popup box when you vote, then you need to look at the javascript. If it is a PHP error that you just cant see (maybe error reporting is off) try adding

error_reporting(E_ALL);

to the top of the php files.

Without hands on its pretty hard to debug so just post any errors you come across.
 
Back
Top