X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/57dd3268b7ffe9b0f537036d5886bf0d5faa25bb..32def92ffd082185cde169edb1a6d3a2cceae06a:/doc/plugins/filecheck/discussion.mdwn diff --git a/doc/plugins/filecheck/discussion.mdwn b/doc/plugins/filecheck/discussion.mdwn index 54b14c183..f3f3c4ffd 100644 --- a/doc/plugins/filecheck/discussion.mdwn +++ b/doc/plugins/filecheck/discussion.mdwn @@ -13,29 +13,73 @@ if ::magic() returns undef? --[[DavidBremner]] >> that if default returns undef, this is returned. As far as I understand >> the code/doc for File::MimeInfo, under is used only as an error return >> for ::default -
-From 84f40d7fa822c6cc09506cca2dbf38a8b19f8bb7 Mon Sep 17 00:00:00 2001
-From: David Bremner 
-Date: Fri, 29 Aug 2008 20:46:20 -0300
-Subject: [PATCH] call File::MimeInfo::default if ::magic() returns undef
+
+>>> Applied
 
 ---
- IkiWiki/Plugin/filecheck.pm |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm
-index 9c7a8db..a94c02b 100644
---- a/IkiWiki/Plugin/filecheck.pm
-+++ b/IkiWiki/Plugin/filecheck.pm
-@@ -127,7 +127,7 @@ sub match_mimetype ($$;@) { #{{{
-        }
-        my $mimetype=File::MimeInfo::Magic::magic($file);
-        if (! defined $mimetype) {
--               $mimetype="unknown";
-+               $mimetype=File::MimeInfo::Magic::default($file);
-        }
-
-        my $regexp=IkiWiki::glob2re($wanted);
---
-1.5.6.3
-
+ +At first I need to thank you for ikiwiki - it is what I was always looking +for - coming from a whole bunch of wiki engines, this is the most +intelligent and least bloated one. + +My question is about the [[plugins/attachment]] plugin in conjunction with +[[plugins/filecheck]]: I am using soundmanger2 js-library for having +attached media files of all sorts played inline a page. + +To achieve this soundmanager2 asks for an id inside a ul-tag surrounding +the a-tag. I was wondering if the Insert Link button could be provided with +a more elegant solution than to have this code snippet to be filled in by +hand every time you use it to insert links for attached media files. And in +fact there apparently is a way in attachment.pm. + +While I can see that it is not needed for everyone inserting links to +attached media files to have ul- and li-tags surrounding the link itself as +well as being supplied with an id fill in, for me it would be the most +straight forward solution. Pitty is I don't have the time to wrap my head +around perl to write a patch myself. Is there any way to have this made an +option which can be called via templates? + +For sure I would like to donate for such a patch as well as I will do it +for ikiwiki anyway, because it is such a fine application. + +If you are not familiar with soundmanager2: It is a very straight forward +solution to inline mediafiles, using the usual flash as well as html5 +solutions (used by soundcloud.com, freesound.org and the like). Worth a +look anyway [schillmania.com](http://www.schillmania.com/) + +Boris + +> The behavior of "Insert Links" is currently hardcoded to support images +> and has a fallback for other files. What you want is a +> [[todo/generic_insert_links]] that can insert a template directive. +> Then you could make a template that generates the html needed for +> soundmanager2. I've written down a design at +> [[todo/generic_insert_links]]; I am currently very busy and not sure +> when I will get around to writing it, but with it on the todo list +> I shouldn't forget. --[[Joey]] +> +> You could make a [[ikiwiki/directive/template]] for soundmanager2 +> now, and manually insert the template directive for now +> when you want to embed a sound file. Something like this: + + \[[!template id=embed_mp3 file=your.mp3]] + +> Then in templates/embed_mp3.mdwn, something vaguely like this: + + + +>> 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: + + + +>> Calling it: + + \[[!template id=embedmedia.tmpl file=../Tinas_Gonna_Have_A_Baby.mp3 name="Tina's Gonna Have A Baby" ]] + +>> 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.