Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r17644: LJSUP-7298: Sharing from YouTube to Live...

Committer: gariev
LJSUP-7298: Sharing from YouTube to LiveJournal, first version

U   trunk/htdocs/update.bml
Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2010-11-08 09:19:11 UTC (rev 17643)
+++ trunk/htdocs/update.bml	2010-11-08 10:20:36 UTC (rev 17644)
@@ -101,6 +101,7 @@
     my $subject = $POST{'subject'} || $GET{'subject'};
     my $event   = $POST{'event'}   || $GET{'event'};
     my $tags    = $POST{'prop_taglist'} || $GET{'prop_taglist'};
+    my $url     = $GET{'url'};
 
     # Tags
     if ($remote) {
@@ -131,7 +132,16 @@
         my $text = LJ::Widget::QotD->qotd_display_embed( questions => [ $qotd ], form_disabled => 1 );
         $$head .= "<script type=\"text/javascript\">LiveJournal.qotdText = \"" . LJ::ejs($text) . "\";</script>";
     }
-
+    
+    if ($url) {
+        ## currently, the URL is for YouTube only.
+        ## in future support for other quick embeds will be added.
+        $url = LJ::ehtml($url);
+        $event .= <<"EMBED";
+<object width="640" height="385"><param name="movie" value="$url"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="$url" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+EMBED
+    }
+ 
     # in case of repost other entry by its uri we should check its visibility
     # for remote user.
     if (my $repost = ($POST{repost} || $GET{repost})){

Tags: bml, gariev, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments