Update of /cvsroot/mxbb/mx_music/music_box In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16133/music_box Added Files: logo.png mediaplayer50.swf mp3player.html mp3player.swf music_mp3_player.php music_mp3s_popup_player.php ufo.js Log Message: fixed mp3 play in categories using jw flash player and media player in music page --- NEW FILE: music_mp3_player.php --- <?php /** * * @package Stargate Portal * @author Michael O'Toole - aka Michaelo * @begin Saturday, Jan 22, 2005 * @copyright (c) 2005-2008 phpbbireland * @home http://www.phpbbireland.com * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @note: Do not remove this copyright. Just append yours if you have modified it, * this is part of the Stargate Portal copyright agreement... * * @version $Id: music_mp3_player.php,v 1.1 2013/04/19 17:55:41 orynider Exp $ * Updated: * */ /** * @ignore */ // MX if ( !defined('IN_PORTAL') ) { //exit; die("Hacking attempt"); } // // Let's include some stuff... // $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('TEMPLATE_ROOT_PATH') ) { include_once($mx_root_path . 'common.' . $phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); // // End session management // } // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_size = $player_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); if(is_object($mx_block)) { $is_block = true; } else { $is_block = false; } $music_root_path = $module_root_path . 'music_box/'; global $music_config, $mx_root_path; $queries = $cached_queries = 0; // // Start output of page // $page_title = $lang['Music'] . " PHP Generated Playlist"; if (!$is_block) { include($mx_root_path . 'includes/page_header.'.$phpEx); } // // Generate debug stats // - from Olympus $debug_output = '<div align="center"><span class="copyright">'; $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $mx_starttime; if (!empty($_REQUEST['explain']) && method_exists($db, 'sql_report')) { $db->sql_report('display'); } $queries = @$db->sql_num_queries(); $debug_output .= sprintf('Time : %.3fs | ' . $queries . ' ' . $lang['PORTAL_DEBUG_QUERIES'] . ' | GZIP : ' . (($board_config['gzip_compress']) ? 'On' : 'Off' ) . ' | Load : ' . (($mx_user->load) ? $mx_user->load : 'N/A'), $totaltime); $debug_output .= '</span></div>'; $template->assign_vars(array( 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'BLOCK_TITLE' => $title, 'L_DESCRIPTION' => $lang['Music_Online'], 'S_SHOW_TITLE' => $show_title, 'TARGET_BLANK' => ($music_config['fullpic_popup']) ? 'target="_blank"' : '', 'L_MEDIA_UPLOAD' => sprintf($lang['Upload_Song']), 'L_MEDIA_PLAYER_POPUP' => sprintf($lang['MP3_POPUP']), 'L_MP3_PLAYER' => $lang['MP3_PLAYER'], 'U_UPLOAD_DIR' => $song_image_path, 'MP3_POPUP_IMG' => $images['button_mp3_popup'], 'UPLOAD_IMG' => $mx_user->img('icon_upload', 'Upload_Song'), 'MUSIC_BOX_PATH' => $music_root_path, 'U_GET_MP3_PLAYER_POP' => ($music_root_path . "mp3/get_mp3_files." . $phpEx . "?cat_id=" . $cat_id), 'MP3_PLAYER_DEBUG' => $debug_output, 'L_NEXT' => $lang['Next'], 'L_PREVIOUS' => $lang['Previous'], 'NAV_SEP' => $lang['Nav_Separator'], 'NAV_DOT' => '•', 'MUSIC_VERSION' => '2' . $music_config['music_version'], 'L_INDEX' => '<<', 'U_INDEX' => mx_append_sid($mx_root_path . "index.".$phpEx), 'L_MUSIC_INDEX' => $lang['Music'], 'L_MUSIC' => $lang['Music'], 'U_MUSIC' => mx_append_sid(this_mo_mxurl()), 'U_MX_MUSIC' => mx_append_sid(this_mo_portalurl()), 'WIDTH' => ( !empty($media_width) ? $media_width : '564' ), 'HEIGHT' => ( !empty($media_height) ? $media_height : '485' ), 'FLASH' => 'flash', 'RAM' => 'ram', 'FLASHVIDEO' => 'flashvideo', 'YOUTUBE' => 'youtube', 'VIMEO' => 'vimeo', 'QT' => 'qt', 'FLV' => 'flv', 'MOD' => 'mod', 'IMG' => 'img', 'MEDIA' => 'media', 'L_RATING' => $lang['Rating'], 'L_SONG_TITLE' => $lang['Song_Title'], 'L_SONG_DESC' => $lang['Song_Desc'], 'L_SINGER' => $lang['Singer'], 'L_POSTER' => $lang['Poster'], 'L_POSTED' => $lang['Posted'], 'L_VIEW' => $lang['View'], 'L_DOWNLOAD' => $lang['Download'], 'L_COMMENTS' => $lang['Comments']) ); $template->set_filenames(array( 'body' => 'music_mp3_player.html', )); // // Generate the page // $template->pparse('body'); if (!$is_block) { include($mx_root_path . 'includes/page_tail.'.$phpEx); } ?> --- NEW FILE: mp3player.swf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mp3player.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1250"> <TITLE>README: FLASH MP3 PLAYER 2</TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)"> <META NAME="AUTHOR" CONTENT="OryNider"> <META NAME="CREATED" CONTENT="20130419;2080000"> <META NAME="CHANGEDBY" CONTENT="OryNider"> <META NAME="CHANGED" CONTENT="20130419;2080000"> <STYLE TYPE="text/css"> <!-- @page { margin-right: 2.25cm; margin-top: 2.5cm; margin-bottom: 2cm } P { margin-bottom: 0.21cm } P.western { font-size: 10pt; so-language: ro-RO } P.cjk { font-size: 10pt } P.ctl { font-size: 10pt } A:link { color: #0000ff } --> </STYLE> </HEAD> <BODY LANG="en-US" LINK="#0000ff" DIR="LTR" STYLE="border: none; padding: 0cm"> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=6><B>README: FLASH MP3 PLAYER 2.3.1</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">Thanks for downloading my Flash MP3 Player! The player supports streaming playback, RSS/XSPF playlists, various playmodes, color/size customization and a javascript API. Both the configuration options and support for dynamic webservices have been greatly improved in this update. This mp3player also replaces the Flash Single MP3 Player, whose functionality is fully incorporated. Contents of this readme:</P> <UL> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#licensing"><FONT COLOR="#0000ff"><U>Licensing information</U></FONT></A> </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#html"><FONT COLOR="#0000ff"><U>Installing for HTML</U></FONT></A> </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#cms"><FONT COLOR="#0000ff"><U>Installing for a CMS or profile page</U></FONT></A> </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#cms"><FONT COLOR="#0000ff"><U>Installing for a single MP3</U></FONT></A> </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#flash"><FONT COLOR="#0000ff"><U>Installing inside a Flash Movie</U></FONT></A> </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#version"><FONT COLOR="#0000ff"><U>Version History</U></FONT></A> </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm"><A HREF="#extras"><FONT COLOR="#0000ff"><U>Extras</U></FONT></A> </P> </UL> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>LICENSING INFORMATION</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">This script is licensed under a <A HREF="http://creativecommons.org/licenses/by-nc-sa/2.5/"><FONT COLOR="#0000ff"><U>Creative Commons License</U></FONT></A>. It allows you to use, modify and redistribute the script as long as you use it non-commercially and credit me as the author. For commercial use, I distribute licenses of the script at a fee of 15 euros. One license applies to a single project, and you don't have to credit me as the author anymore. Please <A HREF="mailto:ma...@je..."><FONT COLOR="#0000ff"><U>contact me</U></FONT></A> for obtaining licenses!</P> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>INSTALLING FOR HTML</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">All settings of the mp3player can be made at three different places: in the config.xml file, the playlist.xml file and the mp3player.html file. You can open all three files in a text editor. I've added comments in these files to explain all settings. The config.xml file contains all settings relating to the colors and behavior of the mp3player. The playlist.xml contains a list of all songs and links in the playlist.</P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">If you want to use the mp3player on your own website, you can put all MP3 files in the 'mp3' folder and upload everything to your website. Make sure you've also added the 'mp3/' directory to the locations in the playlist, like I did!</P> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>INSTALLING FOR A CMS OR PROFILE PAGE</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">If you want to use the mp3player on a profile site like MySpace, or in a content management system like WordPress, you can put all mp3 files, plus the mp3player.swf/config.xml/playlist.xml to a suitable place on the website or free file service. You need to refer to the mp3 files in the playlist with the full pathname (so including the http://www.. part).</P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">In your profile or CMS, you can use the following code to insert the mp3player. I assume all files are on the location 'http://www.server.com/folder/', so you can just replace that with your files' location. </P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="200" id="mp3player" </FONT> </P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"> <FONT FACE="Courier New, monospace">codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ></FONT></P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"> <FONT FACE="Courier New, monospace"><param name="movie" value="http://www.server.com/mp3player.swf" /></FONT></P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"> <FONT FACE="Courier New, monospace"><param name="flashvars" value="config=http://www.server.com/config.xml&file=http://www.server.com/playlist.xml" /></FONT></P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"> <FONT FACE="Courier New, monospace"><embed src="http://www.server.com/mp3player.swf" width="300" height="200" name="mp3player"</FONT></P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"> <FONT FACE="Courier New, monospace">flashvars="config=http://www.server.com/config.xml&file=http://www.server.com/playlist.xml" </FONT> </P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"> <FONT FACE="Courier New, monospace">type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></FONT></P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"></object></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">For MySpace, you only need the a single line. I'm not sure about other profile sites, but I presume the same code would work there as well:</P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"><FONT FACE="Courier New, monospace"><embed allowScriptAccess="never" src="http://www.server.com/folder/mp3player.swf" menu="false" quality="high" width="300" height="200" name="mp3player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="&config=http://www.server.com/folder/config.xml&file=http://www.server.com/folder/playlist.xml" wmode="transparent" border="0" /></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">Next to refering to the SWF file with an absolute URL, this code also hands the SWF the location of the config.xml and playlist.xml, through the 'config' and 'file' variables. You can change both to whatever location you want, or even assign PHP/ASP files to dynamically get content from a database. Note that the xml files, unlike the MP3 files, always have to be on the same website as the mp3player.swf (security restrictions from flash).</P> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>INSTALLING FOR A SINGLE MP3</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">The 'file' variable, as described above, can be assigned to an XML playlist, but also to a single MP3 ('mp3player.swf?file=mysong.mp3'). The mp3player will then discard the playlist. You can use the config.xml to change the appearance of the mp3player, bu also discard it, in which case the mp3player will show as the default grey bar. This is a quick way to embed an MP3 file with playback controls into your website.</P> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>INSTALLING INSIDE A FLASH MOVIE</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">If you want to use the mp3player inside another Flash movie, you can simply copy-paste the 'mp3player' movieclip from the FLA into your own Flash file. If you also copy both .AS files to your Flash file's directory, the script will automatically be attached to the movieclip. At the top of the jwMp3player.as file, there's a lot of settings you can make, including all settings from the config.xml (which you can discard from then).</P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">One note on the 'width' and 'height' variables: they are re-set later on in the script in the readConfigXML() function. You can remove these two lines from the function.</P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">Also note that the FLA file is in Flash8 format, so it cannot be opened in older versions of Flash. Flash8 is also needed for publishing if you plan to use the javascript API. If not, publishing for Flash6 will suffice (actionscript 2.0 of course).</P> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>VERSION HISTORY</B></FONT></P> <UL> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">2.3.1: IE blank screen bug fixed. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">2.3: replaced automatic scrolling by scrollbar. Added 'autostart' flashvar for single mode. Some bugfixes (eg. cover art resizing / list mode). </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">2.2: added script callback for statistics, 'list' repeat mode. Speeded up playlist scrolling. Some bugfixes. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">2.1: added XSPF cover art support. Some bugfixes. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">2.0: added RSS/XSPF playlists, color/size customization, javascript API, complete rewrite of the code. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">1.1: some bugfixes and addition of random and autoplay vars. </P> </UL> <P LANG="ro-RO" STYLE="margin-top: 0.18cm; margin-bottom: 0.18cm; page-break-after: avoid"> <FONT SIZE=5><B>EXTRAS</B></FONT></P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">Next to the necessary files, this readme and the source code of the script, this package contains a couple of extras that might be useful in deploying the script:</P> <UL> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">The color_picker contains an html file with color swatches. you can click a swatch to get the corresponding color code to use inside the config.xml. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">The external_feeds provides a workaroud in PHP for loading podcasts/playlists from external sites, even while it's forbidden by the Flash security. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">The force_download provides a workaround in PHP for downloading an MP3 upon a link click, instead of it opening in a new screen or mediaplayer. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">The javascript_control provides a list of javascript functions that can be used to control the player and dynamically load mp3's or playlists. </P> <LI><P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">The playlist_examples provides an example of the RSS(podcast) and XSPF format that this mp3player can load. It also provides an example of how to get the playlist from a PHP/MySQL database and how to generate a playlist from a directory of MP3 files. </P> </UL> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">For more extras, tips and tricks you can always have a look at my forum's !</P> <P LANG="ro-RO" CLASS="western" STYLE="margin-bottom: 0cm">website: <A HREF="http://www.jeroenwijering.com/"><FONT COLOR="#0000ff"><U>www.jeroenwijering.com</U></FONT></A> | last update: april 21st, 2006 </P> <P LANG="ro-RO" STYLE="margin-bottom: 0cm"><BR> </P> </BODY> </HTML> --- NEW FILE: mediaplayer50.swf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ufo.js --- /* Unobtrusive Flash Objects (UFO) v3.20 <http://www.bobbyvandersluis.com/ufo/> Copyright 2005, 2006 Bobby van der Sluis This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/> */ var UFO = { req: ["movie", "width", "height", "majorversion", "build"], opt: ["play", "loop", "menu", "quality", "scale", "salign", "wmode", "bgcolor", "base", "flashvars", "devicefont", "allowscriptaccess", "seamlesstabbing"], optAtt: ["id", "name", "align"], optExc: ["swliveconnect"], ximovie: "ufo.swf", xiwidth: "215", xiheight: "138", ua: navigator.userAgent.toLowerCase(), pluginType: "", fv: [0,0], foList: [], create: function(FO, id) { if (!UFO.uaHas("w3cdom") || UFO.uaHas("ieMac")) return; UFO.getFlashVersion(); UFO.foList[id] = UFO.updateFO(FO); UFO.createCSS("#" + id, "visibility:hidden;"); UFO.domLoad(id); }, updateFO: function(FO) { if (typeof FO.xi != "undefined" && FO.xi == "true") { if (typeof FO.ximovie == "undefined") FO.ximovie = UFO.ximovie; if (typeof FO.xiwidth == "undefined") FO.xiwidth = UFO.xiwidth; if (typeof FO.xiheight == "undefined") FO.xiheight = UFO.xiheight; } FO.mainCalled = false; return FO; }, domLoad: function(id) { var _t = setInterval(function() { if ((document.getElementsByTagName("body")[0] != null || document.body != null) && document.getElementById(id) != null) { UFO.main(id); clearInterval(_t); } }, 250); if (typeof document.addEventListener != "undefined") { document.addEventListener("DOMContentLoaded", function() { UFO.main(id); clearInterval(_t); } , null); // Gecko, Opera 9+ } }, main: function(id) { var _fo = UFO.foList[id]; if (_fo.mainCalled) return; UFO.foList[id].mainCalled = true; document.getElementById(id).style.visibility = "hidden"; if (UFO.hasRequired(id)) { if (UFO.hasFlashVersion(parseInt(_fo.majorversion, 10), parseInt(_fo.build, 10))) { if (typeof _fo.setcontainercss != "undefined" && _fo.setcontainercss == "true") UFO.setContainerCSS(id); UFO.writeSWF(id); } else if (_fo.xi == "true" && UFO.hasFlashVersion(6, 65)) { UFO.createDialog(id); } } document.getElementById(id).style.visibility = "visible"; }, createCSS: function(selector, declaration) { var _h = document.getElementsByTagName("head")[0]; var _s = UFO.createElement("style"); if (!UFO.uaHas("ieWin")) _s.appendChild(document.createTextNode(selector + " {" + declaration + "}")); // bugs in IE/Win _s.setAttribute("type", "text/css"); _s.setAttribute("media", "screen"); _h.appendChild(_s); if (UFO.uaHas("ieWin") && document.styleSheets && document.styleSheets.length > 0) { var _ls = document.styleSheets[document.styleSheets.length - 1]; if (typeof _ls.addRule == "object") _ls.addRule(selector, declaration); } }, setContainerCSS: function(id) { var _fo = UFO.foList[id]; var _w = /%/.test(_fo.width) ? "" : "px"; var _h = /%/.test(_fo.height) ? "" : "px"; UFO.createCSS("#" + id, "width:" + _fo.width + _w +"; height:" + _fo.height + _h +";"); if (_fo.width == "100%") { UFO.createCSS("body", "margin-left:0; margin-right:0; padding-left:0; padding-right:0;"); } if (_fo.height == "100%") { UFO.createCSS("html", "height:100%; overflow:hidden;"); UFO.createCSS("body", "margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;"); } }, createElement: function(el) { return (UFO.uaHas("xml") && typeof document.createElementNS != "undefined") ? document.createElementNS("http://www.w3.org/1999/xhtml", el) : document.createElement(el); }, createObjParam: function(el, aName, aValue) { var _p = UFO.createElement("param"); _p.setAttribute("name", aName); _p.setAttribute("value", aValue); el.appendChild(_p); }, uaHas: function(ft) { var _u = UFO.ua; switch(ft) { case "w3cdom": return (typeof document.getElementById != "undefined" && typeof document.getElementsByTagName != "undefined" && (typeof document.createElement != "undefined" || typeof document.createElementNS != "undefined")); case "xml": var _m = document.getElementsByTagName("meta"); var _l = _m.length; for (var i = 0; i < _l; i++) { if (/content-type/i.test(_m[i].getAttribute("http-equiv")) && /xml/i.test(_m[i].getAttribute("content"))) return true; } return false; case "ieMac": return /msie/.test(_u) && !/opera/.test(_u) && /mac/.test(_u); case "ieWin": return /msie/.test(_u) && !/opera/.test(_u) && /win/.test(_u); case "gecko": return /gecko/.test(_u) && !/applewebkit/.test(_u); case "opera": return /opera/.test(_u); case "safari": return /applewebkit/.test(_u); default: return false; } }, getFlashVersion: function() { if (UFO.fv[0] != 0) return; if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { UFO.pluginType = "npapi"; var _d = navigator.plugins["Shockwave Flash"].description; if (typeof _d != "undefined") { _d = _d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); var _m = parseInt(_d.replace(/^(.*)\..*$/, "$1"), 10); var _r = /r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/, "$1"), 10) : 0; UFO.fv = [_m, _r]; } } else if (window.ActiveXObject) { UFO.pluginType = "ax"; try { // avoid fp 6 crashes var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch(e) { try { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); UFO.fv = [6, 0]; _a.AllowScriptAccess = "always"; // throws if fp < 6.47 } catch(e) { if (UFO.fv[0] == 6) return; } try { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if (typeof _a == "object") { var _d = _a.GetVariable("$version"); // bugs in fp 6.21/6.23 if (typeof _d != "undefined") { _d = _d.replace(/^\S+\s+(.*)$/, "$1").split(","); UFO.fv = [parseInt(_d[0], 10), parseInt(_d[2], 10)]; } } } }, hasRequired: function(id) { var _l = UFO.req.length; for (var i = 0; i < _l; i++) { if (typeof UFO.foList[id][UFO.req[i]] == "undefined") return false; } return true; }, hasFlashVersion: function(major, release) { return (UFO.fv[0] > major || (UFO.fv[0] == major && UFO.fv[1] >= release)) ? true : false; }, writeSWF: function(id) { var _fo = UFO.foList[id]; var _e = document.getElementById(id); if (UFO.pluginType == "npapi") { if (UFO.uaHas("gecko") || UFO.uaHas("xml")) { while(_e.hasChildNodes()) { _e.removeChild(_e.firstChild); } var _obj = UFO.createElement("object"); _obj.setAttribute("type", "application/x-shockwave-flash"); _obj.setAttribute("data", _fo.movie); _obj.setAttribute("width", _fo.width); _obj.setAttribute("height", _fo.height); var _l = UFO.optAtt.length; for (var i = 0; i < _l; i++) { if (typeof _fo[UFO.optAtt[i]] != "undefined") _obj.setAttribute(UFO.optAtt[i], _fo[UFO.optAtt[i]]); } var _o = UFO.opt.concat(UFO.optExc); var _l = _o.length; for (var i = 0; i < _l; i++) { if (typeof _fo[_o[i]] != "undefined") UFO.createObjParam(_obj, _o[i], _fo[_o[i]]); } _e.appendChild(_obj); } else { var _emb = ""; var _o = UFO.opt.concat(UFO.optAtt).concat(UFO.optExc); var _l = _o.length; for (var i = 0; i < _l; i++) { if (typeof _fo[_o[i]] != "undefined") _emb += ' ' + _o[i] + '="' + _fo[_o[i]] + '"'; } _e.innerHTML = '<embed type="application/x-shockwave-flash" src="' + _fo.movie + '" width="' + _fo.width + '" height="' + _fo.height + '" pluginspage="http://www.macromedia.com/go/getflashplayer"' + _emb + '></embed>'; } } else if (UFO.pluginType == "ax") { var _objAtt = ""; var _l = UFO.optAtt.length; for (var i = 0; i < _l; i++) { if (typeof _fo[UFO.optAtt[i]] != "undefined") _objAtt += ' ' + UFO.optAtt[i] + '="' + _fo[UFO.optAtt[i]] + '"'; } var _objPar = ""; var _l = UFO.opt.length; for (var i = 0; i < _l; i++) { if (typeof _fo[UFO.opt[i]] != "undefined") _objPar += '<param name="' + UFO.opt[i] + '" value="' + _fo[UFO.opt[i]] + '" />'; } var _p = window.location.protocol == "https:" ? "https:" : "http:"; _e.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + _objAtt + ' width="' + _fo.width + '" height="' + _fo.height + '" codebase="' + _p + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + _fo.majorversion + ',0,' + _fo.build + ',0"><param name="movie" value="' + _fo.movie + '" />' + _objPar + '</object>'; } }, createDialog: function(id) { var _fo = UFO.foList[id]; UFO.createCSS("html", "height:100%; overflow:hidden;"); UFO.createCSS("body", "height:100%; overflow:hidden;"); UFO.createCSS("#xi-con", "position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;"); UFO.createCSS("#xi-dia", "position:absolute; left:50%; top:50%; margin-left: -" + Math.round(parseInt(_fo.xiwidth, 10) / 2) + "px; margin-top: -" + Math.round(parseInt(_fo.xiheight, 10) / 2) + "px; width:" + _fo.xiwidth + "px; height:" + _fo.xiheight + "px;"); var _b = document.getElementsByTagName("body")[0]; var _c = UFO.createElement("div"); _c.setAttribute("id", "xi-con"); var _d = UFO.createElement("div"); _d.setAttribute("id", "xi-dia"); _c.appendChild(_d); _b.appendChild(_c); var _mmu = window.location; if (UFO.uaHas("xml") && UFO.uaHas("safari")) { var _mmd = document.getElementsByTagName("title")[0].firstChild.nodeValue = document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0, 47) + " - Flash Player Installation"; } else { var _mmd = document.title = document.title.slice(0, 47) + " - Flash Player Installation"; } var _mmp = UFO.pluginType == "ax" ? "ActiveX" : "PlugIn"; var _uc = typeof _fo.xiurlcancel != "undefined" ? "&xiUrlCancel=" + _fo.xiurlcancel : ""; var _uf = typeof _fo.xiurlfailed != "undefined" ? "&xiUrlFailed=" + _fo.xiurlfailed : ""; UFO.foList["xi-dia"] = { movie:_fo.ximovie, width:_fo.xiwidth, height:_fo.xiheight, majorversion:"6", build:"65", flashvars:"MMredirectURL=" + _mmu + "&MMplayerType=" + _mmp + "&MMdoctitle=" + _mmd + _uc + _uf }; UFO.writeSWF("xi-dia"); }, expressInstallCallback: function() { var _b = document.getElementsByTagName("body")[0]; var _c = document.getElementById("xi-con"); _b.removeChild(_c); UFO.createCSS("body", "height:auto; overflow:auto;"); UFO.createCSS("html", "height:auto; overflow:auto;"); }, cleanupIELeaks: function() { var _o = document.getElementsByTagName("object"); var _l = _o.length for (var i = 0; i < _l; i++) { _o[i].style.display = "none"; for (var x in _o[i]) { if (typeof _o[i][x] == "function") { _o[i][x] = null; } } } } }; if (typeof window.attachEvent != "undefined" && UFO.uaHas("ieWin")) { window.attachEvent("onunload", UFO.cleanupIELeaks); } --- NEW FILE: logo.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: music_mp3s_popup_player.php --- <?php /** * * @package Stargate Portal * @author Michael O'Toole - aka Michaelo * @begin Saturday, Jan 22, 2005 * @copyright (c) 2005-2008 phpbbireland * @home http://www.phpbbireland.com * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @note: Do not remove this copyright. Just append yours if you have modified it, * this is part of the Stargate Portal copyright agreement... * * @version $Id: music_mp3s_popup_player.php,v 1.1 2013/04/19 17:55:41 orynider Exp $ * Updated: * */ /** * @ignore */ // MX if( !defined('IN_PORTAL') || !is_object($mx_block)) { @define('IN_PORTAL', true); $mx_root_path = "../../../"; $module_root_path = "./../"; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once($mx_root_path . 'common.'.$phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); // // End session management // $title = 'Media Player Radio'; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '170' ); $is_block = FALSE; } else { // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_size = $player_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); if( is_object($mx_block)) { $is_block = TRUE; } } $media_width = ( !empty($media_width) ? $media_width : '170' ); $media_height = ( !empty($media_height) ? $media_height : '300' ); @define('_RADIO_CONFIG', true); $music_root_path = $module_root_path . 'music_box/'; $song_image_default = $images['no_image']; // The default image $song_image_path = MUSIC_IMAGE_PATH; include_once($music_root_path .'music_common.'.$phpEx); //global $music_config; // ------------------------------------ // Check the request // ------------------------------------ if (!$mx_request_vars->is_empty_request('cat_id')) { $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, 0); $cat_parent = $mx_request_vars->request('c', MX_TYPE_INT, 0); $cat_where = ($cat_id != 0) ? "cat_parent = $cat_parent" : "cat_id <> 0"; $sql = "SELECT c.*, COUNT(s.song_id) AS count FROM ". MUSIC_CAT_TABLE ." AS c LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_cat_id WHERE cat_id = $cat_id GROUP BY cat_id ORDER BY cat_order ASC"; if( !($result = $db->sql_query($sql)) ) { die("Could not query this category"); } } else { $cat_id = 0; $cat_parent = 0; $cat_where = "cat_id <> 0"; mx_message_die(GENERAL_ERROR, 'No categories specified'); $sql = "SELECT c.*, COUNT(s.song_id) AS count FROM ". MUSIC_CAT_TABLE ." AS c LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_cat_id WHERE $cat_where GROUP BY cat_id ORDER BY cat_order ASC"; if( !($result = $db->sql_query($sql)) ) { die("No category specified && Could not query categories list"); } } // --------------------------------------------- // Ckeck is category has subcats start // --------------------------------------------- $catrows = array(); while($row = $db->sql_fetchrow($result)) { $music_user_access = music_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW // ------------------------------------ // Get this cat info // ------------------------------------ if ($music_user_access['view'] == 1) { $auth_data = music_user_access($cat_id, $row, 1, 1, 1, 1, 1, 1); // ALL } $catrows[] = $row; if($row['cat_id'] == $cat_id ) { $thiscat = $row; $total_songs = $thiscat['count']; } else { $thiscat = ''; $total_songs = false; } if ( $media_height > ($media_height + ($total_songs * ($media_height / $media_width))) ) { $media_height = $media_height + ($total_songs * $media_width / $total_songs * $media_height); } else { $media_height = $media_height + ($total_songs * ($media_height / $media_width)); } } $db->sql_freeresult($result); // If not set, set the subcat output count to 50 //To do: Add a setting in AdminCP for maximum number of subcategories to show in a category and add pagination //$count = $mx_request_vars->request('c', MX_TYPE_INT, 50); // // END check request // if( isset($HTTP_GET_VARS['block_mode']) ) { if ($HTTP_GET_VARS['block_mode'] == 'true') { $block_mode = 'true'; } else { $block_mode = 'false'; } } else { $block_mode = 'false'; } /* if (!class_exists('template_compile')) { include($phpbb_root_path . 'includes/functions_template.' . $phpEx); } */ // Start session management //$mx_user->session_begin(false); $phpbb_auth->acl($mx_user->data); //$mx_user->setup('portal/portal'); // End session management $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->decode_lang($mx_user->lang['default_lang']) : $board_config['default_lang']; $user_lang = $mx_user->lang['default_lang'] ? $mx_user->lang['default_lang'] : $mx_user->encode_lang($board_config['default_lang']); // // Start output of page // $page_title = $lang['Music'] . " PHP Generated Playlist"; if ( (!$is_block) && (!$block_mode) ) { include($mx_root_path . 'includes/page_header.'.$phpEx); } $template->assign_vars(array( 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'PLAYER_SIZE' => $player_size, 'SHOW_HEADER' => ($is_block) ? false : true, //+ MX-Publisher 'U_PORTAL_ROOT_PATH' => PORTAL_URL, 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, 'MODULE_PATH' => $module_root_path, 'T_PHPBB_STYLESHEET' => $theme['head_stylesheet'], 'T_MXBB_STYLESHEET' => $theme['head_stylesheet'], 'PORTAL' => (defined('IN_PORTAL')) ? true : false, 'PORTAL_INDEX_PAGE' => $is_block ? true : false, 'WIDTH' => ( !empty($media_width) ? $media_width : '170' ), 'HEIGHT' => ( !empty($media_height) ? $media_height : '200' ), 'BLOCK_TITLE' => $title, 'L_DESCRIPTION' => $lang['Music_Online'], 'S_SHOW_TITLE' => $show_title, 'TARGET_BLANK' => ($music_config['fullpic_popup']) ? 'target="_blank"' : '', 'L_MEDIA_UPLOAD' => sprintf($lang['Upload_Song']), 'L_MEDIA_PLAYER_POPUP' => sprintf($lang['MP3_POPUP']), 'L_MP3_PLAYER' => $lang['MP3_PLAYER'], 'U_UPLOAD_DIR' => $song_image_path, 'MP3_POPUP_IMG' => $images['button_mp3_popup'], 'UPLOAD_IMG' => $mx_user->img('icon_upload', 'UPLOAD'), 'MUSIC_BOX_PATH' => $music_root_path, 'U_GET_MP3_PLAYER_POP' => ($music_root_path . "mp3/get_mp3_files_pop." . $phpEx . "?cat_id=" . $cat_id), 'MP3_PLAYER_DEBUG' => '', 'L_NEXT' => $lang['Next'], 'L_PREVIOUS' => $lang['Previous'], 'NAV_SEP' => $lang['Nav_Separator'], 'NAV_DOT' => '•', 'MUSIC_VERSION' => '2' . $music_config['music_version'], 'L_INDEX' => '<<', 'U_INDEX' => mx_append_sid($mx_root_path . "index.".$phpEx), 'L_MUSIC_INDEX' => $lang['Music'], 'L_MUSIC' => $lang['Music'], 'U_MUSIC' => mx_append_sid(this_mo_mxurl()), 'U_MX_MUSIC' => mx_append_sid(this_mo_portalurl()), 'FLASH' => 'flash', 'RAM' => 'ram', 'FLASHVIDEO' => 'flashvideo', 'YOUTUBE' => 'youtube', 'VIMEO' => 'vimeo', 'QT' => 'qt', 'FLV' => 'flv', 'MOD' => 'mod', 'IMG' => 'img', 'MEDIA' => 'media', 'S_CONTENT_DIRECTION' => $lang['DIRECTION'] ? $lang['DIRECTION'] : $mx_user->lang['DIRECTION'], 'S_CONTENT_DIR_LEFT' => $lang['LEFT'], 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'], 'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right', 'S_CONTENT_FLOW_END' => ($lang['DIRECTION'] == 'ltr') ? 'right' : 'left', 'S_CONTENT_ENCODING' => $lang['ENCODING'] ? $lang['ENCODING'] : 'UTF-8', 'S_LANGUAGE' => $default_lang, 'S_USER_LANG' => $lang['USER_LANG'] ? $lang['USER_LANG'] : $user_lang, 'L_RATING' => $lang['Rating'], 'L_SONG_TITLE' => $lang['Song_Title'], 'L_SONG_DESC' => $lang['Song_Desc'], 'L_SINGER' => $lang['Singer'], 'L_POSTER' => $lang['Poster'], 'L_POSTED' => $lang['Posted'], 'L_VIEW' => $lang['View'], 'L_DOWNLOAD' => $lang['Download'], 'L_COMMENTS' => $lang['Comments']) ); $template->set_filenames(array( 'body' => 'music_mp3_popup_player.html', )); // // Generate the page // $template->pparse('body'); if ( (!$is_block) && (!$block_mode) ) { include($mx_root_path . 'includes/page_tail.'.$phpEx); } ?> |