Attachment 'UstreamTv.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - UstreamTv Macro
4
5 A macro to embed Streams from ustream.tv on wiki pages.
6
7 Usage: [[UstreamTv(streamcode)]]
8
9 Parameters:
10
11 streamcode: The code of the stream you want to embed. You find this in the code in the string given under the video and marked as "Embed:".
12
13 Example:
14
15 [[UstreamTv(T12pR0aOs2YQxMP99AvhBg.usc)]]
16
17 The Code to embed given at ustream looks like this:
18
19 <embed width="416" height="340" flashvars="autoplay=true" src="http://ustream.tv/T12pR0aOs2YQxMP99AvhBg.usc" type="application/x-shockwave-flash" wmode="transparent" \>
20
21 @copyright: 2007 by MoinMoin:RalfZosel
22 @license: GNU GPL, see COPYING for details.
23 """
24
25 from MoinMoin import wikiutil
26
27 def execute(macro, args):
28 streamcode = wikiutil.escape(args)
29 result = '<embed width="416" height="340" flashvars="autoplay=true" src="http://ustream.tv/%s" type="application/x-shockwave-flash" wmode="transparent" \>' % (streamcode)
30 return macro.formatter.rawHTML(result)
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.