Using image gallery effects elsewhere?

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
7/26/2010 10:25:02 AM
Gravatar
Total Posts 116

Using image gallery effects elsewhere?

I was looking at the image gallery options today and wondered whether it were possible to use the image gallery effects on standalone images within html modules?  i.e. have a smaller version of the image within the html content with a link on it to open a lightbox style larger version of the image that overlays the page?

Also if using the std (not compact) version of the image gallery I don't think the descriptions are shown - is it possible to alter this behaviour as you can in lightbox so that the description appears beneath each image?

Thanks

Andrew

7/26/2010 10:49:48 AM
Gravatar
Total Posts 2253

Re: Using image gallery effects elsewhere?

Hi Andy,

To do this, insert the thumbnail image in your HTML content, wrap it in a link to the full size image and then add the REL property set to GB_Image[] as shown below.

<a href="/Data/Sites/1/media/FullSizeImages/sunset.jpg" rel="gb_image[]"><img alt="" src="/Data/Sites/1/media/Thumbnails/sunset.jpg" style="width: 100px; height: 75px;" /></a>

HTH,
Joe D.

7/26/2010 10:57:59 AM
Gravatar
Total Posts 116

Re: Using image gallery effects elsewhere?

Thanks Joe, that's brilliant smiley

Is there any (relatively easy) way to add the description information to the bottom of the larger image?

Regards

Andrew

7/26/2010 11:44:43 AM
Gravatar
Total Posts 2253

Re: Using image gallery effects elsewhere?

Hi Andy,

You can set the title property of the link to whatever you want for the caption. The caption will be above the image. You can take a look at http://orangoo.com/labs/greybox/normal_usage.html for more information on GreyBox.

<a href="/Data/Sites/1/media/FullSizeImages/sunset.jpg" rel="gb_image[]" title="Sunset"><img alt="" src="/Data/Sites/1/media/Thumbnails/sunset.jpg" style="width: 100px; height: 75px;" /></a>

HTH,
Joe

7/27/2010 2:24:44 AM
Gravatar
Total Posts 116

Re: Using image gallery effects elsewhere?

Hi Joe,

Thanks for the link and the example code, that should work fine.

What I was ideally after was the lightbox type effect as shown here http://www.huddletogether.com/projects/lightbox2/#example in any of the example images with the captions at the bottom but I can work with the greybox options fine, especially with the extra examples provided via the link you gave me.

Thanks for your help.

Regards

Andrew

Hey Joe, where has the link gone to 'buy Joe a cup of Joe'??

7/27/2010 11:55:46 AM
Gravatar
Total Posts 2253

Re: Using image gallery effects elsewhere?

Hi Andy,

You can use lightbox if you prefer it over greybox. They both will work alongside of each other. Just follow the instructions on this page: http://www.huddletogether.com/projects/lightbox2/#how.

You will want to upload the javascript files to /ClientScript and then include the javascript links in your layout.master after the <asp:ScriptManager control. Notice, you do not need the Prototype.js reference because that is already included in mojoPortal. Something like this:

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
<script type="text/javascript" src="/ClientScript/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="/ClientScript/lightbox.js"></script>

At this point, you need to add the CSS for lightbox to your site. Do this by:

  1. Create a new directory at \data\style\lightbox
  2. Create another new directory at \data\style\lightbox\images
  3. Upload the lightbox images to \data\style\lightbox\images
  4. Edit the lightbox.css file and replace all of the instances of ../images/ with images/
  5. Upload the modified lightbox.css file to \data\style\lightbox
  6. Add the following to the style.config file located in your skin directory
    <file cssvpath="/Data/style/LightBox/lightbox.css" imagebasevpath="/Data/style/lightbox/">none</file>

Now, all you need to do is reference lightbox in your image:

<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>


HTH,
Joe D.

P.S. I removed the "buy Joe a cup of Joe" link because the signature field has a character limit and I wanted to include the Community Manager badge. If you are interested in buying me a cup of joe, you can visit my site here: http://josephmdavis.com/buyjoecoffee-product.aspx

7/27/2010 4:46:30 PM
Gravatar
Total Posts 116

Re: Using image gallery effects elsewhere?

Thanks for the extremely detailed and helpful reply Joe smiley

I am working on completing my first mojo site (as is probably obvious by some of my questions! lol) and the more I use it the more I like it and the better it seems to get!  Its an amazingly comprehensive application and very adaptable....... as a newbie it is so helpful (and often essential!) to get help from experienced users in order to get going in the right direction and it is much appreciated.

Regards

Andrew

 

7/27/2010 9:03:43 PM
Gravatar
Total Posts 2253

Re: Using image gallery effects elsewhere?

Thank you for the coffee! I am anxious to see your completed site!

-Joe D.

7/28/2010 3:46:24 PM
Gravatar
Total Posts 2253

Re: Using image gallery effects elsewhere?

Hey Andrew,

I tried implementing LightBox with my site and ran into issues because it requires Prototype.js which I stated is included in mojoPortal. It is included in the release files but it is not used and can't be used with jQuery without some adjustments to jQuery.

I remembered using LightBox on a site a while back and I went searching for it. Indeed, I had used jQuery LightBox which is derived from the LightBox you mentioned. I can't, however, share that site URL due to an NDA.

I decided to write a blog post on GreyBox and LightBox usage within mojoPortal. Check it out: http://i7media.net/using-greybox-and-lightbox-with-mojoportal.

Thanks and sorry for mis-leading you on the use of the original LightBox script.

-Joe D.

7/29/2010 2:39:05 AM
Gravatar
Total Posts 116

Re: Using image gallery effects elsewhere?

Great tutorial Joe, thanks for that. I have been getting to grips with jquery recently and will need to get things working within mojoportal soon. Whilst most of it will already be built in (I think) this will be great to use as a template for any bits that aren't.

Hope this gets added to the community tutorials as its a great guide for jquery/mojoportal newbies like me! smiley

Regards

Andrew

6/16/2011 5:42:10 AM
Gravatar
Total Posts 51

Re: Using image gallery effects elsewhere?

Hi Joe & Joe,

Greybox's usage with rel="gb_image[]" is very convenient. Is there any similar method for colorbox?

Thanks,

Erhan

You must sign in to post in the forums. This thread is closed to new posts.