/[pub]/suikawiki/wikidata/suikawiki-config.ph
Suika

Diff of /suikawiki/wikidata/suikawiki-config.ph

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

revision 1.4 by w, Sun Jan 26 02:39:48 2003 UTC revision 1.12.4.3 by wakaba, Sat Mar 13 06:34:19 2004 UTC
# Line 1  Line 1 
1    =head1 NAME
2    
3    suikawiki-config.ph - SuikaWiki: Configuration for SuikaWiki HTTP CGI Driver
4    
5    =head1 DESCRIPTION
6    
7    This is a configuration file for SuikaWiki Driver for HTTP CGI Script
8    (SWHCS).  Basic options such as WikiDB directory mapping and
9    special purpose WikiPage names can be customized with this file.
10    
11    More complex customizing, e.g. modifying navigation bar or
12    adding new mode, is also possible by config.ph (generated from
13    config.wp2) and WikiPlugin modules.  For more information,
14    see <http://suika.fam.cx/~wakaba/-temp/wiki/wiki?SuikaWiki>.
15    
16    This file is part of SuikaWiki.
17    
18    =cut
19    
20    package wiki::driver::http;
21  use strict;  use strict;
22  #  use Message::Util::Error;
23  # You MUST modify following '$modifier_...' variables.  
24  #  push our @Config, sub ($) {
25  # our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.    my $WIKI = shift;
26  # our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.    use Cwd qw(abs_path);
27  #our $modifier_dbtype = 'Yuki::YukiWikiDB';     # Slow, available on all environment.    
28  #our $modifier_dbtype = 'Yuki::YukiWikiDB2';     # Slow, available on all environment.    ## -- Filesystem path mapping
29  our $modifier_dbtype = 'Yuki::YukiWikiDBMeta';     # Slow, available on all environment.    for (
30  our $url_cgi; {       [db__cache__dir          => q"./wikidata/lock/"],
31      my $scheme = 'http';       [db__cache_struct__file  => q"./wikidata/lock/struct.db"],
32      $scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#;       [db__content__dir        => q"./wikidata/page/"],
33      $url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}/~wakaba/suikawiki/wiki";       [db__content__error_log  => q"./wikidata/log/db-content.log"],
34          ## - MUST NOT include [&<>"] and/or non-URI characters       [db__bdb__home_dir       => q"./wikidata/lock/"],
35  }       [db__bdb__log_dir        => q"./wikidata/log/bdb/"],
36  our %uri = (       [db__bdb__log_file       => q"./wikidata/log/bdb.log"],
37    cookie_path   => '/~wakaba/suikawiki/',       [db__bdb__temp_dir       => q"./wikidata/lock/"],
38    external_script       => '../wiki/script/',       [db__lock__dir           => q"./wikidata/lock/"],
39  );       [db__lock__log_file      => q"./wikidata/log/lock.log"],
40  $uri{wiki} = $url_cgi;       [db__log__dir            => q"./wikidata/log/"],
41  $SuikaWiki::Plugin::plugin_directory = q(../wiki/lib/SuikaWiki/Plugin/);       [db__temp__dir           => q"./wikidata/lock/"],
42  our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script)    ) {
43    CachePrefix   => q(./wikidata/.cache.),      ## On system that does not set current directory as main script
44    WikiDataBase  => q(./wikidata/page),      ## directory, you should specify it instead of using "abs_path".
45  );      $WIKI->{config}->{path_to}->{$_->[0]} = abs_path $_->[1];
46  ##############################    }
47  our %PageName = (  
48    FrontPage     => 'HomePage',    ## -- WikiPlugin
49    IndexPage     => 'IndexPage',    push @{$WIKI->{event}->{plugin_manager_loaded}}, sub {
50    SearchPage    => 'SearchPage',      my $wiki = shift;
51    CreatePage    => 'CreatePage',      
52    ErrorPage     => 'ErrorPage',      ## Installed plugin modules
53    RecentChanges => 'RecentChanges',      $wiki->{plugin}->load_directory (qw(
54    AdminSpecialPage      => "\x11\x11Admin\x11Special\x11Page\x11\x11",        lib/SuikaWiki/Plugin/
55    UserAgentList => 'WikiUserAgentList',        misc/plugins/
56  );        misc/plugins/form/
57  our $kanjicode = 'euc';        misc/plugins/format/
58  our $lang = 'ja';        misc/plugins/link/
59          misc/plugins/view/
60  $wiki::useragent::UseLog = 0;   ## Use User-Agent name log (WikiUserAgentList) or not      ));
61  $wiki::diff::UseDiff = 1;       ## Use diff mode or not      
62        ## Configuration file as pseudo-plugin module
63  my %vd;      require 'wikidata/config.ph';
64  $vd{links} = <<'EOH';    };
65    %styles-wiki-html(page=>\"WikiStyleList:HTML\");  
66    %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>EditThisPageLink);\");    ## -- WikiDatabase: Mapping logical to physical
67    %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>AdminEditThisPageLink);\",add_param=>\"admin=1\");    push @{$WIKI->{event}->{database_loaded}}, sub {
68    %link-wiki(rel=>view,class=>wiki-cmd,title=>\"%res(name=>ViewThisPageLink);\",up_to_date);        my $wiki = shift;
69    %link-wiki(rel=>myself,class=>wiki,title=>\"%res(name=>GoToMyselfLink);\");        
70    %link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>\"%res(name=>GoToIndexPageLink);\");        ## Main content
71    %link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>\"%res(name=>GoToHomePageLink);\");        $wiki->{db}->_set_prop_db (content => {-db_open => sub {
72    %link-wiki(page=>WikiNews,rel=>News,class=>wiki,title=>\"%res(name=>GoToWikiNewsLink);\");          require SuikaWiki::DB::FileSystem::YukiWikiDBNS;
73    %link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>\"%res(name=>GoToRecentChangesLink);\");          SuikaWiki::DB::FileSystem::YukiWikiDBNS->new
74    %link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>\"%res(name=>GoToRssPageLink);\",type=>\"application/xml\");            (directory => $wiki->{config}->{path_to}->{db__content__dir},
75    %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\");             logfile   => $wiki->{config}->{path_to}->{db__content__error_log},
76    %link-wiki(page=>WikiHelp,mode=>read,rel=>help,class=>wiki,title=>\"%res(name=>GoToWikiHelpLink);\");             suffix    => '.txt',
77    %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\");             -lock => $wiki->{var}->{db}->{lock_prop}->('content'));
78    %link-wiki(mode=>map,rel=>contents,class=>wiki-cmd,title=>\"%res(name=>ShowMapOfThisPageLink);\");        }, -db_close => sub {
79    %link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\"wiki randomlink\",title=>\"%res(name=>GoSomewhereLink);\");          my %opt = @_;
80  EOH          $opt{prop_info}->{-db}->close;
81    #%link-viewcvs(href=>\"http://path-to-viewcvs/path-to-repository/\",rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewHistoryOfThisPageLink);\",hreflang=>en);          delete $opt{prop_info}->{-db};
82  $vd{links} .= q(  %link-wiki(mode=>diff,rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewDiffOfThisPageLink);\");) if $wiki::diff::UseDiff;        }});
83  $vd{links} .= <<EOH;        
84    %link-wiki(href=>\\\"javascript:var%20WikiName=prompt('Please%20input%20the%20WikiName:','','Jump%20to%20SuikaWiki');if(WikiName)%7B_content.location.href='$url_cgi%3F'+encodeURIComponent(WikiName)%7D\\\",rel=>jump,class=>wiki-cmd,title=>\\\"%res(name=>JumpToLink);\\\");        ## Last modified
85    %link-wiki(href=>\\\"javascript:var%20WikiName=prompt('Please%20input%20the%20WikiName:','','Jump%20to%20SuikaWiki');if(WikiName)%7B_content.location.href='$url_cgi%3Fmycmd=edit;mypage='+encodeURIComponent(WikiName)%7D\\\",rel=>jump,class=>wiki-cmd,title=>\\\"%res(name=>JumpToEditLink);\\\");        $wiki->{db}->_set_prop_db (lastmodified => {-db_open => sub {
86  EOH          require SuikaWiki::DB::FileSystem::SuikaWikiMetaInfo09;
87  $vd{navbar} = <<'EOH';          SuikaWiki::DB::FileSystem::SuikaWikiMetaInfo09->new
88    %anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>\\\"%res(name=>EditThisPage);\\\",title=>\\\"%res(name=>EditThisPageLong,accesskey=>E);\\\");            (directory => $wiki->{config}->{path_to}->{db__content__dir},
89    %anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>\\\"%res(name=>ViewThisPage);\\\",title=>\\\"%res(name=>ViewThisPageLong);\\\");             -lock => $wiki->{var}->{db}->{lock_prop}->('lastmodified'));
90    %anchor-wiki(page=>CreatePage,class=>wiki,label=>\\\"%res(name=>GoToCreatePage);\\\",title=>\\\"%res(name=>GoToCreatePageLong);\\\");        }, -prop => 'last_modified', -db_close => sub {
91    %anchor-wiki(page=>IndexPage,class=>wiki,label=>\\\"%res(name=>GoToIndexPage);\\\",title=>\\\"%res(name=>GoToIndexPageLong);\\\");          my %opt = @_;
92    %anchor-wiki(page=>HomePage,class=>wiki,label=>\\\"%res(name=>GoToHomePage);\\\",title=>\\\"%res(name=>GoToHomePageLong);\\\");          $opt{prop_info}->{-db}->close;
93    %anchor-wiki(page=>SearchPage,class=>wiki,label=>\\\"%res(name=>GoToSearchPage);\\\",title=>\\\"%res(name=>GoToSearchPageLong);\\\");          delete $opt{prop_info}->{-db};
94    %anchor-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\\\"wiki randomlink\\\",label=>\\\"%res(name=>GoSomewhere);\\\",title=>\\\"%res(name=>GoSomewhereLong);\\\");        }});
95    %anchor-wiki(page=>RecentChanges,class=>wiki,label=>\\\"%res(name=>GoToRecentChanges);\\\",title=>\\\"%res(name=>GoToRecentChangesLong);\\\");        
96  EOH        ## Cache DBs
97          require SuikaWiki::DB::FileSystem::SuikaWikiCache09;
98  our %ViewDefinition = (        my $cachedb = SuikaWiki::DB::FileSystem::SuikaWikiCache09->new
99  read => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1},              (directory => $wiki->{config}->{path_to}->{db__cache__dir});
100    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120},        $wiki->{db}->_set_prop_db (m__search_result =>
101    template => <<EOH},          {-db => $cachedb, -prop => 'search_result', -db_close => sub {
102  %html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}");            my %opt = @_;
103  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"            $opt{prop_info}->{-db}->close;
104    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");            delete $opt{prop_info}->{-db};
105    %section(level=>2,id=>read,add_to_toc=>0,content=>\\"%read(comment);\\");          }});
106    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");        $wiki->{db}->_set_prop_db (wpp__headsummary =>
107    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");          {-db => $cachedb, -prop => 'headsummary', -db_close => sub {
108    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");            my %opt = @_;
109    %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\");            $opt{prop_info}->{-db}->close;
110    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");            delete $opt{prop_info}->{-db};
111    %section(id=>footer,add_to_toc=>0,content=>\\"          }});
112      <a href=\\\\\\"http://www.hyuki.com/yukiwiki/\\\\\\" title=\\\\\\"YukiWiki 2.0.beta1.2002-05-29 &copy; 2000-2002 by Hiroshi Yuki\\\\\\">%res(name=>\\\\\\"About:Name:YukiWiki\\\\\\");</a>        $wiki->{db}->_set_prop_db (ref__item_template =>
113      <a href=\\\\\\"http://digit.que.ne.jp/work/\\\\\\" title=\\\\\\"WalWiki 2.0.beta1.wal.1 &copy; 2000-2002 by Makio Tsukamoto\\\\\\">%res(name=>\\\\\\"About:Name:WalWiki\\\\\\");</a>          {-db => $cachedb, -prop => 'refereritem', -db_close => sub {
114      <a href=\\\\\\"http://suika.fam.cx/gate/cvs/wakaba/wiki/\\\\\\" title=\\\\\\"%res(name=>\\\\\\"About:SuikaWiki:JumpToCVS\\\\\\");\\\\\\">%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;</a>            my %opt = @_;
115    \\");            $opt{prop_info}->{-db}->close;
116  %apply-user-preferred-style;");%html-end;            delete $opt{prop_info}->{-db};
117  EOH          }});
118  map => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1},        
119    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120},        ## Berkely DB Environment Preparation
120    template => <<EOH},        use BerkeleyDB;
121  %html-start;%html-head(title=>"%res(name=>\\"Map:WebPageTitle\\");",link_meta=>"$vd{links}");        my $bdbenv = new BerkeleyDB::Env
122  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"           -Home => $wiki->{config}->{path_to}->{db__bdb__home_dir},
123    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");           -Config => {
124    %section(level=>2,id=>\\"link-map\\",title=>\\"Map:Title\\",heading,content=>\\"             DB_DATA_DIR => $wiki->{config}->{path_to}->{db__content__dir},
125      <p>%res(name=>\\\\\\"Map:Description\\\\\\");</p>             DB_LOG_DIR => $wiki->{config}->{path_to}->{db__bdb__log_dir},
126      %link-map;             DB_TMP_DIR => $wiki->{config}->{path_to}->{db__bdb__temp_dir},
127    \\");           },
128    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");           -ErrFile => $wiki->{config}->{path_to}->{db__bdb__log_file},
129    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");           -Flags => DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL,
130    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");           -Verbose => $wiki->{config}->{debug}->{db};
131    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");  
132    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");        $wiki->{db}->_set_prop_db (content__structured => {-db_open => sub {
133  %apply-user-preferred-style;");%html-end;          require SuikaWiki::DB::Hash;
134  EOH          new SuikaWiki::DB::Hash constructor => sub {
135              use MLDBM qw(BerkeleyDB::Hash);# Storable);
136  edit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},            tie my %mldb, 'MLDBM',
137    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},                          -Filename => $wiki->{config}->{path_to}
138    template => <<EOH},                                            ->{db__cache_struct__file},
139  %html-start;%html-head(title=>"%res(name=>\\"Edit:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");                          -Env => $bdbenv,
140  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"                          -Flags => DB_CREATE,
141    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");                          -Mode => 0644;
142    %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"            \%mldb;
143      %edit-form;         };
144      %section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\");        }});
145    \\");        
146    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");        ## Referer Database (See Referer plugin module)
147    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");        $wiki->{db}->_set_prop_db (referer => {-db_open => sub {
148    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");          require SuikaWiki::DB::Hash;
149    %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\");          new SuikaWiki::DB::Hash constructor => sub {
150    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");            tie my %db, 'BerkeleyDB::Hash',
151    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");                          -Filename => 'referer.db',
152  %apply-user-preferred-style;");%html-end;                          -Env => $bdbenv,
153  EOH                          -Flags => DB_CREATE,
154  adminedit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},                          -Mode => 0644;
155    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},            \%db;
156    template => <<EOH},         };
157  %html-start;%html-head(title=>"%res(name=>\\"Edit:Admin:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");        }});
158  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
159    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");        ## HTTP Request Logging Database (See RequestLog plugin module)
160    %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\");        $wiki->{db}->_set_prop_db (log__http_request => {-db_open => sub {
161    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");          require SuikaWiki::DB::Hash;
162    %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\");          new SuikaWiki::DB::Hash constructor => sub {
163    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");            tie my %db, 'BerkeleyDB::Hash',
164  %apply-user-preferred-style;");%html-end;                          -Filename => 'http-request-log.db',
165  EOH                          -Env => $bdbenv,
166  -conflict => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},                          -Flags => DB_CREATE,
167    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},                          -Mode => 0644;
168    template => <<EOH},            \%db;
169  %html-start;%html-head(title=>"%res(name=>\\"Edit:Conflict:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");         };
170  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"        }});
171    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");        
172    %section(level=>2,id=>edit-conflict,title=>\\"Edit:Conflict:Title\\",heading,content=>\\"        ## Additional WikiDB properties should be defined here
173      <p>%res(name=>\\\\\\"Edit:Conflict:Description\\\\\\");</p>        # ...    
174      %conflict-form;    };
175      %section(level=>3,id=>edit-conflict-diff,title=>\\\\\\"Edit:Conflict:Diff:Title\\\\\\",heading,content=>\\\\\\"  
176        <p>%res(name=>\\\\\\\\\\\\\\"Edit:Conflict:Diff:Description\\\\\\\\\\\\\\");</p>    push @{$WIKI->{event}->{input_close}}, sub {
177        %conflict-diff;      my ($wiki, $event) = @_;
178      \\\\\\");      try {
179    \\");        SuikaWiki::Plugin->module_package ('Referer')
180    %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"                       ->add_referer (wiki => $wiki,
181      <p>%res(name=>\\\\\\"Edit:Conflict:Edit:Description\\\\\\");</p>                                      uri => $wiki->{input}->meta_variable
182      %edit-form;                                               ('HTTP_REFERER'));
183      %section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\");      } catch SuikaWiki::Plugin::error with {
184    \\");        my $err = shift;
185    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");        $err->raise unless $err->{-type} eq 'PLUGIN_NOT_FOUND';
186    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");      };
187    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");      try {
188    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");        SuikaWiki::Plugin->module_package ('RequestLog')
189    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");                       ->http_request_log (wiki => $wiki,
190  %apply-user-preferred-style;");%html-end;                                           prop => 'log__http_request');
191  EOH      } catch SuikaWiki::Plugin::error with {
192  -wrote => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},        my $err = shift;
193    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},        $err->raise unless $err->{-type} eq 'PLUGIN_NOT_FOUND';
194    template => <<EOH},      };
195  %html-start;%html-head(title=>"%res(name=>\\"Edit:Wrote:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");    };
196  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
197    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");    ## -- WikiName of special purpose WikiPages
198    <p>%res(name=>\\"Edit:SavedSuccessfully\\");</p>    $WIKI->{config}->{page} = {
199    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");      Default         => $WIKI->name ([qw/HomePage/]),
200  %apply-user-preferred-style;");%html-end;      InterWikiName   => $WIKI->name ([qw/Wiki InterWikiName/]),
201  EOH      NewPageTemplate => $WIKI->name ([qw/Wiki NewPageTemplate/]),
202  -deleted => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},      'StyleSheetList(text/html)' => $WIKI->name ([qw<Wiki Style List text/html>]),
203    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},    };
204    template => <<EOH},    
205  %html-start;%html-head(title=>"%res(name=>\\"Edit:Deleted:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");    ## -- WikiNamespace constants
206  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"    $WIKI->{config}->{name}->{space} = {
207    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");      separator => '//',
208    <p>%res(name=>\\"Edit:PageIsDeletedSuccessfully\\");</p>      separator_reg => qr#\s*//\s*#,
209    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");      self => '.',
210  %apply-user-preferred-style;");%html-end;      parent => '..',
211  EOH    };
212  -error => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},    
213    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},    ## -- Default character codes
214    template => <<EOH},    $WIKI->{config}->{charset} = {
215  %html-start;%html-head(title=>"%res(name=>\\"Error:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");      ## Internal code - MUST be ASCII + 8bit coding scheme
216  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"        internal => 'euc-jp',
217    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");      ## Default output code
218    %section(level=>2,id=>error,title=>\\"Error:Title\\",heading,content=>\\"        output => 'iso-2022-jp',
219      <p>%error-message;</p>      ## "query" part in URI reference
220    \\");        uri_query => '', # auto-detected
221    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");        uri_query_encode => 'euc-jp',     ## For compatibility w/ SuikaWiki 2
222    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");        uri_param => '', # auto-detected
223  %apply-user-preferred-style;");%html-end;        uri_param_encode => 'euc-jp',     ## For compatibility w/ SuikaWiki 2
224  EOH      ## PATH_INFO part in URI reference
225          uri_path_info => 'x-utf-8-10646', ## Reserved for future use
226  css => {media => {type => 'text/css', charset => 1, expires => 3600},      ## Fragment identifier in URI reference
227    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 },        uri_fragment => 'x-punycode',     ## Reserved for possible future use
228    template => '%read(to=>CSS);'},    };
229  rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600},    
230    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 },    ## -- Expires duration templates
231    template => '%read(to=>RSS);'},    $WIKI->{config}->{entity}->{expires} = {
232  -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1},      edit      => {delta => 60},
233    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1},      view      => {delta => 2*3600},
234    check => sub {1}, template => <<EOH},      lm_flaged => {delta => 30*24*3600},
235  %html-start;%html-head(title=>"%page-name;",link_meta=>"$vd{links}");      stylesheet => {delta => 30*24*3600},
236  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"      error     => {delta => 60},
237    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");    };
238    %section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\"  
239      %res(name=>\\\\\\"UnsupportedMediaType:Description\\\\\\");    ## -- Debug mode
240    \\");    $WIKI->{config}->{debug} = {
241    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");      general => 0,
242    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");      db => 0,
243    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");      format => 0,
244    %section(class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");      view => 0,
245    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");    };
246  %apply-user-preferred-style;");%html-end;  
247  EOH  };
248  );  
249    =head1 SEE ALSO
250    
251  $ViewDefinition{diff} = {media => {type => 'text/html', charset => 1, expires => 120},  C<lib/suikawiki.pl>, C<wiki.cgi>,
252    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120},  <http://suika.fam.cx/~wakaba/-temp/wiki/wiki?SuikaWiki>,
253    template => <<EOH, check => sub {1}} if $wiki::diff::UseDiff;  <http://suika.fam.cx/~wakaba/-temp/wiki/wiki?SWHCS>
254  %html-start;%html-head(title=>"%res(name=>\\"Diff:WebPageTitle\\");",link_meta=>"$vd{links}");  
255  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  =head1 LICENSE
256    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");  
257    %section(level=>2,id=>\\"diff\\",title=>\\"Diff:Title\\",heading,content=>\\"  Copyright 2003-2004 Wakaba <w@suika.fam.cx>.  All rights reserved.
258      <p>%res(name=>\\\\\\"Diff:Notice\\\\\\");</p>  
259      %diff-between-previous;  This program is free software; you can redistribute it and/or
260    \\");  modify it under the same terms as Perl itself.
261    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");  
262    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");  =cut
   %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
   
 $ViewDefinition{WithMenu} = {%{$ViewDefinition{read}}, template => <<EOH};  
 %html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}");  
 %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
   <div id=\\\"myuri\\\">%uri-wiki();</div>  
   %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"  
     %anchor-wiki(rel=>view,up_to_date,mode=>default,class=>wiki-cmd,label=>\\\\\\"%res(name=>ReloadThisPage);\\\\\\",title=>\\\\\\"%res(name=>ReloadThisPageLong);\\\\\\");  
     $vd{navbar}  
   \\");  
   %section(level=>2,id=>side-menu,add_to_toc=>0,content=>\\"%read(page=>WikiMenuBar);\\");  
   %section(id=>content-frame,add_to_toc=>0,content=>\\"  
     %section(level=>2,id=>read,add_to_toc=>0,content=>\\\\\\"%read(comment);\\\\\\");  
     %section(level=>2,id=>\\\\\\"see-also\\\\\\",title=>SeeAlso,heading,content=>\\\\\\"%search-result;\\\\\\");  
     %section(level=>2,id=>referer,title=>Referer,heading,content=>\\\\\\"%referer-list;\\\\\\");  
     %section(level=>2,id=>toc,title=>\\\\\\"TOC:Title\\\\\\",heading,add_to_toc=>0,content=>\\\\\\"%toc(drag);\\\\\\");  
     %section(id=>last-modified,add_to_toc=>0,content=>\\\\\\"%res(name=>\\\\\\\\\\\\\\"LastModified=\\\\\\\\\\\\\\");%last-modified;\\\\\\");  
     %section(id=>footer,add_to_toc=>0,content=>\\\\\\"  
       <a href=\\\\\\\\\\\\\\"http://www.hyuki.com/yukiwiki/\\\\\\\\\\\\\\" title=\\\\\\\\\\\\\\"YukiWiki 2.0.beta1.2002-05-29 &copy; 2000-2002 by Hiroshi Yuki\\\\\\\\\\\\\\">%res(name=>\\\\\\\\\\\\\\"About:Name:YukiWiki\\\\\\\\\\\\\\");</a>  
       <a href=\\\\\\\\\\\\\\"http://digit.que.ne.jp/work/\\\\\\\\\\\\\\" title=\\\\\\\\\\\\\\"WalWiki 2.0.beta1.wal.1 &copy; 2000-2002 by Makio Tsukamoto\\\\\\\\\\\\\\">%res(name=>\\\\\\\\\\\\\\"About:Name:WalWiki\\\\\\\\\\\\\\");</a>  
       <a href=\\\\\\\\\\\\\\"http://suika.fam.cx/gate/cvs/wakaba/wiki/\\\\\\\\\\\\\\" title=\\\\\\\\\\\\\\"%res(name=>\\\\\\\\\\\\\\"About:SuikaWiki:JumpToCVS\\\\\\\\\\\\\\");\\\\\\\\\\\\\\">%res(name=>\\\\\\\\\\\\\\"About:Name:SuikaWiki\\\\\\\\\\\\\\"); %wiki-version;</a>  
     \\\\\\");  
   \\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
263    
264  1;  1; # $Date$

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24