forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: florennes-as.be on May 31, 2007, 10:10:01 pm

Title: Entering album iso viewing single picture with cpm_viewLastUpdatedAlbumsFrom
Post by: florennes-as.be on May 31, 2007, 10:10:01 pm
Hello all !

  First, many thanks for the creator of this fabulous module !!!
  I have to confess i tried to use it with version 1.XX without success, and lot's of tries and coffees ... V2.00 was installed really easily !!!

  I would like to show the last three albums added to a category with a thumbnail of a picture. It can be done with cpm_viewLastUpdatedAlbumsFrom
  However, when i click the thumb, it shows the picture full size. I would have preferred to show the entire album (or at least the first thumbs of the album) instead of a picture full size.

  Is it possible ? Have i missed something ?

  Thanks in advance for the clues ... ;-)

L@urent
Title: Re: Entering album iso viewing single picture with cpm_viewLastUpdatedAlbumsFrom
Post by: vuud on June 01, 2007, 05:32:26 pm
Hello all !

  First, many thanks for the creator of this fabulous module !!!
  I have to confess i tried to use it with version 1.XX without success, and lot's of tries and coffees ... V2.00 was installed really easily !!!

  I would like to show the last three albums added to a category with a thumbnail of a picture. It can be done with cpm_viewLastUpdatedAlbumsFrom
  However, when i click the thumb, it shows the picture full size. I would have preferred to show the entire album (or at least the first thumbs of the album) instead of a picture full size.

  Is it possible ? Have i missed something ?

  Thanks in advance for the clues ... ;-)

L@urent

Check the options array documentation - there are codes in there to tell it how to link, or even how to make your own custom links...

Title: Re: Entering album iso viewing single picture with cpm_viewLastUpdatedAlbumsFrom
Post by: florennes-as.be on June 01, 2007, 09:10:14 pm
Hello !

  That's right, i found it ! I have to set the 'imagelink' setting to 'album' in the $option array.

  So, i have to add ; $options = array( 'imagelink' => 'album'); ?
  First tries were not redirecting a hit to a picture to the relevant gallery ...

  Help welcomed as i am little into php.

  Thanks !!!

L@urent
Title: Re: Entering album iso viewing single picture with cpm_viewLastUpdatedAlbumsFrom
Post by: florennes-as.be on June 01, 2007, 09:12:03 pm
Mhhh, i was a bit too quick, this works, here is the small sample ;

<?php
  include "./engine/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./engine/cpmfetch/cpmfetch_config.php");
  $options = array( 'imagelink' => 'album');
  $objCpm->cpm_viewRandomMediaFrom("",1,4,$options);
  $objCpm->cpm_close();
?>

Regards,

L@urent