# Formatter for Blosxom Plugin 'submission' # Author(s): DJ Adams # Receives a hashref parameter name/values from a POSTed HTML form # and creates the content for a new blosxom entry file, with a title # and a nice bit of HTML containing the Blosxom plugin information # submitted (name, author, category, description, URL). It returns # a suggestion for the filename too. package article; sub format { my ($pkg, $formref) = @_; # Take filename and title from this parameter my $titleparam = 'name'; my $getdate = `date '+%m_%d_%y_%H_%M_%S'`; chomp ($getdate); my $name = $getdate || $$; my $content = "

".$formref->{name}."

\n"; $content .= "

\n"; $content .= "".$formref->{url}."\n" if ($formref->{email} ne ""); $content .= "

\n"; $content .= "".$formref->{description}."\n"; $content .= "

\n"; $content .= "

\n"; return ($name, $content); } 1;