]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge remote-tracking branch 'smcv/ready/trail'
authorJoey Hess <joey@kitenet.net>
Wed, 18 Apr 2012 19:45:37 +0000 (15:45 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 18 Apr 2012 19:45:37 +0000 (15:45 -0400)
25 files changed:
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/graphviz.pm
IkiWiki/Plugin/link.pm
debian/changelog
doc/bugs/definition_lists_should_be_bold.mdwn
doc/bugs/graphviz_demo_generates_empty_graph.mdwn [new file with mode: 0644]
doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn [new file with mode: 0644]
doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn [new file with mode: 0644]
doc/bugs/renaming_a_page_destroyed_some_links.mdwn [new file with mode: 0644]
doc/forum/access_restrictions:_for_extranet.mdwn [new file with mode: 0644]
doc/forum/access_restrictions:_for_extranet/comment_1_a0666c3c15661fb0fff70f313cd0d47d._comment [new file with mode: 0644]
doc/forum/access_restrictions:_for_extranet/comment_2_563040aa099c9366dc5701eb4bc9c10d._comment [new file with mode: 0644]
doc/ikiwiki/directive/graph.mdwn
doc/ikiwiki/directive/osm/discussion.mdwn
doc/ikiwiki/directive/sidebar/discussion.mdwn [new file with mode: 0644]
doc/ikiwikiusers.mdwn
doc/plugins/notifyemail.mdwn
doc/plugins/poll/discussion.mdwn [new file with mode: 0644]
doc/plugins/trail/discussion.mdwn
doc/sandbox.mdwn
doc/todo/allow_TMPL__95__LOOP_in_template_directives.mdwn
doc/todo/headless_git_branches.mdwn
doc/todo/improved_mediawiki_support.mdwn [new file with mode: 0644]
doc/todo/internal_definition_list_support.mdwn
templates/editpage.tmpl

index d3c6959354eeebf550d199870cbe7a1c5d1a818c..d15607990db2412b8a14f281864f82f98b3cac7f 100644 (file)
@@ -64,7 +64,8 @@ sub cgi_editpage ($$) {
 
        decode_cgi_utf8($q);
 
-       my @fields=qw(do rcsinfo subpage from page type editcontent editmessage);
+       my @fields=qw(do rcsinfo subpage from page type editcontent
+               editmessage subscribe);
        my @buttons=("Save Page", "Preview", "Cancel");
        eval q{use CGI::FormBuilder};
        error($@) if $@;
@@ -157,6 +158,17 @@ sub cgi_editpage ($$) {
                        noimageinline => 1,
                        linktext => "FormattingHelp"));
        
+       my $cansubscribe=IkiWiki::Plugin::notifyemail->can("subscribe")
+               && IkiWiki::Plugin::comments->can("import")
+               && defined $session->param('name');
+       if ($cansubscribe) {
+               $form->field(name => "subscribe", type => "checkbox",
+                       options => [gettext("email comments to me")]);
+       }
+       else {
+               $form->field(name => "subscribe", type => 'hidden');
+       }
+       
        my $previewing=0;
        if ($form->submitted eq "Cancel") {
                if ($form->field("do") eq "create" && defined $from) {
@@ -448,6 +460,12 @@ sub cgi_editpage ($$) {
                        # caches and get the most recent version of the page.
                        redirect($q, $baseurl."?updated");
                }
+
+               if ($cansubscribe && length $form->field("subscribe")) {
+                       my $subspec="comment($page)";
+                       IkiWiki::Plugin::notifyemail::subscribe(
+                               $session->param('name'), $subspec);
+               }
        }
 
        exit;
index b9f997e04b123a11a50aa9dddac82d982fb2fbf7..d4018edaaf9dad384818488356a3e7e8c4d8841c 100644 (file)
@@ -132,6 +132,7 @@ sub graph (@) {
                }, "text");
                $p->parse($src);
                $p->eof;
+               $s=~s/\[ href= \]//g; # handle self-links
                $params{src}=$s;
        }
        else {
index ef01f110702228fb71356d7d76437161f134b156..1ba28eafd6d4912f16d8aa7fa5c16e01ca9f8dea 100644 (file)
@@ -144,9 +144,9 @@ sub renamepage (@) {
        my $old=$params{oldpage};
        my $new=$params{newpage};
 
-       $params{content} =~ s{(?<!\\)$link_regexp}{
-               if (! is_externallink($page, $2, $3)) {
-                       my $linktext=$2;
+       $params{content} =~ s{(?<!\\)($link_regexp)}{
+               if (! is_externallink($page, $3, $4)) {
+                       my $linktext=$3;
                        my $link=$linktext;
                        if (bestlink($page, linkpage($linktext)) eq $old) {
                                $link=pagetitle($new, 1);
@@ -161,9 +161,12 @@ sub renamepage (@) {
                                        $link="/$link";
                                }
                        }
-                       defined $1
-                               ? ( "[[$1|$link".($3 ? "#$3" : "")."]]" )
-                               : ( "[[$link".   ($3 ? "#$3" : "")."]]" )
+                       defined $2
+                               ? ( "[[$2|$link".($4 ? "#$4" : "")."]]" )
+                               : ( "[[$link".   ($4 ? "#$4" : "")."]]" )
+               }
+               else {
+                       $1
                }
        }eg;
 
index 5f94723657891be336af3560b7c7197d9a8ed1d9..689197aea1f0b4a48fb5fc8941db62318c7be413 100644 (file)
@@ -6,7 +6,7 @@ ikiwiki (3.20120204) UNRELEASED; urgency=low
   * meta: Export author information in html <meta> tag. Closes: #664779
     Thanks, Martin Michlmayr
   * notifyemail: New plugin, sends email notifications about new and 
-    changed pages.
+    changed pages, and allows subscribing to comments.
   * Added a "changes" hook. Renamed the "change" hook to "rendered", but
     the old hook name is called for now for back-compat.
   * meta: Support keywords header. Closes: #664780
@@ -21,6 +21,8 @@ ikiwiki (3.20120204) UNRELEASED; urgency=low
     pagenames, not relative wikilink type names. This is necessary to fix
     a bug, and makes pagenames more consistent with the pagespec used
     in the pages parameter. (smcv)
+  * link: Fix renaming wikilinks that contain embedded urls.
+  * graphviz: Handle self-links.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 21 Mar 2012 14:33:14 -0400
 
index 95233f78c4527eae79ecd5f3a06c36e9f9332618..a72206b8c5325062acc34b4794d7c3d9b9481d0f 100644 (file)
@@ -23,3 +23,5 @@ I believe `<dt>` should be made bold. I have added this to my `local.css`, and I
 > browsers. I don't think it's ikiwiki's place to override browser defaults
 > for standard markup in the document body, at least not in the default
 > antitheme. --[[Joey]] 
+
+> > How about in the actiontab theme then? :)
diff --git a/doc/bugs/graphviz_demo_generates_empty_graph.mdwn b/doc/bugs/graphviz_demo_generates_empty_graph.mdwn
new file mode 100644 (file)
index 0000000..5b96f14
--- /dev/null
@@ -0,0 +1,15 @@
+The following code in our sandbox generates an empty graph:
+
+    [[!graph  src=""""
+    google [ href="http://google.com/" ]
+    sandbox [ href=\[[SandBox]] ]
+    help [ href=\[[ikiwiki/formatting]] ]
+    newpage [ href=\[[NewPage]] ]
+    
+    google -> sandbox -> help -> newpage -> help -> google;
+    """"]]
+
+It is the exact same thing that on the [[ikiwiki/directive/graph/]] directive documentation, from the [[plugins/graphviz]] plugin. This is ikiwiki 3.20120203 on Debian wheezy and graphviz is installed (2.26.3-10). Note that the first demo actually works. See <http://mesh.openisp.ca/sandbox>  --[[anarcat]]
+
+> Looking at the example shows too many double quoted. [[fixed|done]]
+> --[[Joey]] 
diff --git a/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn b/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
new file mode 100644 (file)
index 0000000..b179972
--- /dev/null
@@ -0,0 +1 @@
+The [[ikiwiki/directive/listdirectives]]` directive doesn't register a link between the page and the subpages. This is a problem because then the [[ikiwiki/directive/orphans]] directive then marks the directives as orphans... Maybe it is a but with the orphans directive however... A simple workaround is to exclude those files from the orphans call... --[[anarcat]]
diff --git a/doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn b/doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn
new file mode 100644 (file)
index 0000000..b36cfee
--- /dev/null
@@ -0,0 +1,5 @@
+Under some circumstances that remain unclear to me, the usage of `urlto()` in the revised version of the [[plugins/osm]] plugin break the map totally. The javascript console in Chromium tells me the following:
+
+    GET http://mesh.openisp.ca/map/pois.kml/ 404 (Not Found)
+
+Indeed, that URL yields a 404. The proper URL is <http://mesh.openisp.ca/map/pois.kml>. --[[anarcat]
diff --git a/doc/bugs/renaming_a_page_destroyed_some_links.mdwn b/doc/bugs/renaming_a_page_destroyed_some_links.mdwn
new file mode 100644 (file)
index 0000000..0fb717b
--- /dev/null
@@ -0,0 +1,10 @@
+When renaming a page here, ikiwiki destroyed unrelated links from unrelated pages. You can see the effect [here](http://mesh.openisp.ca/recentchanges/#diff-dc8dfa96efd3a4d649f571c3aa776f20b3ce0131), or by checking out the git tree (`git://mesh.openisp.ca/
+`) and looking at commit `dc8dfa96efd3a4d649f571c3aa776f20b3ce0131`.
+
+The renamed page was `configuration/bat-hosts` to `configuration/batman/bat-hosts` and the deleted links were ``\[[AUR | https://aur.archlinux.org/]]` and `\[[CHANGELOG|http://svn.dd-wrt.com:8000/browser/src/router/batman-adv/CHANGELOG]]`. --[[anarcat]]
+
+> <del>Nevermind that, that commit was unrelated to the rename and probably an operator error.</del> - No, actually, I just reproduced this again - see [another example](http://mesh.openisp.ca/recentchanges/#diff-d67dc2f0fdc149b13122fd6cba887a01c693e949).
+
+>> Looks like these all involve the wacky wikilink form that includes an
+>> external url in the link. Fixed rename code to know about those.
+>> [[done]] --[[Joey]]
diff --git a/doc/forum/access_restrictions:_for_extranet.mdwn b/doc/forum/access_restrictions:_for_extranet.mdwn
new file mode 100644 (file)
index 0000000..66f0f7f
--- /dev/null
@@ -0,0 +1,8 @@
+Hi folks,
+
+are there any plugins or best-ways to create a kind of extranet. Just a few pages or namespaces with access restrictions?
+
+There is a [htaccess solution](http://www.branchable.com/forum/Read_access_restrictions/). Would be fine, but only if there are other solutions.
+
+greetz
+klml
diff --git a/doc/forum/access_restrictions:_for_extranet/comment_1_a0666c3c15661fb0fff70f313cd0d47d._comment b/doc/forum/access_restrictions:_for_extranet/comment_1_a0666c3c15661fb0fff70f313cd0d47d._comment
new file mode 100644 (file)
index 0000000..767fb7c
--- /dev/null
@@ -0,0 +1,29 @@
+[[!comment format=mdwn
+ username="http://smcv.pseudorandom.co.uk/"
+ nickname="smcv"
+ subject="comment 1"
+ date="2012-04-15T20:53:44Z"
+ content="""
+Read/view access and write/edit access are rather different.
+You can limit write access via wiki configuration, and even
+configure it over the web with [[plugins/websetup]].
+
+The only way to limit read access is to restrict access to the
+ entire wiki via `.htaccess` or other web server configuration,
+preferably combined with use of `https`.
+IkiWiki can't limit read access to pages on its own[*],
+because it's a wiki compiler: when a page is viewed, the web
+server serves the compiled HTML without IkiWiki being involved.
+
+The best way to integrate access control into IkiWiki would
+probably be to have a CGI user interface for `.htaccess` or
+equivalent - but you'd still have to be careful, because,
+for instance, if a user can edit public pages, then they
+can insert a `\[[!include]]` directive to make the content
+of a private page public. As a result, the safest way to
+use it is to keep public and private information in
+separate wikis.
+
+[\*] strictly speaking, it *could* via a new plugin, but
+that would defeat many of its advantages
+"""]]
diff --git a/doc/forum/access_restrictions:_for_extranet/comment_2_563040aa099c9366dc5701eb4bc9c10d._comment b/doc/forum/access_restrictions:_for_extranet/comment_2_563040aa099c9366dc5701eb4bc9c10d._comment
new file mode 100644 (file)
index 0000000..75b9d49
--- /dev/null
@@ -0,0 +1,20 @@
+[[!comment format=mdwn
+ username="klml"
+ ip="188.174.93.195"
+ subject="comment 2"
+ date="2012-04-16T19:57:20Z"
+ content="""
+hi smcv,
+
+> when a page is viewed, the web server serves the compiled HTML without IkiWiki being involved.
+
+yes you are right, but I still think its a feature ;)
+
+> The best way to integrate access control into IkiWiki would probably be to have a CGI user interface for .htaccess or equivalent - but you'd still have to be careful, because, for instance, if a user can edit public pages, then they can insert a \[[!include]] directive to make the content of a private page public. 
+
+My usecase is a website with an small internal area, its just for not \"so public\" files, no private files. And I only have some trusted users.
+
+thx
+klml
+
+"""]]
index 8b066c2f2a64fa4f7022f713b9035873a86bbbbd..7021e47fb6a64d7e5c27fba2b98c79fab0275908 100644 (file)
@@ -9,14 +9,14 @@ Nodes on the graph can link to external urls using regular graphviz syntax,
 and a clickable imagemap will be created. As a special extension for
 ikiwiki, [[WikiLinks|ikiwiki/wikilink]] can also be used. For example:
 
-       \[[!graph src=""""
+       \[[!graph src="""
        google [ href="http://google.com/" ]
        sandbox [ href=\[[SandBox]] ]
        help [ href=\[[ikiwiki/formatting]] ]
        newpage [ href=\[[NewPage]] ]
        
        google -> sandbox -> help -> newpage -> help -> google;
-       """"]]
+       """]]
 
 The `graph` directive supports the following parameters:
 
index f29a14cdca14cd3f0207243ebce3402b5ad1df14..d9eb56951677fa85fb22451a14eee15cec1fb179 100644 (file)
@@ -8,4 +8,6 @@ The map ceased to be generated, basically. --[[anarcat]]
 
 > Weird. This went away after adding debugging. No clue what happened here. But note that this following debugging code was quite useful in the output of --rebuild:
 
-         debug("writing pois file pois.kml in " . $config{destdir} . "/$map");
+        debug("writing pois file pois.kml in " . $config{destdir} . "/$map");
+
+The `width` and `height` parameters of the `[[!osm]]` directive stopped working after that upgrade too. The map doesn't show at all when they are added to the directive. --[[anarcat]]
diff --git a/doc/ikiwiki/directive/sidebar/discussion.mdwn b/doc/ikiwiki/directive/sidebar/discussion.mdwn
new file mode 100644 (file)
index 0000000..cc2dec2
--- /dev/null
@@ -0,0 +1,8 @@
+Things can get messy if you have enabled the global sidebar setting and you browse the `ikiwiki/directive/*` pages. You will get the content of `ikiwiki/directive/sidebar` as a sidebar to all the directives page... I have emptied the sidebar.mdwn page on our wiki to work around that, but isn't this a bug? --[[anarcat]]
+
+> Another reason to dislike the global sidebar option and wish it didn't
+> exist, as if I didn't have a dozen already. However, renaming this page
+> does not seem like an appropriate fix; adding cruft to every directive/
+> page to force the sidebar off does not seem like an appropriate fix; 
+> this leaves only special casing the plugin to not treat this page as a
+> sidebar, but that's disgusting. --[[Joey]] 
index 7ede47e998ea494050ca8fbe911c7ca8f94e3c2d..77736629191eded21942be188e37c582e466a2c3 100644 (file)
@@ -177,3 +177,4 @@ Personal sites and blogs
 * [Salient Dream](http://www.salientdream.com/) - All Things Strange. 
 * [Kafe-in.net](https://www.kafe-in.net/) Ugly personnal blog.
 * [Anton Berezin's blog](http://blog.tobez.org/)
+* [Waldgarten]( http://waldgarten.greenonion.org/ ) News and documentation of a permaculture inspired neighbourhood-garden located in Hamburg, Germany.
index 299cab8b116af03a3604b7c9feabdf37c624af2a..302979e6efa8a55b0a9056b3ef8544dbb7b3d54a 100644 (file)
@@ -10,5 +10,5 @@ matching the PageSpec will send an email that includes the new content of
 the page, and a link to the page on the web.
 
 To make it easy to subscribe to comment threads when posting a comment,
-there is a check box that can be used to subscribe, without needing to
-manually edit the [[ikiwiki/PageSpec]].
+or a page, there is a check box that can be used to subscribe, without
+needing to manually edit the [[ikiwiki/PageSpec]].
diff --git a/doc/plugins/poll/discussion.mdwn b/doc/plugins/poll/discussion.mdwn
new file mode 100644 (file)
index 0000000..eed3f6e
--- /dev/null
@@ -0,0 +1 @@
+Has anyone given any thought to approval voting (ie. marking more than one option), ranking or more complex decision-making protocols here? --[[anarcat]]
index e151466f9f30621398522245d080a975e7885dbe..4218553bb400146d89acbdd36beadc0e46d821d6 100644 (file)
@@ -87,3 +87,17 @@ t/trail.t .................... 1/?
 >> utime or sleep; I chose utime, since sleeping for 1 second would
 >> slow down the test significantly. Please merge or cherry-pick
 >> `smcv/trail-test` (there's only one commit). --[[smcv]]
+
+----
+
+[[!template id=gitbranch branch=smcv/ready/trail author=smcv]]
+
+Some later changes to trail:
+
+* Display the trail links at beginning/end of default `page.tmpl`
+  as suggested on IRC
+* Improve CSS, particularly in blueview and goldtype themes
+  ([example](http://blueview.hosted.pseudorandom.co.uk/posts/second_post/))
+* Fix a possible bug regarding state deletion
+
+--[[smcv]]
index ed1568f8241c165f1e5ed993da9b7e9b728d049d..432652d3a495800a279ca385634ce6ac0d99b6a1 100644 (file)
@@ -181,3 +181,5 @@ This is simple enough for now [[sandbocen]] no?
     Do code tags work?
 
 test by max
+
+test by bbb
index 1aafb173b967e72023f94386a1df88d20285df73..6d0bd0971e79597a90609a527cdd0a3a211054c7 100644 (file)
@@ -6,10 +6,14 @@ Simply copied this from my website
 feel free to reformat / delete"""]]
 
 The following re-write allows for multiple definitions of the
-same tag value in a template definition.  This, in turn, allows
-us to use TMPL_LOOPS in our template directives; all-be-it in a
+same tag value in a [[plugins/template]] definition.  This, in turn, allows
+us to use TMPL_LOOPS in our [[ikiwiki/directive/template]] directives; all-be-it in a
 rather limited way.
 
+> I'm willing to consider such a feature, but it needs to be presented in
+> the form of a patch that is reviewable, not a gratuitous rewrite.
+> --[[Joey]] 
+
 I would, personally, only use this feature for very basic loops
 and, although nested loops *might* be possible (with a little
 more tinkering) it think any attempt would be better served by
index 4dbbc1cc811aae40184df3769c75cdf60566b88e..df583231985a307fc3841032b89b007d807a44fb 100644 (file)
@@ -84,6 +84,7 @@ at git show-ref to desice whether to throw an error or not.
 +              }
        }
  }
+
 </pre>
 
 Same concern here about extra work. Code path is nearly as hot, being
diff --git a/doc/todo/improved_mediawiki_support.mdwn b/doc/todo/improved_mediawiki_support.mdwn
new file mode 100644 (file)
index 0000000..68cbcf7
--- /dev/null
@@ -0,0 +1,9 @@
+[[!tag patch todo wishlist]]
+
+I several updates to the mediawiki plugin to improve compatibility, improving img and File: support.  I'd love to get them upstream.  Is there any interest?  Patches are at [[http://www.isi.edu/~johnh/SOFTWARE/IKIWIKI/index.html]]
+
+> The mediawiki plugin has never been included in ikiwiki, it's
+> [provided by a third party](https://github.com/jmtd/mediawiki.pm) and
+> you should send your patches to them.
+> [[done]]
+> --[[Joey]] 
index 9b2a1689cc0db01193e73b0aa0a6545db66540cd..108b2ff4842e9b643eaf768e81321dbc7afef788 100644 (file)
@@ -36,7 +36,7 @@ Then for us running the humongous [[koumbit wiki|https://wiki.koumbit.net/]], it
 
 If there are no objections to that concept, I may try to start coding patches. Otherwise this is really just a [[wishlist]]. --[[anarcat]]
 
-> Have you looked at the [[plugins/contrib/field]] plugin? This gives you the infrastructure, and all you need is to write a plugin that parses the definition list format.  Then you could use [[plugins/contrib/getfield]], [[plugins/contrib/ftemplate]] and/or [[plugins/contrib/report]] to do what you like with the data.
+> Have you looked at the [[/plugins/contrib/field]] plugin? This gives you the infrastructure, and all you need is to write a plugin that parses the definition list format.  Then you could use [[/plugins/contrib/getfield]], [[/plugins/contrib/ftemplate]] and/or [[/plugins/contrib/report]] to do what you like with the data.
 > --[[KathrynAndersen]]
 
 > ----
index 696c8dcad197134bb7264d17d9f5cf950c24aba0..4736c95d0a8197d32d37f72fd7ab27ae48788553 100644 (file)
 <TMPL_VAR FIELD-EDITCONTENT><br />
 </div>
 <TMPL_IF NAME="CAN_COMMIT">
-<label for="editmessage" class="block">Optional comment about this change:</label>
+<label for="editmessage" class="block">Optional description of this change:</label>
 <TMPL_VAR FIELD-EDITMESSAGE><br />
 </TMPL_IF>
 <TMPL_VAR FORM-SUBMIT>
 <TMPL_VAR HELPONFORMATTINGLINK>
 <TMPL_IF NAME="FIELD-ATTACHMENT">
 <a class="toggle" href="#attachments">Attachments</a>
+</TMPL_IF>
+<TMPL_VAR FIELD-SUBSCRIBE>
+<TMPL_IF NAME="FIELD-ATTACHMENT">
 <div class="<TMPL_VAR ATTACHMENTS-CLASS>" id="attachments">
 <div id="fileupload"> 
 <script>