#?SuikaWikiConfig/2.0 Plugin: @Name: RandomJump @Description: @@@: This plugin module provides "random jump" functions to select wiki pages randomly. @@lang:en @License: %%GPL%% @Author: @@Name: @@@@:Wakaba @@@lang:ja @@@script:Latn @@Mail:w@suika.fam.cx @Date.RCS: $Date: 2003/10/25 02:22:06 $ ViewDefinition: @Mode: RandomJump @Condition: @@output: http-cgi @Description: @@@:Redirection to some WikiPage selected randomly @@lang:en @method: @@@: $self->{view}->init_db; my @list = $self->{view}->{wiki}->{db}->keys ('content'); my $uri = SuikaWiki::Plugin->_uri_wiki_page (join ('//', @{$list[rand @list]}), up_to_date => 1, absolute => 1); require SuikaWiki::Output::HTTP; my $output = SuikaWiki::Output::HTTP->new (wiki => $self->{view}->{wiki}); $output->set_redirect (uri => $uri, status_code => 303); $output->output (output => 'http-cgi'); @@Name: main ViewFragment: @Name: navbar @Description: @@@: "Go somewhere" button on navigation bar @@lang:en @Order: 110 @Formatting: %anchor-wiki(mode=>RandomJump,up-to-date,rel=>jump, class=>"wiki randomlink", label=>"%res(name=>GoSomewhere);"p, title=>"%res(name=>GoSomewhereLong);"p); ViewFragment: @Name: links @Description: @@@: "Go somewhere" link @@lang:en @Formatting: %link-wiki(mode=>RandomJump,up-to-date,rel=>jump, class=>"wiki randomlink", title=>"%res(name=>GoSomewhereLink);"p); Resource: @GoSomewhere: @@@: Lucky @@lang:en @GoSomewhereLink: @@@: Go somewhere in this wiki @@lang:en @GoSomewhereLong: @@@: Go somewhere in this wiki @@lang:en