20 |
$uri{wiki} = $url_cgi; |
$uri{wiki} = $url_cgi; |
21 |
|
|
22 |
## Path to modules and databases |
## Path to modules and databases |
23 |
|
use lib qw!/home/wakaba/temp/msg!; # temporary |
24 |
use lib qw!../wiki/lib!; |
use lib qw!../wiki/lib!; |
25 |
$SuikaWiki::Plugin::plugin_directory = q(../wiki/lib/SuikaWiki/Plugin/); |
$SuikaWiki::Plugin::plugin_directory = q(../wiki/lib/SuikaWiki/Plugin/); |
26 |
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) |
27 |
CachePrefix => q(./wikidata/.cache.), |
CachePrefix => q(./wikidata/.cache.), |
28 |
|
TempPrefix => q(./wikidata/.tmp.), |
29 |
WikiDataBase => q(./wikidata/page), |
WikiDataBase => q(./wikidata/page), |
30 |
); |
); |
31 |
|
|
45 |
CreatePage => 'CreatePage', |
CreatePage => 'CreatePage', |
46 |
RecentChanges => 'RecentChanges', |
RecentChanges => 'RecentChanges', |
47 |
ResourceNS => 'Wiki//Resource//', |
ResourceNS => 'Wiki//Resource//', |
48 |
UserAgentList => 'WikiUserAgentList', |
StyleList => 'Wiki//Style//List//', |
49 |
|
UserAgentList => 'Wiki//UserAgentList', |
50 |
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
51 |
); |
); |
52 |
|
|
60 |
## Definition of views |
## Definition of views |
61 |
|
|
62 |
require SuikaWiki::View; |
require SuikaWiki::View; |
63 |
my %vd; |
SuikaWiki::View->template ('links')->add_line (<<'EOH'); |
|
$vd{links} = SuikaWiki::View->template ('links')->add_line (<<'EOH'); |
|
|
%link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>"%res(name=>EditThisPageLink,safe);"p); |
|
|
%link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>"%res(name=>AdminEditThisPageLink,safe);"p,add-param=>"admin=1"); |
|
|
%link-wiki(rel=>view,class=>wiki-cmd,title=>"%res(name=>ViewThisPageLink,safe);"p,up_to_date); |
|
|
%link-wiki(rel=>myself,class=>wiki,title=>"%res(name=>GoToMyselfLink,safe);"p); |
|
64 |
%link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>"%res(name=>GoToIndexPageLink,safe);"p); |
%link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>"%res(name=>GoToIndexPageLink,safe);"p); |
65 |
%link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>"%res(name=>GoToHomePageLink,safe);"p); |
%link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>"%res(name=>GoToHomePageLink,safe);"p); |
66 |
%link-wiki(page=>"Wiki//News",rel=>News,class=>wiki,title=>"%res(name=>GoToWikiNewsLink,safe);"p); |
%link-wiki(page=>"Wiki//News",rel=>News,class=>wiki,title=>"%res(name=>GoToWikiNewsLink,safe);"p); |
|
%link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>"%res(name=>GoToRecentChangesLink,safe);"p); |
|
|
%link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>"%res(name=>GoToRssPageLink,safe);"p,type=>"application/xml"); |
|
67 |
%link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>"%res(name=>GoToSearchPageLink,safe);"p); |
%link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>"%res(name=>GoToSearchPageLink,safe);"p); |
68 |
%link-wiki(page=>"Wiki//Help",mode=>read,rel=>help,class=>wiki,title=>"%res(name=>GoToWikiHelpLink,safe);"p); |
%link-wiki(page=>"Wiki//Help",mode=>read,rel=>help,class=>wiki,title=>"%res(name=>GoToWikiHelpLink,safe);"p); |
69 |
%link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink,safe);"p); |
%link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink,safe);"p); |
70 |
%link-wiki(mode=>map,rel=>sitemap,class=>wiki-cmd,title=>"%res(name=>ShowMapOfThisPageLink,safe);"p); |
%link-wiki(mode=>RandomJump,up_to_date,rel=>jump,class=>"wiki randomlink",title=>"%res(name=>GoSomewhereLink,safe);"p); |
71 |
%link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>"wiki randomlink",title=>"%res(name=>GoSomewhereLink,safe);"p); |
%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); |
72 |
EOH |
%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); |
73 |
$vd{links} .= <<EOH; |
EOH |
74 |
%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); |
SuikaWiki::View->template ('navbar')->add_line (<<'EOH'); |
75 |
%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); |
%anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage,safe);"p,title=>"%res(name=>EditThisPageLong);"p,accesskey=>E); |
76 |
EOH |
%anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage,safe);"p,title=>"%res(name=>ViewThisPageLong);"p); |
|
$vd{navbar} = SuikaWiki::View->template ('navbar')->add_line (<<'EOH'); |
|
|
%anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage,safe);"p,title=>"%res(name=>EditThisPageLong,safe);"p,accesskey=>E); |
|
|
%anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage,safe);"p,title=>"%res(name=>ViewThisPageLong,safe);"p); |
|
77 |
%anchor-wiki(page=>CreatePage,class=>wiki,label=>"%res(name=>GoToCreatePage,safe);"p,title=>"%res(name=>GoToCreatePageLong,safe);"p); |
%anchor-wiki(page=>CreatePage,class=>wiki,label=>"%res(name=>GoToCreatePage,safe);"p,title=>"%res(name=>GoToCreatePageLong,safe);"p); |
78 |
%anchor-wiki(page=>IndexPage,class=>wiki,label=>"%res(name=>GoToIndexPage,safe);"p,title=>"%res(name=>GoToIndexPageLong,safe);"p); |
%anchor-wiki(page=>IndexPage,class=>wiki,label=>"%res(name=>GoToIndexPage,safe);"p,title=>"%res(name=>GoToIndexPageLong,safe);"p); |
79 |
%anchor-wiki(page=>HomePage,class=>wiki,label=>"%res(name=>GoToHomePage,safe);"p,title=>"%res(name=>GoToHomePageLong,safe);"p); |
%anchor-wiki(page=>HomePage,class=>wiki,label=>"%res(name=>GoToHomePage,safe);"p,title=>"%res(name=>GoToHomePageLong,safe);"p); |
82 |
%anchor-wiki(page=>RecentChanges,class=>wiki,label=>"%res(name=>GoToRecentChanges,safe);"p,title=>"%res(name=>GoToRecentChangesLong,safe);"p); |
%anchor-wiki(page=>RecentChanges,class=>wiki,label=>"%res(name=>GoToRecentChanges,safe);"p,title=>"%res(name=>GoToRecentChangesLong,safe);"p); |
83 |
EOH |
EOH |
84 |
|
|
85 |
|
push @{$SuikaWiki::Plugin::On{Load}}, sub { |
86 |
my %ViewDefinition = ( |
SuikaWiki::View->definition ('read')->property (template => <<'EOH'); |
87 |
read => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, |
%html-document(title=>{%res(name=>{View:WebPageTitle});}p,link-meta=>{%predefined-template(name=>links);}p,content=>{ |
88 |
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
%section(level=>1,add-to-toc=>0,type=>body,title=>{%ns-short-page-name;}p,heading,content=>{ |
89 |
template => <<EOH}, |
%section(id=>tools1,class=>tools,add-to-toc=>0,content=>{%predefined-template(name=>navbar);}p); |
90 |
%html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\",safe);"p,link-meta=>"%predefined-template(name=>links);"p); |
%section(level=>2,id=>read,add-to-toc=>0,content=>{ |
91 |
%section(level=>1,add-to-toc=>0,type=>body,title=>"%ns-short-page-name(safe);"p,heading,content=>" |
%if-calender(month,true=>{ |
92 |
%section(id=>tools1,class=>tools,add-to-toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); |
%format(context=>form_input,template=>{%calender;}); |
93 |
%section(level=>2,id=>read,add-to-toc=>0,content=>\\"%read(comment);\\"); |
},false=>{ |
94 |
%section(level=>2,id=>children, |
%if-calender(true=>{ |
95 |
title=>\\"%res(name=>\\\\\\"Children:Title\\\\\\",safe);\\"p,heading, |
%format(context=>form_input,template=>{%calender-months;}); |
96 |
content=>\\"%page-list(ns=>\\\\\\"%page-name(safe);\\\\\\"p,recursive=>0,type=>both, |
}); |
97 |
template=>\\\\\\"%wiki-link(label=>\\\\\\\\\\\\\\"%ns-short-page-or-ns-name;\\\\\\\\\\\\\\"ps);\\\\\\" |
}); |
98 |
);\\" |
%read(comment); |
99 |
); |
}p); |
100 |
%section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\"); |
%section(level=>2,id=>children,title=>{%res(name=>{Children:Title});}p,heading, |
101 |
%section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\"); |
content=>{%page-list(ns=>{%page-name;}p,recursive=>0,type=>both,template=>{ |
102 |
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
%wiki-link(label=>{%ns-short-page-or-ns-name;}p); |
103 |
%section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); |
});}p); |
104 |
%section(class=>tools,add_to_toc=>0,content=>\\\"%predefined-template(name=>navbar);\\"p); |
%section(level=>2,id=>see-also,title=>{%res(name=>SeeAlso);}p,heading,content=>{%search-result;}p); |
105 |
%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); |
%section(level=>2,id=>referer,title=>{%res(name=>Referer);}p,heading,content=>{%referer-list;}p); |
106 |
%apply-user-preferred-style;");%html-end; |
%section(level=>2,id=>toc,title=>{%res(name=>{TOC:Title};}p,heading,add_to_toc=>0,content=>{%toc(drag);}p); |
107 |
%log-hotness(); |
%section(id=>last-modified,add_to_toc=>0,content=>{%res(name=>{LastModified=});%last-modified;}p); |
108 |
EOH |
%section(class=>tools,add_to_toc=>0,content=>{%predefined-template(name=>navbar);}p); |
109 |
map => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, |
%section(id=>footer,add-to-toc=>0,content=>{%predefined-template(name=>footer);}p); |
110 |
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
}p); |
111 |
template => <<EOH}, |
}p);%log-hotness; |
|
%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; |
|
112 |
EOH |
EOH |
113 |
); |
SuikaWiki::View->definition ('-wrote')->property (template => SuikaWiki::View->definition ('-wrote')->property ('template').q(%log-hotness(weight=>2);)); |
114 |
|
}; |
|
require SuikaWiki::View; |
|
|
for (keys %ViewDefinition) { |
|
|
SuikaWiki::View->definition ($_)->properties ($ViewDefinition{$_}); |
|
|
} |
|
115 |
|
|
116 |
=head1 NAME |
=head1 NAME |
117 |
|
|