[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!
Anti-Spam Guide
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 »

I updated Frequently Asked Questions post and put a link to the demo of the 2nd audio player in the 1st post of this topic.
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: [RC] Simple Audio Player Mod

Post by Pthelovod »

The player with the file swfobject.js from version 1.0.0 refused to work at all.
I had to return a file swfobject.js from version 0.1.0Pt.
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: [RC] Simple Audio Player Mod

Post by Pthelovod »

Additional player is not working. White window and all.

What to do?
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: [RC] Simple Audio Player Mod

Post by Pthelovod »

audioplayer.html

Code: Select all

<!DOCTYPE html>
<html lang=ru>
<head>
<!-- SIMPLE AUDIO PLAYER MOD BEGIN -->
<script language="javascript" type="text/javascript" src="{BOARD_URL}audioplayer/swfobject.js"></script>
<!-- SIMPLE AUDIO PLAYER MOD END -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
</head>

<div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
<!-- Div that contains player. -->
<table width="100%">
<tr>
<td align="center">
<div id="player">
<h3>{L_SIMPLE_AUDIO_INFO_1}</h3>
<h3>{L_SIMPLE_AUDIO_INFO_2} <br/><a href="http://www.macromedia.com/go/getflashplayer" target="_blank">{L_SIMPLE_AUDIO_INFO_3} </a><br/> {L_SIMPLE_AUDIO_INFO_4}</h3>
</div>
</td>
</tr>
<tr>
<td align="center">
<br/>
<p class="sapcenter">{L_SIMPLE_AUDIO_PLAYER_MOD_LINK}<br/><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_INFO}</a><br/><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO}</a><br/>{L_SIMPLE_AUDIO_PLAYER_MOD_PAGE_TITLE}</p>
</td>
</tr>
</table>
<!-- Script that embeds player. -->
<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","{BOARD_URL}audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
<span class="corners-bottom"><span></span></span></div></div>

</html>
simple_audio_player_lang.php - Russian

Code: Select all

<?php
/**
*
* contact [Russian] Pthelovod
* @package	language
* @version	1.0.0 2013-03-24
* @copyright(c) 2013 TheBX.net
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
**/

/**
* DO NOT CHANGE!
*/
if (!defined('IN_PHPBB'))
{
  exit;
}

if (empty($lang) || !is_array($lang))
{
  $lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste (Unicode characters):
// ’ » “ ” …
//

$lang = array_merge($lang, array(

	// Simple Audio Player Mod
	'SIMPLE_AUDIO_PLAYER_MOD_PAGE_HEADER'       => 'Аудио плеер',
	'SIMPLE_AUDIO_PLAYER_MOD_LINK'              => 'Аудио плеер',
	'SIMPLE_AUDIO_PLAYER_MOD_LINK2'             => 'Аудио плеер2',
	'SIMPLE_AUDIO_PLAYER_MOD_LINK_EXPLAIN'      => 'Слушайте музыку, звуковое сопровождение и т.д.',
	'SIMPLE_AUDIO_PLAYER_MOD_PAGE_TITLE'        => 'Музыкальное сопровождение форума',
	'SIMPLE_AUDIO_PLAYER_MOD_INFO'              => 'Создан на плагине v1.0 By Keith',
	'SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO'          => 'Используется Flash MP3 Player',
	'SIMPLE_AUDIO_PLAYER_MOD_WMP_INFO'          => 'Используется Music Player',
	'SIMPLE_AUDIO_INFO_1'                       => '<b style="color: #FFFFFF;">У вас нет флеш плагина к браузеру! Или он не сработал! Повторите через некоторое время!</b>',
	'SIMPLE_AUDIO_INFO_2'                       => '<b style="color: #FFFFFF;">Пожалуйста, установите дополнительный флеш плагин для вашего браузера.</b>',
	'SIMPLE_AUDIO_INFO_3'                       => '<b style="color: #FF0000;">Нажмите здесь</b>',
	'SIMPLE_AUDIO_INFO_4'                       => '<b style="color: #FFFFFF;">И следуйте инструкции.</b>',
));
?>
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [RC] Simple Audio Player Mod

Post by keith10456 »

Pthelovod wrote:Additional player is not working. White window and all.

What to do?
I just checked your site... It's working for me. The default player is working and the 2nd audio player.

Thanks for the translation. I'll add it to the package.
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] Simple Audio Player Mod

