Most viewed on frontpage Most viewed on frontpage
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Most viewed on frontpage

Started by Maradona10, April 23, 2007, 04:15:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Maradona10

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?

vuud

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Maradona10

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.....

vuud

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.
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Maradona10

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!

Maradona10