/[pub]/suikawiki/script/default/suikawiki-config.ph
Suika

Diff of /suikawiki/script/default/suikawiki-config.ph

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

revision 1.3 by w, Sun Jan 26 01:43:24 2003 UTC revision 1.6 by wakaba, Sat Oct 25 06:40:08 2003 UTC
# Line 1  Line 1 
1    package main;
2  use strict;  use strict;
 #  
 # You MUST modify following '$modifier_...' variables.  
 #  
 # our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.  
 # our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.  
 #our $modifier_dbtype = 'Yuki::YukiWikiDB';     # Slow, available on all environment.  
 #our $modifier_dbtype = 'Yuki::YukiWikiDB2';     # Slow, available on all environment.  
 our $modifier_dbtype = 'Yuki::YukiWikiDBMeta';     # Slow, available on all environment.  
 our $url_cgi; {  
     my $scheme = 'http';  
     $scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#;  
     $url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}/~wakaba/wiki/wiki";  
         ## - MUST NOT include [&<>"] and/or non-URI characters  
 }  
 our %uri = (  
   external_script       => 'script/',  
 );  
 $uri{wiki} = $url_cgi;  
 $SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/);  
 our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script)  
   CacheHeadline => q(./wikidata/.headline.cache),  
   CachePrefix   => q(./wikidata/.cache.),  
   CacheSearchResult     => q(./wikidata/.search.cache),  
   WikiDataBase  => q(./wikidata/page),  
 );  
 our $use_exists = 0; # If you can use 'exists' method for your DB.  
 ##############################  
 our %PageName = (  
   FrontPage     => 'HomePage',  
   IndexPage     => 'IndexPage',  
   SearchPage    => 'SearchPage',  
   CreatePage    => 'CreatePage',  
   ErrorPage     => 'ErrorPage',  
   RecentChanges => 'RecentChanges',  
   AdminSpecialPage      => "\x11\x11Admin\x11Special\x11Page\x11\x11",  
   UserAgentList => 'WikiUserAgentList',  
 );  
 our $kanjicode = 'euc';  
 our $lang = 'ja';  
3    
 $wiki::useragent::UseLog = 0;   ## Use User-Agent name log (WikiUserAgentList) or not  
 $wiki::diff::UseDiff = 1;       ## Use diff mode or not  
