use strict; package SuikaWiki::Plugin::Registry; our %Info; $Info{q#RandomJump#}->{Name} = q#RandomJump#; $Info{q#RandomJump#}->{q#Version#} = q#2004.0831.0328#; $Info{q#RandomJump#}->{q#InterfaceVersion#} = q#2.9.1#; $Info{q#RandomJump#}->{q#mkpluginVersion#} = q#2.1.19#; $Info{q#RandomJump#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::RandomJump1040731032805VWQ1#; $Info{q#RandomJump#}->{q#Date.RCS#} = q#$Date: 2010/05/16 23:05:49 $#; $Info{q#RandomJump#}->{RequiredPlugin} = [q#WikiLinking#, q#WikiResource#]; $Info{q#RandomJump#}->{RequiredModule} = [q#SuikaWiki::Output::HTTP#]; $Info{q#RandomJump#}->{Description} = [[q#This plugin module provides "random jump" functions to select wiki pages randomly.#, q#en#, q##]]; $Info{q#RandomJump#}->{License} = [[q#%%Perl%%#, q##, q##]]; $Info{q#RandomJump#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [q#w@suika.fam.cx#], [q##]]]; push @SuikaWiki::View::Implementation::CommonViewDefs, { condition => {q#mode#, q#RandomJump#, q#output#, q#http-cgi#}, object_class => q#SuikaWiki::Plugin::plugin::RandomJump1040731032805VWQ1::RandomJump1040731032805f3Tu#, }; package SuikaWiki::Plugin::plugin::RandomJump1040731032805VWQ1::RandomJump1040731032805f3Tu; our @ISA = q#SuikaWiki::View::template#; sub main ($$) { my ($self, $opt, $opt2) = @_; #line 1 "(WikiPlugin module source RandomJump.wp2, block ViewDefinition[Mode='RandomJump']/method[Name='main'])" $self->{view}->init_db; my @list = $self->{view}->{wiki}->{db}->keys ('content'); my $uri = $self->{view}->{wiki}->uri_reference (page => $self->{view}->{wiki}->name ($list[rand @list]), up_to_date => 1); require SuikaWiki::Output::HTTP; my $output = SuikaWiki::Output::HTTP->new (wiki => $self->{view}->{wiki}); $output->set_redirect (uri => $uri, status_code => 307); $output->output (output => 'http-cgi');} #line 1 "(WikiPlugin module RandomJump, chunk 1)" push @{$SuikaWiki::View::Implementation::TemplateFragment{q#navbar#}}, { Main => q#%link-to-wikipage ( mode => RandomJump, up-to-date, rel => jump, label => {%link-to-it ( label => {%res (name => GoSomewhere);}p, description => {%res (name => GoSomewhereLong);}p, class => randomlink, );}, );#, Order => 110, Description => [[q#"Go somewhere" button on navigation bar#, q#en#, q##]], }; push @{$SuikaWiki::View::Implementation::TemplateFragment{q#links#}}, { Main => q#%link-wiki (mode => RandomJump, up-to-date, rel => jump, class => randomlink, description => {%res(name=>GoSomewhereLink);}p);#, Order => 0, Description => [[q#"Go somewhere" link#, q#en#, q##]], }; package SuikaWiki::Plugin::Resource; our $BaseResource; $BaseResource->{q#en#}->{q##}->{q#GoSomewhere#} = q#Lucky#; $BaseResource->{q#en#}->{q##}->{q#GoSomewhereLink#} = q#Go somewhere in this wiki#; $BaseResource->{q#en#}->{q##}->{q#GoSomewhereLong#} = q#Go somewhere in this wiki#; package SuikaWiki::Plugin::Registry; $Info{q#RandomJump#}->{provide} = {q#viewfragment#, [{q#Name#, q#navbar#}, {q#Name#, q#links#}], q#viewdef#, [{q#Description#, [q#Redirection to some WikiPage selected randomly#, q#en#, q##], q#Name#, q#RandomJump#}]}; 1;