1 |
use strict; |
use strict; |
2 |
# |
|
3 |
# You MUST modify following '$modifier_...' variables. |
## URI (or part of URI) of Wiki CGI itself and its external addons |
4 |
# |
our %uri = ( |
5 |
# our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. |
cookie_path => '/temp/wiki/', |
6 |
# our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. |
external_script => 'script/', |
7 |
#our $modifier_dbtype = 'Yuki::YukiWikiDB'; # Slow, available on all environment. |
); |
8 |
#our $modifier_dbtype = 'Yuki::YukiWikiDB2'; # Slow, available on all environment. |
our $url_cgi; { |
|
our $modifier_dbtype = 'Yuki::YukiWikiDBMeta'; # Slow, available on all environment. |
|
|
our $url_cgi; { |
|
9 |
my $scheme = 'http'; |
my $scheme = 'http'; |
10 |
$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+.%-]+)#; |
11 |
$url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}/~wakaba/wiki/wiki"; |
$url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}wiki"; |
12 |
## - MUST NOT include [&<>"] and/or non-URI characters |
## - MUST NOT include [&<>"] and/or non-URI characters |
13 |
} |
} |
14 |
our %uri = ( |
$uri{wiki} = $url_cgi; |
15 |
external_script => 'script/', |
|
16 |
); |
## Path to modules and databases |
17 |
$uri{wiki} = $url_cgi; |
use lib qw!lib!; |
18 |
$SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/); |
$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) |
our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) |
20 |
CacheHeadline => q(./wikidata/.headline.cache), |
CacheHeadline => q(./wikidata/.headline.cache), |
21 |
CachePrefix => q(./wikidata/.cache.), |
CachePrefix => q(./wikidata/.cache.), |
22 |
CacheSearchResult => q(./wikidata/.search.cache), |
CacheSearchResult => q(./wikidata/.search.cache), |
23 |
WikiDataBase => q(./wikidata/page), |
WikiDataBase => q(./wikidata/page), |
24 |
); |
); |
25 |
our $use_exists = 0; # If you can use 'exists' method for your DB. |
|
26 |
############################## |
## Type of WikiPage Database |
27 |
our %PageName = ( |
#our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. |
28 |
FrontPage => 'HomePage', |
#our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. |
29 |
IndexPage => 'IndexPage', |
#our $modifier_dbtype = 'Yuki::YukiWikiDB'; # Slow, available on all environment. |
30 |
SearchPage => 'SearchPage', |
#our $modifier_dbtype = 'Yuki::YukiWikiDB2'; # Slow, available on all environment. |
31 |
CreatePage => 'CreatePage', |
our $modifier_dbtype = 'Yuki::YukiWikiDBMeta'; # Slow, available on all environment. |
32 |
ErrorPage => 'ErrorPage', |
our $use_exists = 1; # If you can use 'exists' method for your DB. |
33 |
RecentChanges => 'RecentChanges', |
|
34 |
AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", |
## Name of Special WikiPage (linked as parts of navigations) |
35 |
UserAgentList => 'WikiUserAgentList', |
our %PageName = ( |
36 |
); |
FrontPage => 'HomePage', |
37 |
our $kanjicode = 'euc'; |
IndexPage => 'IndexPage', |
38 |
our $lang = 'ja'; |
SearchPage => 'SearchPage', |
39 |
|
CreatePage => 'CreatePage', |
40 |
$wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not |
ErrorPage => 'ErrorPage', |
41 |
$wiki::diff::UseDiff = 1; ## Use diff mode or not |
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 |
|
|
61 |
## Definition of views |
## Definition of views |
62 |
|
|
75 |
%link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\"); |
%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);\"); |
%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);\"); |
%link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\"); |
78 |
%link-wiki(mode=>map,rel=>contents,class=>wiki-cmd,title=>\"%res(name=>ShowMapOfThisPageLink);\"); |
%link-wiki(mode=>map,rel=>sitemap,class=>wiki-cmd,title=>\"%res(name=>ShowMapOfThisPageLink);\"); |
79 |
%link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\"wiki randomlink\",title=>\"%res(name=>GoSomewhereLink);\"); |
%link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\"wiki randomlink\",title=>\"%res(name=>GoSomewhereLink);\"); |
80 |
|
%link-wiki(page=>WikiMenuBar,mode=>mininav,rel=>\"sidebar navigator\",class=>wiki); |
81 |
|
%link-favicon(use_page_icon); |
82 |
EOH |
EOH |
83 |
#%link-viewcvs(href=>\"http://path-to-viewcvs/path-to-repository/\",rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewHistoryOfThisPageLink);\",hreflang=>en); |
#%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; |
$vd{links} .= q( %link-wiki(mode=>diff,rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewDiffOfThisPageLink);\");) if $wiki::diff::UseDiff; |
228 |
css => {media => {type => 'text/css', charset => 1, expires => 3600}, |
css => {media => {type => 'text/css', charset => 1, expires => 3600}, |
229 |
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 }, |
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 }, |
230 |
template => '%read(to=>CSS);'}, |
template => '%read(to=>CSS);'}, |
231 |
|
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 |
rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600}, |
rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600}, |
240 |
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 }, |
check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 }, |
241 |
template => '%read(to=>RSS);'}, |
template => '<?xml version="1.0"?>%styles-wiki-xml(page=>"WikiStyleList:RSS");%read(to=>RSS);'}, |
242 |
-UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1}, |
-UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1}, |
243 |
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1}, |
xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1}, |
244 |
check => sub {1}, template => <<EOH}, |
check => sub {1}, template => <<EOH}, |
270 |
"); |
"); |
271 |
EOH |
EOH |
272 |
|
|
273 |
|
$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 |
=head1 NAME |
=head1 NAME |
284 |
|
|
285 |
suikawiki-config.ph --- SuikaWiki: site configuration script |
suikawiki-config.ph --- SuikaWiki: site configuration script |
293 |
|
|
294 |
=cut |
=cut |
295 |
|
|
296 |
1; |
1; # $Date$ |