Attachment 'EmbedObject_patch.txt'
Download 1 # HG changeset patch
2 # User ReimarBauer <R.Bauer@fz-juelich.de>
3 # Node ID f373ba0fb6ab9d9afac442e628ad5d5f96652428
4 # Parent b3a47164c22a16a37bb097a78e03342ecacf4d3b
5 added mov, mpg and midi support
6
7 diff -r b3a47164c22a -r f373ba0fb6ab MoinMoin/macro/EmbedObject.py
8 --- a/MoinMoin/macro/EmbedObject.py Tue Aug 29 17:01:55 2006 +0200
9 +++ b/MoinMoin/macro/EmbedObject.py Wed Aug 30 19:51:26 2006 +0200
10 @@ -191,6 +191,45 @@ VALUE = "%(file)s">Your browser cannot d
11 "height": kw['height'],
12 "file": url,
13 }
14 + elif mime_type == "audio/midi":
15 + return '''
16 +<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
17 +WIDTH="%(width)s"
18 +HEIGHT="%(height)s"
19 +<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
20 +TYPE="audio/midi">
21 +</EMBED>
22 +</OBJECT>''' % {
23 + "width": kw["width"],
24 + "height": kw["height"],
25 + "file": url,
26 +}
27 + elif mime_type == "video/mpeg":
28 + return '''
29 +<OBJECT CLASSID="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"
30 +WIDTH="%(width)s"
31 +HEIGHT="%(height)s"
32 +<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
33 +TYPE="application/x-mplayer2">
34 +</EMBED>
35 +</OBJECT>''' % {
36 + "width": kw["width"],
37 + "height": kw["height"],
38 + "file": url,
39 +}
40 + elif mime_type == "video/quicktime":
41 + return '''
42 +<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
43 +WIDTH="%(width)s"
44 +HEIGHT="%(height)s"
45 +<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
46 +TYPE="video/quicktime">
47 +</EMBED>
48 +</OBJECT>''' % {
49 + "width": kw["width"],
50 + "height": kw["height"],
51 + "file": url,
52 +}
53 else:
54 msg = 'Not supported mimetype %(mimetype)s ' % {"mimetype": mime_type}
55 return "%s%s%s" % (macro.formatter.sysmsg(1),
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.