Post by muggins »

Troubleshooting time:

What is common to the sites that can't use the player? If yours can't, please do version checks for your webserver, database and host OS, php, and the kitchen sink.

What is common to those who can? If you can, make a list of your host's software and the old gym shoes under the bed...

I really can't figure out what the problem is with this, and it's gotten to me. :|
Muggins
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [RC] Simple Audio Player Mod

Post by keith10456 »

I just realized that I forgot to update the demo site. When testing the 2nd audio player, I tested on the demo site but never reverted back to the default player. In any event, all is well now.
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] Simple Audio Player Mod

Post by muggins »

OK. Please package another with a different version number? Maybe the multiple revisions are creating problems?

I have had trouble with only 2.5 of the versions do far... :mrgreen:
Muggins
User avatar
Hippie459MN
Registered User
Posts: 964
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: [RC] Simple Audio Player Mod

Post by Hippie459MN »

The demo site is working great here now with the original player. :D
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [RC] Simple Audio Player Mod

Post by keith10456 »

I updated the mod package to include a corrected js file (thanks Pthelovod). I also added three language variables to the lang file to correct some hard-coded language.

@ Pthelovod - Please look at the new language file and post your updated language file so I can include it.

@ Current Users - To update your site to include the changes:

A) Backup the files of your site
B) Re-upload the files in the download (replacing the existing files)
C) Open: root/includes/functions.php

Find:

Code: Select all

		// SIMPLE AUDIO PLAYER MOD BEGIN
		$user->add_lang('mods/simple_audio_player_lang'),
		'U_SIMPLE_AUDIO_PLAYER_MOD_LINK'            => append_sid("{$phpbb_root_path}audioplayer.$phpEx"),
		'U_SIMPLE_AUDIO_PLAYER_MOD_LINK2'            => append_sid("{$phpbb_root_path}audioplayer2.$phpEx"),
		'U_SIMPLE_AUDIO_PLAYER_MOD_INFO'            => 'http://www.thebx.net/info/_business_phpbb.php',
		'U_SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO'            => 'http://www.flashmp3player.org/',
		'U_SIMPLE_AUDIO_PLAYER_MOD_WMP_INFO'            => 'http://www.websitemusicplayer.com/',
		// SIMPLE AUDIO PLAYER MOD END
Replace With:

Code: Select all

		// SIMPLE AUDIO PLAYER MOD BEGIN
		$user->add_lang('mods/simple_audio_player_lang'),
		'U_SIMPLE_AUDIO_PLAYER_MOD_LINK'            => append_sid("{$phpbb_root_path}audioplayer.$phpEx"),
		'U_SIMPLE_AUDIO_PLAYER_MOD_LINK2'            => append_sid("{$phpbb_root_path}audioplayer2.$phpEx"),
		'U_SIMPLE_AUDIO_PLAYER_MOD_FLASH_INFO'            => 'http://www.macromedia.com/go/getflashplayer',
		'U_SIMPLE_AUDIO_PLAYER_MOD_INFO'            => 'http://thebx.net/info/_free_software_phpbb.php',
		'U_SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO'            => 'http://www.flashmp3player.org/',
		'U_SIMPLE_AUDIO_PLAYER_MOD_WMP_INFO'            => 'http://www.websitemusicplayer.com/',
		// SIMPLE AUDIO PLAYER MOD END
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [RC] Simple Audio Player Mod

Post by keith10456 »

