Joachim (or whoever wants to help) -
I'm real close here with this hack. It's going to be nice as there's really no limit as to what it's going to be able to do (pretty customizable). I'm stuck implementing an 'if' statement for this particular setup. I've manged to convert this code to render xml and in turn my flash file reads it.
Again, this
particular setup takes the last 10 uploaded images and renders in a/the slideshow. I've also managed to grab the titles and am captioning on the show. Anyway, as you said, sometimes the normal_ prefix is not added (I understand) - How can I make sure that all images have this normal_ prefix? I have it commented where I though it would work, but can't get it.
<?
define('IN_COPPERMINE', true);
require('include/init.inc.php');
$xml .= '<?xml version="1.0" encoding="UTF-8" ?>';
$xml .= '<slideshow><settings><image_folder></image_folder><time>3</time><fade>1</fade><repeat>true</repeat><captions>true</captions></settings><images>';
$result = mysql_query("SELECT a.pid, a.aid, a.filename, a.filepath, a.title, a.caption, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid order by a.aid, a.pid desc LIMIT 10");
global $xml;
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);
$p_aid = -1 ;
while ($row = mysql_fetch_array($result))
{
if ($row[aid] != $p_aid) {
// if ($CONFIG('normal_pfx')) --- Something along this line.
}
$xml .= "<image><file>$CONFIG[fullpath]$row[filepath]$CONFIG[normal_pfx]$row[filename]</file><caption><![CDATA[$row[title]]]></caption></image>";
$p_aid = $row[aid] ;
}
$xml .= '</images></slideshow>';
echo $xml;
?>
...or if you know a better way to handle it and several other situations (say we wanted to pull out the full size images, etc...). Thanks.