]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* If a userdir is configured, links to pages in it can be made without
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 29 Dec 2006 05:33:20 +0000 (05:33 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 29 Dec 2006 05:33:20 +0000 (05:33 +0000)
  specifying the path. This allows for easy signing of comments by linking
  to your page in the userdir.

IkiWiki.pm
IkiWiki/CGI.pm
basewiki/subpage/linkingrules.mdwn
debian/changelog
doc/todo/userdir_links.mdwn
doc/users.mdwn [new file with mode: 0644]
doc/users/chris.mdwn [moved from doc/index/chris.mdwn with 100% similarity]
doc/users/jeremyreed.mdwn [moved from doc/jeremyreed.mdwn with 100% similarity]
doc/users/joey.mdwn [moved from doc/joey.mdwn with 100% similarity]
doc/users/jonassmedegaard.mdwn [moved from doc/jonassmedegaard.mdwn with 100% similarity]

index 2ee27ac3e7cf1fa6ac5d38a6a4917fd9eb00c770..960d4da990e767837daea2bcfa9de0ff850e6a09 100644 (file)
@@ -319,6 +319,10 @@ sub bestlink ($$) { #{{{
                }
        } while $cwd=~s!/?[^/]+$!!;
 
+       if (length $config{userdir} && exists $links{"$config{userdir}/".lc($link)}) {
+               return $links{"$config{userdir}/".lc($link)};
+       }
+
        #print STDERR "warning: page $page, broken link: $link\n";
        return "";
 } #}}}
index 511358ff55046157cfd7635800153d9c19f5dbb6..7f84f345a23e153074f3ff8b9c9db52c39871dd7 100644 (file)
@@ -419,6 +419,8 @@ sub cgi_editpage ($$) { #{{{
                                        push @page_locs, $dir.$page;
                                }
                        }
+                       push @page_locs, "$config{userdir}/$page"
+                               if length $config{userdir};
 
                        @page_locs = grep {
                                ! exists $pagecase{lc $_} &&
index c07a81387f537b514a6f921450277ab4d15cb7bf..c1062304aa9d8215ff6afd406c84e4e8de32bbe5 100644 (file)
@@ -25,3 +25,8 @@ to link to, when there are multiple pages with similar names and the link
 goes to the wrong page by default. For example, linking from
 "FooBar/SubPage" to  "/OtherPage" will link to the "OtherPage" in the root
 of the wiki, even if there is a "FooBar/OtherPage".
+
+Also, if the wiki is configured with a userdir, you can link to pages
+within the userdir without specifying a path to them. This is to allow for
+easy linking to a user's page in the userdir, to sign a comment. These
+links are checked for last of all.
index 9d6b7a42a7539d83779769945cdadb3e3e1ea062..0735c2db7091969100636f9e61855528e41b94e4 100644 (file)
@@ -20,8 +20,11 @@ ikiwiki (1.37) UNRELEASED; urgency=low
   * Don't put discussion links on discussion pages.
   * Allow disabling of plugins included in goodstuff.
   * Add a textile format plugin contributed by mazirian.
+  * If a userdir is configured, links to pages in it can be made without
+    specifying the path. This allows for easy signing of comments by linking
+    to your page in the userdir.
 
- -- Joey Hess <joeyh@debian.org>  Fri, 29 Dec 2006 00:17:58 -0500
+ -- Joey Hess <joeyh@debian.org>  Fri, 29 Dec 2006 00:26:47 -0500
 
 ikiwiki (1.36) unstable; urgency=low
 
index 02ebea6d625a00c648d8f6cb1926b0b4d18606ae..02dbdaa659ef4c113c9f0a4a71de9e05fec462fa 100644 (file)
@@ -1,3 +1,5 @@
 The userdir should be searched at the end of the search "path" for links,
 so that users can put their pages in the userdir, and still link to them
 easily when signing things, without giving a path.
+
+[[todo/done]]
diff --git a/doc/users.mdwn b/doc/users.mdwn
new file mode 100644 (file)
index 0000000..3b8434a
--- /dev/null
@@ -0,0 +1,5 @@
+See [[IkiwikiUsers]] for the list of sites using ikiwiki.
+
+Users of this wiki, feel free to create a subpage of this one and talk
+about yourself on it, within reason. You can link to it to sign your
+comments.
similarity index 100%
rename from doc/index/chris.mdwn
rename to doc/users/chris.mdwn
similarity index 100%
rename from doc/joey.mdwn
rename to doc/users/joey.mdwn