SimplePortal

Customization => Blocks and Modifications => Topic started by: Chen Zhen on July 09, 2010, 08:36:05 PM

Title: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on July 09, 2010, 08:36:05 PM
SMF 2.0x - Premiumbeat Mp3 Player
Mp3 Platform for SMF forums c/o Underdog
      
This will install a flash mp3 player onto your SMF forum & will work with a php block/module and/or individually
from a permission based forum link producing a popup.
For an invisible player - set height and width to 0 in settings (or your block/module code)
as well as disabling the title and body of your block/module.
Options include local or outside sourced url inputs, auto-loading folders, upload/download and various membergroup permissions.
      
Mp3's using Playlist #99 will play for every playlist and all other mp3 playlists are block/popup specific.

Recently tested on SMF 2.0.4 with no issues.
The Premiumbeat v2.0 stable version is only available for the SMF2.0x branch.
Support for SMF 1.1x has now been dropped although the beta version will be left available for it.
Thank you for opting to use this software package & enjoy.


Basic guidelines to get you started:



Changelog:

Version 2.0.1
! Fixed popup width/height (block and/or playlist settings)
! Fixed background issue for wide/tall popup player (beyond 250px)
+ Included multiple playlist popup code
+ X & Y coordinates for popup positioning (general setting applies to all playlists)
+ New block codes to be used with the latest version (available below)
+ Hide URL path within popup (shows ../premiumbeat)

Version 2.0
! Corrected spelling of anonymous
! Fixed acute accent for anonymous/name
! Installation edited for SMF 2.0x (+ subsequent updates)
! All check boxes now reflect their current setting on page load
! Character case for MP3 file type
! Folder name filter edited to allow spaces
! Increased max length for mp3 description
! Uninstall fixed for both SMF versions
! Popup player position corrected
! Hidden overflow for popup in all browsers
! Confirmation for any delete options
! Added cannot_ ... language variables
! isAllowedTo permission checks in templates only (allowedTo in source files where applicable)
! Fixed playlist color code option
! Premiumbeat tables adjusted to common collation & table type using existing database settings
! Fixed uploader & date in upload/download template
! Fixed toggle of anonymous/user
! Fixed users only able to delete own files (Admin can delete all)
! Fixed page refreshing to update file list after adding/deleting files
! Opting playlist for override also auto adjusts file (if entered in playlist edit template)
! No longer uploads duplicate mp3 file name regardless of encrypted prefix (needs PHP 5.3+)
! Added warnings to add playlists where none exist
+ Changed bbc image to 20x20 plain graphic
+ Options are locked when no playlists are available
+ Option to manipulate local mp3 file names (player does not allow some characters)
+ Play/test button for playlists and mp3 entries
+ Download mp3 files option (as compressed zip archive)
+ Upload mp3 files function & template
+ Common playlist now set to Playlist#99 (previously Playlist#1)
+ BBC execute playlist (if permission to use playlist or if playlist is available for upload)
+ Permissions to enable the upload function
+ Option to allow playlist upload/download access
+ Auto-Load folder per playlist (changed from single input setting)
+ Edited display of all Premiumbeat admin templates
+ Pages (javascript) for the templates
+ Playlist titles
+ All playlist settings in configuration now under premiumbeat_settings permission
+ Added playlist type option
+ Mp3 list now ordered by Playlist#
+ Mp3 list enable & delete only permitted by user who entered it and/or premiumbeat settings permission
+ Drop-down (playlist names) in mp3 creation/editing for existing playlists and Premiumbeat Settings
+ Playlists can now be manually added
+ Encrypted mp3 filenames for added security
+ Added premiumbeat button to access premiumbeat settings/mp3 db directly
+ License information available from the mp3 db menu
+ Added disclaimer notices 
+ Documentation/intructions now falls under the NU Free Documentation License
+ Premiumbeat for SMF now falls under the Creative Commons - Attribution No Derivatives License (by-nd) 3.0

Version 1.9
+ Filters for all user inputs and mysql queries
+ Unique permission settings for forum link
+ Permissions to view/use popup link and/or bbcode
+ Permissions to moderate configuration and/or settings
+ Auto-load folder playlist setting
+ Added bbcode to play mp3 url(s)
+ Added button/link in forum for a popup
+ Added forum settings source code + template

Version 1.8
+ Edited for SMF 1.1.13 installation
+ HTML block codes for popup player
+ PHP Portal block code has been edited for this version
+ Specific settings for each playlist
   (old versions used settings table - this installation will transfer all values)
+ Uses own mysql db tables/columns
+ Major rewrite of code

Version 1.71
+ Updated install file for SMF 1.1.12

Version 1.7
! Patched mp3 list deletion issue
! Removed url filter

Version 1.6
! Access to the my_music folder via url is denied.
! Access to the playlst file via url is denied.

Version 1.5
! Edited for proper admin settings template

