Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Lightbox Auto Gallery

Featured Replies

I may be being a bit thick here :huh: (almost probably!) ....

 

I'm sure I've seen a PHP/Javascript gizmo out there that combines the 'Lightbox' javascript utility with the auto generating PHP Gallery - where you upload pics into a folder which generates a gallery, but displays them with the lightbox effect ?

 

... Can I find it now ?!? no !! :D

 

Anyone help ?

  • Author
I may be being a bit thick here :huh: (almost probably!) ....

 

I'm sure I've seen a PHP/Javascript gizmo out there that combines the 'Lightbox' javascript utility with the auto generating PHP Gallery - where you upload pics into a folder which generates a gallery, but displays them with the lightbox effect ?

 

... Can I find it now ?!? no !! :D

 

Anyone help ?

 

 

 

Found it now ....

 

Its availble at http://www.synapsesinc.com/lightbox/

 

A nice script that will allow you to automatically generate a gallery from a defined folder, and display those images using the lightbox script.

Oh my god, if only I saw that 4 days ago and hadn't wasted so much time LOL. Oh well, thanks, will no doubt help in the future :p

One2Web thanks for that link - a really useful piece of code :)

 

I do a website for a car club and I have numerous pictures to post after every meet - using the lightbox, I have to ...

  1. resize each photo
  2. create a thumbnail for each photo
  3. edit each line in the page for each photo

 

I usually post about 20 photos/meet, but it can be upto 100 for a large meet.

 

Now it will be a just a case of resizing the photo - as they say "Jobs a good'un :)

Well my initial enthusiasm has been curbed - yes it does the job but ...

 

try validating it (http://www.synapsesinc.com/lightbox/) using the W3CW3C Markup Validation Service - 194 errors :o

 

This is mainly due to it outputting "&"s in the echo statement

 

echo "<td><a href='". $imgdir ."". $file ."' rel='lightbox[gallery]'><img border='0' src='imgsize.php?w=". $w ."&h=". $h ."&img=". $imgdir ."". $file ."' /></a><td>";

 

Also note there is no closing tag for the table cell <td> (I wondered why I kept getting blank cells)

 

$file ."' /></a><td>";  should be 
$file ."' /></a></td>";

 

A wee rethink is needed ;)

 

Will have a look at this one tomorrow - http://sourceforge.net/projects/phpslightbox/

I'll look forward to your findings One2Web :D

This is the original code ..

 

echo "<td><a href='". $imgdir ."". $file ."' rel='lightbox[gallery]'><img border='0' src='imgsize.php?w=". $w ."&h=". $h ."&img=". $imgdir ."". $file ."' /></a><td>";

 

and the modified code is ...

 

echo "<td><a href='". $imgdir ."". $file ."' rel='lightbox[gallery]'><img alt='" . $file . "' border='0' src='imgsize.php?w=". $w ."&h=". $h ."&img=". $imgdir ."". $file ."' /></a><td>";

 

Basically changed the & to the special character & and added an alt description (in this case the filename)

 

On the page I created, with these changes, it validated Transitional

 

HTH

Hey NeRo,

 

Simple use, Drupal :) and create gallery.. it cans automaticly crop and resize one huge image into 3 small presets ;) best solution for your problem :) and it is simle to implement to your website :) ofcourse you will need to use "views" plugin

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.