• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

Post Interface Embeds into Custom Fields

[Solved]

Foliovision › Forums › FV Player › Troubleshooting › Post Interface Embeds into Custom Fields

  • marcie 4 years, 5 months ago

    I am having a problem when I want to add a new video. The Interface is already in my custom fields panel. I am not sure how to fix this and it won’t let me insert a video until this is fixed.

    The custom fields is not a plugin but comes from my theme’s functions file. How do I separate the two from being in the same panel?

    Also having a problem with JS. But all videos seem to be working okay is this something I should worry about?

    It appears there are multiple jQuery libraries on your site, your videos might not be playing or may play with defects, please check.

    We also recommend you to open any of your videos on your site and see if you get a red warning message about JavaScript not working.

    FV Flowplayer script found: https://radcliffemedia.sosugary.com/wp-content/plugins/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js?ver=7.4.37.727!

    jQuery library found: https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js!

    jQuery library found: https://radcliffemedia.sosugary.com/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp!

    screenshot-2020-12-01-22-44-58
    Screenshot-2020-12-01-22.44.58
    screenshot-2020-12-01-22-44-21
    Screenshot-2020-12-01-22.44.21
Viewing 10 replies - 1 through 10 (of 10 total)
  • Chiara Rendekova 4 years ago
    Avatar photo

    Hi Marcie,

    Thank you for reaching out to us.

    Could you please send us over your system info – Settings -> FV Player Pro -> Tools -> System Info? Our programmer will take a closer look on what might be causing your issue with adding your video.

    Thanks,
    Chiara

    marcie 4 years ago

    Sure

    ### Begin System Info ###
    
    ## Please include this information when posting support requests ##
    
    Multisite:                No
    
    SITE_URL:                 https://simplydanielradcliffe.com
    HOME_URL:                 https://simplydanielradcliffe.com
    Plugin URL:               https://simplydanielradcliffe.com/wp-content/plugins/fv-wordpress-flowplayer
    
    FV Player version:        7.4.37.727
    FV Player core version:   7.2.7
    FV Player license:        
    
    WordPress Version:        5.5.3
    Permalink Structure:      /%category%/%postname%
    Active Theme:             GD_DR_Nov 1.0
    
    Browser:                  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36
    PHP Version:              7.3.24
    MySQL Version:            5.6.41
    Web Server Info:          Apache
    
    WordPress Memory Limit:   256M
    PHP Memory Limit:         256M
    PHP Upload Max Size:      256M
    PHP Post Max Size:        260M
    PHP Upload Max Filesize:  256M
    PHP Time Limit:           30
    PHP Max Input Vars:       1000
    PHP Arg Separator:        &
    PHP Allow URL File Open:  Yes
    WP_DEBUG:                 Disabled
    
    DISPLAY ERRORS:           N/A
    cURL:                     Your server supports cURL.
    
    ACTIVE PLUGINS:
    
    3D FlipBook - Lite Edition: 1.10.11.1
    Advanced Gutenberg: 2.4.7
    Affiliationally WP: 1.1
    Akismet Anti-Spam: 4.1.7
    Arqam - Social Counter Plugin: 2.6.3
    Book Review: 2.3.9
    Content Aware Sidebars: 3.13.1
    Download Manager: 3.1.11
    Folders: 2.6.2
    FV Player: 7.4.37.727
    GS Book Showcase Pro: 2.0.15
    Iconist Multiple: 1.1
    Jetpack by WordPress.com: 9.2
    MND Filmography: 1.3
    MND Press Library: 1.1
    Photo Gallery: 1.5.64
    Post Snippets: 3.1.2
    Post Types Order: 1.9.5.2
    Really Simple SSL: 4.0.3
    Smash Balloon Instagram Feed: 2.5.4
    Stackable - Gutenberg Blocks: 2.12.2
    Wordfence Security: 7.4.12
    WP-Sweep: 1.1.3
    WPDM - Button Templates: 1.3.0
    
    SETTINGS
    
    Array
    (
        [autoplay] => false
        [googleanalytics] => 
        [key] => 
        [logo] => 
        [rtmp] => 
        [auto_buffering] => false
        [scaling] => true
        [disableembedding] => false
        [disablesharing] => false
        [disable_video_hash_links] => false
        [popupbox] => false
        [allowfullscreen] => true
        [allowuploads] => true
        [postthumbnail] => false
        [tgt] => backgroundcolor
        [backgroundColor] => #333333
        [canvas] => #000000
        [sliderColor] => #ffffff
        [durationColor] => #eeeeee
        [timeColor] => #eeeeee
        [progressColor] => #bb0000
        [bufferColor] => #eeeeee
        [timelineColor] => #666666
        [borderColor] => #666666
        [hasBorder] => false
        [adTextColor] => #888888
        [adLinksColor] => #ff3333
        [subtitleBgColor] => #000000
        [subtitleBgAlpha] => 0.5
        [subtitleSize] => 16
        [playlistBgColor] => #808080
        [playlistFontColor] => #
        [playlistSelectedColor] => #bb0000
        [logoPosition] => bottom-left
        [parse_commas] => false
        [width] => 640
        [height] => 360
        [engine] => false
        [font-face] => Tahoma, Geneva, sans-serif
        [ad] => 
        [ad_width] => 0
        [ad_height] => 0
        [ad_css] => .wpfp_custom_ad { position: absolute; bottom: 10%; z-index: 20; width: 100%; }
    .wpfp_custom_ad_content { background: white; margin: 0 auto; position: relative }
        [ad_show_after] => 0
        [disable_videochecker] => false
        [interface] => Array
            (
                [ads] => false
                [align] => false
                [autoplay] => false
                [controlbar] => false
                [embed] => false
                [live] => false
                [mobile] => false
                [playlist_advance] => false
                [playlist] => true
                [playlist_captions] => false
                [share] => true
                [speed] => false
                [subtitles] => false
                [end_actions] => true
                [lightbox] => true
                [shortcode_editor_old] => false
                [popup] => true
            )
    
        [amazon_bucket] => Array
            (
                [0] => 
            )
    
        [amazon_key] => (redacted, 1)
        [amazon_secret] => (redacted, 1)
        [amazon_region] => Array
            (
                [0] => 
            )
    
        [amazon_expire] => 5
        [amazon_expire_force] => false
        [fixed_size] => false
        [js-everywhere] => false
        [marginBottom] => 28
        [ui_play_button] => true
        [volume] => 0.7
        [player-position] => 
        [playlist_advance] => false
        [sharing_email_text] => Check out the amazing video here
        [liststyle] => horizontal
        [ui_speed_increment] => 0.25
        [popups_default] => no
        [email_lists] => Array
            (
                [#fv_list_dummy_key#] => Array
                    (
                        [title] => 
                        [description] => 
                        [first_name] => 0
                        [last_name] => 0
                        [disabled] => 0
                    )
    
                [1] => Array
                    (
                        [title] => Subscribe to list one
                        [description] => Two good reasons to subscribe right now
                        [first_name] => 1
                        [last_name] => 0
                        [disabled] => 0
                    )
    
            )
    
        [playlist-design] => 2017
        [lightbox_images] => false
        [lightbox_improve_galleries] => false
        [mailchimp_api] => 
        [mailchimp_list] => 
        [mailchimp_label] => Subscribe for updates
        [version] => 7.4.37.727
        [css_writeout-httpsimplydanielradcliffe-comwp-content] => 1510481617
        [notification_video_links] => true
        [video_checker_agreement] => true
        [pro] => Array
            (
            )
    
        [fv-wp-flowplayer-submit] => SaveAllChanges
        [ui_speed] => false
        [splash] => 
        [subtitleOn] => false
        [cbox_compatibility] => false
        [css_disable] => false
        [audio] => false
        [hlsjs] => false
        [profile_videos_enable_bio] => false
        [integrations] => Array
            (
                [wp_core_video] => false
                [embed_iframe] => false
                [schema_org] => false
                [featured_img] => false
                [facebook_sharing] => false
            )
    
        [parse_comments] => false
        [rtmp-live-buffer] => false
        [db_duration] => false
        [old_code] => false
        [mobile_native_fullscreen] => false
        [mobile_force_fullscreen] => false
        [subtitleFontFace] => inherit
        [css_writeout-http-simplydanielradcliffe-com-wp-content] => 1530107165
        [sticky_video] => false
        [sticky_place] => right-bottom
        [sticky_width] => 380
        [skin-custom] => Array
            (
                [hasBorder] => false
                [borderColor] => #666666
                [bufferColor] => #eeeeee
                [canvas] => #000000
                [backgroundColor] => #333333
                [font-face] => Tahoma, Geneva, sans-serif
                [player-position] => 
                [progressColor] => #bb0000
                [timeColor] => #eeeeee
                [durationColor] => #eeeeee
            )
    
        [skin-slim] => Array
            (
                [progressColor] => #bb0000
            )
    
        [skin-youtuby] => Array
            (
                [progressColor] => #bb0000
            )
    
        [skin] => slim
        [css_writeout-https-simplydanielradcliffe-com-wp-content] => 1551225184
        [notice_new_lightbox] => true
        [notice_db] => true
        [video_model_db_checked] => 7.4.37.727
        [player_model_db_checked] => 7.4.37.727
        [player_meta_model_db_checked] => 7.4.37.727
        [video_meta_model_db_checked] => 7.4.37.727
        [css_writeout-https-simplydanielradcliffe-com] => 1605905789
        [chromecast] => 1
    )
    
    DATABASE
    
    CREATE TABLE `wpsd_fv_player_players` (
      `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `player_name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `player_slug` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `videos` mediumtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `ab` varchar(3) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `ad` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `ad_height` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `ad_width` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `ad_skip` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `align` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `author` bigint(20) unsigned NOT NULL DEFAULT '0',
      `autoplay` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `controlbar` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `copy_text` varchar(120) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `changed_by` bigint(20) unsigned NOT NULL DEFAULT '0',
      `date_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `date_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `embed` varchar(12) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `end_actions` varchar(10) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `end_action_value` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `height` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `hflip` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `lightbox` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `lightbox_caption` varchar(120) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `lightbox_height` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `lightbox_width` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `playlist` varchar(10) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `playlist_advance` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `qsel` varchar(25) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `share` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `share_title` varchar(120) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `share_url` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `speed` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `sticky` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `video_ads` varchar(10) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `video_ads_post` varchar(10) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `width` varchar(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
    
    CREATE TABLE `wpsd_fv_player_playermeta` (
      `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `id_player` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
      PRIMARY KEY (`id`),
      KEY `id_player` (`id_player`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
    
    CREATE TABLE `wpsd_fv_player_videos` (
      `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `src` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `src1` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `src2` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `splash` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `splash_text` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `caption` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `end` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `mobile` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `rtmp` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `rtmp_path` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `start` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      PRIMARY KEY (`id`),
      KEY `src` (`src`(191)),
      KEY `caption` (`caption`(191))
    ) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
    
    CREATE TABLE `wpsd_fv_player_videometa` (
      `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `id_video` bigint(20) unsigned NOT NULL DEFAULT '0',
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
      `meta_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
      PRIMARY KEY (`id`),
      KEY `id_video` (`id_video`),
      KEY `meta_key` (`meta_key`(191))
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
    
    ### End System Info ###
    
    Martin 4 years ago

    Hello Marcie,

    looking at your screenshot https://foliovision.com/images/2020/12/Screenshot-2020-12-01-22.44.21.png it appears something is calling one of the WP action hooks in a non-standard way.

    Do you get into the same issue when you try to use some standard WordPress theme such as Twenty Twenty?

    If that won’t help, then it might be one of the plugins. That warning about JavaScript is worth checking – if some plugin is loading the secondary copy of jQuery library like that it’s a good indication that some plugin is outdated and might be resposnible for these editing issues.

    I recommend that you try disabling plugins one by one until you find which one it is. Or you can download all your files using FTP and then look for https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js in the file contents with some advanced search tool.

    Thanks,
    Martin

    marcie 4 years ago

    I get nothing using the default 2020 theme because the theme is not calling anything so that is irrelevant.

    As for the plugins deal I don’t really use any on the site and the ones I do use don’t affect it. FLV player is the only one doing this.

    marcie 4 years ago

    the problem is between the theme’s function file and FLV Player.

    Martin 4 years ago

    Hello Marcie,

    I see no mention of a FLV Player plugin in your System Info, so I guess you mean FV Player.

    It’s great that you were able to figure it out. Do you see anything suspicious in that function.php file?

    Does it have a lot of “include” or “require” calls? If not, please send that file over to us – you can change the extensions from .php to .txt and then attach it here. I should be able to spot the suspicious call in it and figure out how to improve our FV Player’s compatibility.

    Thanks,
    Martin

    marcie 4 years ago
    <?php
    add_theme_support( 'post-thumbnails' );
    add_image_size( 'single-post-thumbnail', 590, 180 );
    
    
    if ( function_exists('register_sidebars') ) {
    	register_sidebar(array(
                    'name' => 'sidebar',
    		'before_widget' => '<div class="sidebarcontainer">',
    		'after_widget' => '</div><br>',
    		'before_title' => '<center><div class="sidebartitle">',
    		'after_title' => '</div></center>',
    	));
    }
    
    
    
    function wpb_total_posts() { 
    $total = wp_count_posts()->publish;
    return $total; 
    } 
    add_shortcode('total_posts','wpb_total_posts');
    
    function designsbykaci_numeric_posts_nav() {
     
        if( is_singular() )
            return;
     
        global $wp_query;
     
        /** Stop execution if there's only 1 page */
        if( $wp_query->max_num_pages <= 1 )
            return;
     
        $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
        $max   = intval( $wp_query->max_num_pages );
     
        /** Add current page to the array */
        if ( $paged >= 1 )
            $links[] = $paged;
     
        /** Add the pages around the current page to the array */
        if ( $paged >= 3 ) {
            $links[] = $paged - 1;
            $links[] = $paged - 2;
        }
     
        if ( ( $paged + 2 ) <= $max ) {
            $links[] = $paged + 2;
            $links[] = $paged + 1;
        }
     
        echo '<div class="pagenavi">
      ' . "\n"; /** Previous Post Link */ if ( get_previous_posts_link() ) printf( '
    • %s
    • ' . "\n", get_previous_posts_link() ); /** Link to first page, plus ellipses if necessary */ if ( ! in_array( 1, $links ) ) { $class = 1 == $paged ? ' class="active"' : ''; printf( '<li%s>%s' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' ); if ( ! in_array( 2, $links ) ) echo '
    • …
    • '; } /** Link to current page, plus 2 pages in either direction if necessary */ sort( $links ); foreach ( (array) $links as $link ) { $class = $paged == $link ? ' class="active"' : ''; printf( '<li%s>%s' . "\n", $class, esc_url( get_pagenum_link( $link ) ), $link ); } /** Link to last page, plus ellipses if necessary */ if ( ! in_array( $max, $links ) ) { if ( ! in_array( $max - 1, $links ) ) echo '
    • …
    • ' . "\n"; $class = $paged == $max ? ' class="active"' : ''; printf( '<li%s>%s' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max ); } /** Next Post Link */ if ( get_next_posts_link() ) printf( '
    • %s
    • ' . "\n", get_next_posts_link() ); echo '
    </div>' . "\n"; } function wpmedia_get_meta( $value ) { global $post; $field = get_post_meta( $post->ID, $value, true ); if ( ! empty( $field ) ) { return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) ); } else { return false; } } function wpmedia_add_meta_box() { add_meta_box( 'wpmedia-wpmedia', __( 'wpmedia', 'wpmedia' ), 'wpmedia_html', 'post', 'normal', 'default' ); add_meta_box( 'wpmedia-wpmedia', __( 'wpmedia', 'wpmedia' ), 'wpmedia_html', 'page', 'normal', 'default' ); } add_action( 'add_meta_boxes', 'wpmedia_add_meta_box' ); function wpmedia_html( $post) { wp_nonce_field( '_wpmedia_nonce', 'wpmedia_nonce' ); ?> <table width="100%"> <tr><td><p> <label for="wpmedia_file_name"><?php _e( 'file name', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_file_name" id="wpmedia_file_name" value="<?php echo wpmedia_get_meta( 'wpmedia_file_name' ); ?>"> </p></td><td><p> <label for="wpmedia_additional_folders"><?php _e( 'additional folders', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_additional_folders" id="wpmedia_additional_folders" value="<?php echo wpmedia_get_meta( 'wpmedia_additional_folders' ); ?>"> </p></td> <td><p> <label for="wpmedia_duration"><?php _e( 'duration', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_duration" id="wpmedia_duration" value="<?php echo wpmedia_get_meta( 'wpmedia_duration' ); ?>"> </p></td></tr> <tr><td><p> <label for="wpmedia_width"><?php _e( 'width', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_width" id="wpmedia_width" value="<?php echo wpmedia_get_meta( 'wpmedia_width' ); ?>"> </p></td> <td><p> <label for="wpmedia_height"><?php _e( 'height', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_height" id="wpmedia_height" value="<?php echo wpmedia_get_meta( 'wpmedia_height' ); ?>"> </p></td><td><p> <label for="wpmedia_embed_code_youtube_vimeo_etc_"><?php _e( 'external embed code (youtube,vimeo,etc)', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_embed_code_youtube_vimeo_etc_" id="wpmedia_embed_code_youtube_vimeo_etc_" value="<?php echo wpmedia_get_meta( 'wpmedia_embed_code_youtube_vimeo_etc_' ); ?>"> </p></td></tr> <tr><td><p> <label for="wpmedia_video_description"><?php _e( 'video description', 'wpmedia' ); ?></label><br> <textarea name="wpmedia_video_description" id="wpmedia_video_description" ><?php echo wpmedia_get_meta( 'wpmedia_video_description' ); ?></textarea> </p></td></tr><?php } function wpmedia_save( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; if ( ! isset( $_POST['wpmedia_nonce'] ) || ! wp_verify_nonce( $_POST['wpmedia_nonce'], '_wpmedia_nonce' ) ) return; if ( ! current_user_can( 'edit_post', $post_id ) ) return; if ( isset( $_POST['wpmedia_file_name'] ) ) update_post_meta( $post_id, 'wpmedia_file_name', esc_attr( $_POST['wpmedia_file_name'] ) ); if ( isset( $_POST['wpmedia_additional_folders'] ) ) update_post_meta( $post_id, 'wpmedia_additional_folders', esc_attr( $_POST['wpmedia_additional_folders'] ) ); if ( isset( $_POST['wpmedia_duration'] ) ) update_post_meta( $post_id, 'wpmedia_duration', esc_attr( $_POST['wpmedia_duration'] ) ); if ( isset( $_POST['wpmedia_width'] ) ) update_post_meta( $post_id, 'wpmedia_width', esc_attr( $_POST['wpmedia_width'] ) ); if ( isset( $_POST['wpmedia_height'] ) ) update_post_meta( $post_id, 'wpmedia_height', esc_attr( $_POST['wpmedia_height'] ) ); if ( isset( $_POST['wpmedia_embed_code_youtube_vimeo_etc_'] ) ) update_post_meta( $post_id, 'wpmedia_embed_code_youtube_vimeo_etc_', esc_attr( $_POST['wpmedia_embed_code_youtube_vimeo_etc_'] ) ); if ( isset( $_POST['wpmedia_video_description'] ) ) update_post_meta( $post_id, 'wpmedia_video_description', esc_attr( $_POST['wpmedia_video_description'] ) ); } add_action( 'save_post', 'wpmedia_save' ); /* Usage: wpmedia_get_meta( 'wpmedia_file_name' ) Usage: wpmedia_get_meta( 'wpmedia_additional_folders' ) Usage: wpmedia_get_meta( 'wpmedia_duration' ) Usage: wpmedia_get_meta( 'wpmedia_width' ) Usage: wpmedia_get_meta( 'wpmedia_height' ) Usage: wpmedia_get_meta( 'wpmedia_embed_code_youtube_vimeo_etc_' ) Usage: wpmedia_get_meta( 'wpmedia_video_description' ) */ ?> <?php /************************************CODE-1*************************************** * @Author: Boutros AbiChedid * @Date: January 16, 2012 * @Websites: http://bacsoftwareconsulting.com/ ; http://blueoliveonline.com/ * @Description: Displays the Number of times Posts are Viewed on Your Blog. * Function: Sets, Tracks and Displays the Count of Post Views (Post View Counter) * Code is browser and JavaScript independent. * @Tested on: WordPress version 3.2.1 *********************************************************************************/ //Set the Post Custom Field in the WP dashboard as Name/Value pair function bac_PostViews($post_ID) { //Set the name of the Posts Custom Field. $count_key = 'post_views_count'; //Returns values of the custom field with the specified key from the specified post. $count = get_post_meta($post_ID, $count_key, true); //If the the Post Custom Field value is empty. if($count == ''){ $count = 0; // set the counter to zero. //Delete all custom fields with the specified key from the specified post. delete_post_meta($post_ID, $count_key); //Add a custom (meta) field (Name/value)to the specified post. add_post_meta($post_ID, $count_key, '0'); return $count . ' View'; //If the the Post Custom Field value is NOT empty. }else{ $count++; //increment the counter by 1. //Update the value of an existing meta key (custom field) for the specified post. update_post_meta($post_ID, $count_key, $count); //If statement, is just to have the singular form 'View' for the value '1' if($count == '1'){ return $count . ' View'; } //In all other cases return (count) Views else { return $count . ' Views'; } } } ?> <?php /*********************************CODE-3******************************************** * @Author: Boutros AbiChedid * @Date: January 16, 2012 * @Websites: http://bacsoftwareconsulting.com/ ; http://blueoliveonline.com/ * @Description: Adds a Non-Sortable 'Views' Columnn to the Post Tab in WP dashboard. * This code requires CODE-1(and CODE-2) as a prerequesite. * Code is browser and JavaScript independent. * @Tested on: WordPress version 3.2.1 ***********************************************************************************/ //Gets the number of Post Views to be used later. function get_PostViews($post_ID){ $count_key = 'post_views_count'; //Returns values of the custom field with the specified key from the specified post. $count = get_post_meta($post_ID, $count_key, true); return $count; } //Function that Adds a 'Views' Column to your Posts tab in WordPress Dashboard. function post_column_views($newcolumn){ //Retrieves the translated string, if translation exists, and assign it to the 'default' array. $newcolumn['post_views'] = __('Views'); return $newcolumn; } //Function that Populates the 'Views' Column with the number of views count. function post_custom_column_views($column_name, $id){ if($column_name === 'post_views'){ // Display the Post View Count of the current post. // get_the_ID() - Returns the numeric ID of the current post. echo get_PostViews(get_the_ID()); } } //Hooks a function to a specific filter action. //applied to the list of columns to print on the manage posts screen. add_filter('manage_posts_columns', 'post_column_views'); //Hooks a function to a specific action. //allows you to add custom columns to the list post/custom post type pages. //'10' default: specify the function's priority. //and '2' is the number of the functions' arguments. add_action('manage_posts_custom_column', 'post_custom_column_views',10,2); ?> <?php /** * Register the stylesheets for the public-facing side of the site. * @since 0.5 */ add_action( 'wp_enqueue_scripts', 'sl_enqueue_scripts' ); function sl_enqueue_scripts() { wp_enqueue_script( 'simple-likes-public-js', get_template_directory_uri() . '//cdn.foliovision.com/js/simple-likes-public.js', array( 'jquery' ), '0.5', false ); wp_localize_script( 'simple-likes-public-js', 'simpleLikes', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'like' => __( 'Like', 'Post' ), 'unlike' => __( 'Unlike', 'Post' ) ) ); } /** * Processes like/unlike * @since 0.5 */ add_action( 'wp_ajax_nopriv_process_simple_like', 'process_simple_like' ); add_action( 'wp_ajax_process_simple_like', 'process_simple_like' ); function process_simple_like() { // Security $nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( $_REQUEST['nonce'] ) : 0; if ( !wp_verify_nonce( $nonce, 'simple-likes-nonce' ) ) { exit( __( 'Not permitted', 'Post' ) ); } // Test if javascript is disabled $disabled = ( isset( $_REQUEST['disabled'] ) && $_REQUEST['disabled'] == true ) ? true : false; // Test if this is a comment $is_comment = ( isset( $_REQUEST['is_comment'] ) && $_REQUEST['is_comment'] == 1 ) ? 1 : 0; // Base variables $post_id = ( isset( $_REQUEST['post_id'] ) && is_numeric( $_REQUEST['post_id'] ) ) ? $_REQUEST['post_id'] : ''; $result = array(); $post_users = NULL; $like_count = 0; // Get plugin options if ( $post_id != '' ) { $count = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_comment_like_count", true ) : get_post_meta( $post_id, "_post_like_count", true ); // like count $count = ( isset( $count ) && is_numeric( $count ) ) ? $count : 0; if ( !already_liked( $post_id, $is_comment ) ) { // Like the post if ( is_user_logged_in() ) { // user is logged in $user_id = get_current_user_id(); $post_users = post_user_likes( $user_id, $post_id, $is_comment ); if ( $is_comment == 1 ) { // Update User & Comment $user_like_count = get_user_option( "_comment_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; update_user_option( $user_id, "_comment_like_count", ++$user_like_count ); if ( $post_users ) { update_comment_meta( $post_id, "_user_comment_liked", $post_users ); } } else { // Update User & Post $user_like_count = get_user_option( "_user_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; update_user_option( $user_id, "_user_like_count", ++$user_like_count ); if ( $post_users ) { update_post_meta( $post_id, "_user_liked", $post_users ); } } } else { // user is anonymous $user_ip = sl_get_ip(); $post_users = post_ip_likes( $user_ip, $post_id, $is_comment ); // Update Post if ( $post_users ) { if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_user_comment_IP", $post_users ); } else { update_post_meta( $post_id, "_user_IP", $post_users ); } } } $like_count = ++$count; $response['status'] = "liked"; $response['icon'] = get_liked_icon(); } else { // Unlike the post if ( is_user_logged_in() ) { // user is logged in $user_id = get_current_user_id(); $post_users = post_user_likes( $user_id, $post_id, $is_comment ); // Update User if ( $is_comment == 1 ) { $user_like_count = get_user_option( "_comment_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; if ( $user_like_count > 0 ) { update_user_option( $user_id, "_comment_like_count", --$user_like_count ); } } else { $user_like_count = get_user_option( "_user_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; if ( $user_like_count > 0 ) { update_user_option( $user_id, '_user_like_count', --$user_like_count ); } } // Update Post if ( $post_users ) { $uid_key = array_search( $user_id, $post_users ); unset( $post_users[$uid_key] ); if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_user_comment_liked", $post_users ); } else { update_post_meta( $post_id, "_user_liked", $post_users ); } } } else { // user is anonymous $user_ip = sl_get_ip(); $post_users = post_ip_likes( $user_ip, $post_id, $is_comment ); // Update Post if ( $post_users ) { $uip_key = array_search( $user_ip, $post_users ); unset( $post_users[$uip_key] ); if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_user_comment_IP", $post_users ); } else { update_post_meta( $post_id, "_user_IP", $post_users ); } } } $like_count = ( $count > 0 ) ? --$count : 0; // Prevent negative number $response['status'] = "unliked"; $response['icon'] = get_unliked_icon(); } if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_comment_like_count", $like_count ); update_comment_meta( $post_id, "_comment_like_modified", date( 'Y-m-d H:i:s' ) ); } else { update_post_meta( $post_id, "_post_like_count", $like_count ); update_post_meta( $post_id, "_post_like_modified", date( 'Y-m-d H:i:s' ) ); } $response['count'] = get_like_count( $like_count ); $response['testing'] = $is_comment; if ( $disabled == true ) { if ( $is_comment == 1 ) { wp_redirect( get_permalink( get_the_ID() ) ); exit(); } else { wp_redirect( get_permalink( $post_id ) ); exit(); } } else { wp_send_json( $response ); } } } /** * Utility to test if the post is already liked * @since 0.5 */ function already_liked( $post_id, $is_comment ) { $post_users = NULL; $user_id = NULL; if ( is_user_logged_in() ) { // user is logged in $user_id = get_current_user_id(); $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_liked" ) : get_post_meta( $post_id, "_user_liked" ); if ( count( $post_meta_users ) != 0 ) { $post_users = $post_meta_users[0]; } } else { // user is anonymous $user_id = sl_get_ip(); $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_IP" ) : get_post_meta( $post_id, "_user_IP" ); if ( count( $post_meta_users ) != 0 ) { // meta exists, set up values $post_users = $post_meta_users[0]; } } if ( is_array( $post_users ) && in_array( $user_id, $post_users ) ) { return true; } else { return false; } } // already_liked() /** * Output the like button * @since 0.5 */ function get_simple_likes_button( $post_id, $is_comment = NULL ) { $is_comment = ( NULL == $is_comment ) ? 0 : 1; $output = ''; $nonce = wp_create_nonce( 'simple-likes-nonce' ); // Security if ( $is_comment == 1 ) { $post_id_class = esc_attr( ' sl-comment-button-' . $post_id ); $comment_class = esc_attr( ' sl-comment' ); $like_count = get_comment_meta( $post_id, "_comment_like_count", true ); $like_count = ( isset( $like_count ) && is_numeric( $like_count ) ) ? $like_count : 0; } else { $post_id_class = esc_attr( ' sl-button-' . $post_id ); $comment_class = esc_attr( '' ); $like_count = get_post_meta( $post_id, "_post_like_count", true ); $like_count = ( isset( $like_count ) && is_numeric( $like_count ) ) ? $like_count : 0; } $count = get_like_count( $like_count ); $icon_empty = get_unliked_icon(); $icon_full = get_liked_icon(); // Loader $loader = ''; // Liked/Unliked Variables if ( already_liked( $post_id, $is_comment ) ) { $class = esc_attr( ' liked' ); $title = __( 'Unlike', 'Post' ); $icon = $icon_full; } else { $class = ''; $title = __( 'Like', 'Post' ); $icon = $icon_empty; } $output = '' . $icon . $count . '' . $loader . ''; return $output; } // get_simple_likes_button() /** * Processes shortcode to manually add the button to posts * @since 0.5 */ add_shortcode( 'jmliker', 'sl_shortcode' ); function sl_shortcode() { return get_simple_likes_button( get_the_ID(), 0 ); } // shortcode() /** * Utility retrieves post meta user likes (user id array), * then adds new user id to retrieved array * @since 0.5 */ function post_user_likes( $user_id, $post_id, $is_comment ) { $post_users = ''; $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_liked" ) : get_post_meta( $post_id, "_user_liked" ); if ( count( $post_meta_users ) != 0 ) { $post_users = $post_meta_users[0]; } if ( !is_array( $post_users ) ) { $post_users = array(); } if ( !in_array( $user_id, $post_users ) ) { $post_users['user-' . $user_id] = $user_id; } return $post_users; } // post_user_likes() /** * Utility retrieves post meta ip likes (ip array), * then adds new ip to retrieved array * @since 0.5 */ function post_ip_likes( $user_ip, $post_id, $is_comment ) { $post_users = ''; $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_IP" ) : get_post_meta( $post_id, "_user_IP" ); // Retrieve post information if ( count( $post_meta_users ) != 0 ) { $post_users = $post_meta_users[0]; } if ( !is_array( $post_users ) ) { $post_users = array(); } if ( !in_array( $user_ip, $post_users ) ) { $post_users['ip-' . $user_ip] = $user_ip; } return $post_users; } // post_ip_likes() /** * Utility to retrieve IP address * @since 0.5 */ function sl_get_ip() { if ( isset( $_SERVER['HTTP_CLIENT_IP'] ) && ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = ( isset( $_SERVER['REMOTE_ADDR'] ) ) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'; } $ip = filter_var( $ip, FILTER_VALIDATE_IP ); $ip = ( $ip === false ) ? '0.0.0.0' : $ip; return $ip; } // sl_get_ip() /** * Utility returns the button icon for "like" action * @since 0.5 */ function get_liked_icon() { /* If already using Font Awesome with your theme, replace svg with: <i class="fa fa-heart"></i> */ $icon = '<i class="fa fa-heart"></i> '; return $icon; } // get_liked_icon() /** * Utility returns the button icon for "unlike" action * @since 0.5 */ function get_unliked_icon() { /* If already using Font Awesome with your theme, replace svg with: <i class="fa fa-heart-o"></i> */ $icon = '<i class="fa fa-heart-o"></i> '; return $icon; } // get_unliked_icon() /** * Utility function to format the button count, * appending "K" if one thousand or greater, * "M" if one million or greater, * and "B" if one billion or greater (unlikely). * $precision = how many decimal points to display (1.25K) * @since 0.5 */ function sl_format_count( $number ) { $precision = 2; if ( $number >= 1000 && $number < 1000000 ) { $formatted = number_format( $number/1000, $precision ).'K'; } else if ( $number >= 1000000 && $number < 1000000000 ) { $formatted = number_format( $number/1000000, $precision ).'M'; } else if ( $number >= 1000000000 ) { $formatted = number_format( $number/1000000000, $precision ).'B'; } else { $formatted = $number; // Number is less than 1000 } $formatted = str_replace( '.00', '', $formatted ); return $formatted; } // sl_format_count() /** * Utility retrieves count plus count options, * returns appropriate format based on options * @since 0.5 */ function get_like_count( $like_count ) { $like_text = __( 'Like', 'Post' ); if ( is_numeric( $like_count ) && $like_count > 0 ) { $number = sl_format_count( $like_count ); } else { $number = $like_text; } $count = '' . $number . ' '; return $count; } // get_like_count() ?>
    Martin 4 years ago

    Hello Marcie,

    you sent the right code as it does register the “wpmedia” box on the post editing screen which is where the issue occurs – accodring to you screenshots.

    I tried to use that part of your code and I’m running into that same issue. And it turns out the issue is your wpmedia_html() function – it misses the closing table tag.

    So that’s an easy fix for you to do and they it should all be running just fine for you. I don’t see how we could prevent this issue in FV Player – if there is broken markup on the post editing page, any plugin might suffer some damage to its editing interface.

    Thanks,
    Martin

    marcie 4 years ago

    Where should I put that closing tag every time I do it gives a syntax error

    <tr><td><p>
    		<label for="wpmedia_video_description"><?php _e( 'video description', 'wpmedia' ); ?></label><br>
    		<textarea name="wpmedia_video_description" id="wpmedia_video_description" ><?php echo wpmedia_get_meta( 'wpmedia_video_description' ); ?></textarea>
    	
    	</p></td></tr></table> <?php
    }
    
    Or here
    
    add_action( 'save_post', 'wpmedia_save' );
    
    /*
    	Usage: wpmedia_get_meta( 'wpmedia_file_name' )
    	Usage: wpmedia_get_meta( 'wpmedia_additional_folders' )
    	Usage: wpmedia_get_meta( 'wpmedia_duration' )
    	Usage: wpmedia_get_meta( 'wpmedia_width' )
    	Usage: wpmedia_get_meta( 'wpmedia_height' )
    	Usage: wpmedia_get_meta( 'wpmedia_embed_code_youtube_vimeo_etc_' )
    	Usage: wpmedia_get_meta( 'wpmedia_video_description' )
    */
    </table>
    ?>
    
    marcie 4 years ago

    Nevermind found it must have been a delay that fixed it.

Viewing 10 replies - 1 through 10 (of 10 total)
Reply To: Post Interface Embeds into Custom Fields



Please Sign in or Register to upload files.

Related Posts

  1. New FV Player Features: Position Saving and Custom Video Fields

  2. Setting up Video Custom Fields

  3. Supercharge your video embeds with FV Flowplayer

    Supercharge your video embeds with FV Flowplayer

Primary Sidebar

Sign in Register
FV Player Docs Post New Topic

Welcome

to Foliovision support forums! We'll be happy to provide free support to resolve all the reported bugs. You always can start by specifying your OS and browser and steps to reproduce the bug.

If you need help with the installation on your site, please submit a request for a Pro Support Incident. We'll have you up and running in no time, with detailed instructions on how to resolve your issue yourself in the future.

Facing a hard to solve WordPress problem? On a tight deadline?

Let us take care of it for you
right now.

Pro Support Buy FV Player

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2025 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in .

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!