use strict; ## 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', ## If you use CVS repository of WikiDatabase, #cvs_repository => 'http://path-to-viewcvs/path-to-repository/', ); 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}$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. ## Name of Special WikiPage (linked as parts of navigations) our %PageName = ( FrontPage => 'HomePage', IndexPage => 'IndexPage', SearchPage => 'SearchPage', CreatePage => 'CreatePage', RecentChanges => 'RecentChanges', ResourceNS => 'Wiki//Resource//', 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 ## Definition of views require SuikaWiki::View; my %vd; $vd{links} = SuikaWiki::View->template ('links')->add_line (<<'EOH'); %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>"%res(name=>EditThisPageLink,safe);"p); %link-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,title=>"%res(name=>AdminEditThisPageLink,safe);"p,add-param=>"admin=1"); %link-wiki(rel=>view,class=>wiki-cmd,title=>"%res(name=>ViewThisPageLink,safe);"p,up_to_date); %link-wiki(rel=>myself,class=>wiki,title=>"%res(name=>GoToMyselfLink,safe);"p); %link-wiki(page=>IndexPage,rel=>index,class=>wiki,title=>"%res(name=>GoToIndexPageLink,safe);"p); %link-wiki(page=>HomePage,rel=>home,class=>wiki,title=>"%res(name=>GoToHomePageLink,safe);"p); %link-wiki(page=>"Wiki//News",rel=>News,class=>wiki,title=>"%res(name=>GoToWikiNewsLink,safe);"p); %link-wiki(page=>RecentChanges,rel=>News,class=>wiki,title=>"%res(name=>GoToRecentChangesLink,safe);"p); %link-wiki(page=>RecentChanges,mode=>rss,rel=>News,class=>wiki,title=>"%res(name=>GoToRssPageLink,safe);"p,type=>"application/xml"); %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>"%res(name=>GoToSearchPageLink,safe);"p); %link-wiki(page=>"Wiki//Help",mode=>read,rel=>help,class=>wiki,title=>"%res(name=>GoToWikiHelpLink,safe);"p); %link-wiki(page=>"Wiki//Page//License",rel=>copyright,class=>wiki,title=>"%res(name=>GoToWikiPageLicenseLink,safe);"p); %link-wiki(mode=>map,rel=>sitemap,class=>wiki-cmd,title=>"%res(name=>ShowMapOfThisPageLink,safe);"p); %link-wiki(mode=>RandomJump,up_to_date,rel=>lucky,class=>"wiki randomlink",title=>"%res(name=>GoSomewhereLink,safe);"p); EOH $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,safe);"p); %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,safe);"p); EOH $vd{navbar} = SuikaWiki::View->template ('navbar')->add_line (<<'EOH'); %anchor-wiki(mode=>edit,rel=>edit,class=>wiki-cmd,label=>"%res(name=>EditThisPage,safe);"p,title=>"%res(name=>EditThisPageLong,safe);"p,accesskey=>E); %anchor-wiki(rel=>view,up_to_date,class=>wiki-cmd,label=>"%res(name=>ViewThisPage,safe);"p,title=>"%res(name=>ViewThisPageLong,safe);"p); %anchor-wiki(page=>CreatePage,class=>wiki,label=>"%res(name=>GoToCreatePage,safe);"p,title=>"%res(name=>GoToCreatePageLong,safe);"p); %anchor-wiki(page=>IndexPage,class=>wiki,label=>"%res(name=>GoToIndexPage,safe);"p,title=>"%res(name=>GoToIndexPageLong,safe);"p); %anchor-wiki(page=>HomePage,class=>wiki,label=>"%res(name=>GoToHomePage,safe);"p,title=>"%res(name=>GoToHomePageLong,safe);"p); %anchor-wiki(page=>SearchPage,class=>wiki,label=>"%res(name=>GoToSearchPage,safe);"p,title=>"%res(name=>GoToSearchPageLong,safe);"p); %anchor-wiki(mode=>RandomJump,up-to-date,rel=>lucky,class=>"wiki randomlink",label=>"%res(name=>GoSomewhere,safe);"p,title=>"%res(name=>GoSomewhereLong,safe);"p); %anchor-wiki(page=>RecentChanges,class=>wiki,label=>"%res(name=>GoToRecentChanges,safe);"p,title=>"%res(name=>GoToRecentChangesLong,safe);"p); EOH my %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\\",safe);"p,link-meta=>"%predefined-template(name=>links);"p); %section(level=>1,add-to-toc=>0,type=>body,title=>"%ns-short-page-name(safe);"p,heading,content=>" %section(id=>tools1,class=>tools,add-to-toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %section(level=>2,id=>read,add-to-toc=>0,content=>\\"%read(comment);\\"); %section(level=>2,id=>children, title=>\\"%res(name=>\\\\\\"Children:Title\\\\\\",safe);\\"p,heading, content=>\\"%page-list(ns=>\\\\\\"%page-name(safe);\\\\\\"p,recursive=>0,type=>both, template=>\\\\\\"%wiki-link(label=>\\\\\\\\\\\\\\"%ns-short-page-or-ns-name;\\\\\\\\\\\\\\"ps);\\\\\\" );\\" ); %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=>\\\"%predefined-template(name=>navbar);\\"p); %section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %apply-user-preferred-style;");%html-end; %log-hotness(); 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=>"%predefined-template(name=>links);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %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=>\\\"%predefined-template(name=>navbar);\\"p); %section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %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=>"%predefined-template(name=>links);%html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %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=>\\\\\\\\\\\\\\"Wiki//Help//Edit\\\\\\\\\\\\\\");\\\\\\"); \\"); %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=>\\\"%predefined-template(name=>navbar);\\"p); %section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %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\\");"p,link_meta=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %section(level=>2,id=>edit,title=>\\"Edit:Title\\",heading,content=>\\"%edit-form(admin);\\"); %section(level=>2,id=>edit,title=>\\"Edit:Rename:Title\\",heading,content=> \\"%wp-rename-form-start; %format(context=>form_input,template=>\\\\\\\" %text(id=>to,label=>\\\\\\\\\\\\\\\"%res(name=>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Edit:Rename:To=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\\\\\\\\\\\\\\\",size=>10,default=>\\\\\\\\\\\\\\\"%page-name;\\\\\\\\\\\\\\\"ps); %submit; \\\\\\\"); %form-end;\\" ); %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=>\\"%predefined-template(name=>footer);\\"); %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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %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=>\\\\\\\\\\\\\\"Wiki//Help//Edit\\\\\\\\\\\\\\");\\\\\\"); \\"); %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=>\\\"%predefined-template(name=>navbar);\\"p); %section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p);

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

%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %apply-user-preferred-style;");%html-end; %log-hotness(weight=>2); 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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p);

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

%section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %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=>\\"%predefined-template(name=>footer);\\"); %apply-user-preferred-style;");%html-end; EOH rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600}, check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 }, template => '%styles-wiki-xml(page=>"Wiki//Style//List//RSS");%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=>"%predefined-template(name=>links); %html-meta(name=>ROBOTS,content=>NOINDEX);"p); %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>" %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"%predefined-template(name=>navbar);\\"p); %section(level=>2,title=>\\"UnsupportedMediaType:Title\\",heading,content=>\\"

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

\\"); %section(id=>footer,add-to-toc=>0,content=>\\"%predefined-template(name=>footer);\\"); %apply-user-preferred-style;");%html-end; EOH ); require SuikaWiki::View; for (keys %ViewDefinition) { SuikaWiki::View->definition ($_)->properties ($ViewDefinition{$_}); } =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/04/03 01:10:10 $