]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Allow multiple tag settings to appear in a single page.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 14 Feb 2007 04:05:08 +0000 (04:05 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 14 Feb 2007 04:05:08 +0000 (04:05 +0000)
IkiWiki/Plugin/tag.pm
debian/changelog
doc/bugs/problem_adding_tag_from_template.mdwn
doc/plugins/htmlscrubber.mdwn
doc/plugins/inline.mdwn
doc/plugins/mdwn.mdwn
doc/plugins/passwordauth.mdwn
doc/plugins/template.mdwn
po/ikiwiki.pot

index 29d1d030a2e328088feb1244d98e934b226dc227..b06eadd13d055bb31fda8567581caa8278a76ab9 100644 (file)
@@ -41,9 +41,8 @@ sub preprocess (@) { #{{{
        delete $params{page};
        delete $params{destpage};
 
        delete $params{page};
        delete $params{destpage};
 
-       $tags{$page} = [];
        foreach my $tag (keys %params) {
        foreach my $tag (keys %params) {
-               push @{$tags{$page}}, $tag;
+               $tags{$page}{$tag}=1;
                # hidden WikiLink
                push @{$links{$page}}, tagpage($tag);
        }
                # hidden WikiLink
                push @{$links{$page}}, tagpage($tag);
        }
@@ -60,13 +59,14 @@ sub pagetemplate (@) { #{{{
        $template->param(tags => [
                map { 
                        link => htmllink($page, $destpage, tagpage($_))
        $template->param(tags => [
                map { 
                        link => htmllink($page, $destpage, tagpage($_))
-               }, @{$tags{$page}}
-       ]) if exists $tags{$page} && @{$tags{$page}} && $template->query(name => "tags");
+               }, sort keys %{$tags{$page}}
+       ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags");
 
        if ($template->query(name => "categories")) {
                # It's an rss/atom template. Add any categories.
 
        if ($template->query(name => "categories")) {
                # It's an rss/atom template. Add any categories.
-               if (exists $tags{$page} && @{$tags{$page}}) {
-                       $template->param(categories => [map { category => $_ }, @{$tags{$page}}]);
+               if (exists $tags{$page} && %{$tags{$page}}) {
+                       $template->param(categories => [map { category => $_ },
+                               sort keys %{$tags{$page}}]);
                }
        }
 } # }}}
                }
        }
 } # }}}
index 80a47c458f283e0a88b70ce65c730135b20f60e6..f4e4e243734483b7ea4d1e47320c9f9cc7edb23e 100644 (file)
@@ -15,8 +15,9 @@ ikiwiki (1.43) UNRELEASED; urgency=low
     preprocessing it.
   * Fix smiley plugin to support smileys at the very beginning or end of
     the content.
     preprocessing it.
   * Fix smiley plugin to support smileys at the very beginning or end of
     the content.
+  * Allow multiple tag settings to appear in a single page.
 
 
- -- Joey Hess <joeyh@debian.org>  Tue, 13 Feb 2007 18:40:36 -0500
+ -- Joey Hess <joeyh@debian.org>  Tue, 13 Feb 2007 22:40:56 -0500
 
 ikiwiki (1.42) unstable; urgency=low
 
 
 ikiwiki (1.42) unstable; urgency=low
 
index bc697e487dd19aa712894068a7b1a1a9cfa938df..0d1cf45a81f644c2d9bccd01de4eb4fd480e637a 100644 (file)
@@ -5,3 +5,6 @@ page that used `core=1` in the template (such as [[plugins/mdwn]]), the
 `type/core` tag disappeared, and the template did not supply
 it. --[[JoshTriplett]]
 
 `type/core` tag disappeared, and the template did not supply
 it. --[[JoshTriplett]]
 
+Problem was that setting a tag cleared all earlier tags. [[bugs/done]], and
+I like the idea of the autotagging..
+--[[Joey]]
index 4fa11d04ed1a6f6b478eff7325e46376d63b46f0..8e37a5bd5e9d536d105aabef7d1aaf203ddba4e6 100644 (file)
@@ -1,5 +1,5 @@
 [[template id=plugin name=htmlscrubber core=1 author="[[Joey]]"]]
 [[template id=plugin name=htmlscrubber core=1 author="[[Joey]]"]]
-[[tag type/html type/core]]
+[[tag type/html]]
 
 This plugin is enabled by default. It sanitizes the html on pages it renders
 to avoid XSS attacks and the like.
 
 This plugin is enabled by default. It sanitizes the html on pages it renders
 to avoid XSS attacks and the like.
index 6baf6ba9bc719ab9a98356f2e729c739764cc5bc..a607474df4c251a5eccb57ba378cc995a12dc586 100644 (file)
@@ -1,5 +1,4 @@
 [[template id=plugin name=inline core=1 author="[[Joey]]"]]
 [[template id=plugin name=inline core=1 author="[[Joey]]"]]
-[[tag type/core]]
 
 This is a [[PreProcessorDirective]] that allows including one wiki page
 inside another. For example:
 
 This is a [[PreProcessorDirective]] that allows including one wiki page
 inside another. For example:
index 277c4f3ec141be4c49926317002c52fee954b872..c4de0cff982c82e1e58b0d6d22ce03b85d9b8d50 100644 (file)
@@ -1,5 +1,5 @@
 [[template id=plugin name=mdwn core=1 author="[[Joey]]"]]
 [[template id=plugin name=mdwn core=1 author="[[Joey]]"]]
-[[tag type/format type/core]]
+[[tag type/format]]
 
 This plugin lets ikwiki convert files with names ending in ".mdwn" to html.
 It uses the [[markdown]] minimal markup language.
 
 This plugin lets ikwiki convert files with names ending in ".mdwn" to html.
 It uses the [[markdown]] minimal markup language.
index 3d6782dba1cde8d0e4f06574038e927758c24765..2ee06b7adf65b4f77fd3bdb879a80258108a40cc 100644 (file)
@@ -1,6 +1,5 @@
 [[template id=plugin name=passwordauth core=1 author="[[Joey]]"]]
 [[tag type/auth]]
 [[template id=plugin name=passwordauth core=1 author="[[Joey]]"]]
 [[tag type/auth]]
-[[tag type/core]]
 
 This plugin lets ikiwiki prompt for a user name and password when logging
 into the wiki. It also handles registering users, mailing passwords, and
 
 This plugin lets ikiwiki prompt for a user name and password when logging
 into the wiki. It also handles registering users, mailing passwords, and
index b6083d22580cb62aa999204123b933e96e4a7d9a..98188d7dc480b75604a34b6bd6e98024d5d5e883 100644 (file)
@@ -38,10 +38,6 @@ few things:
 * To use one block of text if a variable is set and a second if it's not,
   use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>`
 
 * To use one block of text if a variable is set and a second if it's not,
   use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>`
 
-The filled out template will be formatted the same as the rest of the page
-that contains it, so you can include WikiLinks and all other forms of wiki
-markup in the template.
-
 Here's a sample template:
 
        <span class="infobox">
 Here's a sample template:
 
        <span class="infobox">
@@ -57,3 +53,8 @@ Here's a sample template:
        <TMPL_VAR notes>
        </TMPL_IF>
        </span>
        <TMPL_VAR notes>
        </TMPL_IF>
        </span>
+
+The filled out template will be formatted the same as the rest of the page
+that contains it, so you can include WikiLinks and all other forms of wiki
+markup in the template. Note though that such WikiLinks will not show up as
+backlinks to the page that uses the template.
index fd29aba175c960ce8b5b14a8f988c6a9f47692ef..1b63d45dd183f7d2f5996d4ea49eaa20dc4a53e4 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-13 19:10-0500\n"
+"POT-Creation-Date: 2007-02-13 22:40-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"