#?SuikaWikiConfig/2.0 Plugin: @Name: WikiFormCommentInput @FullName: WikiForm: Annotation @Description: @@@: WikiFormCommentInput plugin module provides some WikiForm input forms and processing rules to provide WikiPage annotation form. @@lang: en @License: %%Perl%% @Author[list]: Wakaba @Date.RCS: $Date: 2004/03/29 03:00:52 $ @RequiredModule[list]: WikiFormCore @Use: my $WIKIRESOURCE; PluginConst: @NS_XHTML1: http://www.w3.org/1999/xhtml @WIKIRESOURCE: {($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))} FormattingRule: @Category[list]: form-template @Name: name @Description: @@@: Inserting inputer "name" with SuikaWiki/0.9 emphasis and link. \ Note: This rule is provided for compatibility with SuikaWiki 2. @@lang: en @Parameter: @@Name: source @@Type: ID @@Default: "name" @@Description: @@@@: Input field name @@@lang: en @After: my $name = $o->{wiki}->{input}->parameter ('wikiform__'.($p->{source} || 'name')); unless (length $name) { WHOLETREE: for (@{$o->{var}->{sw09__document_tree}->child_nodes}) { if ($_->node_type eq '#element' and $_->local_name eq 'head') { for (@{$_->child_nodes}) { if ($_->node_type eq '#element' and $_->local_name eq 'parameter') { if ($_->get_attribute_value ('name', default => '') eq 'default-name') { for (@{$_->child_nodes}) { if ($_->node_type eq '#element' and $_->local_name eq 'value') { $name = $_->inner_text; last WHOLETREE; } } last WHOLETREE; } } } } } } unless (length $name) { $name = $WIKIRESOURCE->get (name => 'WikiForm:WikiComment:DefaultName', o => $o, wiki => $o->{wiki}); } if ($name =~ />>\d/ or $name =~ /^\d+$/) { $p->{-result} .= $name; } else { $p->{-result} .= "[[$name]]"; } FormattingRule: @Category[list]: form-template @Name: date @Description: @@@: Current date and time. \ Note that this rule is provided for compatibility with SuikaWiki 2. This rule should be reimplemented. @@lang: en @After: my @time = gmtime (time); $p->{-result} .= sprintf '%04d-%02d-%02d %02d:%02d:%02d +00:00', $time[5]+1900,$time[4]+1,@time[3,2,1,0]; Resource: @WikiForm:WikiComment:DefaultName: @@@: AnonymousCoward @@lang: en