Apache2-AutoIndex-XSLT
view release on metacpan or search on metacpan
This sets the description to display for a file. File is a file
extension, partial filename, wild-card expression or full filename for
files to describe. String is enclosed in double quotes (").
AddIcon
AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm
AddIcon /icons/dir.xbm ^^DIRECTORY^^
AddIcon /icons/backup.xbm *~
This sets the icon to display next to a file ending in name. Icon is
either a (%-escaped) relative URL to the icon, or of the format
(alttext,url) where alttext is the text tag given for an icon for
non-graphical browsers.
Name is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for blank
lines (to format the list correctly), a file extension, a wildcard
expression, a partial filename or a complete filename.
*AddIconByType* should be used in preference to *AddIcon*, when
possible.
AddIconByEncoding
AddIconByEncoding /icons/compress.xbm x-compress
This sets the icon to display next to files. Icon is either a
(%-escaped) relative URL to the icon, or of the format (alttext,url)
where alttext is the text tag given for an icon for non-graphical
browsers.
MIME-encoding is a wildcard expression matching required the
content-encoding.
AddIconByType
AddIconByType (IMG,/icons/image.xbm) image/*
This sets the icon to display next to files of type MIME-type. Icon is
either a (%-escaped) relative URL to the icon, or of the format
(alttext,url) where alttext is the text tag given for an icon for
non-graphical browsers.
MIME-type is a wildcard expression matching required the mime types.
DefaultIcon
DefaultIcon /icons/__unknown.png
The *DefaultIcon* directive sets the icon to display for files when no
specific icon is known. Url-path is a (%-escaped) relative URL to the
icon.
HeaderName
IndexIgnore
IndexIgnore README .htindex *.bak *~
The *IndexIgnore* directive adds to the list of files to hide when
listing a directory. File is a shell-style wildcard expression or full
filename. Multiple *IndexIgnore* directives add to the list, rather than
the replacing the list of ignored files. By default, the list contains .
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
my $r = shift;
# Get query string values - use this manual code instead of
# Apache2::Request because it uses less memory, and Apache2::Request
# does not come as standard with mod_perl2 (it's libapreq2 on CPAN)
my $qstring = {};
for (split(/[&;]/,($r->args||''))) {
my ($k,$v) = split('=',$_,2);
next unless defined $k;
$v = '' unless defined $v;
$qstring->{URI::Escape::uri_unescape($k)} =
URI::Escape::uri_unescape($v);
}
# Get the configuration directives
my $dir_cfg = get_config($r->server, $r->per_dir_config);
return ($qstring,$dir_cfg);
}
sub dir_xml {
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
($attr->{alt},$attr->{icon}) =
@{$dir_cfg->{AddIconRegex}->{'^^DIRECTORY^^'}};
}
} elsif ($type eq 'updir') {
$attr->{icon} = '/icons/__back.png';
}
unless ($type eq 'updir') {
#$attr->{id} = $id; # This serves no real purpose anymor
$attr->{href} = URI::Escape::uri_escape($id);
$attr->{href} .= '/' if $type eq 'dir';
$attr->{title} = XML::Quote::xml_quote($id);
$attr->{desc} = $type eq 'dir'
? 'File Folder'
: defined $attr->{ext}
? sprintf('%s File',uc($attr->{ext}))
: 'File';
if (exists $dir_cfg->{AddDescription}->{$r->uri.URI::Escape::uri_escape($id)}) {
$attr->{desc} = $dir_cfg->{AddDescription}->{$r->uri.URI::Escape::uri_escape($id)};
} elsif (defined $FILETYPES{lc($attr->{ext})}->{DisplayName}) {
$attr->{desc} = $FILETYPES{lc($attr->{ext})}->{DisplayName};
}
$attr->{desc} = XML::Quote::xml_quote($attr->{desc});
}
return $attr;
}
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
a file extension, partial filename, wild-card expression or full filename for
files to describe. String is enclosed in double quotes (").
=head2 AddIcon
AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm
AddIcon /icons/dir.xbm ^^DIRECTORY^^
AddIcon /icons/backup.xbm *~
This sets the icon to display next to a file ending in name. Icon is either a
(%-escaped) relative URL to the icon, or of
the format (alttext,url) where alttext is the text tag given for an icon for
non-graphical browsers.
Name is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for blank lines
(to format the list correctly), a file extension, a wildcard expression, a
partial filename or a complete filename.
I<AddIconByType> should be used in preference to I<AddIcon>, when possible.
=head2 AddIconByEncoding
AddIconByEncoding /icons/compress.xbm x-compress
This sets the icon to display next to files. Icon is
either a (%-escaped) relative URL to the icon, or of the format (alttext,url)
where alttext is the text tag given for an icon for non-graphical browsers.
MIME-encoding is a wildcard expression matching required the content-encoding.
=head2 AddIconByType
AddIconByType (IMG,/icons/image.xbm) image/*
This sets the icon to display next to files of type MIME-type.
Icon is either a (%-escaped) relative URL to the icon, or of
the format (alttext,url) where alttext is the text tag given for an icon for
non-graphical browsers.
MIME-type is a wildcard expression matching required the mime types.
=head2 DefaultIcon
DefaultIcon /icons/__unknown.png
The I<DefaultIcon> directive sets the icon to display for files when no
specific icon is known. Url-path is a (%-escaped)
relative URL to the icon.
=head2 HeaderName
=head2 IndexIgnore
IndexIgnore README .htindex *.bak *~
The I<IndexIgnore> directive adds to the list of files to hide when listing a
directory. File is a shell-style wildcard expression or full filename. Multiple
( run in 0.642 second using v1.01-cache-2.11-cpan-c21f80fb71c )