Rating system Help please

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Rating system Help please
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
hello i just installed this Rating system and looks like everything is ok but when you click on a users name to go to there profile you get this message

Could not obtain rating information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND p.post_id = r.post_id LIMIT 1' at line 1

SELECT p.post_id FROM nuke_bbposts p, nuke_bbrating r WHERE p.poster_id = AND p.post_id = r.post_id LIMIT 1

Line : 344
File : /home/stealths/public_html/html/includes/usercp_viewprofile.php

so here is the code they said to add to the usercp_viewprofile.php


define('RATING_PATH', $phpbb_root_path.'mods/rating/');
include (RATING_PATH.'functions_rating.'.$phpEx);
$rating_config = get_rating_config('1');
if ( $rating_config[1] == 1 )
{
   // Rated posts by this user
   $sql = 'SELECT p.post_id FROM '.POSTS_TABLE.' p, '.RATING_TABLE.' r WHERE p.poster_id = '.$profiledata['user_id'].' AND p.post_id = r.post_id LIMIT 1';
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not obtain rating information', '', __LINE__, __FILE__, $sql);
   }
   if ( $row = $db->sql_fetchrow($result) )
   {
      $u_link = append_sid('ratings.'.$phpEx.'?type=p&postedby='.$profiledata['user_id']);
      $l_link = sprintf($lang['Rated_posts_by'], $profiledata['username']);
      $template->assign_block_vars('rating', array(
         "L_LINK" => $l_link,
         "U_LINK" => $u_link
         )
      );
   }

   // If not anonymous
   if ( $profiledata['rating_status'] != 1 )
   {
      // Ratings by this user
      $sql = 'SELECT user_id FROM '.RATING_TABLE.' WHERE user_id = '.$profiledata['user_id'].' LIMIT 1';
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not obtain rating information', '', __LINE__, __FILE__, $sql);
      }
      if ( $row = $db->sql_fetchrow($result) )
      {
         $u_link = append_sid('ratings.'.$phpEx.'?type=p&ratedby='.$profiledata['user_id']);
         $l_link = sprintf($lang['Ratings_by'], $profiledata['username']);
         $template->assign_block_vars('rating', array(
            "L_LINK" => $l_link,
            "U_LINK" => $u_link
            )
         );
      }
   }
}




_________________
Back to top Reply with quote
#2   re: Rating system Help please
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.71 posts per day
Posts: 5530
Points: 481,695
   
re-upload your table sql...it may just have been corrupted during the transfer



Back to top Reply with quote
#3   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
ok that worked the only thing is i don't see anything to do anything with LOL




_________________
Back to top Reply with quote
#4   re: Rating system Help please
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.71 posts per day
Posts: 5530
Points: 481,695
   
have you read what the mod actually does before adding it to your site?



Back to top Reply with quote
#5   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 58
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
yes it is to let your members vote for topics and post.




_________________
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum