adding Lightbox to Gallery 1.6 - that sounds good right

taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Tue, 2012-03-20 01:02

Hello Got the latest Gallery 1.6, now I want to add lightbox to it. So when you click a thumb on the album are large image shows up and the photo page dont exist. PLEASE help me do this, be cause Gallery 2-3 is just not good if you want to rank on Bing, Google or yahoo.

Hre is what I got and I have no clue about this.

Download http://fancyapps.com/fancybox/#instructions
Adding this to Header in album

<!-- Add jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.0.5"></script>

<!-- Optionally add button and/or thumbnail helpers -->
<link rel="stylesheet" href="/fancybox/source/helpers/jquery.fancybox-buttons.css?v=2.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-buttons.js?v=2.0.5"></script>

<link rel="stylesheet" href="/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.5"></script>

So I now have a folder named fancybox in root and added this code above in my header on view.album, but as said I dont have a clue about jav or jquery, but I bet something is missing about the links, be cause it dont work yet, also not believed it would yet.

So please join so we can add this function to a still good gallery.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-03-20 01:37

do your gallery thumbnails have a class?
url to your gallery?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Tue, 2012-03-20 01:41

ex. http://www.desktopexchange.com/gallery/Animal-Wallpapers

<div class="g-photo" style="margin: 0 auto; width:150px; height:113px; border:2px solid white"><a href="http://www.desktopexchange.com/gallery/Animal-Wallpapers/Black_Panther_001" ><img src="http://www.desktopexchange.com/gallery/albums/Animal-Wallpapers/Black_Panther_001.thumb.jpg" width="150" height="113" border="0" alt="Black Panther" title="Black Panther" name="photo_j"></a></div>

</div>

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-03-20 01:52

so for jQuery it would be:

<script>
    jQuery('.g-photo').fancybox();
</script>

BUT the link on the thumb should point to the actual full size image and not a web page to view the image.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Tue, 2012-03-20 10:45

so the things I have in the header stays and where do I place your scripts and any idea where I can change from link to view page to the image jpg. thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-03-20 13:27
<!-- Add jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.0.5"></script>
<script>
jQuery(document).ready(function(){
    jQuery('.g-photo').fancybox();
});
</script>

this should all be added just before the </head>

Quote:
any idea where I can change from link to view page to the image jpg

No, sorry I haven't had a G1 setup for many years and I don't remember.
ask Jens

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Tue, 2012-03-20 17:37

I hope jens will have a look at this, it would be great for 1.6 users, which there is a lot of.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-03-20 18:19

it is possible to do it w/ jQuery try:

<!-- Add jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.0.5"></script>

<script>
    jQuery(document).ready(function(){
        jQuery('.g-photo a').attr({
            'href': function(){
                    var parts = jQuery(this).attr('href').split('gallery');
                    return parts[0]+'gallery/albums'+parts[1]+'.jpg';
                }
        });
        jQuery('.g-photo a').fancybox();
    });
</script>

this is not a perfect solution but can work in a pinch.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Tue, 2012-03-20 23:05

hmm nah that will not work, now I mostly see this with the eyes of a seo. We need the real deal, so lets see if someone here have a clue how we do this with the thumb links, so we can get this to work, but MANY thanks for the help until now.

JENS we need you here or other that have some knowledge of gallery 1.6

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-03-21 00:16
 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Wed, 2012-03-21 00:20

yes nothing, maybe hes having a 24 hour sleep ;)

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2012-03-21 07:46

And a timeshift. TSTSTS :-)

So whats so problem here? Does Gallery 1.6-RC3 not have lightbox included?
Did you try the Jallery 1.0-RC ?

Disco,

Jens
--
Gallery 4 Developer

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Wed, 2012-03-21 10:31

ohh hes back - Hello Jens - I dont know what that is, try to make a search on bing but still not sure what it is.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2012-03-21 21:02

I don't get it.

BING ?!?!

@Bharat, apologies for that guy :-)

Jens
--
Gallery 95b Developer

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Wed, 2012-03-21 22:49

Bing.com the competition to google search - still dont know what Jallery 1.0-RC is or if we should follow suprsidr and find the linking so the lightbox can work.

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Thu, 2012-03-22 12:26

anyone els want to join to see if we can get some lightbox to gallery 1.6

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-03-22 14:35

Jens is saying 1.6-RC3 has lytebox as an option.

Also he has branched G1 to Jallery since he is the only holdout G1 maintainer. http://gallery.menalto.com/last_official_G1_releases

Although I don't know why he mentions Jallery as it is apparently a no show.

And the reference to Bing is because Bharat and Andy work for Google.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Thu, 2012-03-22 15:17

ahh ok - he says there is a option in gallery 1.6 for lightbox,hmm i have not seen any, thanks for the info.

just noticed i have Gallery v1.5.5-pl1 I would upgrade but I have really made a lot of changes, but it must be possible to make it so i can get lightbox.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-03-22 15:35
 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Thu, 2012-03-22 16:42

no be cause the image has to open up like you see on a wordpress site nextgen plugin, your solution opens another "page" .jpg. hmm looks like I have to give up and move it all to wordpress.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-03-22 18:46

My solution replaces the wrong urls with the right ones before we "fancybox" them which worked just fine in my tests.

But if you feel like you should give up then You've only wasted my time.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
taskmaster1

Joined: 2011-01-26
Posts: 23
Posted: Thu, 2012-03-22 19:36

it was not waist of time, I have learned something, but there is not enough here that want to see a real solution for a lightbox, i just thought it would be a great idea for all that still have gallery1