Sutherland Boswell
Forum Replies Created
-
Yep, just use
<?php if( ( $video_thumbnail = get_video_thumbnail() ) != null && !is_single() ) { echo "<img src='" . $video_thumbnail . "' />"; } ?>Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] Multiple thumbnails?So each post has two videos? The plugin currently focuses on using
the_post_thumbnail()template tag provided by WordPress which only allows one thumbnail per post, so you’d need to get your hands dirty with some changes to the plugin code to save multiple thumbnails per post.Just tested it with the exact image you mentioned with no problem, so the problem is most likely related to your hosting environment. Not sure what steps you should take other than finding a better host if they’re unwilling to help you.
Have you entered the correct name of the custom field in the video thumbnails settings page?
If you try posting a video from vimeo do you get the same error?
Also, did the server administrator actually check if libcurl can fetch external images or did they refer you to the author without checking?
oEmbed is a great tool for embedding content, but once a video is in an embed code form it is harder to discover which means different providers need special code.
Pulling a thumbnail from SoundCloud and other non-video providers would push the plugin outside of its intended purpose, but I’m working on the possibility of easily customizing your own provider list and maybe oEmbed will help that.
It looks like your theme uses timthumb which has its own form of caching. Check in your theme’s directory for a cache or temporary directory and try clearing the images there.
Did you copy the theme from one site to another?
Can you provide some more details?
Try disabling the plugin and removing the featured image, and if you reenable the plugin be sure to redo your settings right away.
Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] Not getting the ThumbnailIt sounds like you have “Thumbnail” entered in the custom field on the settings page. This setting is used when the video itself is in a custom field. If you have something entered here, that field is being scanned instead of the article content.
If you need to save the video thumbnail to a custom field for your theme other than the default “_video_thumbnail”, you can change this section:
// Add hidden custom field with thumbnail URL if ( !update_post_meta( $post_id, '_video_thumbnail', $new_thumbnail ) ) add_post_meta( $post_id, '_video_thumbnail', $new_thumbnail, true );to this:
// Add hidden custom field with thumbnail URL plus another field if ( !update_post_meta( $post_id, '_video_thumbnail', $new_thumbnail ) ) add_post_meta( $post_id, '_video_thumbnail', $new_thumbnail, true ); if ( !update_post_meta( $post_id, 'REPLACE_WITH_YOUR_CUSTOM_FIELD', $new_thumbnail ) ) add_post_meta( $post_id, 'REPLACE_WITH_YOUR_CUSTOM_FIELD', $new_thumbnail, true );Of course, replacing “REPLACE_WITH_YOUR_CUSTOM_FIELD” with the name of the custom field you want the URL saved to.
Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] Not getting the ThumbnailSo you’re placing your videos in a custom post type?
Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] buddypress supportI don’t have any experience with BuddyPress, but I’d imagine it’s possible that future versions could support it so I’ll keep it in mind.
PurpleChamber’s solution should work for anyone needing an immediate fix. As I mentioned before, when you update to 2.0 it will include support for higher resolution thumbnails from YouTube and Vimeo when available.
The Video Thumbnail data is still stored with the posts so it thinks that there’s already a thumbnail. This thread has a modification you can make to clear all of the data stored for video thumbnails.
Forum: Plugins
In reply to: [Video Thumbnails] [Plugin: Video Thumbnails] reset thumbnail for all postsYikes! Very sorry that this happened to you. I believe there are some bulk deletion plugins that you could use to clear all attachments.
As for resetting all of the video thumbnails, you should be able to make a small change so that when you use the “scan past posts” option it will clear the custom field for video thumbnails.
In video-thumbnails.php just change this:
function video_thumbnails_past_callback() { global $wpdb; // this is how you get access to the database $post_id = $_POST['post_id']; // Clear video thumbnail meta before scanning delete_post_meta( $post_id, '_video_thumbnail' ); echo get_the_title( $post_id ) . ' - '; $video_thumbnail = get_video_thumbnail( $post_id ); if ( is_wp_error( $video_thumbnail ) ) { echo $video_thumbnail->get_error_message(); } else if ( $video_thumbnail != null ) { echo '<span style="color:green">✔</span> Success!'; } else { echo '<span style="color:red">✖</span> Couldn\'t find a video thumbnail for this post.'; } die(); }to this:
function video_thumbnails_past_callback() { global $wpdb; // this is how you get access to the database $post_id = $_POST['post_id']; // Clear video thumbnail meta delete_post_meta( $post_id, '_video_thumbnail' ); echo get_the_title( $post_id ) . ' - Video Thumbnail meta deleted'; die(); }Now when you run the “scan past posts” option on the settings page it will instead clear the video thumbnail information stored with the post. Once you undo the change, you can “scan past posts” normally and it will find new thumbnails.
Let me know if you need any more help. I’m in the process of version 2.0 and one of the changes is that all media uploaded as a video thumbnail is specially tagged so that if this type of bug happened again they can all be deleted with one click.