CSS Image Gallery Support Product Page

This topic was archived

php mysql

Shared 16 Aug 2007 15:47:17
1
likes this idea
16 Aug 2007 15:47:17 Owen Smart posted:
at first glance this looks great... what I would like to know is can this be dynamically run using php mysql, so that clients can add their own images without me in the middle?
with so many dmxzone products focusing on the ability to post from a cms and allowing joe average to add their own stuff, that would only make sense to me. i've already purchased image upload, smart processor etc... what are the chances of this function coming soon for this css album???

Replies

Replied 16 Aug 2007 15:54:42
16 Aug 2007 15:54:42 Bruce Naples replied:
Yes and not just MySQL - I would luv to use this (or maybe the upcoming 3D Flow Gallery) if I could present data from a database along with the images. Is there a database-driven "gallery" in our future?
Replied 23 Aug 2007 11:05:08
23 Aug 2007 11:05:08 Julian Byrne replied:
Does this use XML? If so we can rewrite the code to select images from the database. If not, how can we use images in a database?
It would be good that all future similar products include database interactivity. We have had to rewrite the xml on the active slideshow to use the database, its easy, but would be best to come with this functionality already built in.
Replied 24 Aug 2007 11:47:03
24 Aug 2007 11:47:03 Georgi Kralev replied:
Hi all,

CSS Image Gallery does not use Xml file. If use two unordered lists (ul and li tags) for defining the Images and the Thumbnails of the gallery.
CSS Image Gallery code could be easily modified to get the image names from database.

For example the code of the modified CSS Image Gallery could look like this:

<?php
// Check if there are any rows
if(mysql_num_rows($rsImages)){
?>
<div class="dmxGallery" id="cssGallery1">
<ul>
<?php do {
// Set the images names
?>
<li><img src="Images/<?php echo $row_rsImages['image']; ?>" width="450" height="299" class="image" alt="" /></li>
<?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?></ul>
</div>
<div class="dmxThumbList" id="cssGallery1_thumb">
<ul>
<?php
//Move to the first record
mysql_data_seek($rsImages, 0);
//Get the first row
$row_rsImages = mysql_fetch_assoc($rsImages);
do {
//Set the thumbnail names
?>
<li><img src="Images/thumbs/<?php echo $row_rsImages['image']; ?>" width="150" height="100" alt="" /></li>
<?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?>
</ul>
</div>
<?php } ?>
<script type="text/javascript">
// <![CDATA[
$(document).ready(
function()
{
$("#cssGallery1".dmxGallery(
{
width: 555,
height: 299,
thumbWidth: 95,
thumbHeight: 80,
thumbPadding: 5,
thumbHolderHeight: 80,
thumbHolderPosition: 'right',
thumbShowOnHover: false,
captionPosition: 'top',
playerDelay: 3,
autoPlay: false,
autosize: true,
captionOpacity: 40,
imgIndex: 0,
preloadTreshold: 2,
currentImage: 0
}
);
}
);
// ]]>
</script>

I hope that you will find it useful.

Regards,

Georgi Kralev

----------------------------------
Support - www.DMXzone.com

Reply to this topic