Apache-MiniWiki
view release on metacpan or search on metacpan
MiniWiki.pm view on Meta::CPAN
Note #1: This may be a great way of integrating Apache::MiniWiki into
an existing site that already has it's own header/footer template system.
Note #2: This method assumes that the site administrator is already
using Apache::Registry to speed up CGI's on the site. If they aren't,
have them set up mod_perl as it was meant to be. See the mod_perl guide,
or try this:
ScriptAlias /perlcgi /path/to/your/cgi-bin/
<Location /perlcgi>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
</Location>
=head1 CONFIGURATION
If you want to use your own template for MiniWiki, you should place the
template in the RCS file template,v in the C<datadir>. Upon execution,
MiniWiki will check out this template and use it. If you make any
modifications to the RCS file, a new version will be checked out.
You can modify the template from within MiniWiki by visiting the URL
http://your.server.name/your-wiki-vroot/(edit)/template
If you don't install a template, a default one will be used.
The C<datadir> variable defines where in the filesystem that the RCS
files that MiniWiki uses should be stored. This is also where MiniWiki
looks for a template to use.
The C<vroot> should match the virtual directory that MiniWiki runs under.
If this variable is set, it should point to a standard htpasswd file
which MiniWiki has write access to. The function to change a users password
is then enabled.
(Optional) The default timezone is GMT-8 (PST). To change to a different timezone,
use the C<timediff> variable. Eg, to change to Amsterdam / Rome:
PerlAddVar timediff 1
(Optional) By default, only the template called template is used. This becomes
the default template for every page. Use the C<templates> variable to specify
more then one template:
PerlAddVar templates fvlug linux
By doing this, pages that contain those words will use the matching template.
For example, the /your-wiki-vroot/LinuxDatabases page will then use the template-linux page,
instead of template. You will need to create the template by going to
/wiki/your-wiki-vroot/(edit)/template-<the_template> first.
(Optional) To disable file uploads such as binary attachments and inline images,
set uploads to no. By default it is yes. Note that inline images requires the
Image::Magick module to be installed for generating thumbnails.
PerlAddVar uploads no
(Optional) Pre-caching can be done by a periodic (eg every 5 minutes) cronjob
to refresh the cached version of the .list* pages (see below) in the background,
rather then when Apache::Miniki discovers that the cache is old when a request is
done. To eanble:
PerlAddVar precaching yes
If you create the pages 'list' or 'listchanges' or 'listlinks', the following will
automatically get appended to them:
- list: A simple line deliminated list of
all the pages in the system
- listchanges: Ordered by date, gives a list of all pages
including the last comment, the number of lines
added or removed, and the date of the last change
- listlinks: Creates a list of all the inner/outer HTML links on the site,
grouped by page name. By using CSS and some JavaScript in your
template, it can become very easy to navigate around this way.
The master 'template' page does not show up in any of these three page
listings.
=head1 MULTIPLE WIKIS
Multiple wiki sites can easily be run on the same server. This can be done
by setting up multiple <Location> sections in the httpd.conf, with the
appropriate settings.
For an example of automating this using perl, see conf/httpd-perl-startup.pl
in the MiniWiki distribution for a sample mod_perl startup file.
=head1 TEMPLATE VARIABLES
These variables are passed by Apache::MiniWiki to HTML::Template:
vroot:
virtual root of the wiki installation. E.g.
/wiki
title:
the title of a page. Comes from the first line of text.
body:
HTMLified version of a wiki page
editlink:
Link to the edit page. E.g.:
http://www.nyetwork.org/wiki/(edit)/MiniWiki
loglink:
Link to the Archive page. e.g.:
http://www.nyetwork.org/wiki/(log)/MiniWiki
pageurl:
Fully qualified link to the page based on the last request, e.g.:
http://nyetwork.org:80/wiki/MiniWiki
lastmod:
date the page was last changed, e.g.:
March 18, 2003 4:25 PM
=head1 SEARCH ENGINES
Spiders for search engines (Google, OpenFind, etc) love the
bounty of links found in a Wiki. Unfortunely, they also follow
the Archive, Changes, View, and Revert links. This not only
( run in 1.208 second using v1.01-cache-2.11-cpan-d8267643d1d )