aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/calendar_with___34__create__34___links
diff options
context:
space:
mode:
authorhttp://christian.amsuess.com/chrysn <chrysn@web>2013-04-18 15:31:11 -0400
committeradmin <admin@branchable.com>2013-04-18 15:31:11 -0400
commitbdd2369a894a610dcfc8bf6d6795e93e0d55923c (patch)
tree34793cff3d0be01a1b6b8d36c38682b59f9fed73 /doc/todo/calendar_with___34__create__34___links
parent250f7268dc68048062b72fbd68cdce1df89a144a (diff)
downloadikiwiki-bdd2369a894a610dcfc8bf6d6795e93e0d55923c.tar
ikiwiki-bdd2369a894a610dcfc8bf6d6795e93e0d55923c.tar.gz
a patch for the feature suggested
Diffstat (limited to 'doc/todo/calendar_with___34__create__34___links')
-rw-r--r--doc/todo/calendar_with___34__create__34___links/incomplete_patch.pl36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/todo/calendar_with___34__create__34___links/incomplete_patch.pl b/doc/todo/calendar_with___34__create__34___links/incomplete_patch.pl
new file mode 100644
index 000000000..dc6798831
--- /dev/null
+++ b/doc/todo/calendar_with___34__create__34___links/incomplete_patch.pl
@@ -0,0 +1,36 @@
+diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
+index d443198..0436eda 100644
+--- a/IkiWiki/Plugin/calendar.pm
++++ b/IkiWiki/Plugin/calendar.pm
+@@ -238,7 +238,16 @@ EOF
+ else {
+ $tag='month-calendar-day-nolink';
+ }
+- $calendar.=qq{\t\t<td class="$tag $downame{$wday}">$day</td>\n};
++ if ($params{newpageformat}) {
++ $calendar.=qq{\t\t<td class="$tag $downame{$wday}">};
++ $calendar.=htmllink($params{page}, $params{destpage},
++ strftime_utf8($params{newpageformat}, 0, 0, 0, $day, $params{month} - 1, $params{year} - 1900),
++ noimageinline => 1,
++ linktext => $day);
++ $calendar.=qq{</td>\n};
++ } else {
++ $calendar.=qq{\t\t<td class="$tag $downame{$wday}">$day</td>\n};
++ }
+ }
+ }
+
+diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn
+index cb40f88..7b7fa85 100644
+--- a/doc/ikiwiki/directive/calendar.mdwn
++++ b/doc/ikiwiki/directive/calendar.mdwn
+@@ -56,5 +56,9 @@ An example crontab:
+ and so on. Defaults to 0, which is Sunday.
+ * `months_per_row` - In the year calendar, number of months to place in
+ each row. Defaults to 3.
++* `newpageformat` - In month mode, if no articles match the query, the value of
++ `newpageformat` will be used to strformat the date in question. A good value
++ is `newpageformat="meetings/%Y-%m-%d"`. It might be a good idea to have
++ `\[[!meta date="<TMPL_VAR name>"]]` in the edittemplate of `meetings/*`.
+
+ [[!meta robots="noindex, follow"]]