public static function summary( MEOW_Field $field ) { // here we'd show the thumbnail if available global $wf; $summary_thumb = ""; $empty = ""; $summary_display_title = ""; $host_name = ""; $prop_thumbnail = ""; $prop_duration = ""; $prop_host = ""; $no_url = __("( no URL )", MASTERPRESS_DOMAIN); $empty = "empty"; list($stw, $sth) = array(84, 63); $summary_thumb = WOOF_Image::empty_mp_thumb(array("w" => $stw, "h" => $sth, "no_image" => $no_url, "class" => "summary-thumb") ); if (!$field->blank()) { $prop_title = $field->prop("title"); $prop_thumbnail = $field->prop_val("thumbnail"); $prop_video_id = $field->prop("video_id"); $prop_host = $field->prop("host"); $prop_duration = $field->prop("duration"); $summary_display_title = WOOF::truncate_advanced($prop_title, 50, $etc = ' … ', false, true); $host_name = self::host_name($prop_host); if ($prop_thumbnail && $prop_thumbnail != "") { $img = $wf->image_from_url($prop_thumbnail); if ($img && $img->exists()) { $summary_thumb = $img->mp_thumb(array("w" => $stw, "h" => $sth, "no_image" => $no_url, "thumb_only" => true, "class" => "summary-thumb")); } } } $html = <<<HTML <div class="summary-content"> {$summary_thumb} <div class="summary-info"> <span class="title">{$summary_display_title}</span> <span class="host"><span class="host-type {$prop_host}"><span class="host-name">{$host_name}</span><span class="duration">({$prop_duration})</span></span></span> </div> </div> HTML; return $html; }