Hi, I'have the scripts working but I get by every picture the same id...
I'm using test_html.php but where do I have to put the code for a different id???
My scripts is called details.php In details.php I copied:
$ft = new FastTemplate($TEMPLATE_PATH); $ft->define(array("main"=>"template_test.html"));
// rate pro changeing $file=$_SERVER["REQUEST_URI"]; // version control if(empty($file)) { global $HTTP_SERVER_VARS; $file=$HTTP_SERVER_VARS['REQUEST_URI']; }
// here you need to add your filename // change it .... test.php
$expl=array(); $expl=explode ("test_html.php",$file); $file= "test_html.php".$expl[1]; $file_real=$file; //end
// specifiing the variables that should be used // EXAMPLE: // http://www.domain.com/index.php // will use as rating string "path/index.php" // usually we need to rate articles by their ids (and other variables) // in this case the $var_array should be set up // remove the // from the begining of the next line // $var_array = array(0=>"id");
// in this case only http://www.domain.com/index.php?id=1".LANG_RATEPRO _FROM."=12 // will be rated as "path/index.php?id=1" because the rest of the // url variables are dumped
// Special case: // if you want to rate only "path/index.php" but you have some url variables // then you may leave the array blank
// remove the // from the begining of the next line // $var_array = array();
$var_array = array(0=>"id");
$querystring=$_SERVER['QUERY_STRING'];
// version control if(empty($querystring)) { global $HTTP_SERVER_VARS; $querystring=$HTTP_SERVER_VARS['QUERY_STRING'];;
}
parse_str($querystring, $variable_array);
// undoing the query string with the $var_array variables $buffer=""; foreach(array_keys($variable_array) as $v) if(in_array($v,$var_array)) { $buffer.=$v; $buffer.="="; $buffer.=$variable_array[$v]; $buffer.="&"; }
$buffer=substr($buffer,0, -1);
$file = strtok($file,"?"); if(sizeof($var_array)>0) { $file.="?"; $file.=$buffer; } // end rate first part
$rate=new Rating("Rate",$file,$file_real); $ft->assign("RATE",$rate->getRating()); $ft->parse("mainContent", "main");
?> <p>here is content part from your site</p> <p> </p>
<?php //ob_start();
print $ft->fetch("mainContent");
But where do I past the ID code for different pictures???? |