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; { 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}/~wakaba/wiki/wiki"; ## - MUST NOT include [&<>"] and/or non-URI characters } our %uri = ( external_script => 'script/', ); $uri{wiki} = $url_cgi; $SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/); our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script) CacheHeadline => q(./wikidata/.headline.cache), CachePrefix => q(./wikidata/.cache.), CacheSearchResult => q(./wikidata/.search.cache), WikiDataBase => q(./wikidata/page), ); our $use_exists = 0; # If you can use 'exists' method for your DB. ############################## 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'; $wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not $wiki::diff::UseDiff = 1; ## Use diff mode or not ## Definition of views my %vd; $vd{links} = <<'EOH'; %styles-wiki-html(page=>\"WikiStyleList:HTML\"); %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>EditThisPageLink);\"); %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>\"%res(name=>AdminEditThisPageLink);\",add_param=>\"admin=1\"); %link-wiki(rel=>view,class=>wiki-cmd,title=>\"%res(name=>ViewThisPageLink);\",up_to_date); %link-wiki(rel=>myself,class=>wiki,title=>\"%res(name=>GoToMyselfLink);\"); %link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>\"%res(name=>GoToIndexPageLink);\"); %link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>\"%res(name=>GoToHomePageLink);\"); %link-wiki(page=>WikiNews,rel=>News,class=>wiki,title=>\"%res(name=>GoToWikiNewsLink);\"); %link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>\"%res(name=>GoToRecentChangesLink);\"); %link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>\"%res(name=>GoToRssPageLink);\",type=>\"application/xml\"); %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\"); %link-wiki(page=>WikiHelp,mode=>read,rel=>help,class=>wiki,title=>\"%res(name=>GoToWikiHelpLink);\"); %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\"); %link-wiki(mode=>map,rel=>contents,class=>wiki-cmd,title=>\"%res(name=>ShowMapOfThisPageLink);\"); %link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\"wiki randomlink\",title=>\"%res(name=>GoSomewhereLink);\"); EOH #%link-viewcvs(href=>\"http://path-to-viewcvs/path-to-repository/\",rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewHistoryOfThisPageLink);\",hreflang=>en); $vd{links} .= q( %link-wiki(mode=>diff,rel=>history,class=>wiki-cmd,title=>\"%res(name=>ViewDiffOfThisPageLink);\");) if $wiki::diff::UseDiff; $vd{links} .= <\\\"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);\\\"); %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);\\\"); EOH $vd{navbar} = <<'EOH'; %anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>\\\"%res(name=>EditThisPage);\\\",title=>\\\"%res(name=>EditThisPageLong,accesskey=>E);\\\"); %anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>\\\"%res(name=>ViewThisPage);\\\",title=>\\\"%res(name=>ViewThisPageLong);\\\"); %anchor-wiki(page=>CreatePage,class=>wiki,label=>\\\"%res(name=>GoToCreatePage);\\\",title=>\\\"%res(name=>GoToCreatePageLong);\\\"); %anchor-wiki(page=>IndexPage,class=>wiki,label=>\\\"%res(name=>GoToIndexPage);\\\",title=>\\\"%res(name=>GoToIndexPageLong);\\\"); %anchor-wiki(page=>HomePage,class=>wiki,label=>\\\"%res(name=>GoToHomePage);\\\",title=>\\\"%res(name=>GoToHomePageLong);\\\"); %anchor-wiki(page=>SearchPage,class=>wiki,label=>\\\"%res(name=>GoToSearchPage);\\\",title=>\\\"%res(name=>GoToSearchPageLong);\\\"); %anchor-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>\\\"wiki randomlink\\\",label=>\\\"%res(name=>GoSomewhere);\\\",title=>\\\"%res(name=>GoSomewhereLong);\\\"); %anchor-wiki(page=>RecentChanges,class=>wiki,label=>\\\"%res(name=>GoToRecentChanges);\\\",title=>\\\"%res(name=>GoToRecentChangesLong);\\\"); EOH our %ViewDefinition = ( read => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, template => <"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>read,add_to_toc=>0,content=>\\"%read(comment);\\"); %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(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); %section(class=>tools,add_to_toc=>0,content=>\\\"$vd{navbar}\\\"); %section(id=>footer,add_to_toc=>0,content=>\\" %res(name=>\\\\\\"About:Name:YukiWiki\\\\\\"); %res(name=>\\\\\\"About:Name:WalWiki\\\\\\"); \\\\\\"About:SuikaWiki:JumpToCVS\\\\\\");\\\\\\">%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version; \\"); %apply-user-preferred-style;");%html-end; EOH map => {media => {type => 'text/html', charset => 1, expires => 120}, check => sub {1}, #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, template => <"%res(name=>\\"Map:WebPageTitle\\");",link_meta=>"$vd{links}"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>\\"link-map\\",title=>\\"Map:Title\\",heading,content=>\\"

