# Blosxom v3 Plugin: graffiti # Author(s): Eric Davis foobargeek com> # $Id: Graffiti.pm,v 3.1 2004/05/28 16:35:56 edavis Exp $ # Documentation: See the bottom of this file or type: perldoc graffiti package Blosxom::Plugin::Graffiti; # --- Configurable variables ----- # set this to the file name used as the graffiti cache my $cachefile = "graffiti.dat"; # string separator inserted between entries in the text box my $entry_separator = "\n"; # size of the text box my $text_rows = "10"; my $text_cols = "16"; # size of the entry box my $entry_rows = "2"; my $entry_cols = "16"; # -------------------------------- use CGI qw/:standard/; sub Run { my $blosxom = shift; my $new_entry = param('graffiti_entry'); my $entry = ''; my @entries; my $display; my $realCachefile = "$blosxom->{settings}->{state_dir}/$cachefile"; $display .= qq{
\n}; $display .= qq{
\n}; $display .= qq{\n}; $display .= qq{\n}; $display .= qq{\n}; $display .= qq{
\n}; $display .= qq{
\n}; $blosxom->{state}->{Plugin}->{Graffiti}->{display} = $display; return 1; } 1; __END__ =head1 NAME Blosxom v3 Plugin: graffiti =head1 DESCRIPTION This plugin provides a simple text form that allows visitors to your site to add a brief comment, flame, kudo, splat, whatever. A B<$Plugin::Graffiti::display> variable is provided that contains two text boxes and a submit button. One box is used for entering in new text comments, and another that shows all previously entered text comments. The graffiti display can be modified via the following configuration variables: B<$entry_separator>: a string that is shown between all graffiti entries in the text box B<$text_rows>: the number of rows in the graffiti text area B<$text_cols>: the number of columns in the graffiti text area B<$entry_rows>: the number of rows in the graffiti new entry text area B<$entry_rows>: the number of columns in the graffiti new entry text area B<$cachefile>: the location of the cache file holding all the graffiti text The following class identifiers are used for CSS control of the graffiti display: B: the graffiti output as a whole B: the graffiti form - text boxes and submit button B: the graffiti text area B: the graffiti new entry text area B: the graffiti submit button To run this plugin simply drop this file into your Blosxom plugin directory and add B<$Plugin::Graffiti::Run> to your B file. =head1 VERSION 3.1 ported for use with Blosxom 3 =head1 VERSION HISTORY 3.1 ported for use with Blosxom 3 =head1 AUTHORS Eric Davis foobargeek com> http://www.foobargeek.com =head1 LICENSE This source is submitted to the public domain. Feel free to use and modify it. If you like, a comment in your modified source attributing credit for my original work would be appreciated. THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY OF ANY KIND. USE AT YOUR OWN RISK!