forked from bentglasstube/blosxom-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpath_image-v1i1
41 lines (31 loc) · 852 Bytes
/
path_image-v1i1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Blosxom Plugin: path_image
# Author: Kengo Ichiki <[email protected]>
# Version: $Id: path_image,v 1.1 2004/01/09 05:58:16 ichiki Exp $
package path_image;
$path_image = '';
# --- Configurable variables ---
%images = ('/blosxom' => '/images/blosxom.gif',
'/WaoN' => '/images/WaoN.gif',
'/diary' => '/images/diary.gif',
'/diary/phys' => '/images/phys.gif');
# ------------------------------
sub start {
1;
}
# ------------------------------
sub story {
my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
my $p; # for path
my $i; # for image
$path_image = '';
while ( ($p, $i) = each (%images)) {
if ($path eq $p) {
$path_image
= "<img src=\"$i\" alt=\"$p\" width=\"50\" height=\"50\" align=\"right\" />";
}
}
if ($path_image eq '') {
$path_image = $path;
}
}
1;