Allow dots in parameter key names
[ikiwiki] / doc / plugins / filecheck / discussion.mdwn
1 First, thanks again for making this plugin.
2
3 I don't know if this is a problem for [[plugins/attachment]], but there seems to
4 be no way to detect text/plain using File::MimeInfo::Magic::magic().
5 There is a heuristic ::default that decides between text/plain and application/octet-stream.  
6
7 Would you be receptive to a patch that e.g. called File::MimeInfo::Magic::default()
8 if ::magic() returns undef?  --[[DavidBremner]]
9
10 > Yes, that looks to be ok. --[[Joey]]
11
12 >> OK, here is such a patch. One modification of previous behaviour is that 
13 >> that if default returns undef, this is returned. As far as I understand
14 >> the code/doc for File::MimeInfo, under is used only as an error return
15 >> for ::default
16
17 >>> Applied
18
19 ---
20
21 At first I need to thank you for ikiwiki - it is what I was always looking
22 for - coming from a whole bunch of wiki engines, this is the most
23 intelligent and least bloated one.
24
25 My question is about the [[plugins/attachment]] plugin in conjunction with
26 [[plugins/filecheck]]: I am using soundmanger2 js-library for having
27 attached media files of all sorts played inline a page. 
28
29 To achieve this soundmanager2 asks for an id inside a ul-tag surrounding
30 the a-tag. I was wondering if the Insert Link button could be provided with
31 a more elegant solution than to have this code snippet to be filled in by
32 hand every time you use it to insert links for attached media files. And in
33 fact there apparently is a way in attachment.pm. 
34
35 While I can see that it is not needed for everyone inserting links to
36 attached media files to have ul- and li-tags surrounding the link itself as
37 well as being supplied with an id fill in, for me it would be the most
38 straight forward solution. Pitty is I don't have the time to wrap my head
39 around perl to write a patch myself.  Is there any way to have this made an
40 option which can be called via templates?
41
42 For sure I would like to donate for such a patch as well as I will do it
43 for ikiwiki anyway, because it is such a fine application.
44
45 If you are not familiar with soundmanager2: It is a very straight forward
46 solution to inline mediafiles, using the usual flash as well as html5
47 solutions (used by soundcloud.com, freesound.org and the like). Worth a
48 look anyway [schillmania.com](http://www.schillmania.com/)
49
50 Boris
51
52 > The behavior of "Insert Links" is currently hardcoded to support images
53 > and has a fallback for other files. What you want is a 
54 > [[todo/generic_insert_links]] that can insert a template directive.
55 > Then you could make a template that generates the html needed for
56 > soundmanager2. I've written down a design at
57 > [[todo/generic_insert_links]]; I am currently very busy and not sure
58 > when I will get around to writing it, but with it on the todo list
59 > I shouldn't forget. --[[Joey]] 
60
61 > You could make a [[ikiwiki/directive/template]] for soundmanager2
62 > now, and manually insert the template directive for now
63 > when you want to embed a sound file. Something like this:
64
65         \[[!template id=embed_mp3 file=your.mp3]]
66
67 > Then in templates/embed_mp3.mdwn, something vaguely like this:
68
69         <ul id="foo">
70         <a href="<TMPL_VAR FILE>">mp3</a>
71         </ul>
72
73 >> Thanks a lot - looking forward to [[todo/generic_insert_links]] - I am using the [[ikiwiki/directive/template]] variant also adding a name vaiable, it looks like this and is working fine:
74
75         <ul class="playlist">
76         <li>
77         <a href="<TMPL_VAR FILE>"><TMPL_VAR NAME></a>
78         </li>
79         </ul>
80
81 >> Calling it: 
82
83         \[[!template id=embedmedia.tmpl file=../Tinas_Gonna_Have_A_Baby.mp3 name="Tina's Gonna Have A Baby" ]]
84
85 >> BTW your Flattr button doesn't seem to work properly - or it is Flattr itself that doesn't- clicking it won't let ikiwiki show up on my Dashboard.