Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.foswiki.org/trunk@1376 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
KennethLavrsen
authored and
KennethLavrsen
committed
Dec 15, 2008
1 parent
5ba8ce2
commit a1b215d
Showing
12 changed files
with
156 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# RenderFormPlugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ | ||
# | ||
# Copyright (C) 2008 Daniel Rohde | ||
# | ||
# For licensing info read LICENSE file in the Foswiki root. | ||
# 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. See the | ||
# GNU General Public License for more details, published at | ||
# http://www.gnu.org/copyleft/gpl.html | ||
# | ||
# As per the GPL, removal of this notice is prohibited. | ||
|
||
package Foswiki::Plugins::RenderFormPlugin; | ||
|
||
use strict; | ||
|
||
use vars qw( $VERSION $RELEASE $REVISION $debug $pluginName ); | ||
|
||
$VERSION = '$Rev$'; | ||
|
||
$RELEASE = 'Dakar'; | ||
|
||
$REVISION = '1.003'; #Kenneth Lavrsen# Changed to Foswiki name space | ||
#$REVISION = '1.002'; #dro# added layout feature; fixed date field bug; added missing docs; | ||
#$REVISION = '1.001'; #dro# changed topicparent default; added and fixed docs; fixed date field bug; fixed non-word character in field names bug; | ||
#$REVISION = '1.000'; #dro# initial version | ||
|
||
$pluginName = 'RenderFormPlugin'; | ||
|
||
sub initPlugin { | ||
my( $topic, $web, $user, $installWeb ) = @_; | ||
|
||
# check for Plugins.pm versions | ||
if( $Foswiki::Plugins::VERSION < 1.026 ) { | ||
Foswiki::Func::writeWarning( "Version mismatch between $pluginName and Plugins.pm" ); | ||
return 0; | ||
} | ||
|
||
# Plugin correctly initialized | ||
return 1; | ||
} | ||
|
||
sub commonTagsHandler { | ||
# do not uncomment, use $_[0], $_[1]... instead | ||
### my ( $text, $topic, $web ) = @_; | ||
|
||
Foswiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; | ||
|
||
## !! does not work: deep recursion bug: | ||
## use Foswiki::Contrib::JSCalendarContrib; | ||
## Foswiki::Contrib::JSCalendarContrib::addHEAD( 'foswiki' ); | ||
|
||
## eval { | ||
use Foswiki::Plugins::RenderFormPlugin::Core; | ||
$_[0] =~ s/\%RENDERFORM{(.*?)}\%/Foswiki::Plugins::RenderFormPlugin::Core::render($1,$_[1],$_[2])/ge; | ||
$_[0] =~ s/\%STARTRENDERFORMLAYOUT(.*?)STOPRENDERFORMLAYOUT\%//sg; | ||
### workaround for date fields: | ||
$_[0] =~ s/<\/body>/%INCLUDE{"%SYSTEMWEB%\/JSCalendarContribInline"}%<\/body>/i if ($Foswiki::Plugins::VERSION > 1.1) && ($_[0] !~ /JSCalendarContrib\foswiki.js/); | ||
##}; | ||
##Foswiki::Func::writeWarning($@) if $@; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...iki/Plugins/RenderFormPlugin/DEPENDENCIES → ...iki/Plugins/RenderFormPlugin/DEPENDENCIES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Dependencies for RenderFormPlugin | ||
# Example: | ||
# Time::ParseDate,>=2003.0211,cpan,Required. | ||
# TWiki::Plugins,>=1.15,perl,TWiki 4.1 release. | ||
# Foswiki::Plugins,>=1.15,perl,Foswiki 1.0 release. | ||
|
8 changes: 8 additions & 0 deletions
8
RenderFormPlugin/lib/Foswiki/Plugins/RenderFormPlugin/MANIFEST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Release manifest for RenderFormPlugin | ||
data/System/RenderFormPlugin.txt 0644 Documentation | ||
data/System/VarRENDERFORM.txt 0644 Documentation | ||
data/System/RenderFormPluginExampleForm.txt 0644 Documentation | ||
pub/System/RenderFormPlugin/example.gif 0644 Example image | ||
lib/Foswiki/Plugins/RenderFormPlugin.pm 0644 Perl module | ||
lib/Foswiki/Plugins/RenderFormPlugin/Core.pm 0644 Perl module | ||
|
Oops, something went wrong.