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
15 # ---------------------------------------------------------
19 if ( $blosxom::static_or_dynamic eq 'static') {
20 $saveurl = $blosxom::url;
21 $blosxom::url = '*DEFANG_STATIC_URL*';
28 $blosxom::url= $static_url;
32 # for plugins who use $url before the head sub
33 $blosxom::output =~ s>\*DEFANG_STATIC_URL\*>$static_url>g;
41 Blosxom Plug-in: fix_static_url
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.
58 2004-08-22blosxom2 : First published version
62 Barijaona Ramaholimihaso <http://homepage.mac.com/barijaona>
66 Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
68 Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
72 This program is free software; you can redistribute
73 it and/or modify it under the same terms as Perl itself.