It is part of MoinMoin since of version 1.5.4, see HelpOnMacros/EmbedObject. Please try your examples in the WikiSandBox and add requests as bug reports or feature requests. This page describes installation for a version previous to 1.5.4.

EmbedObject

PURPOSE

This macro is used to Embed an Object into a wiki page. Optional size of the object could be adjusted. Further keywords are dependent on the kind of application

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

EmbedObject-1.5.3-3.py

1.5

EO-1.5.0-1.py

1.5

EO-1.5.3-2.py

1.5

CALLING SEQUENCE

[[EmbedObject(attachment[,width=width][,height=height])]]

SUPPORTED MIMETYPES

INPUTS

attachment: image name of attachment

KEYWORD PARAMETERS

width: width of the embedded image, default is 100% of window
height: height of the embedded image, default is 100% of window
    application/x-shockwave-flash:
        play: true is default
        loop: true is default
        quality: high is default (medium,low)

EXAMPLE

[[EmbedObject]]
[[EmbedObject(example.swf)]]
[[EmbedObject(example.swf,width=637,height=392)]]
[[EmbedObject(SlideShow/example.swf,width=637,height=392)]]
[[EmbedObject(SlideShow/example.swf,width=637,height=392,play=false)]]
[[EmbedObject(SlideShow/example.swf,width=637,height=392,play=false,loop=false)]]
[[EmbedObject(SlideShow/example.swf,width=637,height=392,play=false,quality=low)]]

PROCEDURE

If the attachment file isn't uploaded yet the attachment line will be shown.

By the swftools (http://www.swftools.org) it is possible to get the swf size returned. I don't know if it is possible to get sizes for svg, pdf and others detected too, that's the reason why I haven't added it by now.

Please add needed mimetypes as objects.

It must be in "MoinMoin/macro"

Please remove the version number from the file name!

MODIFICATION HISTORY

@copyright: 2006 by Reimar Bauer (R.Bauer@fz-juelich.de)
            initial version: 1.5.0-1
            2006-05-04 TomSi: added mp3 support
            2006-05-09 1.5.3-2 RB code refactored, fixed a taintfilename bug
            2006-06-29 1.5.3-3 RB visio added but not tested, code reviewed, taintfile removed, routine renamed

ReimarBauer

Discussion

swf, svg and pdf are added for the moment -- ReimarBauer 2006-01-01 08:16:06

Added mp3 support by following codes --TomSi 2006-05-04 20:16:06

elif mime_type == "audio/mpeg":
       txt = '''
       <OBJECT CLASSID=""
       WIDTH="%(width)s"
       HEIGHT="%(height)s"
       <EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" LOOP="TRUE"
       TYPE="audio/mpeg">
       </EMBED>
       </OBJECT>'''
  return txt

EmbedObject-1.5.3-2.py feature added -- ReimarBauer 2006-05-09 18:08:03


It allways kills my firefox. Can anyone confirm this behavior also ?

Please can you add a bug report with an example and give some more detail on your browser plugin versions. -- ReimarBauer 2006-07-27 10:37:22

Can you give my a hint what you mean with example ? There is no traceback or something similar which i could append to the bug report. I never have debuged a firefox. It is the newest stable version with a really huge bunch of plugins installed. When you point me to some steps how to contribute, i will do so. -- TobiasWitten 2006-07-28 07:03:47

On this page there are flashs and pdfs embedded. So you can try one of them in the WikiSandBox or on a MoinMoinBugs page. We do have some problems with the 64bit firefox and 32bit plugins too. There is no 64bit flashplayer available as I know. So we do use on our 64 bit systems the 32bit version of firefox. May be you have such a problem too. On a MoinMoinBugs page I would prefer to see an example which does not work for your firefox and a description about your browsers platform and OS.


Hi all.

I meet a configuration problem: on my Wiki (Desktop edition), when I embed a SVG file, firefox proposes me to download the file rather than displaying it. On the other hand, when i do the same command on the WikiSandBox, it is correctly displayed.

Any idea of what i am missing? -- Jolow 2007-10-25 00:00:00 if its WikiSandBox here, I guess 1.5.8 has an updated version of EmbedObject. DE is based on 1.5.3. version. -- ReimarBauer 2007-10-25 21:55:47

I nevertheless put the following lines in my wikiconfig.py:

    # Content options ---------------------------------------------------
    import mimetypes
    mimetypes.add_type("image/svg_xml", ".svg", True)
    mimetypes.add_type("image/svg_xml", ".svgz", True)


Is there anyway to show flash controls? -- -- AndreAragao 2007-07-16 20:01:42

Sure, see http://linuxwiki.de/SWFC/FlashKommandos/SWFC-HOWTO/BeispielActionScript, http://linuxwiki.de/SWFC e.g. Current configuration does not allow embedding of the file mini1.swf because of its mimetype application/x-shockwave-flash.: mini1.swf

-- ReimarBauer 2007-07-19 06:45:44


Testing

Current configuration does not allow embedding of the file Map.swf because of its mimetype application/x-shockwave-flash.: Map.swf

[[EmbedObject(example.mp3,width=100,height=20)]]


MoinMoin: MacroMarket/EmbedObject (last edited 2009-11-07 00:31:54 by ReimarBauer)