Plugin Directory

Changeset 988005


Ignore:
Timestamp:
09/12/2014 07:23:35 AM (12 years ago)
Author:
hdflvplayer
Message:

Fixed HD FLV Player conflict with Video Gallery issue

Location:
wp-flash-player
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-flash-player/tags/1.3/functions.php

    r984272 r988005  
    88$media = filter_input ( INPUT_GET, 'media' );
    99if (isset ( $name )) {
    10     return hd_ajax_add_playlist ( $name, $media );
     10    return hd_ajax_add_playlist_player ( $name, $media );
    1111}
    1212// Function used for rendering error message
     
    210210        $ytb_pattern = "@youtube.com\/watch\?v=([0-9a-zA-Z_-]*)@i";
    211211        if (strpos ( $act_filepath, 'www.youtube.com' ) > 0) {
    212             $youtube_data = hd_GetSingleYoutubeVideo ( $imageUrl );
     212            $youtube_data = hd_GetSingleYoutubeVideo_player ( $imageUrl );
    213213            $act_image = "http://img.youtube.com/vi/" . $imageUrl . "/mqdefault.jpg";
    214214            $act_opimage = "http://img.youtube.com/vi/" . $imageUrl . "/maxresdefault.jpg";
     
    248248        $tags = explode ( ',', $act_tags );
    249249       
    250         render_message ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) );
     250        render_message_player ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) );
    251251    }
    252252   
     
    300300        $updateID = intval ( $updateID );
    301301        $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET image= '$updated_thumb_value' WHERE vid = '$updateID'" );
    302         render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );
     302        render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) );
    303303        return;
    304304    }
     
    330330        $updated_preview_value = $wp_showPath . $updated_preview;
    331331        $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET opimage= '$updated_preview_value' WHERE vid = '$updateID'" );
    332         render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );
     332        render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) );
    333333        return;
    334334    }
     
    336336
    337337// Function used for retrieving YOUTUBE url
    338 function youtubeurl() {
     338function youtubeurl_player() {
    339339    $act_filepath = addslashes ( trim ( filter_input ( INPUT_POST, 'filepath' ) ) );
    340340    if (! empty ( $act_filepath )) {
     
    349349                $act_filepath = "http://www.youtube.com/watch?v=" . $imgstr [3];
    350350            }
    351             $youtube_data = hd_GetSingleYoutubeVideo ( $match );
     351            $youtube_data = hd_GetSingleYoutubeVideo_player ( $match );
    352352            if ($youtube_data) {
    353353                $act [0] = addslashes ( $youtube_data ['title'] );
     
    440440    if (strlen ( $act_name ) > 30)
    441441        $videoName = substr ( $act_name, 0, 30 ) . ' ...';
    442     render_message ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
     442    render_message_player ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
    443443    return $videoName;
    444444}
     
    479479   
    480480    if (empty ( $text ))
    481         render_message ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
     481        render_message_player ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
    482482   
    483483    return;
     
    485485
    486486// calling via Ajax to add playlist hdflvscript.js file this is calling
    487 function hd_ajax_add_playlist($name, $media) {
     487function hd_ajax_add_playlist_player($name, $media) {
    488488    global $wpdb;
    489489   
     
    508508        if ($insert_plist != 0) {
    509509            $pid = $wpdb->insert_id; // get index_id
    510             render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media );
     510            render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media );
    511511        }
    512512    }
     
    541541        if ($insert_plist != 0) {
    542542            $pid = $wpdb->insert_id; // get index_id
    543             render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) );
     543            render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) );
    544544        }
    545545    }
     
    567567        $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv_playlist SET playlist_name = '$p_name', playlist_desc = '$p_description', playlist_order = '$p_playlistorder' WHERE pid = '$p_id' " );
    568568       
    569         render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
     569        render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
    570570    }
    571571    return;
     
    581581    $delete_plist2 = $wpdb->query ( "DELETE FROM " . $wpdb->prefix . "hdflv_med2play WHERE playlist_id = $act_pid" );
    582582   
    583     render_message ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
     583    render_message_player ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
    584584   
    585585    return;
     
    587587
    588588// Function used for rendering message
    589 function render_message($message, $timeout = 0) {
     589function render_message_player($message, $timeout = 0) {
    590590    ?>
    591591
     
    600600
    601601// Function used to return YOUTUBE single video
    602 function hd_GetSingleYoutubeVideo($youtube_media) {
     602function hd_GetSingleYoutubeVideo_player($youtube_media) {
    603603    if ($youtube_media == '')
    604604        return;
    605605    $url = 'http://gdata.youtube.com/feeds/api/videos/' . $youtube_media;
    606     $ytb = hd_ParseYoutubeDetails ( hd_GetYoutubePage ( $url ) );
     606    $ytb = hd_ParseYoutubeDetails_player ( hd_GetYoutubePage_player ( $url ) );
    607607    return $ytb [0];
    608608}
    609609
    610610// Function used for parsing xml fron youtube
    611 function hd_ParseYoutubeDetails($ytVideoXML) {
     611function hd_ParseYoutubeDetails_player($ytVideoXML) {
    612612   
    613613    // Create parser, fill it with xml then delete it
     
    701701
    702702// Function used get content of url given using curl
    703 function hd_GetYoutubePage($url) {
     703function hd_GetYoutubePage_player($url) {
    704704   
    705705    // Try to use curl first
  • wp-flash-player/tags/1.3/manage.php

    r984272 r988005  
    326326        return $uploads;
    327327    }
    328     function render_message($message, $timeout = 0) {
     328    function manage_render_message($message, $timeout = 0) {
    329329        ?>
    330330<div style="margin-bottom: 0px; margin-top: -20px;" class="wrap">
     
    460460        $youtube_media = filter_input ( INPUT_POST, 'youtube_media' );
    461461        if (isset ( $youtube_media )) {
    462             $act1 = youtubeurl ();
     462            $act1 = youtubeurl_player ();
    463463            $act0_str = str_replace ( '"', '', $act1 [0] );
    464464            ?>
     
    483483                $siteUrl = '?page=hdflv&edit=succ';
    484484            }
    485             // echo '<script type="text/javascript">';
    486             // echo "window.location.href = '$siteUrl'";
    487             // echo '</script>';
    488485        }
    489486       
    490487        $edit = filter_input ( INPUT_GET, 'edit' );
    491488        if (isset ( $edit )) {
    492             render_message ( 'Video file "' . $videoname . '" Updated Successfully' );
     489            manage_render_message ( 'Video file "' . $videoname . '" Updated Successfully' );
    493490        }
    494491        /* updating thumb image */
     
    15991596        $playlist_name = filter_input ( INPUT_GET, 'pname' );
    16001597        $message = hd_delete_playlist ( $this->act_pid, $playlist_name );
    1601         // $this->render_message($message);
    16021598        $this->mode = 'playlist';
    16031599        // show playlist
  • wp-flash-player/trunk/functions.php

    r984272 r988005  
    88$media = filter_input ( INPUT_GET, 'media' );
    99if (isset ( $name )) {
    10     return hd_ajax_add_playlist ( $name, $media );
     10    return hd_ajax_add_playlist_player ( $name, $media );
    1111}
    1212// Function used for rendering error message
     
    210210        $ytb_pattern = "@youtube.com\/watch\?v=([0-9a-zA-Z_-]*)@i";
    211211        if (strpos ( $act_filepath, 'www.youtube.com' ) > 0) {
    212             $youtube_data = hd_GetSingleYoutubeVideo ( $imageUrl );
     212            $youtube_data = hd_GetSingleYoutubeVideo_player ( $imageUrl );
    213213            $act_image = "http://img.youtube.com/vi/" . $imageUrl . "/mqdefault.jpg";
    214214            $act_opimage = "http://img.youtube.com/vi/" . $imageUrl . "/maxresdefault.jpg";
     
    248248        $tags = explode ( ',', $act_tags );
    249249       
    250         render_message ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) );
     250        render_message_player ( __ ( 'Video file', 'hdflv' ) . ' ' . ' \'' . $videoName . '\' ' . __ ( ' added successfully', 'hdflv' ) );
    251251    }
    252252   
     
    300300        $updateID = intval ( $updateID );
    301301        $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET image= '$updated_thumb_value' WHERE vid = '$updateID'" );
    302         render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );
     302        render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) );
    303303        return;
    304304    }
     
    330330        $updated_preview_value = $wp_showPath . $updated_preview;
    331331        $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv SET opimage= '$updated_preview_value' WHERE vid = '$updateID'" );
    332         render_message ( __ ( 'Image Update Successfully', 'hdflv' ) );
     332        render_message_player ( __ ( 'Image Update Successfully', 'hdflv' ) );
    333333        return;
    334334    }
     
    336336
    337337// Function used for retrieving YOUTUBE url
    338 function youtubeurl() {
     338function youtubeurl_player() {
    339339    $act_filepath = addslashes ( trim ( filter_input ( INPUT_POST, 'filepath' ) ) );
    340340    if (! empty ( $act_filepath )) {
     
    349349                $act_filepath = "http://www.youtube.com/watch?v=" . $imgstr [3];
    350350            }
    351             $youtube_data = hd_GetSingleYoutubeVideo ( $match );
     351            $youtube_data = hd_GetSingleYoutubeVideo_player ( $match );
    352352            if ($youtube_data) {
    353353                $act [0] = addslashes ( $youtube_data ['title'] );
     
    440440    if (strlen ( $act_name ) > 30)
    441441        $videoName = substr ( $act_name, 0, 30 ) . ' ...';
    442     render_message ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
     442    render_message_player ( 'Video file ' . '"' . $videoName . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
    443443    return $videoName;
    444444}
     
    479479   
    480480    if (empty ( $text ))
    481         render_message ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
     481        render_message_player ( __ ( 'Video file', 'hdflv' ) . ' \'' . $video_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
    482482   
    483483    return;
     
    485485
    486486// calling via Ajax to add playlist hdflvscript.js file this is calling
    487 function hd_ajax_add_playlist($name, $media) {
     487function hd_ajax_add_playlist_player($name, $media) {
    488488    global $wpdb;
    489489   
     
    508508        if ($insert_plist != 0) {
    509509            $pid = $wpdb->insert_id; // get index_id
    510             render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media );
     510            render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $name . '"' . __ ( ' added successfully', 'hdflv' ) ) . get_playlist_for_dbx ( $media );
    511511        }
    512512    }
     
    541541        if ($insert_plist != 0) {
    542542            $pid = $wpdb->insert_id; // get index_id
    543             render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) );
     543            render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '"' . __ ( ' added successfully', 'hdflv' ) );
    544544        }
    545545    }
     
    567567        $wpdb->query ( " UPDATE " . $wpdb->prefix . "hdflv_playlist SET playlist_name = '$p_name', playlist_desc = '$p_description', playlist_order = '$p_playlistorder' WHERE pid = '$p_id' " );
    568568       
    569         render_message ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
     569        render_message_player ( __ ( 'Category', 'hdflv' ) . ' "' . $play_name . '" ' . __ ( 'Updated Successfully', 'hdflv' ) );
    570570    }
    571571    return;
     
    581581    $delete_plist2 = $wpdb->query ( "DELETE FROM " . $wpdb->prefix . "hdflv_med2play WHERE playlist_id = $act_pid" );
    582582   
    583     render_message ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
     583    render_message_player ( __ ( 'Playlist', 'hdflv' ) . ' \'' . $playlist_name . '\' ' . __ ( 'deleted successfully', 'hdflv' ) );
    584584   
    585585    return;
     
    587587
    588588// Function used for rendering message
    589 function render_message($message, $timeout = 0) {
     589function render_message_player($message, $timeout = 0) {
    590590    ?>
    591591
     
    600600
    601601// Function used to return YOUTUBE single video
    602 function hd_GetSingleYoutubeVideo($youtube_media) {
     602function hd_GetSingleYoutubeVideo_player($youtube_media) {
    603603    if ($youtube_media == '')
    604604        return;
    605605    $url = 'http://gdata.youtube.com/feeds/api/videos/' . $youtube_media;
    606     $ytb = hd_ParseYoutubeDetails ( hd_GetYoutubePage ( $url ) );
     606    $ytb = hd_ParseYoutubeDetails_player ( hd_GetYoutubePage_player ( $url ) );
    607607    return $ytb [0];
    608608}
    609609
    610610// Function used for parsing xml fron youtube
    611 function hd_ParseYoutubeDetails($ytVideoXML) {
     611function hd_ParseYoutubeDetails_player($ytVideoXML) {
    612612   
    613613    // Create parser, fill it with xml then delete it
     
    701701
    702702// Function used get content of url given using curl
    703 function hd_GetYoutubePage($url) {
     703function hd_GetYoutubePage_player($url) {
    704704   
    705705    // Try to use curl first
  • wp-flash-player/trunk/manage.php

    r984272 r988005  
    326326        return $uploads;
    327327    }
    328     function render_message($message, $timeout = 0) {
     328    function manage_render_message($message, $timeout = 0) {
    329329        ?>
    330330<div style="margin-bottom: 0px; margin-top: -20px;" class="wrap">
     
    460460        $youtube_media = filter_input ( INPUT_POST, 'youtube_media' );
    461461        if (isset ( $youtube_media )) {
    462             $act1 = youtubeurl ();
     462            $act1 = youtubeurl_player ();
    463463            $act0_str = str_replace ( '"', '', $act1 [0] );
    464464            ?>
     
    483483                $siteUrl = '?page=hdflv&edit=succ';
    484484            }
    485             // echo '<script type="text/javascript">';
    486             // echo "window.location.href = '$siteUrl'";
    487             // echo '</script>';
    488485        }
    489486       
    490487        $edit = filter_input ( INPUT_GET, 'edit' );
    491488        if (isset ( $edit )) {
    492             render_message ( 'Video file "' . $videoname . '" Updated Successfully' );
     489            manage_render_message ( 'Video file "' . $videoname . '" Updated Successfully' );
    493490        }
    494491        /* updating thumb image */
     
    15991596        $playlist_name = filter_input ( INPUT_GET, 'pname' );
    16001597        $message = hd_delete_playlist ( $this->act_pid, $playlist_name );
    1601         // $this->render_message($message);
    16021598        $this->mode = 'playlist';
    16031599        // show playlist
Note: See TracChangeset for help on using the changeset viewer.