/[pub]/suikawiki/script/misc/plugins/RandomJump.wp2
Suika

Diff of /suikawiki/script/misc/plugins/RandomJump.wp2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Tue Nov 25 12:45:31 2003 UTC revision 1.4 by wakaba, Sun Feb 1 12:12:45 2004 UTC
# Line 15  Plugin: Line 15  Plugin:
15        @@@script:Latn        @@@script:Latn
16      @@Mail:w@suika.fam.cx      @@Mail:w@suika.fam.cx
17    @Date.RCS: $Date$    @Date.RCS: $Date$
18      @RequiredModule[list]:
19        SuikaWiki::Output::HTTP
20      @RequiredPlugin[list]:
21        WikiLinking
22        WikiResource
23    
24  ViewDefinition:  ViewDefinition:
25    @Mode: RandomJump    @Mode: RandomJump
# Line 28  ViewDefinition: Line 33  ViewDefinition:
33        $self->{view}->init_db;        $self->{view}->init_db;
34        my @list = $self->{view}->{wiki}->{db}->keys ('content');        my @list = $self->{view}->{wiki}->{db}->keys ('content');
35                
36        my $uri = SuikaWiki::Plugin->_uri_wiki_page        my $uri = $self->{view}->{wiki}->uri_reference
37                    (join ('//', @{$list[rand @list]}),                    (page => $list[rand @list],
38                     up_to_date => 1, absolute => 1);                     up_to_date => 1);
39                
40        require SuikaWiki::Output::HTTP;        require SuikaWiki::Output::HTTP;
41        my $output = SuikaWiki::Output::HTTP->new (wiki => $self->{view}->{wiki});        my $output = SuikaWiki::Output::HTTP->new (wiki => $self->{view}->{wiki});
# Line 46  ViewFragment: Line 51  ViewFragment:
51    @Order: 110    @Order: 110
52    @Formatting:    @Formatting:
53      %link-to-wikipage (      %link-to-wikipage (
54        mode => RandomJump,        mode => RandomJump, up-to-date,
       up-to-date,  
55        rel => jump,        rel => jump,
56        label => {%link-to-it (        label => {%link-to-it (
57          label => {%res (name => GoSomewhere);}p,          label => {%res (name => GoSomewhere);}p,
# Line 62  ViewFragment: Line 66  ViewFragment:
66      @@@: "Go somewhere" link      @@@: "Go somewhere" link
67      @@lang:en      @@lang:en
68    @Formatting:    @Formatting:
69      %link-wiki(mode=>RandomJump,up-to-date,rel=>jump,      %link-wiki (mode => RandomJump, up-to-date,
70                 class=>randomlink,                  rel => jump, class => randomlink,
71                 title=>"%res(name=>GoSomewhereLink);"p);                  description => {%res(name=>GoSomewhereLink);}p);
72    
73  Resource:  Resource:
74    @GoSomewhere:    @GoSomewhere:

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24