4    
5  ## Definition of views  ## URI (or part of URI) of Wiki CGI itself and its external addons
6            ## Note: If your Wiki CGI URI is <http://foo.example/path/to/wiki.cgi>,
7  my %vd;          ##              cookie-path: /path/to/
8  $vd{links} = <<'EOH';          ##              script-short-name: wiki.cgi
9    %styles-wiki-html(page=>\"WikiStyleList:HTML\");          ##       URI parts MUST NOT contains "&" and/or non-URI characters.
10    %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>EditThisPageLink);\");    our %uri = (
11    %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>AdminEditThisPageLink);\",add_param=>\"admin=1\");      cookie_path         => '/~wakaba/-temp/expwiki/',
12    %link-wiki(rel=>view,class=>wiki-cmd,title=>\"%res(name=>ViewThisPageLink);\",up_to_date);      external_script     => '../wiki/script/',
13    %link-wiki(rel=>myself,class=>wiki,title=>\"%res(name=>GoToMyselfLink);\");      script_short_name   => 'wiki',
14    %link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>\"%res(name=>GoToIndexPageLink);\");      ## If you use CVS repository of WikiDatabase,
15    %link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>\"%res(name=>GoToHomePageLink);\");      #cvs_repository     => 'http://path-to-viewcvs/path-to-repository/',
16    %link-wiki(page=>WikiNews,rel=>News,class=>wiki,title=>\"%res(name=>GoToWikiNewsLink);\");    );
17    %link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>\"%res(name=>GoToRecentChangesLink);\");    our $url_cgi = "http://".($main::ENV{HTTP_HOST} || $main::ENV{SERVER_NAME}.($main::ENV{SERVER_PORT}==80?'':":$main::ENV{SERVER_PORT}"))."$uri{cookie_path}$uri{script_short_name}";
18    %link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>\"%res(name=>GoToRssPageLink);\",type=>\"application/xml\");    $uri{wiki_abs} = $url_cgi;
19    %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\");    $uri{wiki} = qq($uri{cookie_path}$uri{script_short_name});    
20    %link-wiki(page=>WikiHelp,mode=>read,rel=>help,class=>wiki,title=>\"%res(name=>GoToWikiHelpLink);\");  
21    %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\");  ## Path to modules and databases
22    %link-wiki(mode=>map,rel=>contents,class=>wiki-cmd,title=>\"%res(name=>ShowMapOfThisPageLink);\");    push @main::INC, qw'lib ../wiki/lib lib';
23    %link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\"wiki randomlink\",title=>\"%res(name=>GoSomewhereLink);\");  
24  EOH    require SuikaWiki::Implementation;
25    #%link-viewcvs(href=>\"http://path-to-viewcvs/path-to-repository/\",rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewHistoryOfThisPageLink);\",hreflang=>en);    our $WIKI = SuikaWiki::Implementation->new;
26  $vd{links} .= q(  %link-wiki(mode=>diff,rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewDiffOfThisPageLink);\");) if $wiki::diff::UseDiff;  
27  $vd{links} .= <<EOH;    our %PathTo = (       ## Path to your data, from the main CGI script (NOT from this config script)
28    %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);\\\");      CachePrefix         => q(./wikidata/.cache.),  # WikiPlugin
29    %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);\\\");      TempPrefix  => q(./wikidata/.tmp.),            # WikiPlugin, Image
30  EOH      convert     => q(/usr/X11R6/bin/convert),      # Image
31  $vd{navbar} = <<'EOH';    );
32    %anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>\\\"%res(name=>EditThisPage);\\\",title=>\\\"%res(name=>EditThisPageLong,accesskey=>E);\\\");  
33    %anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>\\\"%res(name=>ViewThisPage);\\\",title=>\\\"%res(name=>ViewThisPageLong);\\\");  ## Filesystem path mapping
34    %anchor-wiki(page=>CreatePage,class=>wiki,label=>\\\"%res(name=>GoToCreatePage);\\\",title=>\\\"%res(name=>GoToCreatePageLong);\\\");    for (
35    %anchor-wiki(page=>IndexPage,class=>wiki,label=>\\\"%res(name=>GoToIndexPage);\\\",title=>\\\"%res(name=>GoToIndexPageLong);\\\");       [db__content__dir        => q"./wikidata/page"],
36    %anchor-wiki(page=>HomePage,class=>wiki,label=>\\\"%res(name=>GoToHomePage);\\\",title=>\\\"%res(name=>GoToHomePageLong);\\\");       [db__content__error_log  => q"./wikidata/log/db-content.log"],
37    %anchor-wiki(page=>SearchPage,class=>wiki,label=>\\\"%res(name=>GoToSearchPage);\\\",title=>\\\"%res(name=>GoToSearchPageLong);\\\");       [db__lock__dir           => q"./wikidata/lock/"],
38    %anchor-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\\\"wiki randomlink\\\",label=>\\\"%res(name=>GoSomewhere);\\\",title=>\\\"%res(name=>GoSomewhereLong);\\\");    ) {
39    %anchor-wiki(page=>RecentChanges,class=>wiki,label=>\\\"%res(name=>GoToRecentChanges);\\\",title=>\\\"%res(name=>GoToRecentChangesLong);\\\");      $WIKI->{config}->{path_to}->{$_->[0]} = $_->[1];
40  EOH    }
41    
42  our %ViewDefinition = (  ## Plugin
43  read => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1},    push @{$WIKI->{event}->{plugin_manager_loaded}}, sub {
44    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120},      ## Obsolete interface
45    template => <<EOH},      push @SuikaWiki::Plugin::plugin_directory, (
46  %html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}");          q(../wiki/lib/SuikaWiki/Plugin/),
47  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"          q(../wiki/misc/plugins/),
48    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");          q(lib/SuikaWiki/Plugin/),
49    %section(level=>2,id=>read,add_to_toc=>0,content=>\\"%read(comment);\\");          q(misc/plugins/),
50    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");      );
51    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");      SuikaWiki::Plugin->import_plugins ();
52    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");      require 'wikidata/config.ph';
53    %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\");    };
54    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");  
55    %section(id=>footer,add_to_toc=>0,content=>\\"  ## Database mapping
56      <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>    push @{$WIKI->{event}->{database_loaded}}, sub {
57      <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>        ## Main content
58      <a href=\\\\\\"http://suika.fam.cx/gate/cvs/wakaba/wiki/\\\\\\" title=\\\\\\"%res(name=>\\\\\\"About:SuikaWiki:JumpToCVS\\\\\\");\\\\\\">%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;</a>        $WIKI->{db}->_set_prop_db (content => {-db_open => sub {
59    \\");          require SuikaWiki::DB::FileSystem::YukiWikiDBNS;
60  %apply-user-preferred-style;");%html-end;          SuikaWiki::DB::FileSystem::YukiWikiDBNS->new
61  EOH            (directory => $WIKI->{config}->{path_to}->{db__content__dir},
62  map => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1},             logfile   => $WIKI->{config}->{path_to}->{db__content__error_log},
63    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120},             suffix    => '.txt',
64    template => <<EOH},             -lock => &{$WIKI->{var}->{db}->{lock_prop}} ('content'));
65  %html-start;%html-head(title=>"%res(name=>\\"Map:WebPageTitle\\");",link_meta=>"$vd{links}");        }, -own => 1});
66  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"        
67    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");        ## Last modified
68    %section(level=>2,id=>\\"link-map\\",title=>\\"Map:Title\\",heading,content=>\\"        $WIKI->{db}->_set_prop_db (lastmodified => {-db_open => sub {
69      <p>%res(name=>\\\\\\"Map:Description\\\\\\");</p>          require SuikaWiki::DB::FileSystem::SuikaWikiMetaInfo09;
70      %link-map;          SuikaWiki::DB::FileSystem::SuikaWikiMetaInfo09->new
71    \\");            (directory => $WIKI->{config}->{path_to}->{db__content__dir},
72    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");             -lock => &{$WIKI->{var}->{db}->{lock_prop}} ('lastmodified'));
73    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");        }, -prop => 'last_modified', -own => 1});
74    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");    };      
75    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");  
76    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");    push @{$WIKI->{event}->{database_loaded}}, sub {
77  %apply-user-preferred-style;");%html-end;      $WIKI->{db}->get (content => ['dummy']);
78  EOH      *main::database = $WIKI->{db}->{prop}->{content}->{-db}->{db_hash};
79        $SuikaWiki::Plugin::DB = $WIKI->{db};
80  edit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},      for (@{$SuikaWiki::Plugin::On{WikiDatabaseLoaded}||[]}) { &{$_} }
81    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},      
82    template => <<EOH},      package wiki::dummy;
83  %html-start;%html-head(title=>"%res(name=>\\"Edit:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");      sub meta {undef};
84  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"      sub list_items {};
85    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");      sub STORE {};
86    %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"    };
87      %edit-form;  
88      %section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\");  
89    \\");  ## Name of Special WikiPage (linked as parts of navigations)
90    %section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\");    our %PageName = (
91    %section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\");      FrontPage   => 'HomePage',
92    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");      IndexPage   => 'IndexPage',
93    %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\");      InterWikiName       => 'Wiki//InterWikiName',
94    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");      SearchPage  => 'Wiki//Page//Search',
95    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");      CreatePage  => 'Wiki//Page//Create',
96  %apply-user-preferred-style;");%html-end;      MenuBar     => 'Wiki//MenuBar',
97  EOH      RecentChanges       => 'RecentChanges',
98  adminedit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},      RefererDontRecord   => 'Wiki//Referer//IgnoreSite',
99    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},      RefererSiteName     => 'Wiki//Referer//SiteName',
100    template => <<EOH},      ResourceNS  => 'Wiki//Resource//',
101  %html-start;%html-head(title=>"%res(name=>\\"Edit:Admin:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");      StyleList   => 'Wiki//Style//List//',
102  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"      UserAgentList       => 'Wiki//UserAgentList',
103    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");      AdminSpecialPage    => "\x11\x11Admin\x11Special\x11Page\x11\x11",
104    %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\");    );
105    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");    $WIKI->{config}->{page} = {
106    %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\");      Default         => [qw/HomePage/],
107    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");      NewPageTemplate => [qw/Wiki NewPageTemplate/],
108  %apply-user-preferred-style;");%html-end;    };
109  EOH    our %PageOf = %{$WIKI->{config}->{page}};
110  -conflict => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},  
111    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},    $WIKI->{config}->{charset}->{internal} = 'euc-jp';
112    template => <<EOH},    $WIKI->{config}->{charset}->{output} = 'iso-2022-jp';
113  %html-start;%html-head(title=>"%res(name=>\\"Edit:Conflict:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");    $WIKI->{config}->{charset}->{uri_param} = ''; # auto detect
114  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"    $WIKI->{config}->{charset}->{uri_query} = ''; # auto detect
115    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");    our $kanjicode = 'euc'; # obsolete
116    %section(level=>2,id=>edit-conflict,title=>\\"Edit:Conflict:Title\\",heading,content=>\\"  
117      <p>%res(name=>\\\\\\"Edit:Conflict:Description\\\\\\");</p>    $WIKI->{config}->{entity}->{expires} = {
118      %conflict-form;      edit => {delta => 60},
119      %section(level=>3,id=>edit-conflict-diff,title=>\\\\\\"Edit:Conflict:Diff:Title\\\\\\",heading,content=>\\\\\\"      view => {delta => 2*3600},
120        <p>%res(name=>\\\\\\\\\\\\\\"Edit:Conflict:Diff:Description\\\\\\\\\\\\\\");</p>      lm_flaged => {delta => 30*24*3600},
121        %conflict-diff;    };
122      \\\\\\");  
123    \\");  ## Misc. options
124    %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"    $SuikaWiki::Plugin::UserAgent::LoggingName = 1;
125      <p>%res(name=>\\\\\\"Edit:Conflict:Edit:Description\\\\\\");</p>          ## Use UA-name log? (require UserAgent plugin module)
     %edit-form;  
     %section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\");  
   \\");  
   %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(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");  
   %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
 -wrote => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},  
   xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},  
   template => <<EOH},  
 %html-start;%html-head(title=>"%res(name=>\\"Edit:Wrote:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");  
 %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
   %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");  
   <p>%res(name=>\\"Edit:SavedSuccessfully\\");</p>  
   %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
 -deleted => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},  
   xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},  
   template => <<EOH},  
 %html-start;%html-head(title=>"%res(name=>\\"Edit:Deleted:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");  
 %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
   %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");  
   <p>%res(name=>\\"Edit:PageIsDeletedSuccessfully\\");</p>  
   %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
 -error => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1},  
   xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},  
   template => <<EOH},  
 %html-start;%html-head(title=>"%res(name=>\\"Error:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");  
 %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
   %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");  
   %section(level=>2,id=>error,title=>\\"Error:Title\\",heading,content=>\\"  
     <p>%error-message;</p>  
   \\");  
   %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");  
   %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
126    
127  css => {media => {type => 'text/css', charset => 1, expires => 3600},  ## Definition of views
   check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 },  
   template => '%read(to=>CSS);'},  
 rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600},  
   check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 },  
   template => '%read(to=>RSS);'},  
 -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1},  
   xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1},  
   check => sub {1}, template => <<EOH},  
 %html-start;%html-head(title=>"%page-name;",link_meta=>"$vd{links}");  
 %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"  
   %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");  
   %section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\"  
     %res(name=>\\\\\\"UnsupportedMediaType:Description\\\\\\");  
   \\");  
   %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");  
 %apply-user-preferred-style;");%html-end;  
 EOH  
 );  
