singapore: the smallest big galery
home » forum » Feature Requests » Lightbox

You are not logged in.

#1 2006-03-30 22:35:44

hola
Member

Lightbox

I think a lightbox feature would be a great addition to Singapore. Singapore could be great for a stock image site.

Offline

 

#2 2006-03-31 14:07:00

tamlyn
Lead Developer

Re: Lightbox

Yes indeed. I'm sure it will happen eventually but for now I think there are more important issues. To be honest it shouldn't be that hard to implement yourself. Just store the selected images in the session and display the whole thing through a separate file (e.g. lightbox.php) that includes the singapore class and uses it to manipulate the data. Well, 'not that hard' is relative of course wink

Offline

 

#3 2006-06-15 00:13:43

cyrus007
Member

Re: Lightbox

I have implemented lightbox ver 2, not quite the way tamlyn suggested but here it is ... http://hindi.bizland.com/newdcc/gallery/2006_index.php

Just added the javascript and css files to the header.tpl.php and modified album.tpl.php to send the rel="lightbox" attribute.
Need to do some more cleanup to the album page.

Offline

 

#4 2006-06-18 16:38:19

serge
Member

Re: Lightbox

Newbie question here: where exactly in album.tpl did you add the rel=lighbox reference? Thank you.

Serge

Offline

 

#5 2006-08-21 21:55:08

cyrus007
Member

Re: Lightbox

Sorry, haven't been here for some time now.

serge wrote:

Newbie question here: where exactly in album.tpl did you add the rel=lighbox reference? Thank you.

Serge

This is how my anchors look:

<a href="<?php echo $sg->gallery->images[$index]->imageURL(); ?>" rel="lightbox[month]" title="<?php echo $sg->gallery->images[$index]->desc ?>"><?php echo $sg->gallery->images[$index]->thumbnailHTML(); ?></a>

I have switched to litebox-1.0 which is much faster and no need to change the code, just the js files. The new results are at http://www.dallascameraclub.org/gallery/2006_index.php
For some time I had problem with cropping, now it has been straightened out by using "thumb_crop_album = on".

-cyrus

Offline

 

#6 2006-10-24 11:16:55

didgeX
Member

Re: Lightbox

Hi cyrus, I also tried to implement Litebox 1.0 but till now without success. I use the Modern v1.3 template.
album.tpl.php looks like this :

    <h2><?php echo $sg->gallery->name(); ?></h2>
    <h4><?php echo $sg->gallery->byArtistText(); ?></h4>
</div>
<div id="sgMain-nav">
</div>
<div id="sgContent">
    <p class="sgTab"><?php echo $sg->galleryTab(); ?></p>
    <div class="sgAlbum">
        <?php for($index = $sg->gallery->startat; $index < $sg->gallery->imageCountSelected()+$sg->gallery->startat; $index++): ?>
              <?php echo $sg->gallery->images[$index]->thumbnailLink(); ?>
        <?php endfor; ?>
        <div class="sgFoot"></div>
    </div>
    <p class="sgTab"><?php echo $sg->galleryTab(); ?></p>
    <div class="sgDetailsList">
        <dl>
            <?php foreach($sg->gallery->detailsArray() as $key => $value): ?>
                <dt><?php echo $key; ?>:</dt><dd><?php echo $value; ?></dd>
            <?php endforeach; ?>
        </dl>
    </div>
</div>

I can't figure out where exactly to place the rel="lightbox" reference.
Thanks a lot for any help on this.

Last edited by didgeX (2006-10-24 11:19:07)

Offline

 

#7 2006-11-29 20:44:58

ho.pe
Member

Re: Lightbox

Hallo singapore & lightbox-fans!

I added lightbox2 functionality to my singapore-gallery and modified the modern template.

I added following function to the includes/image.class.php:

Code:

function thumbnailLightboxLink($class = "sgThumbnailAlbum", $type = "album") {
return '<a href="'.$this->imageURL().'" rel="lightbox[1]" title="'.$this->name().'">'.$this->thumbnailHTML($class, $type).'</a>';
}

Links:
Modified template: http://www.hoeflehner.net/upload/modern.zip
In action: http://www.hoeflehner.net/wp-content/plugins/singapore

Unfortunately you have to display the preview of all images to use the previous and next functionality of the lightbox-script for all the images in the gallery.

Maybe the lightbox-function could be added to the image.class.php by default. wink

Offline

 

#8 2006-11-29 21:10:08

Paul
Member

Re: Lightbox

That's good...!

Offline

 

#9 2006-11-29 22:51:09

rossh
Developer

Re: Lightbox

Lookin' hot...

The original feature request here was for a lightbox (as in shopping cart) functionality.

Lightbox as a UI/JS thing is intended in official modern soon smile

Offline

 

#10 2006-12-06 18:40:29

forty two
Member

Re: Lightbox

I think a light box feature would be great.  Considering most lightbox software generally costs in and around the $500 mark.  Will look into this maybe as a mod...

Offline

 

#11 2006-12-07 14:27:32

pavian
Moderator

Re: Lightbox

hmm hmm.. as an addition for development I'd suggest this:
besides the lightbox.php also create a folder below the data-folder, e.g. singapore/data/lightboxes/

to store the sessions of the single users. If you store a cookie in the browser with a unique id, lets say "34745" you could have a "34745.csv" file holding the data in singapore/data/lightboxes/

The main problem is that you can't change your directory structure after that - at least not through ftp

Offline

 

#12 2006-12-07 15:21:06

forty two
Member

Re: Lightbox

I was thinking going the database way at first, but then i realized the beauty of this gallery is you don't need a database to use it.  so then  i'm thinking if your setup was used but perhaps in addition to the cookie we have that specific user needing to at least have some registration with the gallery we can store that users info in the 34745.csv make sure it's writable for any updates, that way any of the DB users would be able to store the info as well.

As for the directory structure i'm not one to change things through the ftp, i always break it when i do that.  but inside maybe the lightbox.php script another script could be written to check the current gallery csv/db setup compare it to all the 34745.csv's and make the provided changes similar to how project management systems like subversion, basecamp etc. update changes.

Offline

 

#13 2006-12-07 15:24:02

pavian
Moderator

Re: Lightbox

hmm... sounds like a plan :-) I understand that going the database-way is probably better. In case you have more than like 42 users your server would probably die otherwise.

Offline

 

#14 2006-12-08 20:25:22

forty two
Member

Re: Lightbox

You could also make the lightbox csv files temporary, thus cleaning out the singapore/data/lightboxes folder.  it might also make more sense, at least in my mind... to create the structure like so:

singapore/data/lightbox/ (csv repository)
singapore/includes/lightbox.class.php (lightbox builder)
and perhaps a
singapore/tools/lightbox.php (some tools to clean and store the singapore/data/lightbox/ folder)

This way it may easier integrate.  Correct me if i'm wrong.

Last edited by forty two (2006-12-08 20:25:44)

Offline

 

#15 2006-12-08 21:37:05

pavian
Moderator

Re: Lightbox

Yes that would be perfect smile

Offline