Can't get Lightbox to work with customized Matrix, Gallery 2

afterdark

Joined: 2008-09-10
Posts: 30
Posted: Mon, 2009-10-19 20:13
Quote:
Gallery version = 2.2.5 core 1.2.0.7
PHP version = 4.4.9 cgi-fcgi
Webserver = Apache
Database = mysqlt 4.1.20-max-log, lock.system=flock
Toolkits = NetPBM, Gd, ImageMagick, SquareThumb
Acceleration = none, none
Operating system = Linux web164.opentransfer.com 2.6.28.7 #16 SMP Thu Mar 5 06:17:30 CST 2009 i686
Default theme = afterdark
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
Rows in GalleryAccessMap table = 12
Rows in GalleryAccessSubscriberMap table = 113
Rows in GalleryUser table = 2
Rows in GalleryItem table = 111
Rows in GalleryAlbumItem table = 1
Rows in GalleryCacheMap table = 0

Theme: Customized Matrix embedded into my own page
Lightbox version 2.04

I'm trying to make my embedded gallery page work with lightbox. I'm following this tutorial but am hitting 2 problems.

1. When I add the stylesheet and js lines (point 8 on the tutorial) it totally screws my final page (big black square over top half of screen and a permanent empty lightbox box at the bottom). It's like the lightbox stylesheet and my own stylesheet are clashing. I tried including the lightbox stylesheet contents at the bottom of my own stylesheet but the same thing happened. I'm really in the dark on what I'm doing here. You can see the mess I've made here (it should be a 3x3 thumb grid!)
http://www.afterdarkmodels.com/gallery/gallery2Embedded.php :-/

2. Even with the above page-wrecking lightbox stylesheet in place, the actual functionality isn't working. When you click thumbnails it still loads the gallery HTML page of that image, not the lightbox version.

In the tutorial (point 10 and 11) the 2 lines of code it advises to replace seems a little out of date:

<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">

the code in my Matrix theme is:

{capture assign=linkUrl}{g->url arg1="view=core.ShowItem"
arg2="itemId=`$child.id`"}{/capture}

I changed it to:
{capture assign=linkUrl}{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}" rel="Lightbox[gallery]"}{/capture}

and for the second link:

{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}" rel="Lightbox[gallery]"}

But it didn't work. I've no idea if the syntax is right, I was just using my best guess.

Any help on this would be muchly appreciated.

Login or register to post comments
afterdark

Joined: 2008-09-10
Posts: 30
Posted: Thu, 2009-10-22 01:04

bump - anyone, please?
I'm kinda really stuck with this one. :(

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16315
Posted: Thu, 2009-10-22 03:19

Perhaps the tutorial was not written for your version:

Quote:
Gallery version = 2.2.5 core 1.2.0.7

Either way you should upgrade as there is security and other bug fixes sine then.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
afterdark

Joined: 2008-09-10
Posts: 30
Posted: Wed, 2009-11-04 10:54

OK, am about to brave an upgrade - just a bit puzzled on doing backups.

I've backed up the database via phpMyAdmin and have an sql file and a zip of the sql file.

Do I need to back anything else up - eg the photos and themes?
Is this just a case of downloading my 'gallery' folder from my webserver to my local drive via ftp?

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16315
Posted: Wed, 2009-11-04 14:22
Quote:
Do I need to back anything else up - eg the photos and themes?

Yes

Quote:
Is this just a case of downloading my 'gallery' folder from my webserver to my local drive via ftp?

That will work but might take some time. Don't forget the g2data folder and all the hidden files ( they start with a dot ).

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
afterdark

Joined: 2008-09-10
Posts: 30
Posted: Wed, 2009-11-04 15:40
floridave wrote:
That will work but might take some time

What would be a quicker way?

I'm on a Mac. If there's some line I can type into Terminal to zip the whole site up, I imagine that'd be better than downloading as OSX will just hide all the hidden files as soon as they hit my HD.

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16315
Posted: Thu, 2009-11-05 00:26

http://codex.gallery2.org/Gallery2:FAQ#How_do_I_backup_G2.3F
Yes if you have some utility to zip up the data it will go faster.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
afterdark

Joined: 2008-09-10
Posts: 30
Posted: Thu, 2009-11-05 16:08

Think I've got it all backed up - are there likely to be any other hidden files other than .htaccess I should check for?

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16315
Posted: Fri, 2009-11-06 04:14

Not that I can remember. Some people miss the versions.dat file int eh g2data direcotry.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
afterdark

Joined: 2008-09-10
Posts: 30
Posted: Thu, 2009-11-19 23:29

I've copied the unzipped gallery 2.3 onto my server ready to run the installer.

I'm currently using a custom theme (a duplicate of Carbon, renamed) in my gallery 2.2.5 version - should I copy that renamed theme folder over to the new 2.3 folder before running the installer?

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16315
Posted: Fri, 2009-11-20 01:10

If your DB on the old install was using a theme then the new location needs it as well.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
afterdark

Joined: 2008-09-10
Posts: 30
Posted: Sat, 2009-11-21 01:51

Ok, I'm at step 4 of the installation. It's saying to pick a g2data folder with a random string appended.

Do I point it to my old g2data folder which includes a random string (currently sitting in my original gallery directory, now called 'gallery_old'), or do I need to copy that g2data folder to the new 2.3 folder?

Or do I need to let it create a whole new g2data folder with a completely different string?

...oh, and regarding the modules installed, I additionally had things like watermark and imageframe installed with custom graphics - should I just copy those folders over to the new 2.3 modules folder, or do i need to reinstall them via the site admin?

Login or register to post comments