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