]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/inline_autotitles.mdwn
(urls for inline autotitle)
[ikiwiki.git] / doc / todo / inline_autotitles.mdwn
1 [[!tag wishlist]]
2 [[!tag patch]]
3
4 for inlines of pages which follow a certain scheme, it might not be required to
5 set the title for each individual post, but to automatically set the title.
6 this can either be based on timestamp formatting, or use the already existing
7 munging mechanism, which appends numbers to page titles in case that page
8 already exists.
9
10 two patches ([1], [2]) set inline up for that, adding an additional `autotitle`
11 parameter. if that is given, the regular input of the inline postform will be
12 replaced with a hidden input of that text. in addition, the empty title is
13 permitted (both for autotitle and regular titles, as they go in the same GET
14 parameter, `title`). as the empty page title is illegal, munging is used,
15 resulting in ascending numeric page titles to be created.
16
17 the second patch is actually a one-liner, filtering the title through sprintf.
18
19 ### potential user interaction issues
20
21 this has two side effects which have to be considered: first, the empty page
22 title is accepted also in normal postforms (previously, this resulted in a "bad
23 page name" error); second, entering a percent sign in that field might result
24 in unexpexted sprintf substitution (sprintf might not even substitute for
25 common uses of percent as in "reach 10% market share", but might in others as
26 in "the 10%-rule").
27
28 both can be circumvented by using another GET parameter for autotexts, for
29 which i could provide a patch. (as of writing this, i think i'll do that.)
30
31 ### potential security issues
32
33 * the autotitle's value is directly output through the template (but that's
34   done in other places as well, so i assume it's safe)
35 * i don't know if anything bad can happen if unfiltered content is passed to
36   POSIX::strftime.
37
38 ### further extension
39
40 having a pre-filled input field instead of an unchangable hidden input might be
41 cool (eg for creating an entry with yesterday's date), but would be a bit of a
42 problem with static pages. javascript could help with the date part, but name
43 munging would be yet another thing.
44
45 [1]: http://github.com/github076986099/ikiwiki/commit/b568eb257a3ef5ff49a84ac00a3a7465b643c1e1
46 [2]: http://github.com/github076986099/ikiwiki/commit/34bc82f232be141edf036d35e8ef5aa289415072