Hi
I’m just wondering if theres a way to make the thumbnails resize dynamically so that it would look uniform without stretching to fit…
]]>I have put together some code for this plugin to also get the image from wordTube video posts:
added after line 104:
$content = $r->post_content;
$wordtubeshortcode = stripos($content, "[media");
added after the stripos <img routine line 130ish:
if($wordtubeshortcode !== false){
$html = $r->post_content;
$matches = array();
$pattern = "/\[media id=(\d+)\]/";
preg_match( $pattern, $html, $matches );
$wordtubeId = $matches['1'];
$image = $wpdb->get_var($wpdb->prepare("SELECT image FROM $wpdb->wordtube WHERE vid = $wordtubeId;"));
}
It does not work with the legacy [media=#] or [media id=# width=# height=#]
to use width and height use:
$pattern = "/\[media id=(\d+)(?: width=)?(\d+)?(?: height=)?(\d+)?\]/";
Hopefully someone can improve on this.
Cheers
]]>Upon installation it shows a number of errors.
]]>