2 # Author(s): Rael Dornfest <rael@oreilly.com>
4 # Documentation: See the bottom of this file or type: perldoc readme
8 # --- Configurable variables -----
10 # What bit of the URL should I treat as username?
11 # Be sure the username bit is caught by the first () in the regular expression,
12 # e.g. /~(.*)/weblog matches "sam" in http://www.example/~sam/weblog
14 my $url_match = q!/~(.*?)/weblog!;
16 # Where should I look for the user's Blosxom data directory ($datadir)?
17 # Assume $username is populated by the results of the regular expression match
18 # above, e.g. /home/sam/weblog
20 my $user_datadir = q!/home/$username/weblog!;
22 # Where should plug-ins keep their state for each user?
23 # You should create this directory for them or no state will be saved.
25 my $user_plugin_state_dir = q!/home/$username/.weblog/plugins/state!;
27 # --------------------------------
29 use CGI qw/:standard/;
32 url() =~ /$url_match/ or return 0;
35 $blosxom::datadir = $user_datadir and $blosxom::datadir =~ s!\$username!$username!;
36 $blosxom::plugin_state_dir = $user_plugin_state_dir and $blosxom::plugin_state_dir =~ s!\$username!$username!;
52 This plug-in is designed for the ISP looking to provide Blosxom weblogs to all of its users.
54 It traps URLs of the form /~username/weblog (as defined by $url_match), setting
55 $blosxom::datadir to an appropriate directory (as defined by $user_datadir) in
56 "username"'s home directory.
60 Be sure this plug-in sits BEFORE all other plug-ins. To force this, rename it
63 This plugin works in concert with the "config" plug-in, without which it
64 won't allow individual users to override the global Blosxom configuration by
65 placing config files in their $datadir.
67 Aside from this simple renaming, about all that should be needed is to
68 ScriptAlias /~username/weblog to /cgi-bin/blosxom.cgi, replacing the paths as
69 appropriate to your particular setup, of course.
73 Be sure to choose a $user_datadir _outside_ of the user's personal
74 Web-accessible document-root. In other words, don't use a $user_datadir of
75 /home/$username/www/weblog or the like, where anything under /home/$username/www
80 This plug-in doesn't allow for users to add their own plug-ins to their own plugin directories. There's a race condition in this I've not yet worked my way around, but I have it in mind.
86 Version number coincides with the version of Blosxom with which the
87 current version was first bundled.
91 Rael Dornfest <rael@oreilly.com>, http://www.raelity.org/
95 Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
97 Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
101 Address bug reports and comments to the Blosxom mailing list
102 [http://www.yahoogroups.com/group/blosxom].
106 Blosxom and this Blosxom Plug-in
107 Copyright 2003, Rael Dornfest
109 Permission is hereby granted, free of charge, to any person obtaining a
110 copy of this software and associated documentation files (the "Software"),
111 to deal in the Software without restriction, including without limitation
112 the rights to use, copy, modify, merge, publish, distribute, sublicense,
113 and/or sell copies of the Software, and to permit persons to whom the
114 Software is furnished to do so, subject to the following conditions:
116 The above copyright notice and this permission notice shall be included
117 in all copies or substantial portions of the Software.
119 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
122 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
123 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
124 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
125 OTHER DEALINGS IN THE SOFTWARE.