tagging: Allow using titles in for related stories.
[matthijs/upstream/blosxom-plugins.git] / general / tiki
1 # Blosxom Plugin: tiki
2 # Author(s): Rael Dornfest <rael@oreilly.com> 
3 # Version: 2.0b2
4 # Documentation: See the bottom of this file or type: perldoc tiki
5
6 package tiki;
7
8 # --- Configurable variables -----
9
10 # What flag in your weblog entries lets me know to turn on tiki translation?
11 my $tiki_on_flag = "<!-- tiki on -->";
12
13 # --------------------------------
14
15 use lib qq{$blosxom::plugin_dir/lib};
16
17 sub start {
18   eval "require Text::Tiki";
19   return $@ ? 0 : 1;
20 }
21
22 sub story {
23   my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
24
25   $$body_ref =~ s/$tiki_on_flag//mi or return 0;
26
27   my $processor=new Text::Tiki;
28   $$body_ref = $processor->format($$body_ref);
29   
30   return 1;
31 }
32
33 1;
34
35 __END__
36
37 =head1 NAME
38
39 Blosxom Plug-in: tiki
40
41 =head1 SYNOPSIS
42
43 Purpose: Provides Tiki [http://www.mplode.com/tima/archives/000215.html] 
44 formatting for Weblog entries.
45
46 Assumes $plugin_dir/lib/Text/Tiki.pm
47
48 =head1 VERSION
49
50 2.0b2
51
52 Version number coincides with the version of Blosxom with which the 
53 current version was first bundled.
54
55 =head1 AUTHOR
56
57 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
58
59 This plugin is now maintained by the Blosxom Sourceforge Team,
60 <blosxom-devel@lists.sourceforge.net>.
61
62 =head1 SEE ALSO
63
64 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
65
66 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
67
68 =head1 BUGS
69
70 None known; please send bug reports and feedback to the Blosxom
71 development mailing list <blosxom-devel@lists.sourceforge.net>.
72
73 =head1 LICENSE
74
75 Blosxom and this Blosxom Plug-in
76 Copyright 2003, Rael Dornfest 
77
78 Permission is hereby granted, free of charge, to any person obtaining a
79 copy of this software and associated documentation files (the "Software"),
80 to deal in the Software without restriction, including without limitation
81 the rights to use, copy, modify, merge, publish, distribute, sublicense,
82 and/or sell copies of the Software, and to permit persons to whom the
83 Software is furnished to do so, subject to the following conditions:
84
85 The above copyright notice and this permission notice shall be included
86 in all copies or substantial portions of the Software.
87
88 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
91 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
92 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
93 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
94 OTHER DEALINGS IN THE SOFTWARE.