install
downTHEMall! extension.
create new apache
layer.
create layout-specific layer.
type: theme.
layout: apache-style directory indexing.
layerinfo "type" = "theme";
layerinfo "name" = "apache image downloader";
layerinfo "source_viewable" = 1;
function GalleryPage::print_body (){
"Apache Image Downloader
";
if (not $.pages.all_subitems_displayed) {
if ($.pages.url_prev != "") {
dir_item("left", $.pages.url_prev, "Previous Page", $.gallery.dateupdate, "", "Page " + ($.pages.current - 1) + " of $.pages.total");
}
if ($.pages.url_next != "") {
dir_item("right", $.pages.url_next, "Next Page", $.gallery.dateupdate, "", "Page " + ($.pages.current + 1) + " of $.pages.total");
}
}
"";
if ((size $.pictures) == 0) { return; }
"";
"";
var bool tr = false;
var int td = 0;
var string desrow;
var int rows = 0;
foreach var Picture p ($.pictures) {
if (not $tr) {
"\n";
$rows++;
$tr = true;
}
var Image i = $p.thumbnails{"norm"};
"";
$i->print({
"tint" => $*tint,
"href" => $p.fullimage.url,
"alt" => $p.title,
});
"\n";
$desrow = $desrow + "$p.title";
$td++;
if ($td == $*cols) {
"\n";
if ($*show_titles) {
"$desrow\n";
}
$td = 0;
$tr = false;
$desrow = "";
}
}
if ($tr) {
"\n";
if ($*show_titles) {
"$desrow\n";
}
}
"";
}create new
style.
template: (no base)
edit style.
name: apache image downloader.
layout: apache-style directory indexing
manage gals.
foreach $gal ($gals) {
choose a gal to download images from.
if (size($images) > 0) {
change style to "apache image downloader."
save gallery.
click on "view all pictures" link on right.
select & copy gal title.
right click -> downTHEMall!
select "links in the page" tab.
filter by "all files."
if (size($pages) > 1) {
deselect any links to other pages.
}
set dir to download to. (if you copied the gal title,
you can use that to create a dir with that name)
click "start downloads!" and watch them be grabbed. and stuff.
if (size($pages) > 1) {
go to next page and perform above process for remaining pages.
}
hit the back button until you reach the manage gal page.
change style back to what it was before you changed it to:
"apache image downloader."
save changes.
}
if (size($images) == 0) {
choose a subgal.
perform above process.
}
if (size($remaining_subgals) == 0) {
go to parent gal.
perform above process.
}
}then use this php, running in a web server emulator on your computer (such as
xitami), to append the correct filetype to each file. this script is intended to run within each folder.
" . $newfile . "
";
}
}
}
}
?>