SMOKEY_TEK Posted February 5, 2011 Posted February 5, 2011 I'm not positive this is any good, if you want to make it any better please do so. Make a file called "rating.php" and insert the following into it: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add the following to your "profiles.php" file: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add the following to your "classes.php" file: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Sql : [mysql]ALTER TABLE `grpgusers` ADD `ratings` INT( 11 ) NOT NULL DEFAULT '0';[/mysql] Save the two images to your "images" folder if you have one, if not change the image source. Quote
Danny696 Posted February 5, 2011 Posted February 5, 2011 its __FILE__ not __FILE In both files you need to global $user_class i belive Quote
Kieran-R Posted February 5, 2011 Posted February 5, 2011 The users table in GRPG is `grpgusers`. Not `users`. You may also have to secure your $_GET['id'] variable if it isnt already secured in classes. Quote
jaymo Posted February 6, 2011 Posted February 6, 2011 can't get this to work...for some reason when up or down is clicked it just comes up with a white page. Quote
Kieran-R Posted February 6, 2011 Posted February 6, 2011 Use just: include "header.php"; and it should work fine. Quote
Equinox Posted February 6, 2011 Posted February 6, 2011 Overusing isset() and using it wrongly. Has no one else noticed (isset($_GET['id'] != "")) ? Quote
Djkanna Posted February 6, 2011 Posted February 6, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Not tested(never used GRPG). Nice try Smokey. :thumbsup: Quote
Kieran-R Posted February 6, 2011 Posted February 6, 2011 Also what's the point using cases's when there not needed? You could simply do if ($_GET['up'] > 0){ rather than using action = and all that. Quote
Danny696 Posted February 6, 2011 Posted February 6, 2011 Mabey thats how they learnt, most people use cases, look at big scripts, SMF, WBB, would use like 1000000000 ifs where they can use afew cases.. looks cleaner too Quote
Equinox Posted February 6, 2011 Posted February 6, 2011 Also what's the point using cases's when there not needed? You could simply do if ($_GET['up'] > 0){ rather than using action = and all that. I would prefer to use cases here. Quote
Djkanna Posted February 7, 2011 Posted February 7, 2011 Also what's the point using cases's when there not needed? You could simply do if ($_GET['up'] > 0){ rather than using action = and all that. And whats the point of using if statements when not needed? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.