How can i setup jw7 in my wp theme

Discussion in 'PHP' started by Tuhin1234, Aug 4, 2016.

  1. #1
    Now i'm use jw6 , here is code ....

    theme Root dir code
    <?php
    $video = get_post_meta($post->ID,'dl1', true);
    $embedvideo =  get_post_meta($post->ID,'embedvideo', true);
    $embed_video = get_post_meta($post->ID, 'embed_code', true);
    $sefurL = get_bloginfo('template_url', true);
    $thumb = get_post_meta($post->ID,'thumb', true);
    $ul = get_post_meta($post->ID,'ul', true);
    $logoimage = 'thumbcode' ;
    if($video != "") {  ?>
    <?php if ( !wp_is_mobile() ) {
    include (TEMPLATEPATH . '/jwplayer/player.php');
    } else {
    echo '<video src="'.$video.'" poster="'.$thumb.'" controls>
          Your browser does not support the <code>video</code> element.
         </video>';
    }
    ?>
    <?php } elseif($video == "" && $embedvideo != "") { echo $embedvideo; 
    } elseif ($embed_video != "") {
    echo $embed_video;   
    } else { the_content(); }
    ?>
    PHP:
    And this my Jw player code
    <?php
    $video = urlencode($video);
    $src = urlencode($thumb);
    $ul = urlencode($ul);
    $logoimage = urlencode($logoimage);
    $logolink = stripslashes(get_option('mtn_jwlink'));
    $skin = stripslashes(get_option('mtn_jwskin'));
    $position = stripslashes(get_option('mtn_move_logo'));
    echo '<embed src="'.$sefurL.'/jwplayer/player.swf" autostart=false" wmode="opaque" allowscriptaccess="always" quality="high" FlashVars="file='.$video.'&image='.$src.'&skin='.$sefurL.'/jwplayer/skins/nacht.zip&repeat=false&autostart=false&logo.file='.$logoimage.'&logo.hide=false&logo.position='.$position.'&logo.link='.$ul.'" quality="high" bgcolor="#000" width=100% height=380 name="mm" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" allowfullscreen=true />';
    ?>
    PHP:

    Now how can i upgrade to JW player7 . please help me
     
    Tuhin1234, Aug 4, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Doesn't it work to just update the files in the folder where jwplayer is installed?

    As long as they haven't changed the syntax, or removed features, I don't see how just updating the players files won't work? I'm assuming this isn't a plugin, but something you (or someone else) have coded in? If it's a plugin, it should be updated automatically when the creator gets around to it.

    As a sidenote: if jw6 is working, what are the benefits of upgrading? (Apart from it being newer, maybe having cooler features (are you gonna use any of them, in that case?) or having fixed other issues, like security issues)
     
    PoPSiCLe, Aug 4, 2016 IP
  3. Tuhin1234

    Tuhin1234 Active Member

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #3
    This is not plugin code . It play video from Custom Fields location .
    i'm simply call a php file to play video in single.php page .
    <?php get_template_part( 'player', get_post_format() ); ?>

    My english is not good so please see those image . here is my theme files


    [​IMG]
    Here is my first php code .....(up)

    [​IMG]
    & here is my Jw player code . like ace tube theme .Now how can i played video in single.php page by JW7 . Not plugin by direct player inject my theme & call video from Custom Fields
     
    Tuhin1234, Aug 4, 2016 IP