cpm_viewTopRatedMediaFrom issue cpm_viewTopRatedMediaFrom issue
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

cpm_viewTopRatedMediaFrom issue

Started by Bash, December 05, 2009, 04:43:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bash

This is the code I'm using on the page (I'm using cpmfetch about 3 times on the page):

<?php
  $objCpm 
= new cpm("renders/cpmfetch/cpmfetch_config.php");
 
$objCpm->cpm_viewTopRatedMediaFrom ("",1,3,$options);
  
$objCpm->cpm_close(); 
?>


Here's the site: link (go to 'top rated renders' box down the page).

Really don't understand how it's choosing the images, although they do have 5/5 votes but the ones that show up should be the same as the ones on the top rated page on coppermine: link

Don't seem to be restricted by category, and I thought the cpmfetch code is supposed to choose the top rated AND most voted when using the function?

(Note: I used to use an older version of cpmfetch can't remember which, but upon upgrading to the latest stable version this function stopped working now. Could it be conflicting with other cpm fetch codes that I have on the page?)

Thanks in advance,

Bash

sorry can't find the edit button above, here are the correct links:

my site: link
top rated page: link

Nibbler

Modify cpmfetch to calculate the top rated pics in the same manner as Coppermine.

Edit cpmfetch_dao.php


. " ORDER BY p.pic_rating DESC LIMIT 0,$count";


Change to


. " ORDER BY p.pic_rating DESC, p.votes DESC, p.pid DESC LIMIT 0,$count";

Bash

Used to be this:

ORDER BY p.pic_rating DESC LIMIT 0,$count

changed it to what you said, and the images are still the same

Here are the other cpmfetch codes I have on the page in case they're conflicting, in the same order:

<?php
  
include "renders/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("renders/cpmfetch/cpmfetch_config.php");
 
$objCpm->cpm_formatStats ("There are currently <b>%f</b> renders in the gallery");
?>


<?php
$options 
= array( 'linkstyle' => 'img_link''tablestyle' => 'lren_tb');
 
$objCpm->cpm_viewLastAddedMedia(14$options);
?>


<?php
  $objCpm 
= new cpm("renders/cpmfetch/cpmfetch_config.php");
 
$objCpm->cpm_viewTopRatedMediaFrom ("",1,3,$options);
  
$objCpm->cpm_close(); 
?>

Bash

Oh hang on, for some reason the changes weren't saved the first time. Changed it again and it's working now. Thanks a bunch