view release on metacpan or search on metacpan
lib/Apache/GD/Graph.pm view on Meta::CPAN
## In days:
#PerlSetVar Expires 30
#
## In megs:
#PerlSetVar CacheSize 5242880
#PerlSetVar ImageType png
#PerlSetVar JpegQuality 75 # 0 to 100
#PerlSetVar TTFFontPath /usr/ttfonts:
#/var/ttfonts:/usr/X11R6/lib/X11/fonts/ttf/:
#/usr/X11R6/lib/X11/fonts/truetype/:
#/usr/share/fonts/truetype
lib/Apache/GD/Graph.pm view on Meta::CPAN
strings on the graph. See below.
=head1 IMPLEMENTATION
This module is implemented as a simple Apache mod_perl handler that generates
and returns a png format graph (using Martien Verbruggen's GD::Graph module)
based on the arguments passed in via a query string. It responds with the
content-type "image/png" (or whatever is set via C<PerlSetVar ImageType>), and
sends a Expires: header of 30 days (or whatever is set via C<PerlSetVar
Expires>, or expires in the query string, in days) ahead.
In addition, it keeps a server-side cache in the file system using DeWitt
Clinton's File::Cache module, whose size can be specified via C<PerlSetVar
lib/Apache/GD/Graph.pm view on Meta::CPAN
Date of Expires header from now, in days. Same as C<PerlSetVar Expires>.
=item B<image_type>
Same as C<PerlSetVar ImageType>. "png" by default, but can be anything
supported by GD.
If not specified via this option or in the config file, the image type can also
be deduced from a single value in the 'Accept' header of the request.
lib/Apache/GD/Graph.pm view on Meta::CPAN
=item B<{one,1,two,2}>
Becomes a hash reference.
=item B<http://somewhere/file.png>
Is pulled into a file and the file name is passed to the respective option.
(Can be any scheme besides http:// that LWP::Simple supports.)
=item B<../fonts/arial.ttf>
lib/Apache/GD/Graph.pm view on Meta::CPAN
use constant SECONDS_IN_DAY => 24 * 60 * 60;
use constant EXPIRES => 30;
use constant CACHE_SIZE => 5242880;
use constant IMAGE_TYPE => 'png';
use constant TTF_FONT_PATH => '/usr/ttfonts:/var/ttfonts:/usr/X11R6/lib/X11/fonts/ttf/:/usr/X11R6/lib/X11/fonts/truetype/:/usr/share/fonts/truetype';
use constant DEFAULT_TYPE => 'lines';
use constant DEFAULT_WIDTH => 400;
use constant DEFAULT_HEIGHT => 300;
lib/Apache/GD/Graph.pm view on Meta::CPAN
# undef -- a real undef
# foo_bar -- a scalar
# [1,2,undef,"foo",bar] -- an array
# (3,4,undef,"baz") -- a list
# {1,2,'3',foo} -- a hash
# http://some/url.png -- pull a URL into a file, returning that. The file
# will be relative to a directory given as the second parameter, or /tmp if not
# specified.
# ../some/file -- a file relative to DocumentRoot
sub parse ($;$) {
local $_ = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Gallery.pm view on Meta::CPAN
unless ($doc_pattern) {
$doc_pattern = '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$'
}
my $img_pattern = $r->dir_config('GalleryImgFile');
unless ($img_pattern) {
$img_pattern = '\.(jpe?g|png|tiff?|ppm)$'
}
# Let Apache serve files we don't know how to handle anyway
if (-f $filename && $filename !~ m/$img_pattern/i) {
return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED();
lib/Apache/Gallery.pm view on Meta::CPAN
Defaults to '0'.
=item B<GalleryCopyrightImage>
Image you want to blend into your images in the lower right
corner. This could be a transparent png saying "copyright
my name 2001".
Optional.
=item B<GalleryWrapNavigation>
lib/Apache/Gallery.pm view on Meta::CPAN
=item B<GalleryImgFile>
Pattern matching the files you want Apache::Gallery to view in the
index as thumbnails.
The default is '\.(jpe?g|png|tiff?|ppm)$'
=item B<GalleryDocFile>
Pattern matching the files you want Apache::Gallery to view in the index
as normal files. All other filetypes will still be served by Apache::Gallery
lib/Apache/Gallery.pm view on Meta::CPAN
The quality (1-100) of scaled images
This setting affects the quality of the scaled images.
Set this to a low number to reduce the size of the scaled images.
Remember to clear out your cache if you change this setting.
Quality seems to default to 75, at least in the jpeg and png loader code in
Imlib2 1.1.0.
Examples:
Quality at 50:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/HeavyCGI.pm view on Meta::CPAN
my $acce = $self->{R}->header_in('Accept-Encoding') || "";
return $self->{CAN_GZIP} = 0 unless $acce;
$self->{CAN_GZIP} = $acce =~ /\bgzip\b/;
}
sub can_png {
my Apache::HeavyCGI $self = shift;
return $self->{CAN_PNG} if defined $self->{CAN_PNG};
my $acce = $self->{R}->header_in("Accept") || "";
return $self->{CAN_PNG} = 0 unless $acce;
$self->{CAN_PNG} = $acce =~ m|image/png|i;
}
sub can_utf8 {
my Apache::HeavyCGI $self = shift;
return $self->{CAN_UTF8} if defined $self->{CAN_UTF8};
lib/Apache/HeavyCGI.pm view on Meta::CPAN
Set by the can_gzip method. True if client is able to handle gzipped
data.
=item CAN_PNG
Set by the can_png method. True if client is able to handle PNG.
=item CAN_UTF8
Set by the can_utf8 method. True if client is able to handle UTF8
endoded data.
view all matches for this distribution
view release on metacpan or search on metacpan
ImgIndex.pm view on Meta::CPAN
my($dh) = DirHandle->new($dir) ||
$r->log_error("Can't open directory '$dir': $?");
my(@filelist) = ();
while( defined($_ = $dh->read) ) {
next unless(/^(.+)\.(jpg|gif|png)$/i);
next if(/^\./);
# next if($1 =~ /thumb/);
push(@filelist, $_);
}
ImgIndex.pm view on Meta::CPAN
if(@filelist) {
my($counter) = 0;
my @sorted = (sort @filelist);
for(my $x = $start; $x < @sorted; $x++) {
$sorted[$x] =~ /^(.+)\.(jpg|gif|png)$/i;
my($name, $ext) = ($1, $2);
# set the display name
my $displayName = '';
if($gOptions{'show-names'}) {
ImgIndex.pm view on Meta::CPAN
#
sub showThumbFile {
my $r = shift || return;
my %mimeType =
(jpg => 'image/jpeg', gif => 'image/gif', png => 'image/png');
my ($name, $path, $ext) = fileparse($r->filename, qr{\.\w*$});
my($w, $h) = split('x', $gOptions{'thumb-size'});
$name =~ s/^\.//g;
$path =~ s/\/$//g;
view all matches for this distribution
view release on metacpan or search on metacpan
my $regex;
{
my $inner_regex = qr/"([^"\\]*(?:\\.[^"\\]*)*)"/;
$regex = qr/^(\S*)\s(\S*)\s(\S*)\s(\[[^\]]+\])\s$inner_regex\s(\S*)\s(\S*)\s$inner_regex\s+$inner_regex\s*$/;
}
my $line1 = '212.74.15.68 - - [23/Jan/2004:11:36:20 +0000] "GET /images/previous.png HTTP/1.1" 200 2607 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"';
my %record1 = (
'%h' => '212.74.15.68',
'%l' => '-',
'%u' => '-',
'%t' => '[23/Jan/2004:11:36:20 +0000]',
'%r' => 'GET /images/previous.png HTTP/1.1',
'%>s' => '200',
'%b' => '2607',
'%{Referer}i' => 'http://peterhi.dyndns.org/bandwidth/index.html',
'%{User-Agent}i' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202',
);
my $line2 = '212.74.15.68 - - [23/Jan/2004:11:36:20 +0000] "GET /images/previous.png=\" HTTP/1.1" 200 2607 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"' . "\n";
my %record2 = (
'%h' => '212.74.15.68',
'%l' => '-',
'%u' => '-',
'%t' => '[23/Jan/2004:11:36:20 +0000]',
'%r' => 'GET /images/previous.png=\" HTTP/1.1',
'%>s' => '200',
'%b' => '2607',
'%{Referer}i' => 'http://peterhi.dyndns.org/bandwidth/index.html',
'%{User-Agent}i' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202',
);
'%b' => '2888',
'%{Referer}i' => 'http://search.yahoo.com/bin/search?p=\"grady%20white%20306%20bimini\"',
'%{User-Agent}i' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.3; yplus 4.0.00d)',
);
my $line4 = '212.74.15.68 - - [23/Jan/2004:11:36:20 +0000] "GET /images/previous.png=\" HTTP/1.1" 200 2607 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"';
my %record4 = (
'%h' => '212.74.15.68',
'%l' => '-',
'%u' => '-',
'%t' => '[23/Jan/2004:11:36:20 +0000]',
'%r' => 'GET /images/previous.png=\" HTTP/1.1',
'%>s' => '200',
'%b' => '2607',
'%{Referer}i' => 'http://peterhi.dyndns.org/bandwidth/index.html',
'%{User-Agent}i' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202',
);
my $line5 = ' - - [23/Jan/2004:11:36:20 +0000] "GET /images/previous.png=\" HTTP/1.1" 200 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"';
my %record5 = (
'%h' => '',
'%l' => '-',
'%u' => '-',
'%t' => '[23/Jan/2004:11:36:20 +0000]',
'%r' => 'GET /images/previous.png=\" HTTP/1.1',
'%>s' => '200',
'%b' => '',
'%{Referer}i' => 'http://peterhi.dyndns.org/bandwidth/index.html',
'%{User-Agent}i' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202',
);
my $line6 = '212.74.15.68 - - "GET /images/previous.png=\" HTTP/1.1" 200 2607 "http://peterhi.dyndns.org/bandwidth/index.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202"';
################################################################################
# Create a new object
################################################################################
view all matches for this distribution
view release on metacpan or search on metacpan
MiniWiki.pm view on Meta::CPAN
# $timediff: # delta from GMT, eg: -8 for PST, +4.5 for IST
# @templates: # list of templates to use for other entry pages
# Global variables containing the recognized file extensions
# for images and binary files.
our @imgfmts = qw ( jpg jpeg gif png );
our @binfmts = ( @imgfmts, qw ( pdf doc ps gz zip bz2 tar ) );
# global variables to set thumbnail cutoff
our ($max_width, $max_height) = (600,400);
MiniWiki.pm view on Meta::CPAN
- storage of Wiki pages in RCS
- templates through HTML::Template
- text to HTML conversion with HTML::FromText
- basic authentication password changes
- uploading of binary (pdf, doc, gz, zip, ps)
- uploading of images (jpg, jpeg, gif, png)
- automatic thumbnailing of large using ImageMagick
- sub directories
- view any revision of a page
- revert back to any revision of the page
- basic checks to keep search engine spiders from deleting
view all matches for this distribution
view release on metacpan or search on metacpan
eg/MmapHandler.pm view on Meta::CPAN
my $ctype = 'application/octet-stream'; # Default file type
## Set file type by extension
$ctype = 'image/gif' if $filename =~ /.gif$/i;
$ctype = 'image/jpeg' if $filename =~ /.jpe?g$/i;
$ctype = 'image/png' if $filename =~ /.png$/i;
## Set up OK headers and send them
$r->content_type( $ctype );
$r->send_http_header;
eg/MmapHandler.pm view on Meta::CPAN
MmapHandler - Example Apache handler using Apache::Mmap
=head1 SYNOPSIS
<Files ~ "/some/htdocs/dir/images/.*(gif|jpe?g|png)$">
SetHandler perl-script
PerlHandler MmapHandler
</Files>
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/No404Proxy.pm view on Meta::CPAN
}
# default excludes image files
sub exclude {
my($class, $uri) = @_;
return $uri =~ /\.(?:gif|jpe?g|png)$/i;
}
sub fetch {
my($class, $r) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
docsrc/reference.xml view on Meta::CPAN
#
# for a filename, the media_type will be found by the <literal>MIME::Types</literal> module.
#
my $status_code = $model->pkit_send($filename);
my $status_code = $model->pkit_send(\$data, 'image/png');
# $data_ref is not zipped by the pkit_send methode, it sends
# it only with this encoding header.
my $status_code = $model->pkit_send($data_ref, 'html/text', 'gzip');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/RandomImage.pm view on Meta::CPAN
examples will result in an image being randomly selected from the "images" directory.
#mod_perl2 (PerlResponseHandler)
<LocationMatch "^/(.+)/images/random-image">
SetHandler modperl
PerlSetVar Suffixes "gif png jpg"
PerlResponseHandler Apache::RandomImage
</LocationMatch>
#mod_perl1 (PerlHandler)
<Location "/images/give-random">
SetHandler perl-script
PerlSetVar Suffixes "gif png jpg tif jpeg"
PerlHandler Apache::RandomImage
</Location>
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
examples/scoreboard-access-png.pl view on Meta::CPAN
if (IS_MODPERL) {
print $graph->plot($data);
}
else {
$graph->plot_to_png("scoreboard-access.png", $data);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
my $s = shift;
return unless($s->{r}{file_path});
return 'text/html' if ($s->{r}{file_path} =~ m/\.html?$/i);
return 'image/jpeg' if ($s->{r}{file_path} =~ m/\.jpg$/i);
return 'image/png' if ($s->{r}{file_path} =~ m/\.png$/i);
return 'image/gif' if ($s->{r}{file_path} =~ m/\.gif$/i);
return 'text/xml' if ($s->{r}{file_path} =~ m/\.x(m|s)l$/i);
return 'text/css' if ($s->{r}{file_path} =~ m/\.css$/i);
return 'application/pdf' if ($s->{r}{file_path} =~ m/\.pdf$/i);
return 'text/plain' if ($s->{r}{file_path} =~ m/\.txt$/i);
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
foreach my $a (@attachments) {
if (-e "/tmp/$a" && $a) {
my $ct;
$ct = 'text/html' if ($a =~ m/\.html?$/i);
$ct = 'image/jpeg' if ($a =~ m/\.jpg$/i);
$ct = 'image/png' if ($a =~ m/\.png$/i);
$ct = 'image/gif' if ($a =~ m/\.gif$/i);
$ct = 'text/xml' if ($a =~ m/\.x(m|s)l$/i);
$ct = 'text/css' if ($a =~ m/\.css$/i);
$ct = 'application/pdf' if ($a =~ m/\.pdf$/i);
$ct = 'text/plain' if ($a =~ m/\.txt$/i);
view all matches for this distribution
view release on metacpan or search on metacpan
SessionManager.pm view on Meta::CPAN
return (MP2 ? Apache::DECLINED : Apache::Constants::DECLINED)
}
}
# Set exclusion extension(s)
$session_config{'SessionManagerItemExclude'} = $r->dir_config('SessionManagerItemExclude') || '(\.gif|\.jpe?g|\.png|\.mpe?g|\.css|\.js|\.txt|\.mp3|\.wav|\.swf|\.avi|\.au|\.ra?m)$';
# declines requests if resource type is to exlcude
return (MP2 ? Apache::DECLINED : Apache::Constants::DECLINED) if ( $r->uri =~ /$session_config{'SessionManagerItemExclude'}/i );
$session_config{'SessionManagerStore'} = $r->dir_config('SessionManagerStore') || 'File';
SessionManager.pm view on Meta::CPAN
and all the request (URI) ending by ".mpeg", ".mpg" or ".mp3" will be declined.
If C<SessionManagerItemExclude> isn't defined, the default value is:
C<(\.gif|\.jpe?g|\.png|\.mpe?g|\.css|\.js|\.txt|\.mp3|\.wav|\.swf|\.avi|\.au|\.ra?m)$>
B<Note> If you want process each request, you can set
C<SessionManagerItemExclude> with:
PerlSetVar SessionManagerItemExclude "^$"
view all matches for this distribution
view release on metacpan or search on metacpan
SetWWWTheme.pm view on Meta::CPAN
$VERSION = '1.06';
##################################################
my $r; # request object variable
my $Theme; # Theme object!
my $blankgif = ""; # the location of the blank gif. or png. Whatever.
my $allowbodymod; #
my ($nextlink, $lastlink, $uplink, $BGCOLOR); # vars we use to customize the page
my ($alink, $link, $text, $vlink); # <BODY> stuff
my @infolinks; # array to contain the links in the infobar
my $usenavbar; # flag that tells if we use the top and bottom navbar
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestConfig.pm view on Meta::CPAN
sub types_config_template {
return <<EOF;
text/html html htm
image/gif gif
image/jpeg jpeg jpg jpe
image/png png
text/plain asc txt
EOF
}
sub generate_types_config {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/templates/layout view on Meta::CPAN
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>mysite.com :: [% title %]</title>
<link rel="shortcut icon" href="/images/favicon.png" type="image/png"/>
<link rel="stylesheet" href="/css.css" title="Simple" />
</head>
<body>
<div id="content">
view all matches for this distribution
view release on metacpan or search on metacpan
perl-conf-1998/k03.html
perl-conf-1998/k04.html
perl-conf-1998/k05.html
perl-conf-1998/k06.html
perl-conf-1998/k07.html
perl-conf-1998/leftarrow.png
perl-conf-1998/rightarrow.png
view all matches for this distribution
view release on metacpan or search on metacpan
UpnpImgBrowser.pm view on Meta::CPAN
#
sub showThumbFile {
my $r = shift || return;
my %mimeType =
(jpg => 'image/jpeg', gif => 'image/gif', png => 'image/png');
my ($name, $path, $ext) = fileparse($r->filename, qr{\.\w*$});
my($w, $h) = split('x', $gOptions{'thumb-size'});
$name =~ s/^\.//g;
$path =~ s/\/$//g;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo/Debug/Handler.pm view on Meta::CPAN
};
$self->{static_files} = {
"debug.css" => "text/css",
"debug.js" => "application/x-javascript",
"debug.png" => "image/png",
"error.png" => "image/png",
"exception.png" => "image/png",
"info.png" => "image/png",
"minus.png" => "image/png",
"plus.png" => "image/png",
"spinner.gif" => "image/gif",
"table.png" => "image/png",
"trace.png" => "image/png",
"warn.png" => "image/png"
};
$self->{json} = JSON::DWIW->new({bad_char_policy => 'convert', pretty => 1});;
return $self;
view all matches for this distribution
view release on metacpan or search on metacpan
Wyrd/Chart.pm view on Meta::CPAN
Apache::Wyrd::Chart - Embed Dynamically-redrawn charts in HTML
=head1 SYNOPSIS
<BASENAME::Chart img="chart.png" type="bars" height="200" width="300">
<BASENAME::Query>
select month, price
from monthly_prices
order by month
</BASENAME::Query>
Wyrd/Chart.pm view on Meta::CPAN
In pixels, as per IMG tag
=item src
Required - Where (document-root-relative) the graphic is to appear.
Currently must end with .png.
=back
=item GD::Graph-style attributes
Wyrd/Chart.pm view on Meta::CPAN
binmode(OUT);
eval {
if ($format eq 'gif') {
print OUT $gd->gif();
} else {
print OUT $gd->png();
}
$self->_error($graph->error) if ($graph->error);
};
close OUT;
select OUT;
Wyrd/Chart.pm view on Meta::CPAN
$file = "$root$file";
} else {
$self->_raise_exception("Chart Wyrds require a src attribute");
}
$self->_file_problems($file);
my ($format) = $file =~ /\.(png|gif)$/i;
unless ($format) {
$self->_raise_exception('Only PNG or GIF file format is supported');
}
$self->{'_graphic_file'} = $file;
$self->{'_file_format'} = lc($format);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/API/Headers/Accept.pm view on Meta::CPAN
# "text/html"
=head2 2. */* is a fallback only
my $a = Apache2::API::Headers::Accept->new( '*/*;q=0.9, application/json;q=0.9' );
$a->match( [ 'image/png', 'text/html', 'application/json' ] );
# "application/json"
=head2 3. */* with higher q wins and chooses first supported
my $a = Apache2::API::Headers::Accept->new( '*/*;q=1.0, application/json;q=0.9' );
$a->match( [ 'image/png', 'text/html', 'application/json' ] );
# "image/png"
=head1 LEGACY MATCH PRIORITY
Set C<$Apache2::API::Headers::Accept::MATCH_PRIORITY_0_01_STYLE> to true to make equal-C<q> ties follow the order of your offers (the array reference of supported medias), instead of the header order. Full matches still outrank partial ones. Wildcard...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AMFImageRendering.pm view on Meta::CPAN
my $typeGraphicLibrary='gd';
my $filterMagick='Lanczos';
my $qualityImage=90;
my $maxAgeImage=99999999999999999;
$ImageType{'image/png'}="png";
$ImageType{'image/gif'}="gif";
$ImageType{'image/jpg'}="jpg";
$ImageType{'image/jpeg'}="jpeg";
#
lib/Apache2/AMFImageRendering.pm view on Meta::CPAN
}
my $dummy=$imagefile.".gif";
Imager->write_multi({ file => $dummy }, @out) or die "Cannot save $imagefile: ", Imager->errstr, "\n";
rename($dummy, $imagefile);
}
if ($content_type eq "image/png") {
if ($typeGraphicLibrary eq 'gd') {
my $img = Image::Scale->new("$imageToConvert") ;
$img->resize_gd( { width => $width } );
$img->save_png("$imagefile");
} else {
my $img = Image::Magick->new;
$img->Read($imageToConvert);
$img->Comment("Resized by AMF (http://www.apachemobilefilter.org)");
$img->Set(quality=>$qualityImage);
lib/Apache2/AMFImageRendering.pm view on Meta::CPAN
1;
=head1 NAME
Apache2::AMFImageRendering - Used to resize images (jpg, png, gif gifanimated) on the fly to adapt to the screen size of the mobile device
=head1 DESCRIPTION
This module have the scope to manage with AMF51DegreesFilter, AMFDetectRightFilter and AMFWURFLFilter module the images for mobile devices.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/demo/d2/demo.php
examples/demo/d4/demo.php
examples/demo/d8/demo.php
examples/demo-gate/gate.css
examples/demo-gate/gate.php
examples/demo-gate/images/openid.png
examples/demo-gate/images/chooser_protect_net.gif
examples/demo-gate/images/uw_small.jpg
examples/demo-gate/images/google.png
examples/demo-gate/gate-logic.php
examples/demo-config/etc/apache2/conf.d/authany.conf
examples/demo-config/etc/apache2/sites-enabled/default
examples/demo-config/etc/authany/provider-mapping.pl
examples/demo-config/htpasswd
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieDBImg.pm view on Meta::CPAN
For example, my randomizer (written in perl and called via a perl
page template processor similar to Template::Toolkit) will spit out
my image coding and hidden field coding into my HTML page selecting
a random image + key from the images table. For example, the output
from my perl randomizer spits out:
<img src="/images/dbimg/junk.png"><input type="hidden" name="credential_3" value="1">
To make the work of the randomizer easier I create my images table
like this:
create table images ( imagekey serial, imageurl char(128), imageword char(20));
And load it up like this:
inssert into images (imageurl,imageword) values ('/images/dbimg/junk.png','saywhat?');
Then create an image named junk.png and put it in my web server /images/dbimg folder.
The text on the image has a background picture plus the word "saywhat?" across the front.
The randomizer just looks up the imageurl and imagekey in the database and spits out
the appropriate HTML code. ApacheCookieDBImg then does a reverse operation, looking
up the imageword based on the key.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
# Send the XML header and top of the index tree
$xml .= xml_header($r,$dir_cfg);
$xml .= sprintf("<index path=\"%s\" href=\"%s\" >\n",
$r->uri, $r->construct_url);
$xml .= xml_options($r,$qstring,$dir_cfg);
$xml .= "\t<updir icon=\"/icons/__back.png\" />\n"
unless $r->uri =~ m,^/?$,;
# Build a list of attributes for each item in the directory and then
# print it as an element in the index tree.
while (my $id = readdir($dh)) {
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
sub icon_by_extension {
my ($r,$id,$ext,$dir_cfg) = @_;
my $alt = '';
my $icon =
$ext && -f File::Spec->catfile($r->document_root,'icons',lc("$ext.png"))
? '/icons/'.lc("$ext.png")
: $dir_cfg->{DefaultIcon} || '';
while (my ($re,$v) = each %{$dir_cfg->{AddIconRegex}}) {
if ($id =~ /$re$/) {
($alt,$icon) = @{$v};
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
($attr->{ext}) = $id =~ /\.([a-z0-9_]+)$/i;
($attr->{alt},$attr->{icon}) = icon_by_extension($r,$id,$attr->{ext},$dir_cfg);
} elsif ($type eq 'dir') {
$attr->{alt} = 'DIR';
$attr->{icon} = '/icons/__dir.png';
if ($dir_cfg->{AddIconRegex}->{'^^DIRECTORY^^'}) {
($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);
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
return bless {
HeaderName => 'HEADER',
ReadmeName => 'FOOTER',
DirectoryIndex => [qw(index.html index.shtml)],
IndexStyleSheet => '/index.xslt',
DefaultIcon => '/icons/__unknown.png',
IndexIgnore => [()],
FileTypesFilename => 'filetypes.dat',
}, $class;
}
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
<Location />
SetHandler perl-script
PerlResponseHandler Apache2::AutoIndex::XSLT
Options +Indexes
IndexStyleSheet /index.xslt
DefaultIcon /icons/__unknown.png
IndexIgnore .*
IndexIgnore index.xslt
IndexIgnore robots.txt
IndexIgnore sitemap.gz
</Location>
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
(" or '). This alternate text is displayed if the client is image-incapable,
has image loading disabled, or fails to retrieve the icon.
=head2 AddDescription
AddDescription "The planet Mars" /web/pics/mars.png
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 (").
lib/Apache2/AutoIndex/XSLT.pm view on Meta::CPAN
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.
view all matches for this distribution
view release on metacpan or search on metacpan
t/htdocs/about.html view on Meta::CPAN
<p>Volunteering our own resources, we aspire to collaborate within our community and build bridges to related disciplines and organizations. We invite you to join us in advancing the state of information architecture through research, education, advo...
<p><strong>The IA Institute Framework</strong></p>
<p><img alt="Final framework" width="447" src="http://iainstitute.org/news/img/iai-postcard-recto.png" style="margin: 3em auto; align:center; display: block; width: 447;"></p>
<p>We aim to facilitate the following relationships and the people and groups they serve:</p>
<ul>
<li style="margin-bottom: 1em;"><b>Mentors/Institutions and Apprentices/Students</b><br />
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Layer.pm view on Meta::CPAN
DocumentRoot "/usr/local/vhost2"
# disabled by default
EnableDocumentRootLayers Off
<LocationMatch "\.png$">
# layer images only
EnableDocumentRootLayers On
DocumentRootLayers images_v3 images_v2
</LocationMatch>
lib/Apache2/Layer.pm view on Meta::CPAN
DocumentRootLayers company2/images default/images
</Location>
for following requests:
/images/company1/headers/top.png
/images/company2/headers/top.png
those paths would be searched:
company1/images/headers/top.png default/images/headers/top.png
company2/images/headers/top.png default/images/headers/top.png
but with C<DocumentRootLayersStripLocation Off>:
company1/images/images/company1/headers/top.png default/images/images/company1/headers/top.png
company2/images/images/company2/headers/top.png default/images/images/company2/headers/top.png
=head2 DocumentRootLayers
Syntax: DocumentRootLayers dir-path1 [dir-path2 ... dir-pathN]
Context: server config, virtual host, <Location*
view all matches for this distribution
view release on metacpan or search on metacpan
ModProxyPerlHtml.pm view on Meta::CPAN
can use the perl variable ProxyHTMLRewrite under the location directive as
follow:
<Location /webcal/>
...
PerlAddVar ProxyHTMLRewrite "/logo/image1.png /images/logo1.png"
# Or more complicated to handle space in the code as space is the
# pattern / substitution separator character internally in ModProxyPerlHtml
PerlAddVar ProxyHTMLRewrite "ajaxurl[\s\t]*=[\s\t]*'/blog' ajaxurl = '/www2.mydom.org/blog'"
...
</Location>
this will replace each occurence of '/logo/image1.png' by '/images/logo1.png' in
the entire stream (html, javascript or css). Note that this kind of substitution
is done after all other proxy related replacements.
In some conditions javascript code can be replaced by error, for example:
imgUp.src = '/images/' + varPath + '/' + 'up.png';
will be rewritten like this:
imgUp.src = '/URL/images/' + varPath + '/URL/' + 'up.png';
To avoid the second replacement, write your JS code like that:
imgUp.src = '/images/' + varPath + unescape('%2F') + 'up.png';
ModProxyPerlHTML replacement is activated on certain HTTP Content Type. If you
experienced that replacement is not activated for your file type, you can use the
ProxyHTMLContentType configuration directive to redefined the HTTP Content Type
that should be parsed by ModProxyPerlHTML. The default value is the following
view all matches for this distribution
view release on metacpan or search on metacpan
docsrc/reference.xml view on Meta::CPAN
#
# for a filename, the media_type will be found by the <literal>MIME::Types</literal> module.
#
my $status_code = $model->pkit_send($filename);
my $status_code = $model->pkit_send(\$data, 'image/png');
# $data_ref is not zipped by the pkit_send methode, it sends
# it only with this encoding header.
my $status_code = $model->pkit_send($data_ref, 'html/text', 'gzip');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/PodBrowser.pm view on Meta::CPAN
} else { # generate index
$body=_compress(_index($r), $r);
}
} elsif(($pos=index $pi, '/', 1)>0) {
# image or something like that, e.g.
# =for html <img src="Apache2::PodBrowser/img.png">
my $path=_findpod($r, substr($pi, 1, $pos-1));
unless( $path=~s!\.[^.]+$!! ) {
$path=~s!/[^/]+$!!;
}
$path.=substr $pi, $pos;
lib/Apache2/PodBrowser.pm view on Meta::CPAN
my $ct=$1;
$ct=~s/%([0-9a-f]{2})|\+/defined $1
? pack('H2', $1)
: ' '/egi;
$r->content_type($ct);
} elsif( substr($path, -4) eq '.png' ) {
$r->content_type('image/png');
} elsif( substr($path, -4) eq '.jpg' or
substr($path, -5) eq '.jpeg' ) {
$r->content_type('image/jpeg');
} elsif( substr($path, -4) eq '.gif' ) {
$r->content_type('image/gif');
lib/Apache2/PodBrowser.pm view on Meta::CPAN
in front of the link.
A note about the content type of linked documents. C<Apache::PodBrowser>
does not enter a new request cycle to ship these documents. So, the normal
Apache Content-Type guessing does not take place. C<Apache::PodBrowser> knows
a few file name extensions (C<png>, C<jpg>, C<jpeg>, C<gif>, C<js>,
C<pdf> and C<html>). For those it sends the correct Content-Type headers.
All other documents are shipped as C<application/octet-stream>.
If a document needs a different Content-Type header it can be passed as
CGI parameter:
view all matches for this distribution