Attachment 'UstreamTvChat.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - UstreamTvCaht Macro
   4 
   5     A macro to embed Chats from ustream.tv on wiki pages.
   6     
   7     Usage: [[UstreamTvChat(channel)]]
   8     
   9     Parameters:
  10     
  11     	channel: The name of the channel you want to embed. You find this this name in the string given under the chat-window marked as "Embed Chat:". The leading # must be removed. 
  12     	
  13     Example:
  14     
  15     	[[UstreamTvChat(WikiTreffen)]]
  16     	
  17     	The Code to embed given at ustream looks like this:
  18     	
  19     	<embed width="563" height="266" type="application/x-shockwave-flash" flashvars="channel=#WikiTreffen" pluginspage="http://www.adobe.com/go/getflashplayer" src="http://ustream.tv/IrcClient.swf"\>
  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     channel = wikiutil.escape(args)
  29     result = '<embed width="563" height="266" type="application/x-shockwave-flash" flashvars="channel=#%s" pluginspage="http://www.adobe.com/go/getflashplayer" src="http://ustream.tv/IrcClient.swf"\>' % (channel)
  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.
  • [get | view] (2007-08-14 20:54:19, 1.0 KB) [[attachment:UstreamTv.py]]
  • [get | view] (2007-08-15 19:36:39, 1.2 KB) [[attachment:UstreamTvChat.py]]
  • [get | view] (2007-08-14 20:55:34, 1.0 KB) [[attachment:YouTube.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.