Skip to content

Commit

Permalink
Item2138: initial checkin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/MetaCommentPlugin@5084 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Sep 22, 2009
0 parents commit 7de2640
Show file tree
Hide file tree
Showing 13 changed files with 1,090 additions and 0 deletions.
36 changes: 36 additions & 0 deletions data/System/MetaCommentPlugin.txt
@@ -0,0 +1,36 @@
---+!! !MetaCommentPlugin
<!--
One line description, required for extensions repository catalog.
BuildContrib will fill in the SHORTDESCRIPTION with the value of
$SHORTDESCRIPTION from the .pm module, or you can redefine it here if you
prefer.
* Set SHORTDESCRIPTION = %$SHORTDESCRIPTION%
-->
%SHORTDESCRIPTION%

%TOC%

---++ Usage

---++ Examples

---++ Installation Instructions

%$INSTALL_INSTRUCTIONS%

---++ Info

Many thanks to the following sponsors for supporting this work:
* Acknowledge any sponsors here

| Author(s): | |
| Copyright: | &copy; |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| Dependencies: | %$DEPENDENCIES% |
| Home page: | Foswiki:Extensions/MetaCommentPlugin |
| Support: | Foswiki:Support/MetaCommentPlugin |

<!-- Do _not_ attempt to edit this topic; it is auto-generated. -->
51 changes: 51 additions & 0 deletions lib/Foswiki/Plugins/MetaCommentPlugin.pm
@@ -0,0 +1,51 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# Copyright (C) 2009 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
package Foswiki::Plugins::MetaCommentPlugin;

use strict;
use Foswiki::Func ();

our $VERSION = '$Rev$';
our $RELEASE = '0.1';
our $SHORTDESCRIPTION = 'An easy to use comment system';
our $NO_PREFS_IN_TOPIC = 1;
our $baseWeb;
our $baseTopic;
our $isInitialized;

sub initPlugin {
($baseTopic, $baseWeb) = @_;

Foswiki::Func::registerTagHandler('METACOMMENTS', \&METACOMMENTS);
Foswiki::Func::registerRESTHandler('comment', \&restComment);
$isInitialized = 0;
return 1;
}

sub init {
return if $isInitialized;
require Foswiki::Plugins::MetaCommentPlugin::Core;
$isInitialized = 1;
}

sub METACOMMENTS {
init();
Foswiki::Plugins::MetaCommentPlugin::Core::METACOMMENTS(@_);
}

sub restComment {
init();
Foswiki::Plugins::MetaCommentPlugin::Core::restComment(@_);
}

1;

0 comments on commit 7de2640

Please sign in to comment.