function GetVideo($name, $file, $image, $play_width, $play_height, $arg = '', $vid) { // Init parameters $settings = ''; $path = pathinfo($file); $extension = strtolower($path['extension']); $hs_width = $play_width; $ID = 'v' . rand(); // Prepare the script string if ($extension == "flv") { $text = get_pt_options('wordtube_vtext'); } elseif ($extension == "mp3") { $text = get_pt_options('wordtube_mtext'); $playertype = get_wt_playertypemp3(); if (get_wt_options('showeq')) { $play_height = 70; } else { $play_height = 20; } } $new_args = pt_parse_arg($arg); if (isset($new_args['MYCLASSHREF'])) { $myclasshref = $new_args['MYCLASSHREF']; } else { $myclasshref = ''; } if (isset($new_args['MYCLASSIMG'])) { $myclassimg = ' class="' . $new_args['MYCLASSIMG'] . '"'; } else { $myclassimg = ''; } // Get thumbnail if ($arg == '') { $t = new pt_thumbnail(get_pt_options_all(), $image, 'keepratio=0&width=' . get_pt_options('wordtube_width') . '&height=' . get_pt_options('wordtube_height') . '&altappend=' . get_pt_options('wordtube_text') . '&textbox=1&text=' . $text . $this->addArg); } else { $t = new pt_thumbnail(get_pt_options_all(), $image, $arg . $this->addArg); } $thumb_url = $t->thumb_url; unset($t); // returns custom message for RSS feeds if (is_feed()) { if (!empty($thumb_url)) { $replace = '<br /><a href="' . $image . '"><img src="' . $thumb_url . '" alt="media"></a><br />' . "\n"; } if (get_wt_options('activaterss')) { $replace .= "[" . get_wt_options('rssmessage') . "]"; } return $replace; } // Prepare highslide html if (POSTTHUMB_USE_HS) { $replace = SetWordTubeMedia($file, $image, $play_width, $play_height, $ID, $extension, get_wt_playertype(), get_wt_options_all(), false, $vid); $h = new pt_highslide('#', $thumb_url, $name); $h->set_wrapClass('highslide-wrapper-wtb'); $h->set_borders(get_pt_options('hsframe')); $h->set_size($play_width, $play_height, get_pt_options('hsmargin')); $h->set_href_text($name, $this->myclassimg . $this->align); $h->set_myclassimg($myclassimg); $h->set_myclasshref($myclasshref); $highslide = $h->highslide_link('swfObject', 'so' . $ID); unset($h); $replace .= $highslide; } elseif (POSTTHUMB_USE_TB || POSTTHUMB_USE_SB) { $replace = SetWordTubeMedia($file, $image, $play_width, $play_height, $ID, $extension, get_wt_playertype(), get_wt_options_all(), true, $vid); $h = new pt_thickbox('', $thumb_url, $name); $h->set_size($play_width + 5, $play_height + 10); $h->set_href_text($name); $h->set_myclasshref($myclasshref); $h->set_body($replace); $replace = $h->thickbox_link('swfObject', $ID); unset($h); } return $replace; }
function GetVideo($name, $file, $image, $play_width, $play_height) { // Init parameters $settings = ''; $path = pathinfo($file); $extension = strtoupper($path['extension']); $hs_width = $play_width; $ID = 'v' . rand(); // Prepare the script string if ($extension == "FLV") { $text = $this->settings['wordtube_vtext']; } elseif ($extension == "MP3") { $text = $this->settings['wordtube_mtext']; } // Prepare highslide html if (class_exists('pt_highslide')) { $replace = SetWordTubeMedia($file, $image, $play_width, $play_height, $ID, $extension, get_wt_playertype(), get_wt_options_all()); $h = new pt_highslide('#', $this->thumb_url, $name); $h->set_wrapClass('highslide-wrapper-wtb'); $h->set_borders($this->settings['hsframe']); $h->set_size($play_width, $play_height, $this->settings['hsmargin']); $h->set_href_text($name, $this->myclassimg . $this->align); $h->set_myclassimg($this->myclassimg); $h->set_myclasshref($this->myclasshref); $highslide = $h->highslide_link('swfObject', 'so' . $ID); unset($h); $replace .= $highslide; } elseif (class_exists('pt_thickbox')) { $replace = SetWordTubeMedia($file, $image, $play_width, $play_height, $ID, $extension, get_wt_playertype(), get_wt_options_all(), true); $h = new pt_thickbox('', $this->thumb_url, $name); $h->set_size($play_width + 5, $play_height + 10); $h->set_href_text($name); $h->set_body($replace); $replace = $h->thickbox_link('swfObject', $ID); } return $replace; }