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)
Posts: 794
I have been interested in doing this too and noticed this <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=136&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:
Posts: 260
Posts: 185
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
Posts: 3473
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?
Posts: 794
Very nice Joan! I was testing out your keyboard controlls and just about panicked :grin:
Good luck; Good job!
Posts: 3473
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.
Posts: 3473
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&aid=704888&group_id=7130&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&gallerypassword=marigold&submit=Login&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
Posts: 3473
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 -->
Posts: 260
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
Posts: 3473
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/+&hl=en&ie=UTF-8" TARGET="_blank">http://216.239.39.100/search?q=cache:b2OiEwcGpRgC:nwalsh.com/hacks/gallery/+&hl=en&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+&hl=en&ie=UTF-8" TARGET="_blank">http://216.239.39.100/search?q=cache:EE-KFy1mPlAC:nwalsh.com/hacks/gallery/gallery2xml+&hl=en&ie=UTF-8</A><!-- BBCode End -->
You should be able to do the rest.
Posts: 3473
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
Posts: 4
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!
Posts: 68
I just wanted to ask if any one has done something like this to the updated gallery 1.4.1 RC2