Replace atomfeed $feed_url with $path_info_full, for correct self links.
[blosxom-plugins.git] / barijaona / fix_static_url
blobfe2122a0450fccfdad37d2df5ee22ce372f73207
1 # Blosxom plugin: fix-static-url
2 # Author(s): Barijaona Ramaholimihaso
3 # Version: 2004-08-22blosxom2
4 # Documentation: see bottom of file or perldoc title
6 package fix_static_url;
7 # ------------------ Configuration variables ---------------
9 use vars qw($static_url);
11 # Define here the url of your blog i.e. http://homepage.mac.com/barijaona
12 # alternatively, use the prefs plugin to define $fix_static_url::static_url
13 $static_url = "" ;
15 # ---------------------------------------------------------
18 sub start {
19         if ( $blosxom::static_or_dynamic eq 'static') {
20                 $saveurl = $blosxom::url;
21                 $blosxom::url = '*DEFANG_STATIC_URL*';
22                 return 1;
23          }
24          else {return 0 };
27 sub head {
28         $blosxom::url= $static_url;
31 sub last {
32         # for plugins who use $url before the head sub
33         $blosxom::output =~ s>\*DEFANG_STATIC_URL\*>$static_url>g; 
34         1;
38 __END__
39 =head1 NAME
41 Blosxom Plug-in: fix_static_url
43 =head1 SYNOPSIS
45 This plugin corrects the $blosxom::url variable for static rendering.
47 When you use blosxom for rendering static pages, the $url variable refers to your local machine, which is rarely acurate, especially if you intend to upload the static files to a different server... You have to explicitly assign the $url variable in the source of blosxom, or you can use this plugin as an alternative.
49 You can assign the $static_url variable in the config section, or use the prefs plugin (the alternative to the config plugin for static rendering) to define
50 $fix_static_url::static_url.
52 =head1 VERSION
54 2004-08-22blosxom2
56 =head2 CHANGES
58 2004-08-22blosxom2 : First published version
60 =head1 AUTHOR
62 Barijaona Ramaholimihaso <blosxom@barijaona.com>
64 =head1 SEE ALSO
66 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net
68 Blosxom Plugin Docs: http://blosxom.sourceforge.net/plugins/
70 =head1 BUGS
72 None known; please send bug reports and feedback to the Blosxom development mailing list <blosxom-devel@lists.sourceforge.net>.
74 =head1 COPYRIGHT
76 This program is free software; you can redistribute
77 it and/or modify it under the same terms as Perl itself.
79 =cut