sav571
New Members-
Posts
3 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
sav571's Achievements
Newbie (1/5)
0
Reputation
-
here is the code.. [CODE] <?php function outputPlayer($type, $path, $width, $height, $standalone = 0, $md5 = "") { global $mosConfig_live_site, $database; // load mambot parameters $query = "SELECT id FROM #__mambots WHERE element = 'mgmediabot' AND folder = 'content'"; $database->setQuery( $query ); $id = $database->loadResult(); $mambot = new mosMambot( $database ); $mambot->load( $id ); $mambotParams =& new mosParameters( $mambot->params ); $popupAutorun = $mambotParams->get( 'popupAutorun', '1' ); $contentAutorun = $mambotParams->get( 'contentAutorun', '0' ); $path = html_entity_decode($path); $pathi = str_replace('mms:', 'http:', $path); $indir = str_replace('mms:', 'http:', $path); $mp3indir = str_replace('.wma', '.mp3', $indir); if (($standalone && $popupAutorun) || $contentAutorun) { $autoplay = "1"; } else { $autoplay = "1"; } if //REAL Player formate ($type == "rm") { $player = "<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" height=\"$height\" width=\"$width\">\n"; $player.= " <param name=\"controls\" value=\"ControlPanel\" />\n"; $player.= " <param name=\"autostart\" value=\"$autoplay\" />\n"; $player.= " <param name=\"src\" value=\"$path\" />\n"; $player.= " <embed src=\"$path\" type=\"audio/x-pn-realaudio-plugin\" width=\"$width\" height=\"30\" controls=\"ControlPanel\" autostart=\"$autoplay\" />\n"; $player.= "</object>\n"; //SONSTIGE VIDEOS } elseif ($type == "avi" || $type == "mpg" || $type == "mpeg") { $player = "<object id=\"MediaPlayer\" width=\"$width\" height=\"$height\" classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=\"application/x-oleobject\">\n"; $player.= " <param name=\"URL\" value=\"$path\" />\n"; $player.= " <param name=\"ShowControls\" value=\"0\">\n"; $player.= " <param name=\"stretchToFit\" value=\"-1\" />\n"; $player.= " <param name=\"enableContextMenu\" value=\"0\">\n"; $player.= " <param name=\"autoStart\" value=\"$autoplay\">\n"; $player.= " <embed src=\"$pathi\" height=\"$height\" width=\"$width\" border=\"0\" autoStart=\"$autoplay\" type=\"application/x-mplayer2\"/></embed>\n"; $player.= "</object>\n"; //WMV VIDEO Download inkl.aber AUS } elseif ($type == "wmv") { $player = "<object id=\"MediaPlayer\" width=\"$width\" height=\"$height\" classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=\"application/x-oleobject\">\n"; $player.= " <param name=\"URL\" value=\"$pathi\" />\n"; $player.= " <param name=\"ShowControls\" value=\"0\">\n"; $player.= " <param name=\"stretchToFit\" value=\"-1\" />\n"; $player.= " <param name=\"enableContextMenu\" value=\"0\">\n"; $player.= " <param name=\"autoStart\" value=\"$autoplay\">\n"; $player.= " <embed src=\"$pathi\" height=\"$height\" width=\"$width\" border=\"0\" autoStart=\"$autoplay\" type=\"application/x-mplayer2\"/></embed>\n"; $player.= "</object>\n"; $player.= "<p> </p>\n"; // $player.= "<table width=\"400\" height=\"38\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"30\"><a href=\"$indir\"><img src=\"/mambots/content/indirnew.png\" alt=\"\" width=\"200\" height=\"38\" border=\"0\"></a></td><td><a href=\"$path\"><img src=\"/mambots/content/farklinew.png\" alt=\"\" width=\"200\" height=\"38\" border=\"0\"></a></td></tr></table>\n"; //$player.= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div align=\"center\"><a href=\"$pathi\"><img src=\"/mambots/content/farklinew.png\" alt=\"Pencere\" width=\"200\" height=\"38\" border=\"0\"></a></div></td></tr></table>\n"; //WMA Audio Downlaod inkl. } elseif ($type == "wma") { $player = "<object id=\"MediaPlayer\" width=\"$width\" height=\"$height\" classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=\"application/x-oleobject\">\n"; $player.= " <param name=\"URL\" value=\"$pathi\" />\n"; $player.= " <param name=\"ShowControls\" value=\"0\">\n"; $player.= " <param name=\"stretchToFit\" value=\"-1\" />\n"; $player.= " <param name=\"enableContextMenu\" value=\"0\">\n"; $player.= " <param name=\"autoStart\" value=\"$autoplay\">\n"; $player.= " <embed src=\"$pathi\" height=\"$height\" width=\"$width\" border=\"0\" autoStart=\"$autoplay\" type=\"application/x-mplayer2\"/></embed>\n"; $player.= "</object>\n"; $player.= "<p> </p>\n"; $player.= "<table width=\"400\" height=\"38\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"30\"><a href=\"$mp3indir\"><img src=\"/mambots/content/indirnew.png\" alt=\"\" width=\"200\" height=\"38\" border=\"0\"></a></td></tr></table>\n"; //MOV Quicktime } elseif ($type == "mov" || $type == "mp4") { $player = "<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" height=\"$height\" width=\"$width\">\n"; $player.= " <param name=\"src\" value=\"$pathi\" />\n"; $player.= " <param name=\"autoplay\" value=\"$autoplay\" />\n"; $player.= " <param name=\"controller\" value=\"true\" />\n"; $player.= " <embed pluginspage=\"http://www.apple.com/quicktime/download/\" src=\"$pathi\" type=\"video/quicktime\" width=\"$width\" height=\"$height\" controller=\"true\" autoplay=\"$autoplay\" />\n"; $player.= "</object>\n"; //SWF } elseif ($type == "swf") { $player = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"$width\" height=\"$height\">\n"; $player.= " <param name=\"movie\" value=\"$pathi\">\n"; $player.= " <param name=\"quality\" value=\"high\">\n"; $player.= " <embed src=\"$pathi\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$width\" height=\"$height\"></embed>\n"; $player.= "</object>\n"; //FLASH } elseif ($type == "flv") { $player = "<object type=\"application/x-shockwave-flash\" data=\"$mosConfig_live_site/mambots/content/mgmediabot/flvplayer.swf?autoStart=$autoplay&file=$path\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"$width\" height=\"$height\" wmode=\"transparent\" />\n"; $player .= " <param name=\"movie\" value=\"$mosConfig_live_site/mambots/content/mgmediabot/flvplayer.swf?autoStart=$autoplay&file=$path\" />\n"; $player .= " <param name=\"wmode\" value=\"transparent\" />\n"; $player .= " <embed src=\"$mosConfig_live_site/mambots/content/mgmediabot/flvplayer.swf?autoStart=$autoplay&file=$path\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$width\" height=\"$height\"></embed>\n"; $player .= "</object>\n"; //MP3 formati } elseif ($type == "mp3") { $player = "<object id=\"MediaPlayer\" width=\"$width\" height=\"$height\" classid=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" type=\"application/x-oleobject\">\n"; $player.= " <param name=\"URL\" value=\"$pathi\" />\n"; $player.= " <param name=\"ShowControls\" value=\"0\">\n"; $player.= " <param name=\"stretchToFit\" value=\"-1\" />\n"; $player.= " <param name=\"enableContextMenu\" value=\"0\">\n"; $player.= " <param name=\"autoStart\" value=\"$autoplay\">\n"; $player.= " <embed src=\"$pathi\" height=\"$height\" width=\"$width\" border=\"0\" autoStart=\"$autoplay\" type=\"application/x-mplayer2\"/></embed>\n"; $player.= "</object>\n"; $player.= "<p> </p>\n"; $player.= "<table width=\"400\" height=\"38\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"30\"><a href=\"$mp3indir\"><img src=\"/mambots/content/indirnew.png\" alt=\"\" width=\"200\" height=\"38\" border=\"0\"></a></td></tr></table>\n"; [b]// i want to add here the popup button...[/b] with $path } else { echo "Site'de hata var yöneticiye haber verin (Hata: $path Ply ERROR) "; } return $player; } function parseQs($qs) { $params = preg_split('#,|\|#', $qs); if (count($params) >0 && count($params)%2 == 0) { for ($i=0;$i<count($params);$i+=2) { $qss[$params[$i]] = $params[$i+1]; #echo $params[$i] . "=". $params[$i+1] . "<br>"; } return $qss; } else { echo "Ungerade Anzahl von Parametern!"; return false; } } if (is_file("../../../configuration.php")) { define( '_VALID_MOS', 1 ); require_once( '../../../globals.php' ); require_once( '../../../configuration.php' ); if (is_file('../../../includes/joomla.php')) { require_once( '../../../includes/joomla.php' ); } elseif (is_file('../../../includes/mambo.php')) { require_once( '../../../includes/mambo.php' ); } $params = mosGetParam( $_GET, 'params', false ); $playlistpath0 = mosGetParam( $_GET, 'playlistpath0', false ); $playlistpath1 = mosGetParam( $_GET, 'playlistpath1', false ); if ($params && !$playlistpath0 && !$playlistpath1) { $urlparams = parseQs($params); if ($urlparams['standalone']) { header("Content-type: text/html; charset=UTF-8"); ?> <html> <head> <title>itibarHaber</title> <link rel="Stylesheet" type="text/css" href="<?php echo $mosConfig_live_site; ?>/mambots/content/mgmediabot/style.css" /> </head> <body> <div id="playerdiv"></div> <?php echo "<script language=\"Javascript\">"; $rows = explode("\n", outputPlayer($urlparams['type'], $urlparams['path'],$urlparams['width'],$urlparams['height'], true)); $playerdivcontent = ""; foreach ($rows as $key => $value) { $playerdivcontent .= $value; } echo "document.getElementById('playerdiv').innerHTML = ('".$playerdivcontent."');\n"; echo "</script>"; ?> </body> </html><?php } } elseif ($playlistpath0){ echo createPlaylist($playlistpath0, "", "MP3", 0); } elseif ($playlistpath1){ echo createPlaylist($playlistpath1, "", "MP3", 1); } else { } } else { ?> <script language="Javascript" type="text/javascript"> function openPlayer(url, width, height) { window.open(url, 'mgmediabotplayer', 'dependent=yes,width=' + width + ',height=' + height + ',innerwidth=' + width + ',innerheight=' + height + ',location=no,menubar=no,resizable=no,status=no,toolbar=no'); } </script><?php } ?> [/CODE]
-
Hello, i have a $path and i want to open this path in a new popup with windows media player... I try it with javascript but it do not work. Can you help me please regards, sav571
-
Hello, i have a variable like $link . $link example mms://mysite/video.wmv i want to remove mms (3charaters at the begining) of $link and add http. how can i do this?