Using Gallery to Build a photo CD

joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Tue, 2003-03-04 10:41

I am doing a little personal project: building a CD of images as a birthday gift. Basically, I'll use gallery on my local apache to get it right, then use wget to make a static copy.

Hopefully there won't be too many changes - but I have already got a slideshow of every image in the gallery, and I will be adding music. And of course, removing any links that rely on interaction with PHP - like login.

Has anyone else done this? Any hints that you can share?

Would people like to see reports of my changes, so they can do this themselves?

Reply here, or PM me (click my name to send a private message)

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Tue, 2003-03-04 17:22

I have been interested in doing this too and noticed this <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpBB_14&amp;file=index&amp;action=viewtopic&amp;topic=136&amp;3302" TARGET="_blank">Generation of static site (e.g. for burning on a CD)</A><!-- BBCode End --> topic. There is a GalleryXML add on in the <!-- BBCode Start --><A HREF="http://gallery.sourceforge.net/wiki.php?page=Contributed%20Code" TARGET="_blank">Contributed Code</A><!-- BBCode End --> page. I haven't tried this yet and I think it may be because I don't care to have everyone elses albums on the CD.

Please do let me know how you make out with this! :wink:

 
pbyjp
pbyjp's picture

Joined: 2002-11-12
Posts: 260
Posted: Tue, 2003-03-04 18:17
Quote:
Here's a link to a CD Gallery creator.

http://www.nwalsh.com/hacks/gallery/</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->

Well, is it me or this link is deas, as well as the one in the customise Gallery FAQ...
any other link?
cheers,
p

 
dtdgoomba

Joined: 2002-11-04
Posts: 185
Posted: Tue, 2003-03-04 18:42

it wasn't dead, just the href included html like <blockquote> if you just cut and paste the text

http://www.nwalsh.com/hacks/gallery/

it works

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-03-06 03:43

Thanks for the help. I think I've got it!

I have my images in HTML, but it isn't nearly as flash as gallery, nor as good looking. What I wanted was something so I could configure the look, feel and layout in gallery, and then use wget or similar to make a static copy.

But wget is no good, as it doesn't understand javascript, so the slide show doesn't work. And the XML produced something a little less flashy and good looking than I had.

Back to the drawing board. Or at least sourceforge/freshmeat, where I found this miracle, <!-- BBCode Start --><A HREF="http://freshmeat.net/projects/httrack/" TARGET="_blank">httrack</A><!-- BBCode End -->. I've had to tweak the gallery source a little, but I can create a nearly fully featured dump of a gallery, that doesn't require PHP.

If you want to see a demo my work in progress visit <!-- BBCode Start --><A HREF="http://www.joanhenge.plus.com/gallery_cd" TARGET="_blank">http://www.joanhenge.plus.com/gallery_cd</A><!-- BBCode End -->. Be warned, that's a cd demo, with (a rather daggy) animated gif and music. If you have a slow connection or a low tolerance of pain, go straight to <!-- BBCode Start --><A HREF="http://www.joanhenge.plus.com/gallery_cd/albums.html" TARGET="_blank">http://www.joanhenge.plus.com/gallery_cd/albums.html</A><!-- BBCode End -->. Note this site doesn't even have php!

PS do you like my slideshow-of-entire-gallery?

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Thu, 2003-03-06 15:50

Very nice Joan! I was testing out your keyboard controlls and just about panicked :grin:

Good luck; Good job!

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-03-06 20:11

Thanks Warren.

Sorry to frighten you. :smile: That delete option is to help users voting for the best 3 images in an album. They can go through the slideshow multiple times, eliminating pictures each time until they have narrowed it down to three.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Mon, 2003-03-17 12:43

Turns out after encoding everything, that about 1/2 of it was already part of the 1.3.4 code. If you are a CVS user, you can get my patch with notes from here:
<!-- BBCode Start --><A HREF="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=704888&amp;group_id=7130&amp;atid=307130" TARGET="_blank">Offline browsing</A><!-- BBCode End -->
If you aren't, you can get a patched 1.3.4-cvs-b15 repository from <!-- BBCode Start --><A HREF="http://www.mcgalliard.org/content/gallery/gallery_offline_0.9.zip" TARGET="_blank">gallery_offline_0.9.zip</A><!-- BBCode End -->

for normal browsing, nothing should have changed, to download (using something like wget or httrack), you need to add set_offline=true to the URLS. Here's a couple of download examples to get you started.

Using httrack, including password:
httrack -%F "" -K0
"http://www.website.com/gallery/login.php?uname=admin&amp;gallerypassword=marigold&amp;submit=Login&amp;set_offline=true"
http://www.website.com/gallery/album04
http://www.website.com/albums

(all one line)
Using wget
wget -r -k --html-extension "http://www.website.com/gallery/album04?set_offline=true"

Notes from the source forge page

Quote:
This is basically a completion of Tilman's offline
browser.

Changes:
=======
popup() nearly entirely replaced with popup_link().
This means that only photo properties will popup in the
offline version.

Clicks are neither incremented or displayed in offlline
mode.

Offline version is now triggered by URL variable
(session var) rather than explicit test for browser.

Only links to previously visited pages are displayed in
breadcrumbs line. That means you can download only
albums/subalbums or just a slideshow if you want.

It works with httrack (found on sourceforge) which can
take multiple URLS, so you can do an offline copy of
non-public pages.

