use strict; package SuikaWiki::Plugin::Registry; our %Info; $Info{q#WikiFormCommentInput#}->{Name} = q#WikiFormCommentInput#; $Info{q#WikiFormCommentInput#}->{q#Version#} = q#2004.0831.0328#; $Info{q#WikiFormCommentInput#}->{q#InterfaceVersion#} = q#2.9.1#; $Info{q#WikiFormCommentInput#}->{q#mkpluginVersion#} = q#2.1.19#; $Info{q#WikiFormCommentInput#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::WikiFormCommentInput10407310328074O6o#; $Info{q#WikiFormCommentInput#}->{q#Date.RCS#} = q#$Date: 2010/05/16 23:05:49 $#; $Info{q#WikiFormCommentInput#}->{RequiredModule} = [q#WikiFormCore#]; $Info{q#WikiFormCommentInput#}->{Description} = [[q#WikiFormCommentInput plugin module provides some WikiForm input forms and processing rules to provide WikiPage annotation form.#, q#en#, q##]]; $Info{q#WikiFormCommentInput#}->{License} = [[q#%%Perl%%#, q##, q##]]; $Info{q#WikiFormCommentInput#}->{Author} = [[[], [q##], [q##]]]; package SuikaWiki::Plugin::plugin::WikiFormCommentInput10407310328074O6o; #line 1 "(WikiPlugin module source comment.wp2, block Plugin/Use)" my $WIKIRESOURCE; #line 1 "(WikiPlugin module WikiFormCommentInput, chunk 1)" $SuikaWiki::Plugin::Rule{form_template}->{name} = {q#after#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; #line 1 "(WikiPlugin module source comment.wp2, block FormattingRule[name()='[q#form-template#]/name']/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 ||= SuikaWiki::Plugin->module_package ('WikiResource'))->get (name => 'WikiForm:WikiComment:DefaultName', o => $o, wiki => $o->{wiki}); } if ($name =~ />>\d/ or $name =~ /^\d+$/) { $p->{-result} .= $name; } else { $p->{-result} .= "[[$name]]"; }}, q#Parameter#, {q#source#, {q#Type#, q#ID#, q#Default#, q#"name"#, q#Description#, [[q#Input field name#, q#en#, q##]]}}, q#Description#, [[q#Inserting inputer "name" with SuikaWiki/0.9 emphasis and link. Note: This rule is provided for compatibility with SuikaWiki 2.#, q#en#, q##]]} #line 1 "(WikiPlugin module WikiFormCommentInput, chunk 2)" ; $SuikaWiki::Plugin::Rule{form_template}->{date} = {q#after#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; #line 1 "(WikiPlugin module source comment.wp2, block FormattingRule[name()='[q#form-template#]/date']/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];}, q#Parameter#, {}, q#Description#, [[q#Current date and time. Note that this rule is provided for compatibility with SuikaWiki 2. This rule should be reimplemented.#, q#en#, q##]]} #line 1 "(WikiPlugin module WikiFormCommentInput, chunk 4)" ; package SuikaWiki::Plugin::Resource; our $BaseResource; $BaseResource->{q#en#}->{q##}->{q#WikiForm:WikiComment:DefaultName#} = q#AnonymousCoward#; package SuikaWiki::Plugin::Registry; $Info{q#WikiFormCommentInput#}->{provide} = {q#rule#, {q#form_template#, [q#name#, q#date#]}}; 1;