/[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.4.2.1 by wakaba, Sun Oct 5 10:25:33 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.),      convert             => q(/usr/X11R6/bin/convert),
27    CacheSearchResult     => q(./wikidata/.search.cache),    );
28    WikiDataBase  => q(./wikidata/page),  
29  );  ## Type of WikiPage Database
30  our $use_exists = 0; # If you can use 'exists' method for your DB.    #our $modifier_dbtype = 'AnyDBM_File';  # Fast, not available on some server, page size limited.
31  ##############################    #our $modifier_dbtype = 'dbmopen';      # Fast, not available on some server, page size limited.
32  our %PageName = (    #our $modifier_dbtype = 'Yuki::YukiWikiDB';     # Slow, available on all environment.
33    FrontPage     => 'HomePage',    #our $modifier_dbtype = 'Yuki::YukiWikiDB2';     # Slow, available on all environment.
34    IndexPage     => 'IndexPage',    our $modifier_dbtype = 'Yuki::YukiWikiDBMeta';     # Slow, available on all environment.
35    SearchPage    => 'SearchPage',    our $use_exists = 1; # If you can use 'exists' method for your DB.
36    CreatePage    => 'CreatePage',  
37    ErrorPage     => 'ErrorPage',  ## Name of Special WikiPage (linked as parts of navigations)
38    RecentChanges => 'RecentChanges',    our %PageName = (
39    AdminSpecialPage      => "\x11\x11Admin\x11Special\x11Page\x11\x11",      FrontPage   => 'HomePage',
40    UserAgentList => 'WikiUserAgentList',      IndexPage   => 'IndexPage',
41  );      SearchPage  => 'SearchPage',
42  our $kanjicode = 'euc';      CreatePage  => 'CreatePage',
43  our $lang = 'ja';      RecentChanges       => 'RecentChanges',
44        UserAgentList       => 'WikiUserAgentList',
45  $wiki::useragent::UseLog = 0;   ## Use User-Agent name log (WikiUserAgentList) or not      AdminSpecialPage    => "\x11\x11Admin\x11Special\x11Page\x11\x11",
46  $wiki::diff::UseDiff = 1;       ## Use diff mode or not    );
47    
48    ## (Should be reimplemented)
49      our $kanjicode = 'euc';
50      our $lang = 'ja';
51      $wiki::useragent::UseLog = 0; ## Use User-Agent name log (WikiUserAgentList) or not
52    
53    ## Misc. options
54      $wiki::diff::UseDiff = 1;     ## Use diff mode or not
55    
56    ## Namespace of WikiName
57    package wiki::page::ns;
58      our $delimiter = '//';
59      our $self = '.';
60      our $parent = '..';
61    package main;
62    
63  ## Definition of views  ## Definition of views
64    
# Line 59  $vd{links} = <<'EOH'; Line 77  $vd{links} = <<'EOH';
77    %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\");    %link-wiki(page=>SearchPage,rel=>search,class=>wiki,title=>\"%res(name=>GoToSearchPageLink);\");
78    %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);\");
79    %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\");    %link-wiki(page=>WikiPageLicense,rel=>copyright,class=>wiki,title=>\"%res(name=>GoToWikiPageLicenseLink);\");
80    %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);\");
81    %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);\");
82      %link-wiki(page=>WikiMenuBar,mode=>mininav,rel=>\"sidebar navigator\",class=>wiki);
83      %link-favicon(use_page_icon);
84  EOH  EOH
85    #%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);
86  $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 162  adminedit => {media => {type => 'text/ht
162  %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=>"
163    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");    %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");
164    %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);\\");
165      %section(level=>2,id=>edit,title=>\\"Edit:Rename:Title\\",heading,content=>
166        \\"%wp-rename-form-start;
167        %format(context=>form_input,template=>\\\\\\\"
168          %text(id=>to,label=>\\\\\\\\\\\\\\\"Edit:Rename:To\\\\\\\\\\\\\\\",size=>10);
169          %submit;
170        \\\\\\\");
171        %form-end;\\"
172      );
173    %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);\\");
174    %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;\\");
175    %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 238  EOH
238  css => {media => {type => 'text/css', charset => 1, expires => 3600},  css => {media => {type => 'text/css', charset => 1, expires => 3600},
239    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 },    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'CSS') ? 1 : 0 },
240    template => '%read(to=>CSS);'},    template => '%read(to=>CSS);'},
241    image_jpeg => {media => {type => 'image/jpeg', expires => 240*3600},
242      check => sub { ref ($_[0]->format_converter ($_[0]->{magic} => 'image_jpeg'))
243                     && $_[0]->{magic} =~ m#image-type="image/jpeg"# ? 1 : 0 },
244      template => '%read(to=>image_jpeg);'},
245    image_png => {media => {type => 'image/png', expires => 240*3600},
246      check => sub { ref ($_[0]->format_converter ($_[0]->{magic} => 'image_png'))
247                     && $_[0]->{magic} =~ m#image-type="image/png"# ? 1 : 0 },
248      template => '%read(to=>image_png);'},
249  rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600},  rss => {media => {type => 'application/rss+xml', charset => 1, expires => 3600},
250    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 },    check => sub { ref $_[0]->format_converter ($_[0]->{magic} => 'RSS') ? 1 : 0 },
251    template => '%read(to=>RSS);'},    template => '<?xml version="1.0"?>%styles-wiki-xml(page=>"WikiStyleList:RSS");%read(to=>RSS);'},
252  -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1},  -UnsupportedMediaType => {media => {type => 'text/html', charset => 1, expires => -1},
253    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1},    xmedia => {type => 'application/xhtml+xml', charset => 1, expires => -1},
254    check => sub {1}, template => <<EOH},    check => sub {1}, template => <<EOH},
# Line 244  $ViewDefinition{diff} = {media => {type Line 280  $ViewDefinition{diff} = {media => {type
280  ");  ");
281  EOH  EOH
282    
283    $ViewDefinition{mininav} = {%{$ViewDefinition{read}}, template => <<EOH};
284    %html-start;%html-head(title=>"%res(name=>\\"View:WebPageTitle\\");",link_meta=>"$vd{links}");
285    %section(level=>1,add_to_toc=>0,type=>body,content=>"
286      %section(level=>2,id=>side-menu,class=>\\"mininav\\",add_to_toc=>0,content=>\\"
287        %read;
288        %anchor-wiki(rel=>view,mode=>mininav,class=>wiki-cmd,target=>_self,label=>\\\\\\"%res(name=>ReloadThisPage);\\\\\\",title=>\\\\\\"%res(name=>ReloadThisPageLong);\\\\\\");
289      \\");
290    %apply-user-preferred-style;");%html-end;
291    EOH
292    
293    $ViewDefinition{pi_wp__rename} = {media => {type => 'text/html', charset => 1,
294      expires => 60}, check => sub {1},
295      #xmedia => {type => 'application/xhtml+xml', charset => 1, expires => 60},
296      template => <<EOH};
297    %html-start;%html-head(title=>"%res(name=>\\"Edit:Wrote:WebPageTitle\\");",link_meta=>"$vd{links}  %html-meta(name=>ROBOTS,content=>NOINDEX);");
298    %section(level=>1,add_to_toc=>0,type=>body,title=>"%page-name;",heading,content=>"
299      %section(id=>tools1,class=>tools,add_to_toc=>0,content=>\\"$vd{navbar}\\");
300      %section(level=>2,id=>edit,title=>\\"Edit:Rename:Title\\",heading,content=>\\"%wp-renaming;\\");
301      %section(id=>footer,add_to_toc=>0,content=>\\"%res(name=>\\\\\\"About:Name:SuikaWiki\\\\\\"); %wiki-version;\\");
302    %apply-user-preferred-style;");%html-end;
303    EOH
304    
305  =head1 NAME  =head1 NAME
306    
307  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 315  modify it under the same terms as Perl i
315    
316  =cut  =cut
317    
318  1;  1; # $Date$

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24