Notes:
=====
A download via httrack might look something like this:
httrack -%F "" -K0
"http://www.website.com/gallery/login.php?uname=admin&amp;gallerypassword=marigold&amp;submit=Login&amp;set_offline=true"
http://www.website.com/gallery/album04
http://www.website.com/albums

You have to give it the path of albums, because it
won't download separate directory trees. This means
you have to turn of directory listing of your album
tree - or it will browse the whole thing! So, put this
in .htaccess in the top of your album tree:
Options -indexes

The javascript is getting eccentric - but it works with
httrack, wget, mozilla and IE.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-03-23 12:26

Extra patch required to give correct URLs on albums where "fit_to_window" is "yes." I've updated the version on my site, and sourceforge, but if you've already installed it, you'll need to apply this patch.
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
*** ../../gallery/view_photo.php Sun Mar 23 12:03:25 2003
--- ./view_photo.php Sun Mar 23 12:07:09 2003
***************
*** 271,280 ****
img.width = imageWidth;
} else {
if (changed) {
! document.write('<a href="<?php echo makeAlbumUrl($gallery->session->albumName, $id, array("full" => 1))?>">');
}
! document.write('<img name=photo src="<?php echo $photoURL?>" border=0 width=' +
! imageWidth + ' height=' + imageHeight + '>');
if (changed) {
document.write('</a>');
}
--- 271,282 ----
img.width = imageWidth;
} else {
if (changed) {
! document.write('<a href="'+ document.getElementById("page_url").href+ '">');
}
! src= document.getElementById("photo_url").href;
! document.write('<img name=photo src="'+src +
! '" border=0 + width=' + imageWidth +
! ' height=' + imageHeight + '>');
if (changed) {
document.write('</a>');
}
***************
*** 319,324 ****
--- 321,330 ----
<?php

if (!$gallery->album->isMovie($id)) {
+ print "<a id="photo_url" href="$photoURL" ></a>
";
+ print '<a id="page_url" href="'.
+ makeAlbumUrl($gallery->session->albumName, $id,
+ array("full" => 1)).'"></a>'."
";
if ($gallery->user->canWriteToAlbum($gallery->album)) {
$adminCommands .= popup_link("[resize photo]",
"resize_photo.php?index=$index");

</TD></TR></TABLE><!-- BBCode End -->

 
pbyjp
pbyjp's picture

Joined: 2002-11-12
Posts: 260
Posted: Sun, 2003-03-23 14:45

I m looking for the Gallery2XML at http://www.nwalsh.com/hacks/gallery/
but the link is always dead for me here in Japan.
it s been like that for 1 month now, does anybody have the files and tutorials?
cheers
p

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-03-23 17:24
Quote:
I m looking for the Gallery2XML at http://www.nwalsh.com/hacks/gallery/
but the link is always dead for me here in Japan.
it s been like that for 1 month now, does anybody have the files and tutorials?
cheers

It's still there: so you should talk to your ISP about their DNS or proxy server.

Anyway, the best place to find copies of web pages is google. Paste the URL, hit return, and then click on the cache link provided. Viz:
<!-- BBCode Start --><A HREF="http://216.239.39.100/search?q=cache:b2OiEwcGpRgC:nwalsh.com/hacks/gallery/+&amp;hl=en&amp;ie=UTF-8" TARGET="_blank">http://216.239.39.100/search?q=cache:b2OiEwcGpRgC:nwalsh.com/hacks/gallery/+&amp;hl=en&amp;ie=UTF-8</A><!-- BBCode End -->
and
<!-- BBCode Start --><A HREF="http://216.239.39.100/search?q=cache:EE-KFy1mPlAC:nwalsh.com/hacks/gallery/gallery2xml+&amp;hl=en&amp;ie=UTF-8" TARGET="_blank">http://216.239.39.100/search?q=cache:EE-KFy1mPlAC:nwalsh.com/hacks/gallery/gallery2xml+&amp;hl=en&amp;ie=UTF-8</A><!-- BBCode End -->

You should be able to do the rest.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-04-18 16:10

Bump.

Actually, I'm bumping this so it can be seen - there's no questions. Someone's asking in another thread how to build a read only gallery. My PHP free gallery can be seen at
http://www.joanhenge.plus.com/gallery_cd/albums.html

 
Fratcourses

Joined: 2003-12-07
Posts: 4
Posted: Sat, 2003-12-20 03:55

I've read through much of the discussion about creating a static version of a Gallery for burning to a CD rom. However, I'm not sure that things have progressed or settled enough to let a newbie like me make this happen without serious grief.

Has there been more progress to this end? I'd love to be able to specify a particular album and have that made static for burning to a CD while keeping the same look and feel as my online galleries.

One complication: I have made some dandy modifications to the Gallery code to allow it to interact with a MySQL database. I realize that this interaction cannot take place from a CD on a standalone PC, but would the same tool that makes the Gallery static also be capable of parsing the database responses and making those static?

This is a really, really important feature for me as I'm hosting wedding galleries and I want part of my hosting offer to be a CD of their site as we take the gallery offline after 6 months (traffic for a specialty event like that dries up quick after the event itself.)

If anyone else has had some success with a tool to do this that won't require 6 weeks of intense studying and a kernel rebuild, I'd be very grateful to hear your stories :)

Thanks!

 
gothballoon
gothballoon's picture

Joined: 2003-02-17
Posts: 68
Posted: Wed, 2004-02-11 19:17

I just wanted to ask if any one has done something like this to the updated gallery 1.4.1 RC2