Offline mode broken in 1.4-pl1?

bwm

Joined: 2003-09-14
Posts: 2
Posted: Sun, 2003-09-14 18:17

I'm trying to snapshop my gallery to upload a static version into a website as described in:

http://gallery.menalto.com/modules.php?op=modload&name=GalleryDocs&file=index&page=gallery1-admin.offline.php

I was having trouble with '?''s in some of the URL's in the previous version, and installed the latest before posting to this forum.

Now offline mode seems to be broken. I'm using the command

wget -r -k --html-extension 'http://gateway.topmeadow.net/gallery/?set_offline=true'

Now the pages are coming back with URLs hardcoded to the gallery server instead of being made relative as happened previously. Its like the "?set_offline=true" was being ignored.

Can anyone confirm this behaviour?

The original problem I had was as follows (since I'm here):

I was taking an offline copy as above. Some of the files and URL's created contain a '?', specifically slideshow files and second and subsequent pages in a gallery. When these files are uploaded to a webserver as static pages, my ISP's webserver interpret the "?"'s in the URL's as the start of a query string, not as part of the filename in which to find the page. The result is that only the first page in an album works and slideshows don't work. They worked fine when accessed directly off the filesystem on my local machine though.

I think that the '?' characters in these urls and file names need to be escaped or translated to something else, e.g. '_'.

PHP diag output attached

bwm

ps: you probably get told this a lot, at least I hope you do. Thanks for software. I like it. Since I do some open source stuff myself (http://jena.sourceforge.net/) I know its nice when someone says thanks.

B

gallery version 1.4-pl1
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version:
Apache version:
PHP version (don't just say PHP 4, please):
Graphics Toolkit:
Operating system:
Web browser/version (if applicable):

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Mon, 2003-09-15 23:35

There seems to be some confusion here about what offline mode does. All it does is turn off the functions that won't work without PHP/apache in the background, like add comments and images, logging in etc etc. It also removes links to albums above the one your started in, so you can easily use it to download just an album or an album tree. Or just a slideshow.

What it doesn't do is munge urls or replace internet paths with local paths. This is done by the software you use to download it, eg wget in this case, or httrack. One thing worth noting is that wget downloads the entire site, and then replaces the internal URLs. This is a final step, so if wget quits early or is killed, then you won't get the right URLs.

Suggestions: try httrack, and see if that's better. If you like, send me the wget command that you are using, and I will see what the problem seems to be.

 
bwm

Joined: 2003-09-14
Posts: 2
Posted: Wed, 2003-09-17 13:24

Joan,

Thanks.

[[There seems to be some confusion here about what offline mode does.]]

Right - I was confused and dumb :oops: I now understand.

My problem with wget not creating relative URL's was due to my looking at the files before wget finished. wget downloads all the files first, and then goes through at the end and fixes up internal links. Since I look at the files before it finished, I saw absolute URLs where I expected to see relative ones.

I tried using httrack as you suggested and that fixes my problems with '?' in the URLs too. So I'm a happy camper. The only contribution I can offer in return is a suggested update to the documentation, for you to accept, amend or reject as you see fit:

In

http://gallery.menalto.com/modules.php?op=modload&name=GalleryDocs&file=index&page=gallery1-admin.offline.php

it says

[[
A new feature in Gallery 1.3.4 is offline browsing, designed to assist you when using tools like wget or httrack to make an offline version of your gallery. This can be for cutting a CD, keeping on your home machine, putting on a site that doesn't have PHP installed or any other purpose for which you might want a static version of your gallery.
]]

I suggest adding:

[[
Note: For creating a static mirror of a gallery on a site that does not support PHP, we suggest using httrack as it handles the '?' characters in URLs better.
]]

Thanks again for your help.

Brian

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-09-18 07:31

Can I ask you to add this as a comment on the documentation page? Then it's immediately available to others, and easy for the maintainer to find and make a decision about.

Thanks