forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: AncaGabriela_ on January 31, 2014, 12:40:38 pm

Title: How to install CPMFetch
Post by: AncaGabriela_ on January 31, 2014, 12:40:38 pm
Hy  sorry   for   disturb   like   this   and  sorry  for my  bad english.Look  i  follow this   tutorial http://tutorials.fanfusion.org/coppermine/how-to-install-cpmfetch/   i   install   like in  tutorial  and     now   i  have  this http://pilaloversro.celebwire.org/Photos/cpmfetch/install.php
but not  i   dont   understand   what  is  next i  whant    tu put in  sidebar   in my web please  is  urgent   i need   to open  my  webs   thanks!
Title: Re: How to install CPMFetch
Post by: AncaGabriela_ on January 31, 2014, 12:49:58 pm
look   like    this  is  http://i1113.photobucket.com/albums/k516/AncaShare/Untitled_zpsf57b12e9.png (http://i1113.photobucket.com/albums/k516/AncaShare/Untitled_zpsf57b12e9.png)
Title: Re: How to install CPMFetch
Post by: gmc on January 31, 2014, 02:03:41 pm
You have successfully installed cpmfetch - and the screen picture you attached gives the code you need.

Assuming you are trying to display on your homepage written in php - and your gallery is in a subdirectory named gallery, you would include:
Code: [Select]
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

will display a row of the 4 last added pictures.

If you want a column of 4 images (you mentioned sidebar), the 3rd line would become:
Code: [Select]
  $objCpm->cpm_viewLastAddedMedia(4,1);

Does that help?
Title: Re: How to install CPMFetch
Post by: AncaGabriela_ on February 01, 2014, 10:30:05 pm
i  will  try   thanks  you   for  help