--- suikawiki/wikidata/suikawiki-config.ph 2003/03/27 07:29:20 1.5 +++ suikawiki/wikidata/suikawiki-config.ph 2003/03/27 07:52:24 1.6 @@ -1,45 +1,65 @@ use strict; -# -# You MUST modify following '$modifier_...' variables. -# -# our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. -# our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. -#our $modifier_dbtype = 'Yuki::YukiWikiDB'; # Slow, available on all environment. -#our $modifier_dbtype = 'Yuki::YukiWikiDB2'; # Slow, available on all environment. -our $modifier_dbtype = 'Yuki::YukiWikiDBMeta'; # Slow, available on all environment. -our $url_cgi; { + +## URI (or part of URI) of Wiki CGI itself and its external addons + ## Note: If your Wiki CGI URI is , + ## cookie-path: /path/to/ + ## script-short-name: wiki.cgi + ## URI parts MUST NOT contains "&" and/or non-URI characters. + our %uri = ( + cookie_path => '/temp/suikawiki/', + external_script => '../wiki/script/', + script_short_name => 'wiki', + ); + our $url_cgi; { my $scheme = 'http'; $scheme = lc $1 if $main::ENV{SERVER_PROTOCOL} =~ m#([A-Za-z0-9+.%-]+)#; - $url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}/temp/suikawiki/wiki"; - ## - MUST NOT include [&<>"] and/or non-URI characters -} -our %uri = ( - cookie_path => '/temp/suikawiki/', - external_script => '../wiki/script/', -); -$uri{wiki} = $url_cgi; -use lib qw!../wiki/lib!; -$SuikaWiki::Plugin::plugin_directory = q(../wiki/lib/SuikaWiki/Plugin/); -our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) - CachePrefix => q(./wikidata/.cache.), - WikiDataBase => q(./wikidata/page), -); -############################## -our %PageName = ( - FrontPage => 'HomePage', - IndexPage => 'IndexPage', - SearchPage => 'SearchPage', - CreatePage => 'CreatePage', - ErrorPage => 'ErrorPage', - RecentChanges => 'RecentChanges', - AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", - UserAgentList => 'WikiUserAgentList', -); -our $kanjicode = 'euc'; -our $lang = 'ja'; + $url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}$uri{script_short_name}"; + } + $uri{wiki} = $url_cgi; + +## Path to modules and databases + use lib qw!../wiki/lib!; + $SuikaWiki::Plugin::plugin_directory = q(../wiki/lib/SuikaWiki/Plugin/); + our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) + CachePrefix => q(./wikidata/.cache.), + WikiDataBase => q(./wikidata/page), + ); + +## Type of WikiPage Database + #our $modifier_dbtype = 'AnyDBM_File'; # Fast, not available on some server, page size limited. + #our $modifier_dbtype = 'dbmopen'; # Fast, not available on some server, page size limited. + #our $modifier_dbtype = 'Yuki::YukiWikiDB'; # Slow, available on all environment. + #our $modifier_dbtype = 'Yuki::YukiWikiDB2'; # Slow, available on all environment. + our $modifier_dbtype = 'Yuki::YukiWikiDBMeta'; # Slow, available on all environment. + our $use_exists = 1; # If you can use 'exists' method for your DB. -$wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not -$wiki::diff::UseDiff = 1; ## Use diff mode or not +## Name of Special WikiPage (linked as parts of navigations) + our %PageName = ( + FrontPage => 'HomePage', + IndexPage => 'IndexPage', + SearchPage => 'SearchPage', + CreatePage => 'CreatePage', + RecentChanges => 'RecentChanges', + UserAgentList => 'WikiUserAgentList', + AdminSpecialPage => "\x11\x11Admin\x11Special\x11Page\x11\x11", + ); + +## (Should be reimplemented) + our $kanjicode = 'euc'; + our $lang = 'ja'; + $wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not + +## Misc. options + $wiki::diff::UseDiff = 1; ## Use diff mode or not + +## Namespace of WikiName +package wiki::page::ns; + our $delimiter = '//'; + our $self = '.'; + our $parent = '..'; +package main; + +## Definition of views my %vd; $vd{links} = <<'EOH'; @@ -231,10 +251,6 @@ %section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\" %res(name=>\\\\\\"UnsupportedMediaType:Description\\\\\\"); \\"); - %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=>\\"$vd{navbar}\\"); %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); %apply-user-preferred-style;");%html-end; EOH @@ -254,7 +270,7 @@ %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); -%apply-user-preferred-style;");%html-end; +"); EOH $ViewDefinition{WithMenu} = {%{$ViewDefinition{read}}, template => < <"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}"); %section(level=>1,add_to_toc=>0,type=>body,content=>" @@ -291,4 +308,17 @@ %apply-user-preferred-style;");%html-end; EOH -1; +=head1 NAME + +suikawiki-config.ph --- SuikaWiki: site configuration script + +=head1 LICENSE + +Copyright 2003 Wakaba + +This program is free software; you can redistribute it and/or +modify it under the same terms as Perl itself. + +=cut + +1; # $Date: 2003/03/27 07:52:24 $