Differences between revisions 1 and 2
Revision 1 as of 2008-05-26 16:20:01
Size: 385
Comment:
Revision 2 as of 2008-05-26 16:21:27
Size: 364
Comment: guh
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
'''Download''': [[attachment:Macros/GoogleGroupsBox.py]] <<BR>>
'''Usage''': {{{<<Macros/GoogleGroupsBox(ptp-general)>>}}}<<BR>>
'''Download''': [[attachment:GoogleGroupsBox.py]] <<BR>>
'''Usage''': {{{<<GoogleGroupsBox(ptp-general)>>}}}<<BR>>
Line 12: Line 12:
{{attachment:Macros/GoogleGroupsBox.py}} {{attachment:GoogleGroupsBox.py}}

Download: GoogleGroupsBox.py
Usage: <<GoogleGroupsBox(ptp-general)>>
Description: Google Groups promotion box
Example:

Subscribe to ptp-general
Email:
Visit this group
   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - YouTube Macro
   4         <<YouTube(V8tSRJ8e3b0)>>  or
   5         <<YouTube(http://www.youtube.com/v/V8tSRJ8e3b0)>>
   6 
   7 """
   8 
   9 def execute(macro, text):
  10     html = '''
  11     <table border=0 style="padding: 5px;" cellspacing=0>
  12     <tr><td style="padding-left: 5px;border:0;">
  13     <b>Subscribe to %(group)s</b>
  14     </td></tr>
  15     <form action="http://groups.google.com/group/%(group)s/boxsubscribe">
  16     <tr><td style="padding-left: 5px;border:0;">
  17     Email: <input type=text name=email>
  18     <input type=submit name="sub" value="Subscribe">
  19     </td></tr>
  20     </form>
  21     <tr><td align=right style="border:0;">
  22       <a href="http://groups.google.com/group/%(group)s">Visit this group</a>
  23     </td></tr>
  24       </table>
  25     ''' % {"group": text}
  26     return html
  27 

GoogleGroupsBox.py

Macros/GoogleGroupsBox (last edited 2008-05-26 16:21:27 by JasonMcArthur)