/[pub]/suikawiki/script/default/suikawiki-config.ph
Suika

Diff of /suikawiki/script/default/suikawiki-config.ph

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by w, Sun Jan 26 01:43:24 2003 UTC revision 1.5 by wakaba, Sat Jul 19 04:45:55 2003 UTC
# Line 1  Line 1 
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  #          ## Note: If your Wiki CGI URI is <http://foo.example/path/to/wiki.cgi>,
5  # our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.          ##              cookie-path: /path/to/
6  # our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.          ##              script-short-name: wiki.cgi
7  #our $modifier_dbtype = 'Yuki::YukiWikiDB';     # Slow, available on all environment.          ##       URI parts MUST NOT contains "&" and/or non-URI characters.
8  #our $modifier_dbtype = 'Yuki::YukiWikiDB2';     # Slow, available on all environment.    our %uri = (
9  our $modifier_dbtype = 'Yuki::YukiWikiDBMeta';     # Slow, available on all environment.      cookie_path         => '/temp/wiki/',
10  our $url_cgi; {      external_script     => 'script/',
11        script_short_name   => 'wiki',
12      );
13      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}/~wakaba/wiki/wiki";      $url_cgi = "$scheme://$main::ENV{SERVER_NAME}:$main::ENV{SERVER_PORT}$uri{cookie_path}$uri{script_short_name}";
17          ## - MUST NOT include [&<>"] and/or non-URI characters    }
18  }    $uri{wiki} = $url_cgi;
19  our %uri = (  
20    external_script       => 'script/',  ## Path to modules and databases
21  );    use lib qw!lib!;
22  $uri{wiki} = $url_cgi;    $SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/);
23  $SuikaWiki::Plugin::plugin_directory = q(lib/SuikaWiki/Plugin/);    our %PathTo = (       ## Path to your data, from the main CGI script (NOT from this config script)
24  our %PathTo = ( ## Path to your data, from the main CGI script (NOT from this config script)      CachePrefix         => q(./wikidata/.cache.),
25    CacheHeadline => q(./wikidata/.headline.cache),      WikiDataBase        => q(./wikidata/page),
26    CachePrefix   => q(./wikidata/.cache.),    );
27    CacheSearchResult     => q(./wikidata/.search.cache),  
28    WikiDataBase  => q(./wikidata/page),  ## Type of WikiPage Database
29  );    #our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.
30  our $use_exists = 0; # If you can use 'exists' method for your DB.    #our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.
31  ##############################    #our $modifier_dbtype = 'Yuki::YukiWikiDB';     # Slow, available on all environment.
32  our %PageName = (    #our $modifier_dbtype = 'Yuki::YukiWikiDB2';     # Slow, available on all environment.
33    FrontPage     => 'HomePage',    our $modifier_dbtype = 'Yuki::YukiWikiDBMeta';     # Slow, available on all environment.
34    IndexPage     => 'IndexPage',    our $use_exists = 1; # If you can use 'exists' method for your DB.
35    SearchPage    => 'SearchPage',  
36    CreatePage    => 'CreatePage',  ## Name of Special WikiPage (linked as parts of navigations)
37    ErrorPage     => 'ErrorPage',    our %PageName = (
38    RecentChanges => 'RecentChanges',      FrontPage   => 'HomePage',
39    AdminSpecialPage      => "\x11\x11Admin\x11Special\x11Page\x11\x11",      IndexPage   => 'IndexPage',
40    UserAgentList => 'WikiUserAgentList',      SearchPage  => 'SearchPage',
41  );      CreatePage  => 'CreatePage',
42  our $kanjicode = 'euc';      RecentChanges       => 'RecentChanges',
43  our $lang = 'ja';      UserAgentList       => 'WikiUserAgentList',
44        AdminSpecialPage    => "\x11\x11Admin\x11Special\x11Page\x11\x11",
45  $wiki::useragent::UseLog = 0;   ## Use User-Agent name log (WikiUserAgentList) or not    );
46  $wiki::diff::UseDiff = 1;       ## Use diff mode or not  
47    ## (Should be reimplemented)
48      our $kanjicode = 'euc';
49      our $lang = 'ja';
50      $wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not
51    
52    ## Misc. options
53      $wiki::diff::UseDiff = 1;     ## Use diff mode or not
54    
55    ## Namespace of WikiName
56    package wiki::page::ns;
57      our $delimiter = '//';
58      our $self = '.';
59      our $parent = '..';
60    package main;
61    
62  ## Definition of views  ## Definition of views
63    
# Line 59  $vd{links} = <<'EOH'; Line 76  $vd{links} = <<'EOH';
76    %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\");    %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\");
77    %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);\");
78    %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\");    %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\");
79    %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);\");
80    %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);\");
81      %link-wiki(page=>WikiMenuBar,mode=>mininav,rel=>\"sidebar navigator\",class=>wiki);
82      %link-favicon(use_page_icon);
83  EOH  EOH
84    #%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);
85  $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;
# Line 142  adminedit => {media => {type => 'text/ht Line 161  adminedit => {media => {type => 'text/ht
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;\\");
# Line 210  EOH Line 237  EOH
237  css => {media => {type => 'text/css', charset => 1, expires => 3600},  css => {media => {type => 'text/css', charset => 1, expires => 3600},
238    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 },    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 },
239    template => '%read(to=>CSS);'},    template => '%read(to=>CSS);'},
240    image_jpeg => {media => {type => 'image/jpeg', expires => 240*3600},
241      check => sub { ref ($_[0]->format_converter ($_[0]->{magic} => 'image_jpeg'))
242                     && $_[0]->{magic} =~ m#image-type="image/jpeg"# ? 1 : 0 },
243      template => '%read(to=>image_jpeg);'},
244    image_png => {media => {type => 'image/png', expires => 240*3600},
245      check => sub { ref ($_[0]->format_converter ($_[0]->{magic} => 'image_png'))
246                     && $_[0]->{magic} =~ m#image-type="image/png"# ? 1 : 0 },
247      template => '%read(to=>image_png);'},
248  rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600},  rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600},
249    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 },    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 },
250    template => '%read(to=>RSS);'},    template => '<?xml version="1.0"?>%styles-wiki-xml(page=>"WikiStyleList:RSS");%read(to=>RSS);'},
251  -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1},  -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1},
252    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1},    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1},
253    check => sub {1}, template => <<EOH},    check => sub {1}, template => <<EOH},
# Line 244  $ViewDefinition{diff} = {media => {type Line 279  $ViewDefinition{diff} = {media => {type
279  ");  ");
280  EOH  EOH
281    
282    $ViewDefinition{mininav} = {%{$ViewDefinition{read}}, template => <<EOH};
283    %html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}");
284    %section(level=>1,add_to_toc=>0,type=>body,content=>"
285      %section(level=>2,id=>side-menu,class=>\\"mininav\\",add_to_toc=>0,content=>\\"
286        %read;
287        %anchor-wiki(rel=>view,mode=>mininav,class=>wiki-cmd,target=>_self,label=>\\\\\\"%res(name=>ReloadThisPage);\\\\\\",title=>\\\\\\"%res(name=>ReloadThisPageLong);\\\\\\");
288      \\");
289    %apply-user-preferred-style;");%html-end;
290    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
# Line 257  modify it under the same terms as Perl i Line 314  modify it under the same terms as Perl i
314    
315  =cut  =cut
316    
317  1;  1; # $Date$

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24