• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

PHP Image Gallery with Images placed every other paragraph

Explorer ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

Currently I have multiple images that where uploaded to the details page of Post 1. Every other paragraph I have an image displayed. With say 5 images.

What I would like is that the user can click on the image and open up a gallery (on the same page, like Lightbox Gallery) and view through the other 4 images related to Post 1, as these images may not be full resolution on the details page.

If I understand correctly, Lightbox makes a small thumbnail preview of the images, which I don't want, and lists them like a Gallery (Next to each other). Can anyone direct me on the best way to accomplish this?

Thanks,
Riley

TOPICS
Server side applications

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

If I understand correctly, Lightbox makes a small thumbnail preview of the images,

Lightbox doesn't make the thumbnails. You do that yourself with your graphics editor.

I used Fancybox (a lightbox alternative) to create this dynamic photo gallery.

http://alt-web.com/GALLERY/GalleryTest.php

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

Sorry for the confusion, I didn't mean lightbox actually created the thumbnails, but it produces them similar to the link you provided which I don't want. My image uploader does create thumbnail images, but only one per new post.

My format is similar to this:

POST 1

Text Paragraph1 (Image1 )

Text Paragraph1 (               )

Text Paragraph1 (               )

Text Paragraph1 (               )

(Image2) Text Paragraph2

(               ) Text Paragraph2

(               ) Text Paragraph2

(               ) Text Paragraph2

..........................................................

Now what I would like is that they can click on the picture and it opens up the image at say 600px X 600px resolution, with the next/prev buttons so they can browse through only the picutres on this page.

I have been trying to find an example but seems that some take you to a different page of just the image you clicked on, or a new page with the gallery.

I like how the lightbox gallery opens up on the same page, that way you close out of it and can continue reading. But I want to be able to have the images placed in different positions on the page, and not in a row like with a Gallery.

I hope I help clarified what I am trying to do.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

Thumbnails can be any size you define them to be in your CSS code.

Give the pictures a "class" to invoke the Lightbox script.

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 08, 2012 Nov 08, 2012

Copy link to clipboard

Copied

I understand I can change the size of the thumbnails, and the thumbnails I am not worried about. It's the fact that all these images will be seperated and placed in somewhat random spots on the page. So instead of the default setting of lightbox, each picutre (where they are grouped next to each other) via ul/li. Each one will be its own. With the default settings its similar as below:

<Div id=gallery class=liGallery >

<ul>

     <li>

     <img....>

     </li>

</ul>

</div>

So you are saying to do the following if I want to have another picutre associated with the first one?

<Div class="liGallery" >

<ul>

     <li>

     <img....>

     </li>

</ul>

</div>

I figured this would be what to do, but it doesn't work. It just opens the picutre up on a new page, though the first picture opens up fine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 08, 2012 Nov 08, 2012

Copy link to clipboard

Copied

LATEST

With Fancybox (I no longer use lightbox BTW), you can group images so that they use the same viewer/slideshow:

<div class="fancybox">

<ul>

<li><a rel="group" href="big-image1.jpg"><img src="small-image1.jpg" alt="image 1"   /></a><li>

</ul>

<ul>

<li><a rel="group" href="big-image2.jpg"><img src="small-image2.jpg" alt="image 1"   /></a></li>

</ul>

</div>

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines