Index: test/unit/VariableTests.pm =================================================================== --- test/unit/VariableTests.pm (.../TWikiRelease04x00) (revision 9301) +++ test/unit/VariableTests.pm (.../DEVELOP) (revision 9301) @@ -149,20 +149,28 @@ my $text = <<'END'; %USERNAME% +%STARTSECTION{type="templateonly"}% +Kill me +%ENDSECTION{type="templateonly"}% %WIKINAME% %WIKIUSERNAME% %WEBCOLOR% +%STARTSECTION{name="fred" type="section"}% %USERINFO% %USERINFO{format="$emails,$username,$wikiname,$wikiusername"}% +%ENDSECTION{name="fred" type="section"}% END my $result = $twiki->expandVariablesOnTopicCreation($text, $user); my $xpect = <<'END'; fnurgle + FrankNurgle TemporaryTesUsersUsersWeb.FrankNurgle %WEBCOLOR% +%STARTSECTION{name="fred" type="section"}% fnurgle, TemporaryTesUsersUsersWeb.FrankNurgle, frank@nurgle.org,mad@sad.com frank@nurgle.org,mad@sad.com,fnurgle,FrankNurgle,TemporaryTesUsersUsersWeb.FrankNurgle +%ENDSECTION{name="fred" type="section"}% END $this->assert_str_equals($xpect, $result); } Index: test/unit/StoreTests.pm =================================================================== --- test/unit/StoreTests.pm (.../TWikiRelease04x00) (revision 9301) +++ test/unit/StoreTests.pm (.../DEVELOP) (revision 9301) @@ -136,6 +136,8 @@ $readText =~ s/\s*$//s; $this->assert_equals($text, $readText); + # remove topicinfo, useless for test + $readMeta->remove('TOPICINFO'); $this->assert_deep_equals($meta, $readMeta); } @@ -157,6 +159,8 @@ $readText =~ s/\s*$//s; $this->assert_equals($text, $readText); + # remove topicinfo, useless for test + $readMeta->remove('TOPICINFO'); $this->assert_deep_equals($meta, $readMeta); } @@ -236,4 +240,115 @@ $this->assert_null($lease); } +# Handler used in next test +sub beforeSaveHandler { + my( $text, $topic, $web, $meta ) = @_; + if( $text =~ /CHANGETEXT/ ) { + $_[0] =~ s/fieldvalue/text/; + } + if( $text =~ /CHANGEMETA/ ) { + $meta->putKeyed('FIELD', {name=>'fieldname', value=>'meta'}); + } +} + +use TWiki::Plugin; + +sub test_beforeSaveHandlerChangeText { + my $this = shift; + my $args = { + name => "fieldname", + value => "fieldvalue", + }; + + $twiki->{store}->createWeb($twiki->{user}, $web, '_default'); + $this->assert( $twiki->{store}->webExists($web) ); + $this->assert( ! $twiki->{store}->topicExists($web, $topic) ); + + # inject a handler directly into the plugins object + push(@{$twiki->{plugins}->{registeredHandlers}{beforeSaveHandler}}, + new TWiki::Plugin($twiki, "StoreTestPlugin", 'StoreTests')); + + my $text = 'CHANGETEXT'; + my $meta = new TWiki::Meta($twiki, $web, $topic); + $meta->putKeyed( "FIELD", $args ); + + $twiki->{store}->saveTopic( $user, $web, $topic, $text, $meta ); + $this->assert( $twiki->{store}->topicExists($web, $topic) ); + + my ($readMeta, $readText) = $twiki->{store}->readTopic($user, $web, $topic); + # ignore whitspace at end of data + $readText =~ s/\s*$//s; + + $this->assert_equals($text, $readText); + # remove topicinfo, useless for test + $readMeta->remove('TOPICINFO'); + # set expected meta + $meta->putKeyed('FIELD', {name=>'fieldname', value=>'text'}); + $this->assert_str_equals($meta->stringify(), $readMeta->stringify()); +} + +sub test_beforeSaveHandlerChangeMeta { + my $this = shift; + my $args = { + name => "fieldname", + value => "fieldvalue", + }; + + $twiki->{store}->createWeb($twiki->{user}, $web, '_default'); + $this->assert( $twiki->{store}->webExists($web) ); + $this->assert( ! $twiki->{store}->topicExists($web, $topic) ); + + # inject a handler directly into the plugins object + push(@{$twiki->{plugins}->{registeredHandlers}{beforeSaveHandler}}, + new TWiki::Plugin($twiki, "StoreTestPlugin", 'StoreTests')); + + my $text = 'CHANGEMETA'; + my $meta = new TWiki::Meta($twiki, $web, $topic); + $meta->putKeyed( "FIELD", $args ); + + $twiki->{store}->saveTopic( $user, $web, $topic, $text, $meta ); + $this->assert( $twiki->{store}->topicExists($web, $topic) ); + + my ($readMeta, $readText) = $twiki->{store}->readTopic($user, $web, $topic); + # ignore whitspace at end of data + $readText =~ s/\s*$//s; + + $this->assert_equals($text, $readText); + # set expected meta + $meta->putKeyed('FIELD', {name=>'fieldname', value=>'meta'}); + $this->assert_str_equals($meta->stringify(), $readMeta->stringify()); +} + +sub test_beforeSaveHandlerChangeBoth { + my $this = shift; + my $args = { + name => "fieldname", + value => "fieldvalue", + }; + + $twiki->{store}->createWeb($twiki->{user}, $web, '_default'); + $this->assert( $twiki->{store}->webExists($web) ); + $this->assert( ! $twiki->{store}->topicExists($web, $topic) ); + + # inject a handler directly into the plugins object + push(@{$twiki->{plugins}->{registeredHandlers}{beforeSaveHandler}}, + new TWiki::Plugin($twiki, "StoreTestPlugin", 'StoreTests')); + + my $text = 'CHANGEMETA CHANGETEXT'; + my $meta = new TWiki::Meta($twiki, $web, $topic); + $meta->putKeyed( "FIELD", $args ); + + $twiki->{store}->saveTopic( $user, $web, $topic, $text, $meta ); + $this->assert( $twiki->{store}->topicExists($web, $topic) ); + + my ($readMeta, $readText) = $twiki->{store}->readTopic($user, $web, $topic); + # ignore whitspace at end of data + $readText =~ s/\s*$//s; + + $this->assert_equals($text, $readText); + # set expected meta + $meta->putKeyed('FIELD', {name=>'fieldname', value=>'meta'}); + $this->assert_str_equals($meta->stringify(), $readMeta->stringify()); +} + 1; Index: test/unit/UsersTests.pm =================================================================== --- test/unit/UsersTests.pm (.../TWikiRelease04x00) (revision 9301) +++ test/unit/UsersTests.pm (.../DEVELOP) (revision 9301) @@ -67,12 +67,13 @@ sub tear_down { my $this = shift; - $this->SUPER::tear_down(); $this->assert_str_equals($original, $TWiki::cfg{SystemWebName}); $twiki->{store}->removeWeb($twiki->{user}, $testUsersWeb); $twiki->{store}->removeWeb($twiki->{user}, $testSysWeb); $twiki->{store}->removeWeb($twiki->{user}, $testNormalWeb); $this->assert($original, $TWiki::cfg{SystemWebName}); + + $this->SUPER::tear_down(); } sub new { Index: test/tinderbox/report-test.pl =================================================================== --- test/tinderbox/report-test.pl (.../TWikiRelease04x00) (revision 9301) +++ test/tinderbox/report-test.pl (.../DEVELOP) (revision 9301) @@ -4,16 +4,20 @@ use strict; use Data::Dumper qw( Dumper ); +# SMELL (?): requires Tinderbox web to already exist on server +# (also TestReportTemplate and TestReportForm) +# SMELL: suffix parameter here is a bit of a hack; it would be +# better if WWW::Mechanize::TWiki could suss it out... + my ( $TWIKIDEV ); BEGIN { $TWIKIDEV = $ENV{TWIKIDEV} or die "must set environment variable TWIKIDEV"; - my $cpan = "$TWIKIDEV/CPAN/"; + my $cpan = "$TWIKIDEV/lib/CPAN/"; die "no cpan directory [$cpan]" unless $cpan; - my @localLibs = ( "$cpan/lib", "$cpan/lib/arch" ); - unshift @INC, @localLibs; + unshift @INC, ( "$cpan/lib", "$cpan/lib/arch" ); } sub mychomp { chomp $_[0]; $_[0] } @@ -26,6 +30,8 @@ use WWW::Mechanize::TWiki 0.08; my $Config = { + server => 'http://develop.twiki.org/~develop/cgi-bin', + suffix => '', svn => undef, report => undef, attachment => [], @@ -38,6 +44,7 @@ my $result = GetOptions( $Config, # + 'server=s', 'suffix=s', 'svn=i', 'report=s', 'attachment=s@', # miscellaneous/generic options 'agent=s', 'help', 'man', 'debug', 'verbose|v', @@ -48,32 +55,24 @@ die "svn is a required parameter" unless $Config->{svn}; die "report is a required parameter" unless $Config->{report}; -die "no report '$Config->{report}'?" unless -e $Config->{report}; +die "missing report '$Config->{report}'?" unless -e $Config->{report}; ################################################################################ my $agent = "TWikiTestInfrastructure: " . File::Basename::basename( $0 ); -my $mech = WWW::Mechanize::TWiki->new( agent => "$agent", autocheck => 1 ) or die $!; -$mech->cgibin( 'http://develop.twiki.org/~develop/cgi-bin' ); +my $mech = WWW::Mechanize::TWiki->new( agent => $agent, autocheck => 1 ) or die $!; +$mech->cgibin( $Config->{server}, { scriptSuffix => $Config->{suffix} } ); my $topic = "Tinderbox.TestsReportSvn$Config->{svn}"; -$mech->edit( "$topic", { - topicparent => 'WebHome', +$mech->edit( $topic, { + topicparent => 'WebHome', templatetopic => 'TestReportTemplate', - formtemplate => 'TestReportForm', +# formtemplate => 'TestReportForm', } ); $mech->click_button( value => 'Save' ); -$Config->{verbose} && print "Attaching installation report\n"; -$mech->follow_link( text => 'Attach' ); -$mech->submit_form( fields => { - filepath => $Config->{report}, - filecomment => `date`, - hidefile => undef, -} ); - -foreach my $attachment ( @{$Config->{attachment}} ) +foreach my $attachment ( $Config->{report}, @{$Config->{attachment}} ) { $Config->{verbose} && print "$attachment\n"; $mech->follow_link( text => 'Attach' ); @@ -98,12 +97,14 @@ report-test.pl [options] -Copyright 2004, 2005 Will Norris and Sven Dowideit. All Rights Reserved. +Copyright 2004--2006 Will Norris and Sven Dowideit. All Rights Reserved. Options: - -svn - -report - -attachment + -server http://develop.twiki.org/~develop/cgi-bin + -suffix (temp kludge; needs to go away) + -svn svn revision the tests were performed on + -report filename of test results + -attachment list of filenames to attach (optional) -verbose -debug -help this documentation Index: test/tinderbox/sandbox-plugin.pl =================================================================== --- test/tinderbox/sandbox-plugin.pl (.../TWikiRelease04x00) (revision 0) +++ test/tinderbox/sandbox-plugin.pl (.../DEVELOP) (revision 9301) @@ -0,0 +1,123 @@ +#! /usr/bin/perl -w +# Copyright 2006 Will Norris. All Rights Reserved. +# License: GPL +use strict; +use Data::Dumper qw( Dumper ); + +my ( $TWIKIDEV, $BRANCH ); + +BEGIN { + $TWIKIDEV = $ENV{TWIKIDEV} or die "must set environment variable TWIKIDEV"; + + $BRANCH = $ENV{BRANCH} or die "must set environment varibale BRANCH"; + + my $cpan = "$TWIKIDEV/lib/CPAN/"; + die "no cpan directory [$cpan]" unless -d $cpan; + my @localLibs = ( "$cpan/lib", "$cpan/lib/arch" ); + unshift @INC, @localLibs; +} + +use FindBin; +use Getopt::Long; +use Pod::Usage; +use File::Basename; +#use WWW::Mechanize; +#use WWW::Mechanize::TWiki 0.08; + +my $Config = { +# + TWikiFor => 'http://localhost/~twikibuilder/twiki/twiki.org.zip', +# + server => 'localhost', + account => 'tinderbox', +# + verbose => 0, + debug => 0, + help => 0, + man => 0, +}; + +my $result = GetOptions( $Config, + 'TWikiFor=s', + 'server=s', 'account=s', +# miscellaneous/generic options + 'agent=s', 'help', 'man', 'debug', 'verbose|v', + ); +pod2usage( 1 ) if $Config->{help}; +pod2usage({ -exitval => 1, -verbose => 2 }) if $Config->{man}; +print STDERR Dumper( $Config ) if $Config->{debug}; + +chdir $FindBin::Bin; + +################################################################################ +# install the distribution + +# SMELL: create account if it doesn't exist...? +# sudo adduser --disabled-password tinderbox +# SMELL: old wiki account? (need force=1 option or what?) + +my $SERVER = $Config->{server}; +my $ACCOUNT = $Config->{account}; + +foreach my $extension ( 'BarcodePlugin' ) +{ + print "Installing to $SERVER ($extension)\n" if $Config->{verbose}; + # TODO: look into usefulness of --plugin=TWikiReleaseTrackerPlugin --extension=DistributionContrib for testing purposes + system( 'bash' => '-c' => qq{$TWIKIDEV/$BRANCH/twikiplugins/TWikiInstallerContrib/lib/TWiki/Contrib/TWikiInstallerContrib/bin/install-twiki.pl \\ +--TWikiFor=$Config->{TWikiFor} \\ +--verbose --debug \\ +--url=http://$SERVER/~$ACCOUNT/cgi-bin/$extension/twiki-install.cgi \\ +--dir=$ACCOUNT\@$SERVER:/home/$ACCOUNT/public_html/cgi-bin/$extension \\ +--kernel=LATEST --extension=CpanContrib \\ +--extension=$extension \\ +--force} ) == 0 or die $!; + + system( 'bash' => '-c' => qq{elinks http://$SERVER/~$ACCOUNT/cgi-bin/$extension/twiki/view.cgi/TWiki/$extension} ); + +#--administrator=$ADMIN +#--extension=TipsContrib +} + +################################################################################ + +# TODO: post test results(?) / svn revision of plugin installed (and url) on Tinderbox + +exit 0; + +################################################################################ +################################################################################ + +__DATA__ +=head1 NAME + +doit.pl - TWiki:Codev.DailyBuildAndSmokeTest + +=head1 SYNOPSIS + +doit.pl [options] + +Copyright 2004--2006 Will Norris and Sven Dowideit. All Rights Reserved. + + Options: + -TWikiFor + -server + -account + -verbose + -debug + -help this documentation + -man full docs + +=head1 OPTIONS + +=over 8 + +=back + +=head1 DESCRIPTION + + +=head2 SEE ALSO + + http://twiki.org/cgi-bin/view/Codev/DailyBuildAndSmokeTest + +=cut Property changes on: test/tinderbox/sandbox-plugin.pl ___________________________________________________________________ Name: svn:executable + * Index: test/tinderbox/doit.pl =================================================================== --- test/tinderbox/doit.pl (.../TWikiRelease04x00) (revision 9301) +++ test/tinderbox/doit.pl (.../DEVELOP) (revision 9301) @@ -1,5 +1,5 @@ #! /usr/bin/perl -w -# Copyright 2005 Will Norris. All Rights Reserved. +# Copyright 2005,2006 Will Norris. All Rights Reserved. # License: GPL use strict; use Data::Dumper qw( Dumper ); @@ -14,13 +14,11 @@ my ( $TWIKIDEV, $BRANCH ); BEGIN { - $TWIKIDEV = $ENV{TWIKIDEV}; - die "must set environment variable TWIKIDEV" unless $TWIKIDEV; + $TWIKIDEV = $ENV{TWIKIDEV} or die "must set environment variable TWIKIDEV"; - $BRANCH = $ENV{BRANCH}; - die "must set environment varibale BRANCH" unless $BRANCH; + $BRANCH = $ENV{BRANCH} or die "must set environment varibale BRANCH"; - my $cpan = "$TWIKIDEV/CPAN/"; + my $cpan = "$TWIKIDEV/lib/CPAN/"; die "no cpan directory [$cpan]" unless -d $cpan; my @localLibs = ( "$cpan/lib", "$cpan/lib/arch" ); unshift @INC, @localLibs; @@ -30,10 +28,20 @@ use Getopt::Long; use Pod::Usage; use File::Basename; -use WWW::Mechanize; -use WWW::Mechanize::TWiki 0.08; +#use WWW::Mechanize; +#use WWW::Mechanize::TWiki 0.08; my $Config = { +# + 'publish-to' => 'twikibuilder@localhost:/home/twikibuilder/public_html/twiki/' + || 'wbniv@twikiplugins.sourceforge.net:/home/users/w/wb/wbniv/twikiplugins/htdocs/', + TWikiFor => 'http://localhost/~twikibuilder/twiki/twiki.org.zip', +# + server => 'localhost' || 'tinderbox.wbniv.wikihosting.com', + account => 'tinderbox' || 'wbniv', + admin => 'WillNorris', +# + tinderbox => 'http://localhost/~wbniv/cgi-bin/twiki/', # verbose => 0, debug => 0, @@ -42,6 +50,9 @@ }; my $result = GetOptions( $Config, + 'publish-to=s', 'TWikiFor=s', + 'server=s', 'account=s', 'admin=s', + 'tinderbox=s', # miscellaneous/generic options 'agent=s', 'help', 'man', 'debug', 'verbose|v', ); @@ -49,44 +60,6 @@ pod2usage({ -exitval => 1, -verbose => 2 }) if $Config->{man}; print STDERR Dumper( $Config ) if $Config->{debug}; -# check for prerequisites -my $prereq = { - # base cpan requirements - 'ExtUtils::MakeMaker' => { }, - 'Storable' => { }, - # build-twiki-kernel.pl dependencies - 'Cwd' => { }, - 'File::Copy' => { }, - 'File::Path' => { }, - 'File::Spec::Functions' => { }, - 'File::Find::Rule' => { }, - 'File::Slurp' => { }, - 'File::Slurp::Tree' => { }, - 'LWP::UserAgent' => { }, - 'Getopt::Long' => { }, - 'Pod::Usage' => { }, - 'LWP::UserAgent::TWiki::TWikiGuest' => { }, - - 'WWW::Mechanize::TWiki' => { version => '0.08' }, - 'WWW::Mechanize' => { }, - - 'Apache::Htpasswd' => { }, -}; - -if ( $Config->{debug} ) -{ - print "Installed Required CPAN Module\n"; - while ( my ( $module, $value ) = each %$prereq ) - { - eval "require $module"; - my $minVersion = $value->{version} || 0; - my $moduleVersion = $module->VERSION || ''; - print sprintf("%-9s %-8s %s", $moduleVersion, ( $minVersion || '' ), $module ); - print "\tERROR!" unless ( $moduleVersion && $moduleVersion >= $minVersion ); - print "\n"; - } -} - ################################################################################ chdir $FindBin::Bin; @@ -94,30 +67,38 @@ chomp( my @svnInfo = `svn info .` ); die "no svn info?" unless @svnInfo; my ( $svnRev ) = ( ( grep { /^Revision:\s+(\d+)$/ } @svnInfo )[0] ) =~ /(\d+)$/; +#print "svnRev=[$svnRev]\n"; ################################################################################ -# build a new twiki kernel -print "Updating SVN\n" if $Config->{verbose}; -system( 'bash' => '-c' => "cd ../.. && svn update" ) == 0 or die $!; -print "Building a new TWikiKernel\n" if $Config->{verbose}; -system( '../../tools/distro/build-twiki-kernel.pl', '--nochangelog', '--nogendocs', '--notar', '--outputdir' => "$TWIKIDEV/$BRANCH/twikiplugins/TWikiInstallerContrib/lib/TWiki/Contrib/TWikiInstallerContrib/downloads/kernels/" ) == 0 or die $!; +# build (and publish?) a new distribution (includes a TWikiKernel) -################################################################################ -# build a new distribution -print "Building a distribution\n" if $Config->{verbose}; -system( 'bash' => '-c' => "cd $TWIKIDEV/$BRANCH/twikiplugins/TWikiInstallerContrib/lib/TWiki/Contrib/TWikiInstallerContrib/ && make MakeFor=twiki.org PUBLISH_TO=wnorris\@develop.twiki.org:/home/wnorris/public_html/ distro publish" ); +print "Building and publishing a candidate distribution\n" if $Config->{verbose}; +###system( 'bash' => '-c' => "cd $TWIKIDEV/$BRANCH/twikiplugins/TWikiInstallerContrib/lib/TWiki/Contrib/TWikiInstallerContrib/ && make PUBLISH_TO=$Config->{'publish-to'} distro publish" ); ################################################################################ # install the distribution -my $SERVER_NAME = 'tinderbox.wbniv.wikihosting.com'; -my $DHACCOUNT = 'wbniv'; -my $ADMIN = 'WillNorris'; +# SMELL: create account if it doesn't exist...? +# sudo adduser --disabled-password tinderbox +# SMELL: old wiki account? (need force=1 option or what?) -print "Installing to $SERVER_NAME\n" if $Config->{verbose}; -# TODO: look into usefulness of --plugin=TWikiReleaseTrackerPlugin --contrib=DistributionContrib for testing purposes -system( 'bash' => '-c' => qq{$TWIKIDEV/$BRANCH/twikiplugins/TWikiInstallerContrib/lib/TWiki/Contrib/TWikiInstallerContrib/bin/install-remote-twiki.pl --force --report --verbose --debug --install_account=$DHACCOUNT --administrator=$ADMIN --install_host=$SERVER_NAME --install_dir=/home/$DHACCOUNT/$SERVER_NAME --kernel=LATEST --addon=GetAWebAddOn --scriptsuffix=.cgi --cgiurl=http://$SERVER_NAME/cgi-bin} ) == 0 or die $!; +my $SERVER = $Config->{server}; +my $ACCOUNT = $Config->{account}; +my $ADMIN = $Config->{admin}; +print "Installing to $SERVER\n" if $Config->{verbose}; +# TODO: look into usefulness of --plugin=TWikiReleaseTrackerPlugin --extension=DistributionContrib for testing purposes +system( 'bash' => '-c' => qq{$TWIKIDEV/$BRANCH/twikiplugins/TWikiInstallerContrib/lib/TWiki/Contrib/TWikiInstallerContrib/bin/install-twiki.pl \\ +--TWikiFor=$Config->{TWikiFor} \\ +--verbose --debug \\ +--url=http://$SERVER/~$ACCOUNT/cgi-bin/twiki-install.cgi \\ +--dir=$ACCOUNT\@$SERVER:/home/$ACCOUNT/public_html/cgi-bin \\ +--kernel=LATEST --extension=CpanContrib --extension=CommentPlugin --extension=PreferencesPlugin --extension=SlideShowPlugin --extension=SmiliesPlugin --extension=TablePlugin --extension=TwistyContrib --extension=SpreadSheetPlugin --extension=InterwikiPlugin --extension=MailerContrib --extension=GetAWebAddOn \\ +--force} ) == 0 or die $!; + +#--administrator=$ADMIN +#--extension=TipsContrib + ################################################################################ my $report = 'report.txt'; @@ -125,14 +106,23 @@ ################################################################################ # run the tests print "Running the tests\n" if $Config->{verbose}; -system( 'bash' => '-c' => qq{cd ../unit && perl ../bin/TestRunner.pl TWikiUnitTestSuite.pm >&../tinderbox/$report} ); +# maybe switch to "perl tools/build.pl" ??? +system( 'bash' => '-c' => qq{cd ../unit && perl ../bin/TestRunner.pl TWikiSuite.pm >&../tinderbox/$report} ); ################################################################################ -# post the tests to tinderbox.wbniv.wikihosting.com -print "Posting the test results to $SERVER_NAME\n" if $Config->{verbose}; -system( './report-test.pl','--svn' => $svnRev, '--report' => $report, - '--attachment' => "$SERVER_NAME-install.html", -); +# post the test results +if ( $Config->{tinderbox} ) +{ + print "Posting the test results to ???\n" if $Config->{verbose}; + system( './report-test.pl', + '--svn' => $svnRev, + '--report' => $report, + '--attachment' => 'install-report.html', + '--server' => $Config->{tinderbox}, + '--suffix' => '.cgi', # SMELL: yuk + '--debug', '--verbose', + ); +} exit 0; @@ -148,9 +138,15 @@ doit.pl [options] -Copyright 2004, 2005 Will Norris and Sven Dowideit. All Rights Reserved. +Copyright 2004--2006 Will Norris and Sven Dowideit. All Rights Reserved. Options: + -publish-to + -TWikiFor + -server + -account + -admin + -tinderbox -verbose -debug -help this documentation Index: test/tinderbox/rebuild-deploy-test-if-new.pl =================================================================== --- test/tinderbox/rebuild-deploy-test-if-new.pl (.../TWikiRelease04x00) (revision 9301) +++ test/tinderbox/rebuild-deploy-test-if-new.pl (.../DEVELOP) (revision 9301) @@ -23,7 +23,7 @@ $BRANCH = $ENV{BRANCH}; die "must set environment varibale BRANCH" unless $BRANCH; - my $cpan = "$TWIKIDEV/CPAN/"; + my $cpan = "$TWIKIDEV/lib/CPAN/"; die "no cpan directory [$cpan]" unless -d $cpan; my @localLibs = ( "$cpan/lib", "$cpan/lib/arch" ); unshift @INC, @localLibs; @@ -42,6 +42,8 @@ use constant FREEZE_LOCK => '.freeze'; my $Config = { + server => 'tinderbox.wbniv.wikihosting.com', +# force => 0, # verbose => 0, @@ -60,7 +62,7 @@ pod2usage({ -exitval => 1, -verbose => 2 }) if $Config->{man}; print STDERR Dumper( $Config ) if $Config->{debug}; -# make easy to work as a crontab job +# make easy to work as a cron job chdir( $FindBin::Bin ); ################################################################################ @@ -87,10 +89,12 @@ print LOCK "$rev\n"; close( LOCK ); - system( './doit.pl' ); + system( './doit.pl' => + '--server' => $Config->{server}, + ); throw Error::Simple( 'build error' ) if $?; - my $wikiPage = LWP::Simple::get( 'http://tinderbox.wbniv.wikihosting.com/cgi-bin/twiki/view.cgi/TWiki/WebHome' ); + my $wikiPage = LWP::Simple::get( 'http://' . $Config->{Server} . "/cgi-bin/twiki/view.cgi/TWiki/WebHome" ); throw Error::Simple( 'installation error' ) unless ( $wikiPage || '' ) =~ /build\s+$rev/i; # mark build complete Index: test/tinderbox/latest-svn-checkin.pl =================================================================== --- test/tinderbox/latest-svn-checkin.pl (.../TWikiRelease04x00) (revision 9301) +++ test/tinderbox/latest-svn-checkin.pl (.../DEVELOP) (revision 9301) @@ -15,7 +15,7 @@ $BRANCH = $ENV{BRANCH}; die "must set environment varibale BRANCH" unless $BRANCH; - my $cpan = "$TWIKIDEV/CPAN/"; + my $cpan = "$TWIKIDEV/lib/CPAN/"; die "no cpan directory [$cpan]" unless -d $cpan; my @localLibs = ( "$cpan/lib", "$cpan/lib/arch" ); unshift @INC, @localLibs; Index: test/tinderbox/README =================================================================== --- test/tinderbox/README (.../TWikiRelease04x00) (revision 0) +++ test/tinderbox/README (.../DEVELOP) (revision 9301) @@ -0,0 +1,19 @@ +tinderbox + + * run the (unit) tests (tools$ perl build.pl) + * build a new twiki kernel (make kernel) + * build a new distribution (make distro) + * publish the distribution (make publish) + * install the distribution (TWikiInstallerContrib/bin/install-twiki.pl) + * (which is built on TWikiInstallerContrib's =twiki-install= web script) + * (which is built from =remote-install= combined with the code from TWikiExtensionInstallerContrib) + * SMELL: hmm, naming, user accounts, etc... + * run the (golden html) tests (dead atm) + * post the test results to tinderbox.wbniv.wikihosting.com + * SMELL: need to include link to the live installation! + + + + + +(rename doit.pl to tinderbox.pl? yes, probably...) Index: pub/TWiki/TWikiJavascripts/prototype.js =================================================================== --- pub/TWiki/TWikiJavascripts/prototype.js (.../TWikiRelease04x00) (revision 0) +++ pub/TWiki/TWikiJavascripts/prototype.js (.../DEVELOP) (revision 9301) @@ -0,0 +1,1949 @@ +/* Prototype JavaScript framework, version 1.5.0_pre0 + * (c) 2005 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.5.0_pre0', + ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', + + emptyFunction: function() {}, + K: function(x) {return x} +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.inspect = function(object) { + try { + if (object == undefined) return 'undefined'; + if (object == null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } +} + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this; + return function(event) { + return __method.call(object, event || window.event); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0; i < arguments.length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(); + } finally { + this.currentlyExecuting = false; + } + } + } +} + +/*--------------------------------------------------------------------------*/ + +function $() { + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +} +Object.extend(String.prototype, { + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += (replacement(match) || '').toString(); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + + sub: function(pattern, replacement, count) { + replacement = this.gsub.prepareReplacement(replacement); + count = count === undefined ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + }, + + scan: function(pattern, iterator) { + this.gsub(pattern, iterator); + return this; + }, + + truncate: function(length, truncation) { + length = length || 30; + truncation = truncation === undefined ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : this; + }, + + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(eval); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; + }, + + toQueryParams: function() { + var pairs = this.match(/^\??(.*)$/)[1].split('&'); + return pairs.inject({}, function(params, pairString) { + var pair = pairString.split('='); + params[pair[0]] = pair[1]; + return params; + }); + }, + + toArray: function() { + return this.split(''); + }, + + camelize: function() { + var oStringList = this.split('-'); + if (oStringList.length == 1) return oStringList[0]; + + var camelizedString = this.indexOf('-') == 0 + ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) + : oStringList[0]; + + for (var i = 1, len = oStringList.length; i < len; i++) { + var s = oStringList[i]; + camelizedString += s.charAt(0).toUpperCase() + s.substring(1); + } + + return camelizedString; + }, + + inspect: function() { + return "'" + this.replace(/\\/g, '\\\\').replace(/'/g, '\\\'') + "'"; + } +}); + +String.prototype.gsub.prepareReplacement = function(replacement) { + if (typeof replacement == 'function') return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; +} + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var Template = Class.create(); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; +Template.prototype = { + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + return this.template.gsub(this.pattern, function(match) { + var before = match[1]; + if (before == '\\') return match[2]; + return before + (object[match[3]] || '').toString(); + }); + } +} + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = true; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push(iterator(value, index)); + }); + return results; + }, + + detect: function (iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.collect(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value >= (result || value)) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value <= (result || value)) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.collect(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.collect(Prototype.K); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + iterator(value = collections.pluck(index)); + return value; + }); + }, + + inspect: function() { + return '#'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0; i < iterable.length; i++) + results.push(iterable[i]); + return results; + } +} + +Object.extend(Array.prototype, Enumerable); + +Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0; i < this.length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != undefined || value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0; i < this.length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + shift: function() { + var result = this[0]; + for (var i = 0; i < this.length - 1; i++) + this[i] = this[i + 1]; + this.length--; + return result; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); +var Hash = { + _each: function(iterator) { + for (key in this) { + var value = this[key]; + if (typeof value == 'function') continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject($H(this), function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + toQueryString: function() { + return this.map(function(pair) { + return pair.map(encodeURIComponent).join('='); + }).join('&'); + }, + + inspect: function() { + return '#'; + } +} + +function $H(object) { + var hash = Object.extend({}, object || {}); + Object.extend(hash, Enumerable); + Object.extend(hash, Hash); + return hash; +} +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + do { + iterator(value); + value = value.succ(); + } while (this.include(value)); + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')}, + function() {return new XMLHttpRequest()} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responderToAdd) { + if (!this.include(responderToAdd)) + this.responders.push(responderToAdd); + }, + + unregister: function(responderToRemove) { + this.responders = this.responders.without(responderToRemove); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (responder[callback] && typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + parameters: '' + } + Object.extend(this.options, options || {}); + }, + + responseIsSuccess: function() { + return this.transport.status == undefined + || this.transport.status == 0 + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + responseIsFailure: function() { + return !this.responseIsSuccess(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + var parameters = this.options.parameters || ''; + if (parameters.length > 0) parameters += '&_='; + + try { + this.url = url; + if (this.options.method == 'get' && parameters.length > 0) + this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; + + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.options.method, this.url, + this.options.asynchronous); + + if (this.options.asynchronous) { + this.transport.onreadystatechange = this.onStateChange.bind(this); + setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); + } + + this.setRequestHeaders(); + + var body = this.options.postBody ? this.options.postBody : parameters; + this.transport.send(this.options.method == 'post' ? body : null); + + } catch (e) { + this.dispatchException(e); + } + }, + + setRequestHeaders: function() { + var requestHeaders = + ['X-Requested-With', 'XMLHttpRequest', + 'X-Prototype-Version', Prototype.Version]; + + if (this.options.method == 'post') { + requestHeaders.push('Content-type', + 'application/x-www-form-urlencoded'); + + /* Force "Connection: close" for Mozilla browsers to work around + * a bug where XMLHttpReqeuest sends an incorrect Content-length + * header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType) + requestHeaders.push('Connection', 'close'); + } + + if (this.options.requestHeaders) + requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); + + for (var i = 0; i < requestHeaders.length; i += 2) + this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState != 1) + this.respondToReadyState(this.transport.readyState); + }, + + header: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) {} + }, + + evalJSON: function() { + try { + return eval(this.header('X-JSON')); + } catch (e) {} + }, + + evalResponse: function() { + try { + return eval(this.transport.responseText); + } catch (e) { + this.dispatchException(e); + } + }, + + respondToReadyState: function(readyState) { + var event = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (event == 'Complete') { + try { + (this.options['on' + this.transport.status] + || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + if ((this.header('Content-type') || '').match(/^text\/javascript/i)) + this.evalResponse(); + } + + try { + (this.options['on' + event] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + event, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ + if (event == 'Complete') + this.transport.onreadystatechange = Prototype.emptyFunction; + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.containers = { + success: container.success ? $(container.success) : $(container), + failure: container.failure ? $(container.failure) : + (container.success ? null : $(container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, object) { + this.updateContent(); + onComplete(transport, object); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.responseIsSuccess() ? + this.containers.success : this.containers.failure; + var response = this.transport.responseText; + + if (!this.options.evalScripts) + response = response.stripScripts(); + + if (receiver) { + if (this.options.insertion) { + new this.options.insertion(receiver, response); + } else { + Element.update(receiver, response); + } + } + + if (this.responseIsSuccess()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +document.getElementsByClassName = function(className, parentElement) { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + return $A(children).inject([], function(elements, child) { + if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + elements.push(child); + return elements; + }); +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) { + var Element = new Object(); +} + +Object.extend(Element, { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + Element[Element.visible(element) ? 'hide' : 'show'](element); + } + }, + + hide: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = 'none'; + } + }, + + show: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = ''; + } + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + }, + + update: function(element, html) { + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + }, + + getHeight: function(element) { + element = $(element); + return element.offsetHeight; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).include(className); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).add(className); + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).remove(className); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + for (var i = 0; i < element.childNodes.length; i++) { + var node = element.childNodes[i]; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + Element.remove(node); + } + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + childOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + while (element = element.parentNode) + if (element == ancestor) return true; + return false; + }, + + scrollTo: function(element) { + element = $(element); + var x = element.x ? element.x : element.offsetLeft, + y = element.y ? element.y : element.offsetTop; + window.scrollTo(x, y); + }, + + getStyle: function(element, style) { + element = $(element); + var value = element.style[style.camelize()]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css.getPropertyValue(style) : null; + } else if (element.currentStyle) { + value = element.currentStyle[style.camelize()]; + } + } + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (name in style) + element.style[name.camelize()] = style[name]; + }, + + getDimensions: function(element) { + element = $(element); + if (Element.getStyle(element, 'display') != 'none') + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = ''; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = 'none'; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return; + element._overflow = element.style.overflow; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + }, + + undoClipping: function(element) { + element = $(element); + if (element._overflow) return; + element.style.overflow = element._overflow; + element._overflow = undefined; + } +}); + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + if (this.element.tagName.toLowerCase() == 'tbody') { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '' + this.content + '
'; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set(this.toArray().concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set(this.select(function(className) { + return className != classNameToRemove; + }).join(' ')); + }, + + toString: function() { + return this.toArray().join(' '); + } +} + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Selector = Class.create(); +Selector.prototype = { + initialize: function(expression) { + this.params = {classNames: []}; + this.expression = expression.toString().strip(); + this.parseExpression(); + this.compileMatcher(); + }, + + parseExpression: function() { + function abort(message) { throw 'Parse error in selector: ' + message; } + + if (this.expression == '') abort('empty expression'); + if (this.expression == '*') return this.params.wildcard = true; + + var params = this.params, expr = this.expression, match, modifier, clause, rest; + while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { + modifier = match[1], clause = match[2], rest = match[3]; + switch (modifier) { + case '#': params.id = clause; break; + case '.': params.classNames.push(clause); break; + case undefined: params.tagName = clause.toUpperCase(); break; + default: abort(expr.inspect()); + } + expr = rest; + } + + if (expr.length > 0) abort(expr.inspect()); + }, + + buildMatchExpression: function() { + var params = this.params, conditions = [], clause; + + if (params.wildcard) + return 'true'; + + if (clause = params.id) + conditions.push('element.id == ' + clause.inspect()); + if (clause = params.tagName) + conditions.push('element.tagName.toUpperCase() == ' + clause.inspect()); + if ((clause = params.classNames).length > 0) + for (var i = 0; i < clause.length; i++) + conditions.push('Element.hasClassName(element, ' + clause[i].inspect() + ')'); + + return conditions.join(' && '); + }, + + compileMatcher: function() { + this.match = eval('function(element) { if (!element.tagName) return false; \ + return ' + this.buildMatchExpression() + ' }'); + }, + + findElements: function(scope) { + var element; + + if (element = $(this.params.id)) + if (this.match(element)) + if (!scope || Element.childOf(element, scope)) + return [element]; + + scope = (scope || document).getElementsByTagName(this.params.tagName || '*'); + + var results = []; + for (var i = 0; i < scope.length; i++) + if (this.match(element = scope[i])) + results.push(element); + + return results; + }, + + toString: function() { + return this.expression; + } +} + +function $$() { + return $A(arguments).map(function(expression) { + return expression.strip().split(/\s+/).inject([null], function(results, expr) { + var selector = new Selector(expr); + return results.map(selector.findElements.bind(selector)).flatten(); + }); + }).flatten(); +} +var Field = { + clear: function() { + for (var i = 0; i < arguments.length; i++) + $(arguments[i]).value = ''; + }, + + // Pass the field id or element as the first parameter and optionally a triggering delay in micro-seconds as the second. + // The delay is useful when the focus is part of effects that won't finish instantly since they prevent the focus from + // taking hold. Set the delay to right after the effect finishes and the focus will work. + focus: function() { + element = $(arguments[0]); + delay = arguments[1]; + + if (delay) { + setTimeout(function() { $(element).focus(); }, delay) + } else { + $(element).focus(); + } + }, + + present: function() { + for (var i = 0; i < arguments.length; i++) + if ($(arguments[i]).value == '') return false; + return true; + }, + + select: function(element) { + $(element).select(); + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select) + element.select(); + } +} + +/*--------------------------------------------------------------------------*/ + +var Form = { + serialize: function(form) { + var elements = Form.getElements($(form)); + var queryComponents = new Array(); + + for (var i = 0; i < elements.length; i++) { + var queryComponent = Form.Element.serialize(elements[i]); + if (queryComponent) + queryComponents.push(queryComponent); + } + + return queryComponents.join('&'); + }, + + getElements: function(form) { + form = $(form); + var elements = new Array(); + + for (tagName in Form.Element.Serializers) { + var tagElements = form.getElementsByTagName(tagName); + for (var j = 0; j < tagElements.length; j++) + elements.push(tagElements[j]); + } + return elements; + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) + return inputs; + + var matchingInputs = new Array(); + for (var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || + (name && input.name != name)) + continue; + matchingInputs.push(input); + } + + return matchingInputs; + }, + + disable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.blur(); + element.disabled = 'true'; + } + }, + + enable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.disabled = ''; + } + }, + + findFirstElement: function(form) { + return Form.getElements(form).find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + Field.activate(Form.findFirstElement(form)); + }, + + reset: function(form) { + $(form).reset(); + } +} + +Form.Element = { + serialize: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) { + var key = encodeURIComponent(parameter[0]); + if (key.length == 0) return; + + if (parameter[1].constructor != Array) + parameter[1] = [parameter[1]]; + + return parameter[1].map(function(value) { + return key + '=' + encodeURIComponent(value); + }).join('&'); + } + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return parameter[1]; + } +} + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'submit': + case 'hidden': + case 'password': + case 'text': + return Form.Element.Serializers.textarea(element); + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + } + return false; + }, + + inputSelector: function(element) { + if (element.checked) + return [element.name, element.value]; + }, + + textarea: function(element) { + return [element.name, element.value]; + }, + + select: function(element) { + return Form.Element.Serializers[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var value = '', opt, index = element.selectedIndex; + if (index >= 0) { + opt = element.options[index]; + value = opt.value; + if (!value && !('value' in opt)) + value = opt.text; + } + return [element.name, value]; + }, + + selectMany: function(element) { + var value = new Array(); + for (var i = 0; i < element.length; i++) { + var opt = element.options[i]; + if (opt.selected) { + var optValue = opt.value; + if (!optValue && !('value' in opt)) + optValue = opt.text; + value.push(optValue); + } + } + return [element.name, value]; + } +} + +/*--------------------------------------------------------------------------*/ + +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function() { + this.element = $(arguments[0]); + this.callback = arguments[1]; + this.trigger = arguments[2]; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element, this.trigger); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + var elements = Form.getElements(this.element); + for (var i = 0; i < elements.length; i++) + this.registerCallback(elements[i], this.trigger); + }, + + registerCallback: function(element, trigger) { + if (trigger && element.type) { + Event.observe(element, trigger, this.onElementEvent.bind(this)); + } else if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + case 'password': + case 'text': + case 'textarea': + case 'select-one': + case 'select-multiple': + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0; i < Event.observers.length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + this._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + element.detachEvent('on' + name, observer); + } + } +}); + +/* prevent memory leaks in IE */ +Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + clone: function(source, target) { + source = $(source); + target = $(target); + target.style.position = 'absolute'; + var offsets = this.cumulativeOffset(source); + target.style.top = offsets[1] + 'px'; + target.style.left = offsets[0] + 'px'; + target.style.width = source.offsetWidth + 'px'; + target.style.height = source.offsetHeight + 'px'; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px';; + element.style.left = left + 'px';; + element.style.width = width + 'px';; + element.style.height = height + 'px';; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} \ No newline at end of file Index: pub/TWiki/CascadingStyleSheets/style.css =================================================================== --- pub/TWiki/CascadingStyleSheets/style.css (.../TWikiRelease04x00) (revision 0) +++ pub/TWiki/CascadingStyleSheets/style.css (.../DEVELOP) (revision 9301) @@ -0,0 +1,475 @@ + +/* ----------------------------------------------------------- + STYLE + Appearance: margins, padding, fonts, borders + ----------------------------------------------------------- */ + + +/* --------------------------------------------------------------------------------------- + CONSTANTS + + Sizes + ---------------------------------------- + S1 line-height 1.4em + S2 somewhat smaller font size 94% + S3 small font size, twikiSmall 85% + S4 horizontal bar padding (h2) 5px + S5 form and attachment padding 20px + S6 left margin left bar 1em + + --------------------------------------------------------------------------------------- */ + +/* ----------------------------------------------------------- + General elements + ----------------------------------------------------------- */ + +/* GENERAL HTML ELEMENTS */ + +html body { + font-size:104%; + voice-family:"\"}\""; + voice-family:inherit; + font-size:small; +} +html>body { /* Mozilla */ + font-size:small; +} +p { + margin:1em 0 0 0; +} +table { + border-collapse:separate; +} +th { + line-height:1.15em; +} +strong, b { + font-weight:bold; +} +hr { + height:1px; + border:none; +} + +/* put overflow pre in a scroll area */ +pre { + width:100%; + margin:1em 0; /* Win IE tries to make this bigger otherwise */ +} +html>body pre { /* hide from IE */ + /*\*/ overflow:auto !important; /* */ overflow:scroll; width:auto; /* for Mac Safari */ +} +/* IE behavior for pre is defined in css.tmpl in conditional comment */ + +/* Text */ +h1, h2, h3, h4, h5, h6 { + line-height:104%; + padding:0em; + margin:1em 0 .1em 0; + font-weight:normal; +} +h1 { + margin:0 0 .5em 0; +} +h1 { font-size:210%; } +h2 { font-size:160%; } +h3 { font-size:135%; } +h4 { font-size:122%; } +h5 { font-size:110%; } +h6 { font-size:95%; } + +/* Links */ +/* somehow the twikiNewLink style have to be before the general link styles */ +.twikiNewLink { + border-width:0 0 1px 0; + border-style:solid; +} +/* to override old Render.pm coded font color style */ +.twikiNewLink font { + color:inherit; +} +.twikiNewLink a { + text-decoration:none; + margin-left:1px; +} +.twikiNewLink a sup { + text-align:center; + padding:0 2px; + vertical-align:baseline; + font-size:100%; + text-decoration:none; +} +.twikiNewLink a:link sup, +.twikiNewLink a:visited sup { + border-width:1px; + border-style:solid; + text-decoration:none; +} +.twikiNewLink a:hover sup { + text-decoration:none; +} + +:link:focus, +:visited:focus, +:link, +:visited, +:link:active, +:visited:active { + text-decoration:underline; +} +:link:hover, +:visited:hover { + text-decoration:none; +} +img { + vertical-align:text-bottom; + border:0; +} + +/* Form elements */ +form { + display:inline; + margin:0em; + padding:0em; +} +textarea, +input, +select { + vertical-align:middle; + border-width:1px; + border-style:solid; +} +textarea { + padding:1px; +} +input, +select option { + padding:1px; +} +.twikiSubmit, +.twikiButton, +.twikiCheckbox { + border-width:1px; + border-style:solid; + padding:.15em .25em; + font-size:86%; + font-weight:bold; + vertical-align:middle; +} +.twikiCheckbox, +.twikiRadioButton { + margin:0 .3em 0 0; + border:0; +} +.twikiInputField { + border-width:1px; + border-style:solid; + padding:.15em .25em; + font-size:94%; /*S2*/ +} +textarea { + font-size:100%; +} + +/* ----------------------------------------------------------- + TWiki styles + ----------------------------------------------------------- */ + +.twikiLeft { + float:left; + position:relative; +} +.twikiRight { + position:relative; + float:right; + display:inline; + margin:0; +} +.twikiClear { + /* to clean up floats */ + margin:0; + padding:0; + height:0; + line-height:0px; + clear:both; + display:block; +} +.twikiHidden { + display:none; +} + +#twikiLogin { + width:40em; + margin:0 auto; + text-align:center; +} +#twikiLogin .twikiFormSteps { + border-width:5px; +} +.twikiAttachments, +.twikiForm { + margin:1em 0; + padding:1px; /* fixes disappearing borders because of overflow:auto; in twikiForm */ +} +.twikiForm h1, +.twikiForm h2, +.twikiForm h3, +.twikiForm h4, +.twikiForm h5, +.twikiForm h6 { + margin-top:0; +} +.twikiAttachments, +.twikiForm { + /* form or attachment table inside topic area */ + font-size:94%; /*S2*/ + padding:.5em 20px; /*S5*/ /* top:use less padding for the toggle link; bottom:use less space in case the table is folded in */ + border-width:1px 0 0 0; + border-style:solid; + margin:0; +} +.twikiAttachments table, +table.twikiFormTable { + margin:5px 0 10px 0; /* bottom:create extra space in case the table is folded out */ + border-collapse:collapse; + padding:0px; + border-spacing:0px; + empty-cells:show; + border-style:solid; + border-width:1px; +} +.twikiAttachments table { + line-height:1.4em; /*S1*/ + width:auto; + voice-family:"\"}\""; /* hide the following for Explorer 5.x */ + voice-family:inherit; + width:100%; +} +.twikiAttachments td, +.twikiAttachments th { + border-style:solid; + border-width:1px; +} +.twikiAttachments th, +table.twikiFormTable th.twikiFormTableHRow { + padding:3px 6px; + height:2.5em; + vertical-align:middle; +} +table.twikiFormTable th.twikiFormTableHRow { + text-align:center; +} +.twikiEditForm .twikiFormTable th, +.twikiEditForm .twikiFormTable td { + padding:.25em .5em; + vertical-align:middle; + border-width:0 0 1px 0; + border-style:solid; +} +.twikiAttachments th a:link, +.twikiAttachments th a:visited { + text-decoration:none; +} +/* don't show any of those ugly sort icons */ +.twikiAttachments th img, +.twikiAttachments th a:link img, +.twikiAttachments th a:visited img { + display:none; +} +.twikiAttachments td, +table.twikiFormTable td { + padding:3px 6px; + height:1.4em; /*S1*/ + text-align:left; + vertical-align:top; +} +.twikiAttachments td { + /* don't show column lines in attachment listing */ + border-width:0 0 1px 0; +} +.twikiAttachments th.twikiFirstCol, +.twikiAttachments td.twikiFirstCol { + /* make more width for the icon column */ + width:26px; + text-align:center; +} +.twikiAttachments caption { + display:none; +} +table.twikiFormTable th.twikiFormTableHRow a:link, +table.twikiFormTable th.twikiFormTableHRow a:visited { + text-decoration:none; +} + +.twikiFormSteps { + text-align:left; + padding:.25em 0 0 0; + border-width:1px 0; + border-style:solid; +} +.twikiFormStep { + line-height:140%; + padding:1em 20px; /*S5*/ + border-width:0 0 1px 0; + border-style:solid; +} +.twikiFormStep h3, +.twikiFormStep h4 { + font-size:120%; + border:none; + background-color:transparent; + margin:0; + padding:0; +} +.twikiFormStep h3 { + font-weight:bold; +} +.twikiFormStep h4 { + font-weight:normal; +} +.twikiFormStep p { + margin:.3em 0; +} + +.twikiToc { + margin:1em 0; + padding:.3em 0 .6em 0; +} +.twikiToc ul { + list-style:none; + padding:0 0 0 .5em; + margin:0em; +} +.twikiToc li { + margin-left:1em; + padding-left:1em; + background-repeat:no-repeat; + background-position:0 .5em; +} +.twikiToc .twikiTocTitle { + margin:0em; + padding:0em; + font-weight:bold; +} + +.twikiSmall { + font-size:86%; /*S3*/ +} +.twikiSmallish { + font-size:94%; /*S2*/ +} +.twikiNew { } +.twikiSummary { + font-size:86%; /*S3*/ +} +.twikiEmulatedLink { + text-decoration:underline; +} +.twikiPageForm table { + border-width:1px; + border-style:solid; +} +.twikiPageForm table { + width:100%; + margin:0 0 2em 0; +} +.twikiPageForm th, +.twikiPageForm td { + border:0; + padding:.15em 1em; +} +.twikiPageForm td {} +.twikiPageForm td.first { + padding-top:1em; +} +.twikiBroadcastMessage { + padding:.25em .5em; + margin:0 0 1em 0; +} +.twikiHelp { + padding:1em; + margin:0 0 1em 0; + border-width:1px 0; + border-style:solid; +} +.twikiHelp ul, +.twikiHelp li { + margin:0; +} +.twikiHelp ul { + padding-left:2em; +} +.twikiAccessKey { + text-decoration:none; + border-width:0 0 1px 0; + border-style:solid; +} +a:hover .twikiAccessKey { + text-decoration:none; + border:none; +} +.twikiWebIndent { + margin:0 0 0 1em; +} + +/* Edit page */ + +.twikiEditboxStyleMono { + font-family:"Courier New", courier, monaco, monospace; +} +.twikiEditboxStyleProportional { + font-family:"Lucida Grande", verdana, arial, sans-serif; +} +.twikiChangeFormButtonHolder { + margin:.5em 0; + float:right; +} +.twikiChangeFormButton .twikiButton, +.twikiChangeFormButtonHolder .twikiButton { + padding:0em; + margin:0em; + border:none; + text-decoration:underline; + font-weight:normal; +} + +/* Preview page */ + +/* Rename page */ + +/* WebSearch, WebSearchAdvanced */ + +table#twikiSearchTable { + background:none; + border-bottom:0; +} +table#twikiSearchTable th, +table#twikiSearchTable td { + padding:.5em; + border-width:0 0 1px 0; + border-style:solid; +} +table#twikiSearchTable th { + width:20%; + text-align:right; +} +table#twikiSearchTable td { + width:80%; +} +table#twikiSearchTable td.first { + padding:1em; +} + +/* Search results in book view format */ + +/* Print */ + +/* Diff */ + +tr.twikiDiffDebug td { + border-width:1px; + border-style:solid; +} +.twikiDiffLineNumberHeader { + padding:.3em 0; +} Property changes on: pub/TWiki/CascadingStyleSheets/style.css ___________________________________________________________________ Name: svn:executable + * Index: twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin.pm =================================================================== --- twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin.pm (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin.pm (.../DEVELOP) (revision 9301) @@ -51,7 +51,7 @@ $ENDWW = qr/$|(?=[\s\,\.\;\:\!\?\)])/m; $VERSION = '$Rev$'; -$RELEASE = '2.995'; +$RELEASE = '2.994'; # TODO generalize and reduce the ammount of variables $defaultSkin = 'nat'; @@ -991,8 +991,8 @@ if ($text =~ /%STARTINCLUDE%(.*?)%STOPINCLUDE%/gs) { $text = $1; } - #$text =~ s/^\s*//o; - #$text =~ s/\s*$//o; + $text =~ s/^\s*//o; + $text =~ s/\s*$//o; $text = &TWiki::Func::expandCommonVariables($text, $component, $theWeb); # ignore permission warnings here ;) Index: twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin/Auth.pm =================================================================== --- twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin/Auth.pm (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin/Auth.pm (.../DEVELOP) (revision 9301) @@ -21,7 +21,6 @@ use vars qw($isInitialized $debug $defaultWikiUserName); use TWiki::Plugins::NatSkinPlugin; -$debug = 0; # toggle me ############################################################################### sub writeDebug { TWiki::Func::writeDebug("- NatSkinPlugin::Auth - " . $_[0]) if $debug; @@ -31,6 +30,7 @@ sub doInit { return if $isInitialized; $isInitialized = 1; + $debug = 0; # toggle me writeDebug("called doInit"); @@ -58,7 +58,7 @@ if (!$theUser && !$thePasswd) { $theUrl = &TWiki::Func::getOopsUrl($theWeb, $theTopic, "oopslogon"); &TWiki::Func::redirectCgiQuery($query, $theUrl); - writeDebug("redirecting to oopslogon ($theUrl)"); + writeDebug("redirecting to oopslogon"); return; } Index: twikiplugins/NatSkinPlugin/data/TWiki/NatSkinPlugin.txt =================================================================== --- twikiplugins/NatSkinPlugin/data/TWiki/NatSkinPlugin.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkinPlugin/data/TWiki/NatSkinPlugin.txt (.../DEVELOP) (revision 9301) @@ -338,9 +338,8 @@ | Plugin Author: | TWiki:Main/MichaelDaum | | Copyright ©: | 2003-2006, Michael Daum | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | -| Plugin Version: | v2.995 | +| Plugin Version: | v2.994 | | Change History: |   | -| 13 Mar 2006: | dont remove leading and trailing whitespaces from web components | | 11 Mar 2006: | removed MYSIDEBAR tag; \ new web component search path; \ new sidebar construction logic using WebLinks; \ Index: twikiplugins/WorkflowPlugin/lib/TWiki/Plugins/WorkflowPlugin.pm =================================================================== --- twikiplugins/WorkflowPlugin/lib/TWiki/Plugins/WorkflowPlugin.pm (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/WorkflowPlugin/lib/TWiki/Plugins/WorkflowPlugin.pm (.../DEVELOP) (revision 9301) @@ -1,4 +1,10 @@ -# Plugin for TWiki Collaboration Platform, http://TWiki.org/ # # Copyright (c) 2006 Meredith Lesly # Based in large part on ApprovalPlugin by Thomas Hartkens # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License +# Plugin for TWiki Collaboration Platform, http://TWiki.org/ +# +# Copyright (c) 2006 Meredith Lesly +# Based in large part on ApprovalPlugin by Thomas Hartkens +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # @@ -81,6 +87,8 @@ $workflowTopic = getWorkflowTopic($web, $topic); + TWiki::Func::writeDebug(" workflow topic is $workflowTopic") if $debug; + TWiki::Func::writeDebug(" $pluginName - initPlugin ") if $debug; # @@ -93,17 +101,12 @@ ($globWorkflow, $theCurrentState, $globWorkflowMessage, $globAllowEdit) = parseWorkflow($workflowTopic, $user, $theCurrentState); - print STDERR "uses work flow"; - - #my( $meta, $text ) = TWiki::Func::readTopic($web, $topic); - #putWorkflowState($meta, $theCurrentState->{state} ); - - TWiki::Func::registerTagHandler("WORKFLOWTRANSIT", \&_WORKFLOWTRANSIT); + TWiki::Func::registerTagHandler("WORKFLOW", \&_WORKFLOW); + TWiki::Func::registerTagHandler("WORKFLOWNAME", \&_WORKFLOWNAME); TWiki::Func::registerTagHandler("WORKFLOWSTATEMESSAGE", \&_WORKFLOWSTATEMESSAGE); TWiki::Func::registerTagHandler("WORKFLOWTRANSITION", \&_WORKFLOWTRANSITION); TWiki::Func::registerTagHandler("WORKFLOWEDITTOPIC", \&_WORKFLOWEDITTOPIC); } - return 1; } @@ -112,27 +115,32 @@ # %params - a reference to a TWiki::Attrs object containing parameters. # $topic - name of the topic in the query # $web - name of the web in the query -sub _WORKFLOWTRANSIT { +sub _WORKFLOWNAME { + return +} + +# +# $session - a reference to the TWiki session object (may be ignored) +# %params - a reference to a TWiki::Attrs object containing parameters. +# $topic - name of the topic in the query +# $web - name of the web in the query +sub _WORKFLOW { my ($session, $params, $topic, $web) = @_; - my $debug = 1; + $debug = 1; - print STDERR "In _WORKFLOW"; my $action = $params->{'wfpaction'}; my $state = $params->{'wfpstate'}; my $query = TWiki::Func::getCgiQuery(); if ($query) { - print STDERR "- got query"; - TWiki::Func::writeDebug("- got query ") if $debug; + TWiki::Func::writeDebug("- got query "); $action = $query->param('wfpaction'); $state = $query->param('wfpstate'); - } else { - return ""; } TWiki::Func::writeDebug("_WORKFLOW ") if $debug; - TWiki::Func::writeDebug("- action is $action, state is $state") if $debug; + TWiki::Func::writeDebug("- action is $action, state is $state"); if ($action) { # find out if the user is allowed to perform the action @@ -178,35 +186,22 @@ } } -# -# Obviously we need to get the name of the workflow topic -# This function looks in several places -# sub getWorkflowTopic { my( $web, $topic ) = @_; my $wft; my( $meta, $text ) = TWiki::Func::readTopic($web, $topic); - # First look into the topic that's being managed if ($theCurrentState = $meta->get('WORKFLOW')) { return $theCurrentState->{'workflow'}; } - # Next look at the CGI query $wft = getWorkflowFromCGI(); - $wft ||= TWiki::Func::getPreferencesValue('WORKFLOWTOPIC'); - # Next look at the topic preferences - $wft ||= TWiki::Contrib::FuncUsersContrib->getTopicPreferenceValue($web, $topic, "WORKFLOWTOPIC"); - # This is a fossil which will get removed after a demo. (Don't feel like breaking things right now) $wft ||= TWiki::Contrib::FuncUsersContrib->getTopicPreferenceValue($web, $topic, "WORKFLOW"); - my $prefHash = $meta->get('PREFERENCE', "WORKFLOWTOPIC"); - $wft ||= $prefHash->{value}; my $prefHash = $meta->get('PREFERENCE', "WORKFLOW"); $wft ||= $prefHash->{value}; if ($wft) { - # Yay! Found the topic! $meta->put("WORKFLOW", { 'workflow' => $wft } ); return $wft; } @@ -303,7 +298,8 @@ $meta->remove( "WORKFLOW" ); $meta->put("WORKFLOW", { state => $state, workflow => $theCurrentState->{workflow} }); - putWorkflowState($meta, $state); + $meta->remove("WORKFLOWSTATE", $state); + $meta->put("WORKFLOWSTATE", { name => $state, lasttime => Timestamp(), version => "1.$version" }); my $unlock = 1; my $dontNotify = 1; @@ -318,17 +314,6 @@ } -sub putWorkflowState { - my ($meta, $state) = @_; - - my ($dat, $author, $version, $comment) = $meta->getRevisionInfo(); - - $meta->remove("WORKFLOWSTATE", { name => $state } ); - $meta->put("WORKFLOWSTATE", { name => $state, lasttime => Timestamp(), version => "1.$version" }); -} - - - sub myDebug { my $text = shift; TWiki::Func::writeDebug("- ${pluginName}: $text" ) if $debug; @@ -339,9 +324,6 @@ # the current user. The hash-key is the possible action # while the value is the next state. # -# Note: this code is lifted directly from ApprovalPlugin. I guess I'm responsible for -# maintaining it now, but I'm not responsible for how it's coded. -# sub parseWorkflow { my ($WorkflowTopic, $user, $CurrentState) = @_; my %workflow = (); @@ -387,7 +369,7 @@ # read row in STATE table my( $state, $allowedit, $message) = split( /\s*\|\s*/ ); $state = _cleanField($state); - #myDebug("STATE: '$state', $allowedit, $message CurrentState: '$CurrentState->{state}'"); + myDebug("STATE: '$state', $allowedit, $message CurrentState: '$CurrentState->{state}'"); # the first state in the table defines the default state if (!defined($defaultState)) { @@ -439,10 +421,10 @@ foreach my $name (@allowed) { $name = _cleanField( $name ); $name =~ s/$mainWeb\.(.*)/$1/; - #TWiki::Func::writeDebug("wikiName: $wikiName; Name: $name") if $debug; - #TWiki::Func::writeDebug("Checking if user is in $name") if $debug; + #TWiki::Func::writeDebug("wikiName: $wikiName; Name: $name"); + #TWiki::Func::writeDebug("Checking if user is in $name"); if (TWiki::Contrib::FuncUsersContrib::isInGroup($name)) { - #TWiki::Func::writeDebug("User is allowed") if $debug; + #TWiki::Func::writeDebug("User is allowed"); #if (userIsInGroup($wikiName, $name) || userIsAdmin($wikiName)) { # user IS allowed! @@ -501,8 +483,8 @@ @grpMembers = getGroup( $grpTopic, 1 ); } - #TWiki::Func::writeDebug("grpMembers: @grpMembers") if $debug; - #TWiki::Func::writeDebug("usrTopic: $usrTopic") if $debug; + #TWiki::Func::writeDebug("grpMembers: @grpMembers"); + #TWiki::Func::writeDebug("usrTopic: $usrTopic"); my $isInGroup = grep { /^$usrTopic$/ } @grpMembers; return $isInGroup; @@ -520,7 +502,7 @@ $web = $1; $topic = $2; } - ##TWiki::writeDebug( "Web is $web, topic is $topic" ) if $debug; + ##TWiki::writeDebug( "Web is $web, topic is $topic" ); if( $topic !~ /.*Group$/ ) { # return user, is not a group Index: twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl =================================================================== --- twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/PatternSkin/templates/viewtopicactionbuttons.pattern.tmpl (.../DEVELOP) (revision 9301) @@ -52,4 +52,4 @@ %TMPL:DEF{"backlinks"}%%MAKETEXT{"Backlinks"}%: %MAKETEXT{"We&b"}%, %MAKETEXT{"A&ll Webs"}%%TMPL:END% -%TMPL:DEF{"revisions"}%%MAKETEXT{"&History"}%: %REVISIONS%%TMPL:END% +%TMPL:DEF{"revisions"}%%MAKETEXT{"&History"}%: %REVISIONS%%TMPL:END% \ No newline at end of file Index: twikiplugins/NatSkin/data/Main/WebLinks.txt =================================================================== --- twikiplugins/NatSkin/data/Main/WebLinks.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkin/data/Main/WebLinks.txt (.../DEVELOP) (revision 9301) @@ -1,9 +1,11 @@ %META:TOPICINFO{author="TWikiContributor" date="1132161897" format="1.1" version="1.1"}% -%STARTINCLUDE% - * [[%TWIKIWEB%.WelcomeGuest][Welcome]] - * [[%TWIKIWEB%.TWikiRegistration][Registration]] - * [[%MAINWEB%.TWikiUsers][Users]] - * [[%MAINWEB%.TWikiGroups][Groups]] - * [[%TWIKIWEB%.ChangePassword][Password]] -%WEBCOMPONENT{"TWikiWebLinks"}% +
    +%STARTINCLUDE% +
  • [[%TWIKIWEB%.WelcomeGuest][Welcome]]
  • +
  • [[%TWIKIWEB%.TWikiRegistration][Registration]]
  • +
  • [[%MAINWEB%.TWikiUsers][Users]]
  • +
  • [[%MAINWEB%.TWikiGroups][Groups]]
  • +
  • [[%TWIKIWEB%.ChangePassword][Password]]
  • + %WEBCOMPONENT{"TWikiWebLinks"}% %STOPINCLUDE% +
Index: twikiplugins/NatSkin/data/TWiki/TWikiWebLinks.txt =================================================================== --- twikiplugins/NatSkin/data/TWiki/TWikiWebLinks.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkin/data/TWiki/TWikiWebLinks.txt (.../DEVELOP) (revision 9301) @@ -1,8 +1,10 @@ %META:TOPICINFO{author="TWikiContributor" date="1132161897" format="1.1" version="1.1"}% -%STARTINCLUDE% - * [[WebTopicList][Index]] - * [[WebChanges][Changes]] - * [[WebNotify][Notifications]] - * [[WebStatistics][Statistics]] - * [[WebPreferences][Preferences]] +
    +%STARTINCLUDE% +
  • [[WebTopicList][Index]]
  • +
  • [[WebChanges][Changes]]
  • +
  • [[WebNotify][Notifications]]
  • +
  • [[WebStatistics][Statistics]]
  • +
  • [[WebPreferences][Preferences]]
  • %STOPINCLUDE% +
Index: twikiplugins/NatSkin/data/TWiki/NatSkin.txt =================================================================== --- twikiplugins/NatSkin/data/TWiki/NatSkin.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkin/data/TWiki/NatSkin.txt (.../DEVELOP) (revision 9301) @@ -68,14 +68,14 @@ Please see the TWiki:Plugins/PhotonSkin for an explanation of the possible search parameters (TODO: maby move that stuff in here). ----++ About the WebSideBar -The WebSideBar is used to generate a navigation appearing next to +---++ About the WebSideBar +The WebSideBar is used to generate a navigation appearing next to the main topic area. Each web in your %WIKITOOLNAME% might optionaly have a -separate WebSideBar. The default [[%TWIKIWEB%.WebSideBar]] can be used to add a default -section common to all WebSideBars. -If the WebSideBar isn't defined the default [[%TWIKIWEB%.WebSideBar]] -is used. Each user might define a personalized WebSideBar called =%WIKINAME%SideBar= that is -appended to the WebSideBar. The TWiki:Plugins/RedDotPlugin is used to make customizing the WebSideBar +separate WebSideBar. The default [[%TWIKIWEB%.WebSideBar]] can be used to add a default +section common to all WebSideBars. +If the WebSideBar isn't defined the default [[%TWIKIWEB%.WebSideBar]] +is used. Each user might define a personalized WebSideBar called =%WIKINAME%SideBar= that is +appended to the WebSideBar. The TWiki:Plugins/RedDotPlugin is used to make customizing the WebSideBar easier appended to the different parts that make up the complete sidebar. These are hidden if you don't have write access to the respective topic fragments. @@ -105,7 +105,7 @@ The result can be configured per session, user, web or for the complete site. The screenshots below only display a limitted set of all possible combinations. -This skin includes an enhanced navigation mechanism named WebSideBar. This +This skin includes an enhanced navigation mechanism named WebSideBar. This combines the best of the old WebMenu idea from the GnuSkin and the WebLeftBar known from the TWiki:Plugins/PatternSkin by providing all the flexibility of the WebLeftBar including the MySideBar feature and an @@ -160,7 +160,7 @@ | Skin Author: | TWiki:Main/MichaelDaum | | Copyright ©: | 2003-2006, Michael Daum | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | -| Skin Version: | v2.995 | +| Skin Version: | v2.994 | | Dependencies: | TWiki:Plugins/NatSkinPlugin | | Description: | Driven by cascading stylesheets, Comes with 12 alternative styles, MoveableType and Wordpress Look-n-Feel | | Base Name: | nat | @@ -177,8 +177,6 @@
\ | | Change History: |   | -| 2006-03-13: | fixed WebLinks components; \ - fixed atom feed link at the page bottom | | 2006-03-11: | reworked sidebar using the new WEBCOMPONET logic; \ docu restructuring - more needed; \ using messages.tmpl as far as possible | @@ -222,7 +220,7 @@ removed absolute urls; removed EDITURL; \ fixed sidebar help for cairo and beijing; \ fixed squeezed main page; \ - added the concept of WebComponents, that is the WebSideBar and the WebButtons; \ + added the concept of WebComponents, that is the WebSideBar and the WebButtons; \ the WebButtons are customizable the way the WebSideBar already is | | 2005-12-01: | added transparent borders and corners to the Kubrick style; \ improved PlasticLoveVariation; \ @@ -250,7 +248,7 @@ fixed way how the oops dialogues switch off the sidebar | | 2005-10-09: | new release NatSkin-2.51: \ reinvention of the NatSkinStyleBrowser; \ - reworked the standard WebSideBar; \ + reworked the standard WebSideBar; \ extensive usage of the new conditional content tags \ interfacing the skin state machine, i.e. switch the \ sidebar from the left to the right etc.; \ @@ -279,7 +277,7 @@ __Related topic:__ TWiki:TWiki/TWikiSkins, TWiki:TWiki/TWikiSkinBrowser, TWiki:Plugins/NatSkinDev, NatSkinPlugin --- TWiki:Main/MichaelDaum - 13 Mar 2006 +-- TWiki:Main/MichaelDaum - 11 Mar 2006 %META:FILEATTACHMENT{name="favicon.ico" attr="" comment="" date="1113468984" path="favicon.ico" size="4710" user="TWikiContributor" version="1.1"}% Index: twikiplugins/NatSkin/data/TWiki/WebLinks.txt =================================================================== --- twikiplugins/NatSkin/data/TWiki/WebLinks.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkin/data/TWiki/WebLinks.txt (.../DEVELOP) (revision 9301) @@ -1,6 +1,8 @@ %META:TOPICINFO{author="TWikiContributor" date="1132161897" format="1.1" version="1.1"}% -%STARTINCLUDE% - * [[%TWIKIWEB%.InstalledPlugins][Plugins]] -%WEBCOMPONENT{"TWikiWebLinks"}% - * [[%TWIKIWEB%.TWikiPreferences][SitePreferences]] +
    +%STARTINCLUDE% +
  • [[%TWIKIWEB%.InstalledPlugins][Plugins]]
  • + %WEBCOMPONENT{"TWikiWebLinks"}% +
  • [[%TWIKIWEB%.TWikiPreferences][SitePreferences]]
  • %STOPINCLUDE% +
Index: twikiplugins/NatSkin/data/TWiki/TWikiWebSideBar.txt =================================================================== --- twikiplugins/NatSkin/data/TWiki/TWikiWebSideBar.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkin/data/TWiki/TWikiWebSideBar.txt (.../DEVELOP) (revision 9301) @@ -4,41 +4,38 @@

Navigation%REDDOT{"%TWIKIWEB%.TWikiWebSideBar"}%

- %IFDEFINEDTHEN{"%BASEWEB%" as="Main"}% -%$nopWEBCOMPONENT{"WebLinks"}% +
    + %$nopWEBCOMPONENT{"WebLinks"}% +
%FIDEFINED% - -%FORMATLIST{"%WEBLIST{webs="public" separator=" "}%" exclude="Main|TWiki|Trash" split=" " separator="$n" format="

$percntWEBLINK{\"$1\"}$percnt

$percntWEBCOMPONENT{\"WebLinks\"}$percnt
"}% - +%FORMATLIST{"%WEBLIST{webs="public" separator=" "}%" exclude="Main|TWiki|Trash" split=" " separator="$n" format="

$percntWEBLINK{\"$1\"}$percnt

    $percntWEBCOMPONENT{\"WebLinks\"}$percnt
"}% %IFDEFINEDTHEN{"%BASEWEB%" as="Trash"}% - * [[Trash.TrashAttachment][Attachments]] -%$nopWEBCOMPONENT{"WebLinks"}% +
    +
  • [[Trash.TrashAttachment][Attachments]]
  • + %$nopWEBCOMPONENT{"WebLinks"}% +
%FIDEFINED% - - %IFDEFINEDTHEN{"%BASEWEB%" as="TWiki"}% -%$nopWEBCOMPONENT{"WebLinks"}% +
    + %$nopWEBCOMPONENT{"WebLinks"}% +
%FIDEFINED% - %IFSKINSTATETHEN{searchbox="pos2"}%

%TMPL:P{"searchbox"}%
%FISKINSTATE% -
%INCLUDE{"%CALC{"$IF($EXISTS(%MAINWEB%.%WIKINAME%SideBar),%MAINWEB%.%WIKINAME%SideBar,%TWIKIWEB%.MySideBar)"}%"}%
Index: twikiplugins/NatSkin/templates/defaultbody.nat.tmpl =================================================================== --- twikiplugins/NatSkin/templates/defaultbody.nat.tmpl (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/NatSkin/templates/defaultbody.nat.tmpl (.../DEVELOP) (revision 9301) @@ -49,7 +49,7 @@ %WEBSYNDICATION% %ELSEDEFINED% Syndicate this site - RSSATOM + RSSATOM %FIDEFINED% Index: twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm =================================================================== --- twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin.pm (.../DEVELOP) (revision 9301) @@ -65,11 +65,12 @@ use vars qw( $web $topic $user $installWeb $VERSION $RELEASE $debug $default_density $default_gamma $default_scale $preamble $eqn $fig $tbl $use_color @norender $tweakinline @EXPORT_OK + $rerender ); # number the release version of this plugin $VERSION = '$Rev$'; -$RELEASE = '2.4'; +$RELEASE = '2.5'; require Exporter; *import = \&Exporter::import; @@ -156,6 +157,8 @@ ### between the two. my $latexout = 0 ; +my $rerender = 0 ; # flag to rerender all images + # ========================= sub initPlugin { @@ -202,6 +205,12 @@ $latexout = 1 if ($script =~ m/genpdflatex/); + my $query = &TWiki::Func::getCgiQuery(); + $rerender = &TWiki::Func::getPreferencesValue( "RERENDER" ) || 0; + if ($query->param( 'latex' )) { + $rerender = ($query->param( 'latex' ) eq 'rerender'); + } + # Plugin correctly initialized &TWiki::Func::writeDebug( "- TWiki::Plugins::LatexModePlugin::initPlugin( $web.$topic ) is OK" ) if $debug; @@ -396,7 +405,7 @@ (my $a = $k) =~ s/^\s*|\s*$//; # scrub the inputs, since this gets passed to 'convert' (in - # particular, sheild against 'density=166|cat%20/etc/passwd' + # particular, shield against 'density=166|cat%20/etc/passwd' # type inputs). alpha-numeric OK. slash, space, and brackets # are valid in preamble. need semi-colon in eqn lables! # allow '-' and '_' in eqn labels too. @@ -502,9 +511,15 @@ ### store the declared options for the rendering later... $markup_opts{$hash_code} = \%opts; - #remove any quotes in the string, so the alt tag doesn't break + + # replace troublesome characters in the string, so the alt tag + # doesn't break: $escaped =~ s/\"/"/gso; $escaped =~ s/\n/ /gso; + $escaped =~ s!\&!\&\;!g; + $escaped =~ s!\>!\>\;!g; + $escaped =~ s!\$1!g; my $image_name = "$pubUrlPath/latex$hash_code.$EXT"; @@ -555,7 +570,6 @@ $txt = "
\"$escaped\"
"; } } # end 'if !$latexout'; - return($txt); } @@ -616,7 +630,8 @@ #is the image still used in the document? if( exists( $hashed_math_strings{$hash_code} ) ) { #if the image is already there, we don't need to re-render - delete( $hashed_math_strings{$hash_code} ); + delete( $hashed_math_strings{$hash_code} ) + unless ($rerender); next; } Index: twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt =================================================================== --- twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/LatexModePlugin/data/TWiki/LatexModePlugin.txt (.../DEVELOP) (revision 9301) @@ -1,7 +1,7 @@ %META:TOPICINFO{author="ScottHoge" date="1125954924" format="1.0" version="1.4"}% ---+!! %TOPIC% -This LaTeX Mode TWiki Plugin allows you to include LaTeX mark up commands within a TWiki page. It uses external programs (specifically latex, dvips, and convert) to generate =png= images from the mark up. These images are then included in the rendered TWiki page. The first time a particular image is generated, there may be a significant lag in page rendering as the images are generated on the server. Once rendered, the image is saved as an attached file for the page, so subsequent viewings will not require re-renders. When you remove a math expression from a page, its image is deleted. +This LaTeX Mode TWiki Plugin allows you to include LaTeX mark up commands within a TWiki page. It uses external programs (specifically latex, dvipng, or dvips-and-convert) to generate =png= images from the mark up. These images are then included in the rendered TWiki page. The first time a particular image is generated, there may be a significant lag in page rendering as the images are generated on the server. Once rendered, the image is saved as an attached file for the page, so subsequent viewings will not require re-renders. When you remove a math expression from a page, its image is deleted. This plugin expands the functionality provided by the (older) TWiki:Plugins.MathModePlugin. @@ -83,16 +83,6 @@ | =yellow=| cmyk | 0,0,1,0 | -To use additional colors, they need to be defined in (what is known as) the -Latex preamble. The preamble can be set as either a web or topic preference -variable - - * #Set PREAMBLE = \usepackage{color} \definecolor{Aqua}{rgb}{0,1,1} - - -or as a multi-line declaration, using the tags: -%BEGINLATEXPREAMBLE% and %ENDLATEXPREAMBLE% - For convenience, the following TWiki colors are pre-defined in the LatexModePlugin \definecolor{Red}{rgb}{1,0,0} @@ -114,8 +104,30 @@ \definecolor{Silver}{gray}{0.75} \definecolor{White}{gray}{1} -One does not need to declare a preamble to use these colors. +To use additional colors, they need to be defined in the Latex preamble, as described in the next section. + +---+++ Defining the LaTeX preamble + +In LaTeX, the preamble is used to customize the latex processing, +allowing one to add custom styles and declare new commands. + +In TWiki, the preamble can be set as either a web or topic preference variable + + * #Set PREAMBLE = \usepackage{color} \definecolor{Aqua}{rgb}{0,1,1} + +or as a multi-line declaration, using the tags: + + %BEGINLATEXPREAMBLE% ... %ENDLATEXPREAMBLE% + + +One critical difference between the two exists. With the exception of the +color declarations above, the TWiki preference setting will _override_ the +default settings, and is intended to provide site administrators a central +point to set preamble settings globally. In contrast, the tag declaration +will _add_ to the preamble defined by either the default settings or the +preference setting, allowing TWiki users to amend the preamble. + ---++ Examples
@@ -176,15 +188,21 @@ First, confirm that the external software needed by the plugin is installed on the TWiki server. This includes: * The =Digest::MD5= and =Image::Info= perl modules. * A working LaTeX implementation ([[http://www.tug.org/tetex/][tetex]] and [[http://www.miktex.org/][MikTeX]] are two popular choices) + * [[http://sourceforge.net/projects/dvipng/][dvipng]], a fast dvi to png converter * the [[http://www.cs.wisc.edu/~ghost/][Ghostscript]] package * the 'convert' executable from either [[http://www.imagemagick.org/][ImageMagick]] or [[http://www.graphicsmagick.org/][GraphicsMagick]] +Rendering can be performed by _either_ (=dvipng=) or (=dvips= and =convert=). +=dvipng= is significantly faster. However, the =tweakinline= processing +currently (v 2.5) uses =convert=. Installation requires at least one, and best results will be seen if all are installed. + Second, * Download the ==%TOPIC%.zip== file from the Plugin web * Unzip ZIP file in your twiki installation directory. Content: | *File:* | *Description:* | | ==lib/TWiki/Plugins/LatexModePlugin.pm== | Plugin Perl module | | ==data/TWiki/LatexModePlugin.txt== | Plugin topic and documentation | + | ==data/TWiki/LatexIntro.txt== | a basic description of LaTeX markup conventions | | ==data/TWiki/LatexSymbolList.txt== | Comprehensive list of available LaTeX symbols | | ==pub/TWiki/LatexModePlugin/expl-v1.4.png== | example image of rendered latex | @@ -192,10 +210,10 @@ * Set the local paths of =latex=, =dvips= and =convert=. This can be done by adding the following lines to =lib/LocalSite.cfg= or =lib/TWiki.cfg=. * $TWiki::cfg{Plugins}{LatexModePlugin}{latex} = '/usr/bin/latex'; * $TWiki::cfg{Plugins}{LatexModePlugin}{dvips} = '/usr/bin/dvips'; + * $TWiki::cfg{Plugins}{LatexModePlugin}{dvipng} = '/usr/bin/dvipng'; * $TWiki::cfg{Plugins}{LatexModePlugin}{convert} = '/usr/X11R6/bin/convert'; * Modify the following if needed. %BR% (These variables were introduced in version 2.4) - * $TWiki::cfg{Plugins}{LatexModePlugin}{donotrenderlist} %BR% declare a comma-separated list of LaTeX commands that _will not be rendered_. Default = ='input,include'=. - + * $TWiki::cfg{Plugins}{LatexModePlugin}{donotrenderlist} %BR% declare a comma-separated list of LaTeX commands that _will not be rendered_. %BR% Default = ='input,include'=. * $TWiki::cfg{Plugins}{LatexModePlugin}{tweakinline} %BR% Turned off by default, setting this boolean variable to =1= will enable more complex in-line rendering. See the TWiki:Plugins.LatexModePluginDev topic for more details. @@ -205,20 +223,22 @@ This plugin is an enhanced version of the TWiki:Plugins.MathModePlugin created by TWiki:Main.GraemeLufkin. There are a number of significant differences: - * latex-dvips-convert is used in place of =latex2html=, consequently + * =dvipng= or =latex-dvips-convert= is used in place of =latex2html=, consequently * hash table mismatching between twiki and images generated by =latex2html= is eliminated, which was a source of many problems in the TWiki:Plugins.MathModePlugin. * greater flexibility in markup rendering is available. * the rendering is done image-by-image, so the cost of total page rendering time should be linear. (that is, ten images will take ten times as long to render as one image.) * multi-line latex markup is now possible. Consequently, this now means that a <nop> must be included to disable rendering in documentation, as opposed to spliting the math markup over multiple lines as before. * equations can be numbered, with automatic cross-links available * if errors occur during the latex markup processing, they are reported during the editing =preview= screen, but not during the standard =view=. The motivation for this is that, in general, _authors_ care about the error but _readers_ do not. + * as of version 2.5, one can force the recreation of all latex images in a topic. To do this, add the following text (similar to raw text rendering) to the end of the URL: =?latex=rerender=. E.g. changing =http://localhost/twiki/bin/view/TWiki/LatexModePlugin= to =http://localhost/twiki/bin/view/TWiki/LatexModePlugin?latex=rerender= will force all of the images to be redrawn. ---++ Plugin Info | Plugin Author: | TWiki:Main.ScottHoge | -| Plugin Version: | 21 Feb 2006 (v 2.4) | +| Plugin Version: | 14 Mar 2006 (v 2.5) | | Change History: |   | +| 14 Feb 2006 (v 2.5) | added =rerender= hook, fixed '> in =alt= field' bug. | | 21 Feb 2006 (v 2.4) | introduced =donotrenderlist= to patch a critical security hole. Bug fixes include: disabling WikiWord link rendering in =alt= fields of =img= tags; improved in-line rendering alignment available; | | 1 Feb 2006 (v 2.3) | minor bug fixes: $pathSep changes, now uses &TWiki::Func::extractParameters() | | 11 Nov 2005 (v 2.2) | more mods for TWiki:Plugins.GenPDFLatexAddOn: protect newlines, moved float handler, moved float label checker | @@ -230,7 +250,7 @@ | 22 Aug 2005 (v 1.2) | Forked from the TWiki:Plugins.MathModePlugin by TWiki:Main.GraemeLufkin | | TWiki Dependency: | $TWiki::Plugins::VERSION 1.025 | | CPAN Dependencies: | CPAN:Digest::MD5, CPAN:File::Basename, CPAN:Image::Info | -| Other Dependencies: | A working installation of =latex= and =convert= | +| Other Dependencies: | A working installation of =latex=. A working installation of =convert= or =dvipng=. | | Perl Version: | 5.8.0 | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | TWiki:Plugins/Benchmark: | %TWIKIWEB%.GoodStyle 100%, %TWIKIWEB%.FormattedSearch 100%, %TOPIC% 100% | Index: twikiplugins/LatexModePlugin/data/TWiki/LatexIntro.txt =================================================================== --- twikiplugins/LatexModePlugin/data/TWiki/LatexIntro.txt (.../TWikiRelease04x00) (revision 0) +++ twikiplugins/LatexModePlugin/data/TWiki/LatexIntro.txt (.../DEVELOP) (revision 9301) @@ -0,0 +1,62 @@ +%META:TOPICINFO{author="ScottHoge" date="1140536586" format="1.0" version="1.0"}% + +%BEGINLATEXPREAMBLE% + \usepackage{amsfonts} + \definecolor{Lightmaroon}{rgb}{0.6667,0,0} + \definecolor{Cornflowerblue}{rgb}{0,0.4,0.8} +%ENDLATEXPREAMBLE% + + +---++ Introduction to %BEGINLATEX{inline="1" color="Lightmaroon"}%\Large\LaTeX%ENDLATEX% + +%BEGINLATEX{inline="1"}%\LaTeX%ENDLATEX% is a complete typesetting language developed by Leslie Lamport on top of Donald Knuth's %BEGINLATEX{inline="1"}%\TeX%ENDLATEX%. Most of it is implemented using TWiki.LatexModePlugin, but the main use is producing mathematics, since most other formatting is more conveniently accomplished using Wiki constructs. To produce mathematics _in-line_, the %BEGINLATEX{inline="1"}%\LaTeX%ENDLATEX% text must be surrounded by %BROWN%%$%ENDCOLOR% +and %BROWN%$%%ENDCOLOR%. Thus, %$\Gamma \vdash Rx_1\cdots x_n$% looks like this +%$\Gamma \vdash Rx_1\cdots x_n$% +in the middle of some text. To _display_ mathematics, it must be surrounded by %BROWN%%\[%ENDCOLOR% +and %BROWN%\]%%ENDCOLOR%. Thus, %BROWN%%\[\mathcal{N}=\langle \mathbb{N},0,1+,\cdot \rangle \subseteq \langle \mathbb{R},0,1+,\cdot \rangle\]%%ENDCOLOR% produces this centered display %\[\mathcal{N}=\langle \mathbb{N},0,1+,\cdot \rangle \subseteq \langle \mathbb{R},0,1+,\cdot \rangle\]% in the middle of a paragraph, which is preferable for long formulas or ones requiring emphasis. + +%BEGINLATEX{inline="1"}%\LaTeX%ENDLATEX% is used by most mathematicians, physicists, and engineers for mathematics, and articles and books are typically submitted for publication in %BEGINLATEX{inline="1"}%\LaTeX%ENDLATEX%. There are therefore many helpful web sites, newsgroups, and books about %BEGINLATEX{inline="1"}%\LaTeX%ENDLATEX%. The standard complete reference is Lamport's [[http://www.amazon.com/exec/obidos/tg/detail/-/0201529831/102-6948132-3441705?v=glance][LaTeX: A Document Preparation System (2nd Edition)]]. The place to start on the web is the [[http://www.tug.org/][%BEGINLATEX{color="Cornflowerblue" inline="1"}%\TeX%ENDLATEX% Users Group]]. + +---+++Brief Tutorial on %BEGINLATEX{inline="1" color="Lightmaroon"}%\bf\LaTeX%ENDLATEX% + +All %BEGINLATEX{inline="1"}%\TeX%ENDLATEX% codes begin with a backslash (\). Curly braces ({ }) are used to delimit groupings, except in a few cases where optional arguments must be enclosed in square brackets ([ ]). Many symbols have mnemonic names, like =\Alpha=, =\alpha=, =\forall=, =\exists=, =\lor=, =\land=. + +A list of some common symbols is given in the LatexSymbolList topic. Other off-site lists include: [[http://www.math.union.edu/~dpvc/jsMath/symbols/welcome.html][Some Symbols]] and [[http://www.iam.ubc.ca/~newbury/tex/symbols.html][Some Little-Known Symbols]], [[http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf][All the Symbols]]. Not all the symbols work in the Wiki, but most of them do. + +A subscript is indicated with an underline (_). If the subscript consists of more than one symbol, it must be enclosed in braces. Similarly, a superscript is indicated with a caret (^). Thus, %BROWN%%$ \alpha _{ \beta _1^2}^{ \gamma ^{ \delta ^ \epsilon }} +$%%ENDCOLOR% yields %$ \alpha _{ \beta _1^2}^{ \gamma ^{ \delta^ \epsilon }}$%, + +---+++Document Structure + +In standard +%BEGINLATEX{inline="1"}%\LaTeX%ENDLATEX% +2e documents, the main file has the following +structure: +
+=\documentclass[options]{class}= + +preamble + +=\begin{document}= + +text + +=\end{document}= +
+ +Any text that normally goes in the _preamble_ or _text_ sections of the +template above can be rendered in TWiki. The _preamble_ is typically used +to define new commands, or use !LaTeX style-files to extend !LaTeX's +functionality. The _text_ area contains the actual text to be rendered. +One does not need to use the =\documentclass= or =document= environment to +use !LaTeX in TWiki. + +The ability to render a complete !LaTeX document, say from an existing file, +within TWiki is currently under consideration. See +TWiki:Codev.IncludeExistingLatexDocsInTWiki for details and current status. + +---+++Pitfalls + +Unlike standard %BEGINLATEX{inline="1"}%\TeX%ENDLATEX%, TWiki.LatexModePlugin is (often) finicky about requiring spaces around the name of each symbol: %BROWN%'%$ \Gamma \vdash $%'%ENDCOLOR% (with spaces around =\Gamma= and =\vdash=) yields, correctly, '%$ \Gamma \vdash $%,' but %BROWN%'%$\Gamma\vdash$%'%ENDCOLOR% (no spaces) yields '%$\Gamma\vdash$%'. + +-- courtesy of TWiki:Main.ShaughanLavine ([[http://zillion.philosophy.arizona.edu/twiki/bin/view/Courses/LaTeX][see also]]) Index: twikiplugins/WysiwygPlugin/pub/TWiki/WysiwygPlugin/kupustart.js =================================================================== --- twikiplugins/WysiwygPlugin/pub/TWiki/WysiwygPlugin/kupustart.js (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/WysiwygPlugin/pub/TWiki/WysiwygPlugin/kupustart.js (.../DEVELOP) (revision 9301) @@ -48,7 +48,13 @@ kupu.registerContentChanger(getFromSelector('kupu-editor-textarea')); var navigatingAway = function () { - TWikiVetoIfChanged(kupu, true); + if (kupu.content_changed && + confirm('You have unsaved changes.\nAre you sure you want to navigate away from this page?\nCancel will DISCARD your changes (forever!). OK will SAVE your changes.')) { + kupu.config.reload_src = 0; + // Call the submit handler, as it's not called by the submit() method + var form = TWikiHandleSubmit(kupu); + form.submit(); + }; } if (kupu.getBrowserName() == 'IE') { @@ -69,5 +75,7 @@ // and now we can initialize... kupu.initialize(); + TWikiCleanForm(); + return kupu; }; Index: twikiplugins/WysiwygPlugin/pub/TWiki/WysiwygPlugin/twikitools.js =================================================================== --- twikiplugins/WysiwygPlugin/pub/TWiki/WysiwygPlugin/twikitools.js (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/WysiwygPlugin/pub/TWiki/WysiwygPlugin/twikitools.js (.../DEVELOP) (revision 9301) @@ -597,7 +597,28 @@ TWikiWikiWordTool.prototype = new LinkTool; +/* + * A submit can come from several places; from links inside the form + * (replace form and add form) and from the Kupu save button, which is + * redirected to the form. We need to create the 'text' + * field for all these operations. The Kupu save button is handled by + * the 'submitForm' function declared in kupuinit.js, but the links + * have to be handled through the following onSubmit handler. + * + * This function can be called in a number of different ways: + * 1. As the onSubmit handler for the form, when triggered by a click + * on a type="submit" input in the form (e.g. replace form) + * 2. Just before a form.submit() call, such as the one done for the + * save button + + */ function TWikiHandleSubmit(kupu) { + + if (!kupu) { + // nasty hack, but I don;t know how else to do it + kupu = window.drawertool.editor; + } + //alert("Fixing spans"); FixBoldItalic(kupu); @@ -633,54 +654,50 @@ } //alert("Submitting"); - // we *do not* submit here - return form; -} + /* + // 'submit' should do this for us, but IE refuses + // to submit a form after a beforeunload handler has been fired, so we + // have to do the upload this horrible way. + var xmlhttp = HttpRequestObject(); + if (!xmlhttp) { + alert("Failed to save text to server; could not create request object"); + return; + } -/* - * A submit can come from several places; from links inside the form - * (replace form and add form) and from the Kupu save button, which is - * redirected to the form. We need to create the 'text' - * field for all these operations. - * - * This function can be called in a number of different ways: - * 1. As the onSubmit handler for the form, when triggered by a click - * on a type="submit" input in the form (e.g. replace form) - * 2. Just before a form.submit() call, such as the one done for the - * save button - */ -function TWikiVetoIfChanged(kupu, isSave) { - if (!kupu) { - // nasty hack, but I don't know how else to do it - kupu = window.drawertool.editor; - } - var ok; - var msg = 'You have unsaved changes.\n'+ - 'Are you sure you want to navigate away from this page?\n'; - if( isSave ) { - kupu.config.reload_src = 0; - ok = false; - if( kupu.content_changed ) { - // Form submission will *save* the topic - msg += 'Cancel will DISCARD your changes (forever!).\n'+ - 'OK will SAVE your changes.'; - ok = confirm(msg); + xmlhttp.open("POST", form.action, true); + xmlhttp.onreadystatechange = function () { + // handle the response. + if (xmlhttp.readyState != 4) { + return; } - } else { - // Form submission will *discard* the changes - ok = true; - if( kupu.content_changed ) { - msg += 'OK will DISCARD your changes.'; - ok = confirm(msg); + alert("Status: "+xmlhttp.status+" "+xmlhttp.statusText+"\n"+ + "Response: "+xmlhttp.responseText); + // The response contains the text of the target page + window.location = + }; + + var boundary = "Boundary_" + new Date().getMilliseconds() + ";"; + xmlhttp.setRequestHeader("Content-Type", + "multipart/form-data; boundary=" + + boundary+"; charset=UTF-8"); + + // Set various flags + body += MIMEset('wysiwyg_edit', 1, boundary); + // Now iterate over the main form fields and include them + for (var i = 0; i < form.childNodes.length; i++) { + var item = form.childNodes[i]; + if (item.tagName == 'input' && item.type == 'hidden' || + item.tagName == 'textarea' ) { + body += MIMEset(item.name, item.value, boundary); } } - if (ok) { - // Call the submit handler, as it's not called by the submit() method - var form = TWikiHandleSubmit(kupu); - form.submit(); - } - // always return false to veto the submit, if it came from a form button - return false; + body += "--" + boundary; + + // Send the request + xmlhttp.send(body); + */ + // we *do not* submit here + return form; } function MIMEset(name, value, boundary) { @@ -723,6 +740,18 @@ return str + ''; } +/* Hack bad buttons off the form on startup */ +function TWikiCleanForm() { + var elems = document.getElementsByName('submitChangeForm'); + for (var i = 0; i < elems.length; i++) { + if (elems[i].nodeName.toLowerCase() == 'input' && + elems[i].type.toLowerCase() == 'submit' ) { + elems[i].parentNode.removeChild(elems[i]); + // should replace with _nice_ button? + } + } +} + function TWikiColorChooserTool(fgcolorbuttonid, colorchooserid) { /* the colorchooser */ @@ -778,12 +807,10 @@ this.createColorchooser = function(table) { /* create the colorchooser table */ - var cols = new Array( - "black", "red", "orange", "yellow", "greenyellow", "lime", "aquamarine", "cyan", "blue", "blueviolet", "fuchsia", "hotpink", - "dimgray", "firebrick", "darkorange", "gold", "yellowgreen", "green", "turquoise", "deepskyblue", "mediumblue", "darkviolet", "violetred", "deeppink", - "darkgray", "lightcoral", "goldenrod", "lightyellow", "olivedrab", "limegreen", "mediumturquoise", "lightskyblue", "darkslateblue", "thistle", "orchid", "palevioletred", - "silver", "rosybrown", "darkkhaki", "khaki", "olive", "darkgreen", "lightseagreen", "steelblue", "navy", "indigo", "purple", "crimson" - ); + var cols = new Array( "black", "gray", "silver", "white", + "maroon", "purple", "red", "fuschia", + "green", "olive", "lime", "yellow", + "navy", "teal", "blue", "aqua" ); table.setAttribute('id', 'kupu-colorchooser-table'); table.style.borderWidth = '2px'; table.style.borderStyle = 'solid'; @@ -795,8 +822,8 @@ for (var i=0; i < 4; i++) { var tr = document.createElement('tr'); - for (var j = 0; j < 12; j++) { - var color = cols[i * 12 + j];; + for (var j = 0; j < 4; j++) { + var color = cols[i * 4 + j];; var td = document.createElement('td'); td.setAttribute('bgColor', color); td.style.borderWidth = '1px'; Index: twikiplugins/WysiwygPlugin/templates/edit.kupu.tmpl =================================================================== --- twikiplugins/WysiwygPlugin/templates/edit.kupu.tmpl (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/WysiwygPlugin/templates/edit.kupu.tmpl (.../DEVELOP) (revision 9301) @@ -375,13 +375,11 @@ - -
- + - +
%FORMFIELDS% Index: twikiplugins/LocalTimePlugin/lib/TWiki/Plugins/LocalTimePlugin.pm =================================================================== --- twikiplugins/LocalTimePlugin/lib/TWiki/Plugins/LocalTimePlugin.pm (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/LocalTimePlugin/lib/TWiki/Plugins/LocalTimePlugin.pm (.../DEVELOP) (revision 9301) @@ -79,25 +79,16 @@ sub handleLocalTime { my($session, $params, $theTopic, $theWeb) = @_; + my $tz = $params->{_DEFAULT} || $timezone; my $formatString = $params->{format}; - my $fromtopic = $params->{fromtopic}; my $specifieddateGMT = $params->{dateGMT}; - - if (defined($fromtopic)) { - #TODO: normalise topic - my( $web, $topic ) = $session->normalizeWebTopicName( $theWeb, $fromtopic ); - my $zone = $session->{prefs}->getTopicPreferencesValue('TIMEZONE', $web, $topic); - $tz = $zone if defined($zone); - } - my $date; if (defined ($specifieddateGMT)) { $date = new Date::Handler({ date => TWiki::Time::parseTime($specifieddateGMT), time_zone => $tz }); } else { $date = new Date::Handler({ date => time, time_zone => $tz }); } - #swiped from TWiki::Time::formatTime #SMELL: should combine this code into TWiki::Time, or abstract out and reuse.. @@ -128,13 +119,13 @@ $value =~ s/\$hour?s?/sprintf('%.2u',$date->Hour())/gei; $value =~ s/\$day/sprintf('%.2u',$date->Day())/gei; $value =~ s/\$wday/$TWiki::Time::WEEKDAY[$date->WeekDay()]/gi; - $value =~ s/\$dow/$date->WeekDay()/gei; + $value =~ s/\$dow/$date->WeekDay()/gi; $value =~ s/\$week/TWiki::Time::_weekNumber($date->Day(),$date->Month()-1,$date->Year(),$date->WeekDay())/egi; $value =~ s/\$mont?h?/$TWiki::Time::ISOMONTH[$date->Month()-1]/gi; $value =~ s/\$mo/sprintf('%.2u',$date->Month())/gei; $value =~ s/\$year?/sprintf('%.4u',$date->Year())/gei; $value =~ s/\$ye/sprintf('%.2u',$date->Year()%100)/gei; - $value =~ s/\$epoch/$date->Epoch()/gei; + $value =~ s/\$epoch/$date->Epoch()/gi; $value =~ s/\$tz/$date->TimeZone()/gei; return $value; Index: twikiplugins/LocalTimePlugin/data/TWiki/LocalTimePlugin.txt =================================================================== --- twikiplugins/LocalTimePlugin/data/TWiki/LocalTimePlugin.txt (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/LocalTimePlugin/data/TWiki/LocalTimePlugin.txt (.../DEVELOP) (revision 9301) @@ -10,6 +10,8 @@ Add a %LOCALTIME% tag to your text to show the current time. You can specify the location or timezone such as "Asia/Tokyo" or "GMT" with %LOCALTIME{location}%, where _location_ is a location mentioned at http://twiki.org/cgi-bin/xtra/tzdate, or a timezone code such as "JST". * see http://www.twinsun.com/tz/tz-link.htm for more information +*Warning: it does not take care of daylight savings time* + * The =unnamed=, or =DEFAULT= parameter is the timezone to output * =dateGMT= must be a datetime string that TWiki can parse (see Time::TWiki::parseTime), but assumes GMT * 31 Dec 2001 - 23:59 @@ -22,13 +24,11 @@ * 2001-12-31T23:59Z * 2001-12-31T23:59+01:00 * =format= is the same as for the format specifier in http://t42p/cgi-bin/DEVELOP/bin/view/TWiki/TWikiVariables#VarGMTIME - * fromtopic="web.topic" - the plugin tries to use the timezone set in the variable TIMEZONE on the topic selected ---++ Examples | | you type | if installed you get | | Time in Tokyo now | %LOCALTIME{Asia/Tokyo}% | %LOCALTIME{Asia/Tokyo}% | | Time in London now | %LOCALTIME{Europe/London}% | %LOCALTIME{Europe/London}% | -| Time in your TIMEZONE (if you've set the TIMEZONE VAR) now | %LOCALTIME{fromtopic="$percntWIKIUSERNAME$percnt"}% | %LOCALTIME{fromtopic="$percntWIKIUSERNAME$percnt"}% | | 05 Apr 2006, 15:43:50 GMT in Sydney/Australia | %LOCALTIME{"Australia/Sydney" dateGMT="05 Apr 2006 - 15:43:50"}% | %LOCALTIME{"Australia/Sydney" dateGMT="05 Apr 2006 - 15:43:50"}% | | 05 Apr 2006, 15:43:50 GMT in Sydney/Australia (format as iso) | %LOCALTIME{"Australia/Sydney" dateGMT="05 Apr 2006 - 15:43:50" format="iso"}% | %LOCALTIME{"Australia/Sydney" dateGMT="05 Apr 2006 - 15:43:50" format="iso"}% | Index: twikiplugins/ClassicSkin/templates/view.classic.tmpl =================================================================== --- twikiplugins/ClassicSkin/templates/view.classic.tmpl (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/ClassicSkin/templates/view.classic.tmpl (.../DEVELOP) (revision 9301) @@ -28,10 +28,8 @@ %TMPL:DEF{"wysiwyg"}%%TMPL:P{"sep"}% %MAKETEXT{"&WYSIWYG"}%%TMPL:END% -%TMPL:DEF{"editaction"}%%IF{"defined EDITACTION" then="&action=%EDITACTION%" else=""}%%TMPL:END% +%TMPL:DEF{"active_edit"}%%TMPL:P{context="new_topic" then="create_topic" else="edit_topic"}% %TMPL:P{context="WysiwygPluginEnabled" then="wysiwyg"}%%TMPL:END% -%TMPL:DEF{"active_edit"}%%TMPL:P{context="new_topic" then="create_topic" else="edit_topic"}% %TMPL:P{context="WysiwygPluginEnabled" then="wysiwyg"}%%TMPL:END% - %TMPL:DEF{"inactive_attach"}%Attach%TMPL:END% %TMPL:DEF{"active_attach"}%Attach%TMPL:END% Index: twikiplugins/AliasPlugin/lib/TWiki/Plugins/AliasPlugin.pm =================================================================== --- twikiplugins/AliasPlugin/lib/TWiki/Plugins/AliasPlugin.pm (.../TWikiRelease04x00) (revision 9301) +++ twikiplugins/AliasPlugin/lib/TWiki/Plugins/AliasPlugin.pm (.../DEVELOP) (revision 9301) @@ -82,7 +82,7 @@ # get plugin flags $aliasWikiWordsOnly = - TWiki::Func::getPreferencesFlag("ALIASPLUGIN_ALIAS_WIKIWORDS_ONYL"); + TWiki::Func::getPreferencesFlag("ALIASPLUGIN_ALIAS_WIKIWORDS_ONLY"); $defaultAliasTopic = TWiki::Func::getPreferencesValue("ALIASPLUGIN_DEFAULT_ALIASES") || 'WebAliases'; Index: templates/search.tmpl =================================================================== --- templates/search.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/search.tmpl (.../DEVELOP) (revision 9301) @@ -1,17 +1,20 @@ -%TMPL:INCLUDE{"view"}% - -%TMPL:DEF{"titleaction"}%(search result) %TMPL:END% -%TMPL:DEF{"webaction"}% %WEBTOPICLIST% %TMPL:END% - -%TMPL:DEF{"topicaction"}% %TMPL:END% - -%TMPL:DEF{"footernote"}% %TMPL:END% - -%TMPL:DEF{"searchbody"}%%SPLIT%%TMPL:P{"repeatedsearchblock"}% -

%SPLIT%Number of topics: %NTOPICS%%TMPL:END% - -%TMPL:DEF{"repeatedsearchblock"}% -%TABLE% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(search result)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(search result)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%WEBTOPICLIST%%TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% + +%TMPL:P{"BODY:TopBar"}% +

+%SPLIT%Search: %SEARCHSTRING% +

%SPLIT%%TABLE% @@ -30,16 +33,10 @@ -
Topics in %WEB% web:%TEXTHEAD%  
%REPEAT%
%TMPL:END% - -%TMPL:DEF{"content"}% -%SPLIT%Search: %SEARCHSTRING% -

%TMPL:P{"searchbody"}% +

%REPEAT%
+

%SPLIT%Number of topics: %NTOPICS%

%SPLIT% -%TMPL:P{"topicinfo"}%%TMPL:END% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% -%TMPL:DEF{"main"}% -

-%TMPL:P{"standardheader"}% -
-%TMPL:P{"content"}%%TMPL:END% \ No newline at end of file + Index: templates/rename.tmpl =================================================================== --- templates/rename.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/rename.tmpl (.../DEVELOP) (revision 9301) @@ -1,17 +1,56 @@ -%TMPL:INCLUDE{"renamebase"}% -%TMPL:DEF{"titleaction"}%(rename) %TMPL:END% -%TMPL:DEF{"webaction"}%Rename%TMPL:END% -%TMPL:DEF{"newtopic"}%%TMPL:END% -%TMPL:DEF{"newweb"}%%TMPL:END% -%TMPL:DEF{"notes"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(rename) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(rename)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Rename %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + + + [[%WEB%.%TOPIC%][]] %TMPL:END% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+%TMPL:P{"BODY:SimpleTopBar"}% +---+ %TMPL:P{"BODY:TopBar:longaction"}% %TOPIC% +| | *Web:* | *Topic:* | +| *From:* | %WEB% | %TOPIC% | +| *To:* | | |
Allow non WikiWord for the new topic name.
__Note:__ It's usually best to choose a WikiWord for the new topic name, otherwise automatic linking may not work. Characters not -allowed in topic names, such as spaces will automatically be removed.%TMPL:END% -%TMPL:DEF{"topicaction"}% - - %TMPL:P{"sep"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"rename"}% \ No newline at end of file +allowed in topic names, such as spaces will automatically be removed. + +---++ Change links in topics that refer to %TOPIC% in the %WEB% Web: +%LOCAL_SEARCH% + +---++ Change links in topics that refer to %WEB%.%TOPIC% in any Web: +%GLOBAL_SEARCH% + + + checkboxes of referenced topics + +__Note:__ + * Get help on + Renaming and moving topics. + * Select the %TRASHWEB% Web to delete the topic. + * The checkmarked topics will be updated (another form will appear which will _eventually_ allow you to rename any topics that were locked) +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% + Index: templates/messages.tmpl =================================================================== --- templates/messages.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/messages.tmpl (.../DEVELOP) (revision 9301) @@ -163,8 +163,8 @@
- - + +
%TMPL:END% @@ -210,7 +210,7 @@ %MAKETEXT{"Alternatively hit back to go back to TWiki.TWikiRegistration and choose a different username."}% -%MAKETEXT{"Please contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% +%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% %TMPL:END% %TMPL:DEF{"bad_wikiname"}% ---+++ %MAKETEXT{"Incorrect [_1]" args="%TWIKIWEB%.WikiName"}% @@ -240,11 +240,11 @@
- - + +
-%MAKETEXT{"Please contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% +%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% %TMPL:END% %TMPL:DEF{"mandatory_field"}% ---+++ %MAKETEXT{"Topic Save Error"}% @@ -327,7 +327,8 @@ %PARAM4% %TMPL:END% @@ -376,7 +377,7 @@ Messages for oopsalerts }% %TMPL:DEF{"access_denied"}% %MAKETEXT{"No permission to view [_1]" args="%PARAM1%"}% %TMPL:END% -%TMPL:DEF{"bad_attachment"}% %MAKETEXT{"Error: File attachment at [_1],[_2] does not exist" args="%PARAM1%, %PARAM2%"}% %TMPL:END% +%TMPL:DEF{"attachment_missing"}% %MAKETEXT{"Error: File attachment at [_1],[_2] does not exist" args="%PARAM1%, %PARAM2%"}% %TMPL:END% %TMPL:DEF{"bad_protocol"}% %MAKETEXT{"Error: Unsupported protocol. (Must be 'http://domain/...')"}% %TMPL:END% %TMPL:DEF{"bad_content"}% %MAKETEXT{"Error: Unsupported content type: [_1] (Must be =text/html=, =text/plain= or =text/css=)" args="%PARAM1%"}% %TMPL:END% %TMPL:DEF{"topic_not_found"}% %MAKETEXT{"Warning: Can't find topic [_1]" args="%PARAM1%"}% %TMPL:END% @@ -395,14 +396,14 @@ %MAKETEXT{"Access check on [_1] failed" args="%WEB%.%TOPIC%"}%. %MAKETEXT{"Action [_1]: [_2]." args="\"%PARAM1%\", %PARAM2%"}% -%MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% +%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% __%MAKETEXT{"Related topics:"}%__ %MAINWEB%.TWikiGroups, %TWIKIWEB%.TWikiAccessControl %TMPL:END% %TMPL:DEF{"only_group"}% %MAKETEXT{"Only members of the [_1] are allowed to perform this action." args="%PARAM1%"}% -%MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% +%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% __%MAKETEXT{"Related topics:"}%__ %MAINWEB%.TWikiGroups, %TWIKIWEB%.TWikiAccessControl @@ -411,12 +412,12 @@ ---++ %MAKETEXT{"The [_1] web does not exist" args="\"%WEB%\""}% %MAKETEXT{"A [_1] is divided into webs; each one represents one subject, one area of collaboration. You are trying to [_2] in a web that does not exist." args="%TWIKIWEB%.TWikiSite, '%PARAM1%'"}% ----+++ %MAKETEXT{"If you came here by clicking on a question mark link"}% +---+++ %ICON{arrowright}% %MAKETEXT{"If you came here by clicking on a question mark link"}%
%MAKETEXT{"A link to a topic located in another web is written like [_1]. Make sure that the name of the web is not spelt wrongly on the previous page; fix the link if necessary." args="*Otherweb.TopicName*"}%
----+++ %MAKETEXT{"If you would like to create this web"}% +---+++ %ICON{newtopic}% %MAKETEXT{"If you would like to create this web"}% %MAKETEXT{"You can ~[~[[_1]~]~[create a new web~]~] if you have permission. Contact [_2] if you have any questions." args="%SCRIPTURLPATH{"view"}%/%TWIKIWEB%/ManagingWebs?newweb=%WEB%;newtopic=%TOPIC%#CreateNewWeb, %WIKIWEBMASTER%"}% %TMPL:END% %TMPL:DEF{"no_such_topic"}% @@ -426,12 +427,11 @@ ---++ %MAKETEXT{"If you want to create the topic"}% [[%SCRIPTURLPATH{"edit"}%/%WEB%/%TOPIC%?t=%SERVERTIME{"$year$mo$day$min$sec"}%][%MAKETEXT{"Click here"}%]]. -%MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% +%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% %TMPL:END% %TMPL:DEF{"no_such_attachment"}% ---++ %MAKETEXT{"Attachment '[_1]' does not exist" args="%PARAM2%"}% %MAKETEXT{"You are trying to [_1] an attachment that does not exist." args="%PARAM1%"}% -%MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}% +%MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}% %TMPL:END% - Index: templates/oopssaveerr.tmpl =================================================================== --- templates/oopssaveerr.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/oopssaveerr.tmpl (.../DEVELOP) (revision 9301) @@ -1,17 +1,25 @@ -%{ +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%%MAKETEXT{"(oops)"}% %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%%MAKETEXT{"(oops)"}% %TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% *%MAKETEXT{"Attention"}%* %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% [[%WEB%.%TOPIC%][%MAKETEXT{"OK"}%]] %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% %TMPL:END% - NOTE: not used by TWiki, but retained for compatibility with some plugins - that use it. -}% -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"titleaction"}%%MAKETEXT{"(oops)"}% %TMPL:END% -%TMPL:DEF{"webaction"}% *%MAKETEXT{"Attention"}%* %TMPL:END% -%TMPL:DEF{"heading"}%%MAKETEXT{"Topic save error"}%%TMPL:END% -%TMPL:DEF{"message"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +---+ %MAKETEXT{"Topic save error"}% %MAKETEXT{"During save of file [_1] an error was found by the version control system. Please notify your [_2] administrator." args="%WEB%.%TOPIC%, %WIKITOOLNAME%"}% =%PARAM1%= -%MAKETEXT{"Go back in your browser and save your changes locally."}% %TMPL:END% -%TMPL:DEF{"topicaction"}% [[%WEB%.%TOPIC%][%MAKETEXT{"OK"}%]] %TMPL:END% -%TMPL:P{"oops"}% +%MAKETEXT{"Go back in your browser and save your changes locally."}% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/changes.tmpl =================================================================== --- templates/changes.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/changes.tmpl (.../DEVELOP) (revision 9301) @@ -1,11 +1,41 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:INCLUDE{"search"}% -%TMPL:DEF{"titleaction"}%(changes) %TMPL:END% -%TMPL:DEF{"searchbody"}%
%TMPL:P{"repeatedsearchblock"}%%TMPL:END% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(changes) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(changes)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%WEBTOPICLIST%%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}%Subscribe or unsubscribe in %NOTIFYTOPIC%%TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+%TMPL:P{"BODY:TopBar"}% +
+
%TABLE% + + + + + + +
Topics in %WEB% web:Changed: now %DISPLAYTIME{"$hour:$min"}% Changed by:
+%REPEAT% + + + + + + + + + + +
%TOPICNAME%%TIME% - %REVISION% %AUTHOR%
%TEXTHEAD% 
%REPEAT%
+%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% -%TMPL:DEF{"content"}% -%TMPL:P{"searchbody"}% -%TMPL:P{"topicinfo"}%%TMPL:END% -%TMPL:DEF{"topicaction"}% Subscribe or unsubscribe in %NOTIFYTOPIC% %TMPL:END% Index: templates/editform.tmpl =================================================================== --- templates/editform.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/editform.tmpl (.../DEVELOP) (revision 9301) @@ -1,11 +1,22 @@ -%TMPL:INCLUDE{"edit"}% - -%TMPL:DEF{"focus"}%%TMPL:END% -%TMPL:DEF{"titleaction"}%(edit form)%TMPL:END% -%TMPL:DEF{"footernote"}% %TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% +%TMPL:INCLUDE{"twiki"}% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(change form)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Change form%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + + + + %TMPL:END% +%TMPL:P{"Standard:DocType"}% + + (edit form) <nop>%TOPIC% < %WEB% < <nop>%WIKITOOLNAME% + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:StartForm"}% +%TMPL:P{"BODY:SimpleTopBar"}%
@@ -14,4 +25,9 @@ %FORMFIELDS% -%TMPL:P{"topicinfo"}%
%TMPL:END% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% + + Index: templates/view.plain.tmpl =================================================================== --- templates/view.plain.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/view.plain.tmpl (.../DEVELOP) (revision 9301) @@ -1,58 +1,15 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"bodystart"}% - -#PageTop -%TMPL:END% - -%TMPL:DEF{"titleaction"}% %REVTITLE% %TMPL:END% -%TMPL:DEF{"webaction"}% %WEBTOPICLIST% %TMPL:END% -%TMPL:DEF{"form"}% -%META{"form"}%%TMPL:END% - -%TMPL:DEF{"attachments"}% -%META{"attachments"}%%TMPL:END% - -%TMPL:DEF{"footernote"}% -
-%META{"parent" prefix="
Parents: "}% -%META{"moved"}% -
%TMPL:END% - -%TMPL:DEF{"main"}% -%TMPL:P{"content"}% -%TMPL:END% - -%TMPL:DEF{"inactive_edit"}%Edit%TMPL:END% -%TMPL:DEF{"create_topic"}%Create%TMPL:END% -%TMPL:DEF{"edit_topic"}%Edit%TMPL:END% - - -%TMPL:DEF{"active_edit"}%%TMPL:P{context="new_topic" then="create_topic" else="edit_topic"}% %TMPL:END% - -%TMPL:DEF{"inactive_attach"}%Attach%TMPL:END% -%TMPL:DEF{"active_attach"}%Attach%TMPL:END% - -%TMPL:DEF{"inactive_more"}%More topic actions...%TMPL:END% -%TMPL:DEF{"active_more"}%More%TMPL:END% - - -%TMPL:DEF{"content"}% +%TMPL:DEF{"HEAD:Title:action"}%mpl}% %REVTITLE% %TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% %TEXT% #TopicEnd -%TMPL:P{"form"}%%TMPL:P{"attachments"}% -%TMPL:END% - -%TMPL:DEF{"topicaction"}% - %TMPL:P{context="inactive" then="inactive_edit" else="active_edit"}% - %TMPL:P{"sep"}% %TMPL:P{context="inactive" then="inactive_attach" else="active_attach"}% - %TMPL:P{"sep"}% Backlinks: Web All webs - %TMPL:P{"sep"}% Printable - %TMPL:P{"sep"}% %TMPL:P{"revisions"}% - %TMPL:P{context="inactive" then="inactive_more" else="active_more"}%%TMPL:END% - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% +%META{"form"}% +%META{"attachments"}% +%TMPL:P{"BODY:End"}% Index: templates/attachnew.tmpl =================================================================== --- templates/attachnew.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/attachnew.tmpl (.../DEVELOP) (revision 9301) @@ -1,11 +1,65 @@ -%TMPL:INCLUDE{"attach"}% -%TMPL:DEF{"titleaction"}%(attach) %TMPL:END% -%TMPL:DEF{"headerhelp"}% %TMPL:END% -%TMPL:DEF{"webaction"}% Attach file to topic %TOPIC% %TMPL:END% -%TMPL:DEF{"previousdetails"}% ----++ Attach new file %TMPL:END% -%TMPL:DEF{"action"}%Attach new file%TMPL:END% -%TMPL:DEF{"topicaction"}% - %TMPL:P{"sep"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(attach) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(attach)%TMPL:END% +%TMPL:DEF{"BODY:ToBar:longaction"}%Attach file to topic%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% | [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"attach"}% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +
+---++ Existing attachments for %TOPIC% +%META{"attachments" all="on"}% +---++ Attach new file + + %TMPL:P{"previous"}% + + + + + + + + + + + + +
+ Local file: + + + +
+ Comment: + + +
+ Link: + + Create a link to the attached file at the end of the topic. +
+ Hide file: + + Hide attachment in normal topic view. +
+__Notes:__ + * *Help:* Please see FileAttachment for more information about attaching files. + * *File size:* %IF{"$ATTACHFILESIZELIMIT > 0" then="You can upload files up to %ATTACHFILESIZELIMIT% KB in size." else="There is no size limit for uploaded files."}% + * *Link checkbox:* If the attached file is a JPG, GIF or PNG image and you check the box, + it will create an inline image (e.g. show the image) at the end of the topic. For other + file types a simple link will be created. + * *Bug:* Internet Explorer 4.0 or earlier: If you get an "Internal Server Error" + message when you upload a file, you need to try again. It should work the second time. +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/searchformat.tmpl =================================================================== --- templates/searchformat.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/searchformat.tmpl (.../DEVELOP) (revision 9301) @@ -1,22 +1,21 @@ -%TMPL:INCLUDE{"twiki"}% - -%TMPL:DEF{"titleaction"}%(search result) %TMPL:END% -%TMPL:DEF{"webaction"}% %WEBTOPICLIST% %TMPL:END% -%TMPL:DEF{"topicaction"}% %TMPL:END% - - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% - -#PageTop +%TMPL:INCLUDE("twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(search result) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(search result)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%WEBTOPICLIST%%TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}%
-%TMPL:P{"standardheader"}% +%TMPL:P{"BODY:TopBar"}%
%SPLIT%Search: %SEARCHSTRING%

%SPLIT%%REPEAT%%REPEAT%%SPLIT%Number of topics: %NTOPICS%

%SPLIT% -%TMPL:P{"standardfooter"}% -%TMPL:P{"topicinfo"}% -#PageBottom - - \ No newline at end of file +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% Index: templates/moveattachment.tmpl =================================================================== --- templates/moveattachment.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/moveattachment.tmpl (.../DEVELOP) (revision 9301) @@ -1,21 +1,27 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:INCLUDE{"rename"}% -%TMPL:DEF{"titleaction"}%(move attachment) %TMPL:END% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(move attachment) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(move attachment)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% *Move file attachment* %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + | [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% - - -%TMPL:DEF{"webaction"}% *Move file attachment* %TMPL:END% - -%TMPL:DEF{"topicaction"}% - - %TMPL:P{"sep"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% - - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}%

---+ Move or Delete File %FILENAME% - | | *Web:* | * Topic:* | | *From:* | %WEB%. |  %TOPIC% | | *To:* | . |   | @@ -28,4 +34,7 @@ * An error page will be shown if either of the topics are locked by another user. * The new topic chosen must already exist. * Note that any URLs that refer to the attachment will be broken after this move. -%TMPL:P{"topicinfo"}%%TMPL:END% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/preview.tmpl =================================================================== --- templates/preview.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/preview.tmpl (.../DEVELOP) (revision 9301) @@ -1,37 +1,25 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"footernote"}% -
-     - -     +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(preview) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(preview)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Note: This is a preview. Do not forget to save your changes.%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% %FORMFIELDS%%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}%    Minor changes, don't notify
    Force new revision (help) -
%TMPL:END% +%TMPL:END% -%TMPL:DEF{"bodystart"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + #PageTop -%TMPL:END% - -%TMPL:DEF{"titleaction"}%(preview) %TMPL:END% -%TMPL:DEF{"headerhelp"}% -
    -
  • To save changes: Press the [Save Changes] button.
  • -
  • To make more changes: Go back in your browser.
  • -
  • To cancel: Go back twice.
  • -
-
%TMPL:END% -%TMPL:DEF{"webaction"}% - Note: - This is a preview. Do not forget to save your changes. %TMPL:END% - -%TMPL:DEF{"topicaction"}% %FORMFIELDS% %TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% -
+%TMPL:P{"BODY:SimpleTopBar"}% %TEXT% %META{"form"}% %META{"attachments"}% @@ -41,10 +29,7 @@ -%TMPL:P{"topicinfo"}%%TMPL:END% - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/edit.tmpl =================================================================== --- templates/edit.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/edit.tmpl (.../DEVELOP) (revision 9301) @@ -1,20 +1,13 @@ %TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"focus"}% -try { document.main.text.focus(); } catch (er) {} -%TMPL:END% -%TMPL:DEF{"templatescript"}% - -%TMPL:END% -%TMPL:DEF{"bodystart"}% - -#PageTop -%TMPL:END% - -%TMPL:DEF{"footernote"}% -
-    - -    +%TMPL:DEF{"BODY:TopBar:shortaction"}%(edit)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Change topic%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + | + + + | + %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% Minor changes, don't notify
    Force new revision @@ -24,9 +17,17 @@
%TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% +%TMPL:P{"Standard:DocType"}% + + (edit) <nop>%WIKITOOLNAME%:%WEB%.<nop>%TOPIC% < + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:StartForm"}% +%TMPL:P{"BODY:TopBar"}%

@@ -46,20 +47,7 @@ %FORMFIELDS% -%TMPL:P{"topicinfo"}%%TMPL:END% - - -%TMPL:DEF{"topicaction"}% - %TMPL:P{"sep"}% - - - %TMPL:P{"sep"}% - %TMPL:END% -%TMPL:DEF{"titleaction"}%(edit) %TMPL:END% -%TMPL:DEF{"titlehelp"}% %TMPL:END% -%TMPL:DEF{"webaction"}%Change topic%TMPL:END% -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/renameconfirm.tmpl =================================================================== --- templates/renameconfirm.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/renameconfirm.tmpl (.../DEVELOP) (revision 9301) @@ -1,10 +1,57 @@ -%TMPL:INCLUDE{"renamebase"}% -%TMPL:DEF{"titleaction"}%(rename) %TMPL:END% -%TMPL:DEF{"webaction"}%Confirm rename or move%TMPL:END% -%TMPL:DEF{"newtopic"}%%NEW_TOPIC%%TMPL:END% -%TMPL:DEF{"newweb"}%%NEW_WEB%%TMPL:END% -%TMPL:DEF{"topicaction"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(rename) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(rename)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Confirm rename or move%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% - %TMPL:P{"sep"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"rename"}% + [[%WEB%.%TOPIC%][]] %TMPL:END% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+%TMPL:P{"BODY:SimpleTopBar"}% +---+ %TMPL:P{"BODY:TopBar:longaction"}% %TOPIC% +| | *Web:* | *Topic:* | +| *From:* | %WEB% | %TOPIC% | +| *To:* | %NEW_WEB% | %NEW_TOPIC% | + + +
+ +Allow non WikiWord for the new topic name.
+__Note:__ It's usually best to choose a +WikiWord +for the new topic name, otherwise automatic linking may not work. Characters not +allowed in topic names, such as spaces will automatically be removed. + +---++ Change links in topics that refer to %TOPIC% in the %WEB% Web: +%LOCAL_SEARCH% + +---++ Change links in topics that refer to %WEB%.%TOPIC% in any Web: +%GLOBAL_SEARCH% + + + checkboxes of referenced topics + +__Note:__ + * Get help on + Renaming and moving topics. + * Select the %TRASHWEB% Web to delete the topic. + * The checkmarked topics will be updated (another form will appear which will _eventually_ allow you to rename any topics that were locked) +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/twiki.tmpl =================================================================== --- templates/twiki.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/twiki.tmpl (.../DEVELOP) (revision 9301) @@ -1,23 +1,45 @@ -%{ Internationalisable Messages/constructs }% -%TMPL:DEF{"sep"}%|%TMPL:END% -%TMPL:DEF{"titlesep"}%<%TMPL:END% -%TMPL:DEF{"LOG_IN"}%Log In%TMPL:END% -%TMPL:DEF{"LOG_OUT"}%Log Out%TMPL:END% +%{ + Module of TWiki Enterprise Collaboration Platform, http://TWiki.org/ + + Copyright (C) 2005-2006 TWiki Contributors. All Rights Reserved. + TWiki Contributors + are listed in the AUTHORS file in the root of this distribution. + NOTE: Please extend that file, not this notice. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. For + more details read LICENSE in the root of this distribution. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + As per the GPL, removal of this notice is prohibited. -%TMPL:DEF{"htmldoctype"}% - - %TMPL:END% + This file defines a set of standard templates that are included by other + template files. + The templates are named depending on whether they are used in the HEAD or BODY of + the HTML page. The second part of the name is descriptive of the function. If there + is a third part to the name, then the template is a "variable" i.e. something that + may be set by a calling template to parameterise one of the definitions here. + Note that this file should be included in templates *before* any HTML, and any local + definitions in files should be defined at the top. This is because these definitions + expand to a bunch of whitespace that is trimmed off when the HTML is generated. If you + embed definitions in real HTML, you may get unexpected results! +}% -%TMPL:DEF{"templatescript"}%%TMPL:END% +%{ Standard DOCTYPE tag }% +%TMPL:DEF{"Standard:DocType"}% +%TMPL:END% - - -%TMPL:DEF{"script"}% - +%{ SCRIPT tag in standard page head }% +%TMPL:DEF{"HEAD:Script"}% -%TMPL:P{"templatescript"}% %TMPL:END% +%{ TITLE tag + Requires + HEAD:Title:action +}% +%TMPL:DEF{"HEAD:Title"}%%TMPL:P{"HEAD:Title:action"}% <nop>%WIKITOOLNAME%:<nop>%WEB%.<nop>%TOPIC%%TMPL:END% +%{ Common META and LINK tags }% +%TMPL:DEF{"HEAD:Meta"}% + + + + %TMPL:END% -%TMPL:DEF{"windowtitle"}%%TMPL:P{"titleaction"}%<nop>%TOPIC% < %WEB% < <nop>%WIKITOOLNAME%%TMPL:END% +%{ STYLE tag }% +%TMPL:DEF{"HEAD:Style"}% +%TMPL:END% - - -%TMPL:DEF{"twikistyle"}% -%TMPL:INCLUDE{"css.tmpl"}% +%{ Start of the body }% +%TMPL:DEF{"BODY:Start"}% +#PageTop %TMPL:END% - - -%TMPL:DEF{"head"}% - - %TMPL:P{"windowtitle"}% - %HTTP_EQUIV_ON_VIEW% - - - %TMPL:P{"script"}% - %TMPL:P{"twikistyle"}% -%TMPL:END% - - - -%TMPL:DEF{"titleaction"}% %TMPL:END% - - - -%TMPL:DEF{"webaction"}%%TMPL:END% - - - -%TMPL:DEF{"bodystart"}% - +%{ Alternative to BODY:Start, has javascript to initialise a form }% +%TMPL:DEF{"BODY:StartForm"}% #PageTop %TMPL:END% +%{ This template uses two global variables to help in composition. These must be set by any + template file instantiating this definition. + BODY:TopBar:shortaction - short name for the template file's action e.g. "(edit)" + BODY:TopBar:longaction - long name e.g "Change topic" +}% +%TMPL:DEF{"BODY:TopBar"}% + +%WIKITOOLNAME%: +%WEB% >%META{"parent" nowebhome="on" suffix=" >"}% +%TOPIC% %TMPL:P{"BODY:TopBar:shortaction"}% +
+%WIKITOOLNAME% webs: %WIKIWEBLIST%
+
+ %TMPL:P{"BODY:TopBar:longaction"}% +
+%TMPL:END% +%{ + Simpler version of BODY:TopBar. Shares the same configuration variables i.e. + BODY:TopBar:shortaction - short name for the template file's action e.g. "(edit)" + BODY:TopBar:longaction - long name e.g "Change topic" +}% +%TMPL:DEF{"BODY:SimpleTopBar"}%
+
+ %WEBLOGOALT% +
+%WIKITOOLNAME%: %WEB%.%TOPIC% %TMPL:P{"BODY:TopBar:shortaction"}% +
+%WIKITOOLNAME% webs: %WIKIWEBLIST%
+
+ %TMPL:P{"BODY:TopBar:longaction"}% +
+
+%TMPL:END% -%TMPL:DEF{"attachments"}%%TMPL:END% +%{ Revisions, for use in bottom bar (or top bar, if you prefer }% +%TMPL:DEF{"BODY:Revisions"}%%MAKETEXT{"&History"}%: %REVISIONS%%TMPL:END% +%{ The action bar at the bottom of the page + Requires + BODY:BottomBar:action + BODY:BottomBar:footernote +}% +%TMPL:DEF{"BODY:BottomBar"}% +
+%TMPL:P{"BODY:BottomBar:action"}% +
+%TMPL:P{"BODY:BottomBar:footernote"}% +
+%TMPL:P{"BODY:Copyright"}% +%TMPL:END% +%{ TWiki anchor at the bottom of the page }% +%TMPL:DEF{"BODY:PageBottom"}% +#PageBottom +%TMPL:END% -%TMPL:DEF{"standardheader"}% - - - - - - - -
- - %WEBLOGOALT% - - - %WIKITOOLNAME% - > %WEB% - > %META{"parent" nowebhome="on" suffix=" >"}% - %TOPIC% %TMPL:P{"titleaction"}% - - %WIKITOOLNAME% webs:
- %WIKIWEBLIST%
-
- %WEB% . { %TMPL:P{"webaction"}% } -
%TMPL:END% -%TMPL:DEF{"simpleheader"}% - - - - - - - -
- - %WEBLOGOALT% - - - %WIKITOOLNAME% . %WEB% . %TOPIC% %TMPL:P{"titleaction"}% - %TMPL:P{"headerhelp"}% -
- %TMPL:P{"webaction"}% -
%TMPL:END% -%TMPL:DEF{"copyright"}% -
-%WEBCOPYRIGHT% -
%TMPL:END% -%TMPL:DEF{"footernote"}% %TMPL:END% -%TMPL:DEF{"standardfooter"}% -#PageBottom %TMPL:END% +%{ Copyright notice }% +%TMPL:DEF{"BODY:Copyright"}%
%WEBCOPYRIGHT%
%TMPL:END% - - -%TMPL:DEF{"bodyend"}% %TMPL:END% - - - -%TMPL:DEF{"main"}% -%TMPL:P{"content"}% -%TMPL:P{"standardfooter"}%%TMPL:END% - - - -%TMPL:DEF{"topicinfo"}% -%BR% -
- - - - -
- Topic %TOPIC% . { %TMPL:P{"topicaction"}% - } -
- - - - - -
-%TMPL:P{"footernote"}% - - %TMPL:P{"copyright"}% -
%TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% ----+ %TMPL:P{"heading"}% -%BR% -%TMPL:P{"message"}% -%TMPL:P{"topicinfo"}%%TMPL:END% - -%TMPL:DEF{"revisions"}%%MAKETEXT{"&History"}%: %REVISIONS% %TMPL:END% - - -%TMPL:DEF{"oops"}% -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% -%TMPL:END% +%{ The end of the HTML }% +%TMPL:DEF{"BODY:End"}%%TMPL:END% Index: templates/rdiff.tmpl =================================================================== --- templates/rdiff.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/rdiff.tmpl (.../DEVELOP) (revision 9301) @@ -1,20 +1,25 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:INCLUDE{"search"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(%REVTITLE2% vs. %REVTITLE1%)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(%REVTITLE2% vs. %REVTITLE1%)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%WEBTOPICLIST%%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + View + %TMPL:P{"BODY:Revisions"}% + More +%TMPL:DEF{"BODY:BottomBar:footernote"}%%TAIL%%TMPL:END% - -%TMPL:DEF{"footernote"}% - Revision %REVTITLE% - %REVINFO%
-%TMPL:END% - -%TMPL:DEF{"titleaction"}%(%REVTITLE2% vs. %REVTITLE1%) %TMPL:END% - -%TMPL:DEF{"topicaction"}% View - %TMPL:P{"sep"}% %TMPL:P{"revisions"}% - %TMPL:P{"sep"}% More %TMPL:END% - -%TMPL:DEF{"searchbody"}%%TMPL:P{"repeatedsearchblock"}%%TMPL:END% - -%TMPL:DEF{"repeatedsearchblock"}%%REPEAT% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% + +%TMPL:P{"BODY:TopBar"}% + +%REPEAT%
 <<O>>  Difference Topic @@ -24,29 +29,6 @@
%TEXT% -
%REPEAT%%TMPL:END% - -%TMPL:DEF{"topicinfo"}% -%BR% -
- - - - -
- Topic %TOPIC% . { %TMPL:P{"topicaction"}% - } -
- - - - - -
-%TAIL% - - %TMPL:P{"copyright"}% -
%TMPL:END% -%TMPL:DEF{"content"}%%TMPL:P{"searchbody"}% -%TMPL:P{"topicinfo"}%%TMPL:END% -%REPEAT%%TMPL:P{"footernote"}% \ No newline at end of file +
%REPEAT% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% Index: templates/renamedelete.tmpl =================================================================== --- templates/renamedelete.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/renamedelete.tmpl (.../DEVELOP) (revision 9301) @@ -1,23 +1,49 @@ -%TMPL:INCLUDE{"renamebase"}% -%TMPL:DEF{"templatescript"}% - - - -%TMPL:END% -%TMPL:DEF{"titleaction"}%(delete) %TMPL:END% -%TMPL:DEF{"webaction"}%Delete%TMPL:END% -%TMPL:DEF{"newtopic"}%%TMPL:END% -%TMPL:DEF{"newweb"}%%TMPL:END% -%TMPL:DEF{"notes"}% + //]]> + + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+%TMPL:P{"BODY:SimpleTopBar"}% +---+ Delete %TOPIC% +| | *Web:* | * Topic:* | +| *From:* | %WEB%. |  %TOPIC% | +| *To:* | | |
Allow non WikiWord for deleted topic name.
-__Note:__ This name has been chosen so it doesn't conflict with any other topics already in the %NEW_WEB% web. %TMPL:END% -%TMPL:DEF{"topicaction"}% - - %TMPL:P{"sep"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"rename"}% +__Note:__ This name has been chosen so it doesn't conflict with any other topics already in the %NEW_WEB% web. +---++ Change links in topics that refer to %TOPIC% in the %WEB% Web: +%LOCAL_SEARCH% +---++ Change links in topics that refer to %WEB%.%TOPIC% in any Web: +%GLOBAL_SEARCH% +  checkboxes of referenced topics + +__Note:__ + * Get help on + Renaming and moving topics. + * Select the %TRASHWEB% Web to delete the topic. + * The checkmarked topics will be updated (another form will appear which will _eventually_ allow you to rename any topics that were locked) +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% + Index: templates/formtables.tmpl =================================================================== --- templates/formtables.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/formtables.tmpl (.../DEVELOP) (revision 9301) @@ -1,21 +1,18 @@ %{ These templates define the form attached at the bottom of viewed page. }% %{ Header definition for topic attachments and top table in attach screen }% -%TMPL:DEF{FORM:display:header}% -
+%TMPL:DEF{FORM:display:header}%
%TMPL:END% %{ Each row }% -%TMPL:DEF{FORM:display:row}% - %TMPL:END% %{ Footer }% -%TMPL:DEF{FORM:display:footer}% -
[[%A_TITLE%]]
%A_TITLE% +%TMPL:DEF{FORM:display:row}%
%A_TITLE% %A_VALUE%
+%TMPL:DEF{FORM:display:footer}%
%TMPL:END% Index: templates/settings.tmpl =================================================================== --- templates/settings.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/settings.tmpl (.../DEVELOP) (revision 9301) @@ -1,60 +1,40 @@ -%TMPL:INCLUDE{"twiki"}% - - - -%TMPL:DEF{"templatescript"}% - -%TMPL:END% - - - -%TMPL:DEF{"bodystart"}% - -#PageTop -%TMPL:END% - - -%TMPL:DEF{"titleaction"}%(set preferences) %TMPL:END% - -%TMPL:DEF{"webaction"}%Preferences for%TMPL:END% - - -%TMPL:DEF{"topicaction"}% - %TMPL:P{"sep"}% - %TMPL:END% - - -%TMPL:DEF{"footernote"}% -
-    - - -*Note:* - * Get help on - Setting topic preferences. - * Each preference has the syntax
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [space] [value] -
-
%TMPL:END% - - - - -%TMPL:DEF{"content"}% -
-%TMPL:P{"simpleheader"}% ----+ %TMPL:P{"webaction"}% %TOPIC% - -
- - -
-
-%TMPL:P{"topicinfo"}%
%TMPL:END% - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% \ No newline at end of file +%TMPL:INCLUDE{"twiki"}% +%TMPL:DEF{"HEAD:Title:action"}%(set preferences) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(set prefs)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Preferences for%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + | + %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% + +*Note:* + * Get help on + Setting topic preferences. + * Each preference has the syntax
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [space] [value] +
+
%TMPL:END% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:StartForm"}% +
+%TMPL:P{"BODY:SimpleTopBar"}% +---+ Preferences for %TOPIC% + +
+ + +
+
+%TMPL:P{"BODY:BottomBar"}% +
+%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/backlinks.tmpl =================================================================== --- templates/backlinks.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/backlinks.tmpl (.../DEVELOP) (revision 9301) @@ -1,13 +1,41 @@ -%TMPL:INCLUDE{"search"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(search result)%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% %TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Title"}% + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%SPLIT%Search: %SEARCHSTRING% +

%SPLIT%%TABLE% + + + + + + +
Topics in %WEB% web:Changed: now %DISPLAYTIME{"$hour:$min"}% Changed by:
+%REPEAT% + + + + + + + + + + +
%TOPICNAME%%TIME% - %REVISION% %AUTHOR%
%TEXTHEAD% 
%REPEAT%
+

%SPLIT%Number of topics: %NTOPICS% +

%SPLIT% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% -%TMPL:DEF{"standardheader"}%%TMPL:END% - - - -%TMPL:DEF{"searchweb"}%%SEARCH{ search="%TOPIC%([^A-Za-z0-9]|$)|%SPACEOUT{"%TOPIC%" separator=" *"}%([^A-Za-z0-9]|$)|%WEB%.%TOPIC%([^A-Za-z0-9]|$)" type="regex" scope="text" nosearch="on" excludetopic="%TOPIC%" web="%WEB%" }%%TMPL:END% - - - -%TMPL:DEF{"searchallwebs"}%%SEARCH{ search="%WEB%.%TOPIC%([^A-Za-z0-9]|$)|%WEB%.%SPACEOUT{"%TOPIC%" separator=" *"}%([^A-Za-z0-9]|$)" type="regex" scope="text" nosearch="on" excludetopic="%TOPIC%" web="all,-%WEB%" }%%TMPL:END% Index: templates/oopsmore.tmpl =================================================================== --- templates/oopsmore.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/oopsmore.tmpl (.../DEVELOP) (revision 9301) @@ -1,9 +1,19 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"titleaction"}%(more) %TMPL:END% -%TMPL:DEF{"webaction"}% *Topic actions* %TMPL:END% -%TMPL:DEF{"heading"}%More Actions on Topic [[%TOPIC%]]%TMPL:END% -%TMPL:DEF{"message"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(more) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(more) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% *Topic actions* %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +---+ More Actions on Topic [[%TOPIC%]] * *%MAKETEXT{"Delete topic"}%* * %MAKETEXT{"Delete topic..."}%, %MAKETEXT{"looking for references in _all public webs_"}% *%MAKETEXT{"(recommended)"}%* @@ -52,6 +62,7 @@ * *Edit topic preference settings* - * Edit settings for this topic %TMPL:END% -%TMPL:DEF{"topicaction"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"oops"}% + * Edit settings for this topic +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/form.tmpl =================================================================== --- templates/form.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/form.tmpl (.../DEVELOP) (revision 9301) @@ -1,13 +1,3 @@ -%TMPL:DEF{"changeform"}%%TMPL:END% - -%TMPL:DEF{"mandatory"}%* %MAKETEXT{"indicates mandatory fields"}% %TMPL:END% - -%TMPL:DEF{"repeatedformrows"}% %REPEAT% -%ROWTITLE%%ROWEXTRA%%ROWVALUE%%REPEAT%%ROWVALUE%%REPEAT% %TMPL:END% - -%TMPL:DEF{"formtail"}% %TMPL:P{context="mandatoryfields" then="mandatory"}% %TMPL:END% - -

%TMPL:P{"repeatedformrows"}%
%FORMTITLE% %TMPL:P{"changeform"}%
%TMPL:P{"formtail"}%
- - - +%TMPL:DEF{"mandatory"}%
* %MAKETEXT{"indicates mandatory fields"}%
%TMPL:END% +
%TMPL:P{context="mandatoryfields" then="mandatory"}%%REPEAT% +%REPEAT%%REPEAT%
%FORMTITLE%
%ROWTITLE%%ROWEXTRA%%ROWVALUE%
%ROWVALUE%
\ No newline at end of file Index: templates/attachagain.tmpl =================================================================== --- templates/attachagain.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/attachagain.tmpl (.../DEVELOP) (revision 9301) @@ -1,19 +1,75 @@ -%TMPL:INCLUDE{"attach"}% -%TMPL:DEF{"titleaction"}%(attach) %TMPL:END% -%TMPL:DEF{"headerhelp"}% %TMPL:END% -%TMPL:DEF{"webaction"}% Update attachment *%FILENAME%* on *%TOPIC%* %TMPL:END% -%TMPL:DEF{"previousdetails"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(attach) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(attach)%TMPL:END% +%TMPL:DEF{"BODY:ToBar:longaction"}% Update attachment %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + | + | + Move or delete attachment | + [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +
+---++ Existing attachments for %TOPIC% +%META{"attachments" all="on"}% ---++ Update attachment %FILENAME% -%ATTACHTABLE% %TMPL:END% -%TMPL:DEF{"previous"}% - +%ATTACHTABLE% + + - %TMPL:END% -%TMPL:DEF{"extranotes"}% + + + + + + + + + + + + + +
Previous
upload:
- %FILEPATH% %TMPL:P{"fileuser"}% + %FILEPATH% (%FILEUSER%)
+ Local file: + + + +
+ Comment: + + +
+ Link: + + Create a link to the attached file at the end of the topic. +
+ Hide file: + + Hide attachment in normal topic view. +
+__Notes:__ + + * *Help:* Please see FileAttachment for more information about attaching files. + * *File size:* %IF{"$ATTACHFILESIZELIMIT > 0" then="You can upload files up to %ATTACHFILESIZELIMIT% KB in size." else="There is no size limit for uploaded files."}% + * *Link checkbox:* If the attached file is a JPG, GIF or PNG image and you check the box, + it will create an inline image (e.g. show the image) at the end of the topic. For other + file types a simple link will be created. + * *Bug:* Internet Explorer 4.0 or earlier: If you get an "Internal Server Error" + message when you upload a file, you need to try again. It should work the second time. * *Properties:* The comment and visibility (i.e. is attachment hidden) can be changed without uploading a file by pressing "Change Properties"; see HiddenAttachment @@ -22,11 +78,7 @@ comment when the file was uploaded. * *Local file:* If you select a different file in _Local file:_, it is this that will be updated or added. -%TMPL:END% -%TMPL:DEF{"topicaction"}% - %TMPL:P{"sep"}% - %TMPL:P{"sep"}% - Move or delete attachment %TMPL:P{"sep"}% - [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:DEF{"fileuser"}%(%FILEUSER%)%TMPL:END% -%TMPL:P{"attach"}% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/renameweb.tmpl =================================================================== --- templates/renameweb.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/renameweb.tmpl (.../DEVELOP) (revision 9301) @@ -1,15 +1,61 @@ -%TMPL:INCLUDE{"renamewebbase"}% -%TMPL:DEF{"titleaction"}%(rename) %TMPL:END% -%TMPL:DEF{"webaction"}%Rename%TMPL:END% -%TMPL:DEF{"newsubweb"}%%TMPL:END% -%TMPL:DEF{"newparentweb"}%%TMPL:END% -%TMPL:DEF{"notes"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(rename)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(rename)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Rename web%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+ + + %TMPL:P{"BODY:SimpleTopBar"}% +---+ Rename %WEB% + +| | *Web:* || +| *From:* | %NEW_PARENTWEB%. |%NEW_SUBWEB% | +| *To:* | | |
__Notes:__ * It's usually best to choose a WikiWord for the new web name, otherwise automatic linking may not work. Characters not allowed in topic names, such as spaces will automatically be removed. * %MAKETEXT{"To delete this web: move this web to the Trash web by renaming it to [_1]." args="%TRASHWEB%/%WEB%"}% -%TMPL:END% -%TMPL:DEF{"topicaction"}% - - %TMPL:P{"sep"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"renameweb"}% \ No newline at end of file +---++ Notices +*Topics which are currently being edited by other users in the %WEB% Web:* +%MOVE_LOCKED% + +*Topics which refer to this web and are are currently being edited by other users:* %REF_LOCKED% + +*Topics which refer to this web that you do not have permission to change:* +%REF_DENIED% + +---++ Change links in topics that refer to %WEB%.Topicname in the %WEB% Web: + +%LOCAL_SEARCH% + +---++ Change links in topics that refer to %WEB% in any Web: + +%GLOBAL_SEARCH% + +  checkboxes of referenced topics + +__Note:__ + * Get help on + Renaming and moving webs. + * Select the %TRASHWEB% Web to delete the topic. + * The checkmarked topics will be updated. +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/view.print.tmpl =================================================================== --- templates/view.print.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/view.print.tmpl (.../DEVELOP) (revision 9301) @@ -1,41 +1,20 @@ -%TMPL:INCLUDE{"twiki"}% +%TMPL:INCLUDE{"twiki.tmpl"}% -%TMPL:DEF{"head"}% +%TMPL:P{"Standard:DocType"}% - %TOPIC% < %WEB% < <nop>%WIKITOOLNAME% - %HTTP_EQUIV_ON_VIEW% - -%TMPL:END% - - -%TMPL:DEF{"main"}% - - - - -
- %WIKITOOLNAME% . %WEB% . %TOPIC% -
-

%TMPL:P{"content"}% -%TMPL:P{"standardfooter"}%%TMPL:END% - -%TMPL:DEF{"content"}% + %TMPL:P{"HEAD:Title"}% + %TMPL:P{"HEAD:Meta"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +

+ %WIKITOOLNAME%:%WEB%.%TOPIC% +
+
%TEXT% %META{"form"}% %META{"attachments"}% -

- - - - -
- =-----= History: %REVINFO% -
-%TMPL:P{"copyright"}% -%TMPL:END% - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% +


+History: %REVINFO% +%TMPL:P{"BODY:Copyright"}% +%{End:P{"BODY:PageBottom"}%%{EndTMPL:P{"BODY:End"}% Index: templates/oopsattention.tmpl =================================================================== --- templates/oopsattention.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/oopsattention.tmpl (.../DEVELOP) (revision 9301) @@ -1,10 +1,19 @@ -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"titleaction"}% %TMPL:END% -%TMPL:DEF{"webaction"}%%TMPL:END% -%TMPL:DEF{"heading"}%%MAKETEXT{"Attention"}%%TMPL:END% -%TMPL:DEF{"topicaction"}% %TMPL:END% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}% %TMPL:END% +%TMPL:DEF{"BODY:ToolBar:shortaction"}%%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%TMPL:END% %TMPL:INCLUDE{"messages"}% -%TMPL:DEF{"message"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +---+ %MAKETEXT{"Attention"}% %INSTANTIATE% -%TMPL:END% -%TMPL:P{"oops"}% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/login.tmpl =================================================================== --- templates/login.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/login.tmpl (.../DEVELOP) (revision 9301) @@ -1,21 +1,19 @@ -%TMPL:INCLUDE{"twiki"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(login)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% TWiki User Authentication %TMPL:END% -%TMPL:DEF{"webaction"}% TWiki User Authentication %TMPL:END% -%TMPL:DEF{"topicaction"}% %TMPL:END% -%TMPL:DEF{"LOG_IN_BANNER"}%Please enter your username and password%TMPL:END% -%TMPL:DEF{"LOGGED_IN_BANNER"}% %MAINWEB%.%WIKINAME% is currently logged in%TMPL:END% -%TMPL:DEF{"NEW_USER_NOTE"}%Enter a new username and password to change identity%TMPL:END% -%TMPL:DEF{"UNRECOGNISED_USER"}%Unrecognised user and/or password.%TMPL:END% - -%TMPL:DEF{"topbar"}% -
-
- %WIKILOGOALT% -
-
%TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% +%TMPL:P{"Standard:DocType"}% + + <nop>%WIKITOOLNAME% User Authentication + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Style"}% + %TMPL:P{"templatecustomstyle"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +
+
---+ %BANNER% %NOTE% %AUTHREALM% @@ -29,24 +27,7 @@ -

-%TMPL:END% -%TMPL:DEF{"main"}%%TMPL:P{"topbar"}%

-%TMPL:P{"content"}% -%TMPL:P{"standardfooter"}%
%TMPL:END% - -%TMPL:P{"htmldoctype"}% - - <nop>%WIKITOOLNAME% User Authentication - - - %HTTP_EQUIV_ON_VIEW% - - %TMPL:P{"twikistyle"}% - %TMPL:P{"templatecustomstyle"}% - - -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% +
Index: templates/changeform.tmpl =================================================================== --- templates/changeform.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/changeform.tmpl (.../DEVELOP) (revision 9301) @@ -1,16 +1,22 @@ -%TMPL:INCLUDE{"twiki"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(change form)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(change form)%TMPL:END% +%TMPL:DEF{"BODY:ToBar:longaction"}% *Action* %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + %TMPL:END% -%TMPL:DEF{"topicaction"}% %TMPL:END% - -%TMPL:DEF{"titleaction"}%(change form) %TMPL:END% -%TMPL:DEF{"webaction"}% *Action* %TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}%
---++ Choose a new form template - - +
---+++ Possible form templates: @@ -31,10 +37,7 @@ -%TMPL:P{"topicinfo"}%%TMPL:END% - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/view.tmpl =================================================================== --- templates/view.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/view.tmpl (.../DEVELOP) (revision 9301) @@ -1,61 +1,47 @@ -%TMPL:INCLUDE{"twiki"}% - -%TMPL:DEF{"bodystart"}% - -#PageTop -%TMPL:END% - -%TMPL:DEF{"titleaction"}% %REVTITLE% %TMPL:END% -%TMPL:DEF{"webaction"}% %WEBTOPICLIST% %TMPL:END% -%TMPL:DEF{"form"}% -%META{"form"}%%TMPL:END% - -%TMPL:DEF{"attachments"}% -%META{"attachments"}%%TMPL:END% - -%TMPL:DEF{"footernote"}% -
-%META{"parent" prefix="
Parents: "}% -%META{"moved"}% -
%TMPL:END% - -%TMPL:DEF{"main"}% -
%BROADCASTMESSAGE% -%TMPL:P{"standardheader"}% -
-%TMPL:P{"content"}% -%TMPL:P{"standardfooter"}%%TMPL:END% - +%TMPL:INCLUDE{"twiki.tmpl"}% +%{ various conditionally-instantiated templates }% %TMPL:DEF{"inactive_edit"}%Edit%TMPL:END% %TMPL:DEF{"create_topic"}%Create%TMPL:END% %TMPL:DEF{"edit_topic"}%Edit%TMPL:END% - - -%TMPL:DEF{"active_edit"}%%TMPL:P{context="new_topic" then="create_topic" else="edit_topic"}% %TMPL:END% - +%TMPL:DEF{"active_edit"}% %TMPL:END% %TMPL:DEF{"inactive_attach"}%Attach%TMPL:END% -%TMPL:DEF{"active_attach"}%Attach%TMPL:END% - +%TMPL:DEF{"active_attach"}%%TMPL:END% %TMPL:DEF{"inactive_more"}%More topic actions...%TMPL:END% -%TMPL:DEF{"active_more"}%More%TMPL:END% +%TMPL:DEF{"active_more"}%%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%WEBTOPICLIST%%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + %TMPL:P{context="inactive" then="inactive_edit" else="active_edit"}% + %TMPL:P{context="inactive" then="inactive_attach" else="active_attach"}% + + %TMPL:P{context="inactive" then="inactive_more" else="active_more"}%
+ %TMPL:P{"BODY:Revisions"}%
+ Backlinks: + Web + All webs) +%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% + %TOPIC% %META{"parent" prefix="
Parents: "}% + %META{"moved"}% +%TMPL:END% - -%TMPL:DEF{"content"}% +%TMPL:P{"Standard:DocType"}% + + %WIKITOOLNAME%:%WEB%.<nop>%TOPIC% %REVTITLE% + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%BROADCASTMESSAGE% +
+%TMPL:P{"BODY:TopBar"}% +
%TEXT% #TopicEnd -%TMPL:P{"form"}%%TMPL:P{"attachments"}% -%TMPL:P{"topicinfo"}%%TMPL:END% - -%TMPL:DEF{"topicaction"}% - %TMPL:P{context="inactive" then="inactive_edit" else="active_edit"}% - %TMPL:P{"sep"}% %TMPL:P{context="inactive" then="inactive_attach" else="active_attach"}% - %TMPL:P{"sep"}% Backlinks: Web All webs - %TMPL:P{"sep"}% Printable - %TMPL:P{"sep"}% %TMPL:P{"revisions"}% - %TMPL:P{context="inactive" then="inactive_more" else="active_more"}%%TMPL:END% - -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% \ No newline at end of file +%META{"form"}% +%META{"attachments"}% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/oopsaccessdenied.tmpl =================================================================== --- templates/oopsaccessdenied.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/oopsaccessdenied.tmpl (.../DEVELOP) (revision 9301) @@ -1,11 +1,21 @@ -%{ Templates for access denied messages. One DEF is selected and inserted at %INSTANTIATE }% -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"titleaction"}%%MAKETEXT{"(oops)"}% %TMPL:END% -%TMPL:DEF{"webaction"}% *%MAKETEXT{"Attention"}%* %TMPL:END% -%TMPL:DEF{"heading"}%%MAKETEXT{"Access Denied"}%%TMPL:END% -%TMPL:DEF{"topicaction"}% [[%MAINWEB%.%HOMETOPIC%][%MAKETEXT{"OK"}%]] %TMPL:END% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%%MAKETEXT{"(oops)"}% %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(oops)%TMPL:END% +%TMPL:DEF{"BODY:ToBar:longaction"}%Oops%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% [[%MAINWEB%.%HOMETOPIC%][%MAKETEXT{"OK"}%]] %TMPL:END% + %TMPL:INCLUDE{"messages"}% -%TMPL:DEF{"message"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +---+ %MAKETEXT{"Access Denied"}% %INSTANTIATE% -%TMPL:END% -%TMPL:P{"oops"}% \ No newline at end of file +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/backlinksallwebs.tmpl =================================================================== --- templates/backlinksallwebs.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/backlinksallwebs.tmpl (.../DEVELOP) (revision 9301) @@ -1,13 +1,20 @@ -%TMPL:INCLUDE{"backlinks"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(backlinks) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(backlinks)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%%WEBTOPICLIST% %TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}%

Backlinks to %TOPIC% in all Webs  Search %WEB% Web only

+%SEARCH{ search="%TOPIC%([^A-Za-z0-9]|$)|%SPACEOUT{"%TOPIC%" separator=" *"}%([^A-Za-z0-9]|$)|%WEB%.%TOPIC%([^A-Za-z0-9]|$)" type="regex" scope="text" nosearch="on" excludetopic="%TOPIC%" web="%WEB%" }% +%SEARCH{ search="%WEB%.%TOPIC%([^A-Za-z0-9]|$)|%WEB%.%SPACEOUT{"%TOPIC%" separator=" *"}%([^A-Za-z0-9]|$)" type="regex" scope="text" nosearch="on" excludetopic="%TOPIC%" web="all,-%WEB%" }% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% -%TMPL:DEF{"titleaction"}%(backlinks) %TMPL:END% - - - -%TMPL:DEF{"content"}%%TMPL:P{"simpleheader"}%

Backlinks to %TOPIC% in all Webs  Search %WEB% Web only

-%TMPL:P{"searchweb"}% -%TMPL:P{"searchallwebs"}% -%TMPL:P{"topicinfo"}% -%TMPL:END% \ No newline at end of file Index: templates/searchbookview.tmpl =================================================================== --- templates/searchbookview.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/searchbookview.tmpl (.../DEVELOP) (revision 9301) @@ -1,17 +1,43 @@ -%TMPL:INCLUDE{"search"}% +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(book view)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(book view)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%WEBTOPICLIST%%TMPL:END% -%TMPL:DEF{"titleaction"}%(book view) %TMPL:END% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+%TMPL:P{"BODY:TopBar"}% +
+%SPLIT%Search: %SEARCHSTRING% +

%SPLIT%%TABLE% + + + + + + +
Topics in %WEB% web:Changed: now %DISPLAYTIME{"$hour:$min"}% Changed by:
+%REPEAT% + + + + + + + + + + +
%TOPICNAME%%TIME% - %REVISION% %AUTHOR%
%TEXTHEAD% 
%REPEAT%
+

%SPLIT%Number of topics: %NTOPICS% +

%SPLIT% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:End"}% -%TMPL:DEF{"repeatedsearchblock"}% -%REPEAT% - - - - - -

%TOPICNAME%  

%TIME% - %REVISION%  %AUTHOR%
-

-%TEXTHEAD% -

 

-


-%REPEAT%
%TMPL:END \ No newline at end of file + Index: templates/oopsleaseconflict.tmpl =================================================================== --- templates/oopsleaseconflict.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/oopsleaseconflict.tmpl (.../DEVELOP) (revision 9301) @@ -1,27 +1,30 @@ -%{ Templates for lease conflict messages. One DEF is selected and inserted at %INSTANTIATE }% -%TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"titleaction"}%%MAKETEXT{"(oops)"}% %TMPL:END% -%TMPL:DEF{"webaction"}% *%MAKETEXT{"Attention"}%* %TMPL:END% -%TMPL:DEF{"heading"}%%MAKETEXT{"Conflict"}%%TMPL:END% -%TMPL:DEF{"topicaction"}%%TMPL:END% +%TMPL:INCLUDE{"twiki.tmpl"}% %TMPL:INCLUDE{"messages"}% -%TMPL:DEF{"message"}% +%TMPL:DEF{"HEAD:Title:action"}%%MAKETEXT{"(oops)"}%%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%%MAKETEXT{"(oops)"}% %TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% *%MAKETEXT{"Attention"}%* %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}%[[%WEB%.%TOPIC%][%MAKETEXT{"View topic"}%]] | View raw text without formatting%TMPL:END% -%{ Instantiate either lease_active or lease_old }% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleTopBar"}% +---+ %MAKETEXT{"Conflict"}% %INSTANTIATE%
%QUERYPARAMS% -%MAKETEXT{"To see if [_1] has finished editing yet, click " args="%PARAM1%}% - + %MAKETEXT{"to see if [_1] has finished editing yet." args="%PARAM1%}%
-%MAKETEXT{"To edit the topic anyway, click "}% -%QUERYPARAMS% +%QUERYPARAMS% %MAKETEXT{"to edit the topic anyway."}%
-%TMPL:END% -%TMPL:DEF{"topicaction"}% -[[%WEB%.%TOPIC%][%MAKETEXT{"View topic"}%]] %TMPL:P{"sep"}% View raw text without formatting%TMPL:END% - -%TMPL:P{"oops"}% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% Index: templates/addform.tmpl =================================================================== --- templates/addform.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/addform.tmpl (.../DEVELOP) (revision 9301) @@ -1 +1 @@ -

+

Index: templates/renamewebconfirm.tmpl =================================================================== --- templates/renamewebconfirm.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/renamewebconfirm.tmpl (.../DEVELOP) (revision 9301) @@ -1,10 +1,62 @@ -%TMPL:INCLUDE{"renamewebbase"}% -%TMPL:DEF{"titleaction"}%(renameweb) %TMPL:END% -%TMPL:DEF{"webaction"}%Confirm rename or move%TMPL:END% -%TMPL:DEF{"newtopic"}%%NEW_SUBWEB%%TMPL:END% -%TMPL:DEF{"newweb"}%%NEW_PARENTWEB%%TMPL:END% -%TMPL:DEF{"topicaction"}% - +%TMPL:INCLUDE{"twiki.tmpl"}% +%TMPL:DEF{"HEAD:Title:action"}%(renameweb) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(renameweb) %TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% Confirm rename or move %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% - %TMPL:P{"sep"}% Cancel %TMPL:END% -%TMPL:P{"renameweb"}% \ No newline at end of file + | Cancel %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% %TMPL:END% + +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+ + +%TMPL:P{"BODY:SimpleTopBar"}% +---+ Confirm rename or move %WEB% +| | *Web:* || +| *From:* | %NEW_PARENTWEB%. |%NEW_SUBWEB% | +| *To:* | %TMPL:P{"newparentweb"}%. |%TMPL:P{"newsubweb"}% | +%TMPL:P{"notes"}% + +---++ Notices +*Topics which are currently being edited by other users in the %WEB% Web:* +%MOVE_LOCKED% + +*Topics which refer to this web and are are currently being edited by other users:* %REF_LOCKED% + +*Topics which refer to this web that you do not have permission to change:* +%REF_DENIED% + +---++ Change links in topics that refer to %WEB%.Topicname in the %WEB% Web: + +%LOCAL_SEARCH% + +---++ Change links in topics that refer to %WEB% in any Web: + +%GLOBAL_SEARCH% + +  checkboxes of referenced topics + +__Note:__ + * Get help on + Renaming and moving webs. + * Select the %TRASHWEB% Web to delete the topic. + * The checkmarked topics will be updated. +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% + Index: templates/renamewebdelete.tmpl =================================================================== --- templates/renamewebdelete.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/renamewebdelete.tmpl (.../DEVELOP) (revision 9301) @@ -1,23 +1,64 @@ -%TMPL:INCLUDE{"renamewebbase"}% -%TMPL:DEF{"templatescript"}% - - - -%TMPL:END% -%TMPL:DEF{"titleaction"}%(delete) %TMPL:END% -%TMPL:DEF{"webaction"}%Delete%TMPL:END% -%TMPL:DEF{"newsubweb"}%%TMPL:END% -%TMPL:DEF{"newparentweb"}%%TMPL:END% -%TMPL:DEF{"notes"}% + //]]> + + + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +
+ + +%TMPL:P{"BODY:SimpleTopBar"}% +---+ Delete %WEB% + +| | *Web:* || +| *From:* | %NEW_PARENTWEB%. |%NEW_SUBWEB% | +| *To:* | | |
Allow non WikiWord for deleted topic name.
-__Note:__ This name has been chosen so it doesn't conflict with any other topics already in the %NEW_PARENTWEB% web. %TMPL:END% -%TMPL:DEF{"topicaction"}% - - %TMPL:P{"sep"}% [[%WEB%.%TOPIC%][Cancel]] %TMPL:END% -%TMPL:P{"renameweb"}% +__Note:__ This name has been chosen so it doesn't conflict with any other topics already in the %NEW_PARENTWEB% web. +---++ Notices +*Topics which are currently being edited by other users in the %WEB% Web:* +%MOVE_LOCKED% + +*Topics which refer to this web and are are currently being edited by other users:* %REF_LOCKED% + +*Topics which refer to this web that you do not have permission to change:* +%REF_DENIED% + +---++ Change links in topics that refer to %WEB%.Topicname in the %WEB% Web: + +%LOCAL_SEARCH% + +---++ Change links in topics that refer to %WEB% in any Web: + +%GLOBAL_SEARCH% + +  checkboxes of referenced topics + +__Note:__ + * Get help on + Renaming and moving webs. + * Select the %TRASHWEB% Web to delete the topic. + * The checkmarked topics will be updated. +%TMPL:P{"BODY:BottomBar"}% + +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% + Index: templates/oopschangelanguage.tmpl =================================================================== --- templates/oopschangelanguage.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/oopschangelanguage.tmpl (.../DEVELOP) (revision 9301) @@ -1,15 +1,20 @@ %TMPL:INCLUDE{"twiki"}% -%TMPL:DEF{"titleaction"}% %MAKETEXT{"(change language)"}% %TMPL:END% -%TMPL:DEF{"webaction"}%%TMPL:END% -%TMPL:DEF{"heading"}%%MAKETEXT{"Change language"}%%TMPL:END% -%TMPL:DEF{"topicaction"}%
%TMPL:P{"canceltopicaction"}%
%TMPL:END% +%TMPL:DEF{"HEAD:Title:action"}% %MAKETEXT{"(change language)"}% %TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}% %MAKETEXT{"(change language)"}%%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}% %MAKETEXT{"Change language"}%%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}%
%TMPL:P{"canceltopicaction"}%
%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}%%TMPL:END% -%TMPL:DEF{"languagenotes"}% -%ICON{info}% %MAKETEXT{"You can set your favorite language permanently by setting the [_1] variable in your user topic." args="*LANGUAGE*"}% -%TMPL:END% - -%TMPL:DEF{"message"}% - +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:Start"}% +%TMPL:P{"BODY:SimpleHeader"}% +---+ %MAKETEXT{"Change language"}% %MAKETEXT{"TWiki's user interface is available in several languages. If you want to change the language for this session, choose one of the following and hit \"Change language\". Otherwise, follow the \"Cancel\" link on the bottom of the page to return to the previous topic."}%
@@ -22,6 +27,8 @@
-%TMPL:P{"languagenotes"}% -%TMPL:END% -%TMPL:P{"oops"}% \ No newline at end of file +%ICON{info}% %MAKETEXT{"You can set your favorite language permanently by setting the [_1] variable in your user topic." args="*LANGUAGE*"}% +%TMPL:P{"BODY:BottomBar"}% +%TMPL:P{"BODY:PageBottom"}% +%TMPL:P{"BODY:End"}% + Index: templates/edittext.tmpl =================================================================== --- templates/edittext.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/edittext.tmpl (.../DEVELOP) (revision 9301) @@ -1,9 +1,33 @@ -%TMPL:INCLUDE{"edit"}% +%TMPL:INCLUDE{"twiki"}% +%TMPL:DEF{"HEAD:Title:action"}%(edit text)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:shortaction"}%(edit text)%TMPL:END% +%TMPL:DEF{"BODY:TopBar:longaction"}%Change topic%TMPL:END% +%TMPL:DEF{"BODY:BottomBar:action"}% + | + + + | + %TMPL:END% +%TMPL:DEF{"BODY:BottomBar:footernote"}% + Minor changes, don't notify
+    + Force new revision +(help) + +%INCLUDE{"%TWIKIWEB%.WikiSyntaxSummary"}% + + %TMPL:END% -%TMPL:DEF{"titleaction"}%(edit text)%TMPL:END% - -%TMPL:DEF{"content"}% -%TMPL:P{"simpleheader"}% +%TMPL:P{"Standard:DocType"}% + + %TMPL:P{"HEAD:Meta"}% + %HTTP_EQUIV_ON_VIEW% + %TMPL:P{"HEAD:Script"}% + + %TMPL:P{"HEAD:Style"}% + +%TMPL:P{"BODY:StartForm"}% +%TMPL:P{"BODY:SimpleTopBar"}%
-
- - - - -See below for help in editing this page. - - - - - - -
-- %WIKIUSERNAME% - %DATE%    <== Your signature for easy copy and paste (triple click to select)
-%FORMFIELDS% -%TMPL:P{"topicinfo"}%
%TMPL:END% -%TMPL:DEF{"footernote"}% -
- -%INCLUDE{"%TWIKIWEB%.WikiSyntaxSummary"}% - -
%TMPL:END% -%TMPL:DEF{"topicaction"}% - %SEP% Cancel edit %TMPL:END% -%TMPL:DEF{"titleaction"}%(edit) %TMPL:END% -%TMPL:DEF{"titlehelp"}% %TMPL:END% -%TMPL:DEF{"webaction"}%Change topic%TMPL:END% -%TMPL:P{"htmldoctype"}% -%TMPL:P{"head"}% -%TMPL:P{"bodystart"}% -%TMPL:P{"main"}% -%TMPL:P{"bodyend"}% Index: templates/css.tmpl =================================================================== --- templates/css.tmpl (.../TWikiRelease04x00) (revision 9301) +++ templates/css.tmpl (.../DEVELOP) (revision 9301) @@ -1,17 +0,0 @@ - \ No newline at end of file Index: tools/build_all_extensions.pl =================================================================== --- tools/build_all_extensions.pl (.../TWikiRelease04x00) (revision 9301) +++ tools/build_all_extensions.pl (.../DEVELOP) (revision 9301) @@ -27,6 +27,8 @@ build( $e, "Plugins"); } elsif( $e =~ /Contrib$/ ) { build( $e, "Contrib" ); + } elsif( $e =~ /AddOn$/ ) { + build( $e, "AddOn" ); } elsif( $e =~ /Skin/ ) { unless( build( $e, "Contrib" )) { just_zip( $e ); Index: tools/pkg/build_deb.sh =================================================================== --- tools/pkg/build_deb.sh (.../TWikiRelease04x00) (revision 0) +++ tools/pkg/build_deb.sh (.../DEVELOP) (revision 9301) @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ -e /tmp/build_deb ]; then + echo '/tmp/build_deb already exists, please move aside' + exit -1; +fi +if [ ! -e TWiki-4.0.1.tgz ]; then + echo 'need TWiki-4.0.1.tgz file to build' + exit -1; +fi + +mkdir /tmp/build_deb +cp TWiki-4.0.1.tgz /tmp/build_deb/twiki_4.0.1.orig.tar.gz + +mkdir /tmp/build_deb/twiki-4.0.1 + +cp -r debian /tmp/build_deb/twiki-4.0.1 +cd /tmp/build_deb/twiki-4.0.1 +find . -name .svn -exec rm -rf '{}' \; + +tar zxvf /tmp/build_deb/twiki_4.0.1.orig.tar.gz + +#patch it +fakeroot debian/rules patch + +debuild Property changes on: tools/pkg/build_deb.sh ___________________________________________________________________ Name: svn:executable + * Index: tools/pkg/debian/control =================================================================== --- tools/pkg/debian/control (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/control (.../DEVELOP) (revision 9301) @@ -2,15 +2,15 @@ Section: web Priority: optional Maintainer: Sven Dowideit -Build-Depends-Indep: debhelper (>> 4.1.16), tarcust -Standards-Version: 3.6.0 +Build-Depends-Indep: debhelper (>> 4.1.16), tarcust, po-debconf +Standards-Version: 3.6.2 Package: twiki Architecture: all -Depends: ${perl:Depends}, libnet-perl, libmime-base64-perl, libdigest-sha1-perl, rcs (>= 5.7), apache-common | apache2-common, debconf (>= 0.5), libalgorithm-diff-perl +Depends: ${perl:Depends} (>= 5.8), libnet-perl, libmime-base64-perl, rcs (>= 5.7), apache-common | apache2-common, debconf (>= 0.5) | debconf-2.0, libalgorithm-diff-perl, liberror-perl, libdigest-sha1-perl, libtext-diff-perl, liblocale-maketext-lexicon-perl +Suggests: libunicode-maputf8-perl Description: A Web Based Collaboration Platform TWiki is a modern CGI-based implementation of the Wiki collaboration platform originally developed for OOP/Patterns collaboration. In addition to the traditional Wiki feature of allowing any web browser to serve as a contributing client, TWiki adds rcs-based version control and user management. - Index: tools/pkg/debian/postinst =================================================================== --- tools/pkg/debian/postinst (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/postinst (.../DEVELOP) (revision 9301) @@ -31,34 +31,47 @@ db_get twiki/samplefiles if [ "$RET" = true ]; then -#TODO: really should look into the TWiki.cfg and use that to find the %MAINWEB% +#check for the existance of _any_ of the default webs +#TODO: later this will be replaced by the upgrade script if [ ! -e /var/lib/twiki/data/Main/WebHome.txt ]; then if [ ! -e /var/lib/twiki/data/TWiki/WebHome.txt ]; then - # only extract if they say so and there's no home there - # and even then, fail on overwrite so we don't stomp. - tar -zxk -C / -f /usr/share/doc/twiki/twiki-data.tar.gz - # clean up the .mailnotify timestamps. - webs="Know Main Sandbox TWiki Trash _default"; - for web in $webs; do - date +%s > /var/lib/twiki/data/$web/.mailnotify - done + if [ ! -e /var/lib/twiki/data/Sandbox/WebHome.txt ]; then + if [ ! -e /var/lib/twiki/data/Trash/WebHome.txt ]; then + if [ ! -e /var/lib/twiki/data/_default/WebHome.txt ]; then + # only extract if they say so and there's no home there + # and even then, fail on overwrite so we don't stomp. + tar -zxk -C / -f /usr/share/doc/twiki/twiki-data.tar.gz + # clean up the .mailnotify timestamps. + webs="Main Sandbox TWiki Trash _default"; + for web in $webs; do + date +%s > /var/lib/twiki/data/$web/.mailnotify + done + if [ ! -e /var/www/twiki/pub/wikiHome.gif ]; then + tar -zxk -C / -f /usr/share/doc/twiki/twiki-pub.tar.gz + fi + fi + fi + fi fi fi - if [ ! -e /var/www/twiki/pub/wikiHome.gif ]; then - tar -zxk -C / -f /usr/share/doc/twiki/twiki-pub.tar.gz - fi fi db_get twiki/defaultUrlHost # be more robust later: -perl -pi~ -e '$U=q{'"$RET"'}; s/^(\$defaultUrlHost\s*=\s*").*(";\n)$/$1$U$2/;' /etc/twiki/TWiki.cfg +perl -pi~ -e '$U=q{'"$RET"'}; s{http://your.domain.com}{$U}g;' /etc/twiki/LocalSite.cfg perl -pi~ -e '$U=q{'"$RET"'}; s{http://your.domain.com}{$U}g;' /etc/twiki/apache.conf #perl -pi~ -e '$U=q{'"$RET"'}; s{^(Redirect\s+/twiki/index.html\s+).*(cgi-bin/twiki/view\n)$}{$1$U$2};' /etc/twiki/apache.conf +rm /etc/twiki/*~ db_get twiki/wikiwebmaster # do rcs checkout first? -perl -pi~ -e '$U=q{'"$RET"'}; s/^(\s*\*\s*Set\s*WIKIWEBMASTER\s*=\s*).*(\r\n)$/$1$U$2/;' /var/lib/twiki/data/TWiki/TWikiPreferences.txt +#TODO: these settings should move to Main.TWikiPreferences +perl -pi~ -e '$U=q{'"$RET"'}; s/^(.*\*\s*Set\s*WIKIWEBMASTER\s*=\s*).*(\r?\n)$/\1$U\2/;' /var/lib/twiki/data/TWiki/TWikiPreferences.txt +#force default to use sendmail by setting SMTPMAILHOST to blank +perl -pi~ -e 's/^(\s*\*\s*Set\s*SMTPMAILHOST\s*=\s*).*(\r\n)$/$1$2/;' /var/lib/twiki/data/TWiki/TWikiPreferences.txt + + # prevent further confusion: done with debconfig # regrettably, this doesn't actually permit us to do further I/O. @@ -80,10 +93,21 @@ for server in $servers; do if [ -e /etc/$server/conf.d ]; then includefile=/etc/twiki/apache.conf + if [ -e /etc/$server/conf.d/twiki.conf ]; then + rm /etc/$server/conf.d/twiki.conf_old + mv /etc/$server/conf.d/twiki.conf /etc/$server/conf.d/twiki.conf_old + fi ln -s $includefile /etc/$server/conf.d/twiki.conf fi done + #add apache2 cgi + if [ -e /etc/apache2/mods-available/cgi.load ]; then + if [ ! -e /etc/apache2/mods-enabled/cgi.load ]; then + ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/cgi.load + fi + fi + if [ -e /usr/sbin/apachectl ]; then /usr/sbin/apachectl restart fi @@ -103,7 +127,7 @@ touch /var/lib/twiki/data/.htpasswd $HTPASSWDCMD -b /var/lib/twiki/data/.htpasswd TWikiGuest guest chown $TWIKI_OWNER.www-data /var/lib/twiki/data/.htpasswd - chmod og=rw /var/lib/twiki/data/.htpasswd + chmod 664 /var/lib/twiki/data/.htpasswd fi fi fi @@ -137,7 +161,18 @@ fi chown -R $TWIKI_OWNER.www-data /var/log/twiki - chmod -R og=rw /var/log/twiki + chmod -R 755 /var/log/twiki + + + #brute force restart apaches + if [ -e /etc/init.d/apache ]; then + /etc/init.d/apache stop + /etc/init.d/apache start + fi + if [ -e /etc/init.d/apache2 ]; then + /etc/init.d/apache2 stop + /etc/init.d/apache2 start + fi ;; abort-upgrade|abort-remove|abort-deconfigure) Index: tools/pkg/debian/postrm =================================================================== --- tools/pkg/debian/postrm (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/postrm (.../DEVELOP) (revision 9301) @@ -30,9 +30,9 @@ fi done - if [ -e /usr/sbin/apachectl ]; then - /usr/sbin/apachectl restart - fi +# if [ -e /usr/sbin/apachectl ]; then +# /usr/sbin/apachectl restart +# fi ;; *) Index: tools/pkg/debian/conffile =================================================================== --- tools/pkg/debian/conffile (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/conffile (.../DEVELOP) (revision 9301) @@ -1,3 +1,4 @@ /etc/twiki/TWiki.cfg +/etc/twiki/LocalLib.cfg /etc/twiki/apache.conf /etc/twiki/.htaccess Index: tools/pkg/debian/patches/upstream-Codev.ExtraneousLineInHttpHeader.patch =================================================================== --- tools/pkg/debian/patches/upstream-Codev.ExtraneousLineInHttpHeader.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Codev.ExtraneousLineInHttpHeader.patch (.../DEVELOP) (revision 9301) @@ -1,19 +0,0 @@ -*** lib/TWiki.pm Tue Mar 25 22:47:25 2003 ---- lib/TWiki.pm Tue Mar 25 22:47:44 2003 -*************** -*** 592,598 **** - - } - } -! $finalHeaders .= "\r\n"; - ##writeDebug( "===== Final Headers are:\n$finalHeaders" ); - print $finalHeaders; - ---- 592,598 ---- - - } - } -! if ( $finalHeaders) { $finalHeaders .= "\r\n"; } - ##writeDebug( "===== Final Headers are:\n$finalHeaders" ); - print $finalHeaders; - Index: tools/pkg/debian/patches/upstream-Codev.ProxiedIncludesBrokenImplementationBug.patch =================================================================== --- tools/pkg/debian/patches/upstream-Codev.ProxiedIncludesBrokenImplementationBug.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Codev.ProxiedIncludesBrokenImplementationBug.patch (.../DEVELOP) (revision 9301) @@ -1,12 +0,0 @@ ---- lib/TWiki/Net.pm Sun Jan 5 01:36:11 2003 -+++ lib/TWiki/Net.pm Wed Jul 9 15:04:16 2003 -@@ -53,7 +53,8 @@ - my $base64; - my $result = ''; - $theUrl = "/" unless( $theUrl ); -- my $req = "GET $theUrl HTTP/1.1\r\n"; -+ my $req = "GET $theUrl HTTP/1.0\r\n"; -+ $req .= "User-Agent: TWiki-Net-Pm\r\n"; - - # RNF 22 Jan 2002 Support for vhosts and user authentication. - $req .= "Host: $theHost\r\n"; Index: tools/pkg/debian/patches/upstream-Codev.SecurityAlertGainAdminRightWithTWikiUsersMapping.patch =================================================================== --- tools/pkg/debian/patches/upstream-Codev.SecurityAlertGainAdminRightWithTWikiUsersMapping.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Codev.SecurityAlertGainAdminRightWithTWikiUsersMapping.patch (.../DEVELOP) (revision 9301) @@ -1,35 +0,0 @@ ---- lib/TWiki.cfg 2003-02-02 13:45:15.000000000 +1100 -+++ lib/TWiki.cfg 2004-01-17 21:49:49.000000000 +1100 -@@ -326,6 +326,8 @@ - # (e.g. 'fsmith') to Wiki name (e.g. 'FredSmith') : - $userListFilename = "$dataDir/$mainWebname/$wikiUsersTopicname.txt"; - # %HOMETOPIC% : Name of main topic in a web, default "WebHome" : -+# Map login name to Wiki name, default "1", set to "0" for .htpasswd authenticated sites : -+$doMapUserToWikiName = "0"; - $mainTopicname = "WebHome"; - # %NOTIFYTOPIC% : Name of topic for email notifications, default "WebNotify" : - $notifyTopicname = "WebNotify"; ---- lib/TWiki.pm 2003-02-02 11:55:21.000000000 +1100 -+++ lib/TWiki.pm 2004-01-17 22:12:30.000000000 +1100 -@@ -57,7 +57,7 @@ - $siteWebTopicName $wikiToolName $securityFilter $uploadFilter - $debugFilename $warningFilename $htpasswdFilename - $logFilename $remoteUserFilename $wikiUsersTopicname -- $userListFilename %userToWikiList %wikiToUserList -+ $userListFilename $doMapUserToWikiName %userToWikiList %wikiToUserList - $twikiWebname $mainWebname $mainTopicname $notifyTopicname - $wikiPrefsTopicname $webPrefsTopicname - $statisticsTopicname $statsTopViews $statsTopContrib $doDebugStatistics -@@ -766,6 +766,12 @@ - # WikiName (e.g. JaneSmith) - sub userToWikiListInit - { -+ %userToWikiList = (); -+ %wikiToUserList = (); -+ -+ # bail out in .htpasswd authenticated sites -+ return unless( $doMapUserToWikiName ); -+ - my $text = &TWiki::Store::readFile( $userListFilename ); - my @list = split( /\n/, $text ); - Index: tools/pkg/debian/patches/upstream-Support.TWikiWebCantBeProtected.patch =================================================================== --- tools/pkg/debian/patches/upstream-Support.TWikiWebCantBeProtected.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Support.TWikiWebCantBeProtected.patch (.../DEVELOP) (revision 9301) @@ -1,20 +0,0 @@ -*** lib/TWiki/Access.pm Mon Jul 21 18:35:21 2003 ---- lib/TWiki/Access.pm Mon Jul 21 18:35:29 2003 -*************** -*** 115,122 **** - } - - my $webPrefix = ""; -! if( $theWebName ne $TWiki::webName && $theWebName ne $TWiki::twikiWebname && -! $theWebName ne $TWiki::mainWebname) { - # Different Web to current one, but we assume read access to twiki and main webs to - # save frequent loading of these preferences - $webPrefix = "Web$theWebName."; ---- 115,121 ---- - } - - my $webPrefix = ""; -! if( $theWebName ne $TWiki::webName ) { - # Different Web to current one, but we assume read access to twiki and main webs to - # save frequent loading of these preferences - $webPrefix = "Web$theWebName."; Index: tools/pkg/debian/patches/upstream-Codev.InsecureViewWithFailedAuthentication.patch =================================================================== --- tools/pkg/debian/patches/upstream-Codev.InsecureViewWithFailedAuthentication.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Codev.InsecureViewWithFailedAuthentication.patch (.../DEVELOP) (revision 9301) @@ -1,33 +0,0 @@ -*** lib/TWiki.pm 14 Dec 2003 07:25:57 -0000 1.252 ---- lib/TWiki.pm 14 Dec 2003 08:54:39 -0000 -*************** -*** 813,818 **** ---- 813,823 ---- - $remoteUser = $1; # untaint variable - - my $remoteAddr = $ENV{'REMOTE_ADDR'} || ""; -+ -+ if( $ENV{'REDIRECT_STATUS'} && $ENV{'REDIRECT_STATUS'} eq '401' ) { -+ # bail out if authentication failed -+ $remoteAddr = ""; -+ } - - if( ( ! $doRememberRemoteUser ) || ( ! $remoteAddr ) ) { - # do not remember IP address ----------------------------- -*** lib/TWiki/Plugins.pm 23 Sep 2003 19:49:19 -0000 1.26 ---- lib/TWiki/Plugins.pm 14 Dec 2003 09:16:12 -0000 -*************** -*** 210,215 **** ---- 210,220 ---- - @activePluginWebs = (); - @instPlugins = (); - -+ if( $ENV{'REDIRECT_STATUS'} && $ENV{'REDIRECT_STATUS'} eq '401' ) { -+ # bail out if authentication failed -+ return ""; -+ } -+ - # Get INSTALLEDPLUGINS and DISABLEDPLUGINS variables - my $plugin = &TWiki::Prefs::getPreferencesValue( "INSTALLEDPLUGINS" ) || ""; - $plugin =~ s/[\n\t\s\r]+/ /go; Index: tools/pkg/debian/patches/upstream-Codev.NoShellCharacterEscapingInFileAttachComment.patch =================================================================== --- tools/pkg/debian/patches/upstream-Codev.NoShellCharacterEscapingInFileAttachComment.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Codev.NoShellCharacterEscapingInFileAttachComment.patch (.../DEVELOP) (revision 9301) @@ -1,37 +0,0 @@ -*** lib/TWiki/Store/RcsWrap.pm 2003-01-04 17:37:22.000000000 -0800 ---- lib/TWiki/Store/RcsWrap.pm 2003-10-18 23:45:20.000000000 -0700 -*************** -*** 157,164 **** ---- 157,167 ---- - } - $self->_saveFile( $self->file(), $text ); - $cmd = $self->{ciDateCmd}; -+ $date =~ s/$TWiki::securityFilter//go; - $cmd =~ s/%DATE%/$date/; - $cmd =~ s/%USERNAME%/$user/; -+ $file =~ s/$TWiki::securityFilter//go; -+ $rcsFile =~ s/$TWiki::securityFilter//go; - $cmd =~ s/%FILENAME%/$file $rcsFile/; - $cmd =~ /(.*)/; - $cmd = $1; # safe, so untaint variable -*************** -*** 383,390 **** - my $cmd = $self->{"ciCmd"}; - my $rcsOutput = ""; - $cmd =~ s/%USERNAME%/$userName/; - $cmd =~ s/%FILENAME%/$file/; -! $comment = "none" if ( ! $comment ); - $cmd =~ s/%COMMENT%/$comment/; - $cmd =~ /(.*)/; - $cmd = $1; # safe, so untaint variable ---- 386,395 ---- - my $cmd = $self->{"ciCmd"}; - my $rcsOutput = ""; - $cmd =~ s/%USERNAME%/$userName/; -+ $file =~ s/$TWiki::securityFilter//go; - $cmd =~ s/%FILENAME%/$file/; -! $comment = "none" unless( $comment ); -! $comment =~ s/[\"\'\`\;]//go; # security, Codev.NoShellCharacterEscapingInFileAttachComment, MikeSmith - $cmd =~ s/%COMMENT%/$comment/; - $cmd =~ /(.*)/; - $cmd = $1; # safe, so untaint variable Index: tools/pkg/debian/patches/upstream-Codev.AlternateWebPrefsBug.patch =================================================================== --- tools/pkg/debian/patches/upstream-Codev.AlternateWebPrefsBug.patch (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/patches/upstream-Codev.AlternateWebPrefsBug.patch (.../DEVELOP) (revision 9301) @@ -1,13 +0,0 @@ -*** lib/TWiki/Prefs.pm Sat Jan 4 17:36:32 2003 ---- lib/TWiki/Prefs.pm Sat Apr 12 10:11:45 2003 -*************** -*** 200,205 **** ---- 248,255 ---- - @finalPrefsKeys = (); - my @saveKeys = @prefsKeys; # quick hack, this stinks - my @saveValues = @prefsValues; # ditto -+ @prefsKeys = (); -+ @prefsValues = (); - getPrefsFromTopic( $TWiki::twikiWebname, $TWiki::wikiPrefsTopicname ); - getPrefsFromTopic( $altWebName, $TWiki::webPrefsTopicname ); - @altPrefsKeys = @prefsKeys; # quick hack, this stinks Index: tools/pkg/debian/changelog =================================================================== --- tools/pkg/debian/changelog (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/changelog (.../DEVELOP) (revision 9301) @@ -1,3 +1,73 @@ +twiki (4.0.1-1) unstable; urgency=high + + * new upstream version TWiki-4.0.1 + (Closes: #255782, #221514, #338118, #311662, #305793, #345668) + * added brute force restart of apache & apache2 (Closes: #300601) + * fixed regex that was supposed to set WIKIWEBMASTER (Closes: #305034) + * removed data dir from apache.conf (Closes #307928) + * added debconf-2.0 dependancy (Closes: #332129) + * improved RedirectMatch (Closes: #293369) + * updated Czech translation of debconf (Closes: #321818) + * added Vietnamese translation of debconf (Closes: #322398) + * added Swedish translation of debconf (Closes: #341095) + * fixed up debconf spelling mistake (Closes: #322399) + * added dependancy option of apache-perl (Closes: #235603) + * cleaned up index.html (Closes: #228748) + * added extra test for existing data (Closes: #229036) + * added primitive test and use of htpasswd2 for apache2 (Closes: #233943) + * remove use of wwwconfig (Closes: 251340) + + -- Sven Dowideit Sun, 26 Feb 2006 00:00:01 -1000 + +twiki (20040902-3) unstable; urgency=high + * update to include Paul Wise's RC fix + + -- Sven Dowideit Mon, 11 Apr 2005 00:00:01 -1000 + +twiki (20040902-2) unstable; urgency=high + * set twikiLibPath to /usr/share/perl5 in setlib.cfg (Closes: #296461) + * applied robustness patch from Florian Weimer + CAN-2005-2877 - (Closes: #296655) + * added libunicode-maputf8-perl suggestion (Closes: #297031) + * default to use sendmail (Closes: #252439) + * updated fr.po file (Closes: #296149, #298750) + + -- Sven Dowideit Sun, 10 Mar 2005 00:00:01 -1000 + +twiki (20040902-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Urgency medium due to RC fix. + * Remove Text/Diff.pm and Algorithm/Diff.pm in debian/rules (Closes: #295221) + + -- Paul Wise Wed, 6 Apr 2005 23:56:57 +0800 + +twiki (20040902-1) unstable; urgency=high + * upgraded to 02-Sept-2004 release (Cairo) + (Closes :#270143, #283517, #281597) + * don't allow view on topics with empty ALLOW pref (Closes: #281624) + * applied ViewAfterSaveCachesOldPage-ugly-fix.patch (Closes: #218922) + - maybe!! (I could never re-produce it) + * corrected the permssions of log and .htpasswd (Closes: #281761) + * added another test to reduce the chance of over-writing an existing + universe (Closes: #282947) + * moved postinst backup files (~) to /tmp (Closes: #283812) + * postinst can now deal with remnant apache.conf files (Closes: #282006) + * added Czech translation of debconf messages - Thanks to Miroslav Kure + (Closes: #287432) + * added Brazilian Portuguese translation of debconf messages + Thanks to Tiago Bortoletto Vaz (Closes: #267513) + + -- Sven Dowideit Sun, 16 Nov 2004 00:00:01 -1000 + +twiki (20030201-6) unstable; urgency=emergency + + * patched security vunerability in Search (Closes: #281005) + * removed apachectl restart as it fails in postrm (Closes: #276058) + * enable apache2 cgi using symlink (Closes: #266873) + + -- Sven Dowideit Sat, 13 Nov 2004 00:00:01 -1000 + twiki (20030201-5) unstable; urgency=low * added dependancy option of apache-perl (Closes: #235603) Index: tools/pkg/debian/docs =================================================================== --- tools/pkg/debian/docs (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/docs (.../DEVELOP) (revision 9301) @@ -1,5 +1,6 @@ index.html license.txt readme.txt -TWikiDocumentation.html +INSTALL.html +TWikiReleaseNotes04x00x00.html TWikiHistory.html Index: tools/pkg/debian/rules =================================================================== --- tools/pkg/debian/rules (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/rules (.../DEVELOP) (revision 9301) @@ -8,7 +8,7 @@ #export DH_VERBOSE=1 # This is the debhelper compatability version to use. -export DH_COMPAT=3 +export DH_COMPAT=4 # not www-data. remember to sync with postinst. TWIKI_OWNER=www-data @@ -54,36 +54,36 @@ # $(MAKE) install DESTDIR=$(CURDIR)/debian/twiki # skips .htaccess.txt cp -r bin/* debian/twiki/usr/lib/cgi-bin/twiki + cp -r debian/twiki/usr/lib/cgi-bin/twiki/LocalLib.cfg.txt debian/twiki/usr/lib/cgi-bin/twiki/LocalLib.cfg cp bin/.htaccess.txt debian/twiki/etc/twiki/.htaccess #fix up the paths in the .htaccess file - perl -pi~ -e 's|^(AuthUserFile).*|\1 /var/lib/twiki/data/\.htpasswd|;' debian/twiki/etc/twiki/.htaccess - perl -pi~ -e 's|^(ErrorDocument 401).*|\1 /cgi-bin/twiki/oops/TWiki/TWikiRegistration?template=oopsauth$2|;' debian/twiki/etc/twiki/.htaccess + perl -pi~ -e 's|{DataDir}|/var/lib/twiki/data|;' debian/twiki/etc/twiki/.htaccess + perl -pi~ -e 's|{ScriptUrlPath}|/cgi-bin/twiki|;' debian/twiki/etc/twiki/.htaccess + perl -pi~ -e 's|{Administrators}|TWikiGuest|;' debian/twiki/etc/twiki/.htaccess rm debian/twiki/etc/twiki/.htaccess~ - #create viewauth (soft link won't work for apache - nolink) - cp debian/twiki/usr/lib/cgi-bin/twiki/view debian/twiki/usr/lib/cgi-bin/twiki/viewauth - # not needed, with statoverride? chmod 755 debian/twiki/usr/lib/cgi-bin/twiki/* chmod 644 debian/twiki/usr/lib/cgi-bin/twiki/setlib.cfg + #need more libreal perms to allow configure script to work :() + chmod 777 debian/twiki/usr/lib/cgi-bin/twiki/LocalLib.cfg + # chown $(TWIKIOWNER) debian/twiki/usr/lib/cgi-bin/twiki/* cp -Rp pub/* debian/twiki/var/www/twiki/pub cp -pR templates debian/twiki/var/lib/twiki/ cp -pR data/* debian/twiki/var/lib/twiki/data - rm debian/twiki/var/lib/twiki/data/debug.txt - rm debian/twiki/var/lib/twiki/data/warning.txt # change the unix owners -- don't bother, tar --owner does it # so now we don't even care if TWIKI_OWNER exists at build time # chown -R $(TWIKI_OWNER) debian/twiki/var/lib/twiki/data # and change the RCS lock owners to match -# Copy the TWikiRegistrationPub topic to TWikiRegistration - cp debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistration.txt debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistrationDefault.txt - cp debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistration.txt,v debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistrationDefault.txt,v - cp debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistrationPub.txt debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistration.txt - cp debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistrationPub.txt,v debian/twiki/var/lib/twiki/data/TWiki/TWikiRegistration.txt,v + #distribute the UpgradeTwiki script + cp UpgradeTwiki debian/twiki/var/lib/twiki + chmod 777 debian/twiki/var/lib/twiki/UpgradeTwiki + chmod -R 644 debian/twiki/var/lib/twiki/templates/* + find debian/twiki/var/lib/twiki/data -type f -name '*,v' | \ xargs -n1 perl -pi -e 's/^(\s)nobody:/\1$(TWIKI_OWNER):/ unless $$done; $$done=1 if /^\n$$/;' tar -cf - -C debian/twiki var/lib/twiki/data \ @@ -101,32 +101,23 @@ rm -rf debian/twiki/var/www/twiki/pub cp -pR lib/* debian/twiki/usr/share/perl5/ - rm -r debian/twiki/usr/share/perl5/Algorithm cp -p debian/apache.conf debian/twiki/etc/twiki/ -#!!!!why does this not work? - #fix up the paths to egrep and fgrep -# perl -pi~ -e 's|^(\$egrepCmd).*|$1 = \"/usr/bin/egrep\"|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.egrepCmd).*=.*|\1 = \"/bin/egrep\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.fgrepCmd).*|\1 = \"/bin/fgrep\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - #set up the TWiki.cfg options - perl -pi~ -e 's|^(.defaultUrlHost).*|\1 = \"http://localhost\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.scriptUrlPath).*|\1 = \"/cgi-bin/twiki\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.pubUrlPath).*|\1 = \"/twiki/pub\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.pubDir).*|\1 = \"/var/www/twiki/pub\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.templateDir).*|\1 = \"/var/lib/twiki/templates\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.dataDir).*|\1 = \"/var/lib/twiki/data\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - perl -pi~ -e 's|^(.logDir).*|\1 = \"/var/log/twiki\";|;' debian/twiki/usr/share/perl5/TWiki.cfg -#use RcsLite -# perl -pi~ -e 's|^(.storeTopicImpl\s*=\s*\"RcsWrap\").*|\#\1;|;' debian/twiki/usr/share/perl5/TWiki.cfg -# perl -pi~ -e 's|^\#(.storeTopicImpl\s*=\s*\"RcsLite\").*|\1;|;' debian/twiki/usr/share/perl5/TWiki.cfg -# perl -pi~ -e 's|^(.something).*|\1 = \"\";|;' debian/twiki/usr/share/perl5/TWiki.cfg - rm debian/twiki/usr/share/perl5/TWiki.cfg~ +# setlib.cfg + perl -pi~ -e 's|^(.twikiLibPath).*|\1 = \"/usr/share/perl5\";|;' debian/twiki/usr/lib/cgi-bin/twiki/setlib.cfg + rm debian/twiki/usr/lib/cgi-bin/twiki/setlib.cfg~ + #move twiki.cfg to /etc/twiki + cp debian/LocalSite.cfg debian/twiki/etc/twiki/LocalSite.cfg + chmod 777 debian/twiki/etc/twiki/LocalSite.cfg + mv debian/twiki/usr/share/perl5/LocalSite.cfg.txt debian/twiki/etc/twiki/LocalSite.cfg.txt mv debian/twiki/usr/share/perl5/TWiki.cfg debian/twiki/etc/twiki/TWiki.cfg - + + perl -pi~ -e 's|^(.twikiLibPath).*|\1 = \"/etc/twiki\";|;' debian/twiki/usr/lib/cgi-bin/twiki/LocalLib.cfg + rm debian/twiki/usr/lib/cgi-bin/twiki/LocalLib.cfg~ + # fix paths for index.html perl -pi~ -e 's|http://your.server.com/your-cgi-bin/view/Main/WebHome|http://localhost/cgi-bin/twiki/view/Main/WebHome|;' index.html perl -pi~ -e 's|license.txt|copyright|g;' index.html @@ -177,6 +168,12 @@ cat `tac $(patches)` | patch -Rp0 rm -f $(patches) +checkpo: + for i in po/*.po; do \ + echo \"Checking: $$i\"; \ + msgmerge -U $$i po/templates.pot; \ + msgfmt -o /dev/null -c --statistics $$i; \ + done binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure patch unpatch Index: tools/pkg/debian/templates =================================================================== --- tools/pkg/debian/templates (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/templates (.../DEVELOP) (revision 9301) @@ -1,41 +1,42 @@ Template: twiki/defaultUrlHost Type: string -Default: http://localhost/ -Description: What is the top-level URL of the server TWiki runs under? - For a normal install, this should be a URL for your web server's full name, - which is used to construct urls on some pages. The install will serve up - the data by adding "twiki" to the end of this setting; it is also needed - for certain redirections. +_Default: http://localhost/ +_Description: What is the top-level URL of the server TWiki runs under? + For a normal install, this should be a URL for your web server's full + name, which is used to construct urls on some pages. The install will + serve up the data by adding "twiki" to the end of this setting; it is also + needed for certain redirections. Template: twiki/wikiwebmaster Type: string -Default: webmaster@localhost -Description: What is the email address of the webmaster for this TWiki? - This email address gets mail for new user registration, and is listed on +_Default: webmaster@localhost +_Description: What is the email address of the webmaster for this TWiki? + This email address gets mail for new user registration, and is listed on the "oops" page when things go wrong. Template: twiki/samplefiles Type: boolean Default: true -Description: Install sample wiki universe on initial install? - TWiki includes a complete "starter kit" which includes user registration pages, - documentation, and tutorials. If you're re-installing twiki after deleting - the package and want to keep the old data, or if you've got a twiki data set - from your own manual install, you should say "no" here. On a normal initial - install, say "yes", and a sample data set will be installed in - /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if - data/Main/WebHome.txt is present, the starter kit will not be unpacked; - you can look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.zg) - if you wish to install it manually or compare a new version.) +_Description: Install sample wiki universe on initial install? + TWiki includes a complete "starter kit" which includes user registration + pages, documentation, and tutorials. If you're re-installing twiki after + deleting the package and want to keep the old data, or if you've got a + twiki data set from your own manual install, you should say "no" here. On + a normal initial install, say "yes", and a sample data set will be + installed in /var/lib/twiki/data (and /var/www/twiki/pub). (In either + case, if data/Main/WebHome.txt is present, the starter kit will not be + unpacked; you can look in /usr/share/doc/twiki/twiki-data.tar.gz (and + twiki-pub.tar.gz) if you wish to install it manually or compare a new + version.) Template: twiki/apacheUserCreationNote Type: note -Description: User Registration configuration required - The default debian installation of the TWiki is configured to create new users - automatically when a user Registers. This is not as secure as the default TWiki - but is more useful for trying TWiki out. - To change it so the users are created manually by the administrator - use TWiki RenameTopic to rename the TWikiRegistration to - TWikiRegistrationPub, and TWikiRegistrationDefault to TWikiRegistration. - IMPORTANT: After you have created yourself a user, edit the Main.TWikiAdminGroup - to restrict Admin privileges +_Description: User Registration configuration required + The default debian installation of the TWiki is configured to create new + users automatically when a user Registers. This is not as secure as the + default TWiki but is more useful for trying TWiki out. To change it so the + users are created manually by the administrator use TWiki RenameTopic to + rename the TWikiRegistration to TWikiRegistrationPub, and + TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have + created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin + privileges Index: tools/pkg/debian/apache.conf =================================================================== --- tools/pkg/debian/apache.conf (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/apache.conf (.../DEVELOP) (revision 9301) @@ -1,9 +1,8 @@ # Added for twiki Alias /twiki/pub /var/www/twiki/pub -Alias /twiki/data /var/lib/twiki/data -Redirect /twiki/index.html http://your.domain.com/cgi-bin/twiki/view -#Redirect /twiki/ http://your.domain.com/cgi-bin/twiki/view +RedirectMatch /twiki(/[A-Z].*)?$ http://your.domain.com/cgi-bin/twiki/view$1 + # make sure this is even needed, and ref the doc section needing it Options +ExecCGI Index: tools/pkg/debian/LocalSite.cfg =================================================================== --- tools/pkg/debian/LocalSite.cfg (.../TWikiRelease04x00) (revision 0) +++ tools/pkg/debian/LocalSite.cfg (.../DEVELOP) (revision 9301) @@ -0,0 +1,20 @@ +$TWiki::cfg{DataDir} = '/var/lib/twiki/data'; +$TWiki::cfg{LogDir} = '/var/lib/twiki/log'; +$TWiki::cfg{Site}{Lang} = 'en'; +$TWiki::cfg{LocalesDir} = '/var/lib/twiki/locale'; +$TWiki::cfg{ScriptUrlPath} = '/cgi-bin/twiki'; +$TWiki::cfg{DefaultUrlHost} = 'http://your.domain.com'; +$TWiki::cfg{Site}{FullLang} = 'en-us'; +$TWiki::cfg{PubUrlPath} = '/twiki/pub'; +$TWiki::cfg{PubDir} = '/var/www/twiki/pub'; +$TWiki::cfg{TemplateDir} = '/var/lib/twiki/templates'; +$TWiki::cfg{Site}{CharSet} = 'iso-8859-15'; +$TWiki::cfg{LoginManager} = 'TWiki::Client::ApacheLogin'; +$TWiki::cfg{Plugins}{CalendarPlugin}{Enabled} = 1; +$TWiki::cfg{Plugins}{LocalTimePlugin}{Enabled} = 1; +$TWiki::cfg{Plugins}{WysiwygPlugin}{Enabled} = 1; +$TWiki::cfg{Plugins}{TwistyPlugin}{Enabled} = 1; +$TWiki::cfg{Plugins}{ControlsPlugin}{Enabled} = 1; +$TWiki::cfg{Plugins}{GenerateSearchPlugin}{Enabled} = 1; +$TWiki::cfg{Plugins}{HolidaylistPlugin}{Enabled} = 1; +1; Index: tools/pkg/debian/po/templates.pot =================================================================== --- tools/pkg/debian/po/templates.pot (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/po/templates.pot (.../DEVELOP) (revision 9301) @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2003-07-04 11:52+0200\n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,11 +24,19 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "" + +#. Type: string #. Description #: ../templates:4 msgid "What is the top-level URL of the server TWiki runs under?" msgstr "" +#. Type: string #. Description #: ../templates:4 msgid "" @@ -38,11 +46,19 @@ "for certain redirections." msgstr "" +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "" + +#. Type: string #. Description #: ../templates:13 msgid "What is the email address of the webmaster for this TWiki?" msgstr "" +#. Type: string #. Description #: ../templates:13 msgid "" @@ -50,20 +66,43 @@ "\"oops\" page when things go wrong." msgstr "" +#. Type: boolean #. Description #: ../templates:20 msgid "Install sample wiki universe on initial install?" msgstr "" +#. Type: boolean #. Description #: ../templates:20 msgid "" "TWiki includes a complete \"starter kit\" which includes user registration " "pages, documentation, and tutorials. If you're re-installing twiki after " "deleting the package and want to keep the old data, or if you've got a twiki " -"data set from your own manual install, you should refuse here. On a normal " -"initial install, accept, and a sample data set will be installed in /var/lib/" -"twiki/data. (In either case, if data/Main/WebHome.txt is present, the " -"starter kit will not be unpacked; you can look in /usr/share/doc/twiki/twiki-" -"data.tar.gz if you wish to install it manually or compare a new version.)" +"data set from your own manual install, you should say \"no\" here. On a " +"normal initial install, say \"yes\", and a sample data set will be installed " +"in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/" +"Main/WebHome.txt is present, the starter kit will not be unpacked; you can " +"look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you " +"wish to install it manually or compare a new version.)" msgstr "" + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "" + +#. Type: note +#. Description +#: ../templates:34 +msgid "" +"The default debian installation of the TWiki is configured to create new " +"users automatically when a user Registers. This is not as secure as the " +"default TWiki but is more useful for trying TWiki out. To change it so the " +"users are created manually by the administrator use TWiki RenameTopic to " +"rename the TWikiRegistration to TWikiRegistrationPub, and " +"TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have " +"created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin " +"privileges" +msgstr "" Index: tools/pkg/debian/po/br.po =================================================================== --- tools/pkg/debian/po/br.po (.../TWikiRelease04x00) (revision 0) +++ tools/pkg/debian/po/br.po (.../DEVELOP) (revision 9301) @@ -0,0 +1,125 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: TWiki\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" +"PO-Revision-Date: 2004-08-23 00:00-0300\n" +"Last-Translator: Tiago Bortoletto Vaz \n" +"Language-Team: Debian-BR Project \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "" + +#. Type: string +#. Description +#: ../templates:4 +msgid "What is the top-level URL of the server TWiki runs under?" +msgstr "Qual é a URL de mais alto nível do servidor que o TWiki irá rodar?" + +#. Type: string +#. Description +#: ../templates:4 +msgid "" +"For a normal install, this should be a URL for your web server's full name, " +"which is used to construct urls on some pages. The install will serve up " +"the data by adding \"twiki\" to the end of this setting; it is also needed " +"for certain redirections." +msgstr "" +"Para uma instalação normal, isto deve ser uma URL do nome completo do seu " +"servidor WEB, que é usada como base das urls de algumas páginas. A " +"instalação irá prover os dados adicionando \"twiki\" no final desta URL; " +"isso também é necessário para alguns redirecionamentos." + +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "" + +#. Type: string +#. Description +#: ../templates:13 +msgid "What is the email address of the webmaster for this TWiki?" +msgstr "Qual o endereço de email do webmaster deste TWiki?" + +#. Type: string +#. Description +#: ../templates:13 +msgid "" +"This email address gets mail for new user registration, and is listed on the " +"\"oops\" page when things go wrong." +msgstr "" +"Este endereço de email recebe os emails dos novos registros de usuários, e é " +"listado na página \"oops\" quando algo der errado." + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "Install sample wiki universe on initial install?" +msgstr "Instalar os exemplos padrão de wiki na instalação inicial?" + +#. Type: boolean +#. Description +#: ../templates:20 +#, fuzzy +msgid "" +"TWiki includes a complete \"starter kit\" which includes user registration " +"pages, documentation, and tutorials. If you're re-installing twiki after " +"deleting the package and want to keep the old data, or if you've got a twiki " +"data set from your own manual install, you should say \"no\" here. On a " +"normal initial install, say \"yes\", and a sample data set will be installed " +"in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/" +"Main/WebHome.txt is present, the starter kit will not be unpacked; you can " +"look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you " +"wish to install it manually or compare a new version.)" +msgstr "" +"O TWiki inclui um completo \"kit de inicialização\" que inclui páginas de " +"registro de usuário, documentação e tutoriais. Se você está reinstalando o " +"twiki depois de ter removido o pacote anterior e quer preservar os dados " +"antigos, ou se você tem os dados de configuração do twiki a partir do seu " +"próprio manual de instalação, você deve recusar aqui. Numa instalação " +"inicial normal, aceitando essa opção, dados de exemplo de configuração serão " +"instalados em /var/lib/twiki/data. (Num outro caso, se data/Main/WebHome.txt " +"está presente, o kit de inicialização não será desempacotado; você pode " +"encontrá-lo em /usr/share/doc/twiki/twiki-data.tar.gz se quiser instalá-lo " +"manualmente ou comparar com uma nova versão.)" + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "" + +#. Type: note +#. Description +#: ../templates:34 +msgid "" +"The default debian installation of the TWiki is configured to create new " +"users automatically when a user Registers. This is not as secure as the " +"default TWiki but is more useful for trying TWiki out. To change it so the " +"users are created manually by the administrator use TWiki RenameTopic to " +"rename the TWikiRegistration to TWikiRegistrationPub, and " +"TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have " +"created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin " +"privileges" +msgstr "" Index: tools/pkg/debian/po/cs.po =================================================================== --- tools/pkg/debian/po/cs.po (.../TWikiRelease04x00) (revision 0) +++ tools/pkg/debian/po/cs.po (.../DEVELOP) (revision 9301) @@ -0,0 +1,131 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: twiki\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" +"PO-Revision-Date: 2005-08-07 19:04+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "http://localhost/" + +#. Type: string +#. Description +#: ../templates:4 +msgid "What is the top-level URL of the server TWiki runs under?" +msgstr "Jaké je vrcholové URL serveru, pod kterým TWiki poběží?" + +#. Type: string +#. Description +#: ../templates:4 +msgid "" +"For a normal install, this should be a URL for your web server's full name, " +"which is used to construct urls on some pages. The install will serve up " +"the data by adding \"twiki\" to the end of this setting; it is also needed " +"for certain redirections." +msgstr "" +"Pro běžné instalace by to mÄ›la být celá adresa vaÅ¡eho webového serveru. " +"Instalace pÅ™idá na konec této adresy Å™etÄ›zec \"twiki\", Äímž vznikne URL, " +"pod kterým bude vaÅ¡e wiki dostupné. Zadané URL se použije pro vytváření " +"odkazů na nÄ›kterých stránkách." + +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "webmaster@localhost" + +#. Type: string +#. Description +#: ../templates:13 +msgid "What is the email address of the webmaster for this TWiki?" +msgstr "Jaká je e-mailová adresa správce tohoto TWiki?" + +#. Type: string +#. Description +#: ../templates:13 +msgid "" +"This email address gets mail for new user registration, and is listed on the " +"\"oops\" page when things go wrong." +msgstr "" +"Na tuto emailovou adresu budou zasílány požadavky o registraci nových " +"uživatelů a také se bude zobrazovat na webové stránce v případÄ›, že se vÄ›ci " +"pokazí." + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "Install sample wiki universe on initial install?" +msgstr "Instalovat pÅ™i prvotní instalaci vzorový wiki web?" + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "" +"TWiki includes a complete \"starter kit\" which includes user registration " +"pages, documentation, and tutorials. If you're re-installing twiki after " +"deleting the package and want to keep the old data, or if you've got a twiki " +"data set from your own manual install, you should say \"no\" here. On a " +"normal initial install, say \"yes\", and a sample data set will be installed " +"in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/" +"Main/WebHome.txt is present, the starter kit will not be unpacked; you can " +"look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you " +"wish to install it manually or compare a new version.)" +msgstr "" +"TWiki obsahuje kompletní \"sadu pro zaÄáteÄníky\", která zahrnuje stránky s " +"registrací uživatelů, dokumentací a návody. Reinstalujete-li twiki po " +"pÅ™edchozím odstranÄ›ní balíku a chcete zachovat svá stará data, nebo pokud " +"máte data po dřívÄ›jší ruÄní instalaci, mÄ›li byste zde zamítnout. PÅ™i běžné " +"první instalaci akceptujte, což vám nainstaluje vzorová data do /var/lib/" +"twiki/data (a /var/www/twiki/pub). (Sada pro zaÄáteÄníky se nerozbalí, pokud " +"existuje soubor data/Main/WebHome.txt; budete-li ji chtít nainstalovat " +"ruÄnÄ›, nachází se v souboru /usr/share/doc/twiki/twiki-data.tar.gz " +"(a twiki-pub.tar.gz).)" + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "Vyžadována zmÄ›na v nastavení registrace uživatelů" + +#. Type: note +#. Description +#: ../templates:34 +msgid "" +"The default debian installation of the TWiki is configured to create new " +"users automatically when a user Registers. This is not as secure as the " +"default TWiki but is more useful for trying TWiki out. To change it so the " +"users are created manually by the administrator use TWiki RenameTopic to " +"rename the TWikiRegistration to TWikiRegistrationPub, and " +"TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have " +"created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin " +"privileges" +msgstr "" +"Výchozí instalace TWiki v Debianu je nastavena tak, aby pÅ™i registraci " +"uživatele automaticky vytvářela nové uživatele. To není tak bezpeÄné, jako " +"výchozí nastavení TWiki, avÅ¡ak pro pouhé vyzkouÅ¡ení TWiki je to užiteÄnÄ›jší. " +"ZmÄ›nu, aby uživatele zakládal administrátor ruÄnÄ›, provedete pomocí TWiki " +"RenameToppic, kde pÅ™ejmenujete TWikiRegistration na TWikiRegistrationPub a " +"poté TWikiRegistrationDefault na TWikiRegistration. DÅ®LEŽITÉ: Až si pro sebe " +"vytvoříte uživatele, omezte administrátorská oprávnÄ›ní úpravou " +"Main.TWikiAdminGroup." Index: tools/pkg/debian/po/pt_BR.po =================================================================== --- tools/pkg/debian/po/pt_BR.po (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/po/pt_BR.po (.../DEVELOP) (revision 9301) @@ -16,7 +16,7 @@ msgstr "" "Project-Id-Version: twiki_20030201-5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2003-07-04 11:52+0200\n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" "PO-Revision-Date: 2005-09-04A 13:45-0300\n" "Last-Translator: Antonio S. de A. Terceiro \n" "Language-Team: TWikiBrasil \n" @@ -24,11 +24,19 @@ "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "" + +#. Type: string #. Description #: ../templates:4 msgid "What is the top-level URL of the server TWiki runs under?" msgstr "Qual a URL inicial do servidor onde o TWiki roda?" +#. Type: string #. Description #: ../templates:4 msgid "" @@ -42,11 +50,19 @@ "vai fornecer essa informação adicionando \"twiki\" ao final desse valor; é " "necessário também pra alguns redirecionamentos." +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "" + +#. Type: string #. Description #: ../templates:13 msgid "What is the email address of the webmaster for this TWiki?" msgstr "Qual o endereço de e-mail to webmaster desse TWiki?" +#. Type: string #. Description #: ../templates:13 msgid "" @@ -56,29 +72,53 @@ "Esse endereço de e-mail recebe mensagens em registros de novos usuários, e é " "listado na página \"oops\" quando alguma coisa dá errado." +#. Type: boolean #. Description #: ../templates:20 msgid "Install sample wiki universe on initial install?" msgstr "Instalar universo wiki inicial na primeira instalação?" +#. Type: boolean #. Description #: ../templates:20 +#, fuzzy msgid "" "TWiki includes a complete \"starter kit\" which includes user registration " "pages, documentation, and tutorials. If you're re-installing twiki after " "deleting the package and want to keep the old data, or if you've got a twiki " -"data set from your own manual install, you should refuse here. On a normal " -"initial install, accept, and a sample data set will be installed in /var/lib/" -"twiki/data. (In either case, if data/Main/WebHome.txt is present, the " -"starter kit will not be unpacked; you can look in /usr/share/doc/twiki/twiki-" -"data.tar.gz if you wish to install it manually or compare a new version.)" +"data set from your own manual install, you should say \"no\" here. On a " +"normal initial install, say \"yes\", and a sample data set will be installed " +"in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/" +"Main/WebHome.txt is present, the starter kit will not be unpacked; you can " +"look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you " +"wish to install it manually or compare a new version.)" msgstr "" "O TWiki inclui um \"kit inicial\" completo que inclui páginas de registro de " -"usuários, documentação e tutoriais. Se você estiver reinstalando twiki depois " -"de remover o pacote e quiser manter os dados antigos, ou se você tem um conjunto " -"de dados do twiki de uma instalação manual própria, você deve negar aqui. Numa " -"instalação inicial normal, aceite, e um conjunto de dados inicial vai ser instalado " -"em /var/lib/twiki/data. (Em qualquer um dos casos, se data/Main/WebHome.txt estiver " -"presente, o kit inicial não vai ser extraído; você pode olhar em /usr/share/doc/" -"twiki/twiki-data.tar.gz se quiser instalá-lo manualmente ou comparar com uma versão " -"mais nova.)" +"usuários, documentação e tutoriais. Se você estiver reinstalando twiki " +"depois de remover o pacote e quiser manter os dados antigos, ou se você tem " +"um conjunto de dados do twiki de uma instalação manual própria, você deve " +"negar aqui. Numa instalação inicial normal, aceite, e um conjunto de dados " +"inicial vai ser instalado em /var/lib/twiki/data. (Em qualquer um dos casos, " +"se data/Main/WebHome.txt estiver presente, o kit inicial não vai ser " +"extraído; você pode olhar em /usr/share/doc/twiki/twiki-data.tar.gz se " +"quiser instalá-lo manualmente ou comparar com uma versão mais nova.)" + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "" + +#. Type: note +#. Description +#: ../templates:34 +msgid "" +"The default debian installation of the TWiki is configured to create new " +"users automatically when a user Registers. This is not as secure as the " +"default TWiki but is more useful for trying TWiki out. To change it so the " +"users are created manually by the administrator use TWiki RenameTopic to " +"rename the TWikiRegistration to TWikiRegistrationPub, and " +"TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have " +"created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin " +"privileges" +msgstr "" Index: tools/pkg/debian/po/fr.po =================================================================== --- tools/pkg/debian/po/fr.po (.../TWikiRelease04x00) (revision 9301) +++ tools/pkg/debian/po/fr.po (.../DEVELOP) (revision 9301) @@ -13,19 +13,27 @@ msgstr "" "Project-Id-Version: twiki_20011201-2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2003-07-04 11:52+0200\n" -"PO-Revision-Date: 2003-07-08 21:26+0200\n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" +"PO-Revision-Date: 2005-02-17 13:24+0100\n" "Last-Translator: Michel Grentzinger \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "http://localhost/" + +#. Type: string #. Description #: ../templates:4 msgid "What is the top-level URL of the server TWiki runs under?" -msgstr "Quelle est l'URL du serveur TWiki ?" +msgstr "URL du serveur TWiki:" +#. Type: string #. Description #: ../templates:4 msgid "" @@ -34,51 +42,93 @@ "the data by adding \"twiki\" to the end of this setting; it is also needed " "for certain redirections." msgstr "" -"Pour une installation normale, vous devriez indiquer ici l'URL construite à " -"partir du nom complet de votre serveur. Les données seront accessibles à " -"l'adresse obtenue en ajoutant « twiki » à cette valeur. Celle-ci servira " -"également pour certaines redirections." +"Pour une installation normale, vous devriez indiquer l'URL construite �" +"partir du nom complet de votre serveur. Les donn�s seront accessibles �" +"l'adresse obtenue en ajoutant twiki �cette valeur. Celle-ci servira " +"�alement pour certaines redirections." +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "webmaster@localhost" + +#. Type: string #. Description #: ../templates:13 msgid "What is the email address of the webmaster for this TWiki?" -msgstr "Quelle est l'adresse électronique du webmestre pour TWiki ?" +msgstr "Adresse �ectronique du webmestre de TWiki:" +#. Type: string #. Description #: ../templates:13 msgid "" "This email address gets mail for new user registration, and is listed on the " "\"oops\" page when things go wrong." msgstr "" -"Cette adresse électronique reçoit les messages pour les enregistrements des " -"nouveaux utilisateurs et est affichée sur la page « oops » lorsque quelque " -"chose ne se passe pas bien." +"L'adresse �ectronique indiqu� recevra les demandes d'enregistrement des " +"nouveaux utilisateurs. Elle est affich� sur la page oops lorsque un " +"incident se produit." +#. Type: boolean #. Description #: ../templates:20 msgid "Install sample wiki universe on initial install?" -msgstr "Installer l'exemple d'univers wiki lors de l'installation initiale ?" +msgstr "" +"Faut-il installer l'exemple d'univers wiki lors de l'installation initiale?" +#. Type: boolean #. Description #: ../templates:20 msgid "" "TWiki includes a complete \"starter kit\" which includes user registration " "pages, documentation, and tutorials. If you're re-installing twiki after " "deleting the package and want to keep the old data, or if you've got a twiki " -"data set from your own manual install, you should refuse here. On a normal " -"initial install, accept, and a sample data set will be installed in /var/lib/" -"twiki/data. (In either case, if data/Main/WebHome.txt is present, the " -"starter kit will not be unpacked; you can look in /usr/share/doc/twiki/twiki-" -"data.tar.gz if you wish to install it manually or compare a new version.)" +"data set from your own manual install, you should say \"no\" here. On a " +"normal initial install, say \"yes\", and a sample data set will be installed " +"in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/" +"Main/WebHome.txt is present, the starter kit will not be unpacked; you can " +"look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you " +"wish to install it manually or compare a new version.)" msgstr "" -"TWiki comprend un « kit de démarrage » complet qui inclut des pages " -"destinées à l'enregistrement des utilisateurs, de la documentation et des " -"tutoriels. Si vous réinstallez twiki après avoir supprimé le paquet et que " -"vous souhaitez conserver vos anciennes données ou bien si vous avez un " -"ensemble de données twiki provenant d'une installation que vous avez faite " -"vous-même, vous devriez refuser ici. Pour une installation normale, acceptez " -"et un ensemble simple de données sera installé dans /var/lib/twiki/data. " -"Dans tous les cas ,si data/Main/WebHome.txt existe, le kit de démarrage ne " -"sera pas décompacté. Vous pourrez alors regarder dans /usr/share/doc/twiki/" -"twiki-data.tar.gz si vous souhaitez l'installer vous-même ou le comparer à " -"une nouvelle version." +"TWiki comprend un kit de d�arrage complet qui inclut des pages " +"destin�s �l'enregistrement des utilisateurs, de la documentation et des " +"tutoriels. Si vous r�nstallez twiki apr� avoir supprim�le paquet et que " +"vous souhaitez conserver vos anciennes donn�s ou bien si vous avez un " +"ensemble de donn�s twiki provenant d'une installation que vous avez faite " +"vous-m�e, ne choisissez pas cette option. Pour une installation normale, " +"vous pouvez la choisir et un ensemble simple de donn�s sera install�dans /" +"var/lib/twiki/data (et /var/www/twiki/pub). Dans tous les cas, si data/Main/" +"WebHome.txt existe, le kit de d�arrage ne sera pas d�ompact� Vous pourrez " +"alors regarder dans /usr/share/doc/twiki/twiki-data.tar.gz (et twiki-pub.tar." +"gz) si vous souhaitez l'installer vous-m�e ou le comparer �une nouvelle " +"version." + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "Configuration obligatoire de l'enregistrement des utilisateurs" + +#. Type: note +#. Description +#: ../templates:34 +msgid "" +"The default debian installation of the TWiki is configured to create new " +"users automatically when a user Registers. This is not as secure as the " +"default TWiki but is more useful for trying TWiki out. To change it so the " +"users are created manually by the administrator use TWiki RenameTopic to " +"rename the TWikiRegistration to TWikiRegistrationPub, and " +"TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have " +"created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin " +"privileges" +msgstr "" +"L'installation Debian par d�aut est configur� pour cr�r de nouveaux " +"utilisateurs automatiquement lorsqu'un utilisateur s'enregistre. Cela n'est " +"pas aussi s�uris�que les param�res par d�aut de Twiki mais c'est plus " +"commode pour tester Twiki. Pour changer cela, afin des les utilisateurs " +"soient cr�s par l'administrateur, veuillez utiliser TWiki RenameTopic " +"pour renommer TWikiRegistration en TWikiRegistrationPub, et " +"TWikiRegistrationDefault en TWikiRegistration. Remarque importante: " +"une fois que vous aurez cr� vous-m�e un utilisateur, veuillez modifier " +"Main.TWikiAdminGroup afin de restreindre ses privil�es d'administration." Index: tools/pkg/debian/po/sv.po =================================================================== --- tools/pkg/debian/po/sv.po (.../TWikiRelease04x00) (revision 0) +++ tools/pkg/debian/po/sv.po (.../DEVELOP) (revision 9301) @@ -0,0 +1,85 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: twiki 20040902-3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" +"PO-Revision-Date: 2005-11-28 12:30+0100\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "http://localhost/" + +#. Type: string +#. Description +#: ../templates:4 +msgid "What is the top-level URL of the server TWiki runs under?" +msgstr "Vilken är topp-nivÃ¥-URLen för servern som TWiki kör under?" + +#. Type: string +#. Description +#: ../templates:4 +msgid "For a normal install, this should be a URL for your web server's full name, which is used to construct urls on some pages. The install will serve up the data by adding \"twiki\" to the end of this setting; it is also needed for certain redirections." +msgstr "För en normal installation bör detta vara en URL för din webbservers fulla namn som används för att konstruera URLer för vissa sidor. Installationen kommer att servera data genom att lägga till \"twiki\" pÃ¥ slutet av denna inställning; den behövs ocksÃ¥ för vissa omdirigeringar." + +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "webmaster@localhost" + +#. Type: string +#. Description +#: ../templates:13 +msgid "What is the email address of the webmaster for this TWiki?" +msgstr "Vad är e-postadressen för webmastern för denna TWiki?" + +#. Type: string +#. Description +#: ../templates:13 +msgid "This email address gets mail for new user registration, and is listed on the \"oops\" page when things go wrong." +msgstr "Denna e-postadress tar emot e-post för nya användarregistreringar och är listad pÃ¥ sidan \"oops\" när saker gÃ¥r fel." + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "Install sample wiki universe on initial install?" +msgstr "Installera exempeldata vid initiell installation?" + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "TWiki includes a complete \"starter kit\" which includes user registration pages, documentation, and tutorials. If you're re-installing twiki after deleting the package and want to keep the old data, or if you've got a twiki data set from your own manual install, you should say \"no\" here. On a normal initial install, say \"yes\", and a sample data set will be installed in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/Main/WebHome.txt is present, the starter kit will not be unpacked; you can look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you wish to install it manually or compare a new version.)" +msgstr "TWiki inkluderar ett komplett \"startkit\" som inkluderar sidor för användarregistrering, dokumentation och genomgÃ¥ngar. Om du installerar om twiki efter att ha tagit bort paketet och vill behÃ¥lla det gamla datat eller om du har twiki-data frÃ¥n din egna manuella installtion bör du svara \"nej\" här. Vid en normal initial installation, säg \"ja\" och exempeldata kommer att installeras i /var/lib/twiki/data (och /var/www/twiki/pub). (I bÃ¥da fallen, om data/Main/WebHome.txt finns kommer startkitet inte att packas upp; du kan se i /usr/share/doc/twiki/twiki-data.tar.gz (och twiki-pub.tar.zg) om du önskar att installera det manuellt eller att att jämföra med en ny version.)" + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "Konfiguration av användarregistrering krävs" + +#. Type: note +#. Description +#: ../templates:34 +msgid "The default debian installation of the TWiki is configured to create new users automatically when a user Registers. This is not as secure as the default TWiki but is more useful for trying TWiki out. To change it so the users are created manually by the administrator use TWiki RenameTopic to rename the TWikiRegistration to TWikiRegistrationPub, and TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin privileges" +msgstr "Standardinstallation i Debian av TWiki är konfigurerad att skapa nya användare automatiskt när en användare registrerar sig. Detta är inte sÃ¥ säkert som standarden i TWiki men är mer användbar för att prova pÃ¥ TWiki. För att ändra det sÃ¥ att användare som skapas manuellt av administratören använd TWiki RenameTopic för att byta namn pÃ¥ TWikiRegistration till TWikiRegistrationPub och TWikiRegistrationDefault till TWikiRegistration. VIKTIGT: Efter att du har skapat din egna användare, redigera Main.TWikiAdminGroup för att begränsa administrationsrättigheterna." + Index: tools/pkg/debian/po/vi.po =================================================================== --- tools/pkg/debian/po/vi.po (.../TWikiRelease04x00) (revision 0) +++ tools/pkg/debian/po/vi.po (.../DEVELOP) (revision 9301) @@ -0,0 +1,100 @@ +# Vietnamese translation for twiki. +# Copyright © 2005 Free Software Foundation, Inc. +# Clytie Siddall , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: twiki 20040902-3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-01-17 21:38+1100\n" +"PO-Revision-Date: 2005-08-10 22:45+0930\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"X-Generator: LocFactoryEditor 1.2.2\n" + +#. Type: string +#. Default +#: ../templates:3 +msgid "http://localhost/" +msgstr "http://localhost/" + +#. Type: string +#. Description +#: ../templates:4 +msgid "What is the top-level URL of the server TWiki runs under?" +msgstr "TWiki chạy trên máy phục vụ có địa chỉ Mạng cấp đầu nào?" + +#. Type: string +#. Description +#: ../templates:4 +msgid "" +"For a normal install, this should be a URL for your web server's full name, " +"which is used to construct urls on some pages. The install will serve up " +"the data by adding \"twiki\" to the end of this setting; it is also needed " +"for certain redirections." +msgstr "Khi cài đặt má»™t cách chuẩn, giá trị này nên là má»™t địa chỉ Mạng cho tên đầy đủ của trình phục vụ Mạng bạn, mà được dùng để tạo địa chỉ Mạng trong má»™t số trang. Việc cài đặt sẽ cung cấp dữ liệu bằng cách thêm « twiki » vào kết thức giá trị này; cÅ©ng cần thiết nó để chuyển hÆ°á»›ng trong má»™t số trÆ°á»ng hợp." + +#. Type: string +#. Default +#: ../templates:12 +msgid "webmaster@localhost" +msgstr "webmaster@localhost" + +#. Type: string +#. Description +#: ../templates:13 +msgid "What is the email address of the webmaster for this TWiki?" +msgstr "Cho TWiki này, ngÆ°á»i chủ nÆ¡i Mạng có địa chỉ thÆ° nào?" + +#. Type: string +#. Description +#: ../templates:13 +msgid "" +"This email address gets mail for new user registration, and is listed on the " +"\"oops\" page when things go wrong." +msgstr "Äịa chỉ thÆ° này nhận thÆ° khi ngÆ°á»i dùng má»›i đăng ký, và xuất hiện trong trang « ối » (oops) khi gặp lá»—i." + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "Install sample wiki universe on initial install?" +msgstr "Cài đặt môi trÆ°á»ng wiki mẫu khi cài đặt đầu tiên không?" + +#. Type: boolean +#. Description +#: ../templates:20 +msgid "" +"TWiki includes a complete \"starter kit\" which includes user registration " +"pages, documentation, and tutorials. If you're re-installing twiki after " +"deleting the package and want to keep the old data, or if you've got a twiki " +"data set from your own manual install, you should say \"no\" here. On a " +"normal initial install, say \"yes\", and a sample data set will be installed " +"in /var/lib/twiki/data (and /var/www/twiki/pub). (In either case, if data/" +"Main/WebHome.txt is present, the starter kit will not be unpacked; you can " +"look in /usr/share/doc/twiki/twiki-data.tar.gz (and twiki-pub.tar.gz) if you " +"wish to install it manually or compare a new version.)" +msgstr "TWiki bao gồm má»™t bá»™ dụng cụ bắt đầu hoàn thành, gồm trang đăng ký ngÆ°á»i dùng, tài liệu và trợ lý há»c tập. Nếu bạn Ä‘ang cài đặt lại twiki sau khi xóa bá» gói và muốn giữ các dữ liệu cÅ©, hoặc nếu bạn có dữ liệu twiki từ việc cài đặt thủ công, thì bạn nên nói « Không » (no) tại đây. Khi cài đặt đầu tiên má»™t cách chuẩn, hãy nói « Có » (yes), và má»™t bá»™ dữ liệu mẫu sẽ được cài đặt vào « /var/lib/twiki/data » (và vào « /var/www/twiki/pub »). (Trong cả hai trÆ°á»ng hợp, nếu có « data/Main/WebHome.txt » thì sẽ không giải nén bá»™ dụng cụ bắt đầu; bạn có thể xem trong « /usr/share/doc/twiki/twiki-data.tar.gz » (và trong « twiki-pub.tar.gz ») nếu bạn muốn tá»± cài đặt nó, hoặc muốn so sánh vá»›i má»™t phiên bản má»›i." + +#. Type: note +#. Description +#: ../templates:34 +msgid "User Registration configuration required" +msgstr "Cần thiết cấu hình đăng ký ngÆ°á»i dùng" + +#. Type: note +#. Description +#: ../templates:34 +msgid "" +"The default debian installation of the TWiki is configured to create new " +"users automatically when a user Registers. This is not as secure as the " +"default TWiki but is more useful for trying TWiki out. To change it so the " +"users are created manually by the administrator use TWiki RenameTopic to " +"rename the TWikiRegistration to TWikiRegistrationPub, and " +"TWikiRegistrationDefault to TWikiRegistration. IMPORTANT: After you have " +"created yourself a user, edit the Main.TWikiAdminGroup to restrict Admin " +"privileges" +msgstr "Bản cài đặt TWiki Debian mặc định được cấu hình để tá»± Ä‘á»™ng tạo ngÆ°á»i dùng má»›i khi ngÆ°á»i ấy đăng ký. Cách này không phải bảo mật nhÆ° TWiki mặc định, nhÆ°ng mà hữu ích hÆ¡n khi thá»­ ra TWiki. Äể thay đổi thiết lập này, để mà quản trị tá»± tạo ngÆ°á»i dùng, hãy dùng « TWiki RenameTopic » (TWiki thay đổi tên của chủ Ä‘á») để thay đổi tên của TWikiRegistration (Ä‘ang ký TWiki) thành TWikiRegistrationPub (Ä‘ang ký công TWiki), và TWikiRegistrationDefault (Ä‘ang ký TWiki mặc định) thành TWikiRegistration (Ä‘ang ký TWiki). QUAN TRỌNG: sau khi bạn đã tạo ngÆ°á»i dùng cho chính bạn, hãy hiệu chỉnh Main.TWikiAdminGroup (chính: nhóm quản lý TWiki) để giá»›i hạn quyá»n truy cập quản lý." Index: tools/MANIFEST =================================================================== --- tools/MANIFEST (.../TWikiRelease04x00) (revision 9301) +++ tools/MANIFEST (.../DEVELOP) (revision 9301) @@ -4,7 +4,7 @@ bin/changes 0550 bin/configure 0550 bin/edit 0550 -bin/.htaccess.txt 0440 +bin/.htaccess.txt 0640 bin/login 0550 bin/logon 0550 bin/manage 0550 @@ -24,11 +24,11 @@ bin/upload 0550 bin/view 0550 bin/viewfile 0550 -bin/logos/favicon.ico 0440 -bin/logos/info.gif 0440 -bin/logos/T-logo-140x40-t.gif 0440 -bin/logos/T-logo34x26-t.gif 0440 -bin/logos/warning.gif 0440 +bin/logos/favicon.ico 0660 +bin/logos/info.gif 0660 +bin/logos/T-logo-140x40-t.gif 0660 +bin/logos/T-logo34x26-t.gif 0660 +bin/logos/warning.gif 0660 bin/LocalLib.cfg.txt 440 COPYING 0440 COPYRIGHT 0440 @@ -72,14 +72,14 @@ data/Sandbox/WebStatistics.txt 0660 data/Sandbox/WebTopicCreator.txt 0660 data/Sandbox/WebTopicList.txt 0660 +data/TWiki/ATasteOfTWiki.txt 0660 +data/TWiki/ATasteOfTWikiTemplate.txt 0660 data/TWiki/AccessKeys.txt 0660 data/TWiki/AdminDocumentationCategory.txt 0660 data/TWiki/AdminSkillsAssumptions.txt 0660 data/TWiki/AdminToolsCategory.txt 0660 -data/TWiki/AnApplicationWithWikiForm.txt 0660 data/TWiki/AppendixEncodeURLsWithUTF8.txt 0660 -data/TWiki/ATasteOfTWiki.txt 0660 -data/TWiki/ATasteOfTWikiTemplate.txt 0660 +data/TWiki/AnApplicationWithWikiForm.txt 0660 data/TWiki/BookView.txt 0660 data/TWiki/BulkRegistration.txt 0660 data/TWiki/BulkResetPassword.txt 0660 @@ -170,7 +170,6 @@ data/TWiki/TWikiUserAuthentication.txt 0660 data/TWiki/TWikiUsersGuide.txt 0660 data/TWiki/TWikiVariables.txt 0660 -data/TWiki/TWikiVariablesQuickStart.txt 0660 data/TWiki/TWikiWebsTable.txt 0660 data/TWiki/TemplateWeb.txt 0660 data/TWiki/TextEditor.txt 0660 @@ -178,94 +177,92 @@ data/TWiki/TextFormattingRules.txt 0660 data/TWiki/TimBernersLee.txt 0660 data/TWiki/TimeInterval.txt 0660 -data/TWiki/TWikiEditingShorthand.txt 0660 data/TWiki/UserDocumentationCategory.txt 0660 data/TWiki/UserToolsCategory.txt 0660 -data/TWiki/UsingHTML.txt 0660 -data/TWiki/VarQUERYSTRING.txt 0660 -data/TWiki/VarWIKIVERSION.txt 0660 -data/TWiki/VarPUBURL.txt 0660 -data/TWiki/VarWEBPREFSTOPIC.txt 0660 -data/TWiki/VarMAINWEB.txt 0660 -data/TWiki/VarSTARTSECTION.txt 0660 -data/TWiki/VarSPACEOUT.txt 0660 -data/TWiki/VarTOPIC.txt 0660 -data/TWiki/VarPLUGINDESCRIPTIONS.txt 0660 -data/TWiki/VarSERVERTIME.txt 0660 data/TWiki/VarACTIVATEDPLUGINS.txt 0660 -data/TWiki/VarREMOTEADDR.txt 0660 -data/TWiki/VarSESSIONID.txt 0660 -data/TWiki/VarIF.txt 0660 -data/TWiki/VarVAR.txt 0660 -data/TWiki/VarSPACEDTOPIC.txt 0660 -data/TWiki/VarSCRIPTURL.txt 0660 -data/TWiki/VarSERVERTIME2.txt 0660 -data/TWiki/VarLOGOUT.txt 0660 +data/TWiki/VarALLVARIABLES.txt 0660 +data/TWiki/VarATTACHURLPATH.txt 0660 +data/TWiki/VarATTACHURL.txt 0660 +data/TWiki/VarAUTHREALM.txt 0660 +data/TWiki/VarBASETOPIC.txt 0660 +data/TWiki/VarBASEWEB.txt 0660 +data/TWiki/VarDATE.txt 0660 data/TWiki/VarDISPLAYTIME2.txt 0660 -data/TWiki/VarLANGUAGE.txt 0660 -data/TWiki/VarURLPARAM.txt 0660 +data/TWiki/VarDISPLAYTIME.txt 0660 +data/TWiki/VarENCODE.txt 0660 +data/TWiki/VarENDSECTION.txt 0660 +data/TWiki/VarFAILEDPLUGINS.txt 0660 +data/TWiki/VarFORMFIELD.txt 0660 +data/TWiki/VarGMTIME2.txt 0660 +data/TWiki/VarGMTIME.txt 0660 +data/TWiki/VarHOMETOPIC.txt 0660 +data/TWiki/VarHTTPHOST.txt 0660 +data/TWiki/VarHTTPS.txt 0660 +data/TWiki/VarHTTP.txt 0660 +data/TWiki/VarICON.txt 0660 data/TWiki/VarICONURLPATH.txt 0660 -data/TWiki/VarWEBLIST.txt 0660 +data/TWiki/VarICONURL.txt 0660 +data/TWiki/VarIF.txt 0660 +data/TWiki/VarINCLUDE.txt 0660 +data/TWiki/VarINCLUDINGTOPIC.txt 0660 +data/TWiki/VarINCLUDINGWEB.txt 0660 +data/TWiki/VarLANGUAGES.txt 0660 +data/TWiki/VarLANGUAGE.txt 0660 data/TWiki/VarLOCALSITEPREFS.txt 0660 -data/TWiki/VarSCRIPTURLPATH2.txt 0660 -data/TWiki/VarHOMETOPIC.txt 0660 -data/TWiki/VarATTACHURLPATH.txt 0660 -data/TWiki/VarSCRIPTSUFFIX.txt 0660 -data/TWiki/VarSESSIONVARIABLE.txt 0660 -data/TWiki/VarNOTIFYTOPIC.txt 0660 -data/TWiki/VarWEB.txt 0660 -data/TWiki/VarSTATISTICSTOPIC.txt 0660 -data/TWiki/VarSCRIPTURLPATH.txt 0660 -data/TWiki/VarFORMFIELD.txt 0660 -data/TWiki/VarWIKIHOMEURL.txt 0660 +data/TWiki/VarLOGIN.txt 0660 +data/TWiki/VarLOGOUT.txt 0660 +data/TWiki/VarMAINWEB.txt 0660 +data/TWiki/VarMAKETEXT.txt 0660 +data/TWiki/VarMETASEARCH.txt 0660 data/TWiki/VarMETA.txt 0660 +data/TWiki/VarNOP.txt 0660 +data/TWiki/VarNOTIFYTOPIC.txt 0660 +data/TWiki/VarPLUGINDESCRIPTIONS.txt 0660 +data/TWiki/VarPLUGINVERSION.txt 0660 +data/TWiki/VarPUBURLPATH.txt 0660 +data/TWiki/VarPUBURL.txt 0660 +data/TWiki/VarQUERYSTRING.txt 0660 +data/TWiki/VarREMOTEADDR.txt 0660 data/TWiki/VarREMOTEPORT.txt 0660 -data/TWiki/VarDATE.txt 0660 data/TWiki/VarREMOTEUSER.txt 0660 -data/TWiki/VarALLVARIABLES.txt 0660 -data/TWiki/VarENCODE.txt 0660 +data/TWiki/VarREVINFO2.txt 0660 data/TWiki/VarREVINFO.txt 0660 -data/TWiki/VarGMTIME2.txt 0660 +data/TWiki/VarSCRIPTNAME.txt 0660 +data/TWiki/VarSCRIPTSUFFIX.txt 0660 data/TWiki/VarSCRIPTURL2.txt 0660 -data/TWiki/VarTWIKIWEB.txt 0660 -data/TWiki/VarBASETOPIC.txt 0660 -data/TWiki/VarINCLUDINGWEB.txt 0660 -data/TWiki/VarTOPICLIST.txt 0660 -data/TWiki/VarINCLUDINGTOPIC.txt 0660 +data/TWiki/VarSCRIPTURLPATH2.txt 0660 +data/TWiki/VarSCRIPTURLPATH.txt 0660 +data/TWiki/VarSCRIPTURL.txt 0660 +data/TWiki/VarSEARCH.txt 0660 +data/TWiki/VarSERVERTIME2.txt 0660 +data/TWiki/VarSERVERTIME.txt 0660 +data/TWiki/VarSESSIONID.txt 0660 +data/TWiki/VarSESSIONVARIABLE.txt 0660 data/TWiki/VarSESSIONVAR.txt 0660 -data/TWiki/VarDISPLAYTIME.txt 0660 +data/TWiki/VarSPACEDTOPIC.txt 0660 +data/TWiki/VarSPACEOUT.txt 0660 data/TWiki/VarSTARTINCLUDE.txt 0660 -data/TWiki/VarWIKITOOLNAME.txt 0660 -data/TWiki/VarENDSECTION.txt 0660 -data/TWiki/VarSEARCH.txt 0660 -data/TWiki/VarPLUGINVERSION.txt 0660 -data/TWiki/VarLOGIN.txt 0660 -data/TWiki/VarMETASEARCH.txt 0660 -data/TWiki/VarHTTPHOST.txt 0660 -data/TWiki/VarICONURL.txt 0660 -data/TWiki/VarMAKETEXT.txt 0660 -data/TWiki/VarINCLUDE.txt 0660 -data/TWiki/VarTOC.txt 0660 -data/TWiki/VarFAILEDPLUGINS.txt 0660 -data/TWiki/VarICON.txt 0660 +data/TWiki/VarSTARTSECTION.txt 0660 +data/TWiki/VarSTATISTICSTOPIC.txt 0660 data/TWiki/VarSTOPINCLUDE.txt 0660 -data/TWiki/VarREVINFO2.txt 0660 -data/TWiki/VarNOP.txt 0660 -data/TWiki/VarWIKIUSERSTOPIC.txt 0660 -data/TWiki/VarATTACHURL.txt 0660 -data/TWiki/VarHTTPS.txt 0660 -data/TWiki/VarWIKIPREFSTOPIC.txt 0660 -data/TWiki/VarWIKIUSERNAME.txt 0660 -data/TWiki/VarWIKINAME.txt 0660 -data/TWiki/VarSCRIPTNAME.txt 0660 -data/TWiki/VarLANGUAGES.txt 0660 data/TWiki/VarTOC2.txt 0660 -data/TWiki/VarBASEWEB.txt 0660 -data/TWiki/VarHTTP.txt 0660 +data/TWiki/VarTOC.txt 0660 +data/TWiki/VarTOPICLIST.txt 0660 +data/TWiki/VarTOPIC.txt 0660 +data/TWiki/VarTWIKIWEB.txt 0660 +data/TWiki/VarURLPARAM.txt 0660 data/TWiki/VarUSERNAME.txt 0660 -data/TWiki/VarGMTIME.txt 0660 -data/TWiki/VarAUTHREALM.txt 0660 -data/TWiki/VarPUBURLPATH.txt 0660 +data/TWiki/VarVAR.txt 0660 +data/TWiki/VarWEBLIST.txt 0660 +data/TWiki/VarWEBPREFSTOPIC.txt 0660 +data/TWiki/VarWEB.txt 0660 +data/TWiki/VarWIKIHOMEURL.txt 0660 +data/TWiki/VarWIKINAME.txt 0660 +data/TWiki/VarWIKIPREFSTOPIC.txt 0660 +data/TWiki/VarWIKITOOLNAME.txt 0660 +data/TWiki/VarWIKIUSERNAME.txt 0660 +data/TWiki/VarWIKIUSERSTOPIC.txt 0660 +data/TWiki/VarWIKIVERSION.txt 0660 data/TWiki/WabiSabi.txt 0660 data/TWiki/WebAtom.txt 0660 data/TWiki/WebAtomBase.txt 0660 @@ -326,7 +323,7 @@ data/_default/WebStatistics.txt 0660 data/_default/WebTopicCreator.txt 0660 data/_default/WebTopicList.txt 0660 -data/mime.types 0660 +data/mime.types 0440 index.html 0440 lib/Assert.pm 0440 lib/CPAN/lib/Algorithm/Diff.pm 0440 @@ -402,6 +399,7 @@ lib/TWiki/Users/ApacheHtpasswdUser.pm 0440 lib/TWiki/Users/HtPasswdUser.pm 0440 lib/TWiki/Users/Password.pm 0440 +lib/TWiki/Users/TWikiUserMapping.pm 0440 lib/TWiki/Users.pm 0440 lib/TWiki.cfg 0440 lib/TWiki.pm 0440 @@ -415,11 +413,11 @@ locale/zh-tw.po 0440 LICENSE 0440 pub/_work_areas/.htaccess 0440 -pub/_work_areas/README 0440 +pub/_work_areas/README 0660 pub/Main/WebPreferences/favicon.ico 0660 -pub/Main/WebPreferences/logo.gif 0660 +pub/Main/WebPreferences/logo.gif pub/Sandbox/WebPreferences/favicon.ico 0660 -pub/Sandbox/WebPreferences/logo.gif 0660 +pub/Sandbox/WebPreferences/logo.gif pub/TWiki/TWiki/thoth_baboon.gif 0660 pub/TWiki/ATasteOfTWiki/Disney_logo.gif 0660 pub/TWiki/ATasteOfTWiki/BT_logo.gif 0660 @@ -671,6 +669,7 @@ pub/TWiki/TWikiLogos/T-logo.svg 0660 pub/TWiki/TWikiLogos/favicon.ico 0660 pub/TWiki/TWikiTemplates/testscreen.gif 0660 +pub/TWiki/TWikiJavascripts/prototype.js 0660 pub/TWiki/TWikiJavascripts/twiki.js 0660 pub/TWiki/TWikiJavascripts/twiki_attach.js 0660 pub/TWiki/TWikiJavascripts/twiki_edit.js 0660 @@ -685,13 +684,12 @@ pub/Trash/WebPreferences/logo.gif 0660 pub/_default/WebPreferences/favicon.ico 0660 pub/_default/WebPreferences/logo.gif 0660 -pub-htaccess.txt 0440 +pub-htaccess.txt 0660 readme.txt 0440 -robots.txt 0440 -root-htaccess.txt 0440 -subdir-htaccess.txt 0440 +robots.txt 0660 +root-htaccess.txt 0660 +subdir-htaccess.txt 0660 templates/addform.tmpl 0440 -templates/attach.tmpl 0440 templates/attachagain.tmpl 0440 templates/attachnew.tmpl 0440 templates/attachtables.tmpl 0440 @@ -700,9 +698,6 @@ templates/backlinksweb.tmpl 0440 templates/changeform.tmpl 0440 templates/changes.tmpl 0440 -templates/cssmediatypes.tmpl 0440 -templates/css.tmpl 0440 -templates/edit.iejs.tmpl 0440 templates/edit.tmpl 0440 templates/editform.tmpl 0440 templates/edittext.tmpl 0440 @@ -726,7 +721,6 @@ templates/registernotify.tmpl 0440 templates/registernotifyadmin.tmpl 0440 templates/rename.tmpl 0440 -templates/renamebase.tmpl 0440 templates/renameconfirm.tmpl 0440 templates/renamedelete.tmpl 0440 templates/renameweb.tmpl 0440 @@ -748,9 +742,9 @@ templates/view.tmpl 0440 tools/geturl.pl 0550 tools/rewriteshbang.pl 0550 +tools/upgrade_emails.pl 0550 tools/tick_twiki.pl 0550 -tools/upgrade_emails.txt 0550 -twiki_httpd_conf.txt 0440 +twiki_httpd_conf.txt 0660 UpgradeTwiki 0550 !include twikiplugins/ClassicSkin/lib/TWiki/Contrib/ClassicSkin !include twikiplugins/CommentPlugin/lib/TWiki/Plugins/CommentPlugin Index: tools/build.pl =================================================================== --- tools/build.pl (.../TWikiRelease04x00) (revision 9301) +++ tools/build.pl (.../DEVELOP) (revision 9301) @@ -140,27 +140,15 @@ } else { # create rcs file, and ci } - - #only do a checkin, if the files are different (fake the rev number to be the same) - my $cmd = 'perl -pi -e \'s/^(%META:TOPICINFO{.*version=)\"[^\"]*\"(.*)$/$1\"'.($currentRevision).'\"$2/\' '.$new.'/'.$file; + #set revision number #TODO: what about topics with no META DATA? + my $cmd = 'perl -pi -e \'s/^(%META:TOPICINFO{.*version=)\"[^\"]*\"(.*)$/$1\"'.($currentRevision+1).'\"$2/\' '.$new.'/'.$file; `$cmd`; - my $different = `rcsdiff -q $new/$file`; - chomp($different); - - if (defined($different) && ($different ne '')) { - #set revision number #TODO: what about topics with no META DATA? - my $cmd = 'perl -pi -e \'s/^(%META:TOPICINFO{.*version=)\"[^\"]*\"(.*)$/$1\"'.($currentRevision+1).'\"$2/\' '.$new.'/'.$file; - `$cmd`; - #check in - `ci -mbuildrelease -wTWikiContributor -t-new-topic $new/$file 2>&1`; - #get a copy of the latest revsion, no lock - `co -u -M $new/$file 2>&1`; - print "\n"; - } else { - #force unlock - `rcs -u -M $new/$file,v 2>&1`; - print "nochange to $new/$file\n"; - } + + #check in + `ci -mbuildrelease -wTWikiContributor -t-new-topic $new/$file 2>&1`; + #get a copy of the latest revsion, no lock + `co -u -M $new/$file 2>&1`; + print "\n"; } # recursively check in files to RCS @@ -202,7 +190,7 @@ #replaced by the simpler INSTALL.html # print `cd $this->{basedir}/bin ; ./view TWiki.TWikiDocumentation skin plain | $this->{basedir}/tools/fix_local_links.pl > $this->{tmpDir}/TWikiDocumentation.html`; print `cd $this->{basedir}/bin ; ./view TWiki.TWikiHistory skin plain | $this->{basedir}/tools/fix_local_links.pl > $this->{tmpDir}/TWikiHistory.html`; - print `cd $this->{basedir}/bin ; ./view TWiki.TWikiReleaseNotes04x00x00 skin plain | $this->{basedir}/tools/fix_local_links.pl > $this->{tmpDir}/TWikiReleaseNotes04x00x00.html`; + print `cd $this->{basedir}/bin ; ./view TWiki.TWikiReleaseNotes04x00x00 skin plain | $this->{basedir}/tools/fix_local_links.pl > $this->{tmpDir}/TWikiReleaseNotes04x00.html`; print "Automatic documentation built\n"; } @@ -220,7 +208,7 @@ $this->makepath($lastReleaseDir); $this->pushd($lastReleaseDir); print 'Checking out last release to '.$lastReleaseDir."\n"; - `svn co http://svn.twiki.org:8181/svn/twiki/tags/TWikiRelease04x00x00/ .`; + `svn co http://svn.twiki.org:8181/svn/twiki/tags/twiki-20040902-release/ .`; $this->popd(); print "Creating ,v files.\n"; $this->_checkInDir( $lastReleaseDir, $this->{tmpDir}, 'data', Index: lib/TWiki.pm =================================================================== --- lib/TWiki.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki.pm (.../DEVELOP) (revision 9301) @@ -155,11 +155,12 @@ # DO NOT CHANGE THE FORMAT OF $VERSION # automatically expanded on checkin of this module $VERSION = '$Date$ $Rev$ '; - $RELEASE = 'TWiki-4.0.1'; + $RELEASE = 'TWiki-4.0.0'; $VERSION =~ s/^.*?\((.*)\).*: (\d+) .*?$/$1 build $2/; # Default handlers for different %TAGS% %functionTags = ( + ALLUSERS => \&_ALLUSERS, ALLVARIABLES => \&_ALLVARIABLES, ATTACHURL => \&_ATTACHURL, ATTACHURLPATH => \&_ATTACHURLPATH, @@ -168,6 +169,7 @@ ENCODE => \&_ENCODE, FORMFIELD => \&_FORMFIELD, GMTIME => \&_GMTIME, + GROUPS => \&_GROUPS, HTTP_HOST => \&_HTTP_HOST, HTTP => \&_HTTP, HTTPS => \&_HTTPS, @@ -1460,6 +1462,7 @@ return $url; } +# Redirect include links to the web an included topic came from. sub _fixIncludeLink { my( $theWeb, $theLink, $theLabel ) = @_; @@ -1530,7 +1533,7 @@ if( $attname =~ m/\.(txt|html?)$/i ) { unless( $this->{store}->attachmentExists( $web, $topic, $attname )) { - return $this->inlineAlert( 'alerts', 'bad_attachment', + return $this->inlineAlert( 'alerts', 'attachment_missing', $theUrl ); } if( $web ne $theWeb || $topic ne $theTopic ) { @@ -1696,7 +1699,7 @@ $line =~ s/<[\/]?a\b[^>]*>//gi; # create linked bullet item, using a relative link to anchor $line = $tabs.'* '. - CGI::a( { href=>'#'.$anchor }, $line ); + CGI::a( { href=>$this->getScriptUrl( 0, 'view', $web, $topic, '#'=>$anchor ) }, $line ); $result .= "\n".$line; } } @@ -2268,7 +2271,6 @@ # correctly, but you need to think about this if you extend the set of # tags expanded here. return undef unless $_[0] =~ /^(URLPARAM|DATE|(SERVER|GM)TIME|(USER|WIKI)NAME|WIKIUSERNAME|USERINFO)$/; - return $this->_expandTagOnTopicRendering( @_ ); } @@ -2550,8 +2552,11 @@ } sub _FORMFIELD { - my $this = shift; - return $this->{renderer}->renderFORMFIELD( @_ ); + my ( $this, $params, $topic, $web ) = @_; + my $cgiQuery = $this->{cgiQuery}; + my $cgiRev = $cgiQuery->param('rev') if( $cgiQuery ); + $params->{rev} = $cgiRev; + return $this->{renderer}->renderFORMFIELD( $params, $topic, $web ); } sub _TMPLP { @@ -2755,9 +2760,9 @@ # Must handle explicit [[]] before noautolink # '[[TopicName]]' to '[[Web.TopicName][TopicName]]' - $text =~ s/\[\[([^\]]+)\]\]/&_fixIncludeLink( $includedWeb, $1 )/geo; + $text =~ s/\[\[([^\]]+)\]\]/_fixIncludeLink( $includedWeb, $1 )/geo; # '[[TopicName][...]]' to '[[Web.TopicName][...]]' - $text =~ s/\[\[([^\]]+)\]\[([^\]]+)\]\]/&_fixIncludeLink( $includedWeb, $1, $2 )/geo; + $text =~ s/\[\[([^\]]+)\]\[([^\]]+)\]\]/_fixIncludeLink( $includedWeb, $1, $2 )/geo; unless( TWiki::isTrue( $this->{prefs}->getPreferencesValue('NOAUTOLINK')) ) { # Handle WikiWords @@ -2824,8 +2829,7 @@ # Only does simple search for topicmoved at present, can be expanded when required # SMELL: this violates encapsulation of Store and Meta, by exporting -# the assumption that meta-data is stored embedded inside topic -# text. +# the assumption that meta-data is stored embedded inside topic text. sub _METASEARCH { my( $this, $params ) = @_; @@ -3336,12 +3340,46 @@ } if ($info =~ /\$groups/) { my @groupNames = map {$_->webDotWikiName();} $user->getGroups(); +# push(@groupNames, 'isAdmin()') if $user->isAdmin(); my $groups = join(', ', @groupNames); $info =~ s/\$groups\b/$groups/g; } - return $info; } +sub _GROUPS { + my ( $this, $params ) = @_; + + my @groupNames = map + { + ' * '.$_->webDotWikiName(). + '{'.$_->login().'}'. + ":\n * ". + join(', ', map + { + $_->webDotWikiName() + .'{'.$_->login().'}' + } + @{$_->groupMembers()}). + ''; + } $this->{users}->getAllGroups(); + push(@groupNames, ' * TWiki::cfg{SuperAdminGroup} :('.$TWiki::cfg{SuperAdminGroup}.')'); + my $groups = join(" \n", @groupNames); + + return $groups; +} + +sub _ALLUSERS { +my ( $this, $params ) = @_; + my @userNames = map + { + ' * '.$_->webDotWikiName(). + ' {'.$_->login().'}' + } $this->{users}->getAllLoadedUsers(); + my $users = join(" \n", @userNames); + + return $users; +} + 1; Property changes on: lib/TWiki.pm ___________________________________________________________________ Name: LASTBUILD - BUILD TWiki-4.0.1 at Tue Feb 7 15:08:34 2006 GMT + BUILD TWiki-4.0.2 at Mon Feb 27 01:09:52 2006 GMT Index: lib/TWiki.cfg =================================================================== --- lib/TWiki.cfg (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki.cfg (.../DEVELOP) (revision 9301) @@ -91,7 +91,7 @@ # **PATH M** # This is the 'cgi-bin' part of URLs used to access the TWiki bin # directory e.g. /twiki/bin

-# See http://twiki.org/cgi-bin/view/TWiki.ShorterURLCookbook for more information on setting up +# See http://twiki.org/cgi-bin/view/TWiki.ShorterUrlCookbook for more information on setting up # TWiki to use shorter script URLs. # $cfg{ScriptUrlPath} = '/twiki/bin'; @@ -127,13 +127,13 @@ #---+ Operating system # **STRING 20** -# {OS} and {DetailedOS} are calculated in the TWiki code. You +# EXPERT {OS} and {DetailedOS} are calculated in the TWiki code. You # should only need to override if there is something badly wrong with # those calculations.
# {OS} may be one of UNIX WINDOWS VMS DOS MACINTOSH OS2 # $cfg{OS} = # **STRING 20** -# The value of Perl $OS +# EXPERT The value of Perl $OS # $cfg{DetailedOS} = #---+ Security setup @@ -153,8 +153,31 @@ # cons of using persistent sessions. $cfg{UseClientSessions} = 1; +# **STRING 100** +# Absolute file path of the directory in which session files are stored. +# Defaults to /tmp. +# Security Note: The directory must not be +# browseable from the web, otherwise it could be used to mount an attack on +# the server! +$cfg{Sessions}{Dir} = '/tmp'; + +# **STRING 20** +# EXPERT Set the session timeout, in seconds. The session will be cleared after this +# amount of time without the session being accessed. The default is 6 hours +# (21600 seconds).

+# NoteBy default, session expiry is done "on the fly" by the same +# processes used to +# serve TWiki requests. As such it imposes a load on the server. When +# there are very large numbers of session files, this load can become +# significant. For best performance, you can set {Sessions}{ExpireAfter} +# to a negative number, which will mean that TWiki won't try to clean +# up expired sessions using CGI processes. Instead you should use a cron +# job to clean up expired sessions. The standard maintenance cron script +# tools/tick_twiki.pl includes this function. +$cfg{Sessions}{ExpireAfter} = 21600; + # **BOOLEAN** -# If you have persistent sessions enabled, then TWiki will use a cookie in +# EXPERT If you have persistent sessions enabled, then TWiki will use a cookie in # the browser to store the session ID. If the client has cookies disabled, # then TWiki will not be able to record the session. As a fallback, TWiki # can rewrite local URLs to pass the session ID as a parameter to the URL. @@ -166,7 +189,7 @@ $cfg{Sessions}{IDsInURLs} = 0; # **BOOLEAN** -# It's important to check that the user trying to use a session is the +# EXPERT It's important to check that the user trying to use a session is the # same user who originally created the session. TWiki does this by making # sure, before initializing a previously stored session, that the IP # address stored in the session matches the IP address of the user asking @@ -175,7 +198,7 @@ $cfg{Sessions}{UseIPMatching} = 1; # **BOOLEAN** -# For compatibility with older versions, TWiki supports the mapping of the +# EXPERT For compatibility with older versions, TWiki supports the mapping of the # clients IP address to a session ID. You can only use this if all # client IP addresses are known to be unique. # If this option is enabled, TWiki will not store cookies in the @@ -184,29 +207,6 @@ # this option on, you can safely turn {Sessions}{IDsInURLs} off. $cfg{Sessions}{MapIP2SID} = 0; -# **STRING 100** -# Absolute file path of the directory in which session files are stored. -# Defaults to /tmp. -# Security Note: The directory must not be -# browseable from the web, otherwise it could be used to mount an attack on -# the server! -$cfg{Sessions}{Dir} = '/tmp'; - -# **STRING 20** -# Set the session timeout, in seconds. The session will be cleared after this -# amount of time without the session being accessed. The default is 6 hours -# (21600 seconds).

-# NoteBy default, session expiry is done "on the fly" by the same -# processes used to -# serve TWiki requests. As such it imposes a load on the server. When -# there are very large numbers of session files, this load can become -# significant. For best performance, you can set {Sessions}{ExpireAfter} -# to a negative number, which will mean that TWiki won't try to clean -# up expired sessions using CGI processes. Instead you should use a cron -# job to clean up expired sessions. The standard maintenance cron script -# tools/tick_twiki.pl includes this function. -$cfg{Sessions}{ExpireAfter} = 21600; - #---++ Authentication # **SELECT none,TWiki::Client::ApacheLogin,TWiki::Client::TemplateLogin** # TWiki supports different ways of responding when the user asks to log @@ -225,8 +225,44 @@ # $cfg{LoginManager} = 'none'; +# **STRING 20** +# Guest user's login name (guest) +$cfg{DefaultUserLogin} = 'guest'; + +# **STRING 20** +# Guest user's wiki name (TWikiGuest) +$cfg{DefaultUserWikiName} = 'TWikiGuest'; + +# **STRING 20** +# An admin user login is is required by the install script for some addons and +# plugins, usually to gain write access to the TWiki web. (TWikiAdminGroup) +$cfg{AdminUserWikiName} = 'TWikiAdminGroup'; + +# **STRING 20** +# EXPERT Group of users that can use special action=repRev and action=delRev +# on =save= and ALWAYS have edit powers. See TWiki.TWikiDocumentation +# for an explanation of twiki groups. This user will also run all the +# standard cron jobs, such as statistics and mail notification. +# Make sure you edit this topic if you enable authentication +$cfg{SuperAdminGroup} = 'TWikiAdminGroup'; + +# **STRING 20** +# EXPERT Name of topic in the {UsersWebName} web where registered users +# are listed. Automatically maintained by the standard +# registration scripts. If you change this setting you will have to +# use TWiki to manually rename the existing topic +$cfg{UsersTopicName} = 'TWikiUsers'; + +# **BOOLEAN** +# EXPERT Map login name to Wiki name via the mapping in the topic named +# in {UsersTopicName}. Set this to $FALSE for .htpasswd +# authenticated sites where the user's wiki name is the +# name they use to log in, or if you have some other way of +# making the mapping to a Wiki name (e.g. a local Plugin). +$cfg{MapUserToWikiName} = $TRUE; + # **STRING 100** -# Comma-separated list of scripts that require the user to authenticate. +# EXPERT Comma-separated list of scripts that require the user to authenticate. # With TemplateLogin, any time an unauthenticated user attempts to access # one of these scripts, they will be redirected to the login script. With # ApacheLogin, they will be redirected to the logon script (note @@ -242,24 +278,11 @@ $cfg{AuthScripts} = 'attach,edit,manage,rename,save,upload,viewauth,rdiffauth'; # **STRING 80** -# Authentication realm. This is normally only used in the login prompt +# EXPERT Authentication realm. This is normally only used in the login prompt # screen by the TWiki::Client::TemplateLogin manager. $cfg{AuthRealm} = 'Enter your TWiki.LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. !JohnSmith, unless you chose otherwise). Visit TWiki.TWikiRegistration if you do not have one.'; -# **STRING 20** -# Guest user's login name (guest) -$cfg{DefaultUserLogin} = 'guest'; - -# **STRING 20** -# Guest user's wiki name (TWikiGuest) -$cfg{DefaultUserWikiName} = 'TWikiGuest'; - -# **STRING 20** -# An admin user login is is required by the install script for some addons and -# plugins, usually to gain write access to the TWiki web. (TWikiAdminGroup) -$cfg{AdminUserWikiName} = 'TWikiAdminGroup'; - #---++ Passwords # **SELECT none,TWiki::Users::HtPasswdUser,TWiki::Users::ApacheHtpasswdUser** # Name of the password handler implementation. The password handler manages @@ -307,6 +330,12 @@ # $cfg{Htpasswd}{Encoding} = 'crypt'; +#---++ User Mapping +# **SELECT TWiki::Users::TWikiUserMapping** +# SMELL! THIS IS INADEQUATELY DESCRIBED! +$cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping'; + +#---++ Registration # **BOOLEAN** # If you want users to be able to use a login ID other than their # wikiname, you need to turn this on. It controls whether the 'LoginName' @@ -316,40 +345,18 @@ $cfg{Register}{AllowLoginName} = $FALSE; # **BOOLEAN** -# Hide password in registration email to the *user* +# EXPERT Hide password in registration email to the *user* # Note that TWiki sends admins a separate confirmation. $cfg{Register}{HidePasswd} = $TRUE; # **BOOLEAN** -# Whether registrations must be verified by the user following +# EXPERT Whether registrations must be verified by the user following # a link sent in an email to the user's registered email address $cfg{Register}{NeedVerification} = $TRUE; -# **BOOLEAN** -# Map login name to Wiki name via the mapping in the topic named -# in {UsersTopicName}. Set this to $FALSE for .htpasswd -# authenticated sites where the user's wiki name is the -# name they use to log in, or if you have some other way of -# making the mapping to a Wiki name (e.g. a local Plugin). -$cfg{MapUserToWikiName} = $TRUE; - -# **STRING 20** -# Group of users that can use special action=repRev and action=delRev -# on =save= and ALWAYS have edit powers. See TWiki.TWikiDocumentation -# for an explanation of twiki groups. This user will also run all the -# standard cron jobs, such as statistics and mail notification. -# Make sure you edit this topic if you enable authentication -$cfg{SuperAdminGroup} = 'TWikiAdminGroup'; - -# **STRING 20** -# Name of topic in the {UsersWebName} web where registered users -# are listed. Automatically maintained by the standard -# registration scripts. If you change this setting you will have to -# use TWiki to manually rename the existing topic -$cfg{UsersTopicName} = 'TWikiUsers'; - +#---++ Paths # **PATH** -# Path control. If set, overrides the default PATH setting to control +# EXPERT Path control. If set, overrides the default PATH setting to control # where TWiki looks for programs. Check notes for your operating # system. NOTE: it is better to use full pathnames in the paths to # external programs, rather than relying on this path. @@ -397,37 +404,38 @@ # $cfg{SafeEnvPath} = '/bin:/usr/bin'; +#---++ Miscellaneous # **BOOLEAN** -# Remove .. from %INCLUDE{filename}%, to stop includes +# EXPERT Remove .. from %INCLUDE{filename}%, to stop includes # of relative paths. $cfg{DenyDotDotInclude} = $TRUE; # **BOOLEAN** -# Allow the use of SCRIPT tags in content. if this is set false, all +# EXPERTAllow the use of SCRIPT tags in content. if this is set false, all # SCRIPT sections will be removed from the body of topics. They can still # be used in the HEAD section, though. Note that this may prevent some # plugins from functioning correctly. $cfg{AllowInlineScript} = $TRUE; # **REGEX** -# Filter-in regex for uploaded (attached) file names (Matching +# EXPERTFilter-in regex for uploaded (attached) file names (Matching # filenames will have .txt appended) WARNING: Be sure to update # this list with any configuration or script filetypes that are # automatically run by your web server $cfg{UploadFilter} = qr/^(\.htaccess|.*\.(?i)(?:php[0-9s]?|phtm[l]?|pl|py|cgi))$/; # **REGEX** -# Filter-in regex for webnames, topic names, usernames, include paths +# EXPERTFilter-in regex for webnames, topic names, usernames, include paths # and skin names $cfg{NameFilter} = qr/[\s\*?~^\$@%`"'&;|<>\x00-\x1f]/; # **BOOLEAN** -# If this is set, the the search module will use more relaxed +# EXPERT If this is set, the the search module will use more relaxed # rules governing regular expressions searches. $cfg{ForceUnsafeRegexes} = $FALSE; # **BOOLEAN** -# Build the path to /twiki/bin from the URL that was used to get this +# EXPERT Build the path to /twiki/bin from the URL that was used to get this # far. This can be useful when rewriting rules or redirection are used # to shorten URLs. Note that displayed links are incorrect after failed # authentication if this is set, so unless you really know what you are @@ -435,7 +443,7 @@ $cfg{GetScriptUrlFromCgi} = $FALSE; # **BOOLEAN** -# Remove port number from URL. If set, and a URL is given with a port +# EXPERT Remove port number from URL. If set, and a URL is given with a port # number e.g. http://my.server.com:8080/twiki/bin/view, this will strip # off the port number before using the url in links. $cfg{RemovePortNumber} = $FALSE; @@ -604,14 +612,14 @@ $cfg{Site}{Locale} = 'en_US.ISO-8859-1'; # **BOOLEAN** -# Disable to force explicit listing of national chars in +# EXPERT Disable to force explicit listing of national chars in # regexes, rather than relying on locale-based regexes. Intended # for Perl 5.6 or higher on platforms with broken locales: should # only be disabled if you have locale problems. $cfg{Site}{LocaleRegexes} = $TRUE; # **STRING** -# If a suitable working locale is not available (i.e. {UseLocale} +# EXPERT If a suitable working locale is not available (i.e. {UseLocale} # is disabled), OR you are using Perl 5.005 (with or without working # locales), OR {Site}{LocaleRegexes} is disabled, you can use WikiWords with # accented national characters by putting any '8-bit' accented @@ -626,10 +634,11 @@ # locales. $cfg{UpperNational} = ''; # **STRING** +# EXPERT $cfg{LowerNational} = ''; # **STRING 50** -# Change this only if you must match a specific locale (from 'locale -a') +# EXPERT Change this only if you must match a specific locale (from 'locale -a') # whose character set is not supported by your chosen conversion module # (i.e. Encode for Perl 5.8 or higher, or Unicode::MapUTF8 for other Perl # versions). For example, if the locale 'ja_JP.eucjp' exists on your system @@ -639,32 +648,35 @@ $cfg{Site}{CharSet} = undef; # **STRING 20** -# Site language - change this from the default if it is incorrect. Only +# EXPERT Site language - change this from the default if it is incorrect. Only # used if {UseLocale} is set. $cfg{Site}{Lang} = undef; # **STRING 20** -# Site language - change this from the default if it is incorrect. Only +# EXPERT Site language - change this from the default if it is incorrect. Only # used if {UseLocale} is set. $cfg{Site}{FullLang} = undef; # **BOOLEAN** -# Change non-existant plural topic name to singular, +# EXPERT Change non-existant plural topic name to singular, # e.g. TestPolicies to TestPolicy. Only works in English. $cfg{PluralToSingular} = $TRUE; #---+ Store settings -# **SELECT RcsWrap,RcsLite,Subversive** +# **SELECT RcsWrap,RcsLite** # Default store implementation. #

  • RcsWrap uses normal RCS executables.
  • #
  • RcsLite uses a 100% Perl simplified implementation of RCS. # RcsLite is useful if you don't have, and can't install, RCS - for # example, on a hosted platform. It will work, and is compatible with -# RCS, but is not quite as fast.
  • -#
  • Subversive is a thin layer over the Subversion version control system. -# It is designed for use by developers in a subversion checkout area, -# and is probably not useful to anyone else.
+# RCS, but is not quite as fast. +# EXPERT You can manually add options to LocalSite.cfg to select a +# different store for each web. If $TWiki::cfg{Store}{Fred} is defined, it will +# be taken as the name of a perl class (which must implement the methods of +# TWiki::Store::RcsFile). +# The TWiki::Store::Subversive class is an example implementation using the +# Subversion version control system as a data store. $cfg{StoreImpl} = 'RcsWrap'; # The quote used for command arguments is normally ' for @@ -679,21 +691,6 @@ $cfg{RCS}{ExtOption} = "-x,v" if $OS eq "WINDOWS"; } -# **BOOLEAN** -# Some file-based Store implementations (RcsWrap and RcsLite for -# example) store attachment meta-data separately from the actual attachments. -# This means that it is possible to have a file in an attachment directory -# that is not seen as an attachment by TWiki. Sometimes it is desirable to -# be able to simply copy files into a directory and have them appear as -# attachments, and that's what this feature allows you to do. -# Considered experimental. -$cfg{AutoAttachPubFiles} = $TRUE; - -# **REGEX** -# Perl regular expression matching suffixes valid on plain text files -# Defines which attachments will be treated as ASCII in RCS -$cfg{RCS}{asciiFileSuffixes} = '.(txt|html|xml|pl)$'; - # **OCTAL** # File security for new directories. You may have to adjust these # permissions to allow (or deny) users other than the webserver user access @@ -709,12 +706,27 @@ $cfg{RCS}{filePermission}= 0644; # **BOOLEAN** -# Set this if you want to use RCS subdirectories instead of storing +# EXPERT Some file-based Store implementations (RcsWrap and RcsLite for +# example) store attachment meta-data separately from the actual attachments. +# This means that it is possible to have a file in an attachment directory +# that is not seen as an attachment by TWiki. Sometimes it is desirable to +# be able to simply copy files into a directory and have them appear as +# attachments, and that's what this feature allows you to do. +# Considered experimental. +$cfg{AutoAttachPubFiles} = $TRUE; + +# **REGEX** +# EXPERT Perl regular expression matching suffixes valid on plain text files +# Defines which attachments will be treated as ASCII in RCS +$cfg{RCS}{asciiFileSuffixes} = '.(txt|html|xml|pl)$'; + +# **BOOLEAN** +# EXPERT Set this if you want to use RCS subdirectories instead of storing # ,v files alongside the topics. Not recommended. $cfg{RCS}{useSubDir} = $FALSE; # **BOOLEAN** -# Set this if your RCS cannot check out using the -p option. +# EXPERT Set this if your RCS cannot check out using the -p option. # May be needed in some windows installations (not required for cygwin) $cfg{RCS}{coMustCopy} = $FALSE; @@ -733,29 +745,29 @@ # **COMMAND** # RcsWrap initialise a file as binary. # %FILENAME|F% will be expanded to the filename. -$cfg{RCS}{initBinaryCmd} = "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -q -i -t-none -kb %FILENAME|F%"; +$cfg{RCS}{initBinaryCmd} = "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -i -t-none -kb %FILENAME|F%"; # **COMMAND** # RcsWrap initialise a topic file. -$cfg{RCS}{initTextCmd} = "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -q -i -t-none -ko %FILENAME|F%"; +$cfg{RCS}{initTextCmd} = "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -i -t-none -ko %FILENAME|F%"; # **COMMAND** # RcsWrap uses this on Windows to create temporary binary files during upload. -$cfg{RCS}{tmpBinaryCmd} = "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -q -kb %FILENAME|F%"; +$cfg{RCS}{tmpBinaryCmd} = "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -kb %FILENAME|F%"; # **COMMAND** # RcsWrap check-in. # %USERNAME|S% will be expanded to the username. # %COMMENT|U% will be expanded to the comment. $cfg{RCS}{ciCmd} = - "$cfg{RCS}{BinDir}/ci $cfg{RCS}{ExtOption} -q -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%"; + "$cfg{RCS}{BinDir}/ci $cfg{RCS}{ExtOption} -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%"; # **COMMAND** # RcsWrap check in, forcing the date. # %DATE|D% will be expanded to the date. $cfg{RCS}{ciDateCmd} = - "$cfg{RCS}{BinDir}/ci $cfg{RCS}{ExtOption} -q -m%COMMENT|U% -t-none -d%DATE|D% -u -w%USERNAME|S% %FILENAME|F%", + "$cfg{RCS}{BinDir}/ci $cfg{RCS}{ExtOption} -m%COMMENT|U% -t-none -d%DATE|D% -u -w%USERNAME|S% %FILENAME|F%", # **COMMAND** # RcsWrap check out. # %REVISION|N% will be expanded to the revision number $cfg{RCS}{coCmd} = - "$cfg{RCS}{BinDir}/co $cfg{RCS}{ExtOption} -q -p%REVISION|N% -ko %FILENAME|F%"; + "$cfg{RCS}{BinDir}/co $cfg{RCS}{ExtOption} -p%REVISION|N% -ko %FILENAME|F%"; # **COMMAND** # RcsWrap file history. $cfg{RCS}{histCmd} = @@ -773,19 +785,19 @@ # **COMMAND** # RcsWrap differences between two revisions. $cfg{RCS}{diffCmd} = - "$cfg{RCS}{BinDir}/rcsdiff $cfg{RCS}{ExtOption} -q -w -B -r%REVISION1|N% -r%REVISION2|N% -ko --unified=%CONTEXT|N% %FILENAME|F%"; + "$cfg{RCS}{BinDir}/rcsdiff $cfg{RCS}{ExtOption} -w -B -r%REVISION1|N% -r%REVISION2|N% -ko --unified=%CONTEXT|N% %FILENAME|F%"; # **COMMAND** # RcsWrap lock a file. $cfg{RCS}{lockCmd} = - "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -q -l %FILENAME|F%"; + "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -l %FILENAME|F%"; # **COMMAND** # RcsWrap unlock a file. $cfg{RCS}{unlockCmd} = - "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -q -u %FILENAME|F%"; + "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -u %FILENAME|F%"; # **COMMAND** # RcsWrap delete a specific revision. $cfg{RCS}{delRevCmd} = - "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -q -o%REVISION|N% %FILENAME|F%"; + "$cfg{RCS}{BinDir}/rcs $cfg{RCS}{ExtOption} -o%REVISION|N% %FILENAME|F%"; # **PATH** # Path to the directory where the RCS store implementation will create @@ -802,19 +814,19 @@ $cfg{EnableHierarchicalWebs} = 1; # **STRING 20** -# Name of the web where documentation and default preferences are held. If you +# EXPERT Name of the web where documentation and default preferences are held. If you # change this setting, you must make sure the web exists and contains # appropriate content, and upgrade scripts may no longer work (i.e. don't # change it unless you are certain that you know what you are doing!) $cfg{SystemWebName} = 'TWiki'; # **STRING 20** -# Name of the web used as a trashcan (where deleted topics are moved) +# EXPERT Name of the web used as a trashcan (where deleted topics are moved) # If you change this setting, you must make sure the web exists. $cfg{TrashWebName} = 'Trash'; # **STRING 20** -# Name of the web where usertopics are stored. If you +# EXPERT Name of the web where usertopics are stored. If you # change this setting, you must make sure the web exists and contains # appropriate content, and upgrade scripts may no longer work # (i.e. don't change it unless you are certain that you know what @@ -823,7 +835,7 @@ #---+ Mail and Proxies # **STRING 20** -# Name of topic in each web that has notification registrations. +# EXPERT Name of topic in each web that has notification registrations. # If you change this setting you will have to # use TWiki to manually rename the topic in all existing webs $cfg{NotifyTopicName} = 'WebNotify'; @@ -856,7 +868,7 @@ $cfg{SMTP}{SENDERHOST} = ''; # **STRING 30** -# Some environments require outbound HTTP traffic to go through a proxy +# EXPERT Some environments require outbound HTTP traffic to go through a proxy # server. (e.g. proxy.your.company). # CAUTION This setting can be overridden by a PROXYHOST setting # in TWikiPreferences. Make sure you delete the setting from there if @@ -864,24 +876,38 @@ $cfg{PROXY}{HOST} = ''; # **STRING 30** -# Some environments require outbound HTTP traffic to go through a proxy +# EXPERT Some environments require outbound HTTP traffic to go through a proxy # server. Set the port number here (e.g: 8080). # CAUTION This setting can be overridden by a PROXYPORT setting # in TWikiPreferences. Make sure you delete the setting from there if you # are using a TWikiPreferences topic from a previous release of TWiki. $cfg{PROXY}{PORT} = ''; +#---+ Statistics + +# **NUMBER** +# Number of top viewed topics to show in statistics topic +$cfg{Stats}{TopViews} = 10; + +# **NUMBER** +# Number of top contributors to show in statistics topic +$cfg{Stats}{TopContrib} = 10; + +# **STRING 20** +# EXPERT Name of statistics topic +$cfg{Stats}{TopicName} = 'WebStatistics'; + #---+ Miscellaneous settings # **STRING 50** -# Set to enable experimental mirror-site support. If this name is +# EXPERT Set to enable experimental mirror-site support. If this name is # different to MIRRORSITENAME, then this TWiki is assumed to be a # mirror of another. You are highly recommended not # to dabble with this experimental, undocumented, untested feature! $cfg{SiteWebTopicName} = ''; # **STRING 20** -# Name of site-level preferences topic in the {SystemWebName} web. +# EXPERT Name of site-level preferences topic in the {SystemWebName} web. # If you change this setting you will have to # use TWiki and *manually* rename the existing topic. # (i.e. don't change it unless you are certain that you know what @@ -889,7 +915,7 @@ $cfg{SitePrefsTopicName} = 'TWikiPreferences'; # **STRING 40** -# Web.TopicName of the site-level local preferences topic. If this topic +# EXPERT Web.TopicName of the site-level local preferences topic. If this topic # exists, any settings in it will override settings in # {SitePrefsTopicName}.
# You are strongly recommended to keep all your local changes in @@ -898,7 +924,7 @@ $cfg{LocalSitePreferences} = 'Main.TWikiPreferences'; # **STRING 20** -# Name of main topic in a web. +# EXPERT Name of main topic in a web. # If you change this setting you will have to # use TWiki to manually rename the topic in all existing webs # (i.e. don't change it unless you are certain that you know what @@ -906,31 +932,19 @@ $cfg{HomeTopicName} = 'WebHome'; # **STRING 20** -# Name of preferences topic in a web. +# EXPERT Name of preferences topic in a web. # If you change this setting you will have to # use TWiki to manually rename the topic in all existing webs # (i.e. don't change it unless you are certain that you know what # you are doing!) $cfg{WebPrefsTopicName} = 'WebPreferences'; -# **STRING 20** -# Name of statistics topic -$cfg{Stats}{TopicName} = 'WebStatistics'; - # **NUMBER** -# Number of top viewed topics to show in statistics topic -$cfg{Stats}{TopViews} = 10; - -# **NUMBER** -# Number of top contributors to show in statistics topic -$cfg{Stats}{TopContrib} = 10; - -# **NUMBER** -# How many links to other revisions to show in the bottom bar. 0 for all +# EXPERT How many links to other revisions to show in the bottom bar. 0 for all $cfg{NumberOfRevisions} = 4; # **NUMBER** -# If this is set to a > 0 value, and the revision control system +# EXPERT If this is set to a > 0 value, and the revision control system # supports it (RCS does), then if a second edit of the same topic # is done by the same user within this number of seconds, a new # revision of the topic will NOT be created (the top revision will @@ -939,7 +953,7 @@ $cfg{ReplaceIfEditedAgainWithin} = 3600; # **NUMBER** -# When a topic is edited, the user takes a "lease" on that topic. +# EXPERT When a topic is edited, the user takes a "lease" on that topic. # If another user tries to also edit the topic while the lease # is still active, they will get a warning. Leases are released # automatically when the topic is saved; otherwise they remain active @@ -951,7 +965,7 @@ $cfg{LeaseLength} = 3600; # **NUMBER** -# Even if the other users' lease has expired, then you can specify that +# EXPERT Even if the other users' lease has expired, then you can specify that # they should still get a (less forceful) warning about the old lease for # some additional time after the lease expired. You can set this to 0 to # suppress these extra warnings completely, or to -1 so they are always @@ -959,19 +973,19 @@ $cfg{LeaseLengthLessForceful} = 3600; # **PATH** -# Pathname to file that maps file suffixes to MIME types : +# EXPERT Pathname to file that maps file suffixes to MIME types : # For Apache server set this to Apache's mime.types file pathname, # for example /etc/httpd/mime.types, or use the default shipped in # the TWiki data directory. $cfg{MimeTypesFileName} = "$dataDir/mime.types"; # **PATH** -# Directory where registration approvals are held. Should be somewhere +# EXPERT Directory where registration approvals are held. Should be somewhere # that is not browsable from the web. $cfg{RegistrationApprovals} = "$dataDir/RegistrationApprovals"; # **BOOLEAN** -# If set, this will cause TWiki to treat warnings as errors that will +# EXPERT If set, this will cause TWiki to treat warnings as errors that will # cause TWiki to die. Provided for use by Plugin and Skin developers, # who should develop with it switched on. $cfg{WarningsAreErrors} = $FALSE; Index: lib/TWiki/Attach.pm =================================================================== --- lib/TWiki/Attach.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Attach.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::Attach @@ -39,6 +39,7 @@ use TWiki::Attrs; use TWiki::Store; +use TWiki::Users; use TWiki::User; use TWiki::Prefs; use TWiki::Meta; @@ -89,7 +90,11 @@ my $rows = ''; my $row = $templates->expandTemplate('ATTACH:files:row'.$A); - foreach my $attachment ( sort { $a->{date} <=> $b->{date} } @attachments ) { + # note: ($a->{date}||0) in case date field is not set. undef <=> undef + # seems to cause infinite looping in the sort Perl 5.6 uses :-( + foreach my $attachment ( + sort { ($a->{date} || 0) <=> ($b->{date} || 0) } + @attachments ) { my $attrAttr = $attachment->{attr}; if( ! $attrAttr || ( $showAttr && $attrAttr =~ /^[$showAttr]*$/ )) { @@ -223,9 +228,12 @@ return TWiki::Time::formatTime( $info->{date} ); } elsif ( $attr eq 'USER' ) { - my( $w, $t ) = $this->{session}->normalizeWebTopicName( - $TWiki::cfg{UsersWebName}, $info->{user} ); - return $w.'.'.$t; + my $user = $this->{session}->{users}->findUser($info->{user}); + if (defined($user)) { + return $user->webDotWikiName(); + } else { + return $info->{user}; + } } else { return "\0A_$attr\0"; Index: lib/TWiki/Upgrade/UpgradeToDakar.pm =================================================================== --- lib/TWiki/Upgrade/UpgradeToDakar.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Upgrade/UpgradeToDakar.pm (.../DEVELOP) (revision 9301) @@ -27,7 +27,7 @@ package TWiki::Upgrade::UpgradeToDakar; -=begin twiki +=pod ---+ UpgradeTwiki Index: lib/TWiki/Client.pm =================================================================== --- lib/TWiki/Client.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Client.pm (.../DEVELOP) (revision 9301) @@ -181,19 +181,19 @@ if( $TWiki::cfg{Sessions}{MapIP2SID} ) { # map the end user IP address to SID my $sid = _IP2SID(); - if( $sid ) { - $cgisession = CGI::Session->new( - undef, $sid, { Directory => $TWiki::cfg{Sessions}{Dir} } ); - } else { - $cgisession = CGI::Session->new( - undef, undef, - { Directory => $TWiki::cfg{Sessions}{Dir} } ); + $cgisession = CGI::Session->new( + undef, $sid, + { Directory => $TWiki::cfg{Sessions}{Dir} } ) || + die $CGI::Session::errstr; + unless( $sid ) { + # register the new IP->SID mapping _IP2SID( $cgisession->id() ); } } else { $cgisession = CGI::Session->new( undef, $query, - { Directory => $TWiki::cfg{Sessions}{Dir} } ); + { Directory => $TWiki::cfg{Sessions}{Dir} } ) || + die $CGI::Session::errstr;; } $authUser ||= TWiki::Sandbox::untaintUnchecked( Index: lib/TWiki/User.pm =================================================================== --- lib/TWiki/User.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/User.pm (.../DEVELOP) (revision 9301) @@ -22,6 +22,7 @@ use strict; use Assert; use TWiki; +use Error qw( :try ); =pod @@ -74,6 +75,7 @@ $this->{session} = $session; $this->{login} = $name; +# $this->{wikiname} = $wikiname; my( $web, $topic ) = $session->normalizeWebTopicName( $TWiki::cfg{UsersWebName}, $wikiname ); $this->{web} = $web; @@ -101,13 +103,14 @@ ---++ ObjectMethod webDotWikiName() -> $webDotWiki Return the fully qualified wikiname of the user +TODO: create a DisplayName function to allow the disablement of WikiWord user names =cut sub webDotWikiName { my $this = shift; ASSERT($this->isa( 'TWiki::User')) if DEBUG; - return "$this->{web}.$this->{wikiname}"; + return $this->web().'.'.$this->wikiName(); } =pod @@ -358,15 +361,16 @@ sub isAdmin { my $this = shift; ASSERT($this->isa( 'TWiki::User')) if DEBUG; - unless( $this->{isKnownAdmin} ) { $this->{isKnownAdmin} = $TWiki::cfg{SuperAdminGroup} =~ /\b$this->{wikiname}$/; unless( $this->{isKnownAdmin} ) { my $sag = $this->{session}->{users}->findUser( - $TWiki::cfg{SuperAdminGroup} ); - ASSERT($sag->isa( 'TWiki::User')) if DEBUG; - $this->{isKnownAdmin} = $this->isInList( $sag->groupMembers() ); + $TWiki::cfg{SuperAdminGroup}, undef, 0 ); #we don't load the Admin group, users won't be + #recognized as being members of it, + #causing creating new webs and renaming + #old ones to fail + $this->{isKnownAdmin} = $this->isInList( $sag->groupMembers() ) if (defined($sag)); } } return $this->{isKnownAdmin}; @@ -386,11 +390,13 @@ #because we lazy load the groups, we can't make this conditional on # the existance of some groups in the array. - my @groupList = $this->{session}->{users}->_getListOfGroups(); + my @groupList = $this->{session}->{users}->{usermappingmanager}->getListOfGroups(); foreach my $g (@groupList) { my $groupObject = $this->{session}->{users}->findUser($g); #simply calling isInList() will make sure the group added to $this->{groups} - $this->isInList( $groupObject->groupMembers() ); + + ASSERT($groupObject->isGroup()); + $groupObject->groupMembers(); } return @{$this->{groups}}; @@ -446,6 +452,7 @@ return $this->wikiName() =~ /Group$/; } + =pod ---++ ObjectMethod groupMembers() -> @members @@ -458,31 +465,8 @@ sub groupMembers { my $this = shift; ASSERT($this->isa( 'TWiki::User')) if DEBUG; - ASSERT( $this->isGroup()) if DEBUG; - my $store = $this->{session}->{store}; - - if( !defined $this->{members} && - $store->topicExists( $this->{web}, $this->{wikiname} )) { - my $text = - $store->readTopicRaw( undef, - $this->{web}, $this->{wikiname}, - undef ); - foreach( split( /\r?\n/, $text ) ) { - if( /$TWiki::regex{setRegex}GROUP\s*=\s*(.+)$/ ) { - next unless( $1 eq 'Set' ); - # Note: if there are multiple GROUP assignments in the - # topic, only the last will be taken. - $this->{members} = - $this->{session}->{users}->expandUserList( $2 ); - } - } - # backlink the user to the group - foreach my $user ( @{$this->{members}} ) { - push( @{$user->{groups}}, $this ); - } - } - - return $this->{members}; + + return $this->{session}->{users}->{usermappingmanager}->groupMembers($this); } 1; Index: lib/TWiki/Render.pm =================================================================== --- lib/TWiki/Render.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Render.pm (.../DEVELOP) (revision 9301) @@ -761,6 +761,7 @@ $opt = ' target="_top"'; } $text ||= $url; + # SMELL: Can't use CGI::a here, because it encodes ampersands in # the link, and those have already been encoded once in the # rendering loop (they are identified as "stand-alone"). One @@ -793,6 +794,7 @@ my $formTopic = $params->{topic}; my $altText = $params->{alttext}; my $default = $params->{default}; + my $rev = $params->{rev}; my $format = $params->{'format'}; unless ( $format ) { @@ -824,7 +826,7 @@ unless ( $meta ) { my $dummyText; ( $meta, $dummyText ) = - $store->readTopic( $this->{session}->{user}, $formWeb, $formTopic, undef ); + $store->readTopic( $this->{session}->{user}, $formWeb, $formTopic, $rev ); $this->{ffCache}{$formWeb.'.'.$formTopic} = $meta; } @@ -1566,11 +1568,11 @@ $un = $user->login(); } - my $value = $format || 'r$rev - $time - $wikiusername'; + my $value = $format || 'r$rev - $date - $time - $wikiusername'; $value =~ s/\$web/$web/gi; $value =~ s/\$topic/$topic/gi; $value =~ s/\$rev/$rev/gi; - $value =~ s/\$time/TWiki::Time::formatTime($date)/gei; + $value =~ s/\$time/TWiki::Time::formatTime($date, '$hour:$min:$sec')/gei; $value =~ s/\$date/TWiki::Time::formatTime($date, '$day $mon $year')/gei; $value =~ s/\$comment/$comment/gi; $value =~ s/\$username/$un/gi; Index: lib/TWiki/Meta.pm =================================================================== --- lib/TWiki/Meta.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Meta.pm (.../DEVELOP) (revision 9301) @@ -499,11 +499,18 @@ my $s = ''; $types ||= qr/^[A-Z]+$/; - foreach my $type ( grep { /$types/ } keys %$this ) { + foreach my $type ( grep { /$types/ } sort keys %$this ) { foreach my $item ( @{$this->{$type}} ) { - $s .= "$type: " . - join(' ', map{ "$_='$item->{$_}'" } sort keys %$item ) . - "\n"; + $s .= $type.': '; + if( scalar(keys %$item )) { + my @vals; + foreach my $i ( sort keys %$item ) { + my $v = $item->{$i} || 'undefined'; + push( @vals, $i.'="'.$v.'"' ); + } + $s .= join(' ', @vals ); + } + $s .= "\n"; } } return $s; Index: lib/TWiki/Form.pm =================================================================== --- lib/TWiki/Form.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Form.pm (.../DEVELOP) (revision 9301) @@ -180,6 +180,8 @@ $vals =~ s/\s*$//go; # SMELL: WTF is this??? This looks like a really bad hack! + #TODO: and slow too - compared to using the cache in TWiki::Users! + #TODO: this suggestes the need for a TWiki->{users}->getAllUsers() if( $vals eq '$users' ) { $vals = $TWiki::cfg{UsersWebName} . '.' . join( ", ${TWiki::cfg{UsersWebName}}.", @@ -439,12 +441,7 @@ -value => $value ); } elsif( $type eq 'label' ) { - # Interesting question: if something is defined as "label", - # could it be changed by applications or is the value - # necessarily identical to what is in the form? If we can - # take it from the text, we must be sure it cannot be - # changed through the URL? - # Pth: Changed labels through the URL is a feature for TWiki applications + # Changed labels through the URL is a feature for TWiki applications my $renderedValue = $session->{renderer}->getRenderedVersion ( $session->handleCommonTags( $value, $web, $topic )); $value = CGI::hidden( -name => $name, Index: lib/TWiki/Net.pm =================================================================== --- lib/TWiki/Net.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Net.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::Net @@ -63,7 +63,6 @@ if( $port < 1 ) { $port = 80; } - my $base64; my $result = ''; $url = "/" unless( $url ); my $req = "GET $url HTTP/1.0\r\n"; @@ -74,7 +73,7 @@ # authentication require MIME::Base64; import MIME::Base64 (); - $base64 = encode_base64( "$user:$pass", "\r\n" ); + my $base64 = encode_base64( "$user:$pass", "\r\n" ); $req .= "Authorization: Basic $base64"; } Index: lib/TWiki/Users/HtPasswdUser.pm =================================================================== --- lib/TWiki/Users/HtPasswdUser.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Users/HtPasswdUser.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::Users::HtPasswdUser Index: lib/TWiki/Users/Password.pm =================================================================== --- lib/TWiki/Users/Password.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Users/Password.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::Users::Password Index: lib/TWiki/Users/TWikiUserMapping.pm =================================================================== --- lib/TWiki/Users/TWikiUserMapping.pm (.../TWikiRelease04x00) (revision 0) +++ lib/TWiki/Users/TWikiUserMapping.pm (.../DEVELOP) (revision 9301) @@ -0,0 +1,255 @@ +# Module of TWiki Enterprise Collaboration Platform, http://TWiki.org/ +# +# Copyright (C) 2006 Sven Dowideit, SvenDowideit@home.org.au +# and TWiki Contributors. All Rights Reserved. TWiki Contributors +# are listed in the AUTHORS file in the root of this distribution. +# NOTE: Please extend that file, not this notice. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. For +# more details read LICENSE in the root of this distribution. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# As per the GPL, removal of this notice is prohibited. + +=begin twiki + +---+ package TWiki::Users::TWikiUserMapping + +Base class of all user handlers. Default behaviour is to use TWiki Topics for user and group info + +The methods of this class should be overridded by subclasses that want +to implement other user mapping handling methods. + +=cut + +package TWiki::Users::TWikiUserMapping; + +use strict; +use strict; +use Assert; +use TWiki::User; +use TWiki::Time; +use Error qw( :try ); + +=pod + +---++ ClassMethod new( $session ) -> $object + +Constructs a new password handler of this type, referring to $session +for any required TWiki services. + +=cut + +sub new { + my( $class, $session ) = @_; + + my $this = bless( {}, $class ); + $this->{session} = $session; + return $this; +} + + +# callback for search function to collate results +sub _collateGroups { + my $ref = shift; + my $group = shift; + push( @$ref, $group ) if $group; +} + +# get a list of groups defined in this TWiki +# TODO: i'm guessing a list of strings, Web.Topic even? +sub getListOfGroups { + my $this = shift; + ASSERT($this->isa( 'TWiki::Users::TWikiUserMapping')) if DEBUG; + + my @list; + + $this->{session}->{search}->searchWeb + ( + _callback => \&_collateGroups, + _cbdata => \@list, + inline => 1, + search => "Set GROUP =", + web => 'all', + topic => "*Group", + type => 'regex', + nosummary => 'on', + nosearch => 'on', + noheader => 'on', + nototal => 'on', + noempty => 'on', + format => "\$web.\$topic", + separator => '', + ); + + return @list; +} + +=pod + +---++ ObjectMethod addUserToTWikiUsersTopic( $user ) -> $topicName + +Add a user to the TWikiUsers topic. This is a topic that +maps from usernames to wikinames. It is maintained by +Register.pm, or manually outside TWiki. + +=cut + +sub addUserToTWikiUsersTopic { + my ( $this, $user, $me ) = @_; + + ASSERT($this->isa( 'TWiki::Users::TWikiUserMapping')) if DEBUG; + ASSERT($user->isa( 'TWiki::User')) if DEBUG; + ASSERT($me->isa( 'TWiki::User')) if DEBUG; + + my $store = $this->{session}->{store}; + my( $meta, $text ) = + $store->readTopic( undef, $TWiki::cfg{UsersWebName}, + $TWiki::cfg{UsersTopicName}, undef ); + my $result = ''; + my $entry = "\t* "; + $entry .= $user->web()."." + unless $user->web() eq $TWiki::cfg{UsersWebName}; + $entry .= $user->wikiName()." - "; + $entry .= $user->login() . " - " if $user->login(); + my $today = TWiki::Time::formatTime(time(), '$day $mon $year', 'gmtime'); + + # add to the cache + $this->{session}->{users}->{U2W}{$user->login()} = $user->{web} . "." . $user->wikiName(); + + # add name alphabetically to list + foreach my $line ( split( /\r?\n/, $text) ) { + # TODO: I18N fix here once basic auth problem with 8-bit user names is + # solved + if ( $entry ) { + my ( $web, $name, $odate ) = ( '', '', '' ); + if ( $line =~ /^\s+\*\s($TWiki::regex{webNameRegex}\.)?($TWiki::regex{wikiWordRegex})\s*(?:-\s*\w+\s*)?-\s*(.*)/ ) { + $web = $1 || $TWiki::cfg{UsersWebName}; + $name = $2; + $odate = $3; + } elsif ( $line =~ /^\s+\*\s([A-Z]) - / ) { + # * A - - - - -^M + $name = $1; + } + if( $name && ( $user->wikiName() le $name ) ) { + # found alphabetical position + if( $user->wikiName() eq $name ) { + # adjusting existing user - keep original registration date + $entry .= $odate; + } else { + $entry .= $today."\n".$line; + } + # don't adjust if unchanged + return $TWiki::cfg{UsersTopicName} if( $entry eq $line ); + $line = $entry; + $entry = ''; + } + } + + $result .= $line."\n"; + } + if( $entry ) { + # brand new file - add to end + $result .= "$entry$today\n"; + } + $store->saveTopic( $me, $TWiki::cfg{UsersWebName}, + $TWiki::cfg{UsersTopicName}, + $result, $meta ); + + return $TWiki::cfg{UsersTopicName}; +} + +# Build hash to translate between username (e.g. jsmith) +# and WikiName (e.g. Main.JaneSmith). Only used for sites where +# authentication is managed by external Apache configuration, instead of +# via TWiki's .htpasswd mechanism. +sub cacheTWikiUsersTopic { + my $this = shift; + ASSERT($this->isa( 'TWiki::Users::TWikiUserMapping')) if DEBUG; + + return if $this->{session}->{users}->{CACHED}; + $this->{session}->{users}->{CACHED} = 1; + + %{$this->{session}->{users}->{U2W}} = (); + %{$this->{session}->{users}->{W2U}} = (); + + my $text; + my $store = $this->{session}->{store}; + if( $TWiki::cfg{MapUserToWikiName} && + $store->topicExists($TWiki::cfg{UsersWebName}, + $TWiki::cfg{UsersTopicName} )) { + $text = $store->readTopicRaw( undef, + $TWiki::cfg{UsersWebName}, + $TWiki::cfg{UsersTopicName}, + undef ); + } else { + # fix for Codev.SecurityAlertGainAdminRightWithTWikiUsersMapping + # map only guest to TWikiGuest. CODE_SMELL on localization + $text = "\t* $TWiki::cfg{DefaultUserWikiName} - $TWiki::cfg{DefaultUserLogin} - 01 Apr 1970"; + } + + my $wUser; + my $lUser; + # Get the WikiName and userid, and build hashes in both directions + # This matches: + # * TWikiGuest - guest - 10 Mar 2005 + # * TWikiGuest - 10 Mar 2005 + while( $text =~ s/^\s*\* ($TWiki::regex{webNameRegex}\.)?(\w+)\s*(?:-\s*(\S+)\s*)?-\s*\d+ \w+ \d+\s*$//om ) { + my $web = $1 || $TWiki::cfg{UsersWebName}; + $wUser = $2; # WikiName + $lUser = $3 || $wUser; # userid + $lUser =~ s/$TWiki::cfg{NameFilter}//go; # FIXME: Should filter in for security... + my $wwn = $web.'.'.$wUser; + $this->{session}->{users}->{U2W}{$lUser} = $wwn; + $this->{session}->{users}->{W2U}{$wwn} = $lUser; + } +} + +=pod + +---++ ObjectMethod groupMembers($group) -> @members + +Return a list of user objects that are members of this group. Should only be +called on groups. + +=cut + +sub groupMembers { + my $this = shift; + my $group = shift; + ASSERT($this->isa( 'TWiki::Users::TWikiUserMapping')) if DEBUG; + ASSERT($group->isa( 'TWiki::User')) if DEBUG; + ASSERT( $group->isGroup()) if DEBUG; + my $store = $this->{session}->{store}; + + if( !defined $group->{members} && + $store->topicExists( $group->{web}, $group->{wikiname} )) { + my $text = + $store->readTopicRaw( undef, + $group->{web}, $group->{wikiname}, + undef ); + foreach( split( /\r?\n/, $text ) ) { + if( /$TWiki::regex{setRegex}GROUP\s*=\s*(.+)$/ ) { + next unless( $1 eq 'Set' ); + # Note: if there are multiple GROUP assignments in the + # topic, only the last will be taken. + $group->{members} = + $this->{session}->{users}->expandUserList( $2 ); + } + } + # backlink the user to the group + foreach my $user ( @{$group->{members}} ) { + push( @{$user->{groups}}, $group ); + } + } + + return $group->{members}; +} + +1; Index: lib/TWiki/Store.pm =================================================================== --- lib/TWiki/Store.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Store.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::Store @@ -76,12 +76,6 @@ $this->{session} = $session; - $this->{IMPL} = 'TWiki::Store::'.$TWiki::cfg{StoreImpl}; - eval 'use '.$this->{IMPL}; - if( $@ ) { - die "$this->{IMPL} compile failed $@"; - } - return $this; } @@ -91,7 +85,13 @@ sub _getHandler { my( $this, $web, $topic, $attachment ) = @_; - return $this->{IMPL}->new( $this->{session}, $web, $topic, $attachment ); + my $impl = $TWiki::cfg{Store}{$web}; + $impl = 'TWiki::Store::'.$TWiki::cfg{StoreImpl} unless( $impl ); + # Note: can't just 'require' because @INC isn't right at compilation time + eval "require $impl"; + die $@ if $@; + + return $impl->new( $this->{session}, $web, $topic, $attachment ); } =pod @@ -102,9 +102,6 @@ is undef, then read the most recent version. The version number must be an integer, or undef for the latest version. -Earlier argument syntax for $version; 1.x (Cairo and earlier) -is also supported, but is to be deprecated. - if $user is defined, view permission will be required for the topic read to be successful. Access control violations are flagged by a TWiki::AccessControlException. Permissions are checked for the user @@ -123,9 +120,8 @@ ASSERT($this->isa('TWiki::Store')) if DEBUG; $web =~ s#\.#/#go; - # Cairo compatibility for rev="1.x"-style arguments in %INCLUDEs if (defined $version) { - $version =~ s/^1\.//go; + $version = $this->cleanUpRevID( $version ); } my $text = $this->readTopicRaw( $user, $web, $topic, $version ); Index: lib/TWiki/Templates.pm =================================================================== --- lib/TWiki/Templates.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Templates.pm (.../DEVELOP) (revision 9301) @@ -208,7 +208,6 @@ sub readTemplate { my( $this, $name, $skins, $web ) = @_; ASSERT($this->isa( 'TWiki::Templates')) if DEBUG; - $this->{files} = (); # recursively read template file(s) @@ -221,46 +220,41 @@ # Kill comments, marked by %{ ... }% $text =~ s/%{.*?}%//sg; - if( ! ( $text =~ /%TMPL\:/s ) ) { - # no template processing - $text =~ s|^(( {3})+)|"\t" x (length($1)/3)|geom; # leading spaces to tabs - return $text; - } - my $result = ''; - my $key = ''; - my $val = ''; - my $delim = ''; - foreach( split( /(%TMPL\:)/, $text ) ) { - if( /^(%TMPL\:)$/ ) { - $delim = $1; - } elsif( ( /^DEF{[\s\"]*(.*?)[\"\s]*}%[\n\r]*(.*)/s ) && ( $1 ) ) { - # handle %TMPL:DEF{key}% - if( $key ) { + if( $text =~ /%TMPL\:/s ) { + my $key = ''; + my $val = ''; + my $delim = ''; + foreach( split( /(%TMPL\:)/, $text ) ) { + if( /^(%TMPL\:)$/ ) { + $delim = $1; + } elsif( ( /^DEF{[\s\"]*(.*?)[\"\s]*}%(.*)/s ) && ( $1 ) ) { + # handle %TMPL:DEF{key}% + if( $key ) { + $this->{VARS}->{$key} = $val; + } + $key = $1; + $val = $2; + } elsif( /^END%[\n\r]*(.*)/s ) { + die "Encountered TMPL:END with no corresponding TMPL:DEF near\n$result\nin$text\n" + unless ($key); + # handle %TMPL:END% $this->{VARS}->{$key} = $val; + $key = undef; + $val = ''; + $result .= $1; + } elsif( $key ) { + $val .= $delim.$_; + } else { + $result .= $delim.$_; } - $key = $1; - $val = $2; - - } elsif( /^END%[\n\r]*(.*)/s ) { - # handle %TMPL:END% - $this->{VARS}->{$key} = $val; - $key = ''; - $val = ''; - $result .= $1; - - } elsif( $key ) { - $val .= "$delim$_"; - - } else { - $result .= "$delim$_"; } + # handle %TMPL:P{"..."}% recursively + $result =~ s/(%TMPL\:P{.*?}%)/$this->_expandTrivialTemplate($1)/geo; + } else { + # no template processing + $result = $text; } - - # handle %TMPL:P{"..."}% recursively - $result =~ s/(%TMPL\:P{.*?}%)/$this->_expandTrivialTemplate($1)/geo; - - $result =~ s|^(( {3})+)|"\t" x (length($1)/3)|geom; # leading spaces to tabs return $result; } @@ -283,7 +277,7 @@ # if the name ends in .tmpl, then this is an explicit include from # the templates directory. No further searching required. if( $name =~ /\.tmpl$/ ) { - return TWiki::readFile( $TWiki::cfg{TemplateDir}.'/'.$name ); + return _retrieveFile( $TWiki::cfg{TemplateDir}.'/'.$name ); } my @skinList = split( /\,\s*/, $skins ); @@ -294,11 +288,11 @@ foreach my $skin ( @skinList ) { foreach my $tmplDir ( "$TWiki::cfg{TemplateDir}/$web", $TWiki::cfg{TemplateDir} ) { - my $file=$tmplDir."/$name.$skin.tmpl"; + my $file = $tmplDir."/$name.$skin.tmpl"; my $candidate; - $candidate->{name}=$file; - $candidate->{validate} = \&validateFile; - $candidate->{retrieve} = \&TWiki::readFile; + $candidate->{name} = $file; + $candidate->{validate} = \&_validateFile; + $candidate->{retrieve} = \&_retrieveFile; push @candidates, $candidate; } @@ -307,11 +301,11 @@ # now search the web dir and the root dir for the unskinned version foreach my $tmplDir ( "$TWiki::cfg{TemplateDir}/$web", $TWiki::cfg{TemplateDir} ) { - my $file=$tmplDir."/$name.tmpl"; + my $file = $tmplDir."/$name.tmpl"; my $candidate; - $candidate->{name}=$file; - $candidate->{validate} = \&validateFile; - $candidate->{retrieve} = \&TWiki::readFile; + $candidate->{name} = $file; + $candidate->{validate} = \&_validateFile; + $candidate->{retrieve} = \&_retrieveFile; push @candidates, $candidate; } @@ -324,13 +318,13 @@ $candidate->{name} = $web.'.'.$topic; $candidate->{validate} = sub { - return validateTopic( + return _validateTopic( $session, $store, $session->{user}, $topic, $web) }; $candidate->{retrieve} = sub { - return retrieveTopic($store, $web, $topic) + return _retrieveTopic($store, $web, $topic) }; push @candidates, $candidate; @@ -350,7 +344,7 @@ $candidate->{name} = $lookWeb.'.'.$skintopic; $candidate->{validate} = sub { - return validateTopic($session, + return _validateTopic($session, $store, $session->{user}, $skintopic, @@ -358,16 +352,16 @@ }; $candidate->{retrieve} = sub { - return retrieveTopic( $store, $lookWeb, $skintopic) + return _retrieveTopic( $store, $lookWeb, $skintopic) }; push @candidates, $candidate; } my $candidate; - $candidate->{name}=$lookWeb.'.'.$ttopic; + $candidate->{name} = $lookWeb.'.'.$ttopic; $candidate->{validate} = sub { - return validateTopic($session, + return _validateTopic($session, $store, $session->{user}, $ttopic, @@ -375,7 +369,7 @@ }; $candidate->{retrieve} = sub { - return retrieveTopic( $store, $lookWeb, $ttopic ) + return _retrieveTopic( $store, $lookWeb, $ttopic ) }; push @candidates, $candidate; @@ -390,29 +384,32 @@ } } - # SMELL: should really + # Uncomment this to debug templates #throw Error::Simple( 'Template '.$name.' was not found' ); - # instead of - #print STDERR "Template $name could not be found anywhere\n"; - #Is Failing Silently the best option here? + return ''; } -sub validateFile { +sub _validateFile { my $file = shift; return -e $file; } -sub validateTopic { +sub _validateTopic { my( $session, $store, $user, $topic, $web ) = @_; return $store->topicExists( $web, $topic ) && $session->{security}->checkAccessPermission ('view', $user, undef, $topic, $web ); } -sub retrieveTopic { +sub _retrieveTopic { my( $store, $web, $topic ) = @_; my ( $meta, $text ) = $store->readTopic( undef, $web, $topic, undef ); return $text; } +sub _retrieveFile { + my $name = shift; + return TWiki::readFile( $name ); +} + 1; Index: lib/TWiki/Sandbox.pm =================================================================== --- lib/TWiki/Sandbox.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Sandbox.pm (.../DEVELOP) (revision 9301) @@ -378,8 +378,6 @@ open( STDERR, '>&OLDERR' ) || die "Can't restore STDERR: $!"; close(OLDERR); $exit = ( $? >> 8 ); - # Do *not* return the error message; it contains sensitive path info. - print STDERR "$cmd failed: $!" if $exit; } if( $this->{TRACE} ) { Index: lib/TWiki/Users.pm =================================================================== --- lib/TWiki/Users.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/Users.pm (.../DEVELOP) (revision 9301) @@ -31,6 +31,7 @@ use Assert; use TWiki::User; use TWiki::Time; +use Error qw( :try ); BEGIN { # Do a dynamic 'use locale' for this module @@ -54,12 +55,21 @@ $this->{session} = $session; - my $impl = $TWiki::cfg{PasswordManager}; - $impl = 'TWiki::Users::Password' if( $impl eq 'none' ); - eval "use $impl"; + my $implPasswordManager = $TWiki::cfg{PasswordManager}; + $implPasswordManager = 'TWiki::Users::Password' if( $implPasswordManager eq 'none' ); + eval "use $implPasswordManager"; die "Password Manager: $@" if $@; - $this->{passwords} = $impl->new( $session ); + $this->{passwords} = $implPasswordManager->new( $session ); + my $implUserMappingManager = $TWiki::cfg{UserMappingManager}; + $implUserMappingManager = 'TWiki::Users::TWikiUserMapping' if( $implUserMappingManager eq 'none' ); + eval "use $implUserMappingManager"; + die "User Mapping Manager: $@" if $@; + $this->{usermappingmanager} = $implUserMappingManager->new( $session ); + + $this->{login} = {}; + $this->{wikiname} = {}; + $this->{CACHED} = 0; # create the guest user @@ -69,39 +79,23 @@ return $this; } -# get a list of groups defined in this TWiki -sub _getListOfGroups { +#returns a ref to an array of all group objects found. +sub getAllGroups() { my $this = shift; ASSERT($this->isa( 'TWiki::Users')) if DEBUG; - - my @list; - $this->{session}->{search}->searchWeb - ( - _callback => \&_collateGroups, - _cbdata => \@list, - inline => 1, - search => "Set GROUP =", - web => 'all', - topic => "*Group", - type => 'regex', - nosummary => 'on', - nosearch => 'on', - noheader => 'on', - nototal => 'on', - noempty => 'on', - format => "\$web.\$topic", - separator => '', - ); - - return @list; + + unless (defined($this->{grouplist})) { + $this->{grouplist} = []; + my @groupList = $this->{usermappingmanager}->getListOfGroups(); + foreach my $g (@groupList) { + my $groupObject = $this->findUser($g); + push (@{$this->{grouplist}}, $groupObject); + } + } + + return @{$this->{grouplist}}; } -# callback for search function to collate results -sub _collateGroups { - my $ref = shift; - my $group = shift; - push( @$ref, $group ) if $group; -} # Get a list of user objects from a text string containing a # list of user names. Used by User.pm @@ -225,131 +219,19 @@ my( $this, $name, $wikiname ) = @_; my $object = new TWiki::User( $this->{session}, $name, $wikiname ); - $this->{login}{$name} = $object; - $this->{wikiname}{$object->webDotWikiName()} = $object; + if ( defined ($object) ) { + $this->{login}{$object->login()} = $object; + $this->{wikiname}{$object->webDotWikiName()} = $object; + } return $object; } -=pod - ----++ ObjectMethod addUserToTWikiUsersTopic( $user ) -> $topicName - -Add a user to the TWikiUsers topic. This is a topic that -maps from usernames to wikinames. It is maintained by -Register.pm, or manually outside TWiki. - -=cut - sub addUserToTWikiUsersTopic { my ( $this, $user, $me ) = @_; - - ASSERT($this->isa( 'TWiki::Users')) if DEBUG; - ASSERT($user->isa( 'TWiki::User')) if DEBUG; - ASSERT($me->isa( 'TWiki::User')) if DEBUG; - - my $store = $this->{session}->{store}; - my( $meta, $text ) = - $store->readTopic( undef, $TWiki::cfg{UsersWebName}, - $TWiki::cfg{UsersTopicName}, undef ); - my $result = ''; - my $entry = "\t* "; - $entry .= $user->web()."." - unless $user->web() eq $TWiki::cfg{UsersWebName}; - $entry .= $user->wikiName()." - "; - $entry .= $user->login() . " - " if $user->login(); - my $today = TWiki::Time::formatTime(time(), '$day $mon $year', 'gmtime'); - - # add to the cache - $this->{U2W}{$user->login()} = $user->{web} . "." . $user->wikiName(); - - # add name alphabetically to list - foreach my $line ( split( /\r?\n/, $text) ) { - # TODO: I18N fix here once basic auth problem with 8-bit user names is - # solved - if ( $entry ) { - my ( $web, $name, $odate ) = ( '', '', '' ); - if ( $line =~ /^\s+\*\s($TWiki::regex{webNameRegex}\.)?($TWiki::regex{wikiWordRegex})\s*(?:-\s*\w+\s*)?-\s*(.*)/ ) { - $web = $1 || $TWiki::cfg{UsersWebName}; - $name = $2; - $odate = $3; - } elsif ( $line =~ /^\s+\*\s([A-Z]) - / ) { - # * A - - - - -^M - $name = $1; - } - if( $name && ( $user->wikiName() le $name ) ) { - # found alphabetical position - if( $user->wikiName() eq $name ) { - # adjusting existing user - keep original registration date - $entry .= $odate; - } else { - $entry .= $today."\n".$line; - } - # don't adjust if unchanged - return $TWiki::cfg{UsersTopicName} if( $entry eq $line ); - $line = $entry; - $entry = ''; - } - } - - $result .= $line."\n"; - } - if( $entry ) { - # brand new file - add to end - $result .= "$entry$today\n"; - } - $store->saveTopic( $me, $TWiki::cfg{UsersWebName}, - $TWiki::cfg{UsersTopicName}, - $result, $meta ); - - return $TWiki::cfg{UsersTopicName}; + return $this->{usermappingmanager}->addUserToTWikiUsersTopic($user, $me); } -# Build hash to translate between username (e.g. jsmith) -# and WikiName (e.g. Main.JaneSmith). Only used for sites where -# authentication is managed by external Apache configuration, instead of -# via TWiki's .htpasswd mechanism. -sub _cacheTWikiUsersTopic { - my $this = shift; - ASSERT($this->isa( 'TWiki::Users')) if DEBUG; - - return if $this->{CACHED}; - $this->{CACHED} = 1; - - %{$this->{U2W}} = (); - %{$this->{W2U}} = (); - my $text; - my $store = $this->{session}->{store}; - if( $TWiki::cfg{MapUserToWikiName} && - $store->topicExists($TWiki::cfg{UsersWebName}, - $TWiki::cfg{UsersTopicName} )) { - $text = $store->readTopicRaw( undef, - $TWiki::cfg{UsersWebName}, - $TWiki::cfg{UsersTopicName}, - undef ); - } else { - # fix for Codev.SecurityAlertGainAdminRightWithTWikiUsersMapping - # map only guest to TWikiGuest. CODE_SMELL on localization - $text = "\t* $TWiki::cfg{DefaultUserWikiName} - $TWiki::cfg{DefaultUserLogin} - 01 Apr 1970"; - } - - my $wUser; - my $lUser; - # Get the WikiName and userid, and build hashes in both directions - # This matches: - # * TWikiGuest - guest - 10 Mar 2005 - # * TWikiGuest - 10 Mar 2005 - while( $text =~ s/^\s*\* ($TWiki::regex{webNameRegex}\.)?(\w+)\s*(?:-\s*(\S+)\s*)?-\s*\d+ \w+ \d+\s*$//om ) { - my $web = $1 || $TWiki::cfg{UsersWebName}; - $wUser = $2; # WikiName - $lUser = $3 || $wUser; # userid - $lUser =~ s/$TWiki::cfg{NameFilter}//go; # FIXME: Should filter in for security... - my $wwn = $web.'.'.$wUser; - $this->{U2W}{$lUser} = $wwn; - $this->{W2U}{$wwn} = $lUser; - } -} - =pod ---++ ObjectMethod initializeRemoteUser( $remoteUser ) -> $loginName @@ -387,7 +269,7 @@ return undef unless $loginUser; - $this->_cacheTWikiUsersTopic(); + $this->{usermappingmanager}->cacheTWikiUsersTopic(); $loginUser =~ s/$TWiki::cfg{NameFilter}//go; return $this->{U2W}{$loginUser}; @@ -400,7 +282,7 @@ return undef unless $wikiName; - $this->_cacheTWikiUsersTopic(); + $this->{usermappingmanager}->cacheTWikiUsersTopic(); $wikiName =~ s/$TWiki::cfg{NameFilter}//go; $wikiName = "$TWiki::cfg{UsersWebName}.$wikiName" @@ -409,4 +291,16 @@ return $this->{W2U}{$wikiName}; } +sub getAllLoadedUsers { + my( $this ) = @_; + + my @list = (); + foreach my $key (keys(%{$this->{wikiname}})) { + my $u = $this->{wikiname}{$key}; + push(@list, $u); + } + + return sort(@list); +} + 1; Index: lib/TWiki/UI/Register.pm =================================================================== --- lib/TWiki/UI/Register.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Register.pm (.../DEVELOP) (revision 9301) @@ -79,24 +79,24 @@ my $action = $session->{cgiQuery}->param('action') || ''; if ($action eq 'register') { - registerAndNext($session, $tempUserDir); + _registerAndNext($session, $tempUserDir); } elsif ($action eq 'verify') { - verifyEmailAddress( $session, $tempUserDir ); + _verifyEmailAddress( $session, $tempUserDir ); if ($needApproval) { throw Error::Simple('Approval code has not been written!'); } - finish( $session, $tempUserDir); + _finish( $session, $tempUserDir); } elsif ($action eq 'resetPassword') { #SMELL - is this still called here, or only by passwd? - resetPassword( $session ); + _resetPassword( $session ); } elsif ($action eq 'approve') { - finish($session, $tempUserDir ); + _finish($session, $tempUserDir ); } else { - registerAndNext($session, $tempUserDir); + _registerAndNext($session, $tempUserDir); } $session->leaveContext('absolute_urls'); @@ -135,7 +135,7 @@ changePassword( $session ); } elsif ( $action eq 'resetPassword' ) { - resetPassword( $session ); + _resetPassword( $session ); } else { throw TWiki::OopsException( 'attention', @@ -271,6 +271,7 @@ my $doOverwriteTopics = defined $settings->{doOverwriteTopics} || throw Error::Simple( 'No doOverwriteTopics' ); my $log; + #-- call to the registrationHandler (to amend fields) should # really happen in here. @@ -281,6 +282,9 @@ $row->{LoginName}."\n"; } + my $template = $row->{Template}; + $template ||= 'NewUserTemplate'; + #-- Ensure every required field exists # NB. LoginName is OPTIONAL my @requiredFields = qw(WikiName FirstName LastName); @@ -303,7 +307,7 @@ $row->{Email}, $row->{WikiName} ); if( $doOverwriteTopics or !$session->{store}->topicExists( $row->{webName}, $row->{WikiName} ) ) { - $log .= _newUserFromTemplate($session, 'NewUserTemplate', $row); + $log .= _newUserFromTemplate($session, $template, $row); } else { $log .= $b.' Not writing topic '.$row->{WikiName}."\n"; } @@ -352,40 +356,25 @@ return @form; } -=pod +# This is called when action = register or action = "" +# It calls register and either Verify or Finish. +# Hopefully we will get workflow integrated and rewrite this to be table driven ----++ StaticMethod registerAndNext($session, $tempUserDir) - -This is called when action = register or action = "" - -It calls register and either Verify or Finish. - -Hopefully we will get workflow integrated and rewrite this to be table driven - -=cut - -sub registerAndNext { - my ($session, $tempUserDir) = @_; - register( $session ); - if ($TWiki::cfg{Register}{NeedVerification}) { - _requireVerification($session, $tempUserDir); - } else { - finish($session); - } +sub _registerAndNext { + my ($session, $tempUserDir) = @_; + _register( $session ); + if ($TWiki::cfg{Register}{NeedVerification}) { + _requireVerification($session, $tempUserDir); + } else { + _finish($session); + } } -=pod +# This is called through: TWikiRegistration -> RegisterCgiScript -> here +# 1 gets rows and fields from the query +# 2 calls _validateRegistration() to ensure required fields correct, else OopsException ----++ StaticMethod register($session) - -This is called through: TWikiRegistration -> RegisterCgiScript -> here - - 1 gets rows and fields from the query - 2 calls _validateRegistration() to ensure required fields correct, else OopsException - -=cut - -sub register { +sub _register { my( $session ) = @_; my $query = $session->{cgiQuery}; @@ -437,16 +426,10 @@ params => $data->{Email} ); } -=pod +# Generates a password. Mails it to them and asks them to change it. Entry +# point intended to be called from TWiki::UI::run ----++ StaticMethod resetPassword($session) - -Generates a password. Mails it to them and asks them to change it. Entry -point intended to be called from TWiki::UI::run - -=cut - -sub resetPassword { +sub _resetPassword { my $session = shift; my $query = $session->{cgiQuery}; my $topic = $session->{topicName}; @@ -511,7 +494,7 @@ sub _resetUsersPassword { my( $session, $userName, $introduction, $pMess ) = @_; - my $user = $session->{users}->findUser( $userName, undef); + my $user = $session->{users}->findUser( $userName, undef, 1 ); unless( $user ) { # couldn't work out who they are, its neither loginName nor # wikiName. @@ -522,7 +505,7 @@ my $email = $em[0]; unless ($email) { $$pMess .= $session->inlineAlert( 'alerts', 'no_email_for', - $user->stringify()); + $user->wikiName()); return 0; } @@ -530,7 +513,7 @@ unless( $user->passwordExists() ) { # Not an error. $$pMess .= $session->inlineAlert( 'alerts', 'missing_user', - $user->stringify()); + $user->wikiName()); } my $password = $user->resetPassword(); @@ -678,19 +661,13 @@ } -=pod +# This is called: on receipt of the activation password -> RegisterCgiScript -> here +# 1 calls _reloadUserContext(activation password) +# 2 throws oops if appropriate +# 3 calls emailRegistrationConfirmations +# 4 still calls 'oopssendmailerr' if a problem, but this is not done uniformly ----++ StaticMethod verifyEmailAddress($session, $tempUserDir) - -This is called: on receipt of the activation password -> RegisterCgiScript -> here - 1 calls _reloadUserContext(activation password) - 2 throws oops if appropriate - 3 calls emailRegistrationConfirmations - 4 still calls 'oopssendmailerr' if a problem, but this is not done uniformly - -=cut - -sub verifyEmailAddress { +sub _verifyEmailAddress { my( $session, $tempUserDir ) = @_; my $code = $session->{cgiQuery}->param('code'); @@ -710,25 +687,19 @@ } -=pod +# Presently this is called in RegisterCgiScript directly after a call to verify. The separation is intended for the RegistrationApprovals functionality +# 1 calls _reloadUserContext (throws oops if appropriate) +# 3 calls newUserFromTemplate() +# 4 if using the htpasswdFormatFamily, calls _addUserToPasswordSystem +# 5 calls the misnamed RegistrationHandler to set cookies +# 6 calls addUserToTWikiUsersTopic +# 7 writes the logEntry (if wanted :/) +# 8 redirects browser to 'oopsregthanks' +# +# reloads the context by code +# these two are separate in here to ease the implementation of administrator approval ----++ StaticMethod finish - -Presently this is called in RegisterCgiScript directly after a call to verify. The separation is intended for the RegistrationApprovals functionality - 1 calls _reloadUserContext (throws oops if appropriate) - 3 calls newUserFromTemplate() - 4 if using the htpasswdFormatFamily, calls _addUserToPasswordSystem - 5 calls the misnamed RegistrationHandler to set cookies - 6 calls addUserToTWikiUsersTopic - 7 writes the logEntry (if wanted :/) - 8 redirects browser to 'oopsregthanks' - -reloads the context by code -these two are separate in here to ease the implementation of administrator approval - -=cut - -sub finish { +sub _finish { my( $session, $tempUserDir) = @_; my $topic = $session->{topicName}; @@ -833,8 +804,8 @@ # TODO - there should be some way of overwriting meta without # blatting the content. - my( $before, $repeat, $after ) = split( /%SPLIT%/, $text, 3 ); + $before = '' unless defined( $before ); $repeat = "\n".' * %KEY%: %VALUE%' unless defined( $repeat ); $after = "\n".' * Set ALLOWTOPICCHANGE = %WIKIUSERNAME%'."\n" unless defined( $after ); @@ -880,8 +851,19 @@ sub _getKeyValuePairsAsTopicForm { my ($meta, @fieldArray) = @_; # SMELL - why is this an array? surely a hash is better? my $leftoverText = ''; + + my $usesCustomTemplate; + foreach my $fd (@fieldArray) { my $name = $fd->{name}; + + if ($usesCustomTemplate = ($name eq 'Template')) { + last; + } + } + + foreach my $fd (@fieldArray) { + my $name = $fd->{name}; my $value = $fd->{value}; my $title = $name; $title =~ s/([a-z0-9])([A-Z0-9])/$1 $2/go; # Spaced @@ -899,9 +881,11 @@ if ( $name eq 'Email' ) { # Don't paste the e-mail address in the user topic (prevent e-mail harvesting) # $leftoverText .= "\t* E-mail: $value\n"; - } else { - $meta->putKeyed( 'FIELD', + } elsif ($value || !$usesCustomTemplate) { + if ($name ne 'Template') { + $meta->putKeyed( 'FIELD', { name => $name, value => $value, title => $title } ); + } } #### end workaround SMELL } Index: lib/TWiki/UI/Upload.pm =================================================================== --- lib/TWiki/UI/Upload.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Upload.pm (.../DEVELOP) (revision 9301) @@ -110,11 +110,11 @@ } $tmpl =~ s/%ATTACHTABLE%/$atext/go; $tmpl =~ s/%FILEUSER%/$fileWikiUser/go; + $tmpl =~ s/%FILENAME%/$fileName/go; $session->enterContext( 'can_render_meta', $meta ); $tmpl = $session->handleCommonTags( $tmpl, $webName, $topic ); $tmpl = $session->{renderer}->getRenderedVersion( $tmpl, $webName, $topic ); $tmpl =~ s/%HIDEFILE%/$isHideChecked/go; - $tmpl =~ s/%FILENAME%/$fileName/go; $tmpl =~ s/%FILEPATH%/$args->{path}/go; $args->{comment} = TWiki::entityEncode( $args->{comment} ); $tmpl =~ s/%FILECOMMENT%/$args->{comment}/go; @@ -262,4 +262,3 @@ } 1; - Index: lib/TWiki/UI/Edit.pm =================================================================== --- lib/TWiki/UI/Edit.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Edit.pm (.../DEVELOP) (revision 9301) @@ -23,7 +23,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::UI::Edit Edit command handler Index: lib/TWiki/UI/Search.pm =================================================================== --- lib/TWiki/UI/Search.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Search.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::UI::Search Index: lib/TWiki/UI/Manage.pm =================================================================== --- lib/TWiki/UI/Manage.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Manage.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::UI::Manage @@ -109,7 +109,7 @@ @groups ) ] ); } - unless( $user->checkPassword( $password ) ) { + unless( $user->checkPasswd( $password ) ) { throw TWiki::OopsException( 'attention', web => $webName, topic => $topic, Index: lib/TWiki/UI/ChangeForm.pm =================================================================== --- lib/TWiki/UI/ChangeForm.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/ChangeForm.pm (.../DEVELOP) (revision 9301) @@ -103,4 +103,5 @@ return $page; } + 1; Index: lib/TWiki/UI/RDiff.pm =================================================================== --- lib/TWiki/UI/RDiff.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/RDiff.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::UI::RDiff Index: lib/TWiki/UI/Statistics.pm =================================================================== --- lib/TWiki/UI/Statistics.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Statistics.pm (.../DEVELOP) (revision 9301) @@ -21,7 +21,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::UI::Statistics Statistics extraction and presentation Index: lib/TWiki/UI/Oops.pm =================================================================== --- lib/TWiki/UI/Oops.pm (.../TWikiRelease04x00) (revision 9301) +++ lib/TWiki/UI/Oops.pm (.../DEVELOP) (revision 9301) @@ -17,7 +17,7 @@ # # As per the GPL, removal of this notice is prohibited. -=begin twiki +=pod ---+ package TWiki::UI::Oops Index: bin/setlib.cfg =================================================================== --- bin/setlib.cfg (.../TWikiRelease04x00) (revision 9301) +++ bin/setlib.cfg (.../DEVELOP) (revision 9301) @@ -20,7 +20,7 @@ # there. They will override any settings in this file. # ########################################################################### -use vars qw( $twikiLibPath @localPerlLibPath ); +use vars qw( $twikiLibPath @localPerlLibPath $twikiConfPath); eval 'require "LocalLib.cfg"'; @@ -28,6 +28,12 @@ use Cwd qw( abs_path ); ( $twikiLibPath ) = ($twikiLibPath = Cwd::abs_path( "../lib" )) =~ /(.*)/; } + +unless (( defined ($twikiConfPath) ) and (-e $twikiConfPath)) { + use Cwd qw( abs_path ); + ( $twikiConfPath ) = ($twikiConfPath = Cwd::abs_path( "../conf" )) =~ /(.*)/; +} + if ($twikiLibPath eq "") { $twikiLibPath = "../lib"; warn "using relative path for libs - some plugins may break"; @@ -44,6 +50,7 @@ # Prepend to @INC, the Perl search path for modules unshift @INC, $twikiLibPath; +unshift @INC, $twikiConfPath; unshift @INC, @localPerlLibPath if defined @localPerlLibPath; 1; # Return success for module loading Index: bin/configure =================================================================== --- bin/configure (.../TWikiRelease04x00) (revision 9301) +++ bin/configure (.../DEVELOP) (revision 9301) @@ -1,4045 +1,4048 @@ -#!/usr/bin/perl -w -# -# TWiki Enterprise Collaboration Platform, http://TWiki.org/ -# -# Copyright (C) 2000-2006 TWiki Contributors. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. For -# more details read LICENSE in the root of this distribution. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# As per the GPL, removal of this notice is prohibited. -# -# Configuration script for TWiki. Once you have a basic webserver -# configuration that lets you access this script, the rest of the -# configuration process is done from here. This script replaces -# the old "testenv" script. -# -# The script works by accepting values into a CGI form, and then -# submitting those values back to itself with a parameter (update) -# set to 1. This causes it to write config changes to LocalSite.cfg. -# Note that changes are only written if there is a real change in the -# value. -# -# The values available to configuration are determined by parsing -# TWiki.cfg. Special full-line comments guide the parse: -# Any comment of the form -#---+ Some text -# is taken as a foldable block, and following comments are dragged in too. -# ---++ is H3, ---+++ is H4 etc -# Comments of the form -# **TYPE opts** -# where TYPE is one of URL, PATH, URLPATH, BOOLEAN, STRING, REGEX, SELECT -# are used to indicate that a following cfg var is configurable through -# the interface. All intermediate comments are taken as documentation for -# the value. -# -package TWiki; - -# BASIC checks. Without these, nothing works. - -use strict; - -$SIG{__DIE__} = sub { Carp::confess( $_[0] || '' ) }; -$SIG{'__WARN__'} = sub { die @_ }; - -use vars qw( %cfg - $perlver - $perlvernum - $perlverRequired - $perlverRequiredString - $perlverRecommended - $perlVerPreferred - $ActivePerlRecommendedBuild - $GUESSED - $cgiModVerRecommended - $modPerlVersionRecommended - $rcsverRequired - ); - -# Constants -$perlvernum = $]; -$perlverRequired = 5.00503; # Oldest supported version of Perl -$perlverRequiredString = '5.005_03'; -$perlverRecommended = '5.6.1'; -$perlVerPreferred = 5.006; # 5.6 or higher has [:lower:] etc -$ActivePerlRecommendedBuild = 631; # Fixes PERL5SHELL bugs -$GUESSED = <<'HERE'; -I guessed this setting. You are advised to confirm this setting (and any other guessed settings) and hit 'Next' to save before changing any other settings. -HERE - -# CGI.pm version, on some platforms - actually need CGI 2.93 for mod_perl -# 2.0 and CGI 2.90 for Cygwin Perl 5.8.0. See -# http://perl.apache.org/products/apache-modules.html#Porting_CPAN_modules_to_mod_perl_2_0_Status -$cgiModVerRecommended = '2.93'; - -# Recommended mod_perl version if using mod_perl 2.0 -# (see Support.RegistryCookerBadFileDescriptor) -$modPerlVersionRecommended = '1.99_12'; - -$rcsverRequired = 5.7; - -# constants used in TWiki.cfg -use vars qw($TRUE $FALSE ); -use vars qw( $basicMods $requiredMods $requiredModsNonUnix $optionalMods - $I18Mods $I18Mods_perl56 $I18Mods_perl58 ); - -BEGIN { - $TRUE = 1; - $FALSE = 0; - # Set default current working directory - if( $ENV{SCRIPT_FILENAME} && $ENV{SCRIPT_FILENAME} =~ /^(.+)\/[^\/]+$/ ) { - chdir $1; - } - # Get Perl version - if (defined $^V) { - $perlver = $^V; # New in Perl 5.6.1, one byte per part - $perlver = ord(substr($perlver,0)) . "." . ord(substr($perlver,1)) - . "." . ord(substr($perlver,2)); - } else { - $perlver = $perlvernum - } - - # Required for configure to work - $basicMods = - { - 'CGI' => "basic TWiki", - 'CGI::Carp' => "basic TWiki", - 'Error' => 'basic TWiki', - }; - $requiredMods = - { - 'File::Copy' => 'basic TWiki', - 'File::Spec' => 'basic TWiki', - 'FileHandle' => 'basic TWiki', - 'Algorithm::Diff' => 'basic TWiki', - }; - - # Required on non-Unix platforms (mainly Windows) - $requiredModsNonUnix = - { - 'MIME::Base64' => "SHA1 password encoding", - 'Net::SMTP' => "registration emails and mailnotify", - }; - # Optional modules on all platforms - $optionalMods = - { - 'Digest::SHA1' => "SHA1 password encoding", - 'MIME::Base64' => "HTTP Authentication to proxies, and SHA1 password encoding", - 'POSIX' => "I18N (core module) and Security", - 'Digest::MD5' => "MD5 encoded passwords", - 'Text::Diff' => 'UpgradeTWiki', - 'CGI::Cookie' => "sessions", - 'CGI::Session' => "sessions", - }; - - $I18Mods = - { - 'Locale::Maketext::Lexicon' => "I18N translations", - }; - - $I18Mods_perl56 = - { - 'Unicode::String' => 'I18N conversions', - 'Unicode::MapUTF8' => "I18N conversions", - 'Unicode::Map' => "I18N conversions", - 'Unicode::Map8' => "I18N conversions", - 'Jcode' => "I18N conversions", - }; - - $I18Mods_perl58 = - { - 'Encode' => "I18N conversions (core module in Perl 5.8)", - }; -}; - -######################################################################## -##################### GLOBAL VARIABLES ################################# -######################################################################## - -use CGI qw( :any ); - -use vars qw( $cygwinRcsVerNum $perltype $query $action ); - -$query = new CGI; -$action = $query->param('action') || ''; - -if( $action eq 'image' ) { - _serveImage( $query->param('type'), $query->param('image' )); - exit 0; -} - -use vars qw( $errors $toterrors $warnings $totwarnings $url $nextid ); - -$errors = 0; # reset for each block -$toterrors = 0; -$warnings = 0; # reset for each block -$totwarnings = 0; -$url = $query->url(); -$nextid = 0; - -######################################################################## -########################## FORMATTING ################################## -######################################################################## - -# a note -sub NOTE { - return CGI::p({class=>"info"}, join("\n",@_)); -} - -# a warning -sub WARN { - $warnings++; - $totwarnings++; - return CGI::div(CGI::span({class=>'warn'}, CGI::strong('Warning: ').join("\n",@_))); -} - -# an error -sub ERROR { - $errors++; - $toterrors++; - return CGI::div(CGI::span({class=>'error'}, CGI::strong('Error: ').join("\n",@_))); -} - -# Generate a foldable block (twisty). This is a DIV with a table in it -# that contains the settings and doc rows. -sub _foldableBlock { - my( $head, $attr, $body ) = @_; - my $headText = $head . CGI::span({ class => 'blockLinkAttribute' }, $attr); - $body = CGI::start_table({width => '100%', -border => 0, -cellspacing => 0, -cellpadding => 0}).$body.CGI::end_table(); - my $mess = ''; - my $errorsMess = ($errors > 1) ? ' errors' : ' error'; - my $warningsMess = ($warnings > 1) ? ' warnings' : ' warning'; - $mess .= CGI::span({class=>'error'}, $errors . $errorsMess) if $errors; - if ($errors && $warnings) { - $mess .= ' '; - } - $mess .= CGI::span({class=>'warn'}, $warnings . $warningsMess) if $warnings; - $errors = $warnings = 0; - - my $anchor = _makeAnchor( $head ); - my $id = $anchor; - my $blockId = $id; - my $linkId = 'blockLink'.$id; - my $linkAnchor = $anchor.'link'; - return CGI::a({ name => $linkAnchor }). - CGI::a( {id => $linkId, - class => 'blockLink blockLinkOff', - href => '#'.$linkAnchor, - rel => 'nofollow', - onclick => 'foldBlock(\'' . $id . '\'); return false;'}, $headText.$mess). - CGI::div( { id => $blockId, - class=> 'foldableBlock foldableBlockClosed' }, $body ). - "\n"; -} - -# Generate an ordinary inline headedblock -sub _ordinaryBlock { - my( $depth, $head, $attr, $body ) = @_; - $head .= CGI::span({ class => 'blockLinkAttribute' }, $attr) if $attr; - if( $depth == 2 ) { $head = CGI::h2( $head ); } - elsif( $depth == 3 ) { $head = CGI::h3( $head ); } - elsif( $depth == 4 ) { $head = CGI::h4( $head ); } - elsif( $depth == 5 ) { $head = CGI::h5( $head ); } - elsif( $depth == 6 ) { $head = CGI::h6( $head ); } - else { $head = CGI::h6( $head ); } - return CGI::Tr(CGI::td( { colspan => 2 } , $head)). - $body; -} - -# Generate a sub-heading table row -sub _subHead { - my $text = shift; - return CGI::Tr(CGI::Td({class=>'subHead', colspan=>2}, $text)). - "\n"; -} - -# Generate a variable - prompt row -sub _setting { - my $key = shift; - return CGI::Tr(CGI::td({class=>'firstCol'}, $key). - CGI::td({class=>'secondCol'}, join(' ', @_))); -} - -# generate a documentation table row -sub _docBlock { - my $desc = shift || ''; - my $hidden = shift; - if (length($desc) == 0 || $desc =~ /\A\s\Z/) { - return ''; - } - if ($hidden) { - return CGI::Tr( {class => 'hiddenRow' }, CGI::td( { colspan => 2, class=>'docdata info' }, $desc )). - "\n"; - } - return CGI::Tr( CGI::td( { colspan => 2, class=>'docdata info' }, $desc )). - "\n"; -} - -# encode a string to make an HTML anchor -sub _makeAnchor { - my $str = shift; - - $str =~ s/\s(\w)/uc($1)/ge; - $str =~ s/\W//g; - return $str; -} - -######################################################################## -################### CHECKING SUPPORT ################################### -######################################################################## - -# Since Windows (without Cygwin) makes it hard to capture stderr -# ('2>&1' works only on Win2000 or higher), and Windows will usually have -# GNU tools in any case (installed for TWiki since there's no built-in -# diff, grep, patch, etc), we only check for these tools on Unix/Linux -# and Cygwin. -sub _checkGnuProgram { - my $prog = shift; - my $n = ''; - - if( $TWiki::cfg{OS} eq 'UNIX' || - $TWiki::cfg{OS} eq 'WINDOWS' && $perltype eq 'Cygwin' ) { - $prog =~ s/^\s*(\S+)\s.*$/$1/; - $prog =~ /^(.*)$/; - $prog = $1; - # check for taintedness - die "$prog is tainted" unless eval { $n = $prog, kill 0; 1 }; - my $diffOut = ( `$prog --version 2>&1` || ""); - my $notFound = ( $? == -1 ); - if( $notFound ) { - $n = WARN("'$prog' program was not found on the", - "current PATH."); - } elsif ( $diffOut !~ /\bGNU\b/ ) { - # Program found on path, complain if no GNU in version output - $n = WARN("'$prog' program was found on the PATH", - "but is not GNU $prog - this may cause", - "problems. $diffOut"); - } else { - $diffOut =~ /(\d+(\.\d+)+)/; - $n = "($prog is version $1)."; - } - } - - return $n; -} - -sub _checkRCSProgram { - my $key = shift; - - return 'Not used in this configuration.' - unless $TWiki::cfg{StoreImpl} eq 'RcsWrap'; - my $mess = ''; - my $err = ''; - my $prog = $TWiki::cfg{RCS}{$key} || ''; - $prog =~ s/^\s*(\S+)\s.*$/$1/; - $prog =~ /^(.*)$/; $prog = $1; - if( !$prog ) { - $err .= $key.' is not set'; - } else { - my $version = `$prog -V` || ''; - if( $@ ) { - $err .= ERROR($prog.' returned an error: '.$@ ); - } elsif ( $version ne '' ) { - $version =~ /(\d+(\.\d+)+)/; - $version = $1; - $mess .= " ($prog is version $version)"; - } else { - $err .= ERROR($prog.' did not return a version number (or might not exist..)'); - } - if( defined( $cygwinRcsVerNum )) { - $mess .= " (Cygwin package rcs-$cygwinRcsVerNum)"; - } - if( $version && $version < $rcsverRequired ) { - # RCS too old - $err .= $prog.' is too old, upgrade to version '. - $rcsverRequired.' or higher.'; - } - } - if( $err ) { - $mess .= ERROR( $err .<$name" ) || - return 'Could not create test file '. $name; - print FILE $txt1; - close( FILE); - open( IN_FILE, "<$name" ) || - return 'Could not read test file '. $name; - my $txt2 = ; - close( IN_FILE ); - unlink $name if( -e $name ); - unless ( $txt2 eq $txt1 ) { - return 'Could not write and then read '.$name; - } - return ''; -} - -sub _checkTreePerms { - my( $path, $perms, $filter ) = @_; - - return '' if( defined($filter) && $path !~ $filter && !-d $path); - - #lets ignore Subversion directories - return '' if( $path !~ /_svn/ ); - return '' if( $path !~ /.svn/ ); - - my $errs = ''; - - return $path. ' cannot be found'.CGI::br() unless( -e $path ); - - if( $perms =~ /r/ && !-r $path) { - $errs .= ' readable'; - } - - if( $perms =~ /w/ && !-d $path && !-w $path) { - $errs .= ' writable'; - } - - if( $perms =~ /x/ && !-x $path) { - $errs .= ' executable'; - } - - return $path.' is not '.$errs.CGI::br() if $errs; - - return '' unless -d $path; - - opendir(D, $path) || - return 'Directory '.$path.' is not readable.'.CGI::br(); - - foreach my $e ( grep { !/^\./ } readdir( D )) { - my $p = $path.'/'.$e; - $errs .= _checkTreePerms( $p, $perms, $filter ); - } - closedir(D); - return $errs; -} - -sub _findFileOnPath { - my $file = shift; - $file =~ s(::)(/)g; - - foreach my $dir ( @INC ) { - if ( -e "$dir/$file" ) { - return "$dir/$file"; - } - } - return undef; -} - -# Try and locate a required directory -sub _findMajorDir { - my( $cfg, $dir ) = @_; - return '' if( $TWiki::cfg{$cfg} && $TWiki::cfg{$cfg} ne 'NOT SET'); - my $guess = $ENV{SCRIPT_FILENAME}; - unless( $guess ) { - return WARN("This web server does not set SCRIPT_FILENAME so I can't guess a value for this"); - } - $guess =~ s(bin/*configure$)(); - $guess .= $dir; - $TWiki::cfg{$cfg} = $guess; - return WARN($GUESSED); -} - -sub _warnAboutWindowsBackSlashes { - my ( $path ) = @_; - if ( $path =~ /\\/ ) { - return WARN('You should use c:/path style slashes, not c:\path in "'.$path.'"'); - } -} - -######################################################################## -##################### PROMPT GENERATORS ################################ -######################################################################## - -# generate an input field for string types -sub _PROMPT_FOR_STRING { - my( $id, $opts, $value, $keys ) = @_; - my $size = "55%"; - if( $opts =~ /\s(\d+)\s/ ) { - $size = $1; - # These numbers are somewhat arbitrary.. - if($size>25) { $size="55%"; } - } - - # support upgrade from old configuration, where LowerNational and UpperNational - # were stored as REGEX'es (now they are STRING's): - if ( $id eq "LowerNational" || $id eq "UpperNational" ) { - if ($value =~ /^\(\?-xism:(.*)\)$/) { - $value = $1; - } - } - - return CGI::textfield( -name => $id, -size=>$size, -default=>$value ); -} - -# generate an input field for URL types -# This has its own type in case someone wants to add javascript validation -sub _PROMPT_FOR_URL { - my( $id, $opts, $value, $keys ) = @_; - return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); -} - -# generate an input field for URLPATH types -# This has its own type in case someone wants to add javascript validation -sub _PROMPT_FOR_URLPATH { - my( $id, $opts, $value, $keys ) = @_; - return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); -} - -# generate an input field for PATH types -# This has its own type in case someone wants to add javascript validation -sub _PROMPT_FOR_PATH { - my( $id, $opts, $value, $keys ) = @_; - return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); -} - -# generate an input field for BOOLEAN types -sub _PROMPT_FOR_BOOLEAN { - my( $id, $opts, $value, $keys ) = @_; - return CGI::checkbox( -name => $id, -checked => ( $value ? 1 : 0), - -value => 1, -label => '' ); -} - -# generate an input field for REGEX types -# This has its own type in case someone wants to add javascript validation -sub _PROMPT_FOR_REGEX { - my( $id, $opts, $value, $keys ) = @_; - $value =~ s/[[\x01-\x09\x0b\x0c\x0e-\x1f"%&'*<=>@[_\|]/'&#'.ord($&).';'/ge; - return ''; -} - -# generate an input field for COMMAND types -# This has its own type in case someone wants to add javascript validation -sub _PROMPT_FOR_COMMAND { - my( $id, $opts, $value, $keys ) = @_; - return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); -} - -# generate an input field for NUMBER types -# This has its own type in case someone wants to add javascript validation -sub _PROMPT_FOR_NUMBER { - my( $id, $opts, $value, $keys ) = @_; - return CGI::textfield( -name => $id, -size=>20, -default=>$value ); -} - -# generate an input field for OCTAL number types (protections) -sub _PROMPT_FOR_OCTAL { - my( $id, $opts, $value, $keys ) = @_; - return CGI::textfield( -name => $id, -size=>20, - -default=>sprintf('0%o',$value) ); -} - -# generate an input field for SELECT types -sub _PROMPT_FOR_SELECT { - my( $id, $opts, $value, $keys ) = @_; - $opts =~ s/^\s+//; - $opts =~ s/\s.*$//; - my $sopts = ''; - if ( defined($value) ) { - $sopts .= ''; - } - foreach my $opt (split( /\s*,\s*/, $opts)) { - if( $opt ne $value ) { - $sopts .= ''; - } - } - return CGI::Select({ name => $id, size=>1 }, $sopts); -} - -######################################################################## -###################### VARIABLE CHECKERS ############################### -######################################################################## - -sub _CHECKVAR_DefaultUrlHost { - my $keys = shift; - - if( $TWiki::cfg{DefaultUrlHost} && - $TWiki::cfg{DefaultUrlHost} ne 'NOT SET' ) { - my $host = $ENV{HTTP_HOST}; - if( $host && $TWiki::cfg{DefaultUrlHost} !~ /$host/ ) { - return WARN('Current setting does not match HTTP_HOST ', - $ENV{HTTP_HOST}); - } - } else { - my $protocol = $url || 'http://'.$ENV{HTTP_HOST}; - $protocol =~ s(^(.*?://.*?)/.*$)($1); - $TWiki::cfg{DefaultUrlHost} = $protocol; - return ERROR($GUESSED); - } - return ''; -} - -sub _CHECKVAR_ScriptUrlPath { - # Check Script URL Path against REQUEST_URI - my $n; - my $val = $TWiki::cfg{ScriptUrlPath}; - my $guess = $ENV{REQUEST_URI} || $ENV{SCRIPT_NAME} || ''; - $guess =~ s(/+configure\b.*$)(); - - if( $val && $val ne 'NOT SET' ) { - unless( $guess ) { - return WARN(<Go to "pub" directory'; -} - -sub _CHECKVAR_PubDir { - my $e = _findMajorDir('PubDir', 'pub'); - $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{PubDir}); - my $e2 = _checkTreePerms( $TWiki::cfg{PubDir}, 'rw' ); - $e .= WARN($e2) if $e2; - return $e; -} - -sub _CHECKVAR_TemplateDir { - my $e = _findMajorDir('TemplateDir', 'templates'); - $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{TemplateDir}); - my $e2 = _checkTreePerms( $TWiki::cfg{TemplateDir}, 'r' ); - $e .= ERROR($e2) if $e2; - return $e; -} - -sub _CHECKVAR_DataDir { - my $e = _findMajorDir('DataDir', 'data'); - my $e2 = _checkTreePerms( $TWiki::cfg{DataDir}, "r" ); - $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{DataDir}); - $e2 = _checkTreePerms( $TWiki::cfg{DataDir}, "w", qr/\.txt$/ ) - unless $e2; - $e .= WARN($e2) if $e2; - return $e; -} - -sub _CHECKVAR_LocalesDir { - my $e = _findMajorDir('LocalesDir', 'locale'); - my $e2 = _checkTreePerms( $TWiki::cfg{LocalesDir}, "r" ); - $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{LocalesDir}); - $e .= ERROR($e2) if $e2; - return $e; -} - -sub _CHECKVAR_MailProgram { - eval "use Net::SMTP"; - my $n; - if ($@) { - $n = "Net::SMTP is not installed in this environment. "; - my $val = $TWiki::cfg{MailProgram} || ''; - $val =~ s/\s.*$//g; - if( ! ( -e $val ) ) { - return WARN("$val was not found. Check the path."); - } - } else { - $n = 'Net::SMTP is installed in this environment, so this setting will not be used.'; - } - return $n; -} - -sub _CHECKVAR_LogFileName { - my $logFile = $TWiki::cfg{LogFileName} || ""; - $logFile =~ s/%DATE%/DATE/; - my $e = _checkCanCreateFile( $logFile ); - $e = ERROR($e) if $e; - return $e; -} - -sub _CHECKVAR_ConfigurationLogName { - my $logFile = $TWiki::cfg{ConfigurationLogName} || ""; - $logFile =~ s/%DATE%/DATE/; - my $e = _checkCanCreateFile( $logFile ); - $e = ERROR($e) if $e; - return $e; -} - -sub _CHECKVAR_WarningFileName { - my $logFile = $TWiki::cfg{WarningFileName} || ""; - $logFile =~ s/%DATE%/DATE/; - my $e = _checkCanCreateFile( $logFile ); - $e = ERROR($e) if $e; - return $e; -} - -sub _CHECKVAR_DebugFileName { - my $logFile = $TWiki::cfg{DebugFileName} || ""; - $logFile =~ s/%DATE%/DATE/; - my $e = _checkCanCreateFile( $logFile ); - $e = ERROR($e) if $e; - return $e; -} - -sub _CHECKVAR_MimeTypesFileName { - my $e = _checkTreePerms($TWiki::cfg{MimeTypesFileName}, 'r'); - $e = ERROR($e) if $e; - return $e; -} - -sub _CHECKVAR_Htpasswd_FileName { - my $e = _checkTreePerms($TWiki::cfg{Htpasswd}{FileName}, 'r'); - $e = ERROR($e) if $e; - return $e; -} - -sub _CHECKVAR_RegistrationApprovals { - my $file = $TWiki::cfg{RegistrationApprovals}; - my $e = _checkTreePerms( $file, 'rw' ); - $e = WARN($e) if $e; - return $e; -} - -sub _CHECKVAR_UseLocale { - my $on = $TWiki::cfg{UseLocale}; - - my $n = ''; - if( $TWiki::cfg{OS} eq 'WINDOWS' ) { - # Warn re known broken locale setup - $n .= WARN(<= 5.008 and - not ( exists $Config::Config{useperlio} and - $Config::Config{useperlio} eq 'define' ) ) { - $n .= WARN(<Perl's Unicode Model in 'perldoc -perluniintro') - re-compilation of Perl will be required before it can be -used to enable TWiki's experimental UTF-8 support. -HERE - ); - } - - # Check for d_setlocale in Config (same as 'perl -V:d_setlocale') - eval "use Config"; - if ( !( exists $Config::Config{d_setlocale} && - $Config::Config{d_setlocale} eq 'define' ) ) { - $n .= WARN(<$forUpperNat -HERE - ); - } - } - return ''; -} - -sub _CHECKVAR_LowerNational { - if( $perlvernum < $perlVerPreferred || 1) { - # Locales are off/broken, or using pre-5.6 Perl, so have to - # explicitly list the accented characters (but not if using UTF-8) - my $forLowerNat = join '', grep { uc($_) ne $_ and m/[^a-z]/ } map { chr($_) } 1..255; - - if ($forLowerNat) { - return WARN( <$forLowerNat -HERE - ); - } - } - return ''; -} - -sub _CHECKVAR_Site_Locale { - my $e = ''; - my $locale = $TWiki::cfg{Site}{Locale}; - setlocale(&LC_CTYPE, $locale); - my $currentLocale = setlocale(&LC_CTYPE); - if ( $currentLocale ne $locale ) { - $e .= WARN(<C, which should always work. -HERE - ); - } - if( $locale !~ /[a-z]/i && $TWiki::cfg{UseLocale} ) { - $e = WARN(<path_info() =~ /$TWiki::cfg{ScriptSuffix}$/ ) { - return ERROR('this script ('.$query->pather_info().') called with different ScriptSuffix setting'.$TWiki::cfg{ScriptSuffix}); - } - } - return ''; -} - -sub _CHECKVAR_RCS_EgrepCmd { return _checkGnuProgram($TWiki::cfg{RCS}{EgrepCmd}); } -sub _CHECKVAR_RCS_FgrepCmd { return _checkGnuProgram($TWiki::cfg{RCS}{FgrepCmd}); } -sub _CHECKVAR_RCS_initTextCmd { return _checkRCSProgram('initTextCmd'); } -sub _CHECKVAR_RCS_initBinaryCmd { return _checkRCSProgram('initBinaryCmd'); } -sub _CHECKVAR_RCS_tmpBinaryCmd { return _checkRCSProgram('tmpBinaryCmd'); } -sub _CHECKVAR_RCS_ciCmd { return _checkRCSProgram('ciCmd'); } -sub _CHECKVAR_RCS_ciDateCmd { return _checkRCSProgram('ciDateCmd'); } -sub _CHECKVAR_RCS_coCmd { return _checkRCSProgram('coCmd'); } -sub _CHECKVAR_RCS_histCmd { return _checkRCSProgram('histCmd'); } -sub _CHECKVAR_RCS_infoCmd { return _checkRCSProgram('infoCmd'); } -sub _CHECKVAR_RCS_rlogDateCmd { return _checkRCSProgram('rlogDateCmd'); } -sub _CHECKVAR_RCS_diffCmd { return _checkRCSProgram('diffCmd'); } -sub _CHECKVAR_RCS_lockCmd { return _checkRCSProgram('lockCmd'); } -sub _CHECKVAR_RCS_unlockCmd { return _checkRCSProgram('unlockCmd'); } -sub _CHECKVAR_RCS_delRevCmd { return _checkRCSProgram('delRevCmd'); } - -sub _CHECKVAR_StoreImpl { - my $mess = ''; - if( $TWiki::cfg{StoreImpl} eq 'RcsWrap') { - # Check that GNU diff is found in PATH; used by rcsdiff - $mess .= NOTE( "Note: The 'diff' program found on the path is used by RcsWrap to compare revisions ". - _checkGnuProgram( "diff")); - } - - return $mess; -}; - -sub _CHECKVAR_UseClientSessions { - my $mess = ''; - if (!eval "use CGI::Cookie; 1") { - $mess .= <$class}, $prompter) if $mandatory; - use strict 'refs'; - - $keys = CGI::span({class=>'mandatory'}, $keys) if $mandatory; - my $hidden = 0; - if (length($desc) == 0 || $desc =~ /\A\s\Z/) { - $hidden = 1; - } - return _docBlock( $output.$desc, $hidden )._setting( $keys, $prompter ); -} - -sub _showPlugins { - my %modules; - foreach my $libDir ( @INC ) { - if( opendir( DIR, "$libDir/TWiki/Plugins" ) ) { - foreach my $file ( grep { /^[A-Za-z0-9_]+Plugin\.pm$/ } - readdir DIR ) { - my $module = $file; - $module =~ s/\.pm$//; - $TWiki::cfg{Plugins}{$module}{Enabled} ||= 0; - $module =~ /^(.*)$/; # untaint - $module = $1; - # only add the first instance of any plugin, as only - # the first can get loaded from @INC. - unless( $modules{$module} ) { - $modules{$module} = $libDir; - } - closedir( DIR ); - } - } - } - my $block = ''; - foreach my $m ( sort keys %modules ) { - $block .= _checkAndBuildValueGrabber - ( 'BOOLEAN', '', -#SMELL - i'm assuming that the Plugin topic is in the SystemWeb :( -"$m", - '{Plugins}{'.$m.'}{Enabled}' - ); - } - return $block; -} - -sub _showLanguages { - opendir( DIR, $TWiki::cfg{LocalesDir}) or - return 'Couldn\'t read TWiki {LocalesDir}!'; - my $block = ''; - foreach my $file ( grep { /^.*\.po$/ } readdir DIR ) { - $file =~ m/^(.*)\.po$/; - my $lang = $1; - $lang = "'$lang'" if $lang =~ /\W/; - $block .= _checkAndBuildValueGrabber ( 'BOOLEAN', '', 'Enable the language ' . $lang . '', '{Languages}{' . $lang . '}{Enabled}' ); - } - closedir( DIR ); - return $block; -} - -######################################################################## -##################### WRITING NEW VALUES ############################### -######################################################################## - -sub setConfig { - my ($path, $updates) = @_; - my $txt = ''; - if( open(F, "<$path")) { - undef $/; - $txt = ; - close(F); - } - - $txt =~ s/^\s*1;\s*$//gm; - - open(F, ">$path") || - die "Failed to open $path for write"; - - foreach my $config ( keys %$updates ) { - # kill the old settings if any are there - $txt =~ s/\$TWiki::cfg$config\s*=.*?;\s*\n//s; - $txt .= '$TWiki::cfg'.$config.' = '.$updates->{$config}.";\n"; - } - print F $txt,"1;\n"; - close(F); - - if( defined( $TWiki::cfg{ConfigurationLogName} ) && - open(F, '>>'.$TWiki::cfg{ConfigurationLogName} )) { - my $date = gmtime(); - my $user = $query->remote_user() || 'guest'; - foreach my $config ( keys %$updates ) { - print F '| ',$date,' | ',$user,' | ',$config,' | ', - $updates->{$config}," |\n"; - } - close(F); - } -} - -# Convert value to a canonical perl representation suitable for writing -# to LocalSite.cfg -sub _perlifyType { - my ($val,$type) = @_; - - if ($type eq 'BOOLEAN') { - return ($val ? 1 : 0); - } elsif ($type eq 'NUMBER') { - $val ||= 0; - return 0+$val; - } elsif ($type eq 'OCTAL') { - $val ||= 0; - $val = '0'.$val unless $val =~ /^0/; - return $val; - } else { - $val ||= ''; - $val =~ s/'/\\'/g; - return "'".$val."'"; - } -} - -sub _perlModulesCheck { - my $mods = shift; - my $e = ''; - foreach my $mod (keys %$mods) { - my $n = ''; - eval "use $mod"; - if ($@) { - $n = WARN('not installed. May be required for ', - $mods->{$mod}); - } else { - my $mod_version; - no strict 'refs'; - eval '$mod_version = ${'.$mod.'::VERSION}'; - use strict 'refs'; - $n = $mod_version || 'unknown'; - } - $e .= _setting($mod, $n); - } - return $e; -} - -######################################################################## -#################### MAIN ACTION ENTRY POINTS ########################## -######################################################################## - -sub _serveImage { - my($type, $image )= @_; - - print "Content-type: $type\n\n"; - if( open(F, "logos/$image")) { - local $/ = undef; - print ; - close(F); - } -} - -sub handleUpdate { - my $path = shift; - my $pass = $query->param( 'cfgAccess' ); - my $param; - my $output = ''; - unless( defined( $pass )) { - $output .= CGI::start_form({ action=>$ENV{SCRIPT_NAME}, method=>"post" }); - # Pass all URL params through - foreach $param ( $query->param ) { - $output .= CGI::hidden( $param, $query->param( $param )); - $output .= "\n"; - } - - my $changed = calculateChanges(); - my $itemText = ($changed == 1) ? 'item' : 'items'; - $output .= CGI::div({ class => 'explanation'}, - CGI::strong( 'Changing ' . $changed. - ' configuration ' . $itemText. - '.'). - (($changed == 0) ? CGI::br() . - CGI::a( { href=>$url.'?t='.time(), - rel => 'nofollow' }, - 'Return to configuration') : CGI::br() . - 'Proceed with the steps below to save your changes.')); - - # and add a few more - $output .= CGI::h2('Enter the configuration password'); - if ($TWiki::cfg{Password} ne '') { - $output .= CGI::p(CGI::strong("Your Password:").CGI::br()); - $output .= CGI::password_field( 'cfgAccess', '', 20, 80 ); - $output .= ' ' . CGI::submit(-class=>'twikiSubmit', -value=>'Save changes'); - $output .= CGI::br(); - } else { - $output .= CGI::hidden( 'cfgAccess', '' ); - } - my $forgotPassword = ''; - if ($TWiki::cfg{Password} ne '') { - $forgotPassword = CGI::strong("Forgot your password?"). CGI::br(). 'To reset the password, log in to the server and delete the $TWiki::cfg{Password} = \'...\'; line in lib/LocalSite.cfg

'; - } - $output .= CGI::div({ class => 'explanation'}, - CGI::span( $forgotPassword . CGI::img({src=>$ENV{SCRIPT_NAME}.'?action=image;image=warning.gif;type=image/gif', alt=>''}) . ' ' . <<'HERE' -Notes on Security: -

    -
  • If you don't set a password, or the password is cracked, then configure could be used to do very nasty things to your server.
  • -
  • If you are running TWiki on a public website, you are strongly advised to disable saving from configure by making lib/LocalSite.cfg readonly once you are happy with your configuration.
  • -
-HERE - )); - if ($TWiki::cfg{Password} ne '') { - $output .= CGI::p( "You may change your password here:" ); - } - - $output .= CGI::div({ class => 'formElem'}, - - CGI::strong("New Password:"). - CGI::br(). - CGI::password_field( 'newCfgP', '', 20, 80 ). - CGI::br(). - CGI::strong("Confirm Password:").CGI::br(). - CGI::password_field( 'confCfgP', '', 20, 80 ). - CGI::br(). - CGI::submit(-class=>'twikiSubmit', -value=>'Set Password and Save changes')); - $output .= CGI::end_form(); - $output .= CGI::end_html(); - return $output; - } - - unless( crypt( $pass, $TWiki::cfg{Password}) eq - $TWiki::cfg{Password} || $TWiki::cfg{Password} eq '') { - $output .= CGI::span( {class => 'error' }, "Incorrect password" ). - CGI::end_html(); - return $output; - } - - my $changed = 0; - my %updates; - - if( $query->param( 'newCfgP' )) { - if( $query->param( 'newCfgP' ) eq - $query->param( 'confCfgP' )) { - my @saltchars = ( 'a'..'z', 'A'..'Z', '0'..'9', '.', '/' ); - my $salt = $saltchars[int(rand($#saltchars+1))] . - $saltchars[int(rand($#saltchars+1)) ]; - $updates{'{Password}'} = - _perlifyType( - crypt( $query->param( 'newCfgP' ), $salt ), - 'STRING' ); - $changed++; - $output .= "Password changed"; - } else { - $output .= "New password and confirmation do not match"; - return $output; - } - } - - $output .= CGI::h2('Updating configuration'); - foreach $param ( $query->param ) { - next unless $param =~ /^^TYPEOF:(.*)/; - my $type = $query->param( $param ); - $param =~ s/^TYPEOF:(.*)$/$1/; - my $basevar = $1; - my $var = '$TWiki::cfg'.$basevar; - my $val = $query->param( $param ); - my $def; - eval "\$def = defined( $var );"; - if( $type ) { - eval "\$def = $var;" if $def; - next if( $type eq 'OCTAL' && sprintf('0%o', $def) =~ /^0*$val$/ ); - next if( $type eq 'NUMBER' && $val + 1 == $def + 1 ); - next if( $type eq 'BOOLEAN' && ($val && $def || !$val && !$def)); - next if( $val eq $def ); - $output .= CGI::h3($var). - CGI::b('old '). - CGI::code($def||' '). - CGI::br(). - CGI::b('new '). - CGI::code($val||' '); - $updates{$basevar} = _perlifyType($val, $type); - $changed++; - } - } - $output .= CGI::p(); - setConfig($path, \%updates); - my $itemText = ($changed == 1) ? 'item' : 'items'; - $output .= CGI::hr(); - $output .= CGI::p(CGI::strong($changed.' configuration ' . $itemText . ' changed. ')); - $output .= CGI::p(CGI::a({ rel => 'nofollow', - href=>$url.'?t='.time() }, - 'Return to configuration')); - return $output; -} - -sub calculateChanges { - my $param; - my $changed = 0; - foreach $param ( $query->param ) { - next unless $param =~ /^^TYPEOF:(.*)/; - my $type = $query->param( $param ); - $param =~ s/^TYPEOF:(.*$)/$1/; - my $var = '$TWiki::cfg'.$1; - my $val = $query->param( $param ); - my $def; - eval "\$def = defined( $var );"; - if( $type ) { - eval "\$def = $var;" if $def; - next if( $type eq 'OCTAL' && sprintf('0%o', $def) =~ /^0*$val$/ ); - next if( $type eq 'NUMBER' && $val + 1 == $def + 1 ); - next if( $type eq 'BOOLEAN' && ($val && $def || !$val && !$def)); - next if( $val eq $def ); - $changed++; - } - } - return $changed; -} - -sub performSanityChecks { - my( $brokenTWikiCfgError, $brokenLocalSiteError ) = @_; - my $output = ''; - - if ($brokenTWikiCfgError) { - $output .= CGI::h2('WARNING:'). - CGI::p('TWiki.cfg is unreadable or has a configuration problem that is causing a Perl error - the following message(s) should help locate the problem.'); - $output .= $brokenTWikiCfgError; - - # EARLY EXIT - $output .= CGI::end_html(); - return $output; - } - - if ($brokenLocalSiteError) { - $output .= CGI::h2('WARNING:'). - ERROR('LocalSite.cfg is unreadable or has a configuration problem that is causing a Perl error - the following message(s) was generated:'). - CGI::pre($brokenLocalSiteError). - 'The @INC path is '. - CGI::pre(join(":", @INC)). - NOTE('This may be because this is the first time you have run configure. In this case you can simply ignore this error until you have filled in your General path settings. Otherwise, check that the file exists, and the webserver user is allowed to read it.'); - } - - # Check whether basic CGI modules exist (some broken installations of - # Perl don't have this, even though they are standard modules), and warn user - my $modMissing = 0; - foreach my $mod (keys %$basicMods) { - eval "use $mod"; - if ($@) { - unless ($modMissing) { - $output .= ERROR( 'Perl Module(s) missing'); - } - $modMissing = 1; - $output .= ERROR( 'Essential Perl Module \'',$mod, - '\' not installed - please check the setting ', - 'of @INC.' ); - } - } - - # If any critical modules missing, display @INC and give up - if ($modMissing) { - $output .= NOTE( '@INC = ', join( ' ', @INC )); - return $output; - } - - return $output; -} - -sub presentReadOnlyInfo { - # use strict; # Recommended for mod_perl, enable for Perl 5.6.1 only - # Doesn't work well here, due to 'do "TWiki.cfg"' - # use diagnostics; # Debug only - - # Load CGI modules (run-time, after checking they are accessible) - require CGI; - import CGI qw( -any ); - require CGI::Carp; - import CGI::Carp qw( fatalsToBrowser ); - - $errors = 0; - $warnings = 0; - - my $output = ''; - my $block = ''; - for my $key ( sort keys %ENV ) { - $block .= _setting($key, $ENV{$key}); - } - $output .= _foldableBlock(CGI::em( 'Environment variables' ), - '(read only) ', $block); - - $block = ''; - - # Make %ENV safer for CGI (should reflect TWiki.pm) - my $originalPath = $ENV{PATH} || ''; - if( $TWiki::cfg{SafeEnvPath} ) { - # SMELL: this untaint probably isn't needed - my $ut = $TWiki::cfg{SafeEnvPath}; - $ut =~ /^(.*)$/; - $ENV{PATH} = $1; - } - delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) }; - my $perlverMsg = $perlver; # Default version message - - # Load Config module - used here and elsewhere - require Config; - - # Set $TWiki::cfg{DetailedOS} if not using later versions of TWiki.cfg for BeijingRelease - # - this code enables the latest testenv to be used with Dec 2001 and - # earlier releases. - if ( !defined $TWiki::cfg{DetailedOS} ) { - $TWiki::cfg{DetailedOS} = $Config::Config{'osname'}; - } - - # Detect Perl flavour on Windows, and Cygwin Perl/RCS package versions - - if ($TWiki::cfg{DetailedOS} eq 'cygwin') { - $perltype = 'Cygwin'; # Cygwin Perl only - my ($pkg, $pkgName); - - # Get Cygwin perl's package version number - $pkgName = 'perl'; - $pkg = `/bin/cygcheck -c $pkgName | /bin/grep $pkgName 2>/dev/null`; - if ($?) { - $pkg = " [Cannot identify package - cygcheck or grep not installed]"; - $perlverMsg = $perlver . $pkg - } else { - $pkg = (split ' ', $pkg)[1]; # Package version - $perlverMsg = $pkg; - } - - # Get Cygwin RCS's package version number - $pkgName = 'rcs'; - $pkg = `/bin/cygcheck -c $pkgName | /bin/grep $pkgName 2>/dev/null`; - if ($?) { - $pkg = " [Cannot identify package - cygcheck or grep not installed]"; - $cygwinRcsVerNum = $pkg; - } else { - $pkg = (split ' ', $pkg)[1]; # Package version - $cygwinRcsVerNum = $pkg; - } - } elsif ($TWiki::cfg{DetailedOS} =~ /win/i && $TWiki::cfg{DetailedOS} !~ /darwin/i ) { - # Windows Perl - try ActivePerl-only function: returns number if - # successful, otherwise treated as a literal (bareword). - my $isActivePerl= eval 'Win32::BuildNumber !~ /Win32/'; - if( $isActivePerl ) { - $perltype = 'ActiveState'; - $perlverMsg = $perlver . ", build " . Win32::BuildNumber(); - } else { - # Could be SiePerl or some other Win32 port of Perl - $perltype = 'SiePerl or other Windows Perl'; - } - } else { - $perltype = 'generic'; - } - - # Detect executable name suffix, e.g. .exe on Windows or '' on Unix - # Avoid testing for .exe suffixes on Cygwin, since the built-in - # grep and ls don't end in '.exe', even though Perl's '_exe' setting - # indicates they should. - my $exeSuffix=''; - if ( $Config::Config{'_exe'} and ($TWiki::cfg{OS} eq 'WINDOWS' and $perltype ne 'Cygwin') ) { - if ( ! $ENV{INTERIX_ROOT} ) { #this is set is we are using UnixServicesForWindows (or INTERIX funnily enough) and they don't use .exe either - $exeSuffix = $Config::Config{'_exe'}; - } - } - - # Detect whether mod_perl was loaded into Apache - my $modPerlLoaded = ( exists $ENV{SERVER_SOFTWARE} && - ( $ENV{SERVER_SOFTWARE} =~ /mod_perl/ )); - # Detect whether we are actually running under mod_perl - # - test for MOD_PERL alone, which is enough. - my $usingModPerl = ( exists $ENV{MOD_PERL} ); - my $modPerlVersion; - - # Get the version of mod_perl if it's being used - if ( $usingModPerl ) { - $modPerlVersion = eval 'use mod_perl; return $mod_perl::VERSION'; - $block .= _setting('', - WARN(<configure with mod_perl. This -is risky because mod_perl will remember old values of configuration -variables. You are *highly* recommended not to run configure under -mod_perl (though the rest of TWiki can be run with mod_perl, of course) -HERE - )); - } - - my $n = ucfirst(lc($TWiki::cfg{OS})); - $n .= " ($TWiki::cfg{DetailedOS})" if ( $TWiki::cfg{DetailedOS} ne '' ); - # OS - $block .= _setting("Operating system", $n); - - # Perl version and type - $perlverMsg .= " ($perltype)" if $perltype ne 'generic'; - $block .= _setting("Perl version", $perlverMsg); - - if ( $perlvernum < $perlverRequired ) { - $block .= _setting('', - WARN(<twiki/lib and check that LocalSite.cfg is present and readable"); - } else { - $twikiFound = 1; - my $mod_version = eval '$TWiki::wikiversion || $TWiki::VERSION'; - $mod_version ||= 'unknown'; - $mess = 'OK, TWiki.pm found (Version: '.$mod_version.')'; - } - $block .= _setting('TWiki module in @INC path', $mess); - - #add in the basic Modules so that we list their versions in the UI - map { $requiredMods->{$_} = $basicMods->{$_} } - keys %$basicMods; - - if ( defined $TWiki::cfg{DetailedOS} and ($TWiki::cfg{DetailedOS} =~ /darwin/i or $TWiki::cfg{OS} ne 'UNIX') ) { - map { $requiredMods->{$_} = $requiredModsNonUnix->{$_} } - keys %$requiredModsNonUnix; - } else { - # these are optional on Unix - map { $optionalMods->{$_} = $requiredModsNonUnix->{$_} } - keys %$requiredModsNonUnix; - } - - # Check that each of the required Perl modules can be loaded, and - # print its version number. - my $set = ''; - foreach my $mod (keys %$requiredMods) { - eval "use $mod"; - if ($@) { - $set .= _setting($mod, ERROR("not installed. Required for ", - $requiredMods->{$mod})); - } else { - my $mod_version; - no strict 'refs'; - eval '$mod_version = ${'.$mod.'::VERSION}'; - use strict 'refs'; - $n = $mod_version || 'unknown'; - # Check for potential CGI.pm module upgrade - if( $mod eq 'CGI' and $mod_version < $cgiModVerRecommended ) { - if ( $perltype eq 'Cygwin' and $perlver eq '5.8.0' ) { - # Recommend CGI.pm upgrade if using Cygwin Perl 5.8.0 - $n .= WARN( "CGI.pm version $cgiModVerRecommended or higher", - "is recommended to avoid problems with attachment", - "uploads on Cygwin Perl $perlver."); - } elsif ( $usingModPerl and $modPerlVersion >= 1.99 ) { - # Recommend CGI.pm upgrade if using mod_perl 2.0, which - # is reported as version 1.99 and implies Apache 2.0 - $n .= WARN("CGI.pm version $cgiModVerRecommended or higher is", - "recommended to avoid problems with mod_perl version", - "$modPerlVersion on Apache 2.0 or higher."); - } - } - $set .= _setting( $mod, $n ); - } - } - $block .= _setting("Required Perl modules", - CGI::start_table({width=>'100%'}). - $set.CGI::end_table()); - - # Check that each of the optional Perl modules can be loaded, and - # print its version number. - $set = _perlModulesCheck( $optionalMods ); - $set .= _perlModulesCheck( $I18Mods ); - $set .= _perlModulesCheck( $] >= 5.008 ? $I18Mods_perl58 : $I18Mods_perl56 ); - $block .= _setting("Optional Perl Modules", - CGI::start_table({width=>'100%'}). - $set.CGI::end_table()); - - # All module checks done, OK to enable fatalsToBrowser - import CGI::Carp qw( fatalsToBrowser ); - - # PATH_INFO - $block .= _setting(CGI::a({name=>'PATH_INFO'},'PATH_INFO'), $query->path_info(). - NOTE(<$url/foo/bar, -the correct PATH_INFO is /foo/bar, without any prefixed path -components. -Click here to test this -- particularly if you are using mod_perl, Apache or IIS, or are using -a web hosting provider. -Look at the new path info here. It should be /foo/bar. -HERE - )); - - # mod_perl - if( $usingModPerl ) { - $n = "Used for this script"; - } else { - $n = "Not used for this script"; - } - $n .= NOTE( 'mod_perl is ', $modPerlLoaded ? '' : 'not', - ' loaded into Apache' ); - if ( $modPerlVersion ) { - $n .= NOTE( 'mod_perl version ', $modPerlVersion ); - } - - # Check for a broken version of mod_perl 2.0 - if ( $usingModPerl && $modPerlVersion =~ /1\.99_?11/ ) { - # Recommend mod_perl upgrade if using a mod_perl 2.0 version - # with PATH_INFO bug (see Support.RegistryCookerBadFileDescriptor - # and Bugs:Item82) - $n .= ERROR(<) ); # Unix/Cygwin Perl - effective UID - $grp = join(',', map { lc(getgrgid( $_ )) } split( " ", $( ) ); - } else { # ActiveState or other Win32 Perl - $usr = lc( getlogin ); - # Try to use Cygwin's 'id' command - may be on the path, since Cygwin - # is probably installed to supply ls, egrep, etc - if it isn't, give up. - # Run command without stderr output, to avoid CGI giving error. - # Get names of primary and other groups. - $grp = lc(qx(sh -c '( id -un ; id -gn) 2>/dev/null' 2>nul )); - if ($?) { - $grp = "[Cannot identify groups - no Cygwin 'id' or 'sh' command on path]"; - } - } - - $block .= _setting('CGI user', 'userid = '.$usr.' groups = '. - $grp.''. - NOTE('Your CGI scripts are executing as this user.')); - - $block .= _setting("Original PATH", $originalPath. - NOTE(<recommended if Cygwin is installed). -

-To use 'bash' with ActiveState or other Win32 Perl you should set the -PERL5SHELL environment variable to something like -c:/YOURCYGWINDIR/bin/bash.exe -c -This should be set in the System Environment, and ideally set directly in the -web server (e.g. using the Apache SetEnv directive). -HERE - ); - if( $perltype eq 'ActiveState' ) { - $n .= WARN(<highly recommended not to use this -particular configuration on a public server (one exposed to the internet) -HERE - ); - if( Win32::BuildNumber() < $ActivePerlRecommendedBuild ) { - $n .= WARN(< -$ActivePerlRecommendedBuild -if you are going to use PERL5SHELL, which was broken in earlier builds. -HERE - ); - } - } - $block .= _setting("PERL5SHELL", $n); - }; - $output .= _foldableBlock(CGI::em( 'CGI Setup' ), '(read only) ', - $block); - return $output; -}; - -sub presentEditableInfo { - # "Parse" TWiki.cfg and LocalSite.cfg - my $output = ''; - my @blocks; - my @heads; - my $depth = 0; - for my $file ( 'TWiki.cfg', 'LocalSite.cfg' ) { - my $cfgfile = _findFileOnPath($file); - next unless $cfgfile; - open(F, $cfgfile) || next; - undef $/; - my $text = ; - close(F); - $text =~ s/^# //gm; - - my $type = ''; - my $descr; - my $opts; - foreach (split(/\r?\n/, $text)) { - if( m/^\*\*([A-Z]+)(\s*.*?)\*\*/ ) { - if( $type eq '_HELP' ) { - $blocks[$depth] .= _docBlock( $descr ); - } - $type = $1; - $opts = $2 || ''; - $opts .= ' '; # to simplify parsing - $descr = ''; - } elsif ($type && /\$(TWiki::)?cfg(.*?)\s*=/) { - if( $type eq '_HELP' ) { - $blocks[$depth] .= _docBlock( $descr ); - } else { - $blocks[$depth] .= _checkAndBuildValueGrabber($type, $opts, $descr, $2); - } - $type = ''; - $descr = ''; - } elsif( m/^#---(\++) *(.*?)$/ ) { - my $ndepth = length($1); - my $nhead = $2; - while( $depth >= $ndepth ) { - if ($depth <= 1) { - $output .= _foldableBlock($heads[$depth], '', $blocks[$depth]); - } else { - $blocks[$depth - 1] .= _ordinaryBlock($depth, $heads[$depth], '', $blocks[$depth]); - } - $depth--; - } - $depth = $ndepth; - $heads[$depth] = $nhead; - $blocks[$depth] = ''; - $type = '_HELP'; - } elsif( m/^\*PLUGINS\*/ ) { - if( $type eq '_HELP' ) { - $blocks[$depth] .= _docBlock( $descr ); - $descr = ''; - } - $blocks[$depth] .= _showPlugins(); - } elsif ( m/\*LANGUAGES\*/ ) { - if ( $type eq '_HELP' ) { - $blocks[$depth] .= _docBlock( $descr ); - $descr = ''; - } - $blocks[$depth] .= _showLanguages(); - } elsif( $type ) { - $descr .= "$_ "; - } - } - } - while( $depth && $blocks[$depth]) { - if ($depth <= 1) { - $output .= _foldableBlock($heads[$depth], '', $blocks[$depth]); - } else { - $blocks[ $depth - 1] .= _ordinaryBlock($depth, $heads[$depth], '', $blocks[$depth]); - } - $depth--; - } - return $output; -} - -###################################################################### -################# MAIN PROGRAM ####################################### -###################################################################### - -$| = 1; # no buffering - FIXME: mod_perl issue? - -eval "use CGI::Carp qw( fatalsToBrowser )"; - -use vars qw ( $setlibAvail $brokenLocalSiteError $brokenTWikiCfgError - $js1 $css ); - -# Set library paths in @INC, read TWiki.cfg and set locale, at compile time -# Try to use setlib.cfg, use default path if missing -if ( -r './setlib.cfg' ) { - require './setlib.cfg'; - $setlibAvail = 1; -} else { - unshift @INC, '../lib'; - $setlibAvail = 0; -} - -unless( $TWiki::cfg{DetailedOS} ) { - $TWiki::cfg{DetailedOS} = $^O; - unless( $TWiki::cfg{DetailedOS} ) { - require Config; - $TWiki::cfg{DetailedOS} = $Config::Config{'osname'}; - } -} -unless( $TWiki::cfg{OS} ) { - if ($TWiki::cfg{DetailedOS} =~ /darwin/i) { # MacOS X - $TWiki::cfg{OS} = 'UNIX'; - } elsif ($TWiki::cfg{DetailedOS} =~ /Win/i) { - $TWiki::cfg{OS} = 'WINDOWS'; - } elsif ($TWiki::cfg{DetailedOS} =~ /vms/i) { - $TWiki::cfg{OS} = 'VMS'; - } elsif ($TWiki::cfg{DetailedOS} =~ /bsdos/i) { - $TWiki::cfg{OS} = 'UNIX'; - } elsif ($TWiki::cfg{DetailedOS} =~ /dos/i) { - $TWiki::cfg{OS} = 'DOS'; - } elsif ($TWiki::cfg{DetailedOS} =~ /^MacOS$/i) { # MacOS 9 or earlier - $TWiki::cfg{OS} = 'MACINTOSH'; - } elsif ($TWiki::cfg{DetailedOS} =~ /os2/i) { - $TWiki::cfg{OS} = 'OS2'; - } else { - $TWiki::cfg{OS} = 'UNIX'; - } -} - -# if this fails, ignore the problem, but we have to do it -unless( eval 'do "LocalSite.cfg"' ) { - # Capture the Perl error(s) - $brokenLocalSiteError = 'require failed: '. - ( $! ? $! : '') . ( $@ ? $@ : ''); -} - -# Read the configuration file now in order to set locale; -# includes checking for broken syntax etc. Need 'require' -# to get the $!/$@ to work. -unless( eval 'require "TWiki.cfg" ' ) { - # Capture the Perl error(s) - $brokenTWikiCfgError = 'require failed: '. - ( $! ? $! : '') . ( $@ ? $@ : ''); -} - -# and again -eval 'do "LocalSite.cfg"'; - -# Do a dynamic 'use locale' for this script -if( $TWiki::cfg{UseLocale} ) { - require locale; - import locale (); -} - -$js1 = <<'HERE'; -// -HERE - -$css = <<'HERE'; - -/* ----------------------------------------------------------- - LAYOUT - positioning of page elements - ----------------------------------------------------------- */ - -.twikiLeft { - float:left; - position:relative; -} -.twikiRight { - position:relative; - float:right; - display:inline; - margin:0; - text-align:right; -} -.twikiClear { - /* to clean up floats */ - margin:0; - padding:0; - height:0; - line-height:0%; - clear:both; - display:block; -} -.twikiHidden { - display:none; -} - -/* ----------------------------------------------------------- - Positioning of layout blocks - ----------------------------------------------------------- */ - -.patternMiddleContainer {} -.patternLeftBar { - position:absolute; - left:0; - margin:0; - padding:0; -} - -/* setting the height of the top bar */ - -.patternMiddleContainer {} -.patternLeftBar { - top:60px; /* height of patternTopBar */ -} -.patternTopBar { - height:60px; -} - -/* positioning the left bar (width:13em) */ - -.patternLeftBar, -.patternLeftBarContents /* needed for Explorer 5.0 */ { - width:16%; -} -.patternMain { - margin:0 0 0 16%; -} -.patternBottomBar { - margin:0 0 0 17%; /* add small margin for content offset */ -} - -/* ----------------------------------------------------------- - Pages that are not view - ----------------------------------------------------------- */ - -.patternNoViewPage .patternMain { - margin-left:3%; - margin-right:3%; - /* padding in style.css */ -} - -/* Print */ - -.patternPrintPage .patternMain { - margin-left:5%; - margin-right:5%; -} -.patternPrintPage .patternBottomBar { - margin-left:5%; - margin-right:0; - padding:0; -} -/* Plain */ - -.patternPlainPage .patternMain { - margin-left:0px; - margin-right:0px; - /* padding in style.css */ -} - - -/* ----------------------------------------------------------- - STYLE - Appearance: margins, padding, fonts, borders - ----------------------------------------------------------- */ - - -/* --------------------------------------------------------------------------------------- - CONSTANTS - - Sizes - ---------------------------------------- - S1 line-height 1.4em - S2 somewhat smaller font size 94% - S3 small font size, twikiSmall 85% - S4 horizontal bar padding (h2, patternTop) 5px - S5 form and attachment padding 20px - - --------------------------------------------------------------------------------------- */ - -/* ----------------------------------------------------------- - General elements - ----------------------------------------------------------- */ - -/* HTML elements */ -html body { - line-height:1.4em; /*S1*/ - font-family:"Lucida Grande", verdana, arial, sans-serif; - margin:0em; - padding:0em; - font-size:x-small; - voice-family:"\"}\""; - voice-family:inherit; - font-size:small; -} -html>body { /* Mozilla */ - font-size:small; -} -p { - margin:1em 0 0 0; -} -table { - border-collapse:separate; -} -th { - line-height:1.15em; -} -strong, b { - font-weight:bold; -} -hr { - height:1px; - border:none; -} -pre, code, tt { - font-size:100%; - line-height:1.4em; /*S1*/ -} -/* put overflow pre in a scroll area */ -pre { - overflow-x:auto; - overflow-y:visible; - padding-bottom:1.5em; - width:100%; -} -html>body pre { /* hide from IE */ - padding-bottom:0; - /*\*/ overflow:auto !important; /* */ overflow:scroll; width:auto; /* for Mac Safari */ -} -ol li, ul li { - line-height:1.4em; /*S1*/ -} - -/* Text */ -h1, h2, h3, h4, h5, h6 { - font-family:"Lucida Grande", arial, verdana, sans-serif; - line-height:104%; - padding:0em; - margin:1em 0 .1em 0; -} -h1, h2 { - font-weight:500; -} -h1, -.patternPreviewArea h1 { - font-size:200%; - margin:0 0 .5em 0; -} -.patternNoViewPage h1 { - font-size:175%; -} -.patternTopic h2, -.patternTopic h3, -.patternTopic h4, -.patternTopic h5 { - display:block; - /* give header a background color for easy scanning: */ - padding:.2em 5px; - margin:1em -5px .35em -5px; - border-width:0 0 1px 0; - border-style:solid; - height:auto; - -} - - -/* Links */ -/* somehow the twikiNewLink style have to be before the general link styles */ -.twikiNewLink { - border-width:0 0 1px 0; - border-style:dotted; -} -.twikiNewLink a { - text-decoration:none; - margin-left:1px; -} -.twikiNewLink a sup { - text-align:center; - padding:0 2px; - vertical-align:baseline; - font-size:100%; - text-decoration:none; -} -.twikiNewLink a:link sup, -.twikiNewLink a:visited sup { - border-width:1px; - border-style:solid; - text-decoration:none; -} -.twikiNewLink a:hover sup { - text-decoration:none; -} - -:link:focus, -:visited:focus, -:link, -:visited, -:link:active, -:visited:active { - text-decoration:underline; -} -:link:hover, -:visited:hover { - text-decoration:none; -} - -img { - vertical-align:text-bottom; -} - -/* Forms */ -form { - display:inline; - margin:0em; - padding:0em; -} -textarea, -input, -select { - font-size:100%; - vertical-align:middle; - border-width:1px; - border-style:solid; - padding:1px; -} -input { - margin:.15em 0; -} -textarea { - font-family:"Lucida Grande", verdana, arial, sans-serif; -} -label { - vertical-align:middle; -} - -/* ----------------------------------------------------------- - Plugin elements - ----------------------------------------------------------- */ - -/* TablePlugin */ -.twikiTable { - border-collapse: collapse; - border-width:1px; - border-style:solid; -} -.twikiTable td, -.twikiTable th { - border-width:0 1px; - border-style:solid; -} -.twikiTable th { - padding:.4em .5em; -} -.twikiTable td { - padding:.25em .5em; -} -.twikiTable th a:link, -.twikiTable th a:visited, -.twikiTable th a font { - text-decoration:none; -} -.twikiTable th a:hover, -.twikiTable th a:hover font { - text-decoration:none; - border-width:0 0 1px 0; - border-style:solid; -} - -/* TablePlugin - sorting of table columns */ -th.twikiSortedAscendingCol a:link, -th.twikiSortedAscendingCol a:link font, -th.twikiSortedAscendingCol a:visited, -th.twikiSortedAscendingCol a:visited font, -.twikiAttachments th.twikiSortedAscendingCol a:link, -.twikiAttachments th.twikiSortedAscendingCol a:link font, -.twikiAttachments th.twikiSortedAscendingCol a:visited, -.twikiAttachments th.twikiSortedAscendingCol a:visited font { - text-decoration:none; - border-width:1px 0 0 0; - border-style:solid; -} -th.twikiSortedDescendingCol a:link, -th.twikiSortedDescendingCol a:link font, -th.twikiSortedDescendingCol a:visited, -th.twikiSortedDescendingCol a:visited font, -.twikiAttachments th.twikiSortedDescendingCol a:link, -.twikiAttachments th.twikiSortedDescendingCol a:link font, -.twikiAttachments th.twikiSortedDescendingCol a:visited, -.twikiAttachments th.twikiSortedDescendingCol a:visited font { - text-decoration:none; - border-width:0 0 1px 0; - border-style:solid; -} -th.twikiSortedAscendingCol a:hover, -th.twikiSortedAscendingCol a:hover font, -th.twikiSortedDescendingCol a:hover, -th.twikiSortedDescendingCol a:hover font, -.twikiAttachments th.twikiSortedAscendingCol a:hover, -.twikiAttachments th.twikiSortedAscendingCol a:hover font, -.twikiAttachments th.twikiSortedDescendingCol a:hover, -.twikiAttachments th.twikiSortedDescendingCol a:hover font{ - text-decoration:none; - border:0; -} -th.twikiSortedAscendingCol a:hover, -th.twikiSortedAscendingCol a:hover font, -.twikiAttachments th.twikiSortedAscendingCol a:hover, -.twikiAttachments th.twikiSortedAscendingCol a:hover font { - border-width:0 0 1px 0; - border-style:solid; -} -th.twikiSortedDescendingCol a:hover, -th.twikiSortedDescendingCol a:hover font, -.twikiAttachments th.twikiSortedDescendingCol a:hover, -.twikiAttachments th.twikiSortedDescendingCol a:hover font { - border-width:1px 0 0 0; - border-style:solid; -} - -/* TipsContrib */ -.tipsOfTheDayContents .tipsOfTheDayTitle { - font-weight:bold; -} -.patternTopic .tipsOfTheDayHeader { - display:block; - padding:3px 5px; -} -.patternTopic .tipsOfTheDayText { - padding:0 5px 5px 5px; -} -.patternTopic .tipsOfTheDayText a:link, -.patternTopic .tipsOfTheDayText a:visited { - text-decoration:none; -} -/* TipsContrib - in left bar */ -.patternLeftBar .tipsOfTheDay { - margin:1em 0 .5em 0; - border-width:0; -} -.patternLeftBar .tipsOfTheDayHeader img { - display:none; -} -.patternLeftBar .tipsOfTheDayContents { - padding:.25em .25em .5em .25em; -} -.patternLeftBar .tipsOfTheDayHeader { - display:block; - font-weight:normal; -} - -/* TwistyContrib */ -a:link.twistyTrigger, -a:visited.twistyTrigger { - text-decoration:none; -} -a:link .twistyLinkLabel, -a:visited .twistyLinkLabel { - text-decoration:underline; -} - -/* ----------------------------------------------------------- - TWiki styles - ----------------------------------------------------------- */ - -.twikiAttachments, -.twikiForm { - margin:1em 0; -} -.patternContent .twikiAttachments, -.patternContent .twikiForm { - font-size:94%; /*S2*/ - padding:20px; /*S5*/ - border-width:1px 0 0 0; - border-style:solid; - margin:0 0 -1px 0; -} -.twikiAttachments p { /* fix for extra generated paragraph */ - display:none; -} -.twikiAttachments table, -.twikiForm table { - border-collapse:collapse; - padding:0px; - border-spacing:0px; - empty-cells:show; - border-style:solid; - border-width:1px 1px 0 1px; -} -.twikiAttachments table { - line-height:1.4em; /*S1*/ - width:auto; - voice-family: "\"}\""; /* hide the following for Explorer 5.x */ - voice-family:inherit; - width:100%; -} -.twikiAttachments th, -.twikiForm th, -.twikiAttachments th, -.twikiForm th { - padding:.2em .6em; - height:2.5em; - vertical-align:middle; - border-style:solid; - border-width:0 0 1px 1px; -} -.twikiAttachments th.twikiFirstCol, -.twikiForm th.twikiFirstCol { - border-left:none; - width:0px; -} -/* don't show any of those ugly sort icons */ -.twikiAttachments th img, -.twikiAttachments th a:link img, -.twikiAttachments th a:visited img { - display:none; -} -.twikiAttachments td, -.twikiForm td { - border-style:solid; - border-width:0 0 1px 0; - padding:.2em .6em; - height:1.4em; /*S1*/ - text-align:left; - vertical-align:top; -} -.twikiForm th.twikiFirstCol, -.twikiForm td.twikiFirstCol { - border-left:none; -} -.twikiAttachments th.twikiFirstCol, -.twikiAttachments td.twikiFirstCol { - border-left:none; - width:26px; - text-align:center; -} -.twikiAttachments th a:link, -.twikiAttachments th a:visited, -.twikiForm th a:link, -.twikiForm th a:visited { - text-decoration:none; -} -.twikiAttachments th a:hover, -.twikiForm th a:hover { - text-decoration:none; - border-width:0 0 1px 0; - border-style:solid; -} -.twikiAttachments td a:link, -.twikiAttachments td a:visited, -.twikiForm td a:link, -.twikiForm td a:visited { - font-weight: normal; -} -.twikiForm table table, -.twikiForm table table th, -.twikiForm table table td { - border:none; -} - - -.twikiToc { - margin:1em 0; - padding:.3em 0 .6em 0; -} -.twikiToc ul { - list-style:outside; /* list style image is set in twiki.pattern.tmpl */ - padding:0 0 0 .5em; - margin:0em; -} -.twikiToc li { - margin-left:1em; -} -.twikiToc .twikiTocTitle { - margin:0em; - padding:0em; - font-weight:bold; -} - -.twikiSmall { - font-size:85%; /*S3*/ -} -.twikiSmallish { - font-size:94%; /*S2*/ -} -.twikiNew { } -.twikiSummary { - font-size:85%; /*S3*/ -} -.twikiEmulatedLink { - text-decoration:underline; -} -.twikiPageForm table { - width:100%; - border-width:1px; - border-style:solid; - margin:0 0 2em 0; -} -.twikiPageForm th, -.twikiPageForm td { - border:0; - padding:.15em; -} -.twikiPageForm td {} -.twikiPageForm th.last, -.twikiPageForm td.last { - border-bottom:0; -} -.twikiPageForm td.first { - padding-top:1em; -} -.twikiBroadcastMessage { - padding:.25em; -} -.twikiButton, -.twikiSubmit { - font-size:100%; - border-width:1px; - border-style:solid; - vertical-align:middle; - padding:1px; -} -.twikiCheckbox, -.twikiRadioButton { - border:none; - vertical-align:middle; - margin:0 .3em 0 0; -} -.twikiHelp { - padding:1em; - margin:.5em 0 1em 0; - border-width:1px 0; - border-style:solid; -} -.twikiHelp ul, -.twikiHelp li { - margin-top:0; - margin-bottom:0; -} -.twikiAccessKey { - text-decoration:none; - border-width:0 0 1px 0; - border-style:solid; -} -a:hover .twikiAccessKey { - text-decoration:none; - border:none; -} - -/* ----------------------------------------------------------- - Pattern skin specific elements - ----------------------------------------------------------- */ - -.patternSeparator { - font-family:monospace; -} - -.patternTopicAction { - font-size:94%; /*S2*/ - line-height:1.5em; - margin:0 0 3em 0; - padding:.5em 20px; /*S5*/ - border-width:1px 0; - border-style:solid; -} -.patternActionButtons a:link, -.patternActionButtons a:visited { - padding:1px 1px 2px 1px; -} -.patternTopicAction .patternActionButtons a:link, -.patternTopicAction .patternActionButtons a:visited { - text-decoration:none; -} -.patternTopicAction .patternSaveOptions { - margin-bottom:.5em; -} -.patternTopicAction .patternSaveOptions .patternSaveOptionsContents { - padding:.2em 0; -} -.patternMoved { - font-size:94%; /*S2*/ - margin-bottom:1em; -} -.patternWebIndicator {} -.patternPage { - font-size:100%; -} -.patternMiddleContainer {} -.patternMain { - padding:0 1.5em 1em 2em; - border-width:1px; - border-style:solid; -} -.patternNoViewPage .patternMain { - padding-top:2em; - padding-bottom:2em; - margin-bottom:1em; -} - -/* Top bar */ - -.patternTopBar {} -.patternTopBarContents { - margin:0em; - padding:5px 2em 5px 1em; /* right padding same as .patternViewPage .patternMain */ -} -.patternTopBarContents table { - height:50px; /* together with a padding of 2x 5px this assumes a logo of 40px height */ -} -.patternTopBarContents .patternSearchBox td { - height:50px; - vertical-align:middle; - font-size:94%; /*S2*/ -} -.patternMetaNav { - font-size:85%; /*S3*/ -} -.patternMetaNav a:link, -.patternMetaNav a:visited { - text-decoration:none; -} -.patternMetaNav .patternSeparator { - margin:0 .5em; -} -.patternMetaNav input#quickSearchBox, -.patternMetaNav input#jumpBox { - margin:0 0 0 .85em; - padding:0; - height:1.2em; /* 85% of default line-height 1.4 */ -} -.patternMetaNav input#quickSearchButton, -.patternMetaNav input#jumpButton { - margin:0 0 0 2px; - border:0; -} - -/* Left bar */ -.patternLeftBar { - border-width:1px 1px 1px 0; - border-style:solid; - overflow:hidden; - font-size:94%; /*S2*/ -} -.patternLeftBar a img { - margin:1px 0 0 0; -} -.patternLeftBar a:link, -.patternLeftBar a:visited { - text-decoration:none; -} -.patternLeftBar ul { - padding:0em; - margin:0em; - list-style:none; -} -.patternLeftBar li { - padding-left:0; -} -.patternLeftBar .patternLeftBarContents { - margin:-1px 0 1em 0; - padding:0 .5em 0 1em; - width:89%; -} -.patternLeftBar .patternForm { - margin:.5em 0 1em 0; -} -html>body .patternLeftBar .patternForm { /* Hide from IE */ - margin:1.25em 0 1em 0; -} -.patternLeftBar .patternFormElements { - margin:0 0 3px 0; - width:100%; -} -.patternLeftBar input#quickSearchBox, -.patternLeftBar input#jumpBox { - margin:0; - height:12px; /* with padding and border this adds up to 16px height - same as button */ - width:80%; - border-width:1px; - border-style:solid; - font-size:85%; /*S3*/ -} -.patternLeftBar input#quickSearchButton, -.patternLeftBar input#jumpButton { - margin:0 0 0 4px; - padding:0; - border:0; -} -.patternLeftBar .patternChangeLanguage { - margin:.2em 0 0 0; - font-size:85%; /*S3*/ -} -.patternLeftBarPersonal { - margin:-1px 0 .7em 0; - padding:.25em 0 .25em 1em; - border-width:1px 0; - border-style:solid; -} -.patternLeftBarPersonal ul { - list-style: none; - margin:0; - padding:0; -} -.patternLeftBarPersonal li { - padding-left:1em; - background-repeat:no-repeat; - background-position:0 .5em; -} -.patternLeftBarPersonal a:hover { - text-decoration:none; -} - -/* Bottom bar */ -.patternBottomBar { - padding-bottom:1em; -} -.patternBottomBarContents { - padding:.5em 2.5em 1.5em .25em; - font-size:94%; /*S2*/ -} - -/* table used in various places */ -.patternVersatileTable table { - width:auto; - padding:0px; - border-spacing:0px; - border-collapse:collapse; - empty-cells:show; - border-width:1px; - border-style:solid; - margin:1em 0; - font-size:94%; /*S2*/ -} -.patternVersatileTable th, -.patternVersatileTable td { - vertical-align:middle; - border-width:1px 0 0 0; - border-style:solid; - padding:5px 1em 5px 1.25em; /*S4*/ -} - - - -/* Topic text */ -.patternTopic { - padding:0 0 1.5em 0; -} - -.patternTop { - font-size:94%; /*S2*/ -} -.patternTop table { - border:none; - width:100%; -} -.patternTop td { - vertical-align:middle; -} -.patternTop .patternHomePath, -.patternTop .patternRevInfo { - padding:.25em .5em .25em 0; - line-height:1.25em; -} -.patternTop .patternHomePath { - text-align:left; - width:auto; -} -.patternTop .patternRevInfo { - float:right; - text-align:right; -} -.patternTop .patternHomePath a:link, -.patternTop .patternHomePath a:visited, -.patternTop .patternRevInfo a:link, -.patternTop .patternRevInfo a:visited { - text-decoration:none; -} - -/* Button tool bar */ -.patternToolBar { - padding:.25em .5em 0 .5em; - line-height:100%; -} -td.patternToolBar { - vertical-align:bottom; -} -.patternToolBar a:link, -.patternToolBar a:visited { - text-decoration:none; -} -.patternToolBarButtons { - float:right; -} -.patternToolBarButtons .twikiSeparator { - display:none; -} -.patternToolBar .patternButton { - float:left; -} -.patternToolBar .patternButton s, -.patternToolBar .patternButton strike, -.patternToolBar .patternButton a:link, -.patternToolBar .patternButton a:visited { - display:block; - margin:0 0 -1px 4px; - border-width:1px; - border-style:solid; - position:relative; - z-index:0; - padding:.35em .6em; -} -.patternToolBar .patternButton a:link, -.patternToolBar .patternButton a:visited { - text-decoration:none; -} -.patternToolBar .patternButton s, -.patternToolBar .patternButton strike { - text-decoration:none; -} -.patternToolBar .patternButton a:hover { - text-decoration:none; - z-index:3; -} -.patternToolBarBottom { - position:relative; - border-width:1px 0 0 0; - border-style:solid; - margin:0 0 .5em 0; - z-index:2; -} - -/* Edit page */ - -.twikiChangeFormButtonHolder { - margin:1em 0; - float:right; -} -.patternFormHolder { /* constrains the textarea */ - width:100%; -} -.twikiChangeFormButton { - font-family:"Lucida Grande", verdana, arial, sans-serif; - padding:0em; - margin:0em; - border:none; - text-decoration:underline; -} -.patternSig { - margin:.25em 0; -} - -.patternAccessKeyInfo { - margin-top:1em; - padding:.25em .5em; - border-width:1px 0; - border-style:solid; -} -.patternAccessKeyInfo a:link, -.patternAccessKeyInfo a:visited { - text-decoration:underline; -} -.patternAccessKeyInfo a:hover { - text-decoration:none; -} - -/* Preview page */ - -.patternPreviewArea { - border-width:1px; - border-style:solid; - margin:0em -.5em 2em -.5em; - padding:.5em; -} - -/* Attach page */ - -.patternAttachPage .patternVersatileTable table { - margin-bottom:0; - width:auto; - voice-family: "\"}\""; /* hide the following for Explorer 5.x */ - voice-family:inherit; - width:100%; -} -.patternAttachPage .patternVersatileTable th { - text-align:right; -} -.patternPrevious { - margin:1em 0; -} -#moveattachment { - font-size:94%; /*S2*/ -} -.patternPrevious table { - width:auto; -} - -/* Rename page */ - -.patternRenamePage .patternVersatileTable th { - text-align:right; - width:10%; -} - -/* WebSearch, WebSearchAdvanced */ - -table#twikiSearchTable { - background:none; - border-bottom:0; -} -table#twikiSearchTable th, -table#twikiSearchTable td { - padding:.5em; - border-width:0 0 1px 0; - border-style:solid; -} -table#twikiSearchTable th { - width:15%; - text-align:right; -} -table#twikiSearchTable td { - width:85%; -} -table#twikiSearchTable td.first { - padding-top:1em; -} - -/* ----------------------------------------------------------- - Search results - styles and overridden styles used in search.pattern.tmpl - ----------------------------------------------------------- */ - -.patternSearchResultsPage {} -.patternSearchResults {} - -.patternSearchResultsHeader { - padding:.25em 5px .15em 5px; /*S4*/ - margin:0 -5px .25em -5px; /*S4*/ - font-weight:bold; - border-width:0 0 1px 0; - border-style:solid; - height:1.5em; /* or WIN/IE wont draw the backgound */ -} -.patternSearchString { - margin:1em 0 1.5em 0; -} -.patternSearchResults table { - width:auto; - voice-family: "\"}\""; /* hide the following for Explorer 5.x */ - voice-family:inherit; - width:100%; -} -.patternSearchResults .twikiTopRow { - padding-top:.2em; -} -.patternSearchResults .twikiBottomRow { - padding-bottom:.25em; - border-width:0 0 1px 0; - border-style:solid; -} -.patternSearchResults .twikiAlert { - font-weight:bold; -} -.patternSearchResults .twikiSummary .twikiAlert { - font-weight:normal; -} -.patternSearchResults .twikiNew { - border-width:1px; - border-style:solid; - font-size:85%; /*S3*/ - padding:0 1px; - font-weight:bold; -} -.patternSearchResultsPage .twikiHelp { - display:block; - width:auto; - margin:.25em 0; -} -.patternSearchResults .twikiSRAuthor { - width:15%; - text-align:left; -} -.patternSearchResults .twikiSRRev { - width:30%; - text-align:left; -} -.patternSearchResultCount { - margin:.25em 0 1.5em 0; - font-size:94%; /*S2*/ -} -.patternViewPage .patternSearchResultsBegin { /* for changes template with noheader="on" */ - height:1px; - border-width:0 0 1px 0; - border-style:solid; - padding:0 5px; /*S4*/ - margin:0 -5px; /*S4*/ -} - -/* Search results in book view format */ - -.patternBookViewList .patternSearchResultsHeader { - margin-bottom:1em; -} -.patternBookViewList .twikiTopRow { - padding:.2em 5px; /*S4*/ - margin:2.5em -5px .15em -5px; /*S4*/ -} -.patternBookViewList .twikiBottomRow { - font-size:100%; - padding:1em 0; -} -.patternBookViewList .twikiBottomRow { - width:auto; -} - -/* Print */ - -.patternPrintPage { - /*font-size: 12pt;*/ -} -.patternPrintPage .patternMain { - padding:1em 2em 0 2em; - border-width:1px; - border-style:solid; -} -.patternPrintPage .patternBottomBarContents { - padding-left:1em; -} -.patternPrintPage .patternTopicFooter { - margin:2em 0 2em 0; - font-size:94%; /*S2*/ -} - -/* Diff */ - -.patternDiffPage .twikiDiffTable { - margin:2em 0; -} -.patternDiffPage .twikiDiffTable th, -.patternDiffPage .twikiDiffTable td { - padding:.2em; -} -tr.twikiDiffDebug td { - border-width:1px; - border-style:solid; -} -.patternDiffPage td.twikiDiffDebugLeft { - border-bottom:none; -} -.twikiDiffLineNumberHeader { - padding:.3em 0; -} - - -/* ----------------------------------------------------------- - COLOR - Appearance: text colors, background colors, border colors - ----------------------------------------------------------- */ - -/* --------------------------------------------------------------------------------------- - CONSTANTS - - Text colors - ---------------------------------------- - T1 text color #000 - T2 link color #06c - T3 link hover text color #FBF7E8 - T4 link action button color (red) (same as BG2) #D6000F - T5 header color #a00 - T6 code text, left bar text #7A4707 - T7 muted (dark gray) text #666 - T8 grayed out text #8E9195 - T9 alert #f00 - T10 green 'new' #049804 - T11 dark gray #333 - - Background colors - ---------------------------------------- - BG1 white; attachment, form table background #fff - BG2 link hover background color (red) #D6000F - BG3 light gray #efefef - BG4 active form field (not implemented yet) #ffc - BG5 info background very light blue (placeholder for background image) #E8EEF7 - BG6 patternTopicAction light yellow (same as T3) #FBF7E8 - BG7 header background (very light yellow) #FDFAF1 - BG8 accent on sorted table column #ccc - BG9 light yellow; attachment, form background #FEFBF3 - BG10 light green 'new' #ECFADC - BG11 dark gray; diff header background (same as T8) #8E9195 - BG12 dark yellow, submit button #FED764 - - Border colors - ---------------------------------------- - BO1 light gray #efefef - BO2 submit button border blue ('active') #88B6CF - BO3 info light blue border #BFD8ED - BO4 border color beige, header h2 bottom border #E2DCC8 - BO5 header h3..h5 bottom border (75% of BO4) #E9E4D2 - BO6 neutral gray border #ccc - BO7 light neutral gray #ddd - BO9 alert border #f00 - - --------------------------------------------------------------------------------------- */ - -html body { - background-color:#fff; /*BG1*/ - color:#000; /*T1*/ -} -/* be kind to netscape 4 that doesn't understand inheritance */ -body, p, li, ul, ol, dl, dt, dd, acronym, h1, h2, h3, h4, h5, h6 { - background-color:transparent; -} -hr { - color:#ccc; /*BO6*/ - background-color:#ccc; /*BO6*/ -} -pre, code, tt { - color:#7A4707; /*T6*/ -} -h1, h2, h3, h4, h5, h6 { - color:#a00; /*T5*/ -} -h1 a:link, -h1 a:visited { - color:#a00; /*T5*/ -} -.patternTopic h2 { - background-color:#FDFAF1; - border-color:#E2DCC8; /*BO4*/ -} -.patternTopic h3, -.patternTopic h4, -.patternTopic h5 { - border-color:#E9E4D2; /*BO5*/ -} -/* to override old Render.pm coded font color style */ -.twikiNewLink font { - color:inherit; -} -.twikiNewLink a:link sup, -.twikiNewLink a:visited sup { - color:#666; /*T7*/ - border-color:#E2DCC8; /*BO4*/ -} -.twikiNewLink a:hover sup { - background-color:#D6000F; /*BG2*/ - color:#FBF7E8; /*C3*/ - border-color:#D6000F; /*BG2*/ /* (part of bg) */ -} -.twikiNewLink { - border-color:#666; /*T7*/ -} -:link:focus, -:visited:focus, -:link, -:visited, -:link:active, -:visited:active { - color:#06c; /*T2*/; - background-color:transparent; -} -:link:hover, -:visited:hover { - color:#FBF7E8; /*C3*/ - background-color:#D6000F; /*BG2*/ -} -:link:hover img, -:visited:hover img { - background:#fff; /*BG1*/ -} - -.patternTopic a:visited { - color:#666; /*T7*/ -} -.patternTopic a:hover { - color:#FBF7E8; /*C3*/ -} -textarea, -input, -select { - border-color:#ccc; /*BO6*/ - background-color:#FEFBF3; /*BG9*/ -} - -/* ----------------------------------------------------------- - Plugin elements - ----------------------------------------------------------- */ - -/* TablePlugin */ -.twikiTable, -.twikiTable td, -.twikiTable th { - border-color:#ddd; /*BO7*/ -} -.twikiTable th a:link, -.twikiTable th a:visited, -.twikiTable th a font { - color:#06c; /*T2*/ -} -.twikiTable th a:hover, -.twikiTable th a:hover font { - background-color:transparent; - color:#D6000F; /*T4*/ - border-color:#D6000F; /*T4*/ -} - -/* TablePlugin - sorting of table columns */ -.patternTopic th.twikiSortedAscendingCol, -.patternTopic th.twikiSortedDescendingCol { - background-color:#ccc; /*BG8*/ -} -th.twikiSortedAscendingCol a:link, -th.twikiSortedAscendingCol a:link font, -th.twikiSortedAscendingCol a:visited, -th.twikiSortedAscendingCol a:visited font, -.twikiAttachments th.twikiSortedAscendingCol a:link, -.twikiAttachments th.twikiSortedAscendingCol a:link font, -.twikiAttachments th.twikiSortedAscendingCol a:visited, -.twikiAttachments th.twikiSortedAscendingCol a:visited font, -th.twikiSortedDescendingCol a:link, -th.twikiSortedDescendingCol a:link font, -th.twikiSortedDescendingCol a:visited, -th.twikiSortedDescendingCol a:visited font, -.twikiAttachments th.twikiSortedDescendingCol a:link, -.twikiAttachments th.twikiSortedDescendingCol a:link font, -.twikiAttachments th.twikiSortedDescendingCol a:visited, -.twikiAttachments th.twikiSortedDescendingCol a:visited font { - border-color:#666; /*T7*/ -} -th.twikiSortedAscendingCol a:hover, -th.twikiSortedAscendingCol a:hover font, -.twikiAttachments th.twikiSortedAscendingCol a:hover, -.twikiAttachments th.twikiSortedAscendingCol a:hover font, -th.twikiSortedDescendingCol a:hover, -th.twikiSortedDescendingCol a:hover font, -.twikiAttachments th.twikiSortedDescendingCol a:hover, -.twikiAttachments th.twikiSortedDescendingCol a:hover font { - border-color:#D6000F; /*T4*/ -} - -/* TwistyContrib */ -.twistyPlaceholder { - color:#8E9195; /*T8*/ -} -a:hover.twistyTrigger { - color:#FBF7E8; /*T3*/ -} - -/* TipsContrib */ -.tipsOfTheDay { - background-color:#E8EEF7; /*BG5*/ -} -.patternTopic .tipsOfTheDayHeader { - color:#333; /*T11*/ -} -/* TipsContrib - in left bar */ -.patternLeftBar .tipsOfTheDay a:link, -.patternLeftBar .tipsOfTheDay a:visited { - color:#a00; /*T5*/ -} -.patternLeftBar .tipsOfTheDay a:hover { - color:#FBF7E8; /*T3*/ -} - -/* ----------------------------------------------------------- - TWiki styles - ----------------------------------------------------------- */ - -.twikiGrayText a:link, -.twikiGrayText a:visited { - color:#8E9195; /*T8*/ -} -.twikiGrayText a:hover { - color:#FBF7E8; /*C3*/ -} - -.twikiAttachments, -.twikiForm { - color:#666; /*T7*/ -} -.patternContent .twikiAttachments, -.patternContent .twikiForm { - color:#333; /*T11*/ -} -.patternEditPage .twikiForm { - color:#000; /*T1*/ -} -.patternContent .twikiAttachments, -.patternContent .twikiForm { - background-color:#FEFBF3; /*BG9*/ - border-color:#E2DCC8; /*BO4*/ -} -.twikiAttachments table, -.twikiForm table { - border-color:#ccc; /*BO6*/ - background-color:#fff; /*BG1*/ -} -.twikiAttachments table { - background-color:#fff; /*BG1*/ -} -.twikiAttachments th, -.twikiForm th, -.twikiAttachments th, -.twikiForm th { - border-color:#ccc; /*BO6*/ - background-color:#fff; /*BG1*/ -} -.twikiAttachments td, -.twikiForm td { - border-color:#ccc; /*BO6*/ - background-color:#fff; /*BG1*/ -} -.twikiAttachments th a:link, -.twikiAttachments th a:visited, -.twikiForm th a:link, -.twikiForm th a:visited { - color:#06c; /*T2*/ - border-color:#06c; /*T2*/ -} -.twikiAttachments th font, -.twikiForm th font { - color:#06c; /*T2*/ -} -.twikiAttachments th a:hover, -.twikiForm th a:hover { - border-color:#06c; /*T2*/ - background-color:transparent; -} -.twikiAttachments th.twikiSortedAscendingCol, -.twikiAttachments th.twikiSortedDescendingCol { - background-color:#efefef; /*BG3*/ -} -.twikiToc .twikiTocTitle { - color:#666; /*T7*/ -} -.twikiBroadcastMessage b, -.twikiBroadcastMessage strong { - color:#f00; /*T9*/ -} -.twikiAlert, -.twikiAlert code { - color:#f00; /*T9*/ -} -.twikiGrayText { - color:#8E9195; /*T8*/ -} -.twikiEmulatedLink { - color:#06c; /*T2*/ -} -.twikiPageForm table { - border-color:#ddd; /*BO7*/ - background:#fff; /*BG1*/ -} -.twikiPageForm th { - color:#8E9195; /*T8*/ -} -.twikiPageForm td.first { - background:#efefef; /*BG3*/ -} -.twikiPageForm hr { - border-color:#efefef; /*BO1*/ - background-color:#efefef; /*BO1*/ - color:#efefef; /*BO1*/ -} -.twikiButton, -.twikiSubmit { - border-color:#ccc; /*BO6*/ -} -.twikiButton { - background-color:#efefef; /*BG3*/ -} -.twikiSubmit { - background-color:#FED764; /*BG12*/ -} -.twikiCheckbox, -.twikiRadioButton { - background-color:transparent; -} -.twikiHelp { - background-color:#E8EEF7; /*BG5*/ - border-color:#BFD8ED; /*BO3*/ -} -.twikiAccessKey { - color:inherit; - border-color:#8E9195; /*T8*/ -} -a:link .twikiAccessKey, -a:visited .twikiAccessKey, -a:hover .twikiAccessKey { - color:inherit; -} - -/* ----------------------------------------------------------- - Pattern skin specific elements - ----------------------------------------------------------- */ -.patternTopicAction { - color:#666; /*T7*/ - border-color:#E2DCC8; /*BO4*/ - background-color:#FBF7E8; -} -.patternTopicAction .twikiSeparator { - color:#aaa; -} -.patternActionButtons a:link, -.patternActionButtons a:visited { - color:#D6000F; /*T4*/ -} -.patternActionButtons a:hover { - color:#FBF7E8; /*C3*/ -} -.patternTopicAction .twikiAccessKey { - border-color:#C75305; -} -.patternTopicAction label { - color:#000; /*T1*/ -} -.patternHelpCol { - color:#8E9195; /*T8*/ -} -.patternWebIndicator { - background-color:#fff; -} -.patternMain { - background-color:#fff; /*BG1*/ - border-color:#E2DCC8; /*BO4*/ -} -.patternTopBar { - background-color:transparent; -} -.patternTopBarContents .patternSearchBox td { - color:#8E9195; /*T8*/ -} -.patternMetaNav { - color:#8E9195; /*T8*/ -} -.patternMetaNav a:link, -.patternMetaNav a:visited { - color:#8E9195; /*T7*/ -} -.patternMetaNav a:hover { - color:#FBF7E8; /*C3*/ -} -.patternMetaNav input { - background-color:#FEFBF3; /*BG9*/ -} -/* Left bar */ -.patternLeftBar { - border-color:#E2DCC8; /*BO4*/ - color:#666; /*T7*/ - background-color:transparent; -} -.patternLeftBar hr { - color:#E2DCC8; /*BO4*/ - background-color:#E2DCC8; /*BO4*/ -} -.patternLeftBar a:link, -.patternLeftBar a:visited { - color:#7A4707; /*T6*/ -} -.patternLeftBar a:hover { - color:#FBF7E8; /*C3*/ -} -.patternLeftBar b, -.patternLeftBar strong { - color:#333; /*T11*/ -} -.patternLeftBar input#quickSearchBox, -.patternLeftBar input#jumpBox { - border-color:#E2DCC8; -} -.patternLeftBar .patternChangeLanguage { - color:#8E9195; /*T8*/ -} -.patternLeftBarPersonal { - background-color:#E8EEF7; - border-color:#BFD8ED; /*BO3*/ -} -.patternLeftBarPersonal a:link, -.patternLeftBarPersonal a:visited { - color:#06c; /*T2*/; -} -.patternLeftBarPersonal a:hover { - color:#FBF7E8; /*C3*/ - background-color:#D6000F; /*BG2*/ -} -.patternBottomBarContents { - color:#8E9195; /*T8*/ -} -.patternVersatileTable table { - border-color:#ccc; -} -.patternVersatileTable th, -.patternVersatileTable td { - border-color:#ccc; /*BO6*/ -} -.patternVersatileTable td { - background-color:#fff; /*BG1*/ -} -.patternVersatileTable th { - background-color:#efefef; -} -.patternVersatileTable th.patternMainCol, -.patternVersatileTable td.patternMainCol { - background-color:#ECFADC; /*BG10*/ -} -.patternVersatileTable th.patternOldCol, -.patternVersatileTable td.patternOldCol { - background-color:#fff; /*BG1*/ - color:#000; -} -.patternVersatileTable input { - background-color:#fff; /*BG1*/ -} -.patternVersatileTable input.twikiCheckbox { - background-color:transparent; -} - -.patternTop { - color:#8E9195; /*T8*/ -} -.patternTop .patternHomePath { - color:#000; /*T1*/ -} -.patternTop .patternRevInfo, -.patternTop .patternRevInfo a:link, -.patternTop .patternRevInfo a:visited { - color:#8E9195; /*T8*/ -} -.patternTop .patternRevInfo a:hover { - color:#FBF7E8; /*C3*/ -} -.patternToolBar .patternButton s, -.patternToolBar .patternButton strike, -.patternToolBar .patternButton a:link, -.patternToolBar .patternButton a:visited { - border-color:#E2DCC8; /*BO4*/ - background-color:#fff; /*BG1*/ -} -.patternToolBar .patternButton a:link, -.patternToolBar .patternButton a:visited { - color:#666; /*T7*/ -} -.patternToolBar .patternButton s, -.patternToolBar .patternButton strike { - color:#8E9195; /*T8*/ - border-color:#e0e0e0; - background-color:#fff; /*BG1*/ -} -.patternToolBar .patternButton a:hover { - background-color:#D6000F; /*BG2*/ - color:#FBF7E8; /*C3*/ - border-color:#D6000F; /*T4*/ -} -.patternToolBarBottom { - border-color:#E2DCC8; /*BO4*/ -} -.patternToolBar a:link .twikiAccessKey, -.patternToolBar a:visited .twikiAccessKey { - color:inherit; - border-color:#666; /*T7*/ -} -.patternToolBar a:hover .twikiAccessKey { - background-color:transparent; - color:inherit; -} - -/* Edit page */ - -.patternEditPage textarea#topic { - background-color:#fff; /*BG1*/ -} -.twikiChangeFormButton { - color:#06c; /*T2*/ - background-color:transparent; -} -.patternSig input { - color:#8E9195; /*T8*/ - background-color:#fff; /*BG1*/ -} -.patternAccessKeyInfo { - color:#666; /*T7*/ - background-color:#E8EEF7; /*BG5*/ - border-color:#BFD8ED; /*BO3*/ -} -.patternAccessKeyInfo a:link, -.patternAccessKeyInfo a:visited { - color:#06c; /*T2*/ -} -.patternAccessKeyInfo a:hover { - color:#FBF7E8; /*T3*/ -} - -/* Preview page */ - -.patternPreviewArea { - border-color:#f00; /*BO9*/ - background-color:#fff; /*BG1*/ -} - -/* WebSearch, WebSearchAdvanced */ - -table#twikiSearchTable th, -table#twikiSearchTable td { - background-color:#fff; /*BG1*/ - border-color:#ddd; /*BO7*/ -} -table#twikiSearchTable th { - color:#8E9195; /*T8*/ -} -table#twikiSearchTable td.first { - background-color:#efefef; /*BG3*/ -} - -/* ----------------------------------------------------------- - Search results - styles and overridden styles used in search.pattern.tmpl - ----------------------------------------------------------- */ - -.patternSearchResultsHeader { - background-color:#FEFBF3; /*BG9*/ - border-color:#ccc; /*BO6*/ -} -.patternSearchResults .twikiBottomRow { - border-color:#ddd; /*BO7*/ -} -.patternSearchResults .twikiAlert { - color:#f00; /*T9*/ -} -.patternSearchResults .twikiSummary .twikiAlert { - color:#900; /*C5*/ -} -.patternSearchResults .twikiNew { - background-color:#ECFADC; /*BG10*/ - border-color:#049804; /*T10*/ - color:#049804; /*T10*/ -} -.patternViewPage .patternSearchResultsBegin { - border-color:#ddd; /*BO7*/ -} - -/* Search results in book view format */ - -.patternBookViewList .twikiTopRow { - background-color:transparent; /* set to BGCOLOR in template */ - color:#666; /*T7*/ -} -.patternBookViewList .twikiTopRow a:link, -.patternBookViewList .twikiTopRow a:visited { - color:#FBF7E8; /*C3*/ -} -.patternBookViewList .twikiTopRow a:hover { - color:#06c; /*T2*/; -} -.patternBookViewList .twikiBottomRow { - border-color:#ddd; /*BO7*/ -} -.patternBookViewList .patternSearchResultCount { - color:#8E9195; /*T8*/ -} - -/* Print */ - -.patternPrintPage .patternMain { - border-color:#fff #ddd #ddd #ddd; /*BO7*/ -} -.patternPrintPage .patternContent .twikiAttachments, -.patternPrintPage .patternContent .twikiForm { - background:#fff; /*BG1*/ -} - -/* Diff */ - -tr.twikiDiffDebug td { - border-color:#ccc; /*BO6*/ -} -tr.twikiDiffDebug .twikiDiffChangedText, -tr.twikiDiffDebug .twikiDiffChangedText { - background:#99ff99; -} -/* Deleted */ -tr.twikiDiffDebug .twikiDiffDeletedMarker, -tr.twikiDiffDebug .twikiDiffDeletedText { - background-color:#f99; -} -/* Added */ -tr.twikiDiffDebug .twikiDiffAddedMarker, -tr.twikiDiffDebug .twikiDiffAddedText { - background-color:#ccf; -} -/* Unchanged */ -tr.twikiDiffDebug .twikiDiffUnchangedText { - color:#8E9195; /*T8*/ -} -/* Headers */ -.twikiDiffChangedHeader, -.twikiDiffDeletedHeader, -.twikiDiffAddedHeader { - background-color:#8E9195; /*BG11*/ -} - -/* Unchanged */ -.twikiDiffUnchangedTextContents { } -.twikiDiffLineNumberHeader { - background-color:#ddd; -} - - - - - - -/* CONFIGURE SPECIFIC */ - -ul { - margin-top:0; - margin-bottom:0; -} -.patternMain { - margin:0 3em; - border-top:0; -} -.logo { - margin:1em 0 1.5em 0; -} -.formElem { - background-color:#F3EDE7; - margin:0.5em 0; - padding:0.5em 1em; -} -.blockLinkAttribute { - margin-left:0.35em; -} -.blockLinkAttribute a:link, -.blockLinkAttribute a:visited { - text-decoration:none; -} -a.blockLink { - display:block; - padding:0.25em 1em; - border-bottom:1px solid #aaa; - text-decoration:none; -} -a:link.blockLink, -a:visited.blockLink { - text-decoration:none; -} -a:link:hover.blockLink { - text-decoration:none; -} -a:link.blockLinkOff, -a:visited.blockLinkOff { - background-color:#F3EDE7; - color:#333; - font-weight:normal; -} -a:link.blockLinkOn, -a:visited.blockLinkOn { - background-color:#b4d5ff; - color:#333; - font-weight:bold; -} -a.blockLink:hover { - background-color:#1559B3; - color:white; -} -div.explanation { - background-color:#E8EEF7; - padding:0.5em 1em; - margin:0.5em 0; -} -div.specialRemark { - background-color:#fff; - border:1px solid #ccc; - margin:0.5em; - padding:0.5em 1em; -} -div.options { - margin:1em 0; -} -div.options div.optionHeader { - padding:0.25em 1em; - background-color:#666; - color:white; - font-weight:bold; -} -div.options div.optionHeader a { - color:#bbb; - text-decoration:underline; -} -div.options div.optionHeader a:link:hover, -div.options div.optionHeader a:visited:hover { - color:#b4d5ff; /* King's blue */ - background-color:#666; - text-decoration:underline; -} -div.options .twikiSmall { - margin-left:0.5em; - color:#bbb; -} -div.foldableBlock { - border-bottom:1px solid #ccc; - border-left:1px solid #ddd; - border-right:1px solid #ddd; - height:auto; - width:auto; - overflow:auto; - padding:0.25em 0 0.5em 0; -} -.foldableBlockOpen { - display:block; -} -.foldableBlockClosed { - display:block; -} -div.foldableBlock table { - margin-bottom:1em; -} -div.foldableBlock td { - padding:0.15em 1em; - border-top:1px solid #ddd; -} -.info { - color:#666; /*T7*/ /* gray */ - background-color:#E8EEF7; /*BG5*/ /* light blue */ - margin-bottom:0.25em; - padding:0.25em 0; -} -.warn { - color:#f60; /* orange */ - background-color:#FFE8D9; /* light orange */ - border-bottom:1px solid #f60; -} -a.info, -a.warn, -a.error { - text-decoration:none; -} -.error { - color:#f00; /*T9*/ /*red*/ - background-color:#FFD9D9; /* pink */ - border-bottom:1px solid #f00; -} -.mandatory, -.mandatory input { - color:green; - background-color:#ECFADC; - font-weight: bold; -} -.mandatory { - border-bottom:1px solid green; -} -.mandatory input { - font-weight:normal; -} -.docdata { - padding-top: 1ex; - vertical-align: top; -} -.keydata { - font-weight: bold; - background-color:#FOFOFO; - vertical-align: top; -} -.subHead { - font-weight: bold; - font-style: italic; -} -.firstCol { - width: 30%; - font-weight: bold; - vertical-align: top; -} -.secondCol { -} -.hiddenRow { - display:none; -} -HERE - -my $js2 = <<'HERE'; -// -HERE - -my $hdr = CGI::start_html( - -title => 'TWiki Configuration', - -head => [ - CGI::meta({ 'http-equiv'=>'Pragma', content=>'no-cache' }), - CGI::meta({ 'http-equiv'=>'Cache-Control', content=>'no-cache' }), - CGI::meta({ 'http-equiv'=>'Expires', content=>0 }), - CGI::meta({ name=>'robots', content=>'noindex' }), - CGI::Link( { -rel=>'icon', -href=>$ENV{SCRIPT_NAME}.'?action=image;image=favicon.ico;type=image/x-icon', -type=>'image/x-icon' } ), - CGI::Link( { -rel=>'shortcut icon', -href=>$ENV{SCRIPT_NAME}.'?action=image;image=logos/favicon.ico;type=image/x-icon', -type=>'image/x-icon' } ), - CGI::script( { language => 'JavaScript', - type => 'text/javascript' }, $js1 ), - CGI::style( { -type=>'text/css' }, $css), - CGI::script( { language => 'JavaScript', - type => 'text/javascript' }, $js2 ), - ]); - -# XML confuses IE, so strip it out. This is fixed in CGI.pm 3.06. -$hdr =~ s/^<\?xml.*?>//s; -print CGI::header('text/html'), $hdr; - -my $body = ""; -$body .= CGI::img({src=>$ENV{SCRIPT_NAME}.'?action=image;image=T-logo-140x40-t.gif;type=image/gif', class=>'logo', alt=>'TWiki'}); -$body .= CGI::h1( 'Configuration'); - -my $update_disabled = 0; -my $path_to_localsite_cfg = _findFileOnPath('LocalSite.cfg'); -unless( $path_to_localsite_cfg ) { - $path_to_localsite_cfg = _findFileOnPath('TWiki.cfg') || ''; - $path_to_localsite_cfg =~ s/TWiki\.cfg/LocalSite.cfg/; -} -my $errs; -if( !$path_to_localsite_cfg || - ( $errs = _checkCanCreateFile( $path_to_localsite_cfg ))) { - $errs ||= 'Cannot locate LocalSite.cfg. Is your setting for $twikiLibPath correct in bin/LocalLib.cfg?'; - $body .= CGI::p(WARN('Save is disabled; '.$errs)); - $update_disabled = "Cannot create $path_to_localsite_cfg - are permissions correct?"; -} - -if( $action eq 'update' ) { - if( $update_disabled ) { - die ERROR( "Update is disabled $update_disabled" ); - } - $body .= handleUpdate( $path_to_localsite_cfg ); -} else { - $body .= "

Use this page to set the configuration options for TWiki. Fill in the settings, and then press 'Next'.

"; - $body .= "
"; - $body .= CGI::img({src=>$ENV{SCRIPT_NAME}.'?action=image;image=info.gif;type=image/gif', alt=>''}) . ' '; - $TWiki::cfg{ScriptUrlPath} ||= ''; - $TWiki::cfg{ScriptSuffix} ||= ''; - $TWiki::cfg{SystemWebName} ||= ''; - $body .= <If you are installing TWiki for the first time
If you just want to get up and running, the only section you need to worry about below is -General path settings. You can always come -back and configure other settings later.
- -
-
Explanation of color codes: -
    -
  • Settings marked like this are required (they must -have a value).
  • -
  • Any errors in your configuration will be highlighted.
  • -
  • Warnings are non-fatal, but are often a good indicator that something that is wrong.
  • -
-HERE - - $body .= performSanityChecks( $brokenTWikiCfgError, $brokenLocalSiteError ); - - my $options = ''; - unless( $update_disabled ) { - $body .= CGI::start_form({ action=>$ENV{SCRIPT_NAME},method=>"post" }); - # use time to make sure we never allow cacheing - $options .= CGI::hidden( 'action', 'update' ); - $options .= CGI::hidden( 'time', time() ); - } - $options .= CGI::div({ class => 'optionHeader'}, - CGI::span({ class => 'twikiLeft' }, 'Settings' . - CGI::span({ class => 'twikiSmall' }, - 'Click the buttons below to open each section')). - CGI::span({ class => 'twikiSmall twikiRight' }, - CGI::a({ href => '#', rel => 'nofollow', - onclick => 'toggleAllOptions(true); return false;'}, 'Open all options')). - CGI::br()); - - $options .= presentReadOnlyInfo(); - - $options .= presentEditableInfo(); - - $body .= CGI::div({class=>'options', id=>'options'}, $options); - my $totwarningsMess = ($totwarnings > 1) ? ' warnings' : ' warning'; - $body .= CGI::div('Total: '.CGI::span( - {class=>'warn'}, $totwarnings . $totwarningsMess)) if $totwarnings; - my $toterrorsMess = ($toterrors > 1) ? ' errors' : ' error'; - $body .= CGI::div('Total: ' . CGI::span( - {class=>'error'}, $toterrors . $toterrorsMess)) if $toterrors; - - if( $update_disabled) { - $body .= CGI::em("Update is disabled - $update_disabled"); - } else { - $body .= CGI::p(CGI::submit(-class=>'twikiSubmit', -value=>'Next', -accesskey=>'N')); - $body .= CGI::end_form(); - } - -} -print CGI::div({class => 'patternMain'}, $body); -print CGI::end_html(); - -1; +#!/usr/bin/perl -w +# +# TWiki Enterprise Collaboration Platform, http://TWiki.org/ +# +# Copyright (C) 2000-2006 TWiki Contributors. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. For +# more details read LICENSE in the root of this distribution. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# As per the GPL, removal of this notice is prohibited. +# +# Configuration script for TWiki. Once you have a basic webserver +# configuration that lets you access this script, the rest of the +# configuration process is done from here. This script replaces +# the old "testenv" script. +# +# The script works by accepting values into a CGI form, and then +# submitting those values back to itself with a parameter (update) +# set to 1. This causes it to write config changes to LocalSite.cfg. +# Note that changes are only written if there is a real change in the +# value. +# +# The values available to configuration are determined by parsing +# TWiki.cfg. Special full-line comments guide the parse: +# Any comment of the form +#---+ Some text +# is taken as a foldable block, and following comments are dragged in too. +# ---++ is H3, ---+++ is H4 etc +# Comments of the form +# **TYPE opts** +# where TYPE is one of URL, PATH, URLPATH, BOOLEAN, STRING, REGEX, SELECT +# are used to indicate that a following cfg var is configurable through +# the interface. All intermediate comments are taken as documentation for +# the value. +# +package TWiki; + +# BASIC checks. Without these, nothing works. + +use strict; + +$SIG{__DIE__} = sub { Carp::confess( $_[0] || '' ) }; +$SIG{'__WARN__'} = sub { die @_ }; + +use vars qw( %cfg + $perlver + $perlvernum + $perlverRequired + $perlverRequiredString + $perlverRecommended + $perlVerPreferred + $ActivePerlRecommendedBuild + $GUESSED + $cgiModVerRecommended + $modPerlVersionRecommended + $rcsverRequired + ); + +# Constants +$perlvernum = $]; +$perlverRequired = 5.00503; # Oldest supported version of Perl +$perlverRequiredString = '5.005_03'; +$perlverRecommended = '5.6.1'; +$perlVerPreferred = 5.006; # 5.6 or higher has [:lower:] etc +$ActivePerlRecommendedBuild = 631; # Fixes PERL5SHELL bugs +$GUESSED = <<'HERE'; +I guessed this setting. You are advised to confirm this setting (and any other guessed settings) and hit 'Next' to save before changing any other settings. +HERE + +# CGI.pm version, on some platforms - actually need CGI 2.93 for mod_perl +# 2.0 and CGI 2.90 for Cygwin Perl 5.8.0. See +# http://perl.apache.org/products/apache-modules.html#Porting_CPAN_modules_to_mod_perl_2_0_Status +$cgiModVerRecommended = '2.93'; + +# Recommended mod_perl version if using mod_perl 2.0 +# (see Support.RegistryCookerBadFileDescriptor) +$modPerlVersionRecommended = '1.99_12'; + +$rcsverRequired = 5.7; + +# constants used in TWiki.cfg +use vars qw($TRUE $FALSE ); +use vars qw( $basicMods $requiredMods $requiredModsNonUnix $optionalMods + $I18Mods $I18Mods_perl56 $I18Mods_perl58 ); + +BEGIN { + $TRUE = 1; + $FALSE = 0; + # Set default current working directory + if( $ENV{SCRIPT_FILENAME} && $ENV{SCRIPT_FILENAME} =~ /^(.+)\/[^\/]+$/ ) { + chdir $1; + } + # Get Perl version + if (defined $^V) { + $perlver = $^V; # New in Perl 5.6.1, one byte per part + $perlver = ord(substr($perlver,0)) . "." . ord(substr($perlver,1)) + . "." . ord(substr($perlver,2)); + } else { + $perlver = $perlvernum + } + + # Required for configure to work + $basicMods = + { + 'CGI' => "basic TWiki", + 'CGI::Carp' => "basic TWiki", + 'Error' => 'basic TWiki', + }; + $requiredMods = + { + 'File::Copy' => 'basic TWiki', + 'File::Spec' => 'basic TWiki', + 'FileHandle' => 'basic TWiki', + 'Algorithm::Diff' => 'basic TWiki', + }; + + # Required on non-Unix platforms (mainly Windows) + $requiredModsNonUnix = + { + 'MIME::Base64' => "SHA1 password encoding", + 'Net::SMTP' => "registration emails and mailnotify", + }; + # Optional modules on all platforms + $optionalMods = + { + 'Digest::SHA1' => "SHA1 password encoding", + 'MIME::Base64' => "HTTP Authentication to proxies, and SHA1 password encoding", + 'POSIX' => "I18N (core module) and Security", + 'Digest::MD5' => "MD5 encoded passwords", + 'Text::Diff' => 'UpgradeTWiki', + 'CGI::Cookie' => "sessions", + 'CGI::Session' => "sessions", + }; + + $I18Mods = + { + 'Locale::Maketext::Lexicon' => "I18N translations", + }; + + $I18Mods_perl56 = + { + 'Unicode::String' => 'I18N conversions', + 'Unicode::MapUTF8' => "I18N conversions", + 'Unicode::Map' => "I18N conversions", + 'Unicode::Map8' => "I18N conversions", + 'Jcode' => "I18N conversions", + }; + + $I18Mods_perl58 = + { + 'Encode' => "I18N conversions (core module in Perl 5.8)", + }; +}; + +######################################################################## +##################### GLOBAL VARIABLES ################################# +######################################################################## + +use CGI qw( :any ); + +use vars qw( $cygwinRcsVerNum $perltype $query $action ); + +$query = new CGI; +$action = $query->param('action') || ''; + +if( $action eq 'image' ) { + _serveImage( $query->param('type'), $query->param('image' )); + exit 0; +} + +use vars qw( $errors $toterrors $warnings $totwarnings $url $nextid ); + +$errors = 0; # reset for each block +$toterrors = 0; +$warnings = 0; # reset for each block +$totwarnings = 0; +$url = $query->url(); +$nextid = 0; + +######################################################################## +########################## FORMATTING ################################## +######################################################################## + +# a note +sub NOTE { + return CGI::p({class=>"info"}, join("\n",@_)); +} + +# a warning +sub WARN { + $warnings++; + $totwarnings++; + return CGI::div(CGI::span({class=>'warn'}, CGI::strong('Warning: ').join("\n",@_))); +} + +# an error +sub ERROR { + $errors++; + $toterrors++; + return CGI::div(CGI::span({class=>'error'}, CGI::strong('Error: ').join("\n",@_))); +} + +# Generate a foldable block (twisty). This is a DIV with a table in it +# that contains the settings and doc rows. +sub _foldableBlock { + my( $head, $attr, $body ) = @_; + my $headText = $head . CGI::span({ class => 'blockLinkAttribute' }, $attr); + $body = CGI::start_table({width => '100%', -border => 0, -cellspacing => 0, -cellpadding => 0}).$body.CGI::end_table(); + my $mess = ''; + my $errorsMess = ($errors > 1) ? ' errors' : ' error'; + my $warningsMess = ($warnings > 1) ? ' warnings' : ' warning'; + $mess .= CGI::span({class=>'error'}, $errors . $errorsMess) if $errors; + if ($errors && $warnings) { + $mess .= ' '; + } + $mess .= CGI::span({class=>'warn'}, $warnings . $warningsMess) if $warnings; + $errors = $warnings = 0; + + my $anchor = _makeAnchor( $head ); + my $id = $anchor; + my $blockId = $id; + my $linkId = 'blockLink'.$id; + my $linkAnchor = $anchor.'link'; + return CGI::a({ name => $linkAnchor }). + CGI::a( {id => $linkId, + class => 'blockLink blockLinkOff', + href => '#'.$linkAnchor, + rel => 'nofollow', + onclick => 'foldBlock(\'' . $id . '\'); return false;'}, $headText.$mess). + CGI::div( { id => $blockId, + class=> 'foldableBlock foldableBlockClosed' }, $body ). + "\n"; +} + +# Generate an ordinary inline headedblock +sub _ordinaryBlock { + my( $depth, $head, $attr, $body ) = @_; + $head .= CGI::span({ class => 'blockLinkAttribute' }, $attr) if $attr; + if( $depth == 2 ) { $head = CGI::h2( $head ); } + elsif( $depth == 3 ) { $head = CGI::h3( $head ); } + elsif( $depth == 4 ) { $head = CGI::h4( $head ); } + elsif( $depth == 5 ) { $head = CGI::h5( $head ); } + elsif( $depth == 6 ) { $head = CGI::h6( $head ); } + else { $head = CGI::h6( $head ); } + return CGI::Tr(CGI::td( { colspan => 2 } , $head)). + $body; +} + +# Generate a sub-heading table row +sub _subHead { + my $text = shift; + return CGI::Tr(CGI::Td({class=>'subHead', colspan=>2}, $text)). + "\n"; +} + +# Generate a variable - prompt row +sub _setting { + my $key = shift; + return CGI::Tr(CGI::td({class=>'firstCol'}, $key). + CGI::td({class=>'secondCol'}, join(' ', @_))); +} + +# generate a documentation table row +sub _docBlock { + my $desc = shift || ''; + my $hidden = shift; + if (length($desc) == 0 || $desc =~ /\A\s\Z/) { + return ''; + } + if ($hidden) { + return CGI::Tr( {class => 'hiddenRow' }, CGI::td( { colspan => 2, class=>'docdata info' }, $desc )). + "\n"; + } + return CGI::Tr( CGI::td( { colspan => 2, class=>'docdata info' }, $desc )). + "\n"; +} + +# encode a string to make an HTML anchor +sub _makeAnchor { + my $str = shift; + + $str =~ s/\s(\w)/uc($1)/ge; + $str =~ s/\W//g; + return $str; +} + +######################################################################## +################### CHECKING SUPPORT ################################### +######################################################################## + +# Since Windows (without Cygwin) makes it hard to capture stderr +# ('2>&1' works only on Win2000 or higher), and Windows will usually have +# GNU tools in any case (installed for TWiki since there's no built-in +# diff, grep, patch, etc), we only check for these tools on Unix/Linux +# and Cygwin. +sub _checkGnuProgram { + my $prog = shift; + my $n = ''; + + if( $TWiki::cfg{OS} eq 'UNIX' || + $TWiki::cfg{OS} eq 'WINDOWS' && $perltype eq 'Cygwin' ) { + $prog =~ s/^\s*(\S+)\s.*$/$1/; + $prog =~ /^(.*)$/; + $prog = $1; + # check for taintedness + die "$prog is tainted" unless eval { $n = $prog, kill 0; 1 }; + my $diffOut = ( `$prog --version 2>&1` || ""); + my $notFound = ( $? == -1 ); + if( $notFound ) { + $n = WARN("'$prog' program was not found on the", + "current PATH."); + } elsif ( $diffOut !~ /\bGNU\b/ ) { + # Program found on path, complain if no GNU in version output + $n = WARN("'$prog' program was found on the PATH", + "but is not GNU $prog - this may cause", + "problems. $diffOut"); + } else { + $diffOut =~ /(\d+(\.\d+)+)/; + $n = "($prog is version $1)."; + } + } + + return $n; +} + +sub _checkRCSProgram { + my $key = shift; + + return 'Not used in this configuration.' + unless $TWiki::cfg{StoreImpl} eq 'RcsWrap'; + my $mess = ''; + my $err = ''; + my $prog = $TWiki::cfg{RCS}{$key} || ''; + $prog =~ s/^\s*(\S+)\s.*$/$1/; + $prog =~ /^(.*)$/; $prog = $1; + if( !$prog ) { + $err .= $key.' is not set'; + } else { + my $version = `$prog -V` || ''; + if( $@ ) { + $err .= ERROR($prog.' returned an error: '.$@ ); + } elsif ( $version ne '' ) { + $version =~ /(\d+(\.\d+)+)/; + $version = $1; + $mess .= " ($prog is version $version)"; + } else { + $err .= ERROR($prog.' did not return a version number (or might not exist..)'); + } + if( defined( $cygwinRcsVerNum )) { + $mess .= " (Cygwin package rcs-$cygwinRcsVerNum)"; + } + if( $version && $version < $rcsverRequired ) { + # RCS too old + $err .= $prog.' is too old, upgrade to version '. + $rcsverRequired.' or higher.'; + } + } + if( $err ) { + $mess .= ERROR( $err .<$name" ) || + return 'Could not create test file '. $name; + print FILE $txt1; + close( FILE); + open( IN_FILE, "<$name" ) || + return 'Could not read test file '. $name; + my $txt2 = ; + close( IN_FILE ); + unlink $name if( -e $name ); + unless ( $txt2 eq $txt1 ) { + return 'Could not write and then read '.$name; + } + return ''; +} + +sub _checkTreePerms { + my( $path, $perms, $filter ) = @_; + + return '' if( defined($filter) && $path !~ $filter && !-d $path); + + #lets ignore Subversion directories + return '' if( $path !~ /_svn/ ); + return '' if( $path !~ /.svn/ ); + + my $errs = ''; + + return $path. ' cannot be found'.CGI::br() unless( -e $path ); + + if( $perms =~ /r/ && !-r $path) { + $errs .= ' readable'; + } + + if( $perms =~ /w/ && !-d $path && !-w $path) { + $errs .= ' writable'; + } + + if( $perms =~ /x/ && !-x $path) { + $errs .= ' executable'; + } + + return $path.' is not '.$errs.CGI::br() if $errs; + + return '' unless -d $path; + + opendir(D, $path) || + return 'Directory '.$path.' is not readable.'.CGI::br(); + + foreach my $e ( grep { !/^\./ } readdir( D )) { + my $p = $path.'/'.$e; + $errs .= _checkTreePerms( $p, $perms, $filter ); + } + closedir(D); + return $errs; +} + +sub _findFileOnPath { + my $file = shift; + $file =~ s(::)(/)g; + + foreach my $dir ( @INC ) { + if ( -e "$dir/$file" ) { + return "$dir/$file"; + } + } + return undef; +} + +# Try and locate a required directory +sub _findMajorDir { + my( $cfg, $dir ) = @_; + return '' if( $TWiki::cfg{$cfg} && $TWiki::cfg{$cfg} ne 'NOT SET'); + my $guess = $ENV{SCRIPT_FILENAME}; + unless( $guess ) { + return WARN("This web server does not set SCRIPT_FILENAME so I can't guess a value for this"); + } + $guess =~ s(bin/*configure$)(); + $guess .= $dir; + $TWiki::cfg{$cfg} = $guess; + return WARN($GUESSED); +} + +sub _warnAboutWindowsBackSlashes { + my ( $path ) = @_; + if ( $path =~ /\\/ ) { + return WARN('You should use c:/path style slashes, not c:\path in "'.$path.'"'); + } +} + +######################################################################## +##################### PROMPT GENERATORS ################################ +######################################################################## + +# generate an input field for string types +sub _PROMPT_FOR_STRING { + my( $id, $opts, $value, $keys ) = @_; + my $size = "55%"; + if( $opts =~ /\s(\d+)\s/ ) { + $size = $1; + # These numbers are somewhat arbitrary.. + if($size>25) { $size="55%"; } + } + + # support upgrade from old configuration, where LowerNational and UpperNational + # were stored as REGEX'es (now they are STRING's): + if ( $id eq "LowerNational" || $id eq "UpperNational" ) { + if ($value =~ /^\(\?-xism:(.*)\)$/) { + $value = $1; + } + } + + return CGI::textfield( -name => $id, -size=>$size, -default=>$value ); +} + +# generate an input field for URL types +# This has its own type in case someone wants to add javascript validation +sub _PROMPT_FOR_URL { + my( $id, $opts, $value, $keys ) = @_; + return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); +} + +# generate an input field for URLPATH types +# This has its own type in case someone wants to add javascript validation +sub _PROMPT_FOR_URLPATH { + my( $id, $opts, $value, $keys ) = @_; + return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); +} + +# generate an input field for PATH types +# This has its own type in case someone wants to add javascript validation +sub _PROMPT_FOR_PATH { + my( $id, $opts, $value, $keys ) = @_; + return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); +} + +# generate an input field for BOOLEAN types +sub _PROMPT_FOR_BOOLEAN { + my( $id, $opts, $value, $keys ) = @_; + return CGI::checkbox( -name => $id, -checked => ( $value ? 1 : 0), + -value => 1, -label => '' ); +} + +# generate an input field for REGEX types +# This has its own type in case someone wants to add javascript validation +sub _PROMPT_FOR_REGEX { + my( $id, $opts, $value, $keys ) = @_; + $value =~ s/[[\x01-\x09\x0b\x0c\x0e-\x1f"%&'*<=>@[_\|]/'&#'.ord($&).';'/ge; + return ''; +} + +# generate an input field for COMMAND types +# This has its own type in case someone wants to add javascript validation +sub _PROMPT_FOR_COMMAND { + my( $id, $opts, $value, $keys ) = @_; + return CGI::textfield( -name => $id, -size=>"55%", -default=>$value ); +} + +# generate an input field for NUMBER types +# This has its own type in case someone wants to add javascript validation +sub _PROMPT_FOR_NUMBER { + my( $id, $opts, $value, $keys ) = @_; + return CGI::textfield( -name => $id, -size=>20, -default=>$value ); +} + +# generate an input field for OCTAL number types (protections) +sub _PROMPT_FOR_OCTAL { + my( $id, $opts, $value, $keys ) = @_; + return CGI::textfield( -name => $id, -size=>20, + -default=>sprintf('0%o',$value) ); +} + +# generate an input field for SELECT types +sub _PROMPT_FOR_SELECT { + my( $id, $opts, $value, $keys ) = @_; + $opts =~ s/^\s+//; + $opts =~ s/\s.*$//; + my $sopts = ''; + if ( defined($value) ) { + $sopts .= ''; + } + foreach my $opt (split( /\s*,\s*/, $opts)) { + if( $opt ne $value ) { + $sopts .= ''; + } + } + return CGI::Select({ name => $id, size=>1 }, $sopts); +} + +######################################################################## +###################### VARIABLE CHECKERS ############################### +######################################################################## + +sub _CHECKVAR_DefaultUrlHost { + my $keys = shift; + + if( $TWiki::cfg{DefaultUrlHost} && + $TWiki::cfg{DefaultUrlHost} ne 'NOT SET' ) { + my $host = $ENV{HTTP_HOST}; + if( $host && $TWiki::cfg{DefaultUrlHost} !~ /$host/ ) { + return WARN('Current setting does not match HTTP_HOST ', + $ENV{HTTP_HOST}); + } + } else { + my $protocol = $url || 'http://'.$ENV{HTTP_HOST}; + $protocol =~ s(^(.*?://.*?)/.*$)($1); + $TWiki::cfg{DefaultUrlHost} = $protocol; + return ERROR($GUESSED); + } + return ''; +} + +sub _CHECKVAR_ScriptUrlPath { + # Check Script URL Path against REQUEST_URI + my $n; + my $val = $TWiki::cfg{ScriptUrlPath}; + my $guess = $ENV{REQUEST_URI} || $ENV{SCRIPT_NAME} || ''; + $guess =~ s(/+configure\b.*$)(); + + if( $val && $val ne 'NOT SET' ) { + unless( $guess ) { + return WARN(<Go to "pub" directory'; +} + +sub _CHECKVAR_PubDir { + my $e = _findMajorDir('PubDir', 'pub'); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{PubDir}); + my $e2 = _checkTreePerms( $TWiki::cfg{PubDir}, 'rw' ); + $e .= WARN($e2) if $e2; + return $e; +} + +sub _CHECKVAR_TemplateDir { + my $e = _findMajorDir('TemplateDir', 'templates'); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{TemplateDir}); + my $e2 = _checkTreePerms( $TWiki::cfg{TemplateDir}, 'r' ); + $e .= ERROR($e2) if $e2; + return $e; +} + +sub _CHECKVAR_DataDir { + my $e = _findMajorDir('DataDir', 'data'); + my $e2 = _checkTreePerms( $TWiki::cfg{DataDir}, "r" ); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{DataDir}); + $e2 = _checkTreePerms( $TWiki::cfg{DataDir}, "w", qr/\.txt$/ ) + unless $e2; + $e .= WARN($e2) if $e2; + return $e; +} + +sub _CHECKVAR_LocalesDir { + my $e = _findMajorDir('LocalesDir', 'locale'); + my $e2 = _checkTreePerms( $TWiki::cfg{LocalesDir}, "r" ); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{LocalesDir}); + $e .= ERROR($e2) if $e2; + return $e; +} + +sub _CHECKVAR_MailProgram { + eval "use Net::SMTP"; + my $n; + if ($@) { + $n = "Net::SMTP is not installed in this environment. "; + my $val = $TWiki::cfg{MailProgram} || ''; + $val =~ s/\s.*$//g; + if( ! ( -e $val ) ) { + return WARN("$val was not found. Check the path."); + } + } else { + $n = 'Net::SMTP is installed in this environment, so this setting will not be used.'; + } + return $n; +} + +sub _CHECKVAR_LogFileName { + my $logFile = $TWiki::cfg{LogFileName} || ""; + $logFile =~ s/%DATE%/DATE/; + my $e = _checkCanCreateFile( $logFile ); + $e = ERROR($e) if $e; + return $e; +} + +sub _CHECKVAR_ConfigurationLogName { + my $logFile = $TWiki::cfg{ConfigurationLogName} || ""; + $logFile =~ s/%DATE%/DATE/; + my $e = _checkCanCreateFile( $logFile ); + $e = ERROR($e) if $e; + return $e; +} + +sub _CHECKVAR_WarningFileName { + my $logFile = $TWiki::cfg{WarningFileName} || ""; + $logFile =~ s/%DATE%/DATE/; + my $e = _checkCanCreateFile( $logFile ); + $e = ERROR($e) if $e; + return $e; +} + +sub _CHECKVAR_DebugFileName { + my $logFile = $TWiki::cfg{DebugFileName} || ""; + $logFile =~ s/%DATE%/DATE/; + my $e = _checkCanCreateFile( $logFile ); + $e = ERROR($e) if $e; + return $e; +} + +sub _CHECKVAR_MimeTypesFileName { + my $e = _checkTreePerms($TWiki::cfg{MimeTypesFileName}, 'r'); + $e = ERROR($e) if $e; + return $e; +} + +sub _CHECKVAR_Htpasswd_FileName { + my $e = _checkTreePerms($TWiki::cfg{Htpasswd}{FileName}, 'r'); + $e = ERROR($e) if $e; + return $e; +} + +sub _CHECKVAR_RegistrationApprovals { + my $file = $TWiki::cfg{RegistrationApprovals}; + my $e = _checkTreePerms( $file, 'rw' ); + $e = WARN($e) if $e; + return $e; +} + +sub _CHECKVAR_UseLocale { + my $on = $TWiki::cfg{UseLocale}; + + my $n = ''; + if( $TWiki::cfg{OS} eq 'WINDOWS' ) { + # Warn re known broken locale setup + $n .= WARN(<= 5.008 and + not ( exists $Config::Config{useperlio} and + $Config::Config{useperlio} eq 'define' ) ) { + $n .= WARN(<Perl's Unicode Model in 'perldoc +perluniintro') - re-compilation of Perl will be required before it can be +used to enable TWiki's experimental UTF-8 support. +HERE + ); + } + + # Check for d_setlocale in Config (same as 'perl -V:d_setlocale') + eval "use Config"; + if ( !( exists $Config::Config{d_setlocale} && + $Config::Config{d_setlocale} eq 'define' ) ) { + $n .= WARN(<$forUpperNat +HERE + ); + } + } + return ''; +} + +sub _CHECKVAR_LowerNational { + if( $perlvernum < $perlVerPreferred || 1) { + # Locales are off/broken, or using pre-5.6 Perl, so have to + # explicitly list the accented characters (but not if using UTF-8) + my $forLowerNat = join '', grep { uc($_) ne $_ and m/[^a-z]/ } map { chr($_) } 1..255; + + if ($forLowerNat) { + return WARN( <$forLowerNat +HERE + ); + } + } + return ''; +} + +sub _CHECKVAR_Site_Locale { + my $e = ''; + my $locale = $TWiki::cfg{Site}{Locale}; + setlocale(&LC_CTYPE, $locale); + my $currentLocale = setlocale(&LC_CTYPE); + if ( $currentLocale ne $locale ) { + $e .= WARN(<C, which should always work. +HERE + ); + } + if( $locale !~ /[a-z]/i && $TWiki::cfg{UseLocale} ) { + $e = WARN(<path_info() =~ /$TWiki::cfg{ScriptSuffix}$/ ) { + return ERROR('this script ('.$query->pather_info().') called with different ScriptSuffix setting'.$TWiki::cfg{ScriptSuffix}); + } + } + return ''; +} + +sub _CHECKVAR_RCS_EgrepCmd { return _checkGnuProgram($TWiki::cfg{RCS}{EgrepCmd}); } +sub _CHECKVAR_RCS_FgrepCmd { return _checkGnuProgram($TWiki::cfg{RCS}{FgrepCmd}); } +sub _CHECKVAR_RCS_initTextCmd { return _checkRCSProgram('initTextCmd'); } +sub _CHECKVAR_RCS_initBinaryCmd { return _checkRCSProgram('initBinaryCmd'); } +sub _CHECKVAR_RCS_tmpBinaryCmd { return _checkRCSProgram('tmpBinaryCmd'); } +sub _CHECKVAR_RCS_ciCmd { return _checkRCSProgram('ciCmd'); } +sub _CHECKVAR_RCS_ciDateCmd { return _checkRCSProgram('ciDateCmd'); } +sub _CHECKVAR_RCS_coCmd { return _checkRCSProgram('coCmd'); } +sub _CHECKVAR_RCS_histCmd { return _checkRCSProgram('histCmd'); } +sub _CHECKVAR_RCS_infoCmd { return _checkRCSProgram('infoCmd'); } +sub _CHECKVAR_RCS_rlogDateCmd { return _checkRCSProgram('rlogDateCmd'); } +sub _CHECKVAR_RCS_diffCmd { return _checkRCSProgram('diffCmd'); } +sub _CHECKVAR_RCS_lockCmd { return _checkRCSProgram('lockCmd'); } +sub _CHECKVAR_RCS_unlockCmd { return _checkRCSProgram('unlockCmd'); } +sub _CHECKVAR_RCS_delRevCmd { return _checkRCSProgram('delRevCmd'); } + +sub _CHECKVAR_StoreImpl { + my $mess = ''; + if( $TWiki::cfg{StoreImpl} eq 'RcsWrap') { + # Check that GNU diff is found in PATH; used by rcsdiff + $mess .= NOTE( "Note: The 'diff' program found on the path is used by RcsWrap to compare revisions ". + _checkGnuProgram( "diff")); + } + + return $mess; +}; + +sub _CHECKVAR_UseClientSessions { + my $mess = ''; + if (!eval "use CGI::Cookie; 1") { + $mess .= <$class}, $prompter) if $mandatory; + use strict 'refs'; + + $keys = CGI::span({class=>'mandatory'}, $keys) if $mandatory; + my $hidden = 0; + if (length($desc) == 0 || $desc =~ /\A\s\Z/) { + $hidden = 1; + } + return _docBlock( $output.$desc, $hidden )._setting( $keys, $prompter ); +} + +sub _showPlugins { + my %modules; + foreach my $libDir ( @INC ) { + if( opendir( DIR, "$libDir/TWiki/Plugins" ) ) { + foreach my $file ( grep { /^[A-Za-z0-9_]+Plugin\.pm$/ } + readdir DIR ) { + my $module = $file; + $module =~ s/\.pm$//; + $TWiki::cfg{Plugins}{$module}{Enabled} ||= 0; + $module =~ /^(.*)$/; # untaint + $module = $1; + # only add the first instance of any plugin, as only + # the first can get loaded from @INC. + unless( $modules{$module} ) { + $modules{$module} = $libDir; + } + closedir( DIR ); + } + } + } + my $block = ''; + foreach my $m ( sort keys %modules ) { + $block .= _checkAndBuildValueGrabber + ( 'BOOLEAN', '', +#SMELL - i'm assuming that the Plugin topic is in the SystemWeb :( +"$m", + '{Plugins}{'.$m.'}{Enabled}' + ); + } + return $block; +} + +sub _showLanguages { + opendir( DIR, $TWiki::cfg{LocalesDir}) or + return 'Couldn\'t read TWiki {LocalesDir}!'; + my $block = ''; + foreach my $file ( grep { /^.*\.po$/ } readdir DIR ) { + $file =~ m/^(.*)\.po$/; + my $lang = $1; + $lang = "'$lang'" if $lang =~ /\W/; + $block .= _checkAndBuildValueGrabber ( 'BOOLEAN', '', 'Enable the language ' . $lang . '', '{Languages}{' . $lang . '}{Enabled}' ); + } + closedir( DIR ); + return $block; +} + +######################################################################## +##################### WRITING NEW VALUES ############################### +######################################################################## + +sub setConfig { + my ($path, $updates) = @_; + my $txt = ''; + if( open(F, "<$path")) { + undef $/; + $txt = ; + close(F); + } + + $txt =~ s/^\s*1;\s*$//gm; + + open(F, ">$path") || + die "Failed to open $path for write"; + + foreach my $config ( keys %$updates ) { + # kill the old settings if any are there + $txt =~ s/\$TWiki::cfg$config\s*=.*?;\s*\n//s; + $txt .= '$TWiki::cfg'.$config.' = '.$updates->{$config}.";\n"; + } + print F $txt,"1;\n"; + close(F); + + if( defined( $TWiki::cfg{ConfigurationLogName} ) && + open(F, '>>'.$TWiki::cfg{ConfigurationLogName} )) { + my $date = gmtime(); + my $user = $query->remote_user() || 'guest'; + foreach my $config ( keys %$updates ) { + print F '| ',$date,' | ',$user,' | ',$config,' | ', + $updates->{$config}," |\n"; + } + close(F); + } +} + +# Convert value to a canonical perl representation suitable for writing +# to LocalSite.cfg +sub _perlifyType { + my ($val,$type) = @_; + + if ($type eq 'BOOLEAN') { + return ($val ? 1 : 0); + } elsif ($type eq 'NUMBER') { + $val ||= 0; + return 0+$val; + } elsif ($type eq 'OCTAL') { + $val ||= 0; + $val = '0'.$val unless $val =~ /^0/; + return $val; + } else { + $val ||= ''; + $val =~ s/'/\\'/g; + return "'".$val."'"; + } +} + +sub _perlModulesCheck { + my $mods = shift; + my $e = ''; + foreach my $mod (keys %$mods) { + my $n = ''; + eval "use $mod"; + if ($@) { + $n = WARN('not installed. May be required for ', + $mods->{$mod}); + } else { + my $mod_version; + no strict 'refs'; + eval '$mod_version = ${'.$mod.'::VERSION}'; + use strict 'refs'; + $n = $mod_version || 'unknown'; + } + $e .= _setting($mod, $n); + } + return $e; +} + +######################################################################## +#################### MAIN ACTION ENTRY POINTS ########################## +######################################################################## + +sub _serveImage { + my($type, $image )= @_; + + print "Content-type: $type\n\n"; + if( open(F, "logos/$image")) { + local $/ = undef; + print ; + close(F); + } +} + +sub handleUpdate { + my $path = shift; + my $pass = $query->param( 'cfgAccess' ); + my $param; + my $output = ''; + unless( defined( $pass )) { + $output .= CGI::start_form({ action=>$ENV{SCRIPT_NAME}, method=>"post" }); + # Pass all URL params through + foreach $param ( $query->param ) { + $output .= CGI::hidden( $param, $query->param( $param )); + $output .= "\n"; + } + + my $changed = calculateChanges(); + my $itemText = ($changed == 1) ? 'item' : 'items'; + $output .= CGI::div({ class => 'explanation'}, + CGI::strong( 'Changing ' . $changed. + ' configuration ' . $itemText. + '.'). + (($changed == 0) ? CGI::br() . + CGI::a( { href=>$url.'?t='.time(), + rel => 'nofollow' }, + 'Return to configuration') : CGI::br() . + 'Proceed with the steps below to save your changes.')); + + # and add a few more + $output .= CGI::h2('Enter the configuration password'); + if ($TWiki::cfg{Password} ne '') { + $output .= CGI::p(CGI::strong("Your Password:").CGI::br()); + $output .= CGI::password_field( 'cfgAccess', '', 20, 80 ); + $output .= ' ' . CGI::submit(-class=>'twikiSubmit', -value=>'Save changes'); + $output .= CGI::br(); + } else { + $output .= CGI::hidden( 'cfgAccess', '' ); + } + my $forgotPassword = ''; + if ($TWiki::cfg{Password} ne '') { + $forgotPassword = CGI::strong("Forgot your password?"). CGI::br(). 'To reset the password, log in to the server and delete the $TWiki::cfg{Password} = \'...\'; line in lib/LocalSite.cfg

'; + } + $output .= CGI::div({ class => 'explanation'}, + CGI::span( $forgotPassword . CGI::img({src=>$ENV{SCRIPT_NAME}.'?action=image;image=warning.gif;type=image/gif', alt=>''}) . ' ' . <<'HERE' +Notes on Security: +

    +
  • If you don't set a password, or the password is cracked, then configure could be used to do very nasty things to your server.
  • +
  • If you are running TWiki on a public website, you are strongly advised to disable saving from configure by making lib/LocalSite.cfg readonly once you are happy with your configuration.
  • +
+HERE + )); + if ($TWiki::cfg{Password} ne '') { + $output .= CGI::p( "You may change your password here:" ); + } + + $output .= CGI::div({ class => 'formElem'}, + + CGI::strong("New Password:"). + CGI::br(). + CGI::password_field( 'newCfgP', '', 20, 80 ). + CGI::br(). + CGI::strong("Confirm Password:").CGI::br(). + CGI::password_field( 'confCfgP', '', 20, 80 ). + CGI::br(). + CGI::submit(-class=>'twikiSubmit', -value=>'Set Password and Save changes')); + $output .= CGI::end_form(); + $output .= CGI::end_html(); + return $output; + } + + unless( crypt( $pass, $TWiki::cfg{Password}) eq + $TWiki::cfg{Password} || $TWiki::cfg{Password} eq '') { + $output .= CGI::span( {class => 'error' }, "Incorrect password" ). + CGI::end_html(); + return $output; + } + + my $changed = 0; + my %updates; + + if( $query->param( 'newCfgP' )) { + if( $query->param( 'newCfgP' ) eq + $query->param( 'confCfgP' )) { + my @saltchars = ( 'a'..'z', 'A'..'Z', '0'..'9', '.', '/' ); + my $salt = $saltchars[int(rand($#saltchars+1))] . + $saltchars[int(rand($#saltchars+1)) ]; + $updates{'{Password}'} = + _perlifyType( + crypt( $query->param( 'newCfgP' ), $salt ), + 'STRING' ); + $changed++; + $output .= "Password changed"; + } else { + $output .= "New password and confirmation do not match"; + return $output; + } + } + + $output .= CGI::h2('Updating configuration'); + foreach $param ( $query->param ) { + next unless $param =~ /^^TYPEOF:(.*)/; + my $type = $query->param( $param ); + $param =~ s/^TYPEOF:(.*)$/$1/; + my $basevar = $1; + my $var = '$TWiki::cfg'.$basevar; + my $val = $query->param( $param ); + my $def; + eval "\$def = defined( $var );"; + if( $type ) { + eval "\$def = $var;" if $def; + next if( $type eq 'OCTAL' && sprintf('0%o', $def) =~ /^0*$val$/ ); + next if( $type eq 'NUMBER' && $val + 1 == $def + 1 ); + next if( $type eq 'BOOLEAN' && ($val && $def || !$val && !$def)); + next if( $val eq $def ); + $output .= CGI::h3($var). + CGI::b('old '). + CGI::code($def||' '). + CGI::br(). + CGI::b('new '). + CGI::code($val||' '); + $updates{$basevar} = _perlifyType($val, $type); + $changed++; + } + } + $output .= CGI::p(); + setConfig($path, \%updates); + my $itemText = ($changed == 1) ? 'item' : 'items'; + $output .= CGI::hr(); + $output .= CGI::p(CGI::strong($changed.' configuration ' . $itemText . ' changed. ')); + $output .= CGI::p(CGI::a({ rel => 'nofollow', + href=>$url.'?t='.time() }, + 'Return to configuration')); + return $output; +} + +sub calculateChanges { + my $param; + my $changed = 0; + foreach $param ( $query->param ) { + next unless $param =~ /^^TYPEOF:(.*)/; + my $type = $query->param( $param ); + $param =~ s/^TYPEOF:(.*$)/$1/; + my $var = '$TWiki::cfg'.$1; + my $val = $query->param( $param ); + my $def; + eval "\$def = defined( $var );"; + if( $type ) { + eval "\$def = $var;" if $def; + next if( $type eq 'OCTAL' && sprintf('0%o', $def) =~ /^0*$val$/ ); + next if( $type eq 'NUMBER' && $val + 1 == $def + 1 ); + next if( $type eq 'BOOLEAN' && ($val && $def || !$val && !$def)); + next if( $val eq $def ); + $changed++; + } + } + return $changed; +} + +sub performSanityChecks { + my( $brokenTWikiCfgError, $brokenLocalSiteError ) = @_; + my $output = ''; + + if ($brokenTWikiCfgError) { + $output .= CGI::h2('WARNING:'). + CGI::p('TWiki.cfg is unreadable or has a configuration problem that is causing a Perl error - the following message(s) should help locate the problem.'); + $output .= $brokenTWikiCfgError; + + # EARLY EXIT + $output .= CGI::end_html(); + return $output; + } + + if ($brokenLocalSiteError) { + $output .= CGI::h2('WARNING:'). + ERROR('LocalSite.cfg is unreadable or has a configuration problem that is causing a Perl error - the following message(s) was generated:'). + CGI::pre($brokenLocalSiteError). + 'The @INC path is '. + CGI::pre(join(":", @INC)). + NOTE('This may be because this is the first time you have run configure. In this case you can simply ignore this error until you have filled in your General path settings. Otherwise, check that the file exists, and the webserver user is allowed to read it.'); + } + + # Check whether basic CGI modules exist (some broken installations of + # Perl don't have this, even though they are standard modules), and warn user + my $modMissing = 0; + foreach my $mod (keys %$basicMods) { + eval "use $mod"; + if ($@) { + unless ($modMissing) { + $output .= ERROR( 'Perl Module(s) missing'); + } + $modMissing = 1; + $output .= ERROR( 'Essential Perl Module \'',$mod, + '\' not installed - please check the setting ', + 'of @INC.' ); + } + } + + # If any critical modules missing, display @INC and give up + if ($modMissing) { + $output .= NOTE( '@INC = ', join( ' ', @INC )); + return $output; + } + + return $output; +} + +sub presentReadOnlyInfo { + # use strict; # Recommended for mod_perl, enable for Perl 5.6.1 only + # Doesn't work well here, due to 'do "TWiki.cfg"' + # use diagnostics; # Debug only + + # Load CGI modules (run-time, after checking they are accessible) + require CGI; + import CGI qw( -any ); + require CGI::Carp; + import CGI::Carp qw( fatalsToBrowser ); + + $errors = 0; + $warnings = 0; + + my $output = ''; + my $block = ''; + for my $key ( sort keys %ENV ) { + $block .= _setting($key, $ENV{$key}); + } + $output .= _foldableBlock(CGI::em( 'Environment variables' ), + '(read only) ', $block); + + $block = ''; + + # Make %ENV safer for CGI (should reflect TWiki.pm) + my $originalPath = $ENV{PATH} || ''; + if( $TWiki::cfg{SafeEnvPath} ) { + # SMELL: this untaint probably isn't needed + my $ut = $TWiki::cfg{SafeEnvPath}; + $ut =~ /^(.*)$/; + $ENV{PATH} = $1; + } + delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) }; + my $perlverMsg = $perlver; # Default version message + + # Load Config module - used here and elsewhere + require Config; + + # Set $TWiki::cfg{DetailedOS} if not using later versions of TWiki.cfg for BeijingRelease + # - this code enables the latest testenv to be used with Dec 2001 and + # earlier releases. + if ( !defined $TWiki::cfg{DetailedOS} ) { + $TWiki::cfg{DetailedOS} = $Config::Config{'osname'}; + } + + # Detect Perl flavour on Windows, and Cygwin Perl/RCS package versions + + if ($TWiki::cfg{DetailedOS} eq 'cygwin') { + $perltype = 'Cygwin'; # Cygwin Perl only + my ($pkg, $pkgName); + + # Get Cygwin perl's package version number + $pkgName = 'perl'; + $pkg = `/bin/cygcheck -c $pkgName | /bin/grep $pkgName 2>/dev/null`; + if ($?) { + $pkg = " [Cannot identify package - cygcheck or grep not installed]"; + $perlverMsg = $perlver . $pkg + } else { + $pkg = (split ' ', $pkg)[1]; # Package version + $perlverMsg = $pkg; + } + + # Get Cygwin RCS's package version number + $pkgName = 'rcs'; + $pkg = `/bin/cygcheck -c $pkgName | /bin/grep $pkgName 2>/dev/null`; + if ($?) { + $pkg = " [Cannot identify package - cygcheck or grep not installed]"; + $cygwinRcsVerNum = $pkg; + } else { + $pkg = (split ' ', $pkg)[1]; # Package version + $cygwinRcsVerNum = $pkg; + } + } elsif ($TWiki::cfg{DetailedOS} =~ /win/i && $TWiki::cfg{DetailedOS} !~ /darwin/i ) { + # Windows Perl - try ActivePerl-only function: returns number if + # successful, otherwise treated as a literal (bareword). + my $isActivePerl= eval 'Win32::BuildNumber !~ /Win32/'; + if( $isActivePerl ) { + $perltype = 'ActiveState'; + $perlverMsg = $perlver . ", build " . Win32::BuildNumber(); + } else { + # Could be SiePerl or some other Win32 port of Perl + $perltype = 'SiePerl or other Windows Perl'; + } + } else { + $perltype = 'generic'; + } + + # Detect executable name suffix, e.g. .exe on Windows or '' on Unix + # Avoid testing for .exe suffixes on Cygwin, since the built-in + # grep and ls don't end in '.exe', even though Perl's '_exe' setting + # indicates they should. + my $exeSuffix=''; + if ( $Config::Config{'_exe'} and ($TWiki::cfg{OS} eq 'WINDOWS' and $perltype ne 'Cygwin') ) { + if ( ! $ENV{INTERIX_ROOT} ) { #this is set is we are using UnixServicesForWindows (or INTERIX funnily enough) and they don't use .exe either + $exeSuffix = $Config::Config{'_exe'}; + } + } + + # Detect whether mod_perl was loaded into Apache + my $modPerlLoaded = ( exists $ENV{SERVER_SOFTWARE} && + ( $ENV{SERVER_SOFTWARE} =~ /mod_perl/ )); + # Detect whether we are actually running under mod_perl + # - test for MOD_PERL alone, which is enough. + my $usingModPerl = ( exists $ENV{MOD_PERL} ); + my $modPerlVersion; + + # Get the version of mod_perl if it's being used + if ( $usingModPerl ) { + $modPerlVersion = eval 'use mod_perl; return $mod_perl::VERSION'; + $block .= _setting('', + WARN(<configure with mod_perl. This +is risky because mod_perl will remember old values of configuration +variables. You are *highly* recommended not to run configure under +mod_perl (though the rest of TWiki can be run with mod_perl, of course) +HERE + )); + } + + my $n = ucfirst(lc($TWiki::cfg{OS})); + $n .= " ($TWiki::cfg{DetailedOS})" if ( $TWiki::cfg{DetailedOS} ne '' ); + # OS + $block .= _setting("Operating system", $n); + + # Perl version and type + $perlverMsg .= " ($perltype)" if $perltype ne 'generic'; + $block .= _setting("Perl version", $perlverMsg); + + if ( $perlvernum < $perlverRequired ) { + $block .= _setting('', + WARN(<twiki/lib and check that LocalSite.cfg is present and readable"); + } else { + $twikiFound = 1; + my $mod_version = eval '$TWiki::wikiversion || $TWiki::VERSION'; + $mod_version ||= 'unknown'; + $mess = 'OK, TWiki.pm found (Version: '.$mod_version.')'; + } + $block .= _setting('TWiki module in @INC path', $mess); + + #add in the basic Modules so that we list their versions in the UI + map { $requiredMods->{$_} = $basicMods->{$_} } + keys %$basicMods; + + if ( defined $TWiki::cfg{DetailedOS} and ($TWiki::cfg{DetailedOS} =~ /darwin/i or $TWiki::cfg{OS} ne 'UNIX') ) { + map { $requiredMods->{$_} = $requiredModsNonUnix->{$_} } + keys %$requiredModsNonUnix; + } else { + # these are optional on Unix + map { $optionalMods->{$_} = $requiredModsNonUnix->{$_} } + keys %$requiredModsNonUnix; + } + + # Check that each of the required Perl modules can be loaded, and + # print its version number. + my $set = ''; + foreach my $mod (keys %$requiredMods) { + eval "use $mod"; + if ($@) { + $set .= _setting($mod, ERROR("not installed. Required for ", + $requiredMods->{$mod})); + } else { + my $mod_version; + no strict 'refs'; + eval '$mod_version = ${'.$mod.'::VERSION}'; + use strict 'refs'; + $n = $mod_version || 'unknown'; + # Check for potential CGI.pm module upgrade + if( $mod eq 'CGI' and $mod_version < $cgiModVerRecommended ) { + if ( $perltype eq 'Cygwin' and $perlver eq '5.8.0' ) { + # Recommend CGI.pm upgrade if using Cygwin Perl 5.8.0 + $n .= WARN( "CGI.pm version $cgiModVerRecommended or higher", + "is recommended to avoid problems with attachment", + "uploads on Cygwin Perl $perlver."); + } elsif ( $usingModPerl and $modPerlVersion >= 1.99 ) { + # Recommend CGI.pm upgrade if using mod_perl 2.0, which + # is reported as version 1.99 and implies Apache 2.0 + $n .= WARN("CGI.pm version $cgiModVerRecommended or higher is", + "recommended to avoid problems with mod_perl version", + "$modPerlVersion on Apache 2.0 or higher."); + } + } + $set .= _setting( $mod, $n ); + } + } + $block .= _setting("Required Perl modules", + CGI::start_table({width=>'100%'}). + $set.CGI::end_table()); + + # Check that each of the optional Perl modules can be loaded, and + # print its version number. + $set = _perlModulesCheck( $optionalMods ); + $set .= _perlModulesCheck( $I18Mods ); + $set .= _perlModulesCheck( $] >= 5.008 ? $I18Mods_perl58 : $I18Mods_perl56 ); + $block .= _setting("Optional Perl Modules", + CGI::start_table({width=>'100%'}). + $set.CGI::end_table()); + + # All module checks done, OK to enable fatalsToBrowser + import CGI::Carp qw( fatalsToBrowser ); + + # PATH_INFO + $block .= _setting(CGI::a({name=>'PATH_INFO'},'PATH_INFO'), $query->path_info(). + NOTE(<$url/foo/bar, +the correct PATH_INFO is /foo/bar, without any prefixed path +components. +Click here to test this +- particularly if you are using mod_perl, Apache or IIS, or are using +a web hosting provider. +Look at the new path info here. It should be /foo/bar. +HERE + )); + + # mod_perl + if( $usingModPerl ) { + $n = "Used for this script"; + } else { + $n = "Not used for this script"; + } + $n .= NOTE( 'mod_perl is ', $modPerlLoaded ? '' : 'not', + ' loaded into Apache' ); + if ( $modPerlVersion ) { + $n .= NOTE( 'mod_perl version ', $modPerlVersion ); + } + + # Check for a broken version of mod_perl 2.0 + if ( $usingModPerl && $modPerlVersion =~ /1\.99_?11/ ) { + # Recommend mod_perl upgrade if using a mod_perl 2.0 version + # with PATH_INFO bug (see Support.RegistryCookerBadFileDescriptor + # and Bugs:Item82) + $n .= ERROR(<) ); # Unix/Cygwin Perl - effective UID + $grp = join(',', map { lc(getgrgid( $_ )) } split( " ", $( ) ); + } else { # ActiveState or other Win32 Perl + $usr = lc( getlogin ); + # Try to use Cygwin's 'id' command - may be on the path, since Cygwin + # is probably installed to supply ls, egrep, etc - if it isn't, give up. + # Run command without stderr output, to avoid CGI giving error. + # Get names of primary and other groups. + $grp = lc(qx(sh -c '( id -un ; id -gn) 2>/dev/null' 2>nul )); + if ($?) { + $grp = "[Cannot identify groups - no Cygwin 'id' or 'sh' command on path]"; + } + } + + $block .= _setting('CGI user', 'userid = '.$usr.' groups = '. + $grp.''. + NOTE('Your CGI scripts are executing as this user.')); + + $block .= _setting("Original PATH", $originalPath. + NOTE(<recommended if Cygwin is installed). +

+To use 'bash' with ActiveState or other Win32 Perl you should set the +PERL5SHELL environment variable to something like +c:/YOURCYGWINDIR/bin/bash.exe -c +This should be set in the System Environment, and ideally set directly in the +web server (e.g. using the Apache SetEnv directive). +HERE + ); + if( $perltype eq 'ActiveState' ) { + $n .= WARN(<highly recommended not to use this +particular configuration on a public server (one exposed to the internet) +HERE + ); + if( Win32::BuildNumber() < $ActivePerlRecommendedBuild ) { + $n .= WARN(< +$ActivePerlRecommendedBuild +if you are going to use PERL5SHELL, which was broken in earlier builds. +HERE + ); + } + } + $block .= _setting("PERL5SHELL", $n); + }; + $output .= _foldableBlock(CGI::em( 'CGI Setup' ), '(read only) ', + $block); + return $output; +}; + +sub presentEditableInfo { + # "Parse" TWiki.cfg and LocalSite.cfg + my $output = ''; + my @blocks; + my @heads; + my $depth = 0; + for my $file ( 'TWiki.cfg', 'LocalSite.cfg' ) { + my $cfgfile = _findFileOnPath($file); + next unless $cfgfile; + open(F, $cfgfile) || next; + undef $/; + my $text = ; + close(F); + $text =~ s/^# //gm; + + my $type = ''; + my $descr; + my $opts; + foreach (split(/\r?\n/, $text)) { + if( m/^\*\*([A-Z]+)(\s*.*?)\*\*/ ) { + if( $type eq '_HELP' ) { + $blocks[$depth] .= _docBlock( $descr ); + } + $type = $1; + $opts = $2 || ''; + $opts .= ' '; # to simplify parsing + $descr = ''; + } elsif ($type && /\$(TWiki::)?cfg(.*?)\s*=/) { + if( $type eq '_HELP' ) { + $blocks[$depth] .= _docBlock( $descr ); + } else { + $blocks[$depth] .= _checkAndBuildValueGrabber($type, $opts, $descr, $2); + } + $type = ''; + $descr = ''; + } elsif( m/^#---(\++) *(.*?)$/ ) { + my $ndepth = length($1); + my $nhead = $2; + while( $depth >= $ndepth ) { + if ($depth <= 1) { + $output .= _foldableBlock($heads[$depth], '', $blocks[$depth]); + } else { + $blocks[$depth - 1] .= _ordinaryBlock($depth, $heads[$depth], '', $blocks[$depth]); + } + $depth--; + } + $depth = $ndepth; + $heads[$depth] = $nhead; + $blocks[$depth] = ''; + $type = '_HELP'; + } elsif( m/^\*PLUGINS\*/ ) { + if( $type eq '_HELP' ) { + $blocks[$depth] .= _docBlock( $descr ); + $descr = ''; + } + $blocks[$depth] .= _showPlugins(); + } elsif ( m/\*LANGUAGES\*/ ) { + if ( $type eq '_HELP' ) { + $blocks[$depth] .= _docBlock( $descr ); + $descr = ''; + } + $blocks[$depth] .= _showLanguages(); + } elsif( $type ) { + $descr .= "$_ "; + } + } + } + while( $depth && $blocks[$depth]) { + if ($depth <= 1) { + $output .= _foldableBlock($heads[$depth], '', $blocks[$depth]); + } else { + $blocks[ $depth - 1] .= _ordinaryBlock($depth, $heads[$depth], '', $blocks[$depth]); + } + $depth--; + } + return $output; +} + +###################################################################### +################# MAIN PROGRAM ####################################### +###################################################################### + +$| = 1; # no buffering - FIXME: mod_perl issue? + +eval "use CGI::Carp qw( fatalsToBrowser )"; + +use vars qw ( $setlibAvail $brokenLocalSiteError $brokenTWikiCfgError + $js1 $css ); + +# Set library paths in @INC, read TWiki.cfg and set locale, at compile time +# Try to use setlib.cfg, use default path if missing +if ( -r './setlib.cfg' ) { + require './setlib.cfg'; + $setlibAvail = 1; +} elsif ( -r '../conf/setlib.cfg' ) { + require '../conf/setlib.cfg'; + $setlibAvail = 1; +} else { + unshift @INC, '../lib'; + $setlibAvail = 0; +} + +unless( $TWiki::cfg{DetailedOS} ) { + $TWiki::cfg{DetailedOS} = $^O; + unless( $TWiki::cfg{DetailedOS} ) { + require Config; + $TWiki::cfg{DetailedOS} = $Config::Config{'osname'}; + } +} +unless( $TWiki::cfg{OS} ) { + if ($TWiki::cfg{DetailedOS} =~ /darwin/i) { # MacOS X + $TWiki::cfg{OS} = 'UNIX'; + } elsif ($TWiki::cfg{DetailedOS} =~ /Win/i) { + $TWiki::cfg{OS} = 'WINDOWS'; + } elsif ($TWiki::cfg{DetailedOS} =~ /vms/i) { + $TWiki::cfg{OS} = 'VMS'; + } elsif ($TWiki::cfg{DetailedOS} =~ /bsdos/i) { + $TWiki::cfg{OS} = 'UNIX'; + } elsif ($TWiki::cfg{DetailedOS} =~ /dos/i) { + $TWiki::cfg{OS} = 'DOS'; + } elsif ($TWiki::cfg{DetailedOS} =~ /^MacOS$/i) { # MacOS 9 or earlier + $TWiki::cfg{OS} = 'MACINTOSH'; + } elsif ($TWiki::cfg{DetailedOS} =~ /os2/i) { + $TWiki::cfg{OS} = 'OS2'; + } else { + $TWiki::cfg{OS} = 'UNIX'; + } +} + +# if this fails, ignore the problem, but we have to do it +unless( eval 'do "LocalSite.cfg"' ) { + # Capture the Perl error(s) + $brokenLocalSiteError = 'require failed: '. + ( $! ? $! : '') . ( $@ ? $@ : ''); +} + +# Read the configuration file now in order to set locale; +# includes checking for broken syntax etc. Need 'require' +# to get the $!/$@ to work. +unless( eval 'require "TWiki.cfg" ' ) { + # Capture the Perl error(s) + $brokenTWikiCfgError = 'require failed: '. + ( $! ? $! : '') . ( $@ ? $@ : ''); +} + +# and again +eval 'do "LocalSite.cfg"'; + +# Do a dynamic 'use locale' for this script +if( $TWiki::cfg{UseLocale} ) { + require locale; + import locale (); +} + +$js1 = <<'HERE'; +// +HERE + +$css = <<'HERE'; + +/* ----------------------------------------------------------- + LAYOUT + positioning of page elements + ----------------------------------------------------------- */ + +.twikiLeft { + float:left; + position:relative; +} +.twikiRight { + position:relative; + float:right; + display:inline; + margin:0; + text-align:right; +} +.twikiClear { + /* to clean up floats */ + margin:0; + padding:0; + height:0; + line-height:0%; + clear:both; + display:block; +} +.twikiHidden { + display:none; +} + +/* ----------------------------------------------------------- + Positioning of layout blocks + ----------------------------------------------------------- */ + +.patternMiddleContainer {} +.patternLeftBar { + position:absolute; + left:0; + margin:0; + padding:0; +} + +/* setting the height of the top bar */ + +.patternMiddleContainer {} +.patternLeftBar { + top:60px; /* height of patternTopBar */ +} +.patternTopBar { + height:60px; +} + +/* positioning the left bar (width:13em) */ + +.patternLeftBar, +.patternLeftBarContents /* needed for Explorer 5.0 */ { + width:16%; +} +.patternMain { + margin:0 0 0 16%; +} +.patternBottomBar { + margin:0 0 0 17%; /* add small margin for content offset */ +} + +/* ----------------------------------------------------------- + Pages that are not view + ----------------------------------------------------------- */ + +.patternNoViewPage .patternMain { + margin-left:3%; + margin-right:3%; + /* padding in style.css */ +} + +/* Print */ + +.patternPrintPage .patternMain { + margin-left:5%; + margin-right:5%; +} +.patternPrintPage .patternBottomBar { + margin-left:5%; + margin-right:0; + padding:0; +} +/* Plain */ + +.patternPlainPage .patternMain { + margin-left:0px; + margin-right:0px; + /* padding in style.css */ +} + + +/* ----------------------------------------------------------- + STYLE + Appearance: margins, padding, fonts, borders + ----------------------------------------------------------- */ + + +/* --------------------------------------------------------------------------------------- + CONSTANTS + + Sizes + ---------------------------------------- + S1 line-height 1.4em + S2 somewhat smaller font size 94% + S3 small font size, twikiSmall 85% + S4 horizontal bar padding (h2, patternTop) 5px + S5 form and attachment padding 20px + + --------------------------------------------------------------------------------------- */ + +/* ----------------------------------------------------------- + General elements + ----------------------------------------------------------- */ + +/* HTML elements */ +html body { + line-height:1.4em; /*S1*/ + font-family:"Lucida Grande", verdana, arial, sans-serif; + margin:0em; + padding:0em; + font-size:x-small; + voice-family:"\"}\""; + voice-family:inherit; + font-size:small; +} +html>body { /* Mozilla */ + font-size:small; +} +p { + margin:1em 0 0 0; +} +table { + border-collapse:separate; +} +th { + line-height:1.15em; +} +strong, b { + font-weight:bold; +} +hr { + height:1px; + border:none; +} +pre, code, tt { + font-size:100%; + line-height:1.4em; /*S1*/ +} +/* put overflow pre in a scroll area */ +pre { + overflow-x:auto; + overflow-y:visible; + padding-bottom:1.5em; + width:100%; +} +html>body pre { /* hide from IE */ + padding-bottom:0; + /*\*/ overflow:auto !important; /* */ overflow:scroll; width:auto; /* for Mac Safari */ +} +ol li, ul li { + line-height:1.4em; /*S1*/ +} + +/* Text */ +h1, h2, h3, h4, h5, h6 { + font-family:"Lucida Grande", arial, verdana, sans-serif; + line-height:104%; + padding:0em; + margin:1em 0 .1em 0; +} +h1, h2 { + font-weight:500; +} +h1, +.patternPreviewArea h1 { + font-size:200%; + margin:0 0 .5em 0; +} +.patternNoViewPage h1 { + font-size:175%; +} +.patternTopic h2, +.patternTopic h3, +.patternTopic h4, +.patternTopic h5 { + display:block; + /* give header a background color for easy scanning: */ + padding:.2em 5px; + margin:1em -5px .35em -5px; + border-width:0 0 1px 0; + border-style:solid; + height:auto; + +} + + +/* Links */ +/* somehow the twikiNewLink style have to be before the general link styles */ +.twikiNewLink { + border-width:0 0 1px 0; + border-style:dotted; +} +.twikiNewLink a { + text-decoration:none; + margin-left:1px; +} +.twikiNewLink a sup { + text-align:center; + padding:0 2px; + vertical-align:baseline; + font-size:100%; + text-decoration:none; +} +.twikiNewLink a:link sup, +.twikiNewLink a:visited sup { + border-width:1px; + border-style:solid; + text-decoration:none; +} +.twikiNewLink a:hover sup { + text-decoration:none; +} + +:link:focus, +:visited:focus, +:link, +:visited, +:link:active, +:visited:active { + text-decoration:underline; +} +:link:hover, +:visited:hover { + text-decoration:none; +} + +img { + vertical-align:text-bottom; +} + +/* Forms */ +form { + display:inline; + margin:0em; + padding:0em; +} +textarea, +input, +select { + font-size:100%; + vertical-align:middle; + border-width:1px; + border-style:solid; + padding:1px; +} +input { + margin:.15em 0; +} +textarea { + font-family:"Lucida Grande", verdana, arial, sans-serif; +} +label { + vertical-align:middle; +} + +/* ----------------------------------------------------------- + Plugin elements + ----------------------------------------------------------- */ + +/* TablePlugin */ +.twikiTable { + border-collapse: collapse; + border-width:1px; + border-style:solid; +} +.twikiTable td, +.twikiTable th { + border-width:0 1px; + border-style:solid; +} +.twikiTable th { + padding:.4em .5em; +} +.twikiTable td { + padding:.25em .5em; +} +.twikiTable th a:link, +.twikiTable th a:visited, +.twikiTable th a font { + text-decoration:none; +} +.twikiTable th a:hover, +.twikiTable th a:hover font { + text-decoration:none; + border-width:0 0 1px 0; + border-style:solid; +} + +/* TablePlugin - sorting of table columns */ +th.twikiSortedAscendingCol a:link, +th.twikiSortedAscendingCol a:link font, +th.twikiSortedAscendingCol a:visited, +th.twikiSortedAscendingCol a:visited font, +.twikiAttachments th.twikiSortedAscendingCol a:link, +.twikiAttachments th.twikiSortedAscendingCol a:link font, +.twikiAttachments th.twikiSortedAscendingCol a:visited, +.twikiAttachments th.twikiSortedAscendingCol a:visited font { + text-decoration:none; + border-width:1px 0 0 0; + border-style:solid; +} +th.twikiSortedDescendingCol a:link, +th.twikiSortedDescendingCol a:link font, +th.twikiSortedDescendingCol a:visited, +th.twikiSortedDescendingCol a:visited font, +.twikiAttachments th.twikiSortedDescendingCol a:link, +.twikiAttachments th.twikiSortedDescendingCol a:link font, +.twikiAttachments th.twikiSortedDescendingCol a:visited, +.twikiAttachments th.twikiSortedDescendingCol a:visited font { + text-decoration:none; + border-width:0 0 1px 0; + border-style:solid; +} +th.twikiSortedAscendingCol a:hover, +th.twikiSortedAscendingCol a:hover font, +th.twikiSortedDescendingCol a:hover, +th.twikiSortedDescendingCol a:hover font, +.twikiAttachments th.twikiSortedAscendingCol a:hover, +.twikiAttachments th.twikiSortedAscendingCol a:hover font, +.twikiAttachments th.twikiSortedDescendingCol a:hover, +.twikiAttachments th.twikiSortedDescendingCol a:hover font{ + text-decoration:none; + border:0; +} +th.twikiSortedAscendingCol a:hover, +th.twikiSortedAscendingCol a:hover font, +.twikiAttachments th.twikiSortedAscendingCol a:hover, +.twikiAttachments th.twikiSortedAscendingCol a:hover font { + border-width:0 0 1px 0; + border-style:solid; +} +th.twikiSortedDescendingCol a:hover, +th.twikiSortedDescendingCol a:hover font, +.twikiAttachments th.twikiSortedDescendingCol a:hover, +.twikiAttachments th.twikiSortedDescendingCol a:hover font { + border-width:1px 0 0 0; + border-style:solid; +} + +/* TipsContrib */ +.tipsOfTheDayContents .tipsOfTheDayTitle { + font-weight:bold; +} +.patternTopic .tipsOfTheDayHeader { + display:block; + padding:3px 5px; +} +.patternTopic .tipsOfTheDayText { + padding:0 5px 5px 5px; +} +.patternTopic .tipsOfTheDayText a:link, +.patternTopic .tipsOfTheDayText a:visited { + text-decoration:none; +} +/* TipsContrib - in left bar */ +.patternLeftBar .tipsOfTheDay { + margin:1em 0 .5em 0; + border-width:0; +} +.patternLeftBar .tipsOfTheDayHeader img { + display:none; +} +.patternLeftBar .tipsOfTheDayContents { + padding:.25em .25em .5em .25em; +} +.patternLeftBar .tipsOfTheDayHeader { + display:block; + font-weight:normal; +} + +/* TwistyContrib */ +a:link.twistyTrigger, +a:visited.twistyTrigger { + text-decoration:none; +} +a:link .twistyLinkLabel, +a:visited .twistyLinkLabel { + text-decoration:underline; +} + +/* ----------------------------------------------------------- + TWiki styles + ----------------------------------------------------------- */ + +.twikiAttachments, +.twikiForm { + margin:1em 0; +} +.patternContent .twikiAttachments, +.patternContent .twikiForm { + font-size:94%; /*S2*/ + padding:20px; /*S5*/ + border-width:1px 0 0 0; + border-style:solid; + margin:0 0 -1px 0; +} +.twikiAttachments p { /* fix for extra generated paragraph */ + display:none; +} +.twikiAttachments table, +.twikiForm table { + border-collapse:collapse; + padding:0px; + border-spacing:0px; + empty-cells:show; + border-style:solid; + border-width:1px 1px 0 1px; +} +.twikiAttachments table { + line-height:1.4em; /*S1*/ + width:auto; + voice-family: "\"}\""; /* hide the following for Explorer 5.x */ + voice-family:inherit; + width:100%; +} +.twikiAttachments th, +.twikiForm th, +.twikiAttachments th, +.twikiForm th { + padding:.2em .6em; + height:2.5em; + vertical-align:middle; + border-style:solid; + border-width:0 0 1px 1px; +} +.twikiAttachments th.twikiFirstCol, +.twikiForm th.twikiFirstCol { + border-left:none; + width:0px; +} +/* don't show any of those ugly sort icons */ +.twikiAttachments th img, +.twikiAttachments th a:link img, +.twikiAttachments th a:visited img { + display:none; +} +.twikiAttachments td, +.twikiForm td { + border-style:solid; + border-width:0 0 1px 0; + padding:.2em .6em; + height:1.4em; /*S1*/ + text-align:left; + vertical-align:top; +} +.twikiForm th.twikiFirstCol, +.twikiForm td.twikiFirstCol { + border-left:none; +} +.twikiAttachments th.twikiFirstCol, +.twikiAttachments td.twikiFirstCol { + border-left:none; + width:26px; + text-align:center; +} +.twikiAttachments th a:link, +.twikiAttachments th a:visited, +.twikiForm th a:link, +.twikiForm th a:visited { + text-decoration:none; +} +.twikiAttachments th a:hover, +.twikiForm th a:hover { + text-decoration:none; + border-width:0 0 1px 0; + border-style:solid; +} +.twikiAttachments td a:link, +.twikiAttachments td a:visited, +.twikiForm td a:link, +.twikiForm td a:visited { + font-weight: normal; +} +.twikiForm table table, +.twikiForm table table th, +.twikiForm table table td { + border:none; +} + + +.twikiToc { + margin:1em 0; + padding:.3em 0 .6em 0; +} +.twikiToc ul { + list-style:outside; /* list style image is set in twiki.pattern.tmpl */ + padding:0 0 0 .5em; + margin:0em; +} +.twikiToc li { + margin-left:1em; +} +.twikiToc .twikiTocTitle { + margin:0em; + padding:0em; + font-weight:bold; +} + +.twikiSmall { + font-size:85%; /*S3*/ +} +.twikiSmallish { + font-size:94%; /*S2*/ +} +.twikiNew { } +.twikiSummary { + font-size:85%; /*S3*/ +} +.twikiEmulatedLink { + text-decoration:underline; +} +.twikiPageForm table { + width:100%; + border-width:1px; + border-style:solid; + margin:0 0 2em 0; +} +.twikiPageForm th, +.twikiPageForm td { + border:0; + padding:.15em; +} +.twikiPageForm td {} +.twikiPageForm th.last, +.twikiPageForm td.last { + border-bottom:0; +} +.twikiPageForm td.first { + padding-top:1em; +} +.twikiBroadcastMessage { + padding:.25em; +} +.twikiButton, +.twikiSubmit { + font-size:100%; + border-width:1px; + border-style:solid; + vertical-align:middle; + padding:1px; +} +.twikiCheckbox, +.twikiRadioButton { + border:none; + vertical-align:middle; + margin:0 .3em 0 0; +} +.twikiHelp { + padding:1em; + margin:.5em 0 1em 0; + border-width:1px 0; + border-style:solid; +} +.twikiHelp ul, +.twikiHelp li { + margin-top:0; + margin-bottom:0; +} +.twikiAccessKey { + text-decoration:none; + border-width:0 0 1px 0; + border-style:solid; +} +a:hover .twikiAccessKey { + text-decoration:none; + border:none; +} + +/* ----------------------------------------------------------- + Pattern skin specific elements + ----------------------------------------------------------- */ + +.patternSeparator { + font-family:monospace; +} + +.patternTopicAction { + font-size:94%; /*S2*/ + line-height:1.5em; + margin:0 0 3em 0; + padding:.5em 20px; /*S5*/ + border-width:1px 0; + border-style:solid; +} +.patternActionButtons a:link, +.patternActionButtons a:visited { + padding:1px 1px 2px 1px; +} +.patternTopicAction .patternActionButtons a:link, +.patternTopicAction .patternActionButtons a:visited { + text-decoration:none; +} +.patternTopicAction .patternSaveOptions { + margin-bottom:.5em; +} +.patternTopicAction .patternSaveOptions .patternSaveOptionsContents { + padding:.2em 0; +} +.patternMoved { + font-size:94%; /*S2*/ + margin-bottom:1em; +} +.patternWebIndicator {} +.patternPage { + font-size:100%; +} +.patternMiddleContainer {} +.patternMain { + padding:0 1.5em 1em 2em; + border-width:1px; + border-style:solid; +} +.patternNoViewPage .patternMain { + padding-top:2em; + padding-bottom:2em; + margin-bottom:1em; +} + +/* Top bar */ + +.patternTopBar {} +.patternTopBarContents { + margin:0em; + padding:5px 2em 5px 1em; /* right padding same as .patternViewPage .patternMain */ +} +.patternTopBarContents table { + height:50px; /* together with a padding of 2x 5px this assumes a logo of 40px height */ +} +.patternTopBarContents .patternSearchBox td { + height:50px; + vertical-align:middle; + font-size:94%; /*S2*/ +} +.patternMetaNav { + font-size:85%; /*S3*/ +} +.patternMetaNav a:link, +.patternMetaNav a:visited { + text-decoration:none; +} +.patternMetaNav .patternSeparator { + margin:0 .5em; +} +.patternMetaNav input#quickSearchBox, +.patternMetaNav input#jumpBox { + margin:0 0 0 .85em; + padding:0; + height:1.2em; /* 85% of default line-height 1.4 */ +} +.patternMetaNav input#quickSearchButton, +.patternMetaNav input#jumpButton { + margin:0 0 0 2px; + border:0; +} + +/* Left bar */ +.patternLeftBar { + border-width:1px 1px 1px 0; + border-style:solid; + overflow:hidden; + font-size:94%; /*S2*/ +} +.patternLeftBar a img { + margin:1px 0 0 0; +} +.patternLeftBar a:link, +.patternLeftBar a:visited { + text-decoration:none; +} +.patternLeftBar ul { + padding:0em; + margin:0em; + list-style:none; +} +.patternLeftBar li { + padding-left:0; +} +.patternLeftBar .patternLeftBarContents { + margin:-1px 0 1em 0; + padding:0 .5em 0 1em; + width:89%; +} +.patternLeftBar .patternForm { + margin:.5em 0 1em 0; +} +html>body .patternLeftBar .patternForm { /* Hide from IE */ + margin:1.25em 0 1em 0; +} +.patternLeftBar .patternFormElements { + margin:0 0 3px 0; + width:100%; +} +.patternLeftBar input#quickSearchBox, +.patternLeftBar input#jumpBox { + margin:0; + height:12px; /* with padding and border this adds up to 16px height - same as button */ + width:80%; + border-width:1px; + border-style:solid; + font-size:85%; /*S3*/ +} +.patternLeftBar input#quickSearchButton, +.patternLeftBar input#jumpButton { + margin:0 0 0 4px; + padding:0; + border:0; +} +.patternLeftBar .patternChangeLanguage { + margin:.2em 0 0 0; + font-size:85%; /*S3*/ +} +.patternLeftBarPersonal { + margin:-1px 0 .7em 0; + padding:.25em 0 .25em 1em; + border-width:1px 0; + border-style:solid; +} +.patternLeftBarPersonal ul { + list-style: none; + margin:0; + padding:0; +} +.patternLeftBarPersonal li { + padding-left:1em; + background-repeat:no-repeat; + background-position:0 .5em; +} +.patternLeftBarPersonal a:hover { + text-decoration:none; +} + +/* Bottom bar */ +.patternBottomBar { + padding-bottom:1em; +} +.patternBottomBarContents { + padding:.5em 2.5em 1.5em .25em; + font-size:94%; /*S2*/ +} + +/* table used in various places */ +.patternVersatileTable table { + width:auto; + padding:0px; + border-spacing:0px; + border-collapse:collapse; + empty-cells:show; + border-width:1px; + border-style:solid; + margin:1em 0; + font-size:94%; /*S2*/ +} +.patternVersatileTable th, +.patternVersatileTable td { + vertical-align:middle; + border-width:1px 0 0 0; + border-style:solid; + padding:5px 1em 5px 1.25em; /*S4*/ +} + + + +/* Topic text */ +.patternTopic { + padding:0 0 1.5em 0; +} + +.patternTop { + font-size:94%; /*S2*/ +} +.patternTop table { + border:none; + width:100%; +} +.patternTop td { + vertical-align:middle; +} +.patternTop .patternHomePath, +.patternTop .patternRevInfo { + padding:.25em .5em .25em 0; + line-height:1.25em; +} +.patternTop .patternHomePath { + text-align:left; + width:auto; +} +.patternTop .patternRevInfo { + float:right; + text-align:right; +} +.patternTop .patternHomePath a:link, +.patternTop .patternHomePath a:visited, +.patternTop .patternRevInfo a:link, +.patternTop .patternRevInfo a:visited { + text-decoration:none; +} + +/* Button tool bar */ +.patternToolBar { + padding:.25em .5em 0 .5em; + line-height:100%; +} +td.patternToolBar { + vertical-align:bottom; +} +.patternToolBar a:link, +.patternToolBar a:visited { + text-decoration:none; +} +.patternToolBarButtons { + float:right; +} +.patternToolBarButtons .twikiSeparator { + display:none; +} +.patternToolBar .patternButton { + float:left; +} +.patternToolBar .patternButton s, +.patternToolBar .patternButton strike, +.patternToolBar .patternButton a:link, +.patternToolBar .patternButton a:visited { + display:block; + margin:0 0 -1px 4px; + border-width:1px; + border-style:solid; + position:relative; + z-index:0; + padding:.35em .6em; +} +.patternToolBar .patternButton a:link, +.patternToolBar .patternButton a:visited { + text-decoration:none; +} +.patternToolBar .patternButton s, +.patternToolBar .patternButton strike { + text-decoration:none; +} +.patternToolBar .patternButton a:hover { + text-decoration:none; + z-index:3; +} +.patternToolBarBottom { + position:relative; + border-width:1px 0 0 0; + border-style:solid; + margin:0 0 .5em 0; + z-index:2; +} + +/* Edit page */ + +.twikiChangeFormButtonHolder { + margin:1em 0; + float:right; +} +.patternFormHolder { /* constrains the textarea */ + width:100%; +} +.twikiChangeFormButton { + font-family:"Lucida Grande", verdana, arial, sans-serif; + padding:0em; + margin:0em; + border:none; + text-decoration:underline; +} +.patternSig { + margin:.25em 0; +} + +.patternAccessKeyInfo { + margin-top:1em; + padding:.25em .5em; + border-width:1px 0; + border-style:solid; +} +.patternAccessKeyInfo a:link, +.patternAccessKeyInfo a:visited { + text-decoration:underline; +} +.patternAccessKeyInfo a:hover { + text-decoration:none; +} + +/* Preview page */ + +.patternPreviewArea { + border-width:1px; + border-style:solid; + margin:0em -.5em 2em -.5em; + padding:.5em; +} + +/* Attach page */ + +.patternAttachPage .patternVersatileTable table { + margin-bottom:0; + width:auto; + voice-family: "\"}\""; /* hide the following for Explorer 5.x */ + voice-family:inherit; + width:100%; +} +.patternAttachPage .patternVersatileTable th { + text-align:right; +} +.patternPrevious { + margin:1em 0; +} +#moveattachment { + font-size:94%; /*S2*/ +} +.patternPrevious table { + width:auto; +} + +/* Rename page */ + +.patternRenamePage .patternVersatileTable th { + text-align:right; + width:10%; +} + +/* WebSearch, WebSearchAdvanced */ + +table#twikiSearchTable { + background:none; + border-bottom:0; +} +table#twikiSearchTable th, +table#twikiSearchTable td { + padding:.5em; + border-width:0 0 1px 0; + border-style:solid; +} +table#twikiSearchTable th { + width:15%; + text-align:right; +} +table#twikiSearchTable td { + width:85%; +} +table#twikiSearchTable td.first { + padding-top:1em; +} + +/* ----------------------------------------------------------- + Search results + styles and overridden styles used in search.pattern.tmpl + ----------------------------------------------------------- */ + +.patternSearchResultsPage {} +.patternSearchResults {} + +.patternSearchResultsHeader { + padding:.25em 5px .15em 5px; /*S4*/ + margin:0 -5px .25em -5px; /*S4*/ + font-weight:bold; + border-width:0 0 1px 0; + border-style:solid; + height:1.5em; /* or WIN/IE wont draw the backgound */ +} +.patternSearchString { + margin:1em 0 1.5em 0; +} +.patternSearchResults table { + width:auto; + voice-family: "\"}\""; /* hide the following for Explorer 5.x */ + voice-family:inherit; + width:100%; +} +.patternSearchResults .twikiTopRow { + padding-top:.2em; +} +.patternSearchResults .twikiBottomRow { + padding-bottom:.25em; + border-width:0 0 1px 0; + border-style:solid; +} +.patternSearchResults .twikiAlert { + font-weight:bold; +} +.patternSearchResults .twikiSummary .twikiAlert { + font-weight:normal; +} +.patternSearchResults .twikiNew { + border-width:1px; + border-style:solid; + font-size:85%; /*S3*/ + padding:0 1px; + font-weight:bold; +} +.patternSearchResultsPage .twikiHelp { + display:block; + width:auto; + margin:.25em 0; +} +.patternSearchResults .twikiSRAuthor { + width:15%; + text-align:left; +} +.patternSearchResults .twikiSRRev { + width:30%; + text-align:left; +} +.patternSearchResultCount { + margin:.25em 0 1.5em 0; + font-size:94%; /*S2*/ +} +.patternViewPage .patternSearchResultsBegin { /* for changes template with noheader="on" */ + height:1px; + border-width:0 0 1px 0; + border-style:solid; + padding:0 5px; /*S4*/ + margin:0 -5px; /*S4*/ +} + +/* Search results in book view format */ + +.patternBookViewList .patternSearchResultsHeader { + margin-bottom:1em; +} +.patternBookViewList .twikiTopRow { + padding:.2em 5px; /*S4*/ + margin:2.5em -5px .15em -5px; /*S4*/ +} +.patternBookViewList .twikiBottomRow { + font-size:100%; + padding:1em 0; +} +.patternBookViewList .twikiBottomRow { + width:auto; +} + +/* Print */ + +.patternPrintPage { + /*font-size: 12pt;*/ +} +.patternPrintPage .patternMain { + padding:1em 2em 0 2em; + border-width:1px; + border-style:solid; +} +.patternPrintPage .patternBottomBarContents { + padding-left:1em; +} +.patternPrintPage .patternTopicFooter { + margin:2em 0 2em 0; + font-size:94%; /*S2*/ +} + +/* Diff */ + +.patternDiffPage .twikiDiffTable { + margin:2em 0; +} +.patternDiffPage .twikiDiffTable th, +.patternDiffPage .twikiDiffTable td { + padding:.2em; +} +tr.twikiDiffDebug td { + border-width:1px; + border-style:solid; +} +.patternDiffPage td.twikiDiffDebugLeft { + border-bottom:none; +} +.twikiDiffLineNumberHeader { + padding:.3em 0; +} + + +/* ----------------------------------------------------------- + COLOR + Appearance: text colors, background colors, border colors + ----------------------------------------------------------- */ + +/* --------------------------------------------------------------------------------------- + CONSTANTS + + Text colors + ---------------------------------------- + T1 text color #000 + T2 link color #06c + T3 link hover text color #FBF7E8 + T4 link action button color (red) (same as BG2) #D6000F + T5 header color #a00 + T6 code text, left bar text #7A4707 + T7 muted (dark gray) text #666 + T8 grayed out text #8E9195 + T9 alert #f00 + T10 green 'new' #049804 + T11 dark gray #333 + + Background colors + ---------------------------------------- + BG1 white; attachment, form table background #fff + BG2 link hover background color (red) #D6000F + BG3 light gray #efefef + BG4 active form field (not implemented yet) #ffc + BG5 info background very light blue (placeholder for background image) #E8EEF7 + BG6 patternTopicAction light yellow (same as T3) #FBF7E8 + BG7 header background (very light yellow) #FDFAF1 + BG8 accent on sorted table column #ccc + BG9 light yellow; attachment, form background #FEFBF3 + BG10 light green 'new' #ECFADC + BG11 dark gray; diff header background (same as T8) #8E9195 + BG12 dark yellow, submit button #FED764 + + Border colors + ---------------------------------------- + BO1 light gray #efefef + BO2 submit button border blue ('active') #88B6CF + BO3 info light blue border #BFD8ED + BO4 border color beige, header h2 bottom border #E2DCC8 + BO5 header h3..h5 bottom border (75% of BO4) #E9E4D2 + BO6 neutral gray border #ccc + BO7 light neutral gray #ddd + BO9 alert border #f00 + + --------------------------------------------------------------------------------------- */ + +html body { + background-color:#fff; /*BG1*/ + color:#000; /*T1*/ +} +/* be kind to netscape 4 that doesn't understand inheritance */ +body, p, li, ul, ol, dl, dt, dd, acronym, h1, h2, h3, h4, h5, h6 { + background-color:transparent; +} +hr { + color:#ccc; /*BO6*/ + background-color:#ccc; /*BO6*/ +} +pre, code, tt { + color:#7A4707; /*T6*/ +} +h1, h2, h3, h4, h5, h6 { + color:#a00; /*T5*/ +} +h1 a:link, +h1 a:visited { + color:#a00; /*T5*/ +} +.patternTopic h2 { + background-color:#FDFAF1; + border-color:#E2DCC8; /*BO4*/ +} +.patternTopic h3, +.patternTopic h4, +.patternTopic h5 { + border-color:#E9E4D2; /*BO5*/ +} +/* to override old Render.pm coded font color style */ +.twikiNewLink font { + color:inherit; +} +.twikiNewLink a:link sup, +.twikiNewLink a:visited sup { + color:#666; /*T7*/ + border-color:#E2DCC8; /*BO4*/ +} +.twikiNewLink a:hover sup { + background-color:#D6000F; /*BG2*/ + color:#FBF7E8; /*C3*/ + border-color:#D6000F; /*BG2*/ /* (part of bg) */ +} +.twikiNewLink { + border-color:#666; /*T7*/ +} +:link:focus, +:visited:focus, +:link, +:visited, +:link:active, +:visited:active { + color:#06c; /*T2*/; + background-color:transparent; +} +:link:hover, +:visited:hover { + color:#FBF7E8; /*C3*/ + background-color:#D6000F; /*BG2*/ +} +:link:hover img, +:visited:hover img { + background:#fff; /*BG1*/ +} + +.patternTopic a:visited { + color:#666; /*T7*/ +} +.patternTopic a:hover { + color:#FBF7E8; /*C3*/ +} +textarea, +input, +select { + border-color:#ccc; /*BO6*/ + background-color:#FEFBF3; /*BG9*/ +} + +/* ----------------------------------------------------------- + Plugin elements + ----------------------------------------------------------- */ + +/* TablePlugin */ +.twikiTable, +.twikiTable td, +.twikiTable th { + border-color:#ddd; /*BO7*/ +} +.twikiTable th a:link, +.twikiTable th a:visited, +.twikiTable th a font { + color:#06c; /*T2*/ +} +.twikiTable th a:hover, +.twikiTable th a:hover font { + background-color:transparent; + color:#D6000F; /*T4*/ + border-color:#D6000F; /*T4*/ +} + +/* TablePlugin - sorting of table columns */ +.patternTopic th.twikiSortedAscendingCol, +.patternTopic th.twikiSortedDescendingCol { + background-color:#ccc; /*BG8*/ +} +th.twikiSortedAscendingCol a:link, +th.twikiSortedAscendingCol a:link font, +th.twikiSortedAscendingCol a:visited, +th.twikiSortedAscendingCol a:visited font, +.twikiAttachments th.twikiSortedAscendingCol a:link, +.twikiAttachments th.twikiSortedAscendingCol a:link font, +.twikiAttachments th.twikiSortedAscendingCol a:visited, +.twikiAttachments th.twikiSortedAscendingCol a:visited font, +th.twikiSortedDescendingCol a:link, +th.twikiSortedDescendingCol a:link font, +th.twikiSortedDescendingCol a:visited, +th.twikiSortedDescendingCol a:visited font, +.twikiAttachments th.twikiSortedDescendingCol a:link, +.twikiAttachments th.twikiSortedDescendingCol a:link font, +.twikiAttachments th.twikiSortedDescendingCol a:visited, +.twikiAttachments th.twikiSortedDescendingCol a:visited font { + border-color:#666; /*T7*/ +} +th.twikiSortedAscendingCol a:hover, +th.twikiSortedAscendingCol a:hover font, +.twikiAttachments th.twikiSortedAscendingCol a:hover, +.twikiAttachments th.twikiSortedAscendingCol a:hover font, +th.twikiSortedDescendingCol a:hover, +th.twikiSortedDescendingCol a:hover font, +.twikiAttachments th.twikiSortedDescendingCol a:hover, +.twikiAttachments th.twikiSortedDescendingCol a:hover font { + border-color:#D6000F; /*T4*/ +} + +/* TwistyContrib */ +.twistyPlaceholder { + color:#8E9195; /*T8*/ +} +a:hover.twistyTrigger { + color:#FBF7E8; /*T3*/ +} + +/* TipsContrib */ +.tipsOfTheDay { + background-color:#E8EEF7; /*BG5*/ +} +.patternTopic .tipsOfTheDayHeader { + color:#333; /*T11*/ +} +/* TipsContrib - in left bar */ +.patternLeftBar .tipsOfTheDay a:link, +.patternLeftBar .tipsOfTheDay a:visited { + color:#a00; /*T5*/ +} +.patternLeftBar .tipsOfTheDay a:hover { + color:#FBF7E8; /*T3*/ +} + +/* ----------------------------------------------------------- + TWiki styles + ----------------------------------------------------------- */ + +.twikiGrayText a:link, +.twikiGrayText a:visited { + color:#8E9195; /*T8*/ +} +.twikiGrayText a:hover { + color:#FBF7E8; /*C3*/ +} + +.twikiAttachments, +.twikiForm { + color:#666; /*T7*/ +} +.patternContent .twikiAttachments, +.patternContent .twikiForm { + color:#333; /*T11*/ +} +.patternEditPage .twikiForm { + color:#000; /*T1*/ +} +.patternContent .twikiAttachments, +.patternContent .twikiForm { + background-color:#FEFBF3; /*BG9*/ + border-color:#E2DCC8; /*BO4*/ +} +.twikiAttachments table, +.twikiForm table { + border-color:#ccc; /*BO6*/ + background-color:#fff; /*BG1*/ +} +.twikiAttachments table { + background-color:#fff; /*BG1*/ +} +.twikiAttachments th, +.twikiForm th, +.twikiAttachments th, +.twikiForm th { + border-color:#ccc; /*BO6*/ + background-color:#fff; /*BG1*/ +} +.twikiAttachments td, +.twikiForm td { + border-color:#ccc; /*BO6*/ + background-color:#fff; /*BG1*/ +} +.twikiAttachments th a:link, +.twikiAttachments th a:visited, +.twikiForm th a:link, +.twikiForm th a:visited { + color:#06c; /*T2*/ + border-color:#06c; /*T2*/ +} +.twikiAttachments th font, +.twikiForm th font { + color:#06c; /*T2*/ +} +.twikiAttachments th a:hover, +.twikiForm th a:hover { + border-color:#06c; /*T2*/ + background-color:transparent; +} +.twikiAttachments th.twikiSortedAscendingCol, +.twikiAttachments th.twikiSortedDescendingCol { + background-color:#efefef; /*BG3*/ +} +.twikiToc .twikiTocTitle { + color:#666; /*T7*/ +} +.twikiBroadcastMessage b, +.twikiBroadcastMessage strong { + color:#f00; /*T9*/ +} +.twikiAlert, +.twikiAlert code { + color:#f00; /*T9*/ +} +.twikiGrayText { + color:#8E9195; /*T8*/ +} +.twikiEmulatedLink { + color:#06c; /*T2*/ +} +.twikiPageForm table { + border-color:#ddd; /*BO7*/ + background:#fff; /*BG1*/ +} +.twikiPageForm th { + color:#8E9195; /*T8*/ +} +.twikiPageForm td.first { + background:#efefef; /*BG3*/ +} +.twikiPageForm hr { + border-color:#efefef; /*BO1*/ + background-color:#efefef; /*BO1*/ + color:#efefef; /*BO1*/ +} +.twikiButton, +.twikiSubmit { + border-color:#ccc; /*BO6*/ +} +.twikiButton { + background-color:#efefef; /*BG3*/ +} +.twikiSubmit { + background-color:#FED764; /*BG12*/ +} +.twikiCheckbox, +.twikiRadioButton { + background-color:transparent; +} +.twikiHelp { + background-color:#E8EEF7; /*BG5*/ + border-color:#BFD8ED; /*BO3*/ +} +.twikiAccessKey { + color:inherit; + border-color:#8E9195; /*T8*/ +} +a:link .twikiAccessKey, +a:visited .twikiAccessKey, +a:hover .twikiAccessKey { + color:inherit; +} + +/* ----------------------------------------------------------- + Pattern skin specific elements + ----------------------------------------------------------- */ +.patternTopicAction { + color:#666; /*T7*/ + border-color:#E2DCC8; /*BO4*/ + background-color:#FBF7E8; +} +.patternTopicAction .twikiSeparator { + color:#aaa; +} +.patternActionButtons a:link, +.patternActionButtons a:visited { + color:#D6000F; /*T4*/ +} +.patternActionButtons a:hover { + color:#FBF7E8; /*C3*/ +} +.patternTopicAction .twikiAccessKey { + border-color:#C75305; +} +.patternTopicAction label { + color:#000; /*T1*/ +} +.patternHelpCol { + color:#8E9195; /*T8*/ +} +.patternWebIndicator { + background-color:#fff; +} +.patternMain { + background-color:#fff; /*BG1*/ + border-color:#E2DCC8; /*BO4*/ +} +.patternTopBar { + background-color:transparent; +} +.patternTopBarContents .patternSearchBox td { + color:#8E9195; /*T8*/ +} +.patternMetaNav { + color:#8E9195; /*T8*/ +} +.patternMetaNav a:link, +.patternMetaNav a:visited { + color:#8E9195; /*T7*/ +} +.patternMetaNav a:hover { + color:#FBF7E8; /*C3*/ +} +.patternMetaNav input { + background-color:#FEFBF3; /*BG9*/ +} +/* Left bar */ +.patternLeftBar { + border-color:#E2DCC8; /*BO4*/ + color:#666; /*T7*/ + background-color:transparent; +} +.patternLeftBar hr { + color:#E2DCC8; /*BO4*/ + background-color:#E2DCC8; /*BO4*/ +} +.patternLeftBar a:link, +.patternLeftBar a:visited { + color:#7A4707; /*T6*/ +} +.patternLeftBar a:hover { + color:#FBF7E8; /*C3*/ +} +.patternLeftBar b, +.patternLeftBar strong { + color:#333; /*T11*/ +} +.patternLeftBar input#quickSearchBox, +.patternLeftBar input#jumpBox { + border-color:#E2DCC8; +} +.patternLeftBar .patternChangeLanguage { + color:#8E9195; /*T8*/ +} +.patternLeftBarPersonal { + background-color:#E8EEF7; + border-color:#BFD8ED; /*BO3*/ +} +.patternLeftBarPersonal a:link, +.patternLeftBarPersonal a:visited { + color:#06c; /*T2*/; +} +.patternLeftBarPersonal a:hover { + color:#FBF7E8; /*C3*/ + background-color:#D6000F; /*BG2*/ +} +.patternBottomBarContents { + color:#8E9195; /*T8*/ +} +.patternVersatileTable table { + border-color:#ccc; +} +.patternVersatileTable th, +.patternVersatileTable td { + border-color:#ccc; /*BO6*/ +} +.patternVersatileTable td { + background-color:#fff; /*BG1*/ +} +.patternVersatileTable th { + background-color:#efefef; +} +.patternVersatileTable th.patternMainCol, +.patternVersatileTable td.patternMainCol { + background-color:#ECFADC; /*BG10*/ +} +.patternVersatileTable th.patternOldCol, +.patternVersatileTable td.patternOldCol { + background-color:#fff; /*BG1*/ + color:#000; +} +.patternVersatileTable input { + background-color:#fff; /*BG1*/ +} +.patternVersatileTable input.twikiCheckbox { + background-color:transparent; +} + +.patternTop { + color:#8E9195; /*T8*/ +} +.patternTop .patternHomePath { + color:#000; /*T1*/ +} +.patternTop .patternRevInfo, +.patternTop .patternRevInfo a:link, +.patternTop .patternRevInfo a:visited { + color:#8E9195; /*T8*/ +} +.patternTop .patternRevInfo a:hover { + color:#FBF7E8; /*C3*/ +} +.patternToolBar .patternButton s, +.patternToolBar .patternButton strike, +.patternToolBar .patternButton a:link, +.patternToolBar .patternButton a:visited { + border-color:#E2DCC8; /*BO4*/ + background-color:#fff; /*BG1*/ +} +.patternToolBar .patternButton a:link, +.patternToolBar .patternButton a:visited { + color:#666; /*T7*/ +} +.patternToolBar .patternButton s, +.patternToolBar .patternButton strike { + color:#8E9195; /*T8*/ + border-color:#e0e0e0; + background-color:#fff; /*BG1*/ +} +.patternToolBar .patternButton a:hover { + background-color:#D6000F; /*BG2*/ + color:#FBF7E8; /*C3*/ + border-color:#D6000F; /*T4*/ +} +.patternToolBarBottom { + border-color:#E2DCC8; /*BO4*/ +} +.patternToolBar a:link .twikiAccessKey, +.patternToolBar a:visited .twikiAccessKey { + color:inherit; + border-color:#666; /*T7*/ +} +.patternToolBar a:hover .twikiAccessKey { + background-color:transparent; + color:inherit; +} + +/* Edit page */ + +.patternEditPage textarea#topic { + background-color:#fff; /*BG1*/ +} +.twikiChangeFormButton { + color:#06c; /*T2*/ + background-color:transparent; +} +.patternSig input { + color:#8E9195; /*T8*/ + background-color:#fff; /*BG1*/ +} +.patternAccessKeyInfo { + color:#666; /*T7*/ + background-color:#E8EEF7; /*BG5*/ + border-color:#BFD8ED; /*BO3*/ +} +.patternAccessKeyInfo a:link, +.patternAccessKeyInfo a:visited { + color:#06c; /*T2*/ +} +.patternAccessKeyInfo a:hover { + color:#FBF7E8; /*T3*/ +} + +/* Preview page */ + +.patternPreviewArea { + border-color:#f00; /*BO9*/ + background-color:#fff; /*BG1*/ +} + +/* WebSearch, WebSearchAdvanced */ + +table#twikiSearchTable th, +table#twikiSearchTable td { + background-color:#fff; /*BG1*/ + border-color:#ddd; /*BO7*/ +} +table#twikiSearchTable th { + color:#8E9195; /*T8*/ +} +table#twikiSearchTable td.first { + background-color:#efefef; /*BG3*/ +} + +/* ----------------------------------------------------------- + Search results + styles and overridden styles used in search.pattern.tmpl + ----------------------------------------------------------- */ + +.patternSearchResultsHeader { + background-color:#FEFBF3; /*BG9*/ + border-color:#ccc; /*BO6*/ +} +.patternSearchResults .twikiBottomRow { + border-color:#ddd; /*BO7*/ +} +.patternSearchResults .twikiAlert { + color:#f00; /*T9*/ +} +.patternSearchResults .twikiSummary .twikiAlert { + color:#900; /*C5*/ +} +.patternSearchResults .twikiNew { + background-color:#ECFADC; /*BG10*/ + border-color:#049804; /*T10*/ + color:#049804; /*T10*/ +} +.patternViewPage .patternSearchResultsBegin { + border-color:#ddd; /*BO7*/ +} + +/* Search results in book view format */ + +.patternBookViewList .twikiTopRow { + background-color:transparent; /* set to BGCOLOR in template */ + color:#666; /*T7*/ +} +.patternBookViewList .twikiTopRow a:link, +.patternBookViewList .twikiTopRow a:visited { + color:#FBF7E8; /*C3*/ +} +.patternBookViewList .twikiTopRow a:hover { + color:#06c; /*T2*/; +} +.patternBookViewList .twikiBottomRow { + border-color:#ddd; /*BO7*/ +} +.patternBookViewList .patternSearchResultCount { + color:#8E9195; /*T8*/ +} + +/* Print */ + +.patternPrintPage .patternMain { + border-color:#fff #ddd #ddd #ddd; /*BO7*/ +} +.patternPrintPage .patternContent .twikiAttachments, +.patternPrintPage .patternContent .twikiForm { + background:#fff; /*BG1*/ +} + +/* Diff */ + +tr.twikiDiffDebug td { + border-color:#ccc; /*BO6*/ +} +tr.twikiDiffDebug .twikiDiffChangedText, +tr.twikiDiffDebug .twikiDiffChangedText { + background:#99ff99; +} +/* Deleted */ +tr.twikiDiffDebug .twikiDiffDeletedMarker, +tr.twikiDiffDebug .twikiDiffDeletedText { + background-color:#f99; +} +/* Added */ +tr.twikiDiffDebug .twikiDiffAddedMarker, +tr.twikiDiffDebug .twikiDiffAddedText { + background-color:#ccf; +} +/* Unchanged */ +tr.twikiDiffDebug .twikiDiffUnchangedText { + color:#8E9195; /*T8*/ +} +/* Headers */ +.twikiDiffChangedHeader, +.twikiDiffDeletedHeader, +.twikiDiffAddedHeader { + background-color:#8E9195; /*BG11*/ +} + +/* Unchanged */ +.twikiDiffUnchangedTextContents { } +.twikiDiffLineNumberHeader { + background-color:#ddd; +} + + + + + + +/* CONFIGURE SPECIFIC */ + +ul { + margin-top:0; + margin-bottom:0; +} +.patternMain { + margin:0 3em; + border-top:0; +} +.logo { + margin:1em 0 1.5em 0; +} +.formElem { + background-color:#F3EDE7; + margin:0.5em 0; + padding:0.5em 1em; +} +.blockLinkAttribute { + margin-left:0.35em; +} +.blockLinkAttribute a:link, +.blockLinkAttribute a:visited { + text-decoration:none; +} +a.blockLink { + display:block; + padding:0.25em 1em; + border-bottom:1px solid #aaa; + text-decoration:none; +} +a:link.blockLink, +a:visited.blockLink { + text-decoration:none; +} +a:link:hover.blockLink { + text-decoration:none; +} +a:link.blockLinkOff, +a:visited.blockLinkOff { + background-color:#F3EDE7; + color:#333; + font-weight:normal; +} +a:link.blockLinkOn, +a:visited.blockLinkOn { + background-color:#b4d5ff; + color:#333; + font-weight:bold; +} +a.blockLink:hover { + background-color:#1559B3; + color:white; +} +div.explanation { + background-color:#E8EEF7; + padding:0.5em 1em; + margin:0.5em 0; +} +div.specialRemark { + background-color:#fff; + border:1px solid #ccc; + margin:0.5em; + padding:0.5em 1em; +} +div.options { + margin:1em 0; +} +div.options div.optionHeader { + padding:0.25em 1em; + background-color:#666; + color:white; + font-weight:bold; +} +div.options div.optionHeader a { + color:#bbb; + text-decoration:underline; +} +div.options div.optionHeader a:link:hover, +div.options div.optionHeader a:visited:hover { + color:#b4d5ff; /* King's blue */ + background-color:#666; + text-decoration:underline; +} +div.options .twikiSmall { + margin-left:0.5em; + color:#bbb; +} +div.foldableBlock { + border-bottom:1px solid #ccc; + border-left:1px solid #ddd; + border-right:1px solid #ddd; + height:auto; + width:auto; + overflow:auto; + padding:0.25em 0 0.5em 0; +} +.foldableBlockOpen { + display:block; +} +.foldableBlockClosed { + display:block; +} +div.foldableBlock table { + margin-bottom:1em; +} +div.foldableBlock td { + padding:0.15em 1em; + border-top:1px solid #ddd; +} +.info { + color:#666; /*T7*/ /* gray */ + background-color:#E8EEF7; /*BG5*/ /* light blue */ + margin-bottom:0.25em; + padding:0.25em 0; +} +.warn { + color:#f60; /* orange */ + background-color:#FFE8D9; /* light orange */ + border-bottom:1px solid #f60; +} +a.info, +a.warn, +a.error { + text-decoration:none; +} +.error { + color:#f00; /*T9*/ /*red*/ + background-color:#FFD9D9; /* pink */ + border-bottom:1px solid #f00; +} +.mandatory, +.mandatory input { + color:green; + background-color:#ECFADC; + font-weight: bold; +} +.mandatory { + border-bottom:1px solid green; +} +.mandatory input { + font-weight:normal; +} +.docdata { + padding-top: 1ex; + vertical-align: top; +} +.keydata { + font-weight: bold; + background-color:#FOFOFO; + vertical-align: top; +} +.subHead { + font-weight: bold; + font-style: italic; +} +.firstCol { + width: 30%; + font-weight: bold; + vertical-align: top; +} +.secondCol { +} +.hiddenRow { + display:none; +} +HERE + +my $js2 = <<'HERE'; +// +HERE + +my $hdr = CGI::start_html( + -title => 'TWiki Configuration', + -head => [ + CGI::meta({ 'http-equiv'=>'Pragma', content=>'no-cache' }), + CGI::meta({ 'http-equiv'=>'Cache-Control', content=>'no-cache' }), + CGI::meta({ 'http-equiv'=>'Expires', content=>0 }), + CGI::meta({ name=>'robots', content=>'noindex' }), + CGI::Link( { -rel=>'icon', -href=>$ENV{SCRIPT_NAME}.'?action=image;image=favicon.ico;type=image/x-icon', -type=>'image/x-icon' } ), + CGI::Link( { -rel=>'shortcut icon', -href=>$ENV{SCRIPT_NAME}.'?action=image;image=logos/favicon.ico;type=image/x-icon', -type=>'image/x-icon' } ), + CGI::script( { language => 'JavaScript', + type => 'text/javascript' }, $js1 ), + CGI::style( { -type=>'text/css' }, $css), + CGI::script( { language => 'JavaScript', + type => 'text/javascript' }, $js2 ), + ]); + +# XML confuses IE, so strip it out. This is fixed in CGI.pm 3.06. +$hdr =~ s/^<\?xml.*?>//s; +print CGI::header('text/html'), $hdr; + +my $body = ""; +$body .= CGI::img({src=>$ENV{SCRIPT_NAME}.'?action=image;image=T-logo-140x40-t.gif;type=image/gif', class=>'logo', alt=>'TWiki'}); +$body .= CGI::h1( 'Configuration'); + +my $update_disabled = 0; +my $path_to_localsite_cfg = _findFileOnPath('LocalSite.cfg'); +unless( $path_to_localsite_cfg ) { + $path_to_localsite_cfg = _findFileOnPath('TWiki.cfg') || ''; + $path_to_localsite_cfg =~ s/TWiki\.cfg/LocalSite.cfg/; +} +my $errs; +if( !$path_to_localsite_cfg || + ( $errs = _checkCanCreateFile( $path_to_localsite_cfg ))) { + $errs ||= 'Cannot locate LocalSite.cfg. Is your setting for $twikiLibPath correct in bin/LocalLib.cfg?'; + $body .= CGI::p(WARN('Save is disabled; '.$errs)); + $update_disabled = "Cannot create $path_to_localsite_cfg - are permissions correct?"; +} + +if( $action eq 'update' ) { + if( $update_disabled ) { + die ERROR( "Update is disabled $update_disabled" ); + } + $body .= handleUpdate( $path_to_localsite_cfg ); +} else { + $body .= "

Use this page to set the configuration options for TWiki. Fill in the settings, and then press 'Next'.

"; + $body .= "
"; + $body .= CGI::img({src=>$ENV{SCRIPT_NAME}.'?action=image;image=info.gif;type=image/gif', alt=>''}) . ' '; + $TWiki::cfg{ScriptUrlPath} ||= ''; + $TWiki::cfg{ScriptSuffix} ||= ''; + $TWiki::cfg{SystemWebName} ||= ''; + $body .= <If you are installing TWiki for the first time
If you just want to get up and running, the only section you need to worry about below is +General path settings. You can always come +back and configure other settings later.
+ +
+
Explanation of color codes: +
    +
  • Settings marked like this are required (they must +have a value).
  • +
  • Any errors in your configuration will be highlighted.
  • +
  • Warnings are non-fatal, but are often a good indicator that something that is wrong.
  • +
+HERE + + $body .= performSanityChecks( $brokenTWikiCfgError, $brokenLocalSiteError ); + + my $options = ''; + unless( $update_disabled ) { + $body .= CGI::start_form({ action=>$ENV{SCRIPT_NAME},method=>"post" }); + # use time to make sure we never allow cacheing + $options .= CGI::hidden( 'action', 'update' ); + $options .= CGI::hidden( 'time', time() ); + } + $options .= CGI::div({ class => 'optionHeader'}, + CGI::span({ class => 'twikiLeft' }, 'Settings' . + CGI::span({ class => 'twikiSmall' }, + 'Click the buttons below to open each section')). + CGI::span({ class => 'twikiSmall twikiRight' }, + CGI::a({ href => '#', rel => 'nofollow', + onclick => 'toggleAllOptions(true); return false;'}, 'Open all options')). + CGI::br()); + + $options .= presentReadOnlyInfo(); + + $options .= presentEditableInfo(); + + $body .= CGI::div({class=>'options', id=>'options'}, $options); + my $totwarningsMess = ($totwarnings > 1) ? ' warnings' : ' warning'; + $body .= CGI::div('Total: '.CGI::span( + {class=>'warn'}, $totwarnings . $totwarningsMess)) if $totwarnings; + my $toterrorsMess = ($toterrors > 1) ? ' errors' : ' error'; + $body .= CGI::div('Total: ' . CGI::span( + {class=>'error'}, $toterrors . $toterrorsMess)) if $toterrors; + + if( $update_disabled) { + $body .= CGI::em("Update is disabled - $update_disabled"); + } else { + $body .= CGI::p(CGI::submit(-class=>'twikiSubmit', -value=>'Next', -accesskey=>'N')); + $body .= CGI::end_form(); + } + +} +print CGI::div({class => 'patternMain'}, $body); +print CGI::end_html(); + +1; Index: bin/.htaccess.txt =================================================================== --- bin/.htaccess.txt (.../TWikiRelease04x00) (revision 9301) +++ bin/.htaccess.txt (.../DEVELOP) (revision 9301) @@ -1,17 +1,19 @@ # bin/.htaccess.txt # # Controls access to TWiki scripts - to make Apache use it, rename this -# file to '.htaccess' and REPLACE THE FOLLOWING STRINGS WHEREVER YOU SEE -# THEM IN THIS FILE WITH PATHS SPECIFIC TO YOUR INSTALLATION. -# Most required values can be seen in the Path Settings section of -# =configure=. +# file to '.htaccess' and REPLACE THE FOLLOWING STRINGS WITH PATHS +# SPECIFIC TO YOUR INSTALLATION. Most required values can be seen in the +# Path Settings section of =configure=. # -# Replace {DataDir} with the value from =configure= -# Replace {DefaultUrlHost} with the value from =configure= -# Replace {ScriptUrlPath} with the value from =configure= -# Replace {Administrators} with a space-separated list of the login -# name(s) of the person(s) allowed to run the configure script -# e.g. admin root superhero +# {DataDir} +# Get the value from =configure= +# {DefaultUrlHost} +# Get the value from =configure= +# {ScriptUrlPath} +# Get the value from =configure= +# {Administrators} +# Space-separated list of the login name(s) of the person(s) allowed +# to run the configure script # Use CGI & Perl to handle all files in 'bin' directory, i.e. run as scripts # - this should remove the need to rename files to end in '.pl' etc, Index: bin/update-develop-links =================================================================== --- bin/update-develop-links (.../TWikiRelease04x00) (revision 9301) +++ bin/update-develop-links (.../DEVELOP) (revision 9301) @@ -1,5 +1,11 @@ #!/bin/sh +# Temporary script for supporting access to commands as the apache user +# for people with shell access on develop.twiki.org. +# Must not be released! +# Remove the hack script when you are done! +# Be very, very careful! echo "Content-type: text/plain" echo "" cd /home/virtual/site2/fst/home/develop/twikisvn -perl pseudo-install.pl -link all 2>&1 +. hack 2>&1 + Index: data/Main/UserViewTemplate.txt =================================================================== --- data/Main/UserViewTemplate.txt (.../TWikiRelease04x00) (revision 9301) +++ data/Main/UserViewTemplate.txt (.../DEVELOP) (revision 9301) @@ -7,41 +7,12 @@ %TMPL:DEF{"create_topic"}%Create%TMPL:END% %TMPL:DEF{"edit_topic"}%Edit text%TMPL:END% %TMPL:DEF{"active_edit"}%%TMPL:P{context="new_topic" then="create_topic" else="edit_topic"}%%TMPL:END% -%TMPL:DEF{"helptext"}% ----- ----- ----++ Help Text - * %MAKETEXT{"[_1] - view a short introductory presentation on TWiki for beginners" args="%TWIKIWEB%.ATasteOfTWiki"}% - * %MAKETEXT{"[_1] - starting points on TWiki" args="%TWIKIWEB%.WelcomeGuest"}% - * %MAKETEXT{"[_1] - complete TWiki documentation, Quick Start to Reference" args="%TWIKIWEB%.TWikiUsersGuide"}% - * %MAKETEXT{"[_1] - try out TWiki on your own" args="Sandbox.%HOMETOPIC%"}% - * %MAKETEXT{"[_1] - just for me" args="Sandbox.%TOPIC%Sandbox"}% - ----++ Settings -%MAKETEXT{"Uncomment preferences variables to activate them (remove the #-sign). Help and details on preferences variables are available in [_1]." args="%TWIKIWEB%.%WIKIPREFSTOPIC%"}% - - * LINKTOOLTIPINFO - %MAKETEXT{"Show tool-tip topic info on mouse-over of [_1] links, on or off:" args="%TWIKIWEB%.WikiWord"}% - * EDITBOXWIDTH - %MAKETEXT{"Horizontal size of text edit box:"}% - * EDITBOXHEIGHT - %MAKETEXT{"Vertical size of text edit box:"}% - * EDITBOXSTYLE - %MAKETEXT{"Style of text edit box. =width: 99%= for full window width (default), =width: auto= to disable."}% - * ALLOWTOPICCHANGE - %MAKETEXT{"Write protect your home page: (set it to your [_1])" args="%TWIKIWEB%.WikiName"}% - ----++ %MAKETEXT{"Related Topics"}% - - * %MAKETEXT{"[_1] for changing your password" args="%TWIKIWEB%.ChangePassword"}% - * %MAKETEXT{"[_1] for changing your email address" args="%TWIKIWEB%.ChangeEmailAddress"}% - * %MAKETEXT{"[_1] has a list of other TWiki users" args="%MAINWEB%.%WIKIUSERSTOPIC%"}% - * %MAKETEXT{"[_1] is a list of TWiki user documentation" args="%TWIKIWEB%.UserDocumentationCategory"}% - * %MAKETEXT{"[_1] lists all TWiki user tools" args="%TWIKIWEB%.UserToolsCategory"}% -%TMPL:END% - %TMPL:DEF{"content"}% %TMPL:P{"form"}% %TMPL:P{context="inactive" then="inactive_form" else="active_form"}% %BR% %TEXT% -%TMPL:P{"helptext"}% #TopicEnd %TMPL:P{"attachments"}% %TMPL:P{"topicinfo"}%%TMPL:END% Index: data/Main/TWikiUsers.txt =================================================================== --- data/Main/TWikiUsers.txt (.../TWikiRelease04x00) (revision 9301) +++ data/Main/TWikiUsers.txt (.../DEVELOP) (revision 9301) @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="TWikiRegistrationAgent" date="1137835126" format="1.1" version="1.2"}% +%META:TOPICINFO{author="TWikiRegistrationAgent" date="1140723227" format="1.1" version="1.1"}% ---+ List of %WIKITOOLNAME% users Below is a list of users with accounts. If you want to edit topics or see protected areas of the site then you can get added to the list by registering: fill out the form in %TWIKIWEB%.TWikiRegistration. @@ -50,4 +50,3 @@ __Access Control:__ * Set ALLOWTOPICCHANGE = TWikiAdminGroup, TWikiRegistrationAgent - Index: data/Main/TWikiGuest.txt =================================================================== --- data/Main/TWikiGuest.txt (.../TWikiRelease04x00) (revision 9301) +++ data/Main/TWikiGuest.txt (.../DEVELOP) (revision 9301) @@ -6,3 +6,4 @@ __Related topics:__ %WIKIUSERSTOPIC%, %TWIKIWEB%.TWikiRegistration %META:PREFERENCE{name="ALLOWTOPICCHANGE" title="ALLOWTOPICCHANGE" type="Set" value="TWikiAdminGroup"}% + Index: data/TWiki/ResetPassword.txt =================================================================== --- data/TWiki/ResetPassword.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/ResetPassword.txt (.../DEVELOP) (revision 9301) @@ -10,7 +10,6 @@ %X% __%MAKETEXT{"Note:"}%__ %MAKETEXT{"you *must* have at least one valid registered e-mail to be able to reset your password. If none of your registered e-mail addresses is valid, and you have forgotten your password, contact [_1]." args="%WIKIWEBMASTER%"}%
-| %MAKETEXT{"Your [_1].LoginName" args="%TWIKIWEB%"}%: | =**= |
---+++ %MAKETEXT{"Your [_1].LoginName" args="%TWIKIWEB%"}% Index: data/TWiki/TWikiTemplates.txt =================================================================== --- data/TWiki/TWikiTemplates.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/TWikiTemplates.txt (.../DEVELOP) (revision 9301) @@ -24,7 +24,7 @@ * Directives are of the form ==%TMPL:<key>%== and ==%TMPL:<key>{"attr"}%==. * Directives: * ==%TMPL:INCLUDE{"file"}%==: Includes a template file. The file is found as described [[#FindingTemplates][below]]. - * ==%TMPL:DEF{"block"}%==: Define a block. Text between this and the =%TMPL:END%= directive is not used in-place, but is saved for later use with =%TMPL:P=. Leading and trailing whitespace is ignored. + * ==%TMPL:DEF{"block"}%==: Define a block. *All* text between this and the next =%TMPL:END%= directive is removed and saved for later use with =%TMPL:P=. * ==%TMPL:END%==: Ends a block definition. * ==%TMPL:P{"var"}%==: Includes a previously defined block. * ==%{...}%==: is a comment. Index: data/TWiki/ChangePassword.txt =================================================================== --- data/TWiki/ChangePassword.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/ChangePassword.txt (.../DEVELOP) (revision 9301) @@ -7,16 +7,14 @@ %MAKETEXT{"[_1] has a list of other TWiki users" args="%MAINWEB%.%WIKIUSERSTOPIC%"}% -| %MAKETEXT{"Your [_1].LoginName" args="%TWIKIWEB%"}%: | =**= | -| %MAKETEXT{"Current password"}%: | =**= | -| %MAKETEXT{"New password"}%: | =**= | -| %MAKETEXT{"Retype new password"}%: | =**= | -|   |    (%MAKETEXT{"Fields marked [_1] are required" args="=**="}%) |
%TABLE{databg=""}% | %MAKETEXT{"Your [_1].LoginName" args="%TWIKIWEB%"}%: | =**= | | %MAKETEXT{"Current password"}%: | =**= | +| %MAKETEXT{"New password"}%: | =**= | +| %MAKETEXT{"Retype new password"}%: | =**= | +|   |    (%MAKETEXT{"Fields marked [_1] are required" args="=**="}%) |
@@ -32,5 +30,6 @@ %MAKETEXT{"If you have any questions, please contact [_1]." args="%WIKIWEBMASTER%"}%
+__Related Topics:__ ChangeEmailAddress, AdminToolsCategory, UserToolsCategory __%MAKETEXT{"Note to administrator"}%:__ %MAKETEXT{"This form applies only if TWiki uses a {PasswordManager} that supports changing passwords. Otherwise replace this topic with a note describing how to change the password in your organization."}% %MAKETEXT{"See [_1] for more information." args="TWikiUserAuthentication"}% __%MAKETEXT{"Related topics:"}%__ ChangeEmailAddress, ResetPassword, AdminToolsCategory, UserToolsCategory Index: data/TWiki/TWikiRegistration.txt =================================================================== --- data/TWiki/TWikiRegistration.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/TWikiRegistration.txt (.../DEVELOP) (revision 9301) @@ -82,6 +82,7 @@ + @@ -215,7 +216,7 @@
%MAKETEXT{"Fields marked [_1] are required" args="=**="}%
   
Index: data/TWiki/NewUserTemplate.txt =================================================================== --- data/TWiki/NewUserTemplate.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/NewUserTemplate.txt (.../DEVELOP) (revision 9301) @@ -2,9 +2,15 @@ %SPLIT% * %KEY%: %VALUE%%SPLIT% ----++ About me +---++ My Links - * Replace this text with an introduction about yourself + * %TWIKIWEB%.ATasteOfTWiki - view a short introductory presentation on TWiki for beginners + * %TWIKIWEB%.WelcomeGuest - starting points on TWiki + * %TWIKIWEB%.TWikiUsersGuide - complete TWiki documentation, Quick Start to Reference + * Sandbox.%HOMETOPIC% - try out TWiki on your own + * Sandbox.%TOPIC%Sandbox - just for me + * + * ---++ Personal Preferences @@ -21,6 +27,68 @@ * Write protect your home page: (set it to your %TWIKIWEB%.WikiName) * #Set ALLOWTOPICCHANGE = %WIKIUSERNAME% +---++ Related Topics + + * %TWIKIWEB%.ChangePassword for changing your password + * %TWIKIWEB%.ChangeEmailAddress for changing your email address + * %MAINWEB%.%WIKIUSERSTOPIC% has a list of other TWiki users + * %TWIKIWEB%.UserDocumentationCategory is a list of TWiki user documentation + * %TWIKIWEB%.UserToolsCategory lists all TWiki user tools +%STARTSECTION{type="templateonly"}% +Note to TWiki Administrator: + +Above text is for English speaking users. If you have a multilingual wiki community you can replace the "My Links", "Personal Preferences" and "Related Topics" sections above with the localized text below. Text enclosed in %MAKETEXT will be shown in the language selected by the user. Please note that the %MAKETEXT can be quite intimidating to new users. Consider translating above text to your own language if your community uses a non-English language. (Remove all text from =%STARTSECTION{type="templateonly"}%= to =%ENDSECTION{type="templateonly"}%= when you are done) + +Text for multilingual wiki community, copy from here to %ENDSECTION{type="templateonly"}% + + +---++ %MAKETEXT{"My Links"}% + + * %MAKETEXT{"[_1] - view a short introductory presentation on TWiki for beginners" args="%TWIKIWEB%.ATasteOfTWiki"}% + * %MAKETEXT{"[_1] - starting points on TWiki" args="%TWIKIWEB%.WelcomeGuest"}% + * %MAKETEXT{"[_1] - complete TWiki documentation, Quick Start to Reference" args="%TWIKIWEB%.TWikiUsersGuide"}% + * %MAKETEXT{"[_1] - try out TWiki on your own" args="Sandbox.%HOMETOPIC%"}% + * %MAKETEXT{"[_1] - just for me" args="Sandbox.%TOPIC%Sandbox"}% + * + * + +---++ %MAKETEXT{"Personal Preferences"}% + +%MAKETEXT{"Uncomment preferences variables to activate them (remove the #-sign). Help and details on preferences variables are available in [_1]." args="%TWIKIWEB%.%WIKIPREFSTOPIC%"}% + + * %MAKETEXT{"Show tool-tip topic info on mouse-over of [_1] links, on or off:" args="%TWIKIWEB%.WikiWord"}% + * #Set LINKTOOLTIPINFO = off + * %MAKETEXT{"Horizontal size of text edit box:"}% + * #Set EDITBOXWIDTH = 70 + * %MAKETEXT{"Vertical size of text edit box:"}% + * #Set EDITBOXHEIGHT = 22 + * %MAKETEXT{"Style of text edit box. =width: 99%= for full window width (default), =width: auto= to disable."}% + * #Set EDITBOXSTYLE = width: 99% + * %MAKETEXT{"Write protect your home page: (set it to your [_1])" args="%TWIKIWEB%.WikiName"}% + * Set ALLOWTOPICCHANGE = %WIKIUSERNAME% + +---++ %MAKETEXT{"Related Topics"}% + + * %MAKETEXT{"[_1] for changing your password" args="%TWIKIWEB%.ChangePassword"}% + * %MAKETEXT{"[_1] for changing your email address" args="%TWIKIWEB%.ChangeEmailAddress"}% + * %MAKETEXT{"[_1] has a list of other TWiki users" args="%MAINWEB%.%WIKIUSERSTOPIC%"}% + * %MAKETEXT{"[_1] is a list of TWiki user documentation" args="%TWIKIWEB%.UserDocumentationCategory"}% + * %MAKETEXT{"[_1] lists all TWiki user tools" args="%TWIKIWEB%.UserToolsCategory"}% + +%ENDSECTION{type="templateonly"}% %META:FORM{name="%MAINWEB%.UserForm"}% %META:FIELD{name="FirstName" attributes="" title="FirstName" value=""}% %META:FIELD{name="LastName" attributes="" title="LastName" value=""}% Index: data/TWiki/ManagingUsers.txt =================================================================== --- data/TWiki/ManagingUsers.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/ManagingUsers.txt (.../DEVELOP) (revision 9301) @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="$Rev:$"}% +%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="$Rev$"}% %TOC% %STARTINCLUDE% ---# Manage Users Index: data/TWiki/AdminSkillsAssumptions.txt =================================================================== --- data/TWiki/AdminSkillsAssumptions.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/AdminSkillsAssumptions.txt (.../DEVELOP) (revision 9301) @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="$Rev:$"}% +%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="$Rev$"}% %META:TOPICPARENT{name="TWikiInstallationGuide"}% ---+ Administrator Skills Assumptions Index: data/TWiki/CascadingStyleSheets.txt =================================================================== --- data/TWiki/CascadingStyleSheets.txt (.../TWikiRelease04x00) (revision 0) +++ data/TWiki/CascadingStyleSheets.txt (.../DEVELOP) (revision 9301) @@ -0,0 +1,4 @@ +%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="$Rev: 8906 $"}% +%META:TOPICPARENT{name="WebHome"}% + +This topic is a placeholder where stylesheets are attached. Index: data/TWiki/TWikiReleaseNotes04x00x00.txt =================================================================== --- data/TWiki/TWikiReleaseNotes04x00x00.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/TWikiReleaseNotes04x00x00.txt (.../DEVELOP) (revision 9301) @@ -220,8 +220,9 @@ New optional features include {AutoAttachPubFiles} and {EnableHierarchicalWebs}. Both are switched off by default but can be enabled in =configure=. ---++++ Improved support for shorter URLs -See TWiki:TWiki.ShorterURLCookbook +See TWiki:TWiki.ShorterUrlCookbook + ---+++ Preferences There have been some significant changes to the handling of preferences, aimed at making them more logical, consistent and easy to use. Index: data/TWiki/TWikiUserAuthentication.txt =================================================================== --- data/TWiki/TWikiUserAuthentication.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/TWikiUserAuthentication.txt (.../DEVELOP) (revision 9301) @@ -145,7 +145,7 @@ #ChangingPasswords ---++ Changing Passwords -If your {PasswordManager} supports password changing, you can change and reset passwords using forms on regular pages. +If your {PasswordManager} supports password changing (e.g. TWiki::Users::HtPasswdUser), you can change and reset passwords using forms on regular pages. * The ChangePassword form ( ==TWiki/ChangePassword== ) * The ResetPassword form ( ==TWiki/ResetPassword== ) Index: data/TWiki/TWikiScripts.txt =================================================================== --- data/TWiki/TWikiScripts.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/TWikiScripts.txt (.../DEVELOP) (revision 9301) @@ -154,7 +154,7 @@ | rev1 | the higher revision | | | rev2 | the lower revision | | | render | the rendering style {sequential, sidebyside, raw, debug} | DIFFRENDERSTYLE, =sequential= | -| type | history, diff, last} history diff, version to version, last version to previous | =diff= | +| type | {history, diff, last} history diff, version to version, last version to previous | =diff= | | context | number of lines of context | | TODO: * add a {word} render style Index: data/TWiki/TWikiVariablesQuickStart.txt =================================================================== --- data/TWiki/TWikiVariablesQuickStart.txt (.../TWikiRelease04x00) (revision 9301) +++ data/TWiki/TWikiVariablesQuickStart.txt (.../DEVELOP) (revision 9301) @@ -1,29 +0,0 @@ -%META:TOPICINFO{author="MeredithLesly" date="1142354264" format="1.1" version="1.2"}% ----++ TWiki Variables Quickstart - -%STARTINCLUDE% - -TWiki Variables are names that are enclosed in percent signs =%= that are expanded on the fly. Some variables take arguments, such as =%INCLUDE%=. For those variables, the arguments are included in curly braces ({ and }). - -| *Variable* | *In brief* | *Full documentation* | -| =%TOC%= | Automatically generates a table of contents based on headings in a topic - see the top of this page for an example. |VarTOC | -| =%WEB%= | The current web, is %WEB%. | VarWEB | -| =%TOPIC%= | The current topic name, is %TOPIC%. | VarTOPIC | -| =%ATTACHURL%= | The attachment URL of the current topic. Example usage: If you attach a file to a topic you can refer to it as =%ATTACHURL%/image.gif= to show the URL of the file or the image in your text. | VarATTACHURL | -| =%INCLUDE{"SomeTopic"}%= | Server side include, includes another topic. The current web is the default web. Example: =%INCLUDE{"%TWIKIWEB%.SiteMap"}%= | VarINCLUDE | -| =%SEARCH{"sushi"}%= | Inline search showing the search result embedded in a topic. FormattedSearch gives you control over formatting, useful for creating web-based applications. | VarSEARCH | - -TWikiPreferences defines some site-wide variables. Among them are: - * *Line break:* Write =%BR%= to start a new line. - * *Colored text:* Write: =%RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors= to get: %RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors. - -There are many more variables. To see them all, go to *[[TWikiVariables]]*. - -*Documentation Graphics:* There are many graphics available to use in your topics. Use =%ICON{"help"}%=, =%ICON{"tip"|%=, and =%icon{"warning"}%= to get: %H%, %T%, and %X%. To see all of the graphics available, see TWikiDocGraphics. - - -%ICON{"tip"}% To "escape" a variable, prefix it with an exclamation mark. Write: =!%SOMEVARIABLE%= to get: !%SOMEVARIABLE%. -%STOPINCLUDE% - - -%META:TOPICMOVED{by="MeredithLesly" date="1142354264" from="TWiki.TWikiVariableQuickStart" to="TWiki.TWikiVariablesQuickStart"}% Index: data/Sandbox/WebPreferences.txt =================================================================== --- data/Sandbox/WebPreferences.txt (.../TWikiRelease04x00) (revision 9301) +++ data/Sandbox/WebPreferences.txt (.../DEVELOP) (revision 9301) @@ -20,7 +20,7 @@ * [[%TWIKIWEB%.WebTopicEditTemplate]]: Site-level default topic template * Comma separated list of *forms* that can be attached to topics in this web. See %TWIKIWEB%.TWikiForms for more information. - * Set WEBFORMS = %MAINWEB%.UserForm + * Set WEBFORMS = * Users or groups who __are not__ / __are__ allowed to __view__ / __change__ / __rename__ topics in the %WEB% web: (See %TWIKIWEB%.TWikiAccessControl). Remove the # to enable any of these settings. Remember that an empty setting is a valid setting; setting DENYWEBVIEW to nothing means that anyone can view the web. * #Set DENYWEBVIEW = Index: index.html =================================================================== --- index.html (.../TWikiRelease04x00) (revision 9301) +++ index.html (.../DEVELOP) (revision 9301) @@ -153,9 +153,9 @@

Note: These pages do not need to be accessible by browsers. Preventing access will increase security and will not affect TWiki in any way.

Index: pseudo-install.pl =================================================================== --- pseudo-install.pl (.../TWikiRelease04x00) (revision 9301) +++ pseudo-install.pl (.../DEVELOP) (revision 9301) @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!perl use strict; use File::Path; @@ -36,7 +36,7 @@ my $module = shift; print "Processing $module\n"; my $subdir = 'Plugins'; - $subdir = 'Contrib' if $module =~ /(Contrib|Skin)$/; + $subdir = 'Contrib' if $module =~ /(Contrib|Skin|AddOn)$/; my $moduleDir = "twikiplugins/$module/"; unless (-d $moduleDir) { @@ -58,7 +58,7 @@ } close(F); } else { - print STDERR "---> No MANIFEST in $module\n"; + print STDERR "---> No MANIFEST in $module (at $manifest)\n"; } } Index: mklinks.sh =================================================================== --- mklinks.sh (.../TWikiRelease04x00) (revision 9301) +++ mklinks.sh (.../DEVELOP) (revision 9301) @@ -1,115 +0,0 @@ -#!/bin/sh -# Usage: -# mklinks.sh [-cp|-echo] ... -# Make links from the core into twikiplugins, to pseudo-install these -# components into a subversion checkout area. Default is to process -# all plugins and contribs, or you can do just a subset. Default behaviour -# is to skip a link if there is an existing file in the way. You can also -# request a cp instead of ln -s, which will stomp existing files. -# -cp - copy files from the twikiplugins area instead of linking them. -# DESTROYS THE EXISTING INSTALL OF THE PLUGIN EVEN IF FILES HAVE CHANGED -# -echo - just print the names of files that would be linked/copied -# ... list of plugins and contribs to link into the core. -# Example: CommentPlugin RenderListPlugin JSCalendarContrib -# Optional, defaults to all plugins and contribs. -shopt -s nullglob - -function mklink () { - link=`echo $1 | sed -e 's#twikiplugins/[A-Za-z0-9]*/##'` - if [ -L $link ]; then - # Always kill links - $destroy $link - fi - if [ x$wipeout = x -a -e $link ]; then - # If we are linking, and there's a file in the way, check - # if it is different - x=`diff -q $1 $link` - if [ "$x" = "" ]; then - $destroy $link - else - echo "diff $1 $link different - Keeping $link intact" - fi - else - target=`dirname $link | sed -e 's/[^\/][^\/]*/../g'` - # if wipeout is 1, will simply overwrite whatever is already there - $build $target/$1 $link - fi -} - -# Main program -if [ "$1" = "-cp" ]; then - shift; - # must be -r to catch dirs - build="cp -rf" - destroy="rm -rf" - # set wipeout to always overwrite existing installed files - wipeout=1 -elif [ "$1" = "-echo" ]; then - shift; - build="echo" - destroy="echo" -else - build="ln -s" - destroy="rm" -wipeout=1 -fi - -# examine remaining params -params="" -for param in $* ; do - params="$params twikiplugins/$param" -done - -# default is to do all plugins and contribs -if [ "$params" = "" ]; then - for param in twikiplugins/*Contrib ; do - params="$params $param" - done - for param in twikiplugins/*Plugin ; do - params="$params $param" - done -fi - -for dir in $params; do - module=`basename $dir` - - # pub dir - if [ -d $dir/pub/TWiki/$module ]; then - mklink $dir/pub/TWiki/$module - fi - for pubdir in $dir/pub/*; do - if [ ! -e pub/`basename $pubdir` ]; then - mklink $pubdir - fi - done - - # lib dir - for type in Plugins Contrib; do - if [ -d $dir/lib/TWiki/$type/$module ]; then - mklink $dir/lib/TWiki/$type/$module - fi - for pm in $dir/lib/TWiki/$type/*.pm; do - mklink $dir/lib/TWiki/$type/*.pm - done - done - - # data dir - if [ -d $dir/data/TWiki ]; then - for txt in $dir/data/TWiki/*.txt; do - mklink $txt - done - fi - - # templates dir - if [ -d $dir/templates ]; then - for tmpl in $dir/templates/*.tmpl; do - mklink $tmpl - done - fi - - # unit tests dir - if [ -d $dir/test/unit/$module ]; then - mklink $dir/test/unit/$module - fi -done -