Version 1.4
+ Debut public release
+ Added SMF 1.0 support
+ Added multiple playlsts - seperate blocks can play specific mp3's.
+ Added more adjustments for display in the settings menu (can be overidden in any block)
+ Playlist filtered through settings table
+ Reads mp3 and descriptions from database entries in admin-settings menu
+ Added ascending and shuffle
+ Changed xml file to php file



Recommended requirements:

Server: PHP 5.3+, HTML5+, MYSQL 5.0+, json support enabled (v1.2+)
Browsers: IE 7+, Firefox 3.6+, Safari 5+, Chrome 5+, Opera 10.5+
Browser Add-ons: javascript 1.8+, Adobe Flash Player 10+

Recommended Portal for SMF:
SimplePortal (http://www.simpleportal.net)




PHP Portal Block Code:
Adjust $playlist_id = 0 to your opted playlist number
Code: [Select]
/* Set Playlist ID Number  - default is 1  */
/* MP3's using playlist number 99 will play on all blocks... Other mp3 playlist settings are block specific  */
$playlist_id = 1;

global $scripturl, $smcFunc, $boardurl;

/* Adjustable parameters  */
$width = 800;
$height = 215;
$skin = '0000FF';
$skinType = 5;
$autoplay = 'yes';   /*  yes = autoplay,    no = manual play  */

$columns_settings = array('height', 'width', 'autoplay', 'skin');
$a = check_block_playlist($playlist_id);
if ($a == true)
{
$result = $smcFunc['db_query']('', "SELECT myplaylist, height, width, autoplay, type, skin, skin_type FROM {db_prefix}premiumbeat_settings WHERE (myplaylist = {$playlist_id}) LIMIT 1");
while ($val = $smcFunc['db_fetch_assoc']($result))
{
if ((empty($val['myplaylist'])) || (int)$val['myplaylist'] < 1)
continue;

foreach ($columns_settings as $sets)
{
if (empty($val[$sets]))
$val[$sets] = 0;
}
$autoplay = 'no';
if($val['autoplay'] == 1)
$autoplay = 'yes';

if (!$width)
$width = $val['width'];
if (!$height)
$height = $val['height'];
if (!$skin)
$skin = $val['skin'];
if (!$skinType)
$skinType = $val['skin_type'];                        
}
$smcFunc['db_free_result']($result);

}

$_SESSION['premiumbeat_bbc'] = false;
$_SESSION['customMusic_checker'] = true;
$_SESSION['premiumbeat_new'] = true;
if($playlist_id < 0) {$playlist_id = 999;}
$_SESSION['playlist_id'] = $playlist_id;

echo'<div id="premiumbeat_player" style="position:relative;margin:auto;text-align:center;"><script type="text/javascript" src="my_music/swfobject.js"></script>
     
<div id="flashPlayer">
Mp3 Player Malfunction
</div>
<script type="text/javascript">
var so = new SWFObject("my_music/playerMultipleList.swf", "premiumbeat-player", "'.$width.'", "'.$height.'", "9.0.0");
so.addVariable("autoPlay","'.$autoplay.'")
so.addVariable("overColor","'.$skin.'")         
so.addVariable("playerSkin", "'.$skinType.'")       
so.addVariable("playlistPath","',$scripturl,'?action=customMusic", "SESSION")       
        so.addParam("bgcolor", "ffffff");       
        so.useExpressInstall("expressinstall.swf");
        so.addVariable("getURL","")
so.write("flashPlayer");
</script></div>';


function check_block_playlist($play)
{
global $smcFunc;
$result2 = $smcFunc['db_query']('', "SELECT myplaylist FROM {db_prefix}premiumbeat_settings WHERE myplaylist = {$play} LIMIT 1");
$result3 = $smcFunc['db_num_rows']($result2);
$smcFunc['db_free_result']($result2);
if ($result3 > 0)
return true;

return false;
}
echo '<script type="text/javascript">
// when the document has loaded, start the premiumbeat player
window.onload = function () {
    (function () {
        var a = document.getElementById("premiumbeat_player");
        if (a) {
            // Player has loaded!
        }
        else {
            setTimeout(arguments.callee, 50);
        }
    }());
};
</script>';



PHP Block - Popup Player Code:
(Adjust playlist = 0; to your opted playlist number)
Code: [Select]
/* Adjustable variables: Set playlist ID + match width & height to the proper playlist settings */
/* Setting the playlist ID# to 0 or 999 will allow this block to use playlist permissions */

$playlist ='0';
$width = '220';
$height = '230';

/* Set $position to false to have the button appear in the block and set block body style accordingly  */
/* For $position = false put the following in your body style...  text-align:center;vertical-align:middle;overflow:hidden;  */
$position = 'fixed';

if ($position == 'fixed')
$style = "position:fixed;top:0px;right:0px;";
else
$style="text-align:center";


$url = 'index.php?action=customMusicPopup;playlist='.$playlist.';';
$icon = '<img src ="http://i272.photobucket.com/albums/jj187/ginger_face/mymusic.gif" style="'.$style.'" />';


/*  Do not edit below this line  */

echo ' <script type="text/javascript">
<!--
var WindowObjectReference = null;
function PremiumbeatPopup(strURL,strWidth,strHeight)
{

var strOptions="";
var strType = "console";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
WindowObjectReference = window.open(strURL, "newWin", strOptions);
WindowObjectReference.focus();
}
//-->
</script>';

$pop = '<a href="javascript:void(0)" onclick="PremiumbeatPopup(\''.$url.'\',\''.$width.'\',\''.$height.'\')">'.$icon.'</a>';

$_SESSION['premiumbeat_bbc'] = false;
$_SESSION['customMusic_checker'] = true;
$_SESSION['premiumbeat_new'] = true;
echo $pop;




PHP Block - Multiple Playlist Popup Player

Code: [Select]
/* Premiumbeat PHP ~ popup block with multiple playlist dropdown option */

/* Edit your image location or make it false not to display it */
$image = false;
// $image = 'http://i272.photobucket.com/albums/jj187/ginger_face/mymusic.gif';
$width = '450';
$height = '230';
$autoplay = 'yes';
$title = 'Select Playlist';

/*
 *  Set $position to false to have the button appear in the block and set block body style accordingly 
 *  For $position = false put the following in your body style...  text-align:center;vertical-align:middle;overflow:hidden;
 */
 
$position = 'fixed';

/*
 * Do not edit below this comment
*/

global $smcFunc, $scripturl, $settings;

$datum = array('myplaylist','title','equip');
$num = 0;
$drop = '';
$_SESSION['premiumbeat_bbc'] = false;
$_SESSION['customMusic_checker'] = true;
$_SESSION['premiumbeat_width'] = $width;
$_SESSION['premiumbeat_height'] = $height;
$_SESSION['premiumbeat_autoplay'] = $autoplay;
$_SESSION['premiumbeat_new'] = true;

if ($position == 'fixed')
$style = "position:fixed;top:0px;right:2px;";
else
$style="text-align:center;";

$result = $smcFunc['db_query']('', "SELECT myplaylist, title, equip
                                    FROM {db_prefix}premiumbeat_settings
                                    WHERE equip > 0");
while ($val = $smcFunc['db_fetch_assoc']($result))
{
foreach ($datum as $data)
$playlists[$num][$data] = $val[$data];

$num++;
}
$smcFunc['db_free_result']($result);

if (empty($playlists))
return false;

foreach ($playlists as $playlist)
$drop .= '<option value="' . $playlist['myplaylist'] . '">' . $playlist['title'] . '</option>';

$playlist = $playlists[0]['myplaylist'];
$Xurl = 'index.php?action=customMusicPopup;playlist=989;playsong=playlist=';
$url = $Xurl . $playlist.';';

if (!$image)
$icon = false;
elseif ($position == 'fixed')
$icon = '<img src ="'.$image.'" alt="" style="position:relative;height:30px;width:59px;float:right;right:2px;" />';
else
$icon = '<span style="display: block;margin-left: auto;margin-right: auto;"><img src ="'.$image.'" alt="" style="position:relative;height:30px;width:59px;" /></span>';
   
echo '
<script type="text/javascript"><!--
var WindowObjectReference = null;
function PremiumbeatPopup(strURL,strWidth,strHeight)
{
var strOptions="";
var strType = "console";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
WindowObjectReference = window.open(strURL, "newWin", strOptions);
WindowObjectReference.focus();
}
//--></script>';

if ($icon)
$pop = '<a href="javascript:void(0)" onclick="PremiumbeatPopup(\''.$url.'\',\''.$width.'\',\''.$height.'\')">'.$icon.'</a>';
else
$pop = false;

echo '
<ul id="someID" style="list-style-type:none;'.$style.'">
<li>'
, $pop, '<br />
</li>
<li>
<select id="C4" dir="rtl" onchange="PremiumbeatPopup(\''.$Xurl.'\' + this.options[this.selectedIndex].value,\''.$width.'\',\''.$height.'\')">
<option disabled=true value="0" title="tooltip" selected=true>
',$title,'
</option>
',$drop,'
</select>
</li>
</ul>';



This version has been modified to work with SMF 2.0x Forums.

This SMF package falls under the Creative Commons - Attribution No Derivatives License (by-nd) 3.0 (http://creativecommons.org/licenses/by-nd/3.0/).
All author contributions noted below fall under their own respected licenses. The above noted license allows such conditions, please click on its link for specifics.

Development Credits:

Premiumbeat for SMF-Underdog (http://askusaquestion.net) Creative Commons License - Attribution No Derivatives (http://creativecommons.org/licenses/by-nd/3.0/)
Premiumbeat Flash Music Player-Gilles & Francois Arbour (http://premiumbeat.com) Permission was granted directly from the authors (http://premiumbeat.com)
jQuery AXuploader-Alban Xhaferllari (http://www.albanx.com) Dual licensed under the MIT or GPL Version 2 licenses (http://jquery.org/license)
SMF Documentation-Skhilled (http://www.docskillz.com/docs/) GNU Free Documentation License (http://www.gnu.org/copyleft/fdl.html)

Disclaimers:

  This modification is intended to be used for legal purposes only! The *Premiumbeat for SMF* application package is intended for use with mp3 files under licenses that allow non-profit distribution of copyrighted or non-copyrighted works (ie. Creative Commons license) and their respected terms/conditions (ie. Attribution No Derivatives).  The author's involved in this project are in no way responsible for the end-user's possible abuse of copyright laws & do not condone such practices.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Please read all other license agreements contained within this package.



Link for the package:
Premiumbeat-for-smf-v2.0.1x (http://custom.simplemachines.org/mods/index.php?action=download;mod=2633;id=220068)
Title: Re: SMF PremiumBeat Mp3 Player
Post by: 130860 on July 10, 2010, 08:51:50 PM
nice, can you give us a example code on a php block using this mod ;)
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on July 10, 2010, 10:59:51 PM

The original post was edited to include the block code instead of the link.

An example of the player is located here: CLICK HERE (http://askusaquestion.net/index.php?board=53.0)

It's at the bottom of the page, just for an example... The player looks better in a side block imao (or invisible if preferred!).

UD
Title: Re: SMF PremiumBeat Mp3 Player - language edits
Post by: Chen Zhen on July 10, 2010, 11:07:42 PM
--> For SMF 2.0 RC5+ this modification uses its own language file which can be copied, translated and renamed to your forum's opted language. <--
--> Themes / default / languages / Premiumbeat.english.php <--   

For other SMF versions by default, this mod installs its language variables into 3 language files as follows:

The english modifications file located at: Themes / default / languages / Modifications.english.php
This edit will have to be inserted into the equivalent file for other languages and/or Themes that require their own php file...

Code: [Select]
/* Premiumbeat - for SMF */
$txt['customMusic_tabtitle'] = 'Premiumbeat';
$txt['customMusic_tabtitle2'] = 'Premiumbeat MP3 List';
$txt['customMusic_tabtitle3'] = 'Premiumbeat Playlist Settings Menu';
$txt['customMusic_tabtitle4'] = 'Premiumbeat Edit Playlist';
$txt['customMusic_tabtitle5'] = 'Premiumbeat Add/Edit';
$txt['customMusic_tabtitle6'] = 'Configuration';
$txt['customMusic_tabtitle7'] = 'Settings';
$txt['premiumbeat_forum'] = 'Premiumbeat Settings';
$txt['premiumbeat_override'] = 'Override Playlist ID&#35;';
$txt['premiumbeat_file'] = 'Auto Loading Folder';
$txt['premiumbeat_auto'] = 'Auto Playlist ID&#35;';
$txt['premiumbeat_link'] = 'Playlist Permissions';
$txt['premiumbeat_mainlink'] = 'Playlist Link';
$txt['customMusic_tag'] = 'Track number of mp3';
$txt['customMusic_description'] = 'Title of mp3';
$txt['customMusic_enable'] = 'Enable mp3';
$txt['customMusic_text'] = 'Details';
$txt['customMusic_url'] = 'mp3 URL';
$txt['CustomMusic_count'] = 'MP3 ID Number';
$txt['customMusic_type'] = 'Enable Shuffling of mp3 Playlist';
$txt['customMusic_width'] = 'Set overall mp3 Player Width';
$txt['customMusic_height'] = 'Set overall mp3 Player Height';
$txt['customMusic_autoplay'] = 'Enable Autoplay of mp3 Playlist';
$txt['customMusic_skin'] = 'Set skin color code &#35;';
$txt['customMusic_playlist'] = 'Playlist&#35;';
$txt['customMusic_view_playlist'] = 'View Playlist&#35;';
$txt['customMusic_playlist_alt'] = '&#35;';
$txt['customMusic_trackid'] = 'Track&#35;';
$txt['customMusic_mp3id'] = 'Mp3 ID&#35;';
$txt['premiumbeat_enabled'] = 'Enabled';
$txt['premiumbeat_disabled'] = 'Disabled';
$txt['customMusic_enable'] = 'Enable/Disable';
$txt['customMusic_delete'] = 'Delete';
$txt['customMusic_trackname'] = 'Track Name';
$txt['customMusic_submit'] = 'Submit';
$txt['customMusic_help'] = 'Help';
$txt['premiumbeat_settings'] = 'Playlist Settings';
$txt['premiumbeat_edit'] = 'Edit Mp3';
$txt['premiumbeat_browse'] = 'Mp3 Music List';
$txt['customMusic_status'] = 'Status';
$txt['premiumbeat_type'] = 'Playlist Order';
$txt['premiumbeat_asc'] = 'Ascend';
$txt['premiumbeat_shuffle'] = 'Shuffle';
$txt['premiumbeat_return'] = 'MP3 List';
$txt['premiumbeat_height'] = 'Playlist Height';
$txt['premiumbeat_width'] = 'Playlist Width';
$txt['premiumbeat_autoplay'] = 'Playlist Autoplay';
$txt['premiumbeat_edit_list'] = 'Edit Settings For Playlist&#35;';
$txt['premiumbeat_playlist'] = 'Specific Playlist';
$txt['premiumbeat_toggle_autoplay'] = 'Autoplay';
$txt['premiumbeat_toggle_type'] = 'Order';
$txt['premiumbeat_edit_add'] = 'Add New Mp3';
$txt['premiumbeat_playlist_query'] = 'Query Specific Playlist';
$txt['premiumbeat_playlist_edit'] = 'Browse Specific Playlist&#35;';
$txt['premiumbeat_playlist_perm1'] = 'Assigned to membergroup&#58; ';
$txt['premiumbeat_playlist_perm2'] = 'Assign this playlist to membergroups shown below:';
$txt['premiumbeat_help_perm'] = 'Playlist permissions allow specific membergroups access from the forum link.<br />Unassigned membergroups will use the override playlist available from the link.<br />Each membergroup can only be assigned to one playlist.<br />If a user belongs to more than one membergroup, the highest star rated group will apply.<br />For portal php blocks/modules use your portal permissions.<br />';
$txt['premiumbeat_na'] = 'Unassigned';
$txt['premiumbeat_open_perm'] = 'Permission Settings';
$txt['premiumbeat_player'] = 'Mp3 Player';
$txt['premiumbeat_checkall'] = 'Select All';
$txt['premiumbeat_delete_all'] = 'Delete All';
$txt['premiumbeat_bbc_mp3'] = 'Play MP3';




The error language edits for this modification go into the Errors.english.php language file of the default theme.
Located at: Themes / default / languages / Errors.english.php

This edit will have to be inserted into the equivalent file for other languages and/or Themes that require their own php file...
Code: [Select]
/* Premium Beat - Custom mp3 Player for SMF error message */
$txt['customMusic_check'] = 'You are not permitted to view the mp3 playlist.';
$txt['customMusic_error'] = 'Premiumbeat database error.';
$txt['customMusic_error2'] = 'Playlist not found/specified.';



The permissions language edit for this modification goes into the ManagePermissions.english.php language file of the default theme.
Located at: Themes / default / languages / ManagePermissions.english.php

This edit will have to be inserted into the equivalent file for other languages and/or Themes that require their own php file...

Code: [Select]
/* Premiumbeat permission language variables */
$txt['permissiongroup_simple_premiumbeat_perms'] = 'Premiumbeat';
$txt['permissiongroup_premiumbeat_perms'] = 'Premiumbeat';
$txt['permissionname_premiumbeat_config'] = 'Access Premiumbeat Configuration';
$txt['permissionname_premiumbeat_settings'] = 'Access Premiumbeat Forum Settings';
$txt['permissionname_premiumbeat_showlink'] = 'Enable/View Premiumbeat Forum Link';
$txt['permissionname_premiumbeat_showbbc'] = 'Enable/View Premiumbeat BB Code Link';
$txt['permissionhelp_premiumbeat_config'] = 'This will allow the opted usergroup to moderate Premiumbeat Configuration';
$txt['permissionhelp_premiumbeat_settings'] = 'This will allow the opted usergroup to moderate Premiumbeat Forum Settings';
$txt['permissionhelp_premiumbeat_showlink'] = 'This will allow the opted usergroup to view the premiumbeat play link';
$txt['permissionhelp_premiumbeat_showbbc'] = 'This will allow the opted usergroup to view the BB Code play link';
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Nathaniel on July 20, 2010, 03:02:27 AM
Moved to the Blocks and Modifications board.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on August 15, 2010, 11:01:30 PM

Updated to version 1.6
Please view the changelog in the first post for a list of the edits.

Note:
Anyone updating this modification needs to copy the newer php block code.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: megatornado on August 26, 2010, 10:00:23 PM
Awesome Work, Underdog. Congratulations and Thanks for sharing.

I was already using the Premium Beat Player, but with the manual playlist edition method (in the same manner as use it on a webpage). I think that the Admin Panel page that you wrote is waaaay better than manual edition of playlist.xml   :D
Title: Re: SMF PremiumBeat Mp3 Player
Post by: thellie on September 01, 2010, 09:46:37 AM
hi,
i'm having a problem with the location of the file - i've pasted in the url (i'm testing it locally), but it's not picking it up. i'v copied the file into the folder already as well.

it installed ok, and i've pasted the code into a simpleportal 'custom php block'. i'm running smf 2.0 rc3 and sp2.3.2

my path is correct i think: C:\AppServ\www\mirrorfoundation\my_music\music\spank_me_baby.mp3

i can't test it on my live site as it's down at the moment.

any ideas? thanks :)
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on September 02, 2010, 09:22:00 PM
Awesome Work, Underdog. Congratulations and Thanks for sharing.

I was already using the Premium Beat Player, but with the manual playlist edition method (in the same manner as use it on a webpage). I think that the Admin Panel page that you wrote is waaaay better than manual edition of playlist.xml   :D

Thanks for the positive feedback.   I found the xml file editing to be rather tedious and decided to make something that allowed adding additional mp3's a cinch.. plus I threw in a few extra options to make it more functional (shuffle and playlists).



hi,
i'm having a problem with the location of the file - i've pasted in the url (i'm testing it locally), but it's not picking it up. i'v copied the file into the folder already as well.

it installed ok, and i've pasted the code into a simpleportal 'custom php block'. i'm running smf 2.0 rc3 and sp2.3.2

my path is correct i think: C:\AppServ\www\mirrorfoundation\my_music\music\spank_me_baby.mp3

i can't test it on my live site as it's down at the moment.

any ideas? thanks :)


You can use whole url's no matter what but for using your own site as the source you have the option of just including the file/folder tree.
ie.
my_music/music/spank_me_baby.mp3

here is a sample outside sourced mp3 you can use just to test and make sure you got the rest set up properly:
http://www.tradebit.com/usr/music/previews/vol-00/r/f/rfhhbeats10/rfhhbeats10-151.mp3
(this is free sample music btw)

Make sure your playlist number in the mp3's you add match the one you set at the top of the block.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Deezel on September 03, 2010, 09:36:56 AM
Nice mod. 8)
Anyway to make it so that when a member switches between tabs the music is not interrupted?
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on September 03, 2010, 04:34:41 PM
Underdog, may I ask you to add russian translations into your package and change package-info.xml?
Code: (install section) [Select]
<modification>russian-utf8.xml</modification>
<modification>russian.xml</modification>
Code: (uninstall section) [Select]
<modification reverse="true">russian-utf8.xml</modification>
<modification reverse="true">russian.xml</modification>

People will have to make their own language edits ...  ;D
That is why the language edits are shown during install and in this thread.. so that people using other languages for their forum can copy and paste the text variables into the appropriate language file (The mod does use proper language strings, that is to say that they are not hard coded text).


Nice mod. 8)
Anyway to make it so that when a member switches between tabs the music is not interrupted?

I only wrote the php that interacts and saves db info onto your site.. The music player's author did not include a type of 'marker' to keep record of where the player left off between page changes/refreshes.
Unless I perhaps have the player display as a popup which would stay independent from a users navigation (less closing the popup).
I've noted this request and will experiment with this option.





Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on September 04, 2010, 05:04:38 PM
my path is correct i think: C:\AppServ\www\mirrorfoundation\my_music\music\spank_me_baby.mp3

I did not notice before, but you are using backslashes when you should be using just regular slashes and the url being used for your local setup is incorrect.




ie.
AppServ\www\mirrorfoundation\my_music\music\music.mp3

should be something like....

http://localhost/mirrorfoundation/my_music/music/music.mp3




something like that... I am not exactly sure what the url prefix is with the local server setup you are using... just use your local site and look at the url to acquire that info.

But this should also work:
mirrorfoundation/my_music/music/music.mp3


 
Title: Re: SMF PremiumBeat Mp3 Player
Post by: diendannhatban.info on November 19, 2010, 02:19:19 PM
Thank for the mod. I have finished add it to my forum, but I don't know how to align the code at the center of the block. Anybody can help me this?
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on November 23, 2010, 09:43:06 PM
Thank for the mod. I have finished add it to my forum, but I don't know how to align the code at the center of the block. Anybody can help me this?




Code: [Select]
echo '<div class="centertext smalltext">';


/* Put existing block code here  */


echo '</div>';


or...

Code: [Select]
echo '<div style="text-align:center;">';


/* Put existing block code here  */


echo '</div>';
Title: Re: SMF PremiumBeat Mp3 Player
Post by: texasman1979 on December 16, 2010, 07:50:09 AM
heres a question, how bout a streaming audio player?

can this player wiich looks really nice, have the source set to: ie. a shoutcast server?
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on December 18, 2010, 07:48:58 PM
heres a question, how bout a streaming audio player?

can this player wiich looks really nice, have the source set to: ie. a shoutcast server?

You are referring to playing .PLS files which are shoutcast feeds.
The source url(s) have to be mp3's .. or at least have that file suffix or it won't play.
Some sites play a feed or several mp3's (perhaps a whole cd or whatever) through the 1 mp3 source.

Here is an example: Click Here (http://magnatune.com/all/fuzz-messy_128.mp3)

That site may supply others. You will have to find them.



On the Shoutcast website's home page, if you look to the bottom left of the page you will see a Widget link.
Use it in a html block.
 
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on March 04, 2011, 10:14:03 AM
Updated to version 1.8

New features:

- Total rewrite
- HTML block Popup player (fixed button/link or not)
- New PHP Block format
- Each playlist with its own settings
- Browse specific playlist entries
- Installation updated for SMF 1.1.13 & SMF 2.0 RC5
Title: Re: SMF PremiumBeat Mp3 Player
Post by: defdave on March 19, 2011, 08:35:30 PM
Thanks for your work on this Underdog.

I installed it, but this is what shows up in my admin panel:
(http://img546.imageshack.us/img546/6666/premiumbeatproblem.jpg)

I'm using SMF 1.1.13 and Simple Portal 2.3.3
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on March 21, 2011, 04:21:55 AM
Thanks for your work on this Underdog.

I installed it, but this is what shows up in my admin panel:
(http://img546.imageshack.us/img546/6666/premiumbeatproblem.jpg)

I'm using SMF 1.1.13 and Simple Portal 2.3.3

Looks like a possible language string issue and your log would reflect that with a bunch of undefined errors.
The mod only installs its language files in the regular English files.. If you use another language and/or utf-8 you will need to transfer the values to the appropriate files.

Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on April 30, 2011, 10:45:05 PM
Updated to version 1.9 .. please read the first post for the change-log details.

The player will now work individually with a permission based popup executed from a forum link and/or a php block/module.
There is now an option to auto-load mp3's from a specified local folder and a bbcode that plays multiple mp3 url's.



BB Code (membergroup permission enabled):
This is a new feature added to versions 1.9+

The bbc feature will allow a user to play single/multiple mp3's within a post using full url's.
ie.
Code: [Select]
[premiumbeat]http://some_site/samplesong1.mp3,  http://some_site/samplesong2.mp3, http://some_site/samplesong3.mp3[/premiumbeat]

or

[premiumbeat=http://some_site/samplesong1.mp3,  http://some_site/samplesong2.mp3, http://some_site/samplesong3.mp3]Cool Songs!![/premiumbeat]
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Deezel on June 09, 2011, 10:39:36 PM
Nice work Underdog... will check it out tonight.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on June 21, 2011, 12:55:16 AM
Nice work Underdog... will check it out tonight.

Thanks.

I noticed you are using the auto load folder and I assume you have it set to the default directory because the sample mp3 is in your playlist.
Remember that when uninstalling the mod (for update or otherwise) the my_music folder gets deleted.
I suggest moving the music folder (containing your mp3's) outside of the my_music directory so you do not delete all your mp3's in error at some point.
The mod has a directory setting in:  Admin -> Premiumbeat -> Settings
 


Title: Re: SMF PremiumBeat Mp3 Player
Post by: Deezel on June 27, 2011, 09:14:54 AM
thanks man... cheers.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: nob4uask on July 11, 2011, 02:05:57 AM
Arvo All,

I finally have time to start working on using premiumbeat on my site but seem to have run into some issues, I installed 1.71 awhile back.

I added songs but couldn't remember, nor find, where you activate the player at.  I checked my admin configs but couldn't locate it,  I could of swore that I seen it on there before.

I then figured well,  I will go ahead and upgrade to 1.9.  After backing up my site I went to uninstall it and it says "Cannont uninstall because there is no uninstaller".

I noticed that under "Browse Packages" it doesn't have an "uninstall" option like the rest of my packages, only "List Files" & "Delete".  I have to go to "Installed Packages" to find the "uninstall"

I am running SMF 1.1.13, SP 2.3.3

How do I go about removing the old copy and installing the upgrade ?

Thank you for your time.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: cebu on July 12, 2011, 08:20:23 AM
ive installed this to SMF 1.1.14 but it didnt work. i wanted to uninstall this but its giving an error.

"This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information."

hope you could help on this.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on July 12, 2011, 01:27:05 PM
ive installed this to SMF 1.1.14 but it didnt work. i wanted to uninstall this but its giving an error.

"This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information."

hope you could help on this.

I just tested this on SMF 1.1.14 and it works fine for me. However, I made an error for the uninstall which I will have to remedy with the next update and I thank you for pointing it out.

Download the attachment and unzip it on your pc/mac desktop.
Upload the folder (that you unzipped/decompressed) to your Packages folder of your site via FTP.
Navigate to your Packages menu and you should now have the option to uninstall the modification.. after uninstalling, you may need to delete it twice from that menu.

Title: Re: SMF PremiumBeat Mp3 Player
Post by: nob4uask on July 12, 2011, 06:42:28 PM
ive installed this to SMF 1.1.14 but it didnt work. i wanted to uninstall this but its giving an error.

"This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information."

hope you could help on this.

Morn cebu,

I had some issues to but underdog was able to work me through it.  The player is now working and worth the install.  Maybe you could post your issue so that underdog or someone else might be able to help you through it instead of giving up on it.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: cebu on July 12, 2011, 09:41:57 PM
thanks nob4uask


OK, here the problem. iv installed it and it shows the mp3 player tab on the top. iv put on sample mp3 url. when i click on the tab and try to play the music, it wont. nothings happening. and also with some members, the tab wont show up. even if i have properly made the settings.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: nob4uask on July 13, 2011, 01:40:43 AM
thanks nob4uask


OK, here the problem. iv installed it and it shows the mp3 player tab on the top. iv put on sample mp3 url. when i click on the tab and try to play the music, it wont. nothings happening. and also with some members, the tab wont show up. even if i have properly made the settings.

Arvo cebu,

I am using the default theme so that is what my info will pertain to.  If you are using a custom theme things might be different.

Lets start with the not playing issue. 

I had the same problem and it ended up being the path was wrong.  If premiumbeat was installed in the default directory then the url should be

my_music/music/04 - Blood Brothers.mp3

with the 04 - Blood Brothers.mp3 replaced with whatever song you uploaded.


As far as the tab not showing up.

Admin has it by default.  On the rest of the membergroups you will have to go in and check the " Enable/View Premiumbeat Forum Link" for each membergroup that you want it to show up on.  It should be located in the upper right hand column.

I don't know about you, but I have a test member that I use to make sure things work under different membergroups.

Give the above a try and let me know how it goes.
 
Title: Re: SMF PremiumBeat Mp3 Player
Post by: cebu on July 14, 2011, 01:19:04 AM
i tried it but there is a particular setting that i cant find. would it be possible to ask for the uninstaller for this so i could uninstall it first then try to reinstall it again?
Title: Re: SMF PremiumBeat Mp3 Player
Post by: nob4uask on July 14, 2011, 01:31:24 AM
i tried it but there is a particular setting that i cant find. would it be possible to ask for the uninstaller for this so i could uninstall it first then try to reinstall it again?

Arvo cebu,

Underdog provided it about 4 posts up.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: cebu on July 15, 2011, 02:47:26 AM
ive already checked it multiple times and this is whats showing
(http://i1210.photobucket.com/albums/cc416/ram_ragz/packages.png)

and if i uninstall it through the installed packages tab, this is what i get
(http://i1210.photobucket.com/albums/cc416/ram_ragz/packages2.png)
Title: Re: SMF PremiumBeat Mp3 Player
Post by: nob4uask on July 15, 2011, 03:27:33 AM
ive already checked it multiple times and this is whats showing
(http://i1210.photobucket.com/albums/cc416/ram_ragz/packages.png)

and if i uninstall it through the installed packages tab, this is what i get
(http://i1210.photobucket.com/albums/cc416/ram_ragz/packages2.png)

Even cebu,

Follow the instructions that underdog gave me about half way down page 5 of the following link.

http://www.simplemachines.org/community/index.php?topic=398381.80

After that, delete the 1.9 in the browse packages.

Check to see if you see it listed in "Installed Packages".  If so go to smf/packages/installed.list.  Open the "Installed.list" file in an editor and find the Premiumbeat line.  There should be one line for each installed package that you have.  Delete this line and save it, make sure that you save it as "Installed.list" because the .list file type might not be listed.  Re-upload the file and that should be it.

Re-upload the 1.9 package and install it.

Hope this helps.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on July 15, 2011, 07:20:06 AM
Even cebu,

Follow the instructions that underdog gave me about half way down page 5 of the following link.

http://www.simplemachines.org/community/index.php?topic=398381.80

After that, delete the 1.9 in the browse packages.

Check to see if you see it listed in "Installed Packages".  If so go to smf/packages/installed.list.  Open the "Installed.list" file in an editor and find the Premiumbeat line.  There should be one line for each installed package that you have.  Delete this line and save it, make sure that you save it as "Installed.list" because the .list file type might not be listed.  Re-upload the file and that should be it.

Re-upload the 1.9 package and install it.

Hope this helps.

This is a different version and the SMF file edits are not the same.
This way is easier than getting people to do manual file edits but that is my next step.



cebu:

With the attachment to my last post make sure to unzip it on your pc/mac.
The folder that is contained within is what you need to upload to your Packages directory of your site.
This will allow the uninstall tab to appear for the mod in your packages list.
Title: Re: SMF PremiumBeat Mp3 Player
Post by: Chen Zhen on August 18, 2012, 04:38:24 PM

Updated to version 2.0.
Please read the first post for details.

Support: http://custom.simplemachines.org/mods/index.php?mod=2633

Title: Re: SMF PremiumBeat Mp3 Player
Post by: nugget on December 27, 2012, 04:47:37 PM
I am unable to get PremiumBeat to display the player in a block on my SP standalone page.
It works on the forum block, not a a standalone page.
Does anyone have it working on a portal Standalone page.

Thanks
SimplePortal 2.3.8 © 2008-2024, SimplePortal