Sutherland Boswell
Forum Replies Created
-
Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] Libcurl Error for VimeoVimeo’s Simple API is for public data only. Maybe one day their advanced API could be used instead if a user enters authentication details.
I’ll be making a post about version 2.0 soon and I’m looking for some testers. You can sign up here.
I’ve suggested similar fixes for plugins that only store the video ID in a custom field, but the problem is knowing it’s only the ID and what service it belongs to. It looks like I could add
if (function_exists('WP_ayvpp_init'))and then run the code specific to AYVP.I usually create a custom meta box for the video’s url, which makes it super easy. This way the video description can go in the normal post content, and the video’s url will have a separate field that appears.
Can you be more specific about what happens when you use that code?
I like to store a video URL in a custom field to maintain flexibility for future changes to my sites. You can learn more about custom fields here. Then in your theme’s code you’d retrieve the custom field and insert it into JW Player. This way you’re future-proofing yourself because you won’t be tied to all those videos always being embedded the same way.
Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] can't activate the pluginWhen I started this plugin I wasn’t very familiar with WordPress, but since then I’ve learned a lot. WordPress has an HTTP API with a handy function named
wp_remote_getthat I’m planning on using in place of cURL. This should make the plugin more friendly with more server setups because the function tries multiple PHP methods for making the HTTP request.Forum: Plugins
In reply to: [Video Thumbnails] Video Thumbnails and Blip.tvIt will need an if statement (
wp_oembed_getwill return false if the field already has an embed code) but it’s something I’ll add.Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] Add other video sitesI’m working on version 2.0 which includes some major code reorganization that will make adding new video sites much easier. If you sign up to test the beta there’s a better chance I’ll add support for those sites!
Can’t point to exactly where you need to modify your theme, but if you have a single.php file in your theme try finding the code where it displays the featured image, and wrap it in
<?php if( !get_video_thumbnail() ) : ?>...<?php endif; ?>This should only display the featured image on a single post page if it doesn’t have a video thumbnail. If your video posts are always going to be in a ‘video’ category you could also use
<?php if ( in_category( 'video' ) ) : ?>...<?php endif; ?>Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] Where do I find code to resize?Typically I recommend letting WordPress do the resizing work for you with their built-in post thumbnail function (which Video Thumbnails takes advantage of), but it will only size images down. TimThumb is where you want to look if you’d like to size images up.
Theoretically I like the idea of video links being discovered, but could see it being annoying in some situations. Usually I’d assume if you’re only including a link to a video that you might want a thumbnail for it. If anyone else would like to weigh in on this it’d be great to know how people would like it to work.
This is something I’d really like to do – and it is supposed to work as you described. The problem I’ve found is that
the_contentfilter doesn’t seem to reliably use oEmbed. There’s a thread here that discusses the issue, and I remember doing a little testing and finding that if I run any query before usingget_postthat it would use oEmbed. I thinkget_postshould be replaced because of this weird behavior.As for embedding using other plugins,
the_contentshould be inserting the embed code, so they shouldn’t actually require their own regex.I’ve done a little work on version 2.0, which uses classes to better organize functionality and will really help make it easier to maintain and include support for more sites. It needs testing, so anyone interested can sign up here.
Great! I just released version 1.8.1 which includes this fix so you won’t have to worry about future updates breaking it again.
I think I may have a fix, would you mind testing it out for me? Open up the plugin and find this block of code:
add_action( 'new_to_publish', 'save_video_thumbnail', 10, 1 ); add_action( 'draft_to_publish', 'save_video_thumbnail', 10, 1 ); add_action( 'pending_to_publish', 'save_video_thumbnail', 10, 1 ); add_action( 'future_to_publish', 'save_video_thumbnail', 10, 1 );and add this line to the end:
add_action( 'xmlrpc_publish_post', 'get_video_thumbnail', 10, 1 );