6 |
## script-short-name: wiki.cgi |
## script-short-name: wiki.cgi |
7 |
## URI parts MUST NOT contains "&" and/or non-URI characters. |
## URI parts MUST NOT contains "&" and/or non-URI characters. |
8 |
our %uri = ( |
our %uri = ( |
9 |
cookie_path => '/temp/suikawiki/', |
cookie_path => '/~wakaba/-temp/wiki/', |
10 |
external_script => '../wiki/script/', |
external_script => '../wiki/script/', |
11 |
script_short_name => 'wiki', |
script_short_name => 'wiki', |
12 |
## If you use CVS repository of WikiDatabase, |
## If you use CVS repository of WikiDatabase, |
13 |
#cvs_repository => 'http://path-to-viewcvs/path-to-repository/', |
cvs_repository => '/gate/cvs/suikawiki/wikidata/page/', |
14 |
); |
); |
15 |
our $url_cgi; { |
our $url_cgi; { |
16 |
my $scheme = 'http'; |
my $scheme = 'http'; |
17 |
$scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#; |
$scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#; |
18 |
$url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}$uri{script_short_name}"; |
$url_cgi = "$scheme://".($main::ENV{HTTP_HOST} || $main::ENV{SERVER_NAME}.($main::ENV{SERVER_PORT}==80?'':":$main::ENV{SERVER_PORT}"))."$uri{cookie_path}$uri{script_short_name}"; |
19 |
} |
} |
20 |
$uri{wiki} = $url_cgi; |
$uri{wiki_abs} = $url_cgi; |
21 |
|
$uri{wiki} = qq($uri{cookie_path}$uri{script_short_name}); |
22 |
|
|
23 |
## Path to modules and databases |
## Path to modules and databases |
24 |
use lib qw!../wiki/lib!; |
push @main::INC, 'lib'; |
25 |
$SuikaWiki::Plugin::plugin_directory = q(../wiki/lib/SuikaWiki/Plugin/); |
push @SuikaWiki::Plugin::plugin_directory, ( |
26 |
|
q(lib/SuikaWiki/Plugin/), |
27 |
|
q(misc/plugins/), |
28 |
|
); |
29 |
our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) |
our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) |
30 |
CachePrefix => q(./wikidata/.cache.), |
CachePrefix => q(./wikidata/.cache.), |
31 |
WikiDataBase => q(./wikidata/page), |
TempPrefix => q(./wikidata/.tmp.), |
32 |
|
WikiDataBase => q(./wikidata/page), |
33 |
|
WikiDatabase => q(./wikidata/page), |
34 |
|
WikiDatabaseErrorLog => q(./wikidata/log/error.log), |
35 |
|
convert => q(/usr/X11R6/bin/convert), |
36 |
); |
); |
37 |
|
|
38 |
|
require SuikaWiki::DB::Util::Lock; |
39 |
|
our $locker = SuikaWiki::DB::Util::Lock->new (-directory => q(./wikidata/lock), |
40 |
|
-name => 'wikipage', |
41 |
|
-retry => ($main::ENV{HTTP_USER_AGENT} =~ m#Openbot/3# ? 2 : 80), |
42 |
|
-timeout => 300, |
43 |
|
-error_handler => sub { |
44 |
|
my ($self, %o) = @_; |
45 |
|
open LOG, '>>', $main::PathTo{WikiDatabaseErrorLog}; |
46 |
|
print LOG scalar (gmtime)."\@@{[time]} @{[$$]} {$o{level}}: ", $o{msg}, "\n"; |
47 |
|
close LOG; |
48 |
|
if ($o{level} eq 'fatal') { |
49 |
|
die $o{msg}; |
50 |
|
} |
51 |
|
}); |
52 |
|
$locker->lock or do { |
53 |
|
open LOG, '>>', $main::PathTo{WikiDatabaseErrorLog}; |
54 |
|
print LOG scalar (time), " Can't lock\n"; |
55 |
|
close LOG; |
56 |
|
print "Status: 423 Locked\n"; |
57 |
|
die "Can't lock --- already locked"; |
58 |
|
}; |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
## Type of WikiPage Database |
## Type of WikiPage Database |
63 |
#our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. |
#our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. |
64 |
#our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. |
#our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. |
71 |
our %PageName = ( |
our %PageName = ( |
72 |
FrontPage => 'HomePage', |
FrontPage => 'HomePage', |
73 |
IndexPage => 'IndexPage', |
IndexPage => 'IndexPage', |
74 |
SearchPage => 'SearchPage', |
InterWikiName => 'Wiki//InterWikiName', |
75 |
CreatePage => 'CreatePage', |
SearchPage => 'Wiki//Page//Search', |
76 |
|
CreatePage => 'Wiki//Page//Create', |
77 |
|
MenuBar => 'Wiki//MenuBar', |
78 |
RecentChanges => 'RecentChanges', |
RecentChanges => 'RecentChanges', |
79 |
|
RefererDontRecord => 'Wiki//Referer//IgnoreSite', |
80 |
|
RefererSiteName => 'Wiki//Referer//SiteName', |
81 |
ResourceNS => 'Wiki//Resource//', |
ResourceNS => 'Wiki//Resource//', |
82 |
UserAgentList => 'WikiUserAgentList', |
StyleList => 'Wiki//Style//List//', |
83 |
|
UserAgentList => 'Wiki//UserAgentList', |
84 |
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
85 |
); |
); |
86 |
|
|
87 |
## (Should be reimplemented) |
## (Should be reimplemented) |
88 |
our $kanjicode = 'euc'; |
our $kanjicode = 'euc'; |
89 |
our $lang = 'ja'; |
our $lang = 'ja'; |
|
$wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not |
|
90 |
|
|
91 |
## Misc. options |
## Misc. options |
92 |
|
$SuikaWiki::Plugin::UserAgent::LoggingName = 1; |
93 |
|
## Use UA-name log? (require UserAgent plugin module) |
94 |
|
|
95 |
## Definition of views |
## Definition of views |
96 |
|
|
97 |
require SuikaWiki::View; |
require SuikaWiki::View; |
98 |
my %vd; |
SuikaWiki::View->template ('links')->add_line (<<'EOH'); |
99 |
$vd{links} = SuikaWiki::View->template ('links')->add_line (<<'EOH'); |
%link-wiki(page=>"Wiki//News",rel=>News,class=>wiki,title=>"%res(name=>GoToWikiNewsLink);"p); |
100 |
%link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>"%res(name=>EditThisPageLink,safe);"p); |
%link-wiki(page=>"Wiki//Help",rel=>help,class=>wiki,title=>"%res(name=>GoToWikiHelpLink);"p); |
101 |
%link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>"%res(name=>AdminEditThisPageLink,safe);"p,add-param=>"admin=1"); |
%link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink);"p); |
102 |
%link-wiki(rel=>view,class=>wiki-cmd,title=>"%res(name=>ViewThisPageLink,safe);"p,up_to_date); |
EOH |
103 |
%link-wiki(rel=>myself,class=>wiki,title=>"%res(name=>GoToMyselfLink,safe);"p); |
|
104 |
%link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>"%res(name=>GoToIndexPageLink,safe);"p); |
SuikaWiki::View->template ('navbar')->add_line (<<"EOH"); |
105 |
%link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>"%res(name=>GoToHomePageLink,safe);"p); |
%anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage);"p,title=>"%res(name=>EditThisPageLong);"p,accesskey=>E,add-param=>{#edit}); |
106 |
%link-wiki(page=>"Wiki//News",rel=>News,class=>wiki,title=>"%res(name=>GoToWikiNewsLink,safe);"p); |
%anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage);"p,title=>"%res(name=>ViewThisPageLong);"p); |
107 |
%link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>"%res(name=>GoToRecentChangesLink,safe);"p); |
%anchor-wiki(page=>{$main::PageName{CreatePage}},class=>wiki,label=>"%res(name=>GoToCreatePage);"p,title=>"%res(name=>GoToCreatePageLong);"p); |
108 |
%link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>"%res(name=>GoToRssPageLink,safe);"p,type=>"application/xml"); |
%anchor-wiki(page=>{$main::PageName{SearchPage}},class=>wiki,label=>"%res(name=>GoToSearchPage);"p,title=>"%res(name=>GoToSearchPageLong);"p); |
109 |
%link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>"%res(name=>GoToSearchPageLink,safe);"p); |
%anchor-wiki(mode=>RandomJump,up-to-date,rel=>lucky,class=>"wiki randomlink",label=>"%res(name=>GoSomewhere);"p,title=>"%res(name=>GoSomewhereLong);"p); |
110 |
%link-wiki(page=>"Wiki//Help",mode=>read,rel=>help,class=>wiki,title=>"%res(name=>GoToWikiHelpLink,safe);"p); |
%anchor-wiki(page=>{$main::PageName{RecentChanges}},class=>wiki,label=>"%res(name=>GoToRecentChanges);"p,title=>"%res(name=>GoToRecentChangesLong,safe);"p); |
111 |
%link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink,safe);"p); |
EOH |
112 |
%link-wiki(mode=>map,rel=>sitemap,class=>wiki-cmd,title=>"%res(name=>ShowMapOfThisPageLink,safe);"p); |
|
113 |
%link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>"wiki randomlink",title=>"%res(name=>GoSomewhereLink,safe);"p); |
push @{$SuikaWiki::Plugin::On{Load}}, sub { |
114 |
EOH |
SuikaWiki::View->definition ('read')->property (template => <<'EOH'); |
115 |
$vd{links} .= <<EOH; |
%html-document(title=>{%res(name=>{View:WebPageTitle});}p,link-meta=>{%predefined-template(name=>links);}p,content=>{ |
116 |
%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,safe);"p); |
%section(level=>1,add-to-toc=>0,type=>body,title=>{%ns-short-page-name;}p,heading,content=>{ |
117 |
%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,safe);"p); |
%section(id=>tools1,class=>tools,add-to-toc=>0,content=>{%predefined-template(name=>navbar);}p); |
118 |
EOH |
%section(level=>2,id=>read,add-to-toc=>0,content=>{ |
119 |
$vd{navbar} = SuikaWiki::View->template ('navbar')->add_line (<<'EOH'); |
%if-calender(month,true=>{ |
120 |
%anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage,safe);"p,title=>"%res(name=>EditThisPageLong,safe);"p,accesskey=>E); |
%format(context=>form_input,template=>{%calender;}); |
121 |
%anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage,safe);"p,title=>"%res(name=>ViewThisPageLong,safe);"p); |
},false=>{ |
122 |
%anchor-wiki(page=>CreatePage,class=>wiki,label=>"%res(name=>GoToCreatePage,safe);"p,title=>"%res(name=>GoToCreatePageLong,safe);"p); |
%if-calender(true=>{ |
123 |
%anchor-wiki(page=>IndexPage,class=>wiki,label=>"%res(name=>GoToIndexPage,safe);"p,title=>"%res(name=>GoToIndexPageLong,safe);"p); |
%format(context=>form_input,template=>{%calender-months;}); |
124 |
%anchor-wiki(page=>HomePage,class=>wiki,label=>"%res(name=>GoToHomePage,safe);"p,title=>"%res(name=>GoToHomePageLong,safe);"p); |
}); |
125 |
%anchor-wiki(page=>SearchPage,class=>wiki,label=>"%res(name=>GoToSearchPage,safe);"p,title=>"%res(name=>GoToSearchPageLong,safe);"p); |
}); |
126 |
%anchor-wiki(mode=>RandomJump,up-to-date,rel=>lucky,class=>"wiki randomlink",label=>"%res(name=>GoSomewhere,safe);"p,title=>"%res(name=>GoSomewhereLong,safe);"p); |
%read(comment); |
127 |
%anchor-wiki(page=>RecentChanges,class=>wiki,label=>"%res(name=>GoToRecentChanges,safe);"p,title=>"%res(name=>GoToRecentChangesLong,safe);"p); |
}p); |
128 |
EOH |
%section(level=>2,id=>children,title=>{%res(name=>{Children:Title});}p,heading, |
129 |
|
content=>{%page-list(ns=>{%page-name;}p,recursive=>0,type=>both,template=>{%res(name=>{Children:Item});}p);}p); |
130 |
|
%section(level=>2,id=>see-also,title=>{%res(name=>SeeAlso);}p,heading,content=>{%search-result;}p); |
131 |
my %ViewDefinition = ( |
%section(level=>2,id=>referer,title=>{%res(name=>Referer);}p,heading,content=>{%referer-list;}p); |
132 |
read => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, |
%section(level=>2,id=>toc,title=>{%res(name=>{TOC:Title});}p,heading,add_to_toc=>0,content=>{%toc(drag);}p); |
133 |
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
%section(id=>last-modified,add_to_toc=>0,content=>{%res(name=>{LastModified=});%last-modified;}p); |
134 |
template => <<EOH}, |
%section(class=>tools,add_to_toc=>0,content=>{%predefined-template(name=>navbar);}p); |
135 |
%html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\",safe);"p,link-meta=>"%predefined-template(name=>links);"p); |
%section(id=>footer,add-to-toc=>0,content=>{%predefined-template(name=>footer);}p); |
136 |
%section(level=>1,add-to-toc=>0,type=>body,title=>"%ns-short-page-name(safe);"p,heading,content=>" |
}p); |
137 |
%section(id=>tools1,class=>tools,add-to-toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); |
}p);%log-hotness; |
138 |
%section(level=>2,id=>read,add-to-toc=>0,content=>\\"%read(comment);\\"); |
EOH |
139 |
%section(level=>2,id=>children, |
SuikaWiki::View->definition ('-wrote')->property (template => SuikaWiki::View->definition ('-wrote')->property ('template').q(%log-hotness(weight=>2);)); |
140 |
title=>\\"%res(name=>\\\\\\"Children:Title\\\\\\",safe);\\"p,heading, |
SuikaWiki::View->definition ('WithMenu')->property (template => SuikaWiki::View->definition ('WithMenu')->property ('template').q(%log-hotness;)); |
141 |
content=>\\"%page-list(ns=>\\\\\\"%page-name(safe);\\\\\\"p,recursive=>0,type=>both, |
}; |
|
template=>\\\\\\"%wiki-link(label=>\\\\\\\\\\\\\\"%ns-short-page-or-ns-name;\\\\\\\\\\\\\\"ps);\\\\\\" |
|
|
);\\" |
|
|
); |
|
|
%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(class=>tools,add_to_toc=>0,content=>\\\"%predefined-template(name=>navbar);\\"p); |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
%log-hotness(); |
|
|
EOH |
|
|
map => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, |
|
|
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
|
|
template => <<EOH}, |
|
|
%html-start;%html-head(title=>"%res(name=>\\"Map:WebPageTitle\\");",link_meta=>"%predefined-template(name=>links);"p); |
|
|
%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); |
|
|
%section(level=>2,id=>\\"link-map\\",title=>\\"Map:Title\\",heading,content=>\\" |
|
|
<p>%res(name=>\\\\\\"Map:Description\\\\\\");</p> |
|
|
%link-map; |
|
|
\\"); |
|
|
%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=>\\\"%predefined-template(name=>navbar);\\"p); |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
EOH |
|
|
|
|
|
edit => {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:WebPageTitle\\");",link-meta=>"%predefined-template(name=>links);%html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\" |
|
|
%edit-form; |
|
|
%section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>\\\\\\\\\\\\\\"Wiki//Help//Edit\\\\\\\\\\\\\\");\\\\\\"); |
|
|
\\"); |
|
|
%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(class=>tools,add_to_toc=>0,content=>\\\"%predefined-template(name=>navbar);\\"p); |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
EOH |
|
|
adminedit => {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:Admin:WebPageTitle\\");"p,link_meta=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\"); |
|
|
%section(level=>2,id=>edit,title=>\\"Edit:Rename:Title\\",heading,content=> |
|
|
\\"%wp-rename-form-start; |
|
|
%format(context=>form_input,template=>\\\\\\\" |
|
|
%text(id=>to,label=>\\\\\\\\\\\\\\\"%res(name=>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Edit:Rename:To=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\\\\\\\\\\\\\\\",size=>10,default=>\\\\\\\\\\\\\\\"%page-name;\\\\\\\\\\\\\\\"ps); |
|
|
%submit; |
|
|
\\\\\\\"); |
|
|
%form-end;\\" |
|
|
); |
|
|
%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=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
EOH |
|
|
-conflict => {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:Conflict:WebPageTitle\\");",link_meta=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
%section(level=>2,id=>edit-conflict,title=>\\"Edit:Conflict:Title\\",heading,content=>\\" |
|
|
<p>%res(name=>\\\\\\"Edit:Conflict:Description\\\\\\");</p> |
|
|
%conflict-form; |
|
|
%section(level=>3,id=>edit-conflict-diff,title=>\\\\\\"Edit:Conflict:Diff:Title\\\\\\",heading,content=>\\\\\\" |
|
|
<p>%res(name=>\\\\\\\\\\\\\\"Edit:Conflict:Diff:Description\\\\\\\\\\\\\\");</p> |
|
|
%conflict-diff; |
|
|
\\\\\\"); |
|
|
\\"); |
|
|
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\" |
|
|
<p>%res(name=>\\\\\\"Edit:Conflict:Edit:Description\\\\\\");</p> |
|
|
%edit-form; |
|
|
%section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>\\\\\\\\\\\\\\"Wiki//Help//Edit\\\\\\\\\\\\\\");\\\\\\"); |
|
|
\\"); |
|
|
%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=>\\\"%predefined-template(name=>navbar);\\"p); |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
<p>%res(name=>\\"Edit:SavedSuccessfully\\");</p> |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
%log-hotness(weight=>2); |
|
|
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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
<p>%res(name=>\\"Edit:PageIsDeletedSuccessfully\\");</p> |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
%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=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
EOH |
|
|
|
|
|
|
|
|
rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600}, |
|
|
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 }, |
|
|
template => '<?xml version="1.0"?>%styles-wiki-xml(page=>"Wiki//Style//List//RSS");%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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); |
|
|
%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); |
|
|
%section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\" |
|
|
<p>%res(name=>\\\\\\"UnsupportedMediaType:Description\\\\\\");</p> |
|
|
\\"); |
|
|
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
|
|
%apply-user-preferred-style;");%html-end; |
|
|
EOH |
|
|
); |
|
|
|
|
|
require SuikaWiki::View; |
|
|
for (keys %ViewDefinition) { |
|
|
SuikaWiki::View->definition ($_)->properties ($ViewDefinition{$_}); |
|
|
} |
|
142 |
|
|
143 |
=head1 NAME |
=head1 NAME |
144 |
|
|