[RC] Simple Audio Player Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
Locked
guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 8:36 pm

keith10456 wrote:1) Replace file again (use same link).

2) Move your "audioplayer_files" directory (with audio files) inside of your "audioplayer" directory. So it should be: root/audioplayer/audioplayer_files
I just did what you asked and audioplayer_files are now within the audioplayer directory. Replaced the file as well in templated audioplayer.html and refreshed templates several times, general cache refresh as well and refeshed the browser cache several times as well.

Still no file listings...

William

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Simple Audio Player Mod

Post by keith10456 » Thu Feb 21, 2013 8:42 pm

muggins wrote:Maybe unrelated, but I get these errors:

PHP Deprecated: Assigning the return value of new by reference is deprecated in /var/www/Test/flashmp3player.php on line 344, etc.

Change the three instances of &new to new on lines 344, 347 and 1699 to fix the issue with new versions of php.
Thanks! I added the changes for the next version. Will definitely give you credit ;)

guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 8:43 pm

muggins wrote:Maybe unrelated, but I get these errors:

PHP Deprecated: Assigning the return value of new by reference is deprecated in /var/www/Test/flashmp3player.php on line 344, etc.

Change the three instances of &new to new on lines 344, 347 and 1699 to fix the issue with new versions of php.
I did the above changes and nothing different, so I replaced it back to original again. Should I have done so Keith, Muggins?

William

guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 8:44 pm

guardianwill wrote:
muggins wrote:Maybe unrelated, but I get these errors:

PHP Deprecated: Assigning the return value of new by reference is deprecated in /var/www/Test/flashmp3player.php on line 344, etc.

Change the three instances of &new to new on lines 344, 347 and 1699 to fix the issue with new versions of php.
I did the above changes and nothing different, so I replaced it back to original again. Should I have done so Keith, Muggins?

William
I will take the & out of there again ... Thank you Muggins!

The & is out again from those three lines leading the word new... Thanks again!

my error.log

Code: Select all

[21-Feb-2013 18:57:15 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in social/audioplayer/flashmp3player.php on line 344
[21-Feb-2013 18:57:15 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in social/audioplayer/flashmp3player.php on line 347
[21-Feb-2013 18:57:15 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in social/audioplayer/flashmp3player.php on line 1699
[21-Feb-2013 19:40:40 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in social/audioplayer/flashmp3player.php on line 344
[21-Feb-2013 19:40:40 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in audioplayer/flashmp3player.php on line 347
[21-Feb-2013 19:40:40 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in social/audioplayer/flashmp3player.php on line 1699

William
Last edited by guardianwill on Thu Feb 21, 2013 8:56 pm, edited 2 times in total.

User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [BETA] Simple Audio Player Mod

Post by muggins » Thu Feb 21, 2013 8:48 pm

If it doesn't do anything either way, that's not the problem, but it is good coding practice to stay up on parser changes. ;)
Muggins

guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 8:50 pm

muggins wrote:If it doesn't do anything either way, that's not the problem, but it is good coding practice to stay up on parser changes. ;)
Yes, tried loading it again and error.log stayed empty this time...

I did go ahead and in overall_header, This particular code had no </a> in it and I placed it there and so when logged in it looks nicer on the menu.

Code: Select all

<!-- SIMPLE AUDIO PLAYER MOD BEGIN -->
				<li class="icon-sap"> <a href="{U_SIMPLE_AUDIO_PLAYER_MOD_LINK}" onclick="window.open('{U_SIMPLE_AUDIO_PLAYER_MOD_LINK}','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=390, left=20, top=10'); return false;">{L_SIMPLE_AUDIO_PLAYER_MOD_LINK} </a> </li>
				<!-- SIMPLE AUDIO PLAYER MOD END -->
William
Last edited by guardianwill on Thu Feb 21, 2013 8:54 pm, edited 1 time in total.

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Simple Audio Player Mod

Post by keith10456 » Thu Feb 21, 2013 8:51 pm

guardianwill wrote:
guardianwill wrote:
muggins wrote:Maybe unrelated, but I get these errors:

PHP Deprecated: Assigning the return value of new by reference is deprecated in /var/www/Test/flashmp3player.php on line 344, etc.

Change the three instances of &new to new on lines 344, 347 and 1699 to fix the issue with new versions of php.
I did the above changes and nothing different, so I replaced it back to original again. Should I have done so Keith, Muggins?

William
I will take the & out of there again ... Thank you Muggins!

The & is out again from those three lines leading the word new... Thanks again!

my error.log

Code: Select all

[21-Feb-2013 18:57:15 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /home/x/public_html/x/audioplayer/flashmp3player.php on line 344
[21-Feb-2013 18:57:15 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /home/x/public_html/x/audioplayer/flashmp3player.php on line 347
[21-Feb-2013 18:57:15 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /home/x/public_html/x/audioplayer/flashmp3player.php on line 1699
[21-Feb-2013 19:40:40 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /home/x/public_html/x/audioplayer/flashmp3player.php on line 344
[21-Feb-2013 19:40:40 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /home/x/public_html/x/audioplayer/flashmp3player.php on line 347
[21-Feb-2013 19:40:40 UTC] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /home/x/public_html/x/audioplayer/flashmp3player.php on line 1699

William
Delete "flashmp3player.php" and "flashmp3player.swf" from the "audioplayer" directory. Those files aren't needed (part of the changes in the next version). Don't remove them from the root though.

Also, edit your last post and remove your server info (like I did in the quote above).
Last edited by keith10456 on Thu Feb 21, 2013 9:01 pm, edited 1 time in total.

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Simple Audio Player Mod

Post by keith10456 » Thu Feb 21, 2013 8:58 pm

I'm still baffled as to why your audio files directory isn't being detected.

As a test (assuming you went back to the original install files and installation).

Open:
root/styles/prosilver/template/audioplayer.html

Find:

Code: Select all

so.addVariable("content_path","audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
Inline Find:

Code: Select all

audioplayer_files
Replace With:
The hard code url to your "audioplayer_files" directory (ex: http://...).

I've been trying different relative paths for you (with root, without root, different backslashes, etc) without success.
Last edited by keith10456 on Thu Feb 21, 2013 9:00 pm, edited 2 times in total.

guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 8:59 pm

keith10456 wrote:
guardianwill wrote:
guardianwill wrote:
muggins wrote:Maybe unrelated, but I get these errors:

PHP Deprecated: Assigning the return value of new by reference is deprecated in /var/www/Test/flashmp3player.php on line 344, etc.

Change the three instances of &new to new on lines 344, 347 and 1699 to fix the issue with new versions of php.
I did the above changes and nothing different, so I replaced it back to original again. Should I have done so Keith, Muggins?

William
I will take the & out of there again ... Thank you Muggins!

The & is out again from those three lines leading the word new... Thanks again!

William
Delete "flashmp3player.php" and "flashmp3player.swf" from the "audioplayer" directory. Those files aren't needed (part of the changes in the next version). Don't remove them from the root though.

Also, edit your last post and remove your server info (like I did in the quote above).
Thank you Keith. I removed them and if you could remove it from your message the code from quote. Thank you for looking out... Appreciated it...

guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 9:08 pm

This is what I have for now:

Code: Select all

so.addParam("quality", "high");
so.addVariable("content_path","http://social.josephstory.org/audioplayer/audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","{BOARD_URL}audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.


User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [BETA] Simple Audio Player Mod

Post by muggins » Thu Feb 21, 2013 9:12 pm

Here's something else. On your player popup the code for the player is this:

Code: Select all

<script language="javascript" type="text/javascript">
var so = new SWFObject("flashmp3player.swf", "player", "320", "247", "9"); // Location of swf file. You can change player width and height here (using pixels or percents).
so.addParam("quality", "high");
so.addVariable("content_path","http://social.josephstory.org/audioplayer/audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","http://social.josephstory.org/audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
Note the "content_path" variable assignment. On mine it's different with respect to the audioplayer files:

Code: Select all

<script language="javascript" type="text/javascript">
var so = new SWFObject("flashmp3player.swf", "player", "320", "247", "9"); // Location of swf file. You can change player width and height here (using pixels or percents).
so.addParam("quality", "high");
so.addVariable("content_path","audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","http://saposjoint.net/Test//audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
What's up with that, Keith?
Muggins

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Simple Audio Player Mod

Post by keith10456 » Thu Feb 21, 2013 9:21 pm

muggins wrote:Here's something else. On your player popup the code for the player is this:

Code: Select all

<script language="javascript" type="text/javascript">
var so = new SWFObject("flashmp3player.swf", "player", "320", "247", "9"); // Location of swf file. You can change player width and height here (using pixels or percents).
so.addParam("quality", "high");
so.addVariable("content_path","http://social.josephstory.org/audioplayer/audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","http://social.josephstory.org/audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
Note the "content_path" variable assignment. On mine it's different with respect to the audioplayer files:

Code: Select all

<script language="javascript" type="text/javascript">
var so = new SWFObject("flashmp3player.swf", "player", "320", "247", "9"); // Location of swf file. You can change player width and height here (using pixels or percents).
so.addParam("quality", "high");
so.addVariable("content_path","audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","http://saposjoint.net/Test//audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
What's up with that, Keith?
Guardian's is like that because that's one of the changes I asked him to make as a test to try to get it working for him. Mine (the default setting) is similar to yours (except I don't have the extra "/" because that's one of the things that is being changed in the new version):

<script language="javascript" type="text/javascript">
var so = new SWFObject("flashmp3player.swf", "player", "320", "247", "9"); // Location of swf file. You can change player width and height here (using pixels or percents).
so.addParam("quality", "high");
so.addVariable("content_path","audioplayer_files"); // Location of a folder with mp3 files (relative to php script).
so.addVariable("color_path","http://urbanareas.net/dev/audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>

User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [BETA] Simple Audio Player Mod

Post by muggins » Thu Feb 21, 2013 9:32 pm

TY
Muggins

guardianwill
Registered User
Posts: 128
Joined: Sat Feb 25, 2006 3:26 am

Re: [BETA] Simple Audio Player Mod

Post by guardianwill » Thu Feb 21, 2013 10:37 pm

any other ideas guys?

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [BETA] Simple Audio Player Mod

Post by keith10456 » Fri Feb 22, 2013 6:49 pm

guardianwill wrote:any other ideas guys?
Give me an hour or so... I'll edit the script to use a different player. God willing that will work.

Locked

Return to “[3.0.x] MODs in Development”