summaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-12-30 18:24:36 +0100
committerintrigeri <intrigeri@boum.org>2008-12-30 18:24:36 +0100
commit21add7ffa87a5e622d18bdbb24c638c15bdb3800 (patch)
tree6780aa6dbee71f18db64e44b012e789fc8197d4b /doc/todo
parent3190e5cea75a43d38f58b8a45fbc87d5527d18f0 (diff)
parent3032909090711c86c5056987043eeff5a1f6aec2 (diff)
Merge commit 'upstream/master' into prv/po
Conflicts: debian/control debian/copyright doc/ikiwiki/pagespec.mdwn Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn14
-rw-r--r--doc/todo/Add_camelcase_exclusions.mdwn23
-rw-r--r--doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn2
-rw-r--r--doc/todo/Allow_change_of_wiki_file_types.mdwn8
-rw-r--r--doc/todo/Allow_disabling_edit_and_preferences_links.mdwn48
-rw-r--r--doc/todo/Allow_edittemplate_to_set_file_type.mdwn8
-rw-r--r--doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn8
-rw-r--r--doc/todo/Default_text_for_new_pages.mdwn8
-rw-r--r--doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn2
-rw-r--r--doc/todo/Improve_display_of_OpenIDs.mdwn5
-rw-r--r--doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn2
-rw-r--r--doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn10
-rw-r--r--doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn12
-rw-r--r--doc/todo/Silence_monotone_warning.mdwn2
-rw-r--r--doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn4
-rw-r--r--doc/todo/Wrapper_config_with_multiline_regexp.mdwn4
-rw-r--r--doc/todo/add_forward_age_sorting_option_to_inline.mdwn2
-rw-r--r--doc/todo/apache_404_ErrorDocument_handler.mdwn18
-rw-r--r--doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn20
-rw-r--r--doc/todo/blogpost_plugin.mdwn20
-rw-r--r--doc/todo/bzr.mdwn28
-rw-r--r--doc/todo/cas_authentication.mdwn14
-rw-r--r--doc/todo/clear_page_to_delete.mdwn4
-rw-r--r--doc/todo/color_plugin.mdwn20
-rw-r--r--doc/todo/comments.mdwn149
-rw-r--r--doc/todo/darcs.mdwn26
-rw-r--r--doc/todo/datearchives-plugin.mdwn8
-rw-r--r--doc/todo/different_search_engine.mdwn40
-rw-r--r--doc/todo/directive_docs.mdwn12
-rw-r--r--doc/todo/enable-htaccess-files.mdwn2
-rw-r--r--doc/todo/format_escape.mdwn16
-rw-r--r--doc/todo/fortune:_select_options_via_environment.mdwn4
-rw-r--r--doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn9
-rw-r--r--doc/todo/httpauth_feature_parity_with_passwordauth.mdwn21
-rw-r--r--doc/todo/index.html_allowed.mdwn10
-rw-r--r--doc/todo/inline:_numerical_ordering_by_title.mdwn22
-rw-r--r--doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn29
-rw-r--r--doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn7
-rw-r--r--doc/todo/language_definition_for_the_meta_plugin.mdwn4
-rw-r--r--doc/todo/location_of_external_plugins.mdwn24
-rw-r--r--doc/todo/location_of_ikiwiki-w3m.cgi.mdwn3
-rw-r--r--doc/todo/mbox.mdwn3
-rw-r--r--doc/todo/meta_rcsid.mdwn2
-rw-r--r--doc/todo/missingparents.pm.mdwn44
-rw-r--r--doc/todo/modify_page_filename_in_plugin.mdwn6
-rw-r--r--doc/todo/need_global_renamepage_hook.mdwn53
-rw-r--r--doc/todo/pagespec_relative_to_a_target.mdwn16
-rw-r--r--doc/todo/provide_sha1_for_git_diffurl.mdwn2
-rw-r--r--doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn2
-rw-r--r--doc/todo/require_CAPTCHA_to_edit.mdwn22
-rw-r--r--doc/todo/source_link.mdwn16
-rw-r--r--doc/todo/structured_page_data.mdwn50
-rw-r--r--doc/todo/support_creole_markup.mdwn2
-rw-r--r--doc/todo/supporting_comments_via_disussion_pages.mdwn17
-rw-r--r--doc/todo/syntax_highlighting.mdwn12
-rw-r--r--doc/todo/tidy_git__39__s_ctime_debug_output.mdwn2
-rw-r--r--doc/todo/tmplvars_plugin.mdwn12
-rw-r--r--doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn3
-rw-r--r--doc/todo/tracking_bugs_with_dependencies.mdwn58
-rw-r--r--doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn6
-rw-r--r--doc/todo/using_meta_titles_for_parentlinks.html8
-rw-r--r--doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn8
62 files changed, 707 insertions, 309 deletions
diff --git a/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn b/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn
index c908f57c8..8ecdf36d0 100644
--- a/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn
+++ b/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn
@@ -44,7 +44,7 @@ regenerate this one against that).
%config %links %renderedfiles %pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
our $version="2.1";my $installdir="/usr";
- @@ -70,6 +70,7 @@ sub defaultconfig () { #{{{
+ @@ -70,6 +70,7 @@ sub defaultconfig () {
plugin => [qw{mdwn inline htmlscrubber passwordauth openid signinedit
lockedit conditional}],
timeformat => '%c',
@@ -52,27 +52,27 @@ regenerate this one against that).
locale => undef,
sslcookie => 0,
httpauth => 0,
- @@ -447,6 +448,15 @@ sub displaytime ($) { #{{{
+ @@ -447,6 +448,15 @@ sub displaytime ($) {
$config{timeformat}, localtime($time)));
- } #}}}
+ }
- +sub displaydate ($) { #{{{
+ +sub displaydate ($) {
+ my $time=shift;
+
+ # strftime doesn't know about encodings, so make sure
+ # its output is properly treated as utf8
+ return decode_utf8(POSIX::strftime(
+ $config{dateformat}, localtime($time)));
- +} #}}}
+ +}
+
- sub beautify_url ($) { #{{{
+ sub beautify_url ($) {
my $url=shift;
diff --git a/Plugin/inline.pm b/Plugin/inline.pm
index 8f6ab51..7bd6147 100644
--- a/Plugin/inline.pm
+++ b/Plugin/inline.pm
- @@ -148,6 +148,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -148,6 +148,7 @@ sub preprocess_inline (@) {
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
$template->param(title => pagetitle(basename($page)));
$template->param(ctime => displaytime($pagectime{$page}));
diff --git a/doc/todo/Add_camelcase_exclusions.mdwn b/doc/todo/Add_camelcase_exclusions.mdwn
new file mode 100644
index 000000000..6b86132a0
--- /dev/null
+++ b/doc/todo/Add_camelcase_exclusions.mdwn
@@ -0,0 +1,23 @@
+Camelcase currently looks for any and call camelcase words and turns them into wiki links. This patch adds a config item called <code>camelcase_ignore</code> which is an array of camelcase words to ignore.
+
+<pre>
+--- /usr/share/perl5/IkiWiki/Plugin/camelcase.pm.orig 2008-12-24 11:49:14.000000000 +1300
++++ /usr/share/perl5/IkiWiki/Plugin/camelcase.pm 2008-12-24 12:02:21.000000000 +1300
+@@ -33,7 +33,11 @@
+ my $destpage=$params{destpage};
+
+ $params{content}=~s{$link_regexp}{
+- htmllink($page, $destpage, IkiWiki::linkpage($1))
++ if (grep {/$1/} @{ $config{'camelcase_ignore'} }) {
++ $1
++ } else {
++ htmllink($page, $destpage, IkiWiki::linkpage($1))
++ }
+ }eg;
+
+ return $params{content};
+</pre>
+
+--[[puck]]
+
+[[done]]
diff --git a/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn b/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn
index 222cd8c46..6b9fa0535 100644
--- a/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn
+++ b/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn
@@ -12,7 +12,7 @@ This patch allows IkiWiki to work with either of the two:
--- IkiWiki/Plugin/mdwn.pm.orig 2008-03-08 11:33:50.000000000 +0100
+++ IkiWiki/Plugin/mdwn.pm 2008-03-08 13:37:21.000000000 +0100
- @@ -28,14 +28,20 @@ sub htmlize (@) { #{{{
+ @@ -28,14 +28,20 @@ sub htmlize (@) {
$markdown_sub=\&Markdown::Markdown;
}
else {
diff --git a/doc/todo/Allow_change_of_wiki_file_types.mdwn b/doc/todo/Allow_change_of_wiki_file_types.mdwn
index 8a398f2e0..19574b175 100644
--- a/doc/todo/Allow_change_of_wiki_file_types.mdwn
+++ b/doc/todo/Allow_change_of_wiki_file_types.mdwn
@@ -12,7 +12,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
index 527ee88..123b772 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
- @@ -43,7 +43,7 @@ sub check_canrename ($$$$$$$) { #{{{
+ @@ -43,7 +43,7 @@ sub check_canrename ($$$$$$$) {
# Dest checks can be omitted by passing undef.
if (defined $dest) {
@@ -21,7 +21,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
error(gettext("no change to the file name was specified"));
}
- @@ -54,7 +54,7 @@ sub check_canrename ($$$$$$$) { #{{{
+ @@ -54,7 +54,7 @@ sub check_canrename ($$$$$$$) {
}
# Must not be a known source file.
@@ -30,7 +30,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
error(sprintf(gettext("%s already exists"),
htmllink("", "", $dest, noimageinline => 1)));
}
- @@ -97,6 +97,24 @@ sub rename_form ($$$) { #{{{
+ @@ -97,6 +97,24 @@ sub rename_form ($$$) {
$f->field(name => "do", type => "hidden", value => "rename", force => 1);
$f->field(name => "page", type => "hidden", value => $page, force => 1);
$f->field(name => "new_name", value => IkiWiki::pagetitle($page), size => 60);
@@ -55,7 +55,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
$f->field(name => "attachment", type => "hidden");
return $f, ["Rename", "Cancel"];
- @@ -223,12 +241,19 @@ sub sessioncgi ($$) { #{{{
+ @@ -223,12 +241,19 @@ sub sessioncgi ($$) {
my $dest=IkiWiki::possibly_foolish_untaint(IkiWiki::titlepage($q->param("new_name")));
# The extension of dest is the same as src if it's
diff --git a/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn b/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn
new file mode 100644
index 000000000..1188d1ab2
--- /dev/null
+++ b/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn
@@ -0,0 +1,48 @@
+This patch allows disabling the edit and preferences link in the config file. It is backwards compatible (so peoples edit and preferences links won't suddenly vanish).
+
+To disable edit or prefs respectively, add the following to the config file:
+
+<pre>
+ 'edit' => 0,
+ 'prefs' => 0,
+</pre>
+
+Patch:
+<pre>
+--- /usr/share/perl5/IkiWiki/Render.pm.orig 2008-12-23 16:49:00.000000000 +1300
++++ /usr/share/perl5/IkiWiki/Render.pm 2008-12-23 16:55:40.000000000 +1300
+@@ -80,8 +80,10 @@
+ my $actions=0;
+
+ if (length $config{cgiurl}) {
+- $template->param(editurl => cgiurl(do => "edit", page => $page));
+- $template->param(prefsurl => cgiurl(do => "prefs"));
++ $template->param(editurl => cgiurl(do => "edit", page => $page))
++ if ! defined $config{edit} || (defined $config{edit} && $config{edit} == 1);
++ $template->param(prefsurl => cgiurl(do => "prefs"))
++ if ! defined $config{prefs} || (defined $config{prefs} && $config{prefs} == 1);
+ $actions++;
+ }
+
+</pre>
+
+> On irc, you said, "That was to allow the hack to of using wikistatedir to
+> allow me to generate two websites, one with inline editting, the other a
+> static page for public consumption."
+>
+> The edit and preferences links can already be disabled by editing
+> `page.tmpl`. (Look for PREFSURL and EDITURL).
+>
+> More to the point though, disabling those links does not disable anyone
+> consticting the urls by hand and logging in and editing a page. So you'd
+> really want to disable the editpage plugin in the setup file for the
+> public, static wiki. Sounds like you might also want to turn off cgi
+> entirely for that build. --[[Joey]]
+
+>> I want to retain the same page.tmpl for both sites (different templates
+>> will just increase the maintenance hell), so disabling the links in the
+>> config for one public site works better in my case.
+>>
+>> I do have the editpage plugin disabled for the public static wiki, but
+>> the link still appears on the site. I want to keep the cgi on, so that
+>> the site is still searchable. --[[puck]]
diff --git a/doc/todo/Allow_edittemplate_to_set_file_type.mdwn b/doc/todo/Allow_edittemplate_to_set_file_type.mdwn
index b49968c18..1b99a4e05 100644
--- a/doc/todo/Allow_edittemplate_to_set_file_type.mdwn
+++ b/doc/todo/Allow_edittemplate_to_set_file_type.mdwn
@@ -14,7 +14,7 @@ edittemplate there. --[[Joey]]
index 98308de..c381940 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
- @@ -56,8 +56,14 @@ sub preprocess (@) { #{{{
+ @@ -56,8 +56,14 @@ sub preprocess (@) {
$pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
@@ -28,10 +28,10 @@ edittemplate there. --[[Joey]]
+
+ return sprintf(gettext("edittemplate: %s registered for %s"),
+ $linkHTML, $params{match});
- } # }}}
+ }
- sub formbuilder (@) { #{{{
- @@ -89,6 +95,9 @@ sub formbuilder (@) { #{{{
+ sub formbuilder (@) {
+ @@ -89,6 +95,9 @@ sub formbuilder (@) {
if (pagespec_match($p, $pagespec, location => $registering_page)) {
$form->field(name => "editcontent",
value => filltemplate($pagestate{$registering_page}{edittemplate}{$pagespec}, $page));
diff --git a/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn b/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn
index 73157a326..95c38f794 100644
--- a/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn
+++ b/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn
@@ -8,9 +8,9 @@ This patch adds function bestdir() which returns best directory from the directo
+++ IkiWiki.pm (working copy)
@@ -391,6 +391,35 @@
return "";
- } #}}}
+ }
- +sub bestdir ($$) { #{{{
+ +sub bestdir ($$) {
+ my $page=shift;
+ my $link=shift;
+ my $cwd=$page;
@@ -37,9 +37,9 @@ This patch adds function bestdir() which returns best directory from the directo
+ }
+
+ return "";
- +} #}}}
+ +}
+
- sub isinlinableimage ($) { #{{{
+ sub isinlinableimage ($) {
my $file=shift;
----
diff --git a/doc/todo/Default_text_for_new_pages.mdwn b/doc/todo/Default_text_for_new_pages.mdwn
index 4a17bbf8b..a904f8287 100644
--- a/doc/todo/Default_text_for_new_pages.mdwn
+++ b/doc/todo/Default_text_for_new_pages.mdwn
@@ -15,7 +15,7 @@ Inline below is a [[patch]] that implements this:
index bb21ed2..10c985c 100644
--- a/IkiWiki/Plugin/editpage.pm
+++ b/IkiWiki/Plugin/editpage.pm
- @@ -60,7 +60,7 @@ sub cgi_editpage ($$) { #{{{
+ @@ -60,7 +60,7 @@ sub cgi_editpage ($$) {
decode_cgi_utf8($q);
@@ -24,7 +24,7 @@ Inline below is a [[patch]] that implements this:
my @buttons=("Save Page", "Preview", "Cancel");
eval q{use CGI::FormBuilder};
error($@) if $@;
- @@ -117,9 +117,20 @@ sub cgi_editpage ($$) { #{{{
+ @@ -117,9 +117,20 @@ sub cgi_editpage ($$) {
}
else {
$type=$form->param('type');
@@ -45,7 +45,7 @@ Inline below is a [[patch]] that implements this:
elsif (defined $from && exists $pagesources{$from}) {
# favor the type of linking page
$type=pagetype($pagesources{$from});
- @@ -129,7 +140,7 @@ sub cgi_editpage ($$) { #{{{
+ @@ -129,7 +140,7 @@ sub cgi_editpage ($$) {
if (! $form->submitted) {
$form->field(name => "rcsinfo", value => "", force => 1);
}
@@ -58,7 +58,7 @@ Inline below is a [[patch]] that implements this:
index 8efef3f..075d7d8 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -271,6 +271,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -271,6 +271,7 @@ sub preprocess_inline (@) {
$rootpage=$params{page};
}
$formtemplate->param(rootpage => $rootpage);
diff --git a/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn b/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn
index a644e236b..c71250b3a 100644
--- a/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn
+++ b/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn
@@ -94,7 +94,7 @@ most possible of these pages.
> index a6e34fc..bb9dd8d 100644
> --- a/IkiWiki/Plugin/template.pm
> +++ b/IkiWiki/Plugin/template.pm
-> @@ -57,6 +57,8 @@ sub preprocess (@) { #{{{
+> @@ -57,6 +57,8 @@ sub preprocess (@) {
> }
> }
>
diff --git a/doc/todo/Improve_display_of_OpenIDs.mdwn b/doc/todo/Improve_display_of_OpenIDs.mdwn
new file mode 100644
index 000000000..e2ba1d90d
--- /dev/null
+++ b/doc/todo/Improve_display_of_OpenIDs.mdwn
@@ -0,0 +1,5 @@
+Some OpenIDs seen in the IkiWiki git history are displayed poorly in [[RecentChanges]], including mine :-) (`http://smcv.pseudorandom.co.uk/`, shown as `smcv.pseudorandom [co.uk]`)
+
+My `openid` branch on <http://git.pseudorandom.co.uk/> improves on a couple of cases and adds a regression test. --[[smcv]]
+
+[[!tag patch done]]
diff --git a/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn b/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn
index 9f52a724a..691694009 100644
--- a/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn
+++ b/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn
@@ -19,7 +19,7 @@ Cheers,
index 59eabb6..82913ba 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -229,6 +229,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -229,6 +229,7 @@ sub preprocess_inline (@) {
$template->param(content => $content);
}
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
diff --git a/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn b/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn
index d94d24ee4..3cedd5ae3 100644
--- a/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn
+++ b/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn
@@ -71,10 +71,10 @@ Happy TeXing.
+
+my $default_postfix = '\\end{document}';
+
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "teximg", call => \&getsetup);
hook(type => "preprocess", id => "teximg", call => \&preprocess);
- @@ -21,6 +33,26 @@ sub getsetup () { #{{{
+ @@ -21,6 +33,26 @@ sub getsetup () {
safe => 1,
rebuild => undef,
},
@@ -98,10 +98,10 @@ Happy TeXing.
+ safe => 0, # Not sure how secure LaTeX is...
+ rebuild => 1,
+ },
- } #}}}
+ }
- sub preprocess (@) { #{{{
- @@ -105,25 +137,35 @@ sub gen_image ($$$$) { #{{{
+ sub preprocess (@) {
+ @@ -105,25 +137,35 @@ sub gen_image ($$$$) {
my $digest = shift;
my $imagedir = shift;
diff --git a/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn b/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn
index a26433919..89167c084 100644
--- a/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn
+++ b/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn
@@ -42,13 +42,13 @@ Longer term plans:
my %cache;
my %linkcache;
@@ -32,6 +34,7 @@
- sub import { #{{{
+ sub import {
hook(type => "needsbuild", id => "version", call => \&needsbuild);
hook(type => "preprocess", id => "calendar", call => \&preprocess);
+ hook(type => "preprocess", id => "event", call => \&preprocess_event);
- } #}}}
+ }
- sub is_leap_year (@) { #{{{
+ sub is_leap_year (@) {
@@ -58,6 +61,7 @@
my $nmonth = $params{nmonth};
my $pyear = $params{pyear};
@@ -137,9 +137,9 @@ Longer term plans:
# finish off the week
@@ -304,6 +333,18 @@
return $calendar;
- } #}}}
+ }
- +sub preprocess_event (@) { #{{{
+ +sub preprocess_event (@) {
+ my %params=@_;
+ # if now time is given, use now
+ $params{begin} = localtime($time) unless defined $params{begin};
@@ -151,7 +151,7 @@ Longer term plans:
+ return "<!-- $params{begin} -->";
+} #}}
+
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my %params=@_;
$params{pages} = "*" unless defined $params{pages};
@@ -311,6 +352,8 @@
diff --git a/doc/todo/Silence_monotone_warning.mdwn b/doc/todo/Silence_monotone_warning.mdwn
index e3f0224c2..d875900c5 100644
--- a/doc/todo/Silence_monotone_warning.mdwn
+++ b/doc/todo/Silence_monotone_warning.mdwn
@@ -4,7 +4,7 @@ A quick [[patch]] to silence a [[rcs/monotone]] warning I started seeing:
index 4b9be31..9d4e280 100644
--- a/IkiWiki/Plugin/monotone.pm
+++ b/IkiWiki/Plugin/monotone.pm
- @@ -55,7 +55,7 @@ sub checkconfig () { #{{{
+ @@ -55,7 +55,7 @@ sub checkconfig () {
error("Monotone version too old, is $version but required 0.38");
}
diff --git a/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn b/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
index 2837634d9..8320f72a6 100644
--- a/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
+++ b/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
@@ -20,7 +20,7 @@ That doesn't work in ikiwiki 2.1, but I have it
index 38aa46a..cd42e8d 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -1082,10 +1082,15 @@ sub match_link ($$;@) { #{{{
+ @@ -1082,10 +1082,15 @@ sub match_link ($$;@) {
my $links = $IkiWiki::links{$page} or return undef;
return IkiWiki::FailReason->new("$page has no links") unless @$links;
my $bestlink = IkiWiki::bestlink($from, $link);
@@ -38,7 +38,7 @@ That doesn't work in ikiwiki 2.1, but I have it
+ }
}
return IkiWiki::FailReason->new("$page does not link to $link");
- } #}}}
+ }
--
1.5.1.1.g6aead
diff --git a/doc/todo/Wrapper_config_with_multiline_regexp.mdwn b/doc/todo/Wrapper_config_with_multiline_regexp.mdwn
index c0311bc92..7b4323de1 100644
--- a/doc/todo/Wrapper_config_with_multiline_regexp.mdwn
+++ b/doc/todo/Wrapper_config_with_multiline_regexp.mdwn
@@ -13,12 +13,12 @@ Second, the untainting of $configstring should allow newlines.
+++ wiki-meta/perl/IkiWiki.pm Mon Jun 11 10:52:07 2007
@@ -205,7 +205,7 @@
- sub possibly_foolish_untaint ($) { #{{{
+ sub possibly_foolish_untaint ($) {
my $tainted=shift;
- my ($untainted)=$tainted=~/(.*)/;
+ my ($untainted)=$tainted=~/(.*)/s;
return $untainted;
- } #}}}
+ }
Modified: wiki-meta/perl/IkiWiki/Wrapper.pm
diff --git a/doc/todo/add_forward_age_sorting_option_to_inline.mdwn b/doc/todo/add_forward_age_sorting_option_to_inline.mdwn
index 684419f90..e91c5a42f 100644
--- a/doc/todo/add_forward_age_sorting_option_to_inline.mdwn
+++ b/doc/todo/add_forward_age_sorting_option_to_inline.mdwn
@@ -19,7 +19,7 @@ diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index d2e5832..9e52712 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
-@@ -194,6 +194,9 @@ sub preprocess_inline (@) { #{{{
+@@ -194,6 +194,9 @@ sub preprocess_inline (@) {
elsif (! exists $params{sort} || $params{sort} eq 'age') {
@list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
}
diff --git a/doc/todo/apache_404_ErrorDocument_handler.mdwn b/doc/todo/apache_404_ErrorDocument_handler.mdwn
new file mode 100644
index 000000000..b200ff3b2
--- /dev/null
+++ b/doc/todo/apache_404_ErrorDocument_handler.mdwn
@@ -0,0 +1,18 @@
+Apache's ErrorDocument directive lets you write a CGI script that will be invoked for all 404s.
+IkiWiki could offer one as an optional wrapper; it would do much the same thing that the
+existing recentchanges_link (or [[generic___39__do__61__goto__39___for_CGI]]) does when
+encountering a nonexistent page.
+
+I think it'd probably have to be a separate CGI script because the environment with which
+404 handlers are invoked is somewhat odd, and because it needs to return a 404 status
+(having said that, it might make sense for `recentchanges_link` to return 404 rather than
+200 anyway if the page doesn't exist).
+
+This would give IkiWiki the behaviour of many other wikis, where visiting a page that
+does not yet exist prompts you to create it, without having to invoke the CGI for
+successful requests.
+
+Due to [a well-known MSIE misfeature](http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807),
+error output needs to be at least 512 bytes long, so some padding might also be required.
+
+I'm happy to write such a script if there is interest. --[[smcv]]
diff --git a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn
index 467ec350e..dc6c0001e 100644
--- a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn
+++ b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn
@@ -17,13 +17,13 @@ Updated to use fix noted in [[bugs/multiple_pages_with_same_name]].
my %metaheaders;
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "sourcecode", call => \&getsetup);
hook(type => "checkconfig", id => "sourcecode", call => \&checkconfig);
hook(type => "pagetemplate", id => "sourcecode", call => \&pagetemplate);
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
@@ -57,9 +57,9 @@ Updated to use fix noted in [[bugs/multiple_pages_with_same_name]].
safe => 1,
rebuild => 1,
},
- } #}}}
+ }
- sub checkconfig () { #{{{
+ sub checkconfig () {
if (! $config{sourcecode_lang}) {
error("The sourcecode plugin requires a list of suffixes in the 'sourcecode_lang' config option");
}
@@ -97,9 +97,9 @@ Updated to use fix noted in [[bugs/multiple_pages_with_same_name]].
error("Your installation of source-highlight cannot handle sourcecode language $lang!");
}
}
- } #}}}
+ }
- sub htmlize (@) { #{{{
+ sub htmlize (@) {
my %params=@_;
my $page = $params{page};
@@ -141,9 +141,9 @@ Updated to use fix noted in [[bugs/multiple_pages_with_same_name]].
}
return '<div id="sourcecode">'."\r\n".join("\r\n",@html)."\r\n</div>\n";
- } # }}}
+ }
- sub pagetemplate (@) { #{{{
+ sub pagetemplate (@) {
my %params=@_;
my $page=$params{page};
@@ -154,6 +154,6 @@ Updated to use fix noted in [[bugs/multiple_pages_with_same_name]].
my %seen;
$template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}}));
}
- } # }}}
+ }
1
diff --git a/doc/todo/blogpost_plugin.mdwn b/doc/todo/blogpost_plugin.mdwn
index 60b1e2515..bb91ffd02 100644
--- a/doc/todo/blogpost_plugin.mdwn
+++ b/doc/todo/blogpost_plugin.mdwn
@@ -51,13 +51,13 @@ Index: IkiWiki/Plugin/blogpost.pm
+use POSIX;
+use IkiWiki 2.00;
+
-+sub import { #{{{
++sub import {
+ hook(type => "checkconfig", id => "blogpost", call => \&checkconfig);
+ hook(type => "authcgi", id => "blogpost", call => \&authcgi);
+ hook(type => "canedit", id => "blogpost", call => \&canedit);
-+} # }}}
++}
+
-+sub checkconfig () { #{{{
++sub checkconfig () {
+ if (! defined $config{blogformat}){
+ $config{blogformat} = 'posts/%Y/%m/%d/$title';
+ }
@@ -72,9 +72,9 @@ Index: IkiWiki/Plugin/blogpost.pm
+ if (! defined $config{blogusers}) {
+ $config{blogusers} = (); # disallow all posting by default
+ }
-+} #}}}
++}
+
-+sub authcgi ($$) { #{{{
++sub authcgi ($$) {
+ my $cgi=shift;
+ my $session=shift;
+
@@ -115,16 +115,16 @@ Index: IkiWiki/Plugin/blogpost.pm
+ $cgi->param("page", $page);
+ }
+
-+} #}}}
++}
+
-+sub blogpage ($) { #{{{
++sub blogpage ($) {
+ my $title=shift;
+ my $page=POSIX::strftime $config{blogformat}, localtime;
+ $page =~ s/\$title/$title/;
+ return $page;
-+} #}}}
++}
+
-+sub canedit ($$$) { #{{{
++sub canedit ($$$) {
+ my $page=shift;
+ my $cgi=shift;
+ my $session=shift;
@@ -136,7 +136,7 @@ Index: IkiWiki/Plugin/blogpost.pm
+ return "" if ($config{blogusers} eq "*" ||
+ grep {$_ eq $user} $config{blogusers});
+ return ("not allowed to blog, $user");
-+} #}}}
++}
+
+1
Index: IkiWiki.pm
diff --git a/doc/todo/bzr.mdwn b/doc/todo/bzr.mdwn
index 179ea2f24..a50c58d26 100644
--- a/doc/todo/bzr.mdwn
+++ b/doc/todo/bzr.mdwn
@@ -56,15 +56,15 @@ and rcs_getctime and rcs_notify aren't written at all. --[[bma]]
return @ret;
}
- sub rcs_update () { #{{{
+ sub rcs_update () {
# Not needed.
- } #}}}
+ }
- sub rcs_prepedit ($) { #{{{
+ sub rcs_prepedit ($) {
return "";
- } #}}}
+ }
- sub rcs_commit ($$$;$$) { #{{{
+ sub rcs_commit ($$$;$$) {
my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
if (defined $user) {
@@ -95,18 +95,18 @@ and rcs_getctime and rcs_notify aren't written at all. --[[bma]]
system("bzr","whoami",$olduser);
return undef; # success
- } #}}}
+ }
- sub rcs_add ($) { # {{{
+ sub rcs_add ($) {
my ($file) = @_;
my @cmdline = ("bzr", "add", "--quiet", "$config{srcdir}/$file");
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
- } #}}}
+ }
- sub rcs_recentchanges ($) { #{{{
+ sub rcs_recentchanges ($) {
my ($num) = @_;
eval q{use CGI 'escapeHTML'};
@@ -153,15 +153,15 @@ and rcs_getctime and rcs_notify aren't written at all. --[[bma]]
}
return @ret;
- } #}}}
+ }
- sub rcs_notify () { #{{{
+ sub rcs_notify () {
# TODO
- } #}}}
+ }
- sub rcs_getctime ($) { #{{{
+ sub rcs_getctime ($) {
# TODO
- } #}}}
+ }
1
diff --git a/doc/todo/cas_authentication.mdwn b/doc/todo/cas_authentication.mdwn
index c8ffe7005..8bf7042df 100644
--- a/doc/todo/cas_authentication.mdwn
+++ b/doc/todo/cas_authentication.mdwn
@@ -43,11 +43,11 @@ follows) ?
> the use of it: `eval q{use AuthCAS}; error $@ if $@`
+
- +sub import { #{{{
+ +sub import {
+ hook(type => "getopt", id => "cas", call => \&getopt);
+ hook(type => "auth", id => "cas", call => \&auth);
+ hook(type => "formbuilder_setup", id => "cas", call => \&formbuilder_setup);
- +} # }}}
+ +}
> Could you please use tabs for indentation of program flow?
@@ -61,15 +61,15 @@ follows) ?
> Why would you want to make other auth plugins not work? Could a site not
> legitimatly chose to use this and another auth method?
- +sub getopt () { #{{{
+ +sub getopt () {
+ eval q{use Getopt::Long};
+ error($@) if $@;
+ Getopt::Long::Configure('pass_through');
+ GetOptions("cas_url=s" => \$config{cas_url});
+ GetOptions("ca_file=s" => \$config{ca_file});
- +} #}}}
+ +}
+
- +sub auth ($$) { #{{{
+ +sub auth ($$) {
+ my $q=shift;
+ my $session=shift;
+
@@ -98,11 +98,11 @@ follows) ?
+ error("CAS failure: ".&AuthCAS::get_errors());
+ }
+ }
- +} #}}}
+ +}
+
+# I use formbuilder_setup and not formbuilder type in order to bypass the
+# Logout processing done in IkiWiki::CGI::cgi_prefs()
- +sub formbuilder_setup (@) { #{{{
+ +sub formbuilder_setup (@) {
+ my %params=@_;
+
+ my $form=$params{form};
diff --git a/doc/todo/clear_page_to_delete.mdwn b/doc/todo/clear_page_to_delete.mdwn
index 50ae246bb..6bab6ef27 100644
--- a/doc/todo/clear_page_to_delete.mdwn
+++ b/doc/todo/clear_page_to_delete.mdwn
@@ -4,7 +4,7 @@ cleared to be entirely empty (or only have whitespace)? Discuss. --[[Joey]]
I'd say so; yes. A method of deleting pages via the web would be great; I
can't think of a use of keeping blank pages around. What about vandalism --
if someone blanks a page and deletes it and someone else wishes to restore
-it; or is undoing edits via the web a bigger issue? -- [[JonDowland]]
+it; or is undoing edits via the web a bigger issue? -- [[users/Jon]]
Of course there's already a way to delete pages (remove plugin). So the
question is really:
@@ -30,4 +30,4 @@ keyword and if there were no page editions since XX days. Here, I use pages that
can be empty everyday and filled all day long. It does not make sense to me to
delete these pages :). --[[xma]]
-I was not aware of [[plugins/remove]]. I don't think another method is necessary -- [[JonDowland]]
+I was not aware of [[plugins/remove]]. I don't think another method is necessary -- [[users/Jon]]
diff --git a/doc/todo/color_plugin.mdwn b/doc/todo/color_plugin.mdwn
index 69afe837d..19fba3b35 100644
--- a/doc/todo/color_plugin.mdwn
+++ b/doc/todo/color_plugin.mdwn
@@ -132,12 +132,12 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]]
+use strict;
+use IkiWiki 2.00;
+
- +sub import { #{{{
+ +sub import {
+ hook(type => "preprocess", id => "color", call => \&preprocess);
+ hook(type => "format", id => "color", call => \&format);
- +} #}}}
+ +}
+
- +sub preserve_style ($$$) { #{{{
+ +sub preserve_style ($$$) {
+ my $foreground = shift;
+ my $background = shift;
+ my $text = shift;
@@ -162,18 +162,18 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]]
+
+ return $preserved;
+
- +} #}}}
+ +}
+
- +sub replace_preserved_style ($) { #{{{
+ +sub replace_preserved_style ($) {
+ my $content = shift;
+
+ $content =~ s!<span class="color">((color: ([a-z]+|\#[0-9a-f]{3,6})?)?((; )?(background-color: ([a-z]+|\#[0-9a-f]{3,6})?)?)?)</span>!<span class="color" style="$1">!g;
+ $content =~ s!<span class="colorend">!!g;
+
+ return $content;
- +} #}}}
+ +}
+
- +sub preprocess (@) { #{{{
+ +sub preprocess (@) {
+ my %params = @_;
+
+ # Preprocess the text to expand any preprocessor directives
@@ -182,14 +182,14 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]]
+ IkiWiki::filter($params{page}, $params{destpage}, $params{text}));
+
+ return preserve_style($params{foreground}, $params{background}, $params{text});
- +} #}}}
+ +}
+
- +sub format (@) { #{{{
+ +sub format (@) {
+ my %params = @_;
+
+ $params{content} = replace_preserved_style($params{content});
+ return $params{content};
- +} #}}}
+ +}
+
+1
--- /dev/null 2008-06-21 02:02:15.000000000 +0200
diff --git a/doc/todo/comments.mdwn b/doc/todo/comments.mdwn
new file mode 100644
index 000000000..832441be1
--- /dev/null
+++ b/doc/todo/comments.mdwn
@@ -0,0 +1,149 @@
+# Known issues with the [[plugins/comments]] plugin
+
+## Unimplemented
+
+* Instead of just a link to add a comment, it could have a form to enter
+ the title, similar to the form for adding a new blog post.
+
+ > I'm not sure this is so useful? On Livejournal titles are allowed on
+ > comments, but very rarely used (and indeed usually not very useful);
+ > it's hard enough to get some people to title their blog posts :-)
+ > --[[smcv]]
+
+* If a spammer posts a comment, it is either impossible or hard to clean
+ up via the web. Would be nice to have some kind of link on the comment
+ that allows trusted users to remove it (using the remove plugin of
+ course).
+
+ > Won't the remove plugin refuse to remove internal pages? This would be
+ > a good feature to have, though. --[[smcv]]
+
+ > Here, FWIW, is the first ikiwiki comment spam I've seen:
+ > <http://waldeneffect.org/blog/Snake_bite_information/#blog/Snake_bite_information/comment_1>
+ > So that took about 10 days...
+ > --[[Joey]]
+
+## Patches pending merge
+
+* There is some common code cargo-culted from other plugins (notably inline and editpage) which
+ should probably be shared
+
+ > Actually, there's less of this now than there used to be - a lot of simple
+ > things that were shared have become unshareable as they became more
+ > complex. --[[smcv]]
+
+ > There's still goto. You have a branch for that. --[[Joey]]
+
+## Won't fix
+
+* It would be useful to have a pagespec that always matches all comments on
+ pages matching a glob. Something like `comment(blog/*)`.
+ Perhaps postcomment could also be folded into this? Then the pagespec
+ would match both existing comments, as well as new comments that are
+ being posted.
+
+ > Please see [[plugins/comments/discussion]]. If I've convinced you that
+ > internal pages are the way forward, then sure, we can do that, because
+ > people who can comment still won't be able to edit others' comments
+ > (one of my goals is that commenters can't put words into each other's
+ > mouths :-) )
+ >
+ > On the other hand, if you still want me to switch this plugin to "real"
+ > pages, or if internal pages might become editable in future, then
+ > configuring lockedit/anonok so a user X can add comments to blog pages
+ > would also let X edit/delete comments on blog pages (including those
+ > written by others) in arbitrary ways, which doesn't seem good. --[[smcv]]
+
+ > I had a look at implementing comment() and fell afoul of
+ > some optimisations that assume only internal() will be used to match
+ > internal pages. So probably this isn't worth doing. --[[Joey]]
+
+## Done
+
+* The default template should have a (?) icon next to unauthenticated users (with the IP address
+ as title) and an OpenID icon next to OpenIDs
+
+ > Done in my comments git branch, at least as a mockup (using the (?),
+ > {x} and {*} smileys for anonymous, OpenID and login respectively).
+ > --[[smcv]]
+
+ >> I've improved this to use independent icons from the wikiicons
+ >> directory (untested!) --[[smcv]]
+
+ >>> The new code produces links like /wikiisons/openid.png, which
+ >>> fail if ikiwiki is not at the root of the web server. --[[Joey]]
+
+ >>>> Sorry, I should have spotted that (the assumption failed on my demo
+ >>>> site, but the push to that site was when I was on the way out, so I
+ >>>> didn't have time to investigate). As a note for other ikiwiki hackers,
+ >>>> I should have used
+ >>>> `<img src="<TMPL_VAR NAME=BASEURL>wikiicons/openid.png" />`. --[[smcv]]
+
+ >>> I got to wondering if the icons are needed. On my comments branch
+ >>> (not master), I've dropped the icons and info can be seen by hovering
+ >>> over the author's name. Idea being that you probably don't care how
+ >>> they authenticated unless something is weird, and in that case you
+ >>> can hover to check. Does that make sense, should I merge it?
+ >>> --[[Joey]]
+
+ >>>> Yeah, go ahead. I preferred my layout with the author before the
+ >>>> comment - perhaps that's Livejournal's influence :-) - but I can always
+ >>>> edit the templates for my own site. As long as the default is something
+ >>>> reasonable and both layouts are possible, I don't really mind.
+ >>>> Minimizing the number of "resource" files in the basewiki also seems
+ >>>> a good goal. --[[smcv]]
+
+* Previews always say "unknown IP address"
+
+ > Fixed in my comments branch by commits bc66a00b and 95b3bbbf --[[smcv]]
+
+* The Comments link in the "toolbar" is to `index.html#comments`, not the
+ desired `./#comments`
+
+ > Fixed in my comments branch by commit 0844bd0b; commits 5b1cf21a
+ > and c42f174e fix another `beautify_urlpath` bug and add a regression test
+ > --[[smcv]]
+
+* Now that inline has some comments-specific functionality anyway, it would
+ be good to output `<link rel="comments">` in Atom and the equivalent in RSS.
+
+ > Fixed in my comments branch by d0d598e4, 3feebe31, 9e5f504e --[[smcv]]
+
+
+* Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID
+
+ > Done in my comments git branch --[[smcv]]
+
+ > Not seeing it there, which branch? --[[Joey]]
+
+ >> Bah, git push --all is not the default... 'comments' branch now (I've also rebased it).
+ >> Sorry, I'm on mobile Internet at the moment... --[[smcv]]
+
+ >>> merged by [[Joey]] in commit 0f03af38 --[[smcv]]
+
+* Should the comments be visually set off more from the page above?
+ Rather than just a horizontal rule, I'm thinking put the comments
+ in a box like is used for inlined pages.
+
+ > I did put them in a box in the CSS... I agree the default template
+ > could do with visual improvement though. --[[smcv]]
+
+ >> I'll consider this solved by [[Joey]]'s changes. --[[smcv]]
+
+* One can use inline to set up a feed of all comments posted to any page.
+ Using template=comment they are displayed right. Only problem
+ is there is no indication in that template of what page each comment in the
+ feed is a comment on. So, if a comment is inlined into a different page,
+ I think it should show a link back to the page commented on.
+ (BTW, the rss feed in this situation seems ok; there the link element
+ points back to the parent page.
+
+ > done --[[Joey]]
+
+* One of Joey's commit messages says "Not ideal, it would be nicer to jump to
+ the actual comment posted, but no anchor is available". In fact there is
+ an anchor - the `\[[_comment]]` preprocessing wraps the comment in a `<div>`
+ with id="comment_123" or something. I'll fix this, unless Joey gets there
+ first. --[[smcv]]
+
+ > done --[[Joey]]
diff --git a/doc/todo/darcs.mdwn b/doc/todo/darcs.mdwn
index e5bf5ee27..882a41379 100644
--- a/doc/todo/darcs.mdwn
+++ b/doc/todo/darcs.mdwn
@@ -219,14 +219,14 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
package IkiWiki;
- sub rcs_update () { #{{{
+ sub rcs_update () {
# Do nothing - there's nowhere to update *from*.
- } #}}}
+ }
- sub rcs_prepedit ($) { #{{{
- } #}}}
+ sub rcs_prepedit ($) {
+ }
- sub rcs_commit ($$$;$$) { #{{{
+ sub rcs_commit ($$$;$$) {
my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
# $user should probably be a name and an email address, by darcs
@@ -257,16 +257,16 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
return undef; # success
- sub rcs_add ($) { # {{{
+ sub rcs_add ($) {
my ($file) = @_;
my @cmdline = ("darcs", "add", "--repodir", "$config{srcdir}", "-a", "-q", "$file");
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
- } #}}}
+ }
- sub rcs_recentchanges ($) { #{{{
+ sub rcs_recentchanges ($) {
# TODO: This is horrible code. It doesn't work perfectly, and uses regexes
# rather than parsing Darcs' XML output.
my $num=shift;
@@ -314,15 +314,15 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
}
}
return @ret;
- } #}}}
+ }
- sub rcs_notify () { #{{{
+ sub rcs_notify () {
# TODO
- } #}}}
+ }
- sub rcs_getctime ($) { #{{{
+ sub rcs_getctime ($) {
error gettext("getctime not implemented");
- } #}}}
+ }
1
diff --git a/doc/todo/datearchives-plugin.mdwn b/doc/todo/datearchives-plugin.mdwn
index 5a5560d6c..5f33cde4c 100644
--- a/doc/todo/datearchives-plugin.mdwn
+++ b/doc/todo/datearchives-plugin.mdwn
@@ -17,11 +17,11 @@ Index: IkiWiki/Plugin/datearchives.pm
+use strict;
+use IkiWiki;
+
-+sub import { #{{{
++sub import {
+ hook(type => "pagetemplate", id => "datearchives", call => \&pagetemplate, scan => 1);
-+} # }}}
++}
+
-+sub pagetemplate (@) { #{{{
++sub pagetemplate (@) {
+ my %args = @_;
+ my $dt;
+ eval {
@@ -37,7 +37,7 @@ Index: IkiWiki/Plugin/datearchives.pm
+ $template->param(ctime => htmllink( $args{page}, $args{destpage}, $link, 0, 0,
+ $template->param('ctime')));
+ }
-+} # }}}
++}
+
+1
</pre>
diff --git a/doc/todo/different_search_engine.mdwn b/doc/todo/different_search_engine.mdwn
index 2f309dea5..9d0fc92c9 100644
--- a/doc/todo/different_search_engine.mdwn
+++ b/doc/todo/different_search_engine.mdwn
@@ -126,7 +126,7 @@ Index: IkiWiki/Plugin/search.pm
+ $PLUCENE_DIR = $config{wikistatedir}.'/plucene';
+}
+
- sub import { #{{{
+ sub import {
- hook(type => "getopt", id => "hyperestraier",
- call => \&amp;getopt);
- hook(type => "checkconfig", id => "hyperestraier",
@@ -142,14 +142,14 @@ Index: IkiWiki/Plugin/search.pm
call => \&amp;change);
- hook(type => "cgi", id => "hyperestraier",
- call => \&amp;cgi);
- } # }}}
+ }
--sub getopt () { #{{{
+-sub getopt () {
- eval q{use Getopt::Long};
- error($@) if $@;
- Getopt::Long::Configure('pass_through');
- GetOptions("estseek=s" => \$config{estseek});
--} #}}}
+-}
+sub writer {
+ init();
@@ -165,20 +165,20 @@ Index: IkiWiki/Plugin/search.pm
+ grep { defined pagetype($_) } @_;
+}
+
- sub checkconfig () { #{{{
+ sub checkconfig () {
foreach my $required (qw(url cgiurl)) {
if (! length $config{$required}) {
@@ -36,112 +58,55 @@
}
- } #}}}
+ }
-my $form;
--sub pagetemplate (@) { #{{{
+-sub pagetemplate (@) {
- my %params=@_;
- my $page=$params{page};
- my $template=$params{template};
+#my $form;
-+#sub pagetemplate (@) { #{{{
++#sub pagetemplate (@) {
+# my %params=@_;
+# my $page=$params{page};
+# my $template=$params{template};
@@ -193,7 +193,7 @@ Index: IkiWiki/Plugin/search.pm
+#
+# $template->param(searchform => $form);
+# }
-+#} #}}}
++#}
- # Add search box to page header.
- if ($template->query(name => "searchform")) {
@@ -205,9 +205,9 @@ Index: IkiWiki/Plugin/search.pm
-
- $template->param(searchform => $form);
- }
--} #}}}
+-}
-
- sub delete (@) { #{{{
+ sub delete (@) {
- debug(gettext("cleaning hyperestraier search index"));
- estcmd("purge -cl");
- estcfg();
@@ -219,9 +219,9 @@ Index: IkiWiki/Plugin/search.pm
+ $reader->delete_term( Plucene::Index::Term->new({ field => "id", text => $_ }));
+ }
+ $reader->close;
- } #}}}
+ }
- sub change (@) { #{{{
+ sub change (@) {
- debug(gettext("updating hyperestraier search index"));
- estcmd("gather -cm -bc -cl -sd",
- map {
@@ -250,9 +250,9 @@ Index: IkiWiki/Plugin/search.pm
+ $doc->add(Plucene::Document::Field->UnStored('text' => $data));
+ $writer->add_document($doc);
+ }
- } #}}}
+ }
-
--sub cgi ($) { #{{{
+-sub cgi ($) {
- my $cgi=shift;
-
- if (defined $cgi->param('phrase') || defined $cgi->param("navi")) {
@@ -260,10 +260,10 @@ Index: IkiWiki/Plugin/search.pm
- chdir("$config{wikistatedir}/hyperestraier") || error("chdir: $!");
- exec("./".IkiWiki::basename($config{cgiurl})) || error("estseek.cgi failed");
- }
--} #}}}
+-}
-
-my $configured=0;
--sub estcfg () { #{{{
+-sub estcfg () {
- return if $configured;
- $configured=1;
-
@@ -301,9 +301,9 @@ Index: IkiWiki/Plugin/search.pm
- unlink($cgi);
- my $estseek = defined $config{estseek} ? $config{estseek} : '/usr/lib/estraier/estseek.cgi';
- symlink($estseek, $cgi) || error("symlink $estseek $cgi: $!");
--} # }}}
+-}
-
--sub estcmd ($;@) { #{{{
+-sub estcmd ($;@) {
- my @params=split(' ', shift);
- push @params, "-cl", "$config{wikistatedir}/hyperestraier";
- if (@_) {
@@ -323,7 +323,7 @@ Index: IkiWiki/Plugin/search.pm
- open(STDOUT, "/dev/null"); # shut it up (closing won't work)
- exec("estcmd", @params) || error("can't run estcmd");
- }
--} #}}}
+-}
-
-1
+1;
diff --git a/doc/todo/directive_docs.mdwn b/doc/todo/directive_docs.mdwn
index 1f6307381..2baa61b40 100644
--- a/doc/todo/directive_docs.mdwn
+++ b/doc/todo/directive_docs.mdwn
@@ -40,15 +40,15 @@ defined them: --[[Joey]]
index e476521..afe982a 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -493,6 +493,7 @@ sub loadplugins () { #{{{
+ @@ -493,6 +493,7 @@ sub loadplugins () {
return 1;
- } #}}}
+ }
+my $loading_plugin;
- sub loadplugin ($) { #{{{
+ sub loadplugin ($) {
my $plugin=shift;
- @@ -502,14 +503,18 @@ sub loadplugin ($) { #{{{
+ @@ -502,14 +503,18 @@ sub loadplugin ($) {
"$installdir/lib/ikiwiki") {
if (defined $dir && -x "$dir/plugins/$plugin") {
require IkiWiki::Plugin::external;
@@ -67,7 +67,7 @@ defined them: --[[Joey]]
if ($@) {
error("Failed to load plugin $mod: $@");
}
- @@ -1429,6 +1434,9 @@ sub hook (@) { # {{{
+ @@ -1429,6 +1434,9 @@ sub hook (@) {
return if $param{no_override} && exists $hooks{$param{type}}{$param{id}};
@@ -76,4 +76,4 @@ defined them: --[[Joey]]
+
$hooks{$param{type}}{$param{id}}=\%param;
return 1;
- } # }}}
+ }
diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn
index b3c174fba..e3b295123 100644
--- a/doc/todo/enable-htaccess-files.mdwn
+++ b/doc/todo/enable-htaccess-files.mdwn
@@ -5,7 +5,7 @@
@@ -26,7 +26,7 @@
memoize("file_pruned");
- sub defaultconfig () { #{{{
+ sub defaultconfig () {
- wiki_file_prune_regexps => [qr/\.\./, qr/^\./, qr/\/\./,
+ wiki_file_prune_regexps => [qr/\.\./, qr/^\.(?!htaccess)/, qr/\/\.(?!htaccess)/,
qr/\.x?html?$/, qr/\.ikiwiki-new$/,
diff --git a/doc/todo/format_escape.mdwn b/doc/todo/format_escape.mdwn
index 8dfe05581..574883d1b 100644
--- a/doc/todo/format_escape.mdwn
+++ b/doc/todo/format_escape.mdwn
@@ -141,13 +141,13 @@ Index: IkiWiki/Plugin/rst.pm
print html[html.find('<body>')+6:html.find('</body>')].strip();
";
- sub import { #{{{
+ sub import {
hook(type => "htmlize", id => "rst", call => \&htmlize);
+ hook(type => "htmlescape", id => "rst", call => \&htmlescape);
+ hook(type => "htmlescapelink", id => "rst", call => \&htmlescapelink);
- } # }}}
+ }
-+sub htmlescapelink ($$;@) { #{{{
++sub htmlescapelink ($$;@) {
+ my $url = shift;
+ my $text = shift;
+ my %params = @_;
@@ -158,15 +158,15 @@ Index: IkiWiki/Plugin/rst.pm
+ else {
+ return "`$text <$url>`_";
+ }
-+} # }}}
++}
+
-+sub htmlescape ($) { #{{{
++sub htmlescape ($) {
+ my $html=shift;
+ $html=~s/^/ /mg;
+ return ".. raw:: html\n\n".$html;
-+} # }}}
++}
+
- sub htmlize (@) { #{{{
+ sub htmlize (@) {
my %params=@_;
my $content=$params{content};
Index: doc/plugins/write.mdwn
@@ -272,7 +272,7 @@ Index: IkiWiki.pm
+ return $hooks{htmlescapelink}{$type}{call}->($bestlink, $linktext);
+ }
return "<a href=\"$bestlink\">$linktext</a>";
- } #}}}
+ }
@@ -628,6 +640,14 @@
preview => $preprocess_preview,
diff --git a/doc/todo/fortune:_select_options_via_environment.mdwn b/doc/todo/fortune:_select_options_via_environment.mdwn
index f906312fe..ddacd91b5 100644
--- a/doc/todo/fortune:_select_options_via_environment.mdwn
+++ b/doc/todo/fortune:_select_options_via_environment.mdwn
@@ -14,9 +14,9 @@
package IkiWiki::Plugin::fortune;
use warnings;
- @@ -12,7 +18,13 @@ sub import { #{{{
+ @@ -12,7 +18,13 @@ sub import {
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
$ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
- my $f = `fortune 2>/dev/null`;
+ my $f;
diff --git a/doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn b/doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn
new file mode 100644
index 000000000..1828f0a7b
--- /dev/null
+++ b/doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn
@@ -0,0 +1,9 @@
+The [[plugins/recentchanges]] plugin has a `do=recentchanges_link` feature that will
+redirect to a given wiki page, or an error page with a creation link.
+
+In the [[plugins/contrib/comments]] plugin I've found that it would be useful to do
+the same for users. For now I've just cloned the functionality into the comments
+plugin, but perhaps this functionality could be renamed to `do=goto` or
+something, and moved to `IkiWiki/CGI.pm`?
+
+If there's general approval I'm happy to write a patch. --[[smcv]]
diff --git a/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn b/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn
index 8a338ece1..eb71cf840 100644
--- a/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn
+++ b/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn
@@ -1,5 +1,8 @@
-The only way to have a private ikiwiki, with a shared user database for static pages and CGI authentication, is to use [[plugins/httpauth]]. It would be good for httpauth to be on par with [[plugins/passwordauth]],
-i.e. to allow registering users, resetting passwords, and changing passwords; supporting some kind of
+The only way to have a private ikiwiki, with a shared user database
+for static pages and CGI authentication, is to use
+[[plugins/httpauth]]. It would be good for httpauth to be on par with
+[[plugins/passwordauth]], i.e. to allow registering users, resetting
+passwords, and changing passwords; supporting some kind of
`account_creation_password` configuration option would be nice, too.
I'll probably propose patches implementing this at some point.
@@ -8,4 +11,18 @@ the relevant passwordauth code, instead of rewriting it completely in httpauth.
-- [[intrigeri]]
+Well, on such a private wiki, one can neither register herself nor
+reset his password: the registration page, as any other page, would be
+forbidden to non-authenticated users. Admin users should then be
+enabled to:
+
+- register a new user
+- reset someone else's password
+
+In both cases, a brand new random password is sent by e-mail to the
+new user.
+
+An authenticated user should nevertheless be able to change his
+own password. -- [[intrigeri]]
+
[[wishlist]]
diff --git a/doc/todo/index.html_allowed.mdwn b/doc/todo/index.html_allowed.mdwn
index f030f9eea..f5e6f8cd7 100644
--- a/doc/todo/index.html_allowed.mdwn
+++ b/doc/todo/index.html_allowed.mdwn
@@ -91,15 +91,15 @@ page "A/B/index.html" is treated as "A/B".
+++ ikidev/IkiWiki.pm 2007-02-25 15:05:22.328852000 -0800
@@ -192,6 +192,12 @@
return $untainted;
- } #}}}
+ }
- +sub titlename($;@) { #{{{
+ +sub titlename($;@) {
+ my $page = shift;
+ $page =~ s!/index$!!;
+ return pagetitle(basename($page), @_);
- +} #}}}
+ +}
+
- sub basename ($) { #{{{
+ sub basename ($) {
my $file=shift;
@@ -117,7 +117,7 @@ diff -ru ikiwiki-2.4/IkiWiki.pm ikiwiki/IkiWiki.pm
$page=~s/\Q.$type\E*$// if defined $type;
+ $page=~s/\/index$// if $page =~ /\/index$/;
return $page;
- } #}}}
+ }
</pre>
diff --git a/doc/todo/inline:_numerical_ordering_by_title.mdwn b/doc/todo/inline:_numerical_ordering_by_title.mdwn
index 95511d998..3f6c8b598 100644
--- a/doc/todo/inline:_numerical_ordering_by_title.mdwn
+++ b/doc/todo/inline:_numerical_ordering_by_title.mdwn
@@ -155,11 +155,11 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
%config %links %pagestate %renderedfiles
%pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
- @@ -835,6 +835,42 @@ sub titlepage ($) { #{{{
+ @@ -835,6 +835,42 @@ sub titlepage ($) {
return $title;
- } #}}}
+ }
- +sub titlecmp ($$) { #{{{
+ +sub titlecmp ($$) {
+ my $titleA=shift;
+ my $titleB=shift;
+
@@ -193,29 +193,29 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
+ return -1 if (@listB);
+
+ return 0;
- +} #}}}
+ +}
+
- sub linkpage ($) { #{{{
+ sub linkpage ($) {
my $link=shift;
my $chars = defined $config{wiki_file_chars} ? $config{wiki_file_chars} : "-[:alnum:]+/.:_";
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index 37752dd..ccaa399 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
- @@ -59,7 +59,7 @@ sub preprocess (@) { #{{{
+ @@ -59,7 +59,7 @@ sub preprocess (@) {
map {
"<li>$_</li>"
}
- sort @broken)
+ sort titlecmp @broken)
."</ul>\n";
- } # }}}
+ }
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 8efef3f..263e7a6 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -192,7 +192,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -192,7 +192,7 @@ sub preprocess_inline (@) {
}
if (exists $params{sort} && $params{sort} eq 'title') {
@@ -228,20 +228,20 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
index b910758..10a1d87 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
- @@ -56,7 +56,7 @@ sub preprocess (@) { #{{{
+ @@ -56,7 +56,7 @@ sub preprocess (@) {
htmllink($params{page}, $params{destpage}, $_,
noimageinline => 1).
"</li>"
- } sort @orphans).
+ } sort titlecmp @orphans).
"</ul>\n";
- } # }}}
+ }
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index ceb7c84..00798e1 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
- @@ -89,7 +89,7 @@ sub genpage ($$) { #{{{
+ @@ -89,7 +89,7 @@ sub genpage ($$) {
$template->param(have_actions => 1);
}
diff --git a/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn b/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn
new file mode 100644
index 000000000..df5bf9194
--- /dev/null
+++ b/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn
@@ -0,0 +1,29 @@
+If RSS and Atom are enabled by default, the [[plugins/contrib/comments]]
+plugin generates a feed, perhaps `/sandbox/index.atom` for comments on the
+sandbox. If a blog is added to the page, the blog will steal the name
+`/sandbox/index.atom` and the comments plugin's feed will change to
+`/sandbox/index.atom2`.
+
+If `\[[!inline]]` gained a parameter `feedname` or something, the comments
+plugin could use `feedname=comments` to produce `/sandbox/comments.atom`
+instead (this would just require minor enhancements to rsspage(),
+atompage() and targetpage()).
+
+As a side benefit, [my blog](http://smcv.pseudorandom.co.uk/) could go back
+to its historical Atom feed URL of `.../feed.atom` (which is currently a
+symlink to `index.atom` :-) )
+
+On sites not using `usedirs` the current feed is `/sandbox.atom`, and we
+could perhaps change it to `/sandbox-comments.atom` or
+`/sandbox/comments.atom` if `feedname=comments` is given.
+
+--[[smcv]]
+
+> This is slightly hard to do, because you have to worry about
+> conflicting pages setting feedname, which could cause ikiwiki to blow up.
+>
+> Particularly for the non-usedirs case, where a page `sandbox/comments`
+> would produce the same feed as sandbox with `feedname=comments`.
+> --[[Joey]]
+
+> [[done]] as feedfile option --[[Joey]]
diff --git a/doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn b/doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn
new file mode 100644
index 000000000..d046c0cd0
--- /dev/null
+++ b/doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn
@@ -0,0 +1,7 @@
+ < joeyh> 03:49:19> also, I think it may be less visually confusing to
+ drop the rss/atom buttons for comments when there are none yet
+
+This seems to me like something that applies to the [[plugins/inline]] plugin in general, rather than the [[plugins/contrib/comments]] plugin specifically. --[[smcv]]
+
+>> [[done]] as emptyfeeds option, not on by default for inline, but I think
+>> it should be for comments --[[Joey]]
diff --git a/doc/todo/language_definition_for_the_meta_plugin.mdwn b/doc/todo/language_definition_for_the_meta_plugin.mdwn
index 33098c601..4ac4e2e25 100644
--- a/doc/todo/language_definition_for_the_meta_plugin.mdwn
+++ b/doc/todo/language_definition_for_the_meta_plugin.mdwn
@@ -54,7 +54,7 @@ This may be useful for sites with a few pages in different languages, but no ful
my %authorurl;
+my %lang;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
@@ -100,6 +101,11 @@
$meta{$page}.='<link href="'.encode_entities($value).
@@ -75,7 +75,7 @@ This may be useful for sites with a few pages in different languages, but no ful
+ $template->param(lang => $lang{$page})
+ if exists $lang{$page} && $template->query(name => "lang");
- } # }}}
+ }
</pre>
> Please resolve lang somewhere reusable rather than within meta plugin: It is certainly usable outside
diff --git a/doc/todo/location_of_external_plugins.mdwn b/doc/todo/location_of_external_plugins.mdwn
new file mode 100644
index 000000000..c28003e74
--- /dev/null
+++ b/doc/todo/location_of_external_plugins.mdwn
@@ -0,0 +1,24 @@
+Would it be possible to make the installation location for the external
+plugins (those talked to via xmlrpc) configurable? Currently, they are
+installed into (and later expected to be in) /usr/lib/ikiwiki/plugins. For
+the Fedora package (which I maintain), I move them to
+/usr/libexec/ikiwiki/plugins. While not covered by the FHS, this seems to
+be a more appropriate place, see:
+https://fedoraproject.org/wiki/Packaging/Guidelines#Libexecdir.
+
+> This would need to be a build time configuration setting so the directory
+> is built into ikiwiki for use at runtime. --[[Joey]]
+
+As a side note, the accompanying proxy.py might better be placed into some directory on the python path.
+
+> If someone can show how to do so without needing a Setup.py and all the
+> pain that using one entails.. --[[Joey]]
+
+>> At the very least I don't think proxy.py should be on the `sys.path`
+>> under its current name. If it was renamed to ikiwiki_proxy or some such,
+>> possibly; but I think it's more appropriate to have it in an
+>> ikiwiki-specific directory (a "private module") since it's not useful for
+>> anything outside ikiwiki, and putting it in the same directory as the
+>> external plugins means it's automatically in their `sys.path` without
+>> needing special configuration. --[[smcv]]
+>> (a mostly-inactive member of Debian's Python modules packaging team)
diff --git a/doc/todo/location_of_ikiwiki-w3m.cgi.mdwn b/doc/todo/location_of_ikiwiki-w3m.cgi.mdwn
new file mode 100644
index 000000000..8ca925bee
--- /dev/null
+++ b/doc/todo/location_of_ikiwiki-w3m.cgi.mdwn
@@ -0,0 +1,3 @@
+The `ikiwiki-w3m.cgi` script is installed (hard-coded) into `/usr/lib/w3m/cgi-bin`. On Fedora however, the w3m package expects it in `/usr/libexec/w3m/cgi-bin`. So, it would be nice if the destination for this script could be configured.
+
+> You can use `W3M_CGI_BIN now`. [[done]] --[[Joey]]
diff --git a/doc/todo/mbox.mdwn b/doc/todo/mbox.mdwn
index 081d51200..f7744563c 100644
--- a/doc/todo/mbox.mdwn
+++ b/doc/todo/mbox.mdwn
@@ -14,3 +14,6 @@ I'd like to be able to drop an unmodified RFC2822 email message into ikiwiki, an
>>> to page foo). I'm not sure if this is possible and worthwhile to fix.
>> It is certainly workable
>>> to use a \[[!mailbox ]] directive. -- [[DavidBremner]]
+
+> Your gitweb doesn't tell me where I can git pull this from, which I'd
+> like to do ... --[[Joey]]
diff --git a/doc/todo/meta_rcsid.mdwn b/doc/todo/meta_rcsid.mdwn
index 81a2c1328..158edea6e 100644
--- a/doc/todo/meta_rcsid.mdwn
+++ b/doc/todo/meta_rcsid.mdwn
@@ -26,7 +26,7 @@ of CVS/SVN-style keywords (like '$Id$', etc.) from the source file in the page t
my %copyright;
+my %rcsid;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
@@ -110,6 +111,9 @@
$meta{$page}.="<link rel=\"copyright\" href=\"#page_copyright\" />\n";
diff --git a/doc/todo/missingparents.pm.mdwn b/doc/todo/missingparents.pm.mdwn
index 0cc7137ba..c5f2ab535 100644
--- a/doc/todo/missingparents.pm.mdwn
+++ b/doc/todo/missingparents.pm.mdwn
@@ -82,15 +82,15 @@ Index: IkiWiki/Plugin/missingparents.pm
+my %ownfiles;
+my @pagespecs;
+
-+sub import { #{{{
++sub import {
+ hook(type => "checkconfig", id => "missingparents", call => \&checkconfig);
+ hook(type => "needsdelete", id => "missingparents", call => \&needsdelete);
+ hook(type => "needsbuild", id => "missingparents", call => \&needsbuild);
+ hook(type => "savestate", id => "missingparents", call => \&savestate);
+ hook(type => "preprocess", id => "missingparents", call => \&preprocess_missingparents);
-+} # }}}
++}
+
-+sub checkconfig () { #{{{
++sub checkconfig () {
+ IkiWiki::preprocess("missingparents", "missingparents",
+ readfile(srcfile("missingparents.mdwn")));
+ loadstate();
@@ -99,9 +99,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ unlink $config{srcdir}.'/'.$file;
+ }
+ }
-+} #}}}
++}
+
-+sub preprocess_missingparents (@) { #{{{
++sub preprocess_missingparents (@) {
+ my %params=@_;
+
+ if (! defined $params{pages} || ! defined $params{generate}) {
@@ -115,10 +115,10 @@ Index: IkiWiki/Plugin/missingparents.pm
+ #translators: is text for pages that match that pagespec.
+ return sprintf(gettext("missingparents in %s will be %s"),
+ '`'.$params{pages}.'`', '`\\'.$params{generate}.'`');
-+} # }}}
++}
+
+my $state_loaded=0;
-+sub loadstate() { #{{{
++sub loadstate() {
+ my $filename = "$config{wikistatedir}/missingparents";
+ if (-e $filename) {
+ open (IN, $filename) ||
@@ -132,9 +132,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+
+ $state_loaded=1;
+ }
-+} #}}}
++}
+
-+sub savestate() { #{{{
++sub savestate() {
+ my $filename = "$config{wikistatedir}/missingparents.new";
+ my $cleanup = sub { unlink ($filename) };
+ open (OUT, ">$filename") || error("open $filename: $!", $cleanup);
@@ -143,9 +143,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ }
+ rename($filename, "$config{wikistatedir}/missingparents") ||
+ error("rename $filename: $!", $cleanup);
-+} #}}}
++}
+
-+sub needsdelete (@) { #{{{
++sub needsdelete (@) {
+ my $files=shift;
+
+ my @mydel;
@@ -167,9 +167,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ foreach my $page (@mydel){
+ push @{$files}, $page;
+ }
-+} #}}}
++}
+
-+sub check_matches($) { #{{{
++sub check_matches($) {
+ my $page = shift;
+ return if $IkiWiki::pagesources{$page};
+
@@ -183,9 +183,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ return $output;
+ }
+ return "";
-+} #}}}
++}
+
-+sub needsbuild ($) { #{{{
++sub needsbuild ($) {
+ my $files=shift;
+ my @new;
+
@@ -209,7 +209,7 @@ Index: IkiWiki/Plugin/missingparents.pm
+ $ownfiles{$file} = 1;
+ push @{$files}, $file;
+ }
-+} #}}}
++}
+
+1
Index: IkiWiki.pm
@@ -227,18 +227,18 @@ Index: IkiWiki.pm
our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
@@ -330,6 +336,30 @@
error("failed renaming $newfile to $destdir/$file: $!", $cleanup);
- } #}}}
+ }
-+sub newpage($$) { #{{{
++sub newpage($$) {
+ my $file=shift;
+ my $page=shift;
+
+ $pagemtime{$page} = $pagectime{$page} = time;
+ $pagesources{$page} = $file;
+ $pagecase{lc $page} = $page;
-+} #}}}
++}
+
-+sub delpage($) { #{{{
++sub delpage($) {
+ my $page=shift;
+ $links{$page}=[];
+ $renderedfiles{$page}=[];
@@ -251,10 +251,10 @@ Index: IkiWiki.pm
+ delete $destsources{$_};
+ }
+ }
-+} #}}}
++}
+
my %cleared;
- sub will_render ($$;$) { #{{{
+ sub will_render ($$;$) {
my $page=shift;
</pre>
diff --git a/doc/todo/modify_page_filename_in_plugin.mdwn b/doc/todo/modify_page_filename_in_plugin.mdwn
index 7c0a909eb..4099487a1 100644
--- a/doc/todo/modify_page_filename_in_plugin.mdwn
+++ b/doc/todo/modify_page_filename_in_plugin.mdwn
@@ -10,7 +10,7 @@ My solution is to allow plugins to provide a hook that sets the pagename. --[[/u
+++ /usr/share/perl5/IkiWiki.pm 2008-10-07 11:57:26.000000000 -0400
@@ -196,11 +196,32 @@
- sub pagename ($) { #{{{
+ sub pagename ($) {
my $file=shift;
my $type=pagetype($file);
@@ -27,7 +27,7 @@ My solution is to allow plugins to provide a hook that sets the pagename. --[[/u
$page=~s/\Q.$type\E*$// if defined $type;
return $page;
+ }
- } #}}}
+ }
- sub htmlpage ($) { #{{{
+ sub htmlpage ($) {
diff --git a/doc/todo/need_global_renamepage_hook.mdwn b/doc/todo/need_global_renamepage_hook.mdwn
new file mode 100644
index 000000000..8265497ae
--- /dev/null
+++ b/doc/todo/need_global_renamepage_hook.mdwn
@@ -0,0 +1,53 @@
+As documented in [[plugins/write]], the current `renamepage` hook is
+heavily oriented towards updating links in pages' content: it is run
+once per page linking to the renamed page.
+
+That's fine, but it can't be used to trigger more general actions on
+page rename. E.g. it won't be run at all if the page being renamed is
+an orphan one.
+
+This is a real issue for the [[plugins/contrib/po]] development: what
+I'm about to achieve is:
+
+- when a master page is renamed, the plugin takes notice of it (using
+ the `rename` hook), and later renames the translation pages
+ accordingly (in the `change` hook)
+- when a master page is deleted, the plugin deletes its translations
+ (using the `delete` hook)
+
+With the current `renamepage` hook behavior, combining these two goals
+has an annoying drawback: a plugin can't notice an orphan master page
+has been renamed, so instead of renaming (and preserving) its
+translations, it considers the oldpage as deleted, and deletes its
+translations. Game over.
+
+It may seem like a corner case, but I want to be very careful when
+deleting files automatically in `srcdir`, which is not always under
+version control.
+
+As an sad workaround, I can still disable any deletion in `srcdir`
+when it is not under version control. But I think ikiwiki deserves
+a global `renamepage` hook that would be run once per rename
+operation.
+
+My proposal is thus:
+
+- keep the documented `renamepage` hook as it is
+- use something inspired by the trick `preprocess` uses: when `hook`
+ is passed an optional "global" parameter, set to a true value, the
+ declared `renamepage` hook is run once per rename operation, and is
+ passed named parameters: `src`, `srcfile`, `dest` and `destfile`.
+
+I'm of course volunteering to implement this, or anything related that
+would solve my problem. Hmmm? --[[intrigeri]]
+
+> I think it would be better to have a different hook that is called for
+> renames, since the two hook actions are very different (unlike the
+> preprocess hook, which does a very similar thing in scan mode).
+>
+> Just calling it `rename` seems like a reasonable name, by analogy with
+> the `delete` and `change` hooks.
+>
+> It might make sense to rename `renamepage` to `renamelink` to make it
+> clearer what it does. (I'm not very worried about this breaking things, at
+> this point.) --[[Joey]]
diff --git a/doc/todo/pagespec_relative_to_a_target.mdwn b/doc/todo/pagespec_relative_to_a_target.mdwn
index f7b248670..4757988e0 100644
--- a/doc/todo/pagespec_relative_to_a_target.mdwn
+++ b/doc/todo/pagespec_relative_to_a_target.mdwn
@@ -57,7 +57,7 @@ diff -urNX ignorepats ikiwiki/IkiWiki/Plugin/relative.pm ikidev/IkiWiki/Plugin/r
+
+package IkiWiki::PageSpec;
+
-+sub match_relative($$;@) { #{{{
++sub match_relative($$;@) {
+ my $parent = shift;
+ my $spec = shift;
+ my %params = @_;
@@ -69,21 +69,21 @@ diff -urNX ignorepats ikiwiki/IkiWiki/Plugin/relative.pm ikidev/IkiWiki/Plugin/r
+ }
+ }
+ return IkiWiki::FailReason->new("$parent can't match $spec against anything");
-+} #}}}
++}
+
-+sub match_has_child($$;@) { #{{{
++sub match_has_child($$;@) {
+ my $page = shift;
+ my $childname = shift;
+ my $spec;
-+ if ($childname) { #{{{
++ if ($childname) {
+ $spec = "$page/$childname or $page/*/$childname";
-+ } #}}}
-+ else { #{{{
++ }
++ else {
+ $spec = "$page/*";
-+ } #}}}
++ }
+
+ return match_relative($page, $spec, @_);
-+} #}}}
++}
+
+1
</pre>
diff --git a/doc/todo/provide_sha1_for_git_diffurl.mdwn b/doc/todo/provide_sha1_for_git_diffurl.mdwn
index 9c8b340de..01aa512f8 100644
--- a/doc/todo/provide_sha1_for_git_diffurl.mdwn
+++ b/doc/todo/provide_sha1_for_git_diffurl.mdwn
@@ -10,7 +10,7 @@ diffurls of the following form:
index 5bef928..164210d 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
- @@ -518,6 +518,7 @@ sub rcs_recentchanges ($) { #{{{
+ @@ -518,6 +518,7 @@ sub rcs_recentchanges ($) {
my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
$diffurl =~ s/\[\[file\]\]/$file/go;
diff --git a/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn b/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn
index dfeacbabd..3b9f6c0fd 100644
--- a/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn
+++ b/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn
@@ -54,3 +54,5 @@ the templates. I'd prefer not having to touch Perl though...
-----
Yes, Template::Toolkit is very powerful. But I think it's somehow overkill for a wiki. HTML::Template can keep things simple, though. --[weakish](http://weakish.int.eu.org/blog/)
+
+I'd have to agree that Template::Toolkit is overkill and personally I'm not a fan, but it is very popular (there is even a book) and the new version (3) is alleged to be much more nimble than current version. --[[ajt]]
diff --git a/doc/todo/require_CAPTCHA_to_edit.mdwn b/doc/todo/require_CAPTCHA_to_edit.mdwn
index 110b4167f..83ba07eb0 100644
--- a/doc/todo/require_CAPTCHA_to_edit.mdwn
+++ b/doc/todo/require_CAPTCHA_to_edit.mdwn
@@ -91,15 +91,15 @@ ignored.
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
-@@ -18,6 +18,7 @@ sub getopt () { #{{{
+@@ -18,6 +18,7 @@ sub getopt () {
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("openidsignup=s" => \$config{openidsignup});
+ GetOptions("openidneedscaptcha=s" => \$config{openidneedscaptcha});
- } #}}}
+ }
- sub formbuilder_setup (@) { #{{{
-@@ -61,6 +62,7 @@ sub formbuilder_setup (@) { #{{{
+ sub formbuilder_setup (@) {
+@@ -61,6 +62,7 @@ sub formbuilder_setup (@) {
# Skip all other required fields in this case.
foreach my $field ($form->field) {
next if $field eq "openid_url";
@@ -107,7 +107,7 @@ ignored.
$form->field(name => $field, required => 0,
validate => '/.*/');
}
-@@ -96,6 +98,18 @@ sub validate ($$$;$) { #{{{
+@@ -96,6 +98,18 @@ sub validate ($$$;$) {
}
}
@@ -152,19 +152,19 @@ use warnings;
use strict;
use IkiWiki 2.00;
-sub import { #{{{
+sub import {
hook(type => "formbuilder_setup", id => "recaptcha", call => \&formbuilder_setup);
-} # }}}
+}
-sub getopt () { #{{{
+sub getopt () {
eval q{use Getopt::Long};
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("reCaptchaPubKey=s" => \$config{reCaptchaPubKey});
GetOptions("reCaptchaPrivKey=s" => \$config{reCaptchaPrivKey});
-} #}}}
+}
-sub formbuilder_setup (@) { #{{{
+sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
@@ -274,7 +274,7 @@ EOTAGS
});
}
}
-} # }}}
+}
# The following function is borrowed from
# Captcha::reCAPTCHA by Andy Armstrong and are under the PERL Artistic License
diff --git a/doc/todo/source_link.mdwn b/doc/todo/source_link.mdwn
index 93791c81a..b051361a8 100644
--- a/doc/todo/source_link.mdwn
+++ b/doc/todo/source_link.mdwn
@@ -1,6 +1,6 @@
How about a direct link from the page header to the source of the latest version, to avoid the need to either use edit or navigate to the current version via the history link?
- I'd like this too (and might try to implement it). -- [[jondowland]]
+ I'd like this too (and might try to implement it). -- [[users/jon]]
I just implemented this. There is one [[patch]] to the default page template, and a new plugin. -- [[Will]]
@@ -31,13 +31,13 @@ I just implemented this. There is one [[patch]] to the default page template, a
use IkiWiki;
use open qw{:utf8 :std};
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "getsource", call => \&getsetup);
hook(type => "pagetemplate", id => "getsource", call => \&pagetemplate);
hook(type => "sessioncgi", id => "getsource", call => \&cgi_getsource);
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
@@ -50,9 +50,9 @@ I just implemented this. There is one [[patch]] to the default page template, a
safe => 1,
rebuild => 0,
},
- } #}}}
+ }
- sub pagetemplate (@) { #{{{
+ sub pagetemplate (@) {
my %params=@_;
my $page=$params{page};
@@ -62,9 +62,9 @@ I just implemented this. There is one [[patch]] to the default page template, a
$template->param(getsourceurl => IkiWiki::cgiurl(do => "getsource", page => $page));
$template->param(have_actions => 1);
}
- } # }}}
+ }
- sub cgi_getsource ($$) { #{{{
+ sub cgi_getsource ($$) {
my $cgi=shift;
my $session=shift;
diff --git a/doc/todo/structured_page_data.mdwn b/doc/todo/structured_page_data.mdwn
index 2a196ed23..22f67cc0a 100644
--- a/doc/todo/structured_page_data.mdwn
+++ b/doc/todo/structured_page_data.mdwn
@@ -257,21 +257,21 @@ in a large number of other cases.
use CGI::FormBuilder;
use IkiWiki 2.00;
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "form", call => \&getsetup);
hook(type => "htmlize", id => "form", call => \&htmlize);
hook(type => "sessioncgi", id => "form", call => \&cgi_submit);
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
rebuild => 1, # format plugin
},
- } #}}}
+ }
- sub makeFormFromYAML ($$$) { #{{{
+ sub makeFormFromYAML ($$$) {
my $page = shift;
my $YAMLString = shift;
my $q = shift;
@@ -350,9 +350,9 @@ in a large number of other cases.
# IkiWiki::decode_form_utf8($form);
return $form;
- } #}}}
+ }
- sub htmlize (@) { #{{{
+ sub htmlize (@) {
my %params=@_;
my $content = $params{content};
my $page = $params{page};
@@ -360,9 +360,9 @@ in a large number of other cases.
my $form = makeFormFromYAML($page, $content, undef);
return $form->render(submit => 'Update Form');
- } # }}}
+ }
- sub cgi_submit ($$) { #{{{
+ sub cgi_submit ($$) {
my $q=shift;
my $session=shift;
@@ -425,11 +425,11 @@ in a large number of other cases.
}
exit;
- } #}}}
+ }
package IkiWiki::PageSpec;
- sub match_form_eq ($$;@) { #{{{
+ sub match_form_eq ($$;@) {
my $page=shift;
my $argSet=shift;
my @args=split(/,/, $argSet);
@@ -460,7 +460,7 @@ in a large number of other cases.
} else {
return IkiWiki::FailReason->new("field value does not match");
}
- } #}}}
+ }
1
@@ -476,22 +476,22 @@ in a large number of other cases.
my $inTable = 0;
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "data", call => \&getsetup);
hook(type => "needsbuild", id => "data", call => \&needsbuild);
hook(type => "preprocess", id => "data", call => \&preprocess, scan => 1);
hook(type => "preprocess", id => "datatable", call => \&preprocess_table, scan => 1); # does this need scan?
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
rebuild => 1, # format plugin
},
- } #}}}
+ }
- sub needsbuild (@) { #{{{
+ sub needsbuild (@) {
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{data}) {
@@ -506,7 +506,7 @@ in a large number of other cases.
}
}
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my @argslist = @_;
my %params=@argslist;
@@ -546,9 +546,9 @@ in a large number of other cases.
}
return $html;
- } # }}}
+ }
- sub preprocess_table (@) { #{{{
+ sub preprocess_table (@) {
my %params=@_;
my @lines;
@@ -568,11 +568,11 @@ in a large number of other cases.
push @lines, '</table>';
return join("\n", @lines);
- } #}}}
+ }
package IkiWiki::PageSpec;
- sub match_data_eq ($$;@) { #{{{
+ sub match_data_eq ($$;@) {
my $page=shift;
my $argSet=shift;
my @args=split(/,/, $argSet);
@@ -592,9 +592,9 @@ in a large number of other cases.
} else {
return IkiWiki::FailReason->new("value does not match");
}
- } #}}}
+ }
- sub match_data_link ($$;@) { #{{{
+ sub match_data_link ($$;@) {
my $page=shift;
my $argSet=shift;
my @params=@_;
@@ -618,6 +618,6 @@ in a large number of other cases.
}
return IkiWiki::FailReason->new("No data link on page $page with key $key matches glob $value");
- } #}}}
+ }
1
diff --git a/doc/todo/support_creole_markup.mdwn b/doc/todo/support_creole_markup.mdwn
index b0ebf5b9e..5a1e1286d 100644
--- a/doc/todo/support_creole_markup.mdwn
+++ b/doc/todo/support_creole_markup.mdwn
@@ -12,7 +12,7 @@ And there is a perl module: Text::WikiCreole
Syntax file for vim: http://www.peter-hoffmann.com/code/vim/ (Since a typical ikiwiki user usually use external editors. :))
-> Should be pretty easy to add a plugin to do it using [[cpan
+> Should be pretty easy to add a plugin to do it using [[!cpan
> Text::WikiCreole]]. --[[Joey]]
[[done]]
diff --git a/doc/todo/supporting_comments_via_disussion_pages.mdwn b/doc/todo/supporting_comments_via_disussion_pages.mdwn
index e0495c8c2..aae0b3008 100644
--- a/doc/todo/supporting_comments_via_disussion_pages.mdwn
+++ b/doc/todo/supporting_comments_via_disussion_pages.mdwn
@@ -91,14 +91,14 @@ Each comment is processed to something like this:
use strict;
use IkiWiki '1.02';
- sub import { #{{{
+ sub import {
hook(type => "formbuilder_setup", id => "comments",
call => \&formbuilder_setup);
hook(type => "preprocess", id => "blogcomment",
call => \&preprocess);
- } # }}}
+ }
- sub formbuilder_setup (@) { #{{{
+ sub formbuilder_setup (@) {
my %params=@_;
my $cgi = $params{cgi};
my $form = $params{form};
@@ -138,9 +138,9 @@ Each comment is processed to something like this:
$content.=qq{[[!blogcomment from="""$name""" timestamp="""$timestamp""" subject="""$subject""" text="""$comment"""]]\n\n};
$content=~s/\n/\r\n/g;
$form->field(name => "editcontent", value => $content, force => 1);
- } # }}}
+ }
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my %params=@_;
my ($text, $date, $from, $subject, $r);
@@ -159,7 +159,7 @@ Each comment is processed to something like this:
$r .= "</dl>\n" . $text . "</div>\n";
return $r;
- } # }}}
+ }
1;
@@ -213,3 +213,8 @@ do you think so far? Known issues include:
un-wikiish).
--[[smcv]]
+
+I've updated smcvpostcomment and publicised it as [[plugins/contrib/comments]]. --[[smcv]]
+
+> While there is still room for improvement and entirely other approaches,
+> I am calling this done since smcv's comments plugin is ready. --[[Joey]]
diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn
index 2bdeb62be..d9a791c6f 100644
--- a/doc/todo/syntax_highlighting.mdwn
+++ b/doc/todo/syntax_highlighting.mdwn
@@ -7,16 +7,16 @@ pages, as well as doing syntax highlighting as a preprocessor directive
## The big list of possibilities
-* [[plugins/contrib/highlightcode]] uses [[cpan Syntax::Highlight::Engine::Kate]],
+* [[plugins/contrib/highlightcode]] uses [[!cpan Syntax::Highlight::Engine::Kate]],
operates on whole source files only, has a few bugs (see
[here](http://u32.net/Highlight_Code_Plugin/), and needs to be updated to
support [[bugs/multiple_pages_with_same_name]].
-* [[cpan IkiWiki-Plugin-syntax]] only operates as a directive.
+* [[!cpan IkiWiki-Plugin-syntax]] only operates as a directive.
Interestingly, it supports multiple highlighting backends, including Kate
and Vim.
* [[plugins/contrib/syntax]] only operates as a directive
([[not_on_source_code_files|automatic_use_of_syntax_plugin_on_source_code_files]]),
- and uses [[cpan Text::VimColor]].
+ and uses [[!cpan Text::VimColor]].
* [[plugins/contrib/sourcehighlight]] uses src-highlight, and operates on
whole source files only. Needs to be updated to
support [[bugs/multiple_pages_with_same_name]].
@@ -43,7 +43,7 @@ pages, as well as doing syntax highlighting as a preprocessor directive
inside source files. Doing this probably means post-processing the
results of the highlighting engine, to find places where it's highlighted
comments, and then running them through the ikiwiki rendering pipeline.
- This seems fairly doable with [[cpan Syntax::Highlight::Engine::Kate]],
+ This seems fairly doable with [[!cpan Syntax::Highlight::Engine::Kate]],
at least.
* The whole-file plugins tend to have a problem that things that look like
wikilinks in the source code get munged into links by ikiwiki, which can
@@ -90,7 +90,7 @@ like this:
index 8d728c9..1bd46a9 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -618,6 +618,8 @@ sub pagetype ($) { #{{{
+ @@ -618,6 +618,8 @@ sub pagetype ($) {
if ($page =~ /\.([^.]+)$/) {
return $1 if exists $hooks{htmlize}{$1};
@@ -98,7 +98,7 @@ like this:
+ return $page;
}
return;
- } #}}}
+ }
## format directive
diff --git a/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn b/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn
index aaa040ec7..bfc130d69 100644
--- a/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn
+++ b/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn
@@ -10,6 +10,6 @@
+ debug("ctime for '$file': ". localtime($ctime));
return $ctime;
- } #}}}
+ }
[[!tag patch done]]
diff --git a/doc/todo/tmplvars_plugin.mdwn b/doc/todo/tmplvars_plugin.mdwn
index f7d06a579..644cf23aa 100644
--- a/doc/todo/tmplvars_plugin.mdwn
+++ b/doc/todo/tmplvars_plugin.mdwn
@@ -11,12 +11,12 @@ A simple plugin to allow per-page customization of a template by passing paramat
my %tmplvars;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "tmplvars", call => \&preprocess);
hook(type => "pagetemplate", id => "tmplvars", call => \&pagetemplate);
- } # }}}
+ }
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my %params=@_;
if ($params{page} eq $params{destpage}) {
@@ -34,9 +34,9 @@ A simple plugin to allow per-page customization of a template by passing paramat
}
}
- } # }}}
+ }
- sub pagetemplate (@) { #{{{
+ sub pagetemplate (@) {
my %params=@_;
my $template = $params{template};
@@ -47,6 +47,6 @@ A simple plugin to allow per-page customization of a template by passing paramat
}
return undef;
- } # }}}
+ }
1
diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
new file mode 100644
index 000000000..547c7a80a
--- /dev/null
+++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
@@ -0,0 +1,3 @@
+It would be nice if the [[plugins/toc]] plugin let you specify a header level "ceiling" above which (or above and including which) the headers would not be incorporated into the toc.
+
+Currently, the levels=X parameter lets you tweak how deep it will go for small headers, but I'd like to chop off the h1's (as I use them for my page title) -- [[Jon]]
diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn
index 3af0458bd..2832e37aa 100644
--- a/doc/todo/tracking_bugs_with_dependencies.mdwn
+++ b/doc/todo/tracking_bugs_with_dependencies.mdwn
@@ -194,9 +194,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
index 4e4da11..8b3cdfe 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -1550,7 +1550,16 @@ sub globlist_to_pagespec ($) { #{{{
+ @@ -1550,7 +1550,16 @@ sub globlist_to_pagespec ($) {
- sub is_globlist ($) { #{{{
+ sub is_globlist ($) {
my $s=shift;
- return ( $s =~ /[^\s]+\s+([^\s]+)/ && $1 ne "and" && $1 ne "or" );
+ return ! ($s =~ /
@@ -209,19 +209,19 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
+ ) |
+ (\s and \s) | (\s or \s) # or we find 'and' or 'or' somewhere
+ /xs);
- } #}}}
+ }
- sub safequote ($) { #{{{
- @@ -1631,7 +1640,7 @@ sub pagespec_merge ($$) { #{{{
+ sub safequote ($) {
+ @@ -1631,7 +1640,7 @@ sub pagespec_merge ($$) {
return "($a) or ($b)";
- } #}}}
+ }
- -sub pagespec_translate ($) { #{{{
- +sub pagespec_makeperl ($) { #{{{
+ -sub pagespec_translate ($) {
+ +sub pagespec_makeperl ($) {
my $spec=shift;
# Support for old-style GlobLists.
- @@ -1650,12 +1659,14 @@ sub pagespec_translate ($) { #{{{
+ @@ -1650,12 +1659,14 @@ sub pagespec_translate ($) {
|
\) # )
|
@@ -238,7 +238,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
my $word=$1;
if (lc $word eq 'and') {
$code.=' &&';
- @@ -1666,16 +1677,23 @@ sub pagespec_translate ($) { #{{{
+ @@ -1666,16 +1677,23 @@ sub pagespec_translate ($) {
elsif ($word eq "(" || $word eq ")" || $word eq "!") {
$code.=' '.$word;
}
@@ -265,14 +265,14 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
}
}
- @@ -1683,8 +1701,18 @@ sub pagespec_translate ($) { #{{{
+ @@ -1683,8 +1701,18 @@ sub pagespec_translate ($) {
$code=0;
}
+ return 'sub { my $page=shift; my %params = @_; '.$code.' }';
- +} #}}}
+ +}
+
- +sub pagespec_translate ($) { #{{{
+ +sub pagespec_translate ($) {
+ my $spec=shift;
+
+ my $code = pagespec_makeperl($spec);
@@ -282,19 +282,19 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
no warnings;
- return eval 'sub { my $page=shift; '.$code.' }';
+ return eval $code;
- } #}}}
+ }
- sub pagespec_match ($$;@) { #{{{
- @@ -1699,7 +1727,7 @@ sub pagespec_match ($$;@) { #{{{
+ sub pagespec_match ($$;@) {
+ @@ -1699,7 +1727,7 @@ sub pagespec_match ($$;@) {
my $sub=pagespec_translate($spec);
return IkiWiki::FailReason->new("syntax error in pagespec \"$spec\"") if $@;
- return $sub->($page, @params);
+ return $sub->($page, @params, specFuncs => {});
- } #}}}
+ }
- sub pagespec_valid ($) { #{{{
- @@ -1748,11 +1776,78 @@ sub new { #{{{
+ sub pagespec_valid ($) {
+ @@ -1748,11 +1776,78 @@ sub new {
package IkiWiki::PageSpec;
@@ -361,7 +361,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
+ }
+}
+
- sub match_glob ($$;@) { #{{{
+ sub match_glob ($$;@) {
my $page=shift;
my $glob=shift;
my %params=@_;
@@ -373,9 +373,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
my $from=exists $params{location} ? $params{location} : '';
# relative matching
- @@ -1782,11 +1877,12 @@ sub match_internal ($$;@) { #{{{
+ @@ -1782,11 +1877,12 @@ sub match_internal ($$;@) {
- sub match_link ($$;@) { #{{{
+ sub match_link ($$;@) {
my $page=shift;
- my $link=lc(shift);
+ my $fulllink=shift;
@@ -388,7 +388,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
# relative matching
if ($link =~ m!^\.! && defined $from) {
$from=~s#/?[^/]+$##;
- @@ -1804,19 +1900,32 @@ sub match_link ($$;@) { #{{{
+ @@ -1804,19 +1900,32 @@ sub match_link ($$;@) {
}
else {
return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
@@ -397,9 +397,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
}
}
return IkiWiki::FailReason->new("$page does not link to $link");
- } #}}}
+ }
- sub match_backlink ($$;@) { #{{{
+ sub match_backlink ($$;@) {
- return match_link($_[1], $_[0], @_);
+ my $page=shift;
+ my $backlink=shift;
@@ -410,9 +410,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
+ }
+
+ return match_link($backlink, $page, @params);
- } #}}}
+ }
- sub match_created_before ($$;@) { #{{{
+ sub match_created_before ($$;@) {
my $page=shift;
my $testpage=shift;
+ my @params=@_;
@@ -423,8 +423,8 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
if (exists $IkiWiki::pagectime{$testpage}) {
if ($IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage}) {
- @@ -1834,6 +1943,11 @@ sub match_created_before ($$;@) { #{{{
- sub match_created_after ($$;@) { #{{{
+ @@ -1834,6 +1943,11 @@ sub match_created_before ($$;@) {
+ sub match_created_after ($$;@) {
my $page=shift;
my $testpage=shift;
+ my @params=@_;
diff --git a/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn b/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
index 87e55685c..14bb43782 100644
--- a/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
+++ b/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
@@ -8,7 +8,7 @@ I think this (untested) patch might just do the trick:
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
- @@ -46,8 +46,13 @@ sub preprocess (@) { #{{{
+ @@ -46,8 +46,13 @@ sub preprocess (@) {
$pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
@@ -21,9 +21,9 @@ I think this (untested) patch might just do the trick:
+ else {
+ return '';
+ }
- } # }}}
+ }
- sub formbuilder (@) { #{{{
+ sub formbuilder (@) {
--[[madduck]]
diff --git a/doc/todo/using_meta_titles_for_parentlinks.html b/doc/todo/using_meta_titles_for_parentlinks.html
index d04e5a300..6da40a415 100644
--- a/doc/todo/using_meta_titles_for_parentlinks.html
+++ b/doc/todo/using_meta_titles_for_parentlinks.html
@@ -82,9 +82,9 @@ diff -c /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib /usr/share/perl5/IkiWiki
*** 289,294 ****
--- 290,319 ----
}
- } #}}}
+ }
-+ sub IkiWiki::pagetitle ($;$) { #{{{
++ sub IkiWiki::pagetitle ($;$) {
+ my $page=shift;
+ my $unescaped=shift;
+
@@ -106,11 +106,11 @@ diff -c /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib /usr/share/perl5/IkiWiki
+ }
+
+ return $page;
-+ } #}}}
++ }
+
package IkiWiki::PageSpec;
- sub match_title ($$;@) { #{{{
+ sub match_title ($$;@) {
</pre>
diff --git a/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn b/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn
index 492a32b36..b28469993 100644
--- a/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn
+++ b/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn
@@ -157,9 +157,9 @@ ManojSrivastava
+=cut
+
+
-+sub import { #{{{
++sub import {
+ hook(type => "pagetemplate", id => "varioki", call => \&pagetemplate);
-+} # }}}
++}
+
+
+=pod
@@ -175,7 +175,7 @@ ManojSrivastava
+
+=cut
+
-+sub pagetemplate (@) { #{{{
++sub pagetemplate (@) {
+ my %params=@_;
+ my $page=$params{page};
+ my $template=$params{template};
@@ -207,7 +207,7 @@ ManojSrivastava
+ $template->param("$var" =>"$value");
+ }
+ }
-+} # }}}
++}
+
+1;
+