%res(name=>\\\\\\"Map:Description\\\\\\");

%link-map; \\"); %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 edit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, template => <"%res(name=>\\"Edit:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\" %edit-form; %section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\"); \\"); %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(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); %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 adminedit => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, template => <"%res(name=>\\"Edit:Admin:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\"); %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); %section(id=>last-modified,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"LastModified=\\\\\\");%last-modified;\\"); %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); %apply-user-preferred-style;");%html-end; EOH -conflict => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, template => <"%res(name=>\\"Edit:Conflict:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>edit-conflict,title=>\\"Edit:Conflict:Title\\",heading,content=>\\"

%res(name=>\\\\\\"Edit:Conflict:Description\\\\\\");

%conflict-form; %section(level=>3,id=>edit-conflict-diff,title=>\\\\\\"Edit:Conflict:Diff:Title\\\\\\",heading,content=>\\\\\\"

%res(name=>\\\\\\\\\\\\\\"Edit:Conflict:Diff:Description\\\\\\\\\\\\\\");

%conflict-diff; \\\\\\"); \\"); %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"

%res(name=>\\\\\\"Edit:Conflict:Edit:Description\\\\\\");

%edit-form; %section(level=>3,id=>edit-help,add_to_toc=>0,content=>\\\\\\"%read(page=>WikiEditHelp);\\\\\\"); \\"); %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 -wrote => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, template => <"%res(name=>\\"Edit:Wrote:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");

%res(name=>\\"Edit:SavedSuccessfully\\");

%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); %apply-user-preferred-style;");%html-end; EOH -deleted => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, template => <"%res(name=>\\"Edit:Deleted:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");

%res(name=>\\"Edit:PageIsDeletedSuccessfully\\");

%section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); %apply-user-preferred-style;");%html-end; EOH -error => {media => {type => 'text/html', charset => 1, expires => 60}, check => sub {1}, xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60}, template => <"%res(name=>\\"Error:WebPageTitle\\");",link_meta=>"$vd{links} %html-meta(name=>ROBOTS,content=>NOINDEX);"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>error,title=>\\"Error:Title\\",heading,content=>\\"

%error-message;

\\"); %section(level=>2,id=>toc,title=>\\"TOC:Title\\",heading,add_to_toc=>0,content=>\\"%toc(drag);\\"); %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); %apply-user-preferred-style;");%html-end; EOH css => {media => {type => 'text/css', charset => 1, expires => 3600}, check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 }, template => '%read(to=>CSS);'}, rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600}, check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 }, template => '%read(to=>RSS);'}, -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1}, xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1}, check => sub {1}, template => <"%page-name;",link_meta=>"$vd{links}"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\" %res(name=>\\\\\\"UnsupportedMediaType:Description\\\\\\"); \\"); %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\"); %apply-user-preferred-style;");%html-end; EOH ); $ViewDefinition{diff} = {media => {type => 'text/html', charset => 1, expires => 120}, #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 120}, template => < sub {1}} if $wiki::diff::UseDiff; %html-start;%html-head(title=>"%res(name=>\\"Diff:WebPageTitle\\");",link_meta=>"$vd{links}"); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\"); %section(level=>2,id=>\\"diff\\",title=>\\"Diff:Title\\",heading,content=>\\"

%res(name=>\\\\\\"Diff:Notice\\\\\\");

%diff-between-previous; \\"); %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;\\"); "); EOH =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;