128    
129    require SuikaWiki::View;
130    
131  $ViewDefinition{diff} = {media => {type => 'text/html', charset => 1, expires => 120},  push @{$SuikaWiki::Plugin::On{Load}}, sub {
132    #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120},    SuikaWiki::View->definition ('read')->property (template => <<'EOH');
133    template => <<EOH, check => sub {1}} if $wiki::diff::UseDiff;  %html-document(title=>{%res(name=>{View:WebPageTitle});}p,link-meta=>{%predefined-template(name=>links);}p,content=>{
134  %html-start;%html-head(title=>"%res(name=>\\"Diff:WebPageTitle\\");",link_meta=>"$vd{links}");    %section(level=>1,add-to-toc=>0,type=>body,title=>{%ns-short-page-name;}p,heading,content=>{
135  %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"      %section(id=>tools1,class=>tools,add-to-toc=>0,content=>{%predefined-template(name=>navbar);}p);
136    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");      %section(level=>2,id=>read,add-to-toc=>0,content=>{
137    %section(level=>2,id=>\\"diff\\",title=>\\"Diff:Title\\",heading,content=>\\"        %if-calender(month,true=>{
138      <p>%res(name=>\\\\\\"Diff:Notice\\\\\\");</p>          %format(context=>form_input,template=>{%calender;});
139      %diff-between-previous;        },false=>{
140    \\");          %if-calender(true=>{
141    %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\");            %format(context=>form_input,template=>{%calender-months;});
142    %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\");          });
143    %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");        });
144  ");        %read(comment);
145  EOH      }p);
146        %section(level=>2,id=>children,title=>{%res(name=>{Children:Title});}p,heading,
147        content=>{%page-list(ns=>{%page-name;}p,recursive=>0,type=>both,template=>{%res(name=>{Children:Item});}p);}p);
148        %section(level=>2,id=>see-also,title=>{%res(name=>SeeAlso);}p,heading,content=>{%search-result;}p);
149        %section(level=>2,id=>referer,title=>{%res(name=>Referer);}p,heading,content=>{%referer-list;}p);
150        %section(level=>2,id=>toc,title=>{%res(name=>{TOC:Title});}p,heading,add_to_toc=>0,content=>{%toc(drag);}p);
151        %section(id=>last-modified,add_to_toc=>0,content=>{%res(name=>{LastModified=});%last-modified;}p);
152        %section(class=>tools,add_to_toc=>0,content=>{%predefined-template(name=>navbar);}p);
153        %section(id=>footer,add-to-toc=>0,content=>{%predefined-template(name=>footer);}p);
154      }p);
155    }p);%log-hotness;
156    EOH
157      SuikaWiki::View->definition ('wrote')->property (template => SuikaWiki::View->definition ('-wrote')->property ('template').q(%log-hotness(weight=>2);));
158      SuikaWiki::View->definition ('WithMenu')->property (template => SuikaWiki::View->definition ('WithMenu')->property ('template').q(%log-hotness;));
159    };
160    
161  =head1 NAME  =head1 NAME
162    
# Line 257  modify it under the same terms as Perl i Line 171  modify it under the same terms as Perl i
171    
172  =cut  =cut
173    
174  1;  1; # $Date$

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24