muggins wrote:OK. Please package another with a different version number? Maybe the multiple revisions are creating problems?

I have had trouble with only 2.5 of the versions do far... :mrgreen:
I saw your post late (after I already made the changes and my last post) :(
User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] Simple Audio Player Mod

Post by muggins »

Thanks, all is good. 8-)
Muggins
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: [RC] Simple Audio Player Mod

Post by Pthelovod »

keith10456 wrote:@ Pthelovod - Please look at the new language file and post your updated language file so I can include it.
Yes. I'm sure it will! Thank you!
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: [RC] Simple Audio Player Mod

Post by Pthelovod »

Both players are working perfectly!

Hello! I posted two links to both the player's cap forum to file overall_header.html ! In the folder of the player added different music. Made tooltips on different music to both players.
overall_header.html
Search for:

Code: Select all

<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
Add before:

Code: Select all

<!-- SIMPLE AUDIO PLAYER MOD BEGIN --><!-- IF S_USER_LOGGED_IN --><li class="icon-sap"><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_LINK2}" onclick="window.open('{U_SIMPLE_AUDIO_PLAYER_MOD_LINK2}','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=350, height=400, left=20, top=10'); return false;" title="{L_SIMPLE_AUDIO_PLAYER2_TITLE}">{L_SIMPLE_AUDIO_PLAYER_MOD_LINK2}</a></li><!-- ENDIF --><!-- SIMPLE AUDIO PLAYER MOD END -->
			<!-- SIMPLE AUDIO PLAYER MOD BEGIN --><!-- IF S_USER_LOGGED_IN --><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=350, height=380, left=20, top=10'); return false;" title="{L_SIMPLE_AUDIO_PLAYER_TITLE}">{L_SIMPLE_AUDIO_PLAYER_MOD_LINK}</li><!-- ENDIF --><!-- SIMPLE AUDIO PLAYER MOD END -->
(links are not visible to visitors)

Slightly changed the file audioplayer.html :

Code: Select all

<!DOCTYPE html>
<html lang=en>
<head>
<!-- SIMPLE AUDIO PLAYER MOD BEGIN -->
<script language="javascript" type="text/javascript" src="{BOARD_URL}audioplayer/swfobject.js"></script>
<!-- SIMPLE AUDIO PLAYER MOD END -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
</head>

<div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
<br/>	
<!-- Div that contains player. -->
<table width="100%">
<tr>
<td align="center">
<div id="player">
<h3>{L_SIMPLE_AUDIO_PLAYER_MOD_NO_FLASH}</h3>
<h3>{L_SIMPLE_AUDIO_PLAYER_MOD_NO_FLASH_DSCR}<br/><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_FLASH_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_NO_FLASH_INFO}</h3>
</div>
</td>
</tr>
<tr>
<td align="center">
<br/>
<p class="sapcenter">{L_SIMPLE_AUDIO_PLAYER_MOD_LINK}<br/>{L_SIMPLE_AUDIO_PLAYER_MOD_PAGE_TITLE}<br/><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_INFO}</a><br/><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO}</a></p>
</td>
</tr>
</table>
<!-- Script that embeds player. -->
<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","{BOARD_URL}audioplayer/default.xml"); // Location of xml file with color settings.
so.addVariable("script_path","flashmp3player.php"); // Location of php script.
so.write("player");
</script>
<span class="corners-bottom"><span></span></span></div></div>

</html>
Slightly changed the file audioplayer2.html :

Code: Select all

<!DOCTYPE html>
<html lang=en>
<head>
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
</head>

<div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
<table width="100%">
<tr>
<td align="center">
<script language='JavaScript' src='{ROOT_PATH}audioplayer2/musicplayer.js' type='text/javascript'></script>
<p class="sapcenter">{L_SIMPLE_AUDIO_PLAYER_MOD_LINK2}<br/>{L_SIMPLE_AUDIO_PLAYER_MOD_PAGE_TITLE}<br /><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_INFO}</a><br/><a href="{U_SIMPLE_AUDIO_PLAYER_MOD_WMP_INFO}">{L_SIMPLE_AUDIO_PLAYER_MOD_WMP_INFO}</a></p>
</td>
</tr>

