Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Most viewed on frontpage  (Read 5223 times)

0 Members and 1 Guest are viewing this topic.

Maradona10

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Most viewed on frontpage
« 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?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Most viewed on frontpage
« Reply #1 on: April 23, 2007, 09:35:05 pm »

And viewMostViewedMediaFrom doesnt work.

Yes it does
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Most viewed on frontpage
« Reply #2 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.....
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Most viewed on frontpage
« Reply #3 on: April 25, 2007, 01:11:37 am »

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

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Most viewed on frontpage
« Reply #4 on: April 25, 2007, 02:23:21 pm »

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!
Logged

Maradona10

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Most viewed on frontpage
« Reply #5 on: May 13, 2007, 10:10:31 am »

Any news?
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 16 queries.