Update perldocs in general plugins to point to current website/mailing list.
[blosxom-plugins.git] / general / seewritebacks
blob4636a572d05a7d4e71352eca2637d1f31e11c9fd
1 # Bloxsom Plugin:SeeWritebacks
2 # Author: Fletcher T. Penney
3 # Version: 0.3
5 package seewritebacks;
7 use CGI;
10 $seewritebacks = 0;
11 $writebacksform = "";
13 sub start {
14         1;
17 sub story {
18         my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
20         if ((CGI::param("seewritebacks")) || (CGI::param("plugin") eq 'writeback') || 
21 ($blosxom::path_info =~ /\./)) {
22                 $seewritebacks = 1;
23                 $writebacksform = &$blosxom::template($path,'writebacksform',$blosxom::flavour) || &$blosxom::template($path,'writebacksform','general');
24                 $writebacksform = &$blosxom::interpolate($writebacksform);
25         }
27         1;
33 __END__
36 =head1 NAME
38 Blosxom Plug-in: seewritebacks
40 =head1 DESCRIPTION
42 This plugin makes it easy to have a consistent writebacks interface to your
43 site, that is compatible with multiple themes.  For example, you can create a
44 blue flavor, and a red flavor for your site that change the appearance, but
45 still have writebacks enabled.  With the default writebacks plugin, this gets
46 complicated and requires a separate writebacks flavor for each primary flavor.
48 Well, say goodbye to that!!
50         1) Drop this plugin into your plugins directory.
51         2) Copy the writebacksform.general file to your flavor directory or your datadir.
52         3) Make sure you still have the writeback.$flavour file of your choosing installed
53         4) Put "$seewritebacks::writebacksform" at the end of your story.$flavor file
54         5) Make the following changes to your story.$flavor file:
55 Original:
56 (<a href="$url$path/$fn.$flavour">$writeback::count Comments</a>)
58 Modified:
59 (<a href="$url$path/$fn.$flavour?seewritebacks=y">$writeback::count Comments</a>)
61 Note that your story.flavor file may be slightly different.  You are adding
62 the ?seewritebacks=y to the url, which causes this plugin to act.
64         6) Repeat steps 4-5 for each flavor that you wish to update.
65     7) If you choose, you can create a writebacksform.$flavor file to
66        customize the appearance for each flavor, but this is unnecessary.
68 It sounds complicated, but it's not that bad.  If you have suggestions on how
69 to improve these instructions, let me know.
71 The upshot is that you can now have multiple flavors for your site that change
72 the appearance, and all of them can use writebacks, and plugins such as
73 breadcrumbs don't give unexpected results.
75 =head1 CHANGES
77 0.3     Forced interpolation as interpolate_fancy broke the previous
78 interpolation.  Thanks to Andy for this report.
80 0.2     Added a patch to allow the writebacks plugin to set $seewritebacks to 1 to
81 ensure that a comment is displayed as soon as it is posted
83 0.1     Initial Release
85 =head1 BUGS
87 None known; please send bug reports and feedback to the Blosxom
88 development mailing list <blosxom-devel@lists.sourceforge.net>.
90 =head1 AUTHOR
92 Fletcher T. Penney - http://fletcher.freeshell.org
94 This plugin is now maintained by the Blosxom Sourceforge Team,
95 <blosxom-devel@lists.sourceforge.net>.
97 =head1 LICENSE
99 This source is submitted to the public domain.  Feel free to use and modify
100 it.  If you like, a comment in your modified source attributing credit to
101 myself for my original work would be appreciated.
103 THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY OF ANY KIND.  USE AT
104 YOUR OWN RISK!