Hey guys, having a little problem with getting my PHPCode to work with one of my specific pages. The problem (I think) is just the path of some files. However, I want some PHP Experts to double check me before I make an utter mess out of this project.
I downloaded this script from http://www.dbscripts.net/ratings/
So when I first tested the rating system, everything was fine, but I don’t want to send users to another page to vote, I want to integrate it to one of my pages. So, I look in the files on how to do it and it says…
[php]<?php
// The two lines below are all that is required to add a ratings
// control to your page. Obviously, these need to be placed within
// a PHP code block inside a valid PHP page. You will also need to
// configure the settings in config.php properly.
//
// Modify these lines as follows:
//
// * Change the include path to reflect where DRBRatings is installed.
// * Change the parameter for show_ratings_control() to reflect a unique
// ID for the rating on this page. This feature allows you to store
// more than one rating using the same installation of DRBRatings.
// New IDs must be added to the VALID_RATING_IDS array in config.php.
include_once('ratings/ratings.php');
show_ratings_control("1");
?>[/php]
So at this point, I’m thinking, “Sweet! That’s easy!” I copy the needed coded (without the commentary) into the file I want it to be in and get an error: [php]Fatal error: Call to undefined function show_ratings_control() in (this is where the path of the document I am using this ratings on) on line 45[/php]
So I double check the php tags to make sure it’s enclosed in php, which it is. I then go into the config.php file it talks about and see the path that it would want me to change if there is an error, but I’m pretty positive that I don’t need to change it as that’s where all the info for this code is being kept. (I’m sorry I’m not giving my website to show what the problem is, but I don’t want to advertise publically yet - if you would like to help just e-mail me and I’ll gladly TeamView or just give you a more descriptive path)
My paths are setup like this…/home/folder/public_html/folder2/PageWhereRatingIsInError.php and the location of the ratings is…
/home/folder/public_html/DRBRatings/ratings/blah/blah/blah
I’ll try to keep checking this post for comments, but I’d really prefer an e-mail. Many thanks anyways.
E-Mail: [email protected]