PortalParts.com Site

 Forum Index > Community > Showcase New Topic Post Reply
 Vent IT! (www.ventit.com.au)
 |  Printable Version
 January 25 2006 23:33 PM  
Forum Full Poster
Full Poster

Status: offline

Registered: 01/23/06
Posts: 12

That was really helpful kb74. Thanks a lot. I got the terms & conditions thing set up.
I also set up the rating system but ran into a problem.

In the instructions it says look for this line

PHP Formatted Code
if( $index == 'n' )
in lib_common.php so i can insert the given code above that line. However, I could not find that line anywhere in lib_common.php so I donot know where to install the code. Did you run into a similar problem?

I have already run installratings.php with confirmation of its success.

The code that I have to paste into lib_common.php is:
PHP Formatted Code
//If an article there is no sid so look for appropriate variable
if($story != ""){
$ratingrecords = DB_query("SELECT * FROM $_TABLES[ratings] WHERE type='sid' AND id = $gstory");
//See if record exists
if(DB_Numrows($ratingrecords) > 0){
while($row = DB_fetchArray($ratingrecords)){
$rated = '<IMG ALIGN=absmiddle SRC='.$_CONF['site_url'].'/images/rank'.$row['rate'].'.gif'.'>';
$rated="No Votes";
$article->set_var( 'sid', $A[sid]);
$article->set_var( 'story_rating', $rated);

Any suggestions?

Profile Email PM
 February 01 2006 18:44 PM  
Forum Big Cheese
Big Cheese

Status: offline

Registered: 12/06/04
Posts: 57

Sorry have been away for a few days.

I didn't have this problem during the installation, I found that code in there. I can't remember where but it was a fair way into the code. All I can suggest is to run a search or just keep looking it is there.


Kev :thumbsup:

You can make a difference! Do it today.
Profile Email Website PM
Content generated in: 0.18 seconds
New Topic Post Reply

 All times are CST. The time is now 11:39 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content