I have a problem with the supersized jquery plugin, i was looking around about similar questions in this forum, i found an answer and try to adapt it to my issue, but is doesn't work, because i am a kind of new in php, so maybe someone could help me to adjust my function.
I am working on a dynamic website, I don't know neither the number, nor the title of the images.
I have several functions to call them that works but i don't manage to regroup them into a function that i could insert into the supersized! plugin
Here are my different elements : this would always be the same configuration :
First single image :
<img src='/cspdocs/exhibition/images/<?php echo $expo['pic'];?>'/>
for the others i need to use a loop foreach
second group of images :
<?php foreach (getExpoViews($id_expo) AS $id_view) { ?>
<img src='/cspdocs/exhibition/images/<?php echo getExpoViewImage($id_view)?>' title : '<?php echo $expo['name']'?> />
<?php }; ?>
third goup of images :
<?php foreach (getExpoArtworks($id_expo) AS $id_artwork) {?>
<img src="/cspdocs/artwork/images/<?php echo getArtworkThumbnail($id_artwork); ?>" title="<?php echo getArtistFullName(getArtworkArtist($id_artwork));?>" />
<?php }; ?>
I don't know how to regroup them, I start something like that for the second group of images but it doesn't work :
<?php
function getAllExpoView($path) {
if (getExpoViews($id_expo)!='') {
foreach (getExpoViews($id_expo) AS $id_view) {
$images= "{image : '/cspdocs/exhibition/images/'".getExpoViewImage($id_view)."', title : '".$expo['name']."', thumb :'/cspdocs/exhibition/images/'".getExpoViewImage($id_view)."',url : ''},";
};
return $images ;
};
};
?>
the goal is to replace the path here, the first image is ok, it is for my second and third groups :
jQuery(function($){
$.supersized({
slides : [ // Slideshow Images
{image : '/cspdocs/exhibition/images/<?php echo $expo['pic'];?>', title : '<?php echo $expo['name']; ?>', thumb : '/cspdocs/exhibition/images/<?php echo $expo['pic'];?>', url : '<?php echo $link;?>'},
{image : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.2/slides/kazvan-2.jpg', title : 'Image Credit: Maria Kazvan', thumb : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.2/thumbs/kazvan-2.jpg', url : '<?php echo $link;?>'}
]
});
});
here the link to the pre-prod website: