To Reddie (brace yourself, my reply is practically an essay, lol):
reddie wrote:Thank you very much for helping me cmcsweeney.
Here's a couple of question before I proceed. Does the "musicplayer.php" need to contain the exact info that's in the original player code "mod_premiumbeat_player.php" (in other words, a duplicate of the "mod_premiumbeat_player.php" file? Also, do I keep this original player code in it's original place which is: /home/modules/mod_premiumbeat_player/mod_premiumbeat_player.php while the musicplayer.php file is placed in the main joomla folder (in my case this folder is called "home")? Sorry, I'm know very little about coding but I'm currently learning it today with Lynda.com.

Actually, the "musicplayer.php" file contains different code. Also, the Premiumbeat player I used is actually a package separate from the Joomla module one (I originally DID try that one, but it kept restarting the music each time I navigated...etc)
Since you mentioned that you don't know the code that well, I'm going to state what you can do, step by step, as I always find that easier to take when I'm looking for Joomla help

(I also made a file of ItchySox's popup suggestion, which may work better for certain designs that don't work too well with frames. I'll list that method later in this message).
Also, for clarity's sake, I refer to the Joomla directory as the "home" folder (so there's a lot of code below that you'll be able to copy/paste)
1) Go to
http://www.premiumbeat.com/flash_resour ... ic_player/ and choose a player that best fits your purpose. In this case, I chose the first one ("Mini Flash mp3 Player") because it's small and unobtrusive.
2) Unzip the zip folder and place the "playerMiniPackage" folder in your "Home" directory (i.e. the directory where all the Joomla stuff is stored)
3) The "sampleEmbedCode.html" file in the folder contains the code that goes in the musicplayer.php file.
Here is the the code (I'll list it below to save you the trouble of locating the file). This is the only code that follows the <title>...</title> tags:
Code: Select all
<body>
<script type="text/javascript" src="playerMiniPackage/swfobject.js"></script>
<div id="flashPlayer">
This text will be replaced by the flash music player.
</div>
<script type="text/javascript">
var so = new SWFObject("playerMiniPackage/playerMini.swf", "mymovie", "75", "30", "7", "#FFFFFF");
so.addVariable("autoPlay", "yes");
so.addVariable("soundPath", "playerMiniPackage/song.mp3");
so.write("flashPlayer");
</script>
</body>
</html>
4) From what I could see of your
http://www.drsholesdouglas.com/home/ site, I'm guessing your directories would look like this (please let me know if this is incorrect):
[]=folder
[public_html] (the directory that contains all the
http://www.drsholesdouglas.com online files)
[Home] (your Joomla folder, which contains files/folders listed on the next 4 lines)
--index.php
--musicplayer.php
--[playerMiniPackage]
--all the other Joomla files...etc
5) Now you're going to make a index.html file and you're going to put it one directory
above the Home folder (so it's put directly into the Public_html folder and therefore would be the first thing people see when they access
http://www.drsholesdouglas.com, instead of it going straight to /home/index.php). This is the file we're going to be using for the last few steps.
(now I'll list the two possible ways you can display the player)
6)
THE FRAMES METHOD:
put this code in your index.html (have it replace everything after your <title>...</title>) tags:
Code: Select all
</head>
<frameset rows="40, *" border="0">
<frame src="home/musicplayer.php" scrolling="no"/>
<frame src="home/index.php" />
</frameset>
</html>
You can change various attributes of the frames (more on that can be found
here )
An example of the 'Frames' method: http://mcsweeneydesign.com/Joomlatest/
7)
THE POPUP METHOD (thanks once again to ItchySox for his suggestion, as this might be the better solution). I got this one from
http://www.codelifter.com: (once again, this replaces all code after the <title>...</title> tags):
Code: Select all
<script>
var theURL = 'home/musicplayer.php';
var width = 300;
var height = 400;
function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width=50,height=50');
}
</script>
<style type="text/css">
html, body, div, iframe { margin:0; padding:0; height:100%; }
iframe { display:block; width:100%; border:none; }
</style>
</head>
<body onload="popWindow()">
<iframe src="home/index.php" height="100%" width="100%">
</iframe>
</body>
</html>
Just to mention: the elements between the <style .... </style> tags makes sure that the 'iframe' that holds the joomla content takes up the entire page (and that it doesn't have borders, looks natural...etc)
An example of the 'popup' method: http://mcsweeneydesign.com/Joomlatest/index2.html
Last thing to note: if you want to change the song, you just need to rename the file you want to 'song.mp3' and replace it in the playerMiniPackage folder.
Phew. I hope that makes sense. If you have any more questions, feel free to ask.
****
To ItchySox: If you happen to know a php way of 'making a pop up' occur in the Joomla index.php file (similar in appearance to the popup method I used, but could be used in an already created php file), that would be fantastic.
I tried the
Joomla Popin plugin, which worked smoothly (and would be great for several other uses), but sadly reloads when the user navigates.
Anyway, thanks once again for the popup suggestion! I might actually end of using it as it's the more flexible option
