.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "AutoIndex 3" .TH AutoIndex 3 "1999-06-29" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" Apache::AutoIndex \- Perl replacment for mod_autoindex and mod_dir Apache module .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& PerlModule Apache::Icon \& PerlModule Apache::AutoIndex \& (PerlModule Image::Magick) optionnal \& PerlTransHandler Apache::AutoIndex::transhandler \& PerlHandler Apache::AutoIndex .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module can replace completely mod_dir and mod_autoindex standard directory handling modules shipped with apache. It can currently live right on top of those modules, but I suggest simply making a new httpd without these modules compiled\-in. .PP To start using it on your site right away, simply preload Apache::Icon and Apache::AutoIndex either with: .PP .Vb 2 \& PerlModule Apache::Icon \& PerlModule Apache::AutoIndex .Ve .PP in your httpd.conf file or with: .PP .Vb 2 \& use Apache::Icon (); \& use Apache::AutoIndex; .Ve .PP in your require.pl file. .PP Then it's simply adding .PP .Vb 2 \& PerlTransHandler Apache::Autoindex::transhandler \& PerlHandler Apache::AutoIndex .Ve .PP somewhere in your httpd.conf but outside any Location/Directory containers. .Sh "\s-1VIRTUAL\s0 \s-1HOSTS\s0" .IX Subsection "VIRTUAL HOSTS" If used in a server using virtual hosts, since mod_perl doesn't have configuration merging routine for virtual hosts, you'll have to put the PerlHandler and PerlTransHandler directives in each and every <\s-1VHOST\s0> section you wish to use Apache::AutoIndex with. .SH "DIRECTIVES" .IX Header "DIRECTIVES" It uses all of the Configuration Directives defined by mod_dir and mod_autoindex. .PP Since the documentation about all those directives can be found on the apache website at: .PP .Vb 2 \& http://www.apache.org/docs/mod/mod_autoindex.html \& http://www.apache.org/docs/mod/mod_dir.html .Ve .PP I will only list modification that might have occured in this perl version. .Sh "\s-1SUPPORTED\s0 \s-1DIRECTIVES\s0" .IX Subsection "SUPPORTED DIRECTIVES" .IP "\(bu" 4 AddDescription .IP "\(bu" 4 DirectoryIndex .IP "\(bu" 4 FancyIndexing \- should use IndexOptions FancyIndexing since 1.3.2 .IP "\(bu" 4 IndexOptions \- All directives are currently supported. And a few were added .IP "\(bu" 4 HeaderName \- It can now accept a list of files instead of just one .IP "\(bu" 4 ReadmeName \- It can now accept a list of files instead of just one .IP "\(bu" 4 IndexIgnore .IP "\(bu" 4 IndexOrderDefault .Sh "\s-1NEW\s0 \s-1DIRECTIVES\s0" .IX Subsection "NEW DIRECTIVES" .IP "* IndexOptions" 4 .IX Item "IndexOptions" Thumbnails \- Lisitng will now include thumbnails for pictures. Defaults to false. .Sp ShowPermissions \- prints file permissions. Defaults to false. .IP "* PerlSetVar IndexHtmlBody 'expression'" 4 .IX Item "PerlSetVar IndexHtmlBody 'expression'" This is an expression that should producea complete <\s-1BODY\s0> tag when eval'ed. One example could be : .Sp .Vb 1 \& PerlSetVar IndexHtmlBody '' .Ve .IP "* PerlSetVar IndexHtmlTable value" 4 .IX Item "PerlSetVar IndexHtmlTable value" This is a string that will be inserted inside the table tag of the listing like so : <\s-1TABLE\s0 \f(CW$value\fR> .IP "* PerlSetVar IndexHtmlHead value" 4 .IX Item "PerlSetVar IndexHtmlHead value" This should be the url (absolute/relative) of a ressource that would be inserted right after the <\s-1BODY\s0> tag and before anything else is written. .IP "* PerlSetVar IndexHtmlFoot value" 4 .IX Item "PerlSetVar IndexHtmlFoot value" This should be the url (absolute/relative) of a ressource that would be inserted right before the tag and after everything else is written. .IP "* PerlSetVar IndexDebug [0|1]" 4 .IX Item "PerlSetVar IndexDebug [0|1]" If set to 1, the listing displayed will print usefull (well, to me) debugging information appended to the bottom. The default is 0. .Sh "\s-1UNSUPPORTED\s0 \s-1DIRECTIVES\s0" .IX Subsection "UNSUPPORTED DIRECTIVES" .IP "* \- Hopefully none :\-)" 4 .IX Item "- Hopefully none :-)" .SH "THUMBNAILS" .IX Header "THUMBNAILS" Since version 0.07, generation of thumbnails is possible. This means that listing a directory that contains images can be listed with little reduced thumbnails beside each image name instead of the standard 'image' icon. .PP To enable this you simply need to preload Image::Macick in Apache. The IndexOption option Thumbnails controls thumbnails generation for specific directories like any other IndexOption directive. .Sh "\s-1USAGE\s0" .IX Subsection "USAGE" The way thumbnails are generated/produced can be configured in many ways, but here is a general overview of the procedure. .PP For each directory containing pictures, there will be a .thumbnails directory in it that will hold the thumbnails. Each time the directory is accessed, and if thumbnail generation is active, small thumbnails will be produced, shown beside each image name, instaed of the normal , generic, image icon. .PP That can be done in 2 ways. In the case the image is pretty small, no actual thumbnail will be created. Instead the image will be resized with the \s-1HEIGHT\s0 and \s-1WIDTH\s0 attributes of the \s-1IMG\s0 tag. .PP If the image is big enough, it is resized with Image::Magick and saved in the .thumbnails directory for the next requests. .PP Change in the configuration of the indexing options will correctly refresh the thumbnails stored. Also if an original image is modified, the thumbnail will be modified accordingly. Still, the browser might screw things up if it preserves the cached images. .PP The behaviour of the Thumbnail generating code can be customized with these PerlSetVar variables: .Sh "\s-1DIRECTIVES\s0" .IX Subsection "DIRECTIVES" .IP "* IndexCacheDir dir" 4 .IX Item "IndexCacheDir dir" This is the name of the directory in wich generated thumbnails will be created. Make sure the user under wich the webserver runs has read and write privileges. Defaults to .thumbnails .IP "* IndexCreateDir 0|1" 4 .IX Item "IndexCreateDir 0|1" Specifies that when a cache directory isn't found, should an attempt to create it be done. Defaults to 1(true), meaning if possible, missing cache directories will be created. .IP "* ThumbMaxFilesize bytes" 4 .IX Item "ThumbMaxFilesize bytes" This value fixes the size of an image at wich thumbnail processing isn't even attempted. Since trying to process a few very big images could bring a server down to it's knees. Defaults to 500,000 .IP "* ThumbMinFilesize bytes" 4 .IX Item "ThumbMinFilesize bytes" This value fixes the size of an image at wich thumbnail processing isn't actually done. Since trying to process already very small images could would be an overkill, the image is simply resized withe the size attributes of the \s-1IMG\s0 tag. Defaults to 5,000. .IP "* ThumbMaxWidth pixels" 4 .IX Item "ThumbMaxWidth pixels" This value fixes the x\-size of an image at wich thumbnail processing isn't actually done. Since trying to process already very small images could would be an overkill, the image is simply resized withe the size attributes of the \s-1IMG\s0 tag. Defaults to 4 times the default icon width. .IP "* ThumbMaxHeight pixels" 4 .IX Item "ThumbMaxHeight pixels" This value fixes the y\-size of an image at wich thumbnail processing isn't actually done. Since trying to process already very small images could would be an overkill, the image is simply resized withe the size attributes of the \s-1IMG\s0 tag. Defaults to 4 times the default icon height .IP "* ThumbScaleWidth scaling-factor" 4 .IX Item "ThumbScaleWidth scaling-factor" This value fixes an x\-scaling factor between 0 and 1 to resize the images with. The image ratio will be preserved only if there is no scaling factor for the other axis of the image. .IP "* ThumbScaleHeight scaling-factor" 4 .IX Item "ThumbScaleHeight scaling-factor" This value fixes an y\-scaling factor between 0 and 1 to resize the images with. The image ratio will be preserved only if there is no scaling factor for the other axis of the image. .IP "* ThumbWidth pixels" 4 .IX Item "ThumbWidth pixels" This value fixes a fixed x\-dimension to resize the image with. The image ratio will be preserved only if there is no fixed scaling factor for the other axis of the image. This has no effect if a scaling factor is defined. .IP "* ThumbHeight pixels" 4 .IX Item "ThumbHeight pixels" This value fixes a fixed x\-dimension to resize the image with. The image ratio will be preserved only if there is no fixed scaling factor for the other axis of the image. This has no effect if a scaling factor is defined. .SH "TODO" .IX Header "TODO" The transhandler problem should be fixed. .PP Some minor changes to the thumbnails options will still have the thumbnails re\-generated. This should be avoided by checking the attributes of the already existing thumbnail. .PP Some form of garbage collection should be performed or cache directories will fill up. .PP Find new things to add... .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), Apache(3), Apache::Icon(3), Image::Magick(3) . .SH "SUPPORT" .IX Header "SUPPORT" Please send any questions or comments to the Apache modperl mailing list or to me at .SH "NOTES" .IX Header "NOTES" This code was made possible by : .IP "Doug MacEachern" 4 .IX Item "Doug MacEachern" Creator of Apache::Icon, and of course, mod_perl. .IP "Rob McCool" 4 .IX Item "Rob McCool" who produced the final mod_autoindex.c I copied, hrm.., well, translated to perl. .IP "The mod_perl mailing-list" 4 .IX Item "The mod_perl mailing-list" at for all your mod_perl related problems. .SH "AUTHOR" .IX Header "AUTHOR" Philippe M. Chiasson .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1999 Philippe M. Chiasson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.