</table>
<span class="corners-bottom"><span></span></span></div></div>

</html>
Added two linguistic variables for tooltips

Code: Select all

	'SIMPLE_AUDIO_PLAYER2_TITLE'                => '??????????????????????????????.',
	'SIMPLE_AUDIO_PLAYER_TITLE'                 => '???????????????????????????.',
In the new variables, you can enter your own text for the tooltips. For example - about the type of music each player.

Russian translation file simple_audio_player_lang.php :

Code: Select all

<?php
/**
*
* contact [Russin] Pthelovod
* @package	language
* @version	1.0.0 2013-03-24
* @copyright(c) 2013 TheBX.net
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
**/

/**
* DO NOT CHANGE!
*/
if (!defined('IN_PHPBB'))
{
  exit;
}

if (empty($lang) || !is_array($lang))
{
  $lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste (Unicode characters):
// ’ » “ ” …
//

$lang = array_merge($lang, array(

	// Simple Audio Player Mod
	'SIMPLE_AUDIO_PLAYER_MOD_PAGE_HEADER'       => 'Аудио MP3 плеер',
	'SIMPLE_AUDIO_PLAYER_MOD_LINK'              => 'Flash MP3 Player',
	'SIMPLE_AUDIO_PLAYER_MOD_LINK2'             => 'Website MP3 Player',
	'SIMPLE_AUDIO_PLAYER_MOD_LINK_EXPLAIN'      => 'Слушайте музыку, звуковое сопровождение и т.д.',
	'SIMPLE_AUDIO_PLAYER_MOD_PAGE_TITLE'        => 'Музыкальное сопровождение форума',
	'SIMPLE_AUDIO_PLAYER_MOD_INFO'              => 'К автору мода плеера By Keith',
	'SIMPLE_AUDIO_PLAYER_MOD_FMP_INFO'          => 'Создан на базе Flash Music Player',
	'SIMPLE_AUDIO_PLAYER_MOD_WMP_INFO'          => 'Используется Website Music Player',
	'SIMPLE_AUDIO_PLAYER_MOD_NO_FLASH'          => 'Упсс.. Не работает Flash MP3 плеер!',
	'SIMPLE_AUDIO_PLAYER_MOD_NO_FLASH_DSCR'     => 'Не установлен необходимый для работы этого плеера Flash-плагин для вашего Браузера.',
	'SIMPLE_AUDIO_PLAYER_MOD_NO_FLASH_INFO'     => 'Нажмите здесь для установки необходимого плагина.',
	'SIMPLE_AUDIO_PLAYER2_TITLE'                => 'Просмотр форума под музыкальное сопровождение песен Российской эстрады.',
	'SIMPLE_AUDIO_PLAYER_TITLE'                 => 'Просмотр форума под музыкальное сопровождение инструментальной музыки.',
));
?>
Good luck! phpbb - it's easy! (с)
Sorry for bad English...
test account:
Nick -

Code: Select all

Test_№_01
Password:

Code: Select all

Test_№_011
User avatar
PolRas
I've Been Banned!
Posts: 415
Joined: Sat Sep 07, 2013 2:29 am

Re: [RC] Simple Audio Player Mod

Post by PolRas »

[quote="keith10456"][quote="muggins"]OK. Please package another with a different version number? Maybe the multiple revisions are creating problems?

I have installed the player in my site but it is not working.....it says i don't have a flash player and yet i have one since i can watch YouTube and local TV stations through the net.My site is found here http://test.theharddisk.org/index.php?s ... 23d9babb2d

Please help
[size=100]RASTAFARIAN LOVE, Lovers For All Justice, JUSTICE MUST BE DONE ![/size]
Locked

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