1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help please

Discussion in 'HTML & JavaScript' started by G-S-T, Oct 22, 2013.

  1. G-S-T

    G-S-T Executive VIP Jr. VIP

    Joined:
    Jan 20, 2011
    Messages:
    1,838
    Likes Received:
    8,802
    Occupation:
    Full time IM
    Location:
    Heavy in the game
    Code:
    <embed flashVars=\"playerVars=showStats=yes|autoPlay=yes|videoTitle=Video Playing\" src=\"http://www.metacafe.com/fplayer/".$video_id."/video.swf\" width=\"".$width."\" height=\"".$height."\" wmode=\"transparent\" allowFullScreen=\"true\" allowScriptAccess=\"always\" name=\"Metacafe_".$video_id."\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed>
    ^^^ thats the accepted format for my template to play metacafe videos,

    Code:
    <iframe frameborder=\"0\" width=\"".$width."\" height=\"".$height."\" src=\"http://www.dailymotion.com/embed/video/".$video_id."\"></iframe>
    ^^^ thats the accepted format for my template to play dailymotion videos

    Code:
    <iframe width=\"".$width."\" height=\"".$height."\" src=\"http://www.youtube.com/embed/".$video_id.\"?hd=1&rel=0&autohide=1&showinfo=0\" frameborder=\"0\" ></iframe>
    ^^^ thats the accepted format for my template to play youtube videos.


    i want to add support for facebook videos, this is the regular facebook embed code

    Code:
    <object width="400" height="224" > 
     <param name="allowfullscreen" value="true" /> 
     <param name="allowscriptaccess" value="always" /> 
     <param name="movie" value="http://www.facebook.com/v/xxx" /> 
     <embed src="http://www.facebook.com/v/xxx" type="application/x-shockwave-flash"  
       allowscriptaccess="always" allowfullscreen="true" width="400" height="224"> 
     </embed> 
    </object>
    
    Anyone here can do this please?
     
  2. cryptons

    cryptons Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 12, 2013
    Messages:
    1,230
    Likes Received:
    447
    Occupation:
    Developer,social marketer
    sorry i can't but one of my friend does this,will approach him and tell you!
     
  3. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    From the examples it seems that the only change is adding \ before every "
     
    • Thanks Thanks x 1
  4. OldSalt

    OldSalt Moderator Staff Member Moderator Jr. VIP Premium Member

    Joined:
    May 19, 2009
    Messages:
    1,279
    Likes Received:
    7,437
    Gender:
    Male
    Occupation:
    IT Sys Admin
    Location:
    US, East Coast
    I gave him this via skype but he said it didn't work for him so I think it's more than that. (it's more than just adding the slashes since the height, width and URL are passed as variables.

    Code:
    <object width=\"".$width.\"" height=\"".$height.\"" >  <param name=\"allowfullscreen\" value=\"true\" /> 
     <param name=\"allowscriptaccess\" value=\"always\" /> 
     <param name=\"movie\" value=\"".$url.\" /> 
     <embed src=\"".$url.\"" type=\"application/x-shockwave-flash\"  
       allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"".$width.\"" height=\"".$height.\""> 
     </embed> 
    </object>
    
    Or if you just want to put the fb code at the end of the url:
    </object>
    Code:
    <object width=\"".$width.\"" height=\"".$height.\"" >  <param name=\"allowfullscreen\" value=\"true\" /> 
     <param name=\"allowscriptaccess\" value=\"always\" /> 
     <param name=\"movie\" value=\"http://www.facebook.com/v/".$url.\" /> 
     <embed src=\"http://www.facebook.com/v/".$url.\"" type=\"application/x-shockwave-flash\"  
       allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"".$width.\"" height=\"".$height.\""> 
     </embed> 
    
    
    
     
    • Thanks Thanks x 2
  5. Schvamp

    Schvamp Power Member

    Joined:
    Feb 13, 2012
    Messages:
    684
    Likes Received:
    549
    Location:
    Hogwarts
    You're breaking it with dubble " 's

    Code:
    <?php
    echo '<object width=\"'.$width.'\" height=\"'.$height.'\" >  <param name=\"allowfullscreen\" value=\"true\" />';
    echo '<param name=\"allowscriptaccess\" value=\"always\" />';
    echo '<param name=\"movie\" value=\"'.$url.'\" />';
    echo '<embed src=\"'.$url.'\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"'.$width.'\" height=\"'.$height.'\">';
    echo '</embed> ';
    echo '</object>';
    ?>
    Edit: Sorry, saw now that the thread is posted in javascript, not my area.. Guess this's another useless post then :D
    May I ask why you dont use PHP instead G-S-T?
     
    Last edited: Oct 23, 2013
  6. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    The idea is that you can hard code them first to be sure that that 's not the problem and work on them later on.
     
    • Thanks Thanks x 1