]> git.vanrenterghem.biz Git - git.ikiwiki.info.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.

14 files changed:
IkiWiki.pm
IkiWiki/CGI.pm
basewiki/subpage/linkingrules.mdwn
debian/changelog
doc/index/chris.mdwn [deleted file]
doc/jeremyreed.mdwn [deleted file]
doc/joey.mdwn [deleted file]
doc/jonassmedegaard.mdwn [deleted file]
doc/todo/userdir_links.mdwn
doc/users.mdwn [new file with mode: 0644]
doc/users/chris.mdwn [new file with mode: 0644]
doc/users/jeremyreed.mdwn [new file with mode: 0644]
doc/users/joey.mdwn [new file with mode: 0644]
doc/users/jonassmedegaard.mdwn [new file with mode: 0644]

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
 
diff --git a/doc/index/chris.mdwn b/doc/index/chris.mdwn
deleted file mode 100644 (file)
index ed9f0e6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Chris is Chris Green, an ancient C/C++/Java programmer, I started around 1982 or 1983.
-
-I was programming even before that in assembler and things like that, I was first programming for a living in about 1970.
-
-I'm considering using ikiwiki for keeping notes and maybe a ToDo list etc.
\ No newline at end of file
diff --git a/doc/jeremyreed.mdwn b/doc/jeremyreed.mdwn
deleted file mode 100644 (file)
index 3ae8e0d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-I am testing ikiwiki. I made a RCS plugin.
\ No newline at end of file
diff --git a/doc/joey.mdwn b/doc/joey.mdwn
deleted file mode 100644 (file)
index c60c76f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Joey Hess is <a href="mailto:joey@kitenet.net">joey@kitenet.net</a>. 
-His web page is [here](http://kitenet.net/~joey/).
-
-Joey hates programming web crap, and hates being locked into a web browser
-to do something, and this probably shows in the design choices made in
-ikiwiki.
diff --git a/doc/jonassmedegaard.mdwn b/doc/jonassmedegaard.mdwn
deleted file mode 100644 (file)
index 6538839..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Jonas Smedegaard is a Debian developer, like joey. A big fan of this novel approach to wiki: serving as pages static!
-
-JonasSmedegaard maintains the packaging of another wiki - MoinMoin - for Debian, but is personally tired of the heavy burden of Python on his web servers.
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.
diff --git a/doc/users/chris.mdwn b/doc/users/chris.mdwn
new file mode 100644 (file)
index 0000000..ed9f0e6
--- /dev/null
@@ -0,0 +1,5 @@
+Chris is Chris Green, an ancient C/C++/Java programmer, I started around 1982 or 1983.
+
+I was programming even before that in assembler and things like that, I was first programming for a living in about 1970.
+
+I'm considering using ikiwiki for keeping notes and maybe a ToDo list etc.
\ No newline at end of file
diff --git a/doc/users/jeremyreed.mdwn b/doc/users/jeremyreed.mdwn
new file mode 100644 (file)
index 0000000..3ae8e0d
--- /dev/null
@@ -0,0 +1 @@
+I am testing ikiwiki. I made a RCS plugin.
\ No newline at end of file
diff --git a/doc/users/joey.mdwn b/doc/users/joey.mdwn
new file mode 100644 (file)
index 0000000..c60c76f
--- /dev/null
@@ -0,0 +1,6 @@
+Joey Hess is <a href="mailto:joey@kitenet.net">joey@kitenet.net</a>. 
+His web page is [here](http://kitenet.net/~joey/).
+
+Joey hates programming web crap, and hates being locked into a web browser
+to do something, and this probably shows in the design choices made in
+ikiwiki.
diff --git a/doc/users/jonassmedegaard.mdwn b/doc/users/jonassmedegaard.mdwn
new file mode 100644 (file)
index 0000000..6538839
--- /dev/null
@@ -0,0 +1,3 @@
+Jonas Smedegaard is a Debian developer, like joey. A big fan of this novel approach to wiki: serving as pages static!
+
+JonasSmedegaard maintains the packaging of another wiki - MoinMoin - for Debian, but is personally tired of the heavy burden of Python on his web servers.