Hello all !
I have set up a small code (below) to extract the last three albums informations from a category. It shows in a three cells table the thumbnail picture (this is the problem), a link from the picture to the relevant album, number of pictures in the album, and the description of the album. This works fine (nearly, see below) !
I know i can achieve a better code but this works fine, and will do it later ... This can be seen at
www.florennes-as.be In Copperimne you can select the thumb of an album (amongst all thumb's album, in album/properties) which will represent the album in albums lists. I select the best shot thumb, of course ...
When the call to cpm_viewLastUpdatedAlbumsFrom is done, cpm does not get the selected album's thumb (under copperimne's album properties) but the last thumb of the album. I would like to have the selected thumb instead of the last one ...
This little detail is important for us, and i guess for some other people ...
Have i missed something ?
Any clues very much appreciated ! ;-)
All my thanks for people behind cpmfetch !!!
L@urent
<?php
include "./engine/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./engine/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_setReturnType ("resultset");
$table = $objCpm->cpm_viewLastUpdatedAlbumsFrom("cat=2",3,1,$options);
?>
<body>
<table width="380" border="0">
<tr>
<TD>
<div align="center"><img src="/toolbox/welcome/lastthreeflorennes.png" width="272" height="20"></p>
</tr>
</TD>
<table width="380" border="0">
<tr>
<? $lien = "http://www.florennes-as.be/engine/thumbnails.php?album=" . $table[0][aAid] ; ?>
<td colspan="2"><div align="center"><? echo "<a href=\" ". $lien . "\" target=\"_blank\">" . $table[0]["aTitle"] . "<a><br>" ; ?></td>
</tr>
<tr>
<td width="202" height="135"><? echo "<a href=\" ". $lien . "\" target=\"_blank\">" . "<img src=\" " . "engine/" . $table[0]["fullPathToThumb"] . "\" /></a>" ; ?></td>
<td><? $numb = $objCpm->cpm_getMediaCountForAlbum($table[0][aAid]) ; ?>
<? echo "Picture Number : " . $numb ; ?>
<br />
<br />
<? echo $table[0]["aDescription"] ; ?></td>
</tr>
<tr>
<? $lien = "http://www.florennes-as.be/engine/thumbnails.php?album=" . $table[1][aAid] ; ?>
<td colspan="2"><div align="center"><? echo "<a href=\" ". $lien . "\" target=\"_blank\">" . $table[1]["aTitle"] . "<a><br>" ; ?></td>
</tr>
<tr>
<td width="202" height="135"><? echo "<a href=\" ". $lien . "\" target=\"_blank\">" . "<img src=\" " . "engine/" . $table[1]["fullPathToThumb"] . "\" /></a>" ; ?></td>
<td><? $numb = $objCpm->cpm_getMediaCountForAlbum($table[1][aAid]) ; ?>
<? echo "Picture Number : " . $numb ; ?>
<br />
<br />
<? echo $table[1]["aDescription"] ; ?></td>
</tr>
<tr>
<? $lien = "http://www.florennes-as.be/engine/thumbnails.php?album=" . $table[2][aAid] ; ?>
<td colspan="2"><div align="center"><? echo "<a href=\" ". $lien . "\" target=\"_blank\">" . $table[2]["aTitle"] . "<a><br>" ; ?></td>
</tr>
<tr>
<td width="202" height="135"><? echo "<a href=\" ". $lien . "\" target=\"_blank\">" . "<img src=\" " . "engine/" . $table[2]["fullPathToThumb"] . "\" /></a>" ; ?></td>
<td><? $numb = $objCpm->cpm_getMediaCountForAlbum($table[2][aAid]) ; ?>
<? echo "Picture Number : " . $numb ; ?>
<br />
<br />
<? echo $table[2]["aDescription"] ; ?></td>
</tr>
</table>
<?php
$objCpm->cpm_close();
?>
</body>