Publishing a video from blog to youtube

If there’s a plugin, it has to be found. If not, a custom solution has to be written. But YouTube does provide an API for that. YouTube API v2.0 – Direct Uploading This page explains how to upload videos to YouTube using direct uploading. Direct uploading lets you add videos that are in your video … Read more

add youtube thumbnail in index and single.php add video

To solve this: 1. Add custom meta to each post which take youtube url( name of custom meta in code youtube). 2. In index.php loop: while(have_posts()){ the_post(); //use [get_post_meta][3] to get youtube post meta $youtube_img = ‘http://img.youtube.com/vi/’.substr( get_post_meta($post-ID,’youtube’) ).’/0.jpg’; //$youtube_img is your youtube video image url echo ‘<a href=”‘.get_permalink().'”>’; echo ‘<img src=”‘.$youtube_img.'” title=”‘.get_the_title().'” alt=”youtube video … Read more

how can i display all youtube videos from a users youtube account

You can use YouTube developer API. Example how to get recent videos below: $data = wp_remote_get(‘http://gdata.youtube.com/feeds/api/users/<USERNAME>/uploads/?start-index=1&max-results=40’); $response = new SimpleXMLElement($data[‘body’]); foreach ($response->entry as $entry): $vid_id = ”; if ( preg_match(‘#videos/([^/]+)$#’, $entry->id, $matches) ) { $vid_id = $matches[1]; } if ( $vid_id ): ?> <a href=”http://youtube.com/watch?v=<?php echo $vid_id; ?>”> <img src=”http://i.ytimg.com/vi/<?php echo $vid_id; ?>/1.jpg” width=”220″ height=”130″ … Read more

How To Use YouTube Url Stored In Custom Field To Get Video Image and Set it As Featured Image

function set_youtube_as_featured_image($post_id) { if( has_post_thumbnail($post_id) ) return; $url = get_post_meta($post_id, ‘ci_cpt_video_link’, true); if ( $url && filter_var($url, FILTER_VALIDATE_URL) ) { // getting thumb url from video url parse_str( parse_url( $url, PHP_URL_QUERY ), $youtube_vars ); $youtube_id = $youtube_vars[‘v’]; $youtube_thumb_url=”http://img.youtube.com/vi/” . $youtube_id . ‘/0.jpg’; // download and save thumb $get = wp_remote_get( $youtube_thumb_url ); $mime_type = wp_remote_retrieve_header( … Read more

How to change src link in YouTube?

function add_embed_filter($html) { return ‘<div class=”js-video widescreen”>’.str_replace(“?feature=oembed”, “?html5=1”, $html).'</div>’; } add_filter( ’embed_oembed_html’, ‘add_embed_filter’, 50, 1); Of course if WordPress or Youtube change how this url is constructed you will have to adapt your code accordingly, but I tested it, and this will get you there with WordPress 3.8.1. I also did not test how this … Read more

Adding YouTube button to TinyMCE editor

The problem is that the URL to your script is pointing to the Thematic theme directory, not your child theme. Instead of: $plugin_array[‘youryoutube’] = get_bloginfo(‘template_url’).’/editor_plugin.js’; …you need: $plugin_array[‘youryoutube’] = get_stylesheet_directory_uri() . ‘/editor_plugin.js’;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)