Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Using CpmFetch to display and hide div blocks  (Read 2918 times)

0 Members and 1 Guest are viewing this topic.

troystump

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Using CpmFetch to display and hide div blocks
« on: July 29, 2010, 03:38:09 am »

Hey all,

I am using CpmFetch 2.0.0 to draw images from my CPG 1.5.6 gallery. Simple enough... no problems there. I then proceeded to integrate enlargeit! to work with CpmFetch (using php code derived from others on this forum)... again, no problems there.
So now I have a pretty sweet restricted gallery set up, however, there is one thing I cannot tackle on my own - allow me to explain:

Say I want to grab all images from an album using cpmfetch? Say that the space provided on my website for viewing thumbnails allows 4 rows and 5 columns (20 thumbnails). If I have 60 images (60 thumbnails) in an album and I want the user to be able to traverse through them all (20 at a time) within the space provided, is it possible to generate div tables that hold 20 thumbnails each? If so, can "page numbers" then be generated as links that will display each div table, but only one at a time? Think of each "page number" link as a node to a container of 20 thumbnails. By default, the first node is displayed. When the user clicks on, for example, "page number" 2, the first node is hidden, and the second is displayed.

I hope this makes sense, and I will be happy to explain anything people have a question about. Also, here is the link to my website http://www.jeffstump.com that uses cpmfetch under the "fashion" navigation button. Also, here is the pho file i currently am using to run the integrated cpmfetch and enlargeit! (this is the file i assume would be the one that needs editing to make my above request):
Code: [Select]
<?php
// Gallery Coppermine script by P.J.Lawrence (October 2008)
// Using... 
// Enlargeit Script (http://enlargeit.timos-welt.de/english/index.php)
// CpmFetch http://cpmfetch.fistfullofcode.com/
//
// Notes..
// Ensure that the variable enl_gifpath in enlargeit.js  points to the correct directory

$CoppermineWebPath 'photoGallery/';  // Web path to Coppermine Gallery
$EnlargeitWebPath 'scripts/';       // Web path to Highslide java code
$cpmfetchPath 'photoGallery/cpmfetch/'// System Path to CPMFetch

if ($_GET['rows']) {
$Rows=$_GET['rows'];
}
else {
$Rows=4;
}
if ($_GET['cols']) {
$Cols=$_GET['cols'];
}
else {
$Cols 4;
}
if ($_GET['album']) {
$Album=$_GET['album'];
}

include  $cpmfetchPath."cpmfetch.php";
echo '<script type="text/javascript" src="',$EnlargeitWebPath,'enlargeit.js"></script>';

echo "<center>"
$objCpm = new cpm($cpmfetchPath."cpmfetch_config.php");
$option = array(
'linkstyle' =>'image" target="_blank" onclick="return false;',
'linktemplate'=> '{{pFilename}}" id="{{pFilename}}',
'imagestyle'  =>'thumbnail" onclick="enlarge(this);',
'alttag' => '{{pFilename}}" id="{{pPid}}" longdesc="'.$CoppermineWebPath.'albums/{{pFilepath}}{{pFilename}}');

if ($Album) {
$objCpm->cpm_viewLastAddedMediaFromAlbum($Rows,$Cols,$Album,$option);
}
else {
$objCpm->cpm_viewLastAddedMedia($Rows,$Cols,$option);
}
$objCpm->cpm_close(); 
echo '</center>';
?>

Thanks to all the wizards reading this!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Using CpmFetch to display and hide div blocks
« Reply #1 on: September 03, 2010, 04:22:03 pm »

I cannot answer that question but I think we should move it to the plugins board, as it's a plugin specific question?
Logged

troystump

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Using CpmFetch to display and hide div blocks
« Reply #2 on: September 04, 2010, 01:51:14 am »

I guess we could call this topic plugin specific. The reason for it being here was that I was wondering more of how to correctly write a php/java type of script that utilized the cpmfetch plugin. Anyhow, everything is working now for me and will mark this topic as solved. Sorry about not marking them.

Troy
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.