break; case "image": $ret = image($id, $va, $opt, $optb); break; case "overim": $ret = overim($id, $va); $t = $id; list($w, $h) = getimagesize($id); $p = lj('', 'popup_photo__x_' . ajx($id) . '_' . $w . '_' . $h . '_' . $va, pictxt('popup', $v)); break; case "video": req('pop,spe'); list($w, $h) = explode('-', $sz); $s = $w; $tt = $id; $ret = video_players($id, video_providers($id), $w, $h - 20, $_GET['pagup']); break; case "popmp3": req('pop'); $t = $id; $ret = audio($id); break; case "popim": list($w, $h) = getimagesize($id); $ret = photo_screen($id, $w, $h, $sz); break; case "poptxt": req('tri'); $ret = nl2br(convertmail(read_file($id))); $t = $id; $s = 440;
function video_auto($doc, $l, $id, $media) { //p§w/h list($pdoc, $w, $h) = subparams_a($doc); if ($w == '1') { return popvideo($pdoc); } $l = $w ? $w : $l; $l = $l > 0 ? $l : 640; $h = $h > 0 ? $h : 440; if (substr($pdoc, 0, 4) == 'http') { $pdoc = auto_video($pdoc, '', '', 2); } $vid = video_providers($pdoc); if ($vid && $media != 3 or $id != get('read')) { return popvideo($pdoc); } if ($pdoc) { $ret = video_players($pdoc, $vid, $l, $h, $id) . "\n"; } return $ret; }
function popvideo($d) { list($d, $t) = explode('§', $d); $p = video_providers($d); list($w, $h) = explode('/', $t); if (is_numeric($w)) { return video_players($d, $p, $w, $h, ''); } $j = 'pagup_video___' . ajx($d) . '___autosize'; $url = video_url($d, $p, $t) . ' '; $im = video_img($d, $p); if ($im && !$t) { $bt = lj('', $j, image($im, '120', '90', '')); } $open = lj('', $j, pictxt('play', '')) . ' '; if ($bt) { return divc('', $bt . ' ' . btn('small', $url)); } else { return btn('popbt', $open . $url); } }