type => "string",
default => "$installdir/share/ikiwiki/templates",
description => "location of template files",
+ advanced => 1,
safe => 0, # path
rebuild => 1,
},
type => "string",
default => "$installdir/share/ikiwiki/basewiki",
description => "base wiki source location",
+ advanced => 1,
safe => 0, # path
rebuild => 0,
},
type => "string",
default => '%c',
description => "strftime format string to display date",
+ advanced => 1,
safe => 1,
rebuild => 1,
},
default => undef,
example => "en_US.UTF-8",
description => "UTF-8 locale to use",
+ advanced => 1,
safe => 0,
rebuild => 1,
},
type => "boolean",
default => 0,
description => "only send cookies over SSL connections?",
+ advanced => 1,
safe => 1,
rebuild => 0,
},
type => "boolean",
default => 0,
description => "attempt to hardlink source files? (optimisation for large files)",
+ advanced => 1,
safe => 0, # paranoia
rebuild => 0,
},
description => "",
example => "022",
description => "force ikiwiki to use a particular umask",
+ advanced => 1,
safe => 0, # paranoia
rebuild => 0,
},
default => "",
example => "$ENV{HOME}/.ikiwiki/",
description => "extra library and plugin directory",
+ advanced => 1,
safe => 0, # directory
rebuild => 0,
},
default => undef,
example => '\.wav$',
description => "regexp of source files to ignore",
+ advanced => 1,
safe => 0, # regexp
rebuild => 1,
},
type => "string",
example => '%X, %B %o, %Y',
description => "format to use to display date",
+ advanced => 1,
safe => 1,
rebuild => 1,
},
type => "string",
example => "3",
description => "Text::Typography attributes value",
+ advanced => 1,
safe => 1,
rebuild => 1,
},
# XXX hashes not handled yet
next if ref $config{$key} && ref $config{$key} eq 'HASH' || ref $info{example} eq 'HASH';
# maybe skip unsafe settings
- next if ! $info{safe} && ! $config{websetup_show_unsafe};
+ next if ! $info{safe} && ! ($config{websetup_show_unsafe} && $config{websetup_advanced});
+ # maybe skip advanced settings
+ next if $info{advanced} && ! $config{websetup_advanced};
# these are handled specially, so don't show
next if $key eq 'add_plugins' || $key eq 'disable_plugins';
template => {type => 'div'},
stylesheet => IkiWiki::baseurl()."style.css",
);
- my $buttons=["Save Setup", "Cancel"];
+
+ if ($form->submitted eq 'Basic') {
+ $form->field(name => "showadvanced", type => "hidden",
+ value => 0, force => 1);
+ }
+ elsif ($form->submitted eq 'Advanced') {
+ $form->field(name => "showadvanced", type => "hidden",
+ value => 1, force => 1);
+ }
+ my $advancedtoggle;
+ if ($form->field("showadvanced")) {
+ $config{websetup_advanced}=1;
+ $advancedtoggle="Basic";
+ }
+ else {
+ $config{websetup_advanced}=0;
+ $advancedtoggle="Advanced";
+ }
+
+ my $buttons=["Save Setup", $advancedtoggle, "Cancel"];
IkiWiki::decode_form_utf8($form);
IkiWiki::run_hooks(formbuilder_setup => sub {
option_foo => {
type => "boolean",
description => "enable foo",
+ advanced => 1,
safe => 1,
rebuild => 1,
},
* `description` is a short description of the option.
* `link` is a link to further information about the option. This can either
be a wikilink, or an url.
+* `advanced` can be set to true if the option is more suitable for advanced
+ users.
* `safe` should be false if the option should not be displayed in unsafe
configuration methods, such as the web interface. Anything that specifies
a command to run, a path on disk, or a regexp should be marked as unsafe.
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-02 15:27-0400\n"
+"POT-Creation-Date: 2008-08-03 14:48-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "You are banned."
msgstr ""
-#: ../IkiWiki/CGI.pm:783 ../IkiWiki/CGI.pm:784 ../IkiWiki.pm:1096
+#: ../IkiWiki/CGI.pm:783 ../IkiWiki/CGI.pm:784 ../IkiWiki.pm:1108
msgid "Error"
msgstr ""
msgid "Failed to delete file from S3: "
msgstr ""
-#: ../IkiWiki/Plugin/attachment.pm:46
+#: ../IkiWiki/Plugin/attachment.pm:42
#, perl-format
msgid "there is already a page named %s"
msgstr ""
-#: ../IkiWiki/Plugin/attachment.pm:79
+#: ../IkiWiki/Plugin/attachment.pm:75
msgid "prohibited by allowed_attachments"
msgstr ""
-#: ../IkiWiki/Plugin/attachment.pm:187
+#: ../IkiWiki/Plugin/attachment.pm:183
msgid "bad attachment filename"
msgstr ""
-#: ../IkiWiki/Plugin/attachment.pm:229
+#: ../IkiWiki/Plugin/attachment.pm:225
msgid "attachment upload"
msgstr ""
msgid "failed to run dot"
msgstr ""
-#: ../IkiWiki/Plugin/lockedit.pm:43 ../IkiWiki/Plugin/lockedit.pm:57
+#: ../IkiWiki/Plugin/lockedit.pm:42 ../IkiWiki/Plugin/lockedit.pm:56
#, perl-format
msgid "%s is locked and cannot be edited"
msgstr ""
msgid "%A night"
msgstr ""
-#: ../IkiWiki/Plugin/prettydate.pm:96
+#: ../IkiWiki/Plugin/prettydate.pm:97
msgid "at teatime on %A"
msgstr ""
-#: ../IkiWiki/Plugin/prettydate.pm:100
+#: ../IkiWiki/Plugin/prettydate.pm:101
msgid "at midnight"
msgstr ""
-#: ../IkiWiki/Plugin/prettydate.pm:103
+#: ../IkiWiki/Plugin/prettydate.pm:104
msgid "at noon on %A"
msgstr ""
msgid "failed to generate image from code"
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:120
-msgid "you are not logged in as an admin"
+#: ../IkiWiki/Plugin/websetup.pm:85
+msgid "plugin"
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:149
+#: ../IkiWiki/Plugin/websetup.pm:85
msgid "main"
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:158
-msgid "plugin"
+#: ../IkiWiki/Plugin/websetup.pm:170
+msgid ""
+"Note: Disabled options cannot be configured here, but only by editing the "
+"setup file."
+msgstr ""
+
+#: ../IkiWiki/Plugin/websetup.pm:198
+#, perl-format
+msgid "enable %s?"
+msgstr ""
+
+#: ../IkiWiki/Plugin/websetup.pm:212
+msgid "you are not logged in as an admin"
+msgstr ""
+
+#: ../IkiWiki/Plugin/websetup.pm:266
+msgid "other plugins"
+msgstr ""
+
+#: ../IkiWiki/Plugin/websetup.pm:317
+msgid ""
+"The configuration changes shown below require a wiki rebuild to take effect."
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:168
+#: ../IkiWiki/Plugin/websetup.pm:329
msgid "Setup saved."
msgstr ""
msgid "refreshing wiki.."
msgstr ""
-#: ../IkiWiki.pm:417
+#: ../IkiWiki.pm:427
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
-#: ../IkiWiki.pm:461
+#: ../IkiWiki.pm:471
msgid "cannot use multiple rcs plugins"
msgstr ""
-#: ../IkiWiki.pm:1079
+#: ../IkiWiki.pm:1091
#, perl-format
msgid "preprocessing loop detected on %s at depth %i"
msgstr ""
-#: ../IkiWiki.pm:1567
+#: ../IkiWiki.pm:1579
msgid "yes"
msgstr ""