DMXzone Lightbox Support Product Page

This topic was archived

Dynamic Gallery from one Image

Asked 27 May 2009 07:21:42
1
has this question
27 May 2009 07:21:42 Robert Teachout posted:
Hi, I thought i could create a link from an icon (picture) that would open up the lightbox gallery from the database. but when i try to add a link using the Data radio button i can only get it to show the first image from the database inside the lightbox.... adding a repeat region to the Icon will not work like in the turtorial because im not using the thumbnails like in the demo. I would like a static image open the whole gallery.

Can this be done? I just need the light box to open the gallery with all the data from my recordset. Hope you can help.

Replies

Replied 27 May 2009 10:13:23
27 May 2009 10:13:23 Miroslav Zografski replied:
Hello Robert,

Can you pass here your tryout for that so I can give you some hints?

Regards,
Replied 27 May 2009 16:23:27
27 May 2009 16:23:27 Robert Teachout replied:
Thanks for the quick reply. here i have the home page with 3 icons at the bottom. Residential, Hospitality, and corporate. i have created 3 recordsets with filters for each.

If you click the "Residential" Icon it is pulling from the database but only shows the first entry from the database. what i need is for it to show all records in that recordset.

here is the link Here

www.niemanninteriors.com/index2.php
Replied 27 May 2009 18:10:00
27 May 2009 18:10:00 Miroslav Zografski replied:
Hello Robert,

Well, what you need is easily to be achieved.

Create a div and in that div place dynamical gallery as shown in Video Tutorial whit your filtered recordset, (you can place all 3 galleries in that div).
Then on the thumbnail that you want to open the gallery apply "Open DMXzone Lightbox" behavior from TAG INSPECTOR (DW CS4) or Behaviors (DW CS3).
Here you have to link to a Page or Image that will be shown only in the beginning of the slide show.
Next in UI of the Lihghtbox behavior in "Group" text box enter a name for the current gallery. It is not a title. It's just a flag that identifies that this link is from the specified group.
So create in same manner other two thumbs.
Now you have 3 dynamic galleries and 3 thumbs.
Open DMXZONE LIGHTBOX panel if you haven't already -> from Window text menu in DW select DMXzone Lightbox.
Here you will see your galleries under Standalone Folder. You need to create 3 groups here and assign to them your galleries. Name the groups as you did in Link Behavior UI.
To create a group select a gallery then in Group drop-down menu choose "Enter New Name" option. a small pop-up will appear for you to name the new group. After you click OK the group will be created and the gallery you have selected will be attached to it.
And finally apply to the Div in which you have created dynamic galleries style="visibility:hidden" parameter so it will be invisible on your page.

If any questions appear I'll be glad to answer.

P.S.
I'm posting you for a hit a sample code for one dynamic gallery with one thumbnail that starts it. :
<img_src="manual/Res.jpg" alt="" width="77" height="71" onclick="openDMXzoneLightbox('manual/<?php echo $row_rs_LightboxGall['image']; ?>', {group:'gallery'}, window);return document.MM_returnValue" /><div style="visibility:hidden">
  <p>
    <?php do { ?>
      <a href="manual/<?php echo $row_rs_LightboxGall['image']; ?>" title="<?php echo $row_rs_LightboxGall['title']; ?>" class="{group:'gallery'}" rel="dmxLightbox"> 
        
      <img_src="manual/thumbs/<?php echo $row_rs_LightboxGall['image']; ?>" /> 
        
      </a>
      <?php } while ($row_rs_LightboxGall = mysql_fetch_assoc($rs_LightboxGall)); ?>
  </p>
</div>

Replied 27 May 2009 20:12:18
27 May 2009 20:12:18 Robert Teachout replied:
Ok Great! i have it working now, Thank you!

Anyway to skip the first picture that is linked? what i wanted to do is show the latest record first but the way i linked it up its showing the first image twice. for example it will display 0 of 4, and 0 and 1 are the same. after i click through to the next one the 0 is no loger there. is there some paramater i can put in the url to show 1 of 3 instad of 0 of 4 whent the gallery loads?
Replied 28 May 2009 14:17:31
28 May 2009 14:17:31 Miroslav Zografski replied:
Hello Robert,

Well, I was aware of that doubling of images and I was thinking for a solution, workaround or something and i came up with following:

Create new empty page. No matter if it is php or html. Than apply to body tag of that page "Control DMXzone Lightbox" behavior - >Action: "Start Slideshow" and Act in:"parent.parent (use from pages within lightbox)".
When your page is ready (name it whatever you like) set up your thumbnail Lightbox behavior to point to that page as Link.
Check the result.

Here is a sample code for such page with default preset used for Lightbox :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function controlDMXzoneLightbox(cmd, args, context) {//v1.0
		context = context || window, args = args || [];
		if (context.DMX && context.DMX.Lightbox) {
			args.unshift(cmd);
			context.DMX.Lightbox.runCommand.apply(context.DMX.Lightbox, args);
		}
  }
//-->
</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #3F3F3F;
	color: #FFF;
	font-family: Tahoma, Geneva, sans-serif;
}
-->
</style></head>

<body onload="controlDMXzoneLightbox('startSlideshow', [], parent.parent)">&nbsp;Ready
</body>
</html>


Regards,
Replied 28 May 2009 15:42:30
28 May 2009 15:42:30 Robert Teachout replied:
Thanks, I will try this later today.
for now what i did is created a new recordset with a different sort order and used that for the link, but i think your solution will be better as it will keep the sort order.

Thanks again for the great support. this is a really usefull tool.

Reply to this topic