#238: Include social networking bookmarklets
-----------------------------+----------------------------------------------
  Reporter:  vik             |       Owner:     
      Type:  feature         |      Status:  new
  Priority:  minor           |   Milestone:  3.2
 Component:  SocialSoftware  |     Version:     
Resolution:                  |    Keywords:     
-----------------------------+----------------------------------------------

Comment(by vik):

 Here's some code that could be retrofitted into a plumi 0.2.x install to
 generate some of the required info for the above. This could then be
 pulled into the HTML HEAD element using the right template. It's an ugly
 hack, and would be much nicer if the following info could be easily and
 seamlessly gleaned from plone or indytube:
 * flowplayer url[[BR]]
 * flowplayer config string[[BR]]
 * video height[[BR]]
 * video width[[BR]]
 * mime type.[[BR]]
 [[BR]]
 Good news is that facebook now embeds video from engagemedia: try linking
 to http://www.engagemedia.org/Members/vik/fbtest2.html to see it in
 action.

 {{{
 from HTMLParser import HTMLParser
 class flvincParser(HTMLParser):
     def handle_starttag(self, tag, attrs):
         if (tag == 'object'):
             for i in attrs:
                 if (i[0] == 'type'):
                     self.mimetype = i[1]
                 elif (i[0] == 'data'):
                     self.swfurl = i[1]
                 elif (i[0] == 'width'):
                     self.width = i[1]
                 elif (i[0] == 'height'):
                     self.height = i[1]
         elif (tag == 'param'):
             if (attrs[0][1] == 'flashvars'):
                 self.flashvars = attrs[1][1].replace(' ', '') #get rid of
 all whitespace

 f=flvincParser()
 f.feed(self.getIndyTubeHTML())
 }}}

-- 
Ticket URL: <http://plumi.org/ticket/238#comment:2>
Plumi <http://plumi.org/>
Plumi - FOSS Video Sharing Platform
_______________________________________________
Discuss mailing list
[email protected]
http://lists.plumi.org/listinfo/discuss

Reply via email to