Viewing 1 replies (of 1 total)
  • Thread Starter ablesa

    (@ablesa)

    I have succeed in just posting in the table the EMBED code, like this on parse.php file:

    function WP_ayvpp_add_meta($i) {
    global $tern_wp_youtube_fields,$tern_wp_youtube_array;
    foreach($tern_wp_youtube_fields as $v) {
    delete_post_meta($i,$v);
    if(!empty($tern_wp_youtube_array[$v]) or !empty($_POST[$v])) {
    $m = empty($tern_wp_youtube_array[$v]) ? $_POST[$v] : $tern_wp_youtube_array[$v];
    //UPDATE META YOUTUBE
    update_post_meta($i,$v,$m);

    }
    }

    $m = get_post_meta($i,’_thumbnail_id’,true);
    if(!wp_is_post_revision($i) and (!$m or empty($m) or (is_string($m) and strlen($m) < 1))) {
    //UPDATE META YOUTUBE
    update_post_meta($i,’_thumbnail_id’,$tern_wp_youtube_array[‘_tern_wp_youtube_video’]);

    //EMBED VIDEO FUNCTION
    //ADD NEW META FIELDS
    add_post_meta($i,’wpzoom_is_featured’,’1′);
    add_post_meta($i,’wpzoom_post_template’,’side-right’);
    add_post_meta($i,’wpzoom_post_embed_location’,’In the middle column’);
    add_post_meta($i,’wpzoom_video_type’,’external’);
    $embed_code='<iframe width=”420″ height=”315″ src=”//www.youtube.com/embed/’.$tern_wp_youtube_array[‘_tern_wp_youtube_video’].'” frameborder=”0″ allowfullscreen></iframe>’;
    add_post_meta($i,’wpzoom_post_embed_code’,$embed_code);
    add_post_meta($i,’wpzoom_post_embed_self’,”);
    add_post_meta($i,’wpzoom_post_embed_hd’,”);
    add_post_meta($i,’wpzoom_post_embed_skin’,’Five’);
    /*UPDATE USELESS META DATA
    update_post_meta($i,’_tern_wp_youtube_published’,”);
    update_post_meta($i,’_tern_wp_youtube_author’,”);
    update_post_meta($i,’_tern_wp_youtube_video’,”);
    update_post_meta($i,’_thumbnail_id’,”);*/

    }
    unset($m);
    return true;
    }

    And making this change in the video.php file:
    function tern_wp_youtube_video_meta($e=true) {
    /*global $post;
    $a = get_post_custom($post->ID);
    $s = ‘<div class=”tern_wp_youtube_video_meta_data”><div class=”tern_wp_youtube_video_meta”>’;
    $s .= tern_wp_youtube_author_link($a[‘_tern_wp_youtube_author’][0],false);
    $s .= empty($a[‘_tern_wp_youtube_published’][0]) ? ” : ‘<span>’.get_the_time(‘D, F j, Y g:ia’).'</span>’;
    $s .= ‘<label>URL:</label><input type=”text” value=”‘.tern_wp_youtube_video_link($a[‘_tern_wp_youtube_video’][0],false).'” onmouseup=”this.select();” />’;
    $s .= ‘<label>Embed:</label><input type=”text” value=”‘.htmlentities(tern_wp_youtube_video(false)).'” onmouseup=”this.select();” />’;
    $s .= ‘</div></div>’;
    if($e) { echo $s; }
    return $s;*/
    }

Viewing 1 replies (of 1 total)
  • The topic ‘AYVP and VIDEOZOOM theme’ is closed to new replies.