coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Maradona10 on April 23, 2007, 04:15:53 PM

Title: Most viewed on frontpage
Post by: Maradona10 on April 23, 2007, 04:15:53 PM
I want to add the most viewed pictures of a category on my frontpage.
But I can't find the code to do this.

I only find 'viewRandomMostViewedMediaFrom' but this is random. And viewMostViewedMediaFrom doesnt work.

Anyone?
Title: Re: Most viewed on frontpage
Post by: vuud on April 23, 2007, 09:35:05 PM
Quote from: Maradona10 on April 23, 2007, 04:15:53 PM
And viewMostViewedMediaFrom doesnt work.

Yes it does
Title: Re: Most viewed on frontpage
Post by: Maradona10 on April 24, 2007, 02:05:16 PM
I used this code:

<?php
include_once "./gallery2/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery2/cpmfetch/cpmfetch_config.php");
$options = array(
'subtitle' => '{{aTitle}}: {{pTitle}}' ,
'imagewidth' => '100' , 
'imageheight' => '75' ,
'subtitlelink' => '' ,
'imagestyle' => 'imagestyle' ,
'alttag' => '{{aTitle}}: {{pTitle}}'
);
$objCpm->cpm_viewMostViewedMediaFrom("cat=3", 5, 1, $options);
$objCpm->cpm_close();
?>

And I get this error:
Fatal error: Call to undefined method cpm::cpm_viewMostViewedMediaFrom() in D:\www\maradona101.nl\www\index3.php on line 46

When I use cpm_viewLastAddedMediaFrom and cpm_viewTopRatedMediaFrom I have no poblem.....
Title: Re: Most viewed on frontpage
Post by: vuud on April 25, 2007, 01:11:37 AM
Quote from: Maradona10 on April 24, 2007, 02:05:16 PM
I used this code:

<?php
include_once "./gallery2/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery2/cpmfetch/cpmfetch_config.php");
$options = array(
'subtitle' => '{{aTitle}}: {{pTitle}}' ,
'imagewidth' => '100' , 
'imageheight' => '75' ,
'subtitlelink' => '' ,
'imagestyle' => 'imagestyle' ,
'alttag' => '{{aTitle}}: {{pTitle}}'
);
$objCpm->cpm_viewMostViewedMediaFrom("cat=3", 5, 1, $options);
$objCpm->cpm_close();
?>

And I get this error:
Fatal error: Call to undefined method cpm::cpm_viewMostViewedMediaFrom() in D:\www\maradona101.nl\www\index3.php on line 46

When I use cpm_viewLastAddedMediaFrom and cpm_viewTopRatedMediaFrom I have no poblem.....

Well damn.  Your right.  Was that function ever in there?  I made a note to add it back in.
Title: Re: Most viewed on frontpage
Post by: Maradona10 on April 25, 2007, 02:23:21 PM
Quote from: vuud on April 25, 2007, 01:11:37 AM
Well damn.  Your right.  Was that function ever in there?  I made a note to add it back in.

I think only random was, but that's not what I want. Thanks!
Title: Re: Most viewed on frontpage
Post by: Maradona10 on May 13, 2007, 10:10:31 AM
Any news?