I've made an attempt to develop a Java script that uses the Enlargeit java script code, which enlarges thumb images in a similar way as Highslide or Lightbox.
This script seems to work ok however there is the problem with the duplication of data in the image tag.
My question is this...
.. in CpmFetch is it possible to assign different information to the image title and alt tag?
Since the $option 'alttag' seems to be used for both.
<?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 = '/cpg1418/'; // Web path to Coppermine Gallery
$EnlargeitWebPath = '/enlargeit/'; // Web path to Highslide java code
$cpmfetchPath = '/Coppermine-Live-Demo_1_5/htdocs/cpg1418/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,'Source/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' =>'set1" onclick="enlarge(this);',
'alttag' => '{{pFilename}}" id="{{pPid}}" longdesc="'.$CoppermineWebPath.'albums/{{pFilepath}}{{pFilename}}',
'tablestyle' => 'windowbg" width="150" bordercolor="#0099ff" border="5" height="150"',
'cellstyle' => 'windowbg windowbg_hover" valign="middle" align="center');
if ($Album) {
$objCpm->cpm_viewLastAddedMediaFromAlbum($Rows,$Cols,$Album,$option);
}
else {
$objCpm->cpm_viewLastAddedMedia($Rows,$Cols,$option);
}
$objCpm->cpm_close();
echo '</center>';
?>
Note I used the images and enlargeit.js from the Example_2_Easy_Nav_Buttons example which is provided with in the enlargeit_v100.zip download file.
This script displays the most recent images from either the gallery or a specific album.
Input parameters are album, rows and cols
i.e thiscript?Album=1&rows=3&cols=3