1 |
w |
1.1 |
use strict; |
2 |
wakaba |
1.4 |
|
3 |
|
|
## URI (or part of URI) of Wiki CGI itself and its external addons |
4 |
|
|
our %uri = ( |
5 |
|
|
cookie_path => '/temp/wiki/', |
6 |
|
|
external_script => 'script/', |
7 |
|
|
); |
8 |
|
|
our $url_cgi; { |
9 |
w |
1.2 |
my $scheme = 'http'; |
10 |
|
|
$scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#; |
11 |
wakaba |
1.4 |
$url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}wiki"; |
12 |
|
|
## - MUST NOT include [&<>"] and/or non-URI characters |
13 |
|
|
} |
14 |
|
|
$uri{wiki} = $url_cgi; |
15 |
|
|
|
16 |
|
|
## Path to modules and databases |
17 |
|
|
use lib qw!lib!; |
18 |
|
|
$SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/); |
19 |
|
|
our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) |
20 |
|
|
CacheHeadline => q(./wikidata/.headline.cache), |
21 |
|
|
CachePrefix => q(./wikidata/.cache.), |
22 |
|
|
CacheSearchResult => q(./wikidata/.search.cache), |
23 |
|
|
WikiDataBase => q(./wikidata/page), |
24 |
|
|
); |
25 |
|
|
|
26 |
|
|
## Type of WikiPage Database |
27 |
|
|
#our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. |
28 |
|
|
#our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. |
29 |
|
|
#our $modifier_dbtype = 'Yuki::YukiWikiDB'; # Slow, available on all environment. |
30 |
|
|
#our $modifier_dbtype = 'Yuki::YukiWikiDB2'; # Slow, available on all environment. |
31 |
|
|
our $modifier_dbtype = 'Yuki::YukiWikiDBMeta'; # Slow, available on all environment. |
32 |
|
|
our $use_exists = 1; # If you can use 'exists' method for your DB. |
33 |
|
|
|
34 |
|
|
## Name of Special WikiPage (linked as parts of navigations) |
35 |
|
|
our %PageName = ( |
36 |
|
|
FrontPage => 'HomePage', |
37 |
|
|
IndexPage => 'IndexPage', |
38 |
|
|
SearchPage => 'SearchPage', |
39 |
|
|
CreatePage => 'CreatePage', |
40 |
|
|
ErrorPage => 'ErrorPage', |
41 |
|
|
RecentChanges => 'RecentChanges', |
42 |
|
|
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
43 |
|
|
UserAgentList => 'WikiUserAgentList', |
44 |
|
|
); |
45 |
|
|
|
46 |
|
|
## (Should be reimplemented) |
47 |
|
|
our $kanjicode = 'euc'; |
48 |
|
|
our $lang = 'ja'; |
49 |
|
|
$wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not |
50 |
|
|
|
51 |
|
|
## Misc. options |
52 |
|
|
$wiki::diff::UseDiff = 1; ## Use diff mode or not |
53 |
|
|
|
54 |
|
|
## Namespace of WikiName |
55 |
|
|
package wiki::page::ns; |
56 |
|
|
our $delimiter = '//'; |
57 |
|
|
our $self = '.'; |
58 |
|
|
our $parent = '..'; |
59 |
|
|
package main; |
60 |
w |
1.2 |
|
61 |
w |
1.3 |
## Definition of views |
62 |
|
|
|
63 |
w |
1.2 |
my %vd; |
64 |
|
|
$vd{links} = <<'EOH'; |
65 |
w |
1.3 |
%styles-wiki-html(page=>\"WikiStyleList:HTML\"); |
66 |
w |
1.2 |
%link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>EditThisPageLink);\"); |
67 |
|
|
%link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>AdminEditThisPageLink);\",add_param=>\"admin=1\"); |
68 |
|
|
%link-wiki(rel=>view,class=>wiki-cmd,title=>\"%res(name=>ViewThisPageLink);\",up_to_date); |
69 |
|
|
%link-wiki(rel=>myself,class=>wiki,title=>\"%res(name=>GoToMyselfLink);\"); |
70 |
|
|
%link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>\"%res(name=>GoToIndexPageLink);\"); |
71 |
|
|
%link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>\"%res(name=>GoToHomePageLink);\"); |
72 |
|
|
%link-wiki(page=>WikiNews,rel=>News,class=>wiki,title=>\"%res(name=>GoToWikiNewsLink);\"); |
73 |
|
|
%link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>\"%res(name=>GoToRecentChangesLink);\"); |
74 |
|
|
%link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>\"%res(name=>GoToRssPageLink);\",type=>\"application/xml\"); |
75 |
|
|
%link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\"); |
76 |
|
|
%link-wiki(page=>WikiHelp,mode=>read,rel=>help,class=>wiki,title=>\"%res(name=>GoToWikiHelpLink);\"); |
77 |
|
|
%link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\"); |
78 |
wakaba |
1.4 |
%link-wiki(mode=>map,rel=>sitemap,class=>wiki-cmd,title=>\"%res(name=>ShowMapOfThisPageLink);\"); |
79 |
w |
1.2 |
%link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\"wiki randomlink\",title=>\"%res(name=>GoSomewhereLink);\"); |
80 |
wakaba |
1.4 |
%link-wiki(page=>WikiMenuBar,mode=>mininav,rel=>\"sidebar navigator\",class=>wiki); |
81 |
|
|
%link-favicon(use_page_icon); |
82 |
w |
1.2 |
EOH |
83 |
|
|
#%link-viewcvs(href=>\"http://path-to-viewcvs/path-to-repository/\",rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewHistoryOfThisPageLink);\",hreflang=>en); |
84 |
|
|
$vd{links} .= q( %link-wiki(mode=>diff,rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewDiffOfThisPageLink);\");) if $wiki::diff::UseDiff; |
85 |
|
|
$vd{links} .= <<EOH; |
86 |
|
|
%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);\\\"); |
87 |
|
|
%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);\\\"); |
88 |
|
|
EOH |
89 |
|
|
$vd{navbar} = <<'EOH'; |
90 |
|
|
%anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>\\\"%res(name=>EditThisPage);\\\",title=>\\\"%res(name=>EditThisPageLong,accesskey=>E);\\\"); |
91 |
|
|
%anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>\\\"%res(name=>ViewThisPage);\\\",title=>\\\"%res(name=>ViewThisPageLong);\\\"); |
92 |
|
|
%anchor-wiki(page=>CreatePage,class=>wiki,label=>\\\"%res(name=>GoToCreatePage);\\\",title=>\\\"%res(name=>GoToCreatePageLong);\\\"); |
93 |
|
|
%anchor-wiki(page=>IndexPage,class=>wiki,label=>\\\"%res(name=>GoToIndexPage);\\\",title=>\\\"%res(name=>GoToIndexPageLong);\\\"); |
94 |
|
|
%anchor-wiki(page=>HomePage,class=>wiki,label=>\\\"%res(name=>GoToHomePage);\\\",title=>\\\"%res(name=>GoToHomePageLong);\\\"); |
95 |
|
|
%anchor-wiki(page=>SearchPage,class=>wiki,label=>\\\"%res(name=>GoToSearchPage);\\\",title=>\\\"%res(name=>GoToSearchPageLong);\\\"); |
96 |
|
|
%anchor-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\\\"wiki randomlink\\\",label=>\\\"%res(name=>GoSomewhere);\\\",title=>\\\"%res(name=>GoSomewhereLong);\\\"); |
97 |
|
|
%anchor-wiki(page=>RecentChanges,class=>wiki,label=>\\\"%res(name=>GoToRecentChanges);\\\",title=>\\\"%res(name=>GoToRecentChangesLong);\\\"); |
98 |
|
|
EOH |
99 |
|
|
|
100 |
|
|
our %ViewDefinition = ( |
101 |
|
|
read => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, |
102 |
|
|
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
103 |
|
|
template => <<EOH}, |
104 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}"); |
105 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
106 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
107 |
w |
1.2 |
%section(level=>2,id=>read,add_to_toc=>0,content=>\\"%read(comment);\\"); |
108 |
|
|
%section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\"); |
109 |
|
|
%section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\"); |
110 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
111 |
|
|
%section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); |
112 |
|
|
%section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); |
113 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\" |
114 |
|
|
<a href=\\\\\\"http://www.hyuki.com/yukiwiki/\\\\\\" title=\\\\\\"YukiWiki 2.0.beta1.2002-05-29 © 2000-2002 by Hiroshi Yuki\\\\\\">%res(name=>\\\\\\"About:Name:YukiWiki\\\\\\");</a> |
115 |
|
|
<a href=\\\\\\"http://digit.que.ne.jp/work/\\\\\\" title=\\\\\\"WalWiki 2.0.beta1.wal.1 © 2000-2002 by Makio Tsukamoto\\\\\\">%res(name=>\\\\\\"About:Name:WalWiki\\\\\\");</a> |
116 |
|
|
<a href=\\\\\\"http://suika.fam.cx/gate/cvs/wakaba/wiki/\\\\\\" title=\\\\\\"%res(name=>\\\\\\"About:SuikaWiki:JumpToCVS\\\\\\");\\\\\\">%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;</a> |
117 |
|
|
\\"); |
118 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
119 |
w |
1.2 |
EOH |
120 |
|
|
map => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, |
121 |
|
|
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
122 |
|
|
template => <<EOH}, |
123 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Map:WebPageTitle\\");",link_meta=>"$vd{links}"); |
124 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
125 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
126 |
w |
1.2 |
%section(level=>2,id=>\\"link-map\\",title=>\\"Map:Title\\",heading,content=>\\" |
127 |
|
|
<p>%res(name=>\\\\\\"Map:Description\\\\\\");</p> |
128 |
|
|
%link-map; |
129 |
|
|
\\"); |
130 |
|
|
%section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\"); |
131 |
|
|
%section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\"); |
132 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
133 |
|
|
%section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); |
134 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
135 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
136 |
w |
1.2 |
EOH |
137 |
|
|
|
138 |
|
|
edit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, |
139 |
|
|
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, |
140 |
|
|
template => <<EOH}, |
141 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Edit:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); |
142 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
143 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
144 |
w |
1.2 |
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\" |
145 |
|
|
%edit-form; |
146 |
|
|
%section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\"); |
147 |
|
|
\\"); |
148 |
|
|
%section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\"); |
149 |
|
|
%section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\"); |
150 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
151 |
|
|
%section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); |
152 |
|
|
%section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); |
153 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
154 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
155 |
w |
1.2 |
EOH |
156 |
|
|
adminedit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, |
157 |
|
|
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, |
158 |
|
|
template => <<EOH}, |
159 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Edit:Admin:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); |
160 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
161 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
162 |
w |
1.2 |
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\"); |
163 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
164 |
|
|
%section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); |
165 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
166 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
167 |
w |
1.2 |
EOH |
168 |
|
|
-conflict => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, |
169 |
|
|
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, |
170 |
|
|
template => <<EOH}, |
171 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Edit:Conflict:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); |
172 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
173 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
174 |
w |
1.2 |
%section(level=>2,id=>edit-conflict,title=>\\"Edit:Conflict:Title\\",heading,content=>\\" |
175 |
|
|
<p>%res(name=>\\\\\\"Edit:Conflict:Description\\\\\\");</p> |
176 |
|
|
%conflict-form; |
177 |
w |
1.3 |
%section(level=>3,id=>edit-conflict-diff,title=>\\\\\\"Edit:Conflict:Diff:Title\\\\\\",heading,content=>\\\\\\" |
178 |
|
|
<p>%res(name=>\\\\\\\\\\\\\\"Edit:Conflict:Diff:Description\\\\\\\\\\\\\\");</p> |
179 |
|
|
%conflict-diff; |
180 |
|
|
\\\\\\"); |
181 |
w |
1.2 |
\\"); |
182 |
|
|
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\" |
183 |
|
|
<p>%res(name=>\\\\\\"Edit:Conflict:Edit:Description\\\\\\");</p> |
184 |
|
|
%edit-form; |
185 |
|
|
%section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\"); |
186 |
|
|
\\"); |
187 |
|
|
%section(level=>2,id=>\\"see-also\\",title=>SeeAlso,heading,content=>\\"%search-result;\\"); |
188 |
|
|
%section(level=>2,id=>referer,title=>Referer,heading,content=>\\"%referer-list;\\"); |
189 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
190 |
|
|
%section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); |
191 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
192 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
193 |
w |
1.2 |
EOH |
194 |
|
|
-wrote => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, |
195 |
|
|
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, |
196 |
|
|
template => <<EOH}, |
197 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Edit:Wrote:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); |
198 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
199 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
200 |
w |
1.2 |
<p>%res(name=>\\"Edit:SavedSuccessfully\\");</p> |
201 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
202 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
203 |
w |
1.2 |
EOH |
204 |
|
|
-deleted => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, |
205 |
|
|
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, |
206 |
|
|
template => <<EOH}, |
207 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Edit:Deleted:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); |
208 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
209 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
210 |
w |
1.2 |
<p>%res(name=>\\"Edit:PageIsDeletedSuccessfully\\");</p> |
211 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
212 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
213 |
w |
1.2 |
EOH |
214 |
|
|
-error => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, |
215 |
|
|
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, |
216 |
|
|
template => <<EOH}, |
217 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Error:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); |
218 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
219 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
220 |
w |
1.2 |
%section(level=>2,id=>error,title=>\\"Error:Title\\",heading,content=>\\" |
221 |
|
|
<p>%error-message;</p> |
222 |
|
|
\\"); |
223 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
224 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
225 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
226 |
w |
1.2 |
EOH |
227 |
|
|
|
228 |
|
|
css => {media => {type => 'text/css', charset => 1, expires => 3600}, |
229 |
|
|
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 }, |
230 |
|
|
template => '%read(to=>CSS);'}, |
231 |
wakaba |
1.4 |
image_jpeg => {media => {type => 'image/jpeg', expires => 240*3600}, |
232 |
|
|
check => sub { ref ($_[0]->format_converter ($_[0]->{magic} => 'image_jpeg')) |
233 |
|
|
&& $_[0]->{magic} =~ m#image-type="image/jpeg"# ? 1 : 0 }, |
234 |
|
|
template => '%read(to=>image_jpeg);'}, |
235 |
|
|
image_png => {media => {type => 'image/png', expires => 240*3600}, |
236 |
|
|
check => sub { ref ($_[0]->format_converter ($_[0]->{magic} => 'image_png')) |
237 |
|
|
&& $_[0]->{magic} =~ m#image-type="image/png"# ? 1 : 0 }, |
238 |
|
|
template => '%read(to=>image_png);'}, |
239 |
w |
1.2 |
rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600}, |
240 |
|
|
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 }, |
241 |
wakaba |
1.4 |
template => '<?xml version="1.0"?>%styles-wiki-xml(page=>"WikiStyleList:RSS");%read(to=>RSS);'}, |
242 |
w |
1.2 |
-UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1}, |
243 |
|
|
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1}, |
244 |
|
|
check => sub {1}, template => <<EOH}, |
245 |
w |
1.3 |
%html-start;%html-head(title=>"%page-name;",link_meta=>"$vd{links}"); |
246 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
247 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
248 |
w |
1.2 |
%section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\" |
249 |
|
|
%res(name=>\\\\\\"UnsupportedMediaType:Description\\\\\\"); |
250 |
|
|
\\"); |
251 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
252 |
w |
1.3 |
%apply-user-preferred-style;");%html-end; |
253 |
w |
1.2 |
EOH |
254 |
w |
1.1 |
); |
255 |
w |
1.2 |
|
256 |
|
|
|
257 |
|
|
$ViewDefinition{diff} = {media => {type => 'text/html', charset => 1, expires => 120}, |
258 |
|
|
#xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, |
259 |
|
|
template => <<EOH, check => sub {1}} if $wiki::diff::UseDiff; |
260 |
w |
1.3 |
%html-start;%html-head(title=>"%res(name=>\\"Diff:WebPageTitle\\");",link_meta=>"$vd{links}"); |
261 |
w |
1.2 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
262 |
w |
1.3 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
263 |
w |
1.2 |
%section(level=>2,id=>\\"diff\\",title=>\\"Diff:Title\\",heading,content=>\\" |
264 |
|
|
<p>%res(name=>\\\\\\"Diff:Notice\\\\\\");</p> |
265 |
|
|
%diff-between-previous; |
266 |
|
|
\\"); |
267 |
|
|
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
268 |
|
|
%section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); |
269 |
|
|
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
270 |
|
|
"); |
271 |
|
|
EOH |
272 |
w |
1.3 |
|
273 |
wakaba |
1.4 |
$ViewDefinition{mininav} = {%{$ViewDefinition{read}}, template => <<EOH}; |
274 |
|
|
%html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}"); |
275 |
|
|
%section(level=>1,add_to_toc=>0,type=>body,content=>" |
276 |
|
|
%section(level=>2,id=>side-menu,class=>\\"mininav\\",add_to_toc=>0,content=>\\" |
277 |
|
|
%read; |
278 |
|
|
%anchor-wiki(rel=>view,mode=>mininav,class=>wiki-cmd,target=>_self,label=>\\\\\\"%res(name=>ReloadThisPage);\\\\\\",title=>\\\\\\"%res(name=>ReloadThisPageLong);\\\\\\"); |
279 |
|
|
\\"); |
280 |
|
|
%apply-user-preferred-style;");%html-end; |
281 |
|
|
EOH |
282 |
|
|
|
283 |
w |
1.3 |
=head1 NAME |
284 |
|
|
|
285 |
|
|
suikawiki-config.ph --- SuikaWiki: site configuration script |
286 |
|
|
|
287 |
|
|
=head1 LICENSE |
288 |
|
|
|
289 |
|
|
Copyright 2003 Wakaba <w@suika.fam.cx> |
290 |
|
|
|
291 |
|
|
This program is free software; you can redistribute it and/or |
292 |
|
|
modify it under the same terms as Perl itself. |
293 |
|
|
|
294 |
|
|
=cut |
295 |
w |
1.1 |
|
296 |
wakaba |
1.4 |
1; # $Date:$ |