Customizing Gallery 2

Written by: | Posted on:

In a response to an ongoing discussion at Binary Bonsai, I decided to implement Gallery 2 for Kubrick. Estimated time: 30 minutes. This is not Vanilla Kubrick, this is my bastardized version, I just copy-pasted most of the plain HTML and made sure all the CSS was in the CSS file. Reason being, { and } are "smart tags" in Gallery 2. Ok, so let's go.

First of all, Gallery 2 CVS as of today. Get it.

Now, if people would like me to post my modified files, do leave a comment (can't be bothered if no-one cares ;-) ) And, unless other licenses forbid it (i.e, GPL kicks in), all files will be under the standard two-clause BSD license.

Ok, here we go: Copy templates/global.tpl to templates/global.tpl.local and edit the local-file. I ripped out all except for {include file="gallery:`$main.viewHeadFile`" l10Domain=$main.viewL10Domain} and {include file="gallery:`$main.viewBodyFile`" l10Domain=$main.viewL10Domain}. You can view variables with a tag like this: {$main.viewBodyFile }.

Next file up, layouts/matrix/templates/albumBody.tpl that again is copied to albumBody.tpl.local and after you've edited that one you may want to edit singleBody.tpl for the full-size pictures, sidebar.tpl for options and pathbar.tpl for the breadcrums. Not too much of a hassle, really. I think Gallery 2 is coming somewhere. :) But then again, I would love to see this streamlined into one file as with WordPress. Oh well, I've got in half an hour a Kubrick-like Gallery 2 implementation. Now for the tweaking.... (you see from the heading how bad I am with colours and layout ;-) )

Image Image

Father, husband, software developer, musician and photographer.


Get to know what I'm up to

© 2020 Niklas Saers Contact Me