1 |
use strict; |
use strict; |
2 |
|
|
3 |
## URI (or part of URI) of Wiki CGI itself and its external addons |
## URI (or part of URI) of Wiki CGI itself and its external addons |
4 |
|
## 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 |
our %uri = ( |
our %uri = ( |
9 |
cookie_path => '/temp/wiki/', |
cookie_path => '/temp/wiki/', |
10 |
external_script => 'script/', |
external_script => 'script/', |
11 |
|
script_short_name => 'wiki', |
12 |
); |
); |
13 |
our $url_cgi; { |
our $url_cgi; { |
14 |
my $scheme = 'http'; |
my $scheme = 'http'; |
15 |
$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+.%-]+)#; |
16 |
$url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}wiki"; |
$url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}$uri{script_short_name}"; |
|
## - MUST NOT include [&<>"] and/or non-URI characters |
|
17 |
} |
} |
18 |
$uri{wiki} = $url_cgi; |
$uri{wiki} = $url_cgi; |
19 |
|
|
21 |
use lib qw!lib!; |
use lib qw!lib!; |
22 |
$SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/); |
$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) |
our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) |
|
CacheHeadline => q(./wikidata/.headline.cache), |
|
24 |
CachePrefix => q(./wikidata/.cache.), |
CachePrefix => q(./wikidata/.cache.), |
|
CacheSearchResult => q(./wikidata/.search.cache), |
|
25 |
WikiDataBase => q(./wikidata/page), |
WikiDataBase => q(./wikidata/page), |
26 |
); |
); |
27 |
|
|
39 |
IndexPage => 'IndexPage', |
IndexPage => 'IndexPage', |
40 |
SearchPage => 'SearchPage', |
SearchPage => 'SearchPage', |
41 |
CreatePage => 'CreatePage', |
CreatePage => 'CreatePage', |
|
ErrorPage => 'ErrorPage', |
|
42 |
RecentChanges => 'RecentChanges', |
RecentChanges => 'RecentChanges', |
|
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
|
43 |
UserAgentList => 'WikiUserAgentList', |
UserAgentList => 'WikiUserAgentList', |
44 |
|
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
45 |
); |
); |
46 |
|
|
47 |
## (Should be reimplemented) |
## (Should be reimplemented) |
161 |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
%section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" |
162 |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
%section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); |
163 |
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\"); |
%section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\"); |
164 |
|
%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 |
%section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); |
%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;\\"); |
%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;\\"); |
%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); |
289 |
%apply-user-preferred-style;");%html-end; |
%apply-user-preferred-style;");%html-end; |
290 |
EOH |
EOH |
291 |
|
|
292 |
|
$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 |
=head1 NAME |
=head1 NAME |
305 |
|
|
306 |
suikawiki-config.ph --- SuikaWiki: site configuration script |
suikawiki-config.ph --- SuikaWiki: site configuration script |