Re: ratings &  html export
	
	
	
	
	
		Re: ratings &  html export
	
	
		thanks a lot
I can't wait !!!
	 
	
	
	
		Re: ratings &  html export
	
	
		Ok, I found it!
The code could be better as in OCD v5 the rating didn't have half-stars, so I patched it quickly without thinking about a better solution, by the way, I think it should work for you.
Just follow these steps I did with the "Advanced Web Site.dax" (and then you can apply them in your export templates):
1) "Declarations" section
  copy this line
   STARSIZE   ["Rating Stars Size"]         : int = 16;
  
  after this existing line
  
     COVERSIZE   ["Album cover size"]         : int = 100;   
     
2) "Album Page" section
  
  after the line "//--></style>"
  
  copy the following function
  
   <script type="text/javascript">
   var Star0     = "Star0.gif";
   var Star0_5    = "Star0_5.gif";
   var Star1     = "Star1.gif";
   
   function RatingStars(myrating) {
      if (parseInt(myrating,10) > 0) {
         for (i=0; i<5; i++) {
            if (i < (myrating / 100) * 5) {
               if ((i+0.5) < (myrating / 100) * 5) {
                  document.write("<img src='.\\images\\" + Star1 + "' width=$STARSIZE valign='top' border='0' />");
               }         
               else {
                  document.write("<img src='.\\images\\" + Star0_5 + "' width=$STARSIZE valign='top' border='0' />");
               }
                
            }         
            else {
               document.write("<img src='.\\images\\" + Star0 + "' width=$STARSIZE valign='top' border='0' />");
            }
         }
      }
      else {
         document.write('Not Rated');
      }            
   }
   </script>
   
  then place the following line where you want to show the rating stars
  
     <script type="text/javascript">RatingStars('<dax:rating/>')</script><br>
  
3) 
After you've created the directory with your collection, with the Export template, you have to:
 - create in it a folder named "images"
 - copy in this directory the three gif images related to the rating stars (you can draw them yourself or grab them from rags&tags, etc.) named 
  "Star0.gif"  (a gif displaying a grey star, for example)
  "Star1.gif"  (a gif displaying a yellow star)
  "Star0_5.gif" (a gif displaying a star half yellow, half grey) 
  
Now you should see the rating displaying the stars, then if you want to display them bigger or smaller than I did, you can change the value of "Rating Stars Size" from 16 to the value you desire.
Cheers
	 
	
	
	
		Re: ratings &  html export
	
	
		Great 
I tried and it worked fine
Thanks a lot