collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 410
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: SMF PremiumBeat Mp3 Player  (Read 40874 times)

0 Members and 1 Guest are viewing this topic.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
SMF PremiumBeat Mp3 Player
« 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:
  • Always have a playlist available (create one if necessary)
  • Assign your playlists their file folder
  • Assign your playlists to designated usergroups (each usergroup can only be assigned to one playlist)
  • The popup will not work unless you assign membergroups to playlists (this includes Admins!)
  • Experiment with other playlist settings until its appearance is satisfactory
  • Adjust Premiumbeat settings to have the override use an opted playlist
  • Adjust Premiumbeat settings to enable/disable the playlink and/or drop-down buttons
  • Adjust each membergroup its Premiumbeat permissions to allow access to various functions
  • Files can be uploaded showing Anonymous and/or the username of the uploader
  • Files that are manually uploaded to the playlist folder via ftp are anonymous with no n/a date
  • Admins have permission to do all functions
  • Users can only delete their own files if the permission is set
  • Users can only change their own anonymous/name for files
  • This player only accepts mp3 file types - no others for this version
  • PHP 5.3 or more advanced is necessary on your server to use this modification
  • Please read the recommended requirements shown below
  • Please read the license and abide by its guidelines else do not use this modification
  • Set playlists to be available in the upload/download template if desired



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.
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
Premiumbeat Flash Music Player-Gilles & Francois Arbour (http://premiumbeat.com) Permission was granted directly from the authors
jQuery AXuploader-Alban Xhaferllari (http://www.albanx.com) Dual licensed under the MIT or GPL Version 2 licenses
SMF Documentation-Skhilled (http://www.docskillz.com/docs/) GNU Free Documentation License

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
« Last Edit: May 15, 2013, 06:08:21 PM by Underdog »

Offline 130860

  • Super Handsome Language Coordinator
  • Comrade
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: SMF PremiumBeat Mp3 Player
« Reply #1 on: July 10, 2010, 08:51:50 PM »
nice, can you give us a example code on a php block using this mod ;)

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #2 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

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

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player - language edits
« Reply #3 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';
« Last Edit: April 30, 2011, 10:43:08 PM by Underdog »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: SMF PremiumBeat Mp3 Player
« Reply #4 on: July 20, 2010, 03:02:27 AM »
Moved to the Blocks and Modifications board.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #5 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.

Offline megatornado

  • Newbie
  • Posts: 2
  • Gender: Male
    • Portal AWP
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: SMF PremiumBeat Mp3 Player
« Reply #6 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

Offline thellie

  • Semi Newbie
  • *
  • Posts: 22
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: SMF PremiumBeat Mp3 Player
« Reply #7 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 :)

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #8 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.
« Last Edit: September 04, 2010, 04:52:17 PM by Underdog »

Offline Deezel

  • Jr. Member
  • **
  • Posts: 54
  • Gender: Male
  • It Is What It Is
    • Owner/Admin
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: SMF PremiumBeat Mp3 Player
« Reply #9 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?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #10 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.






Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #11 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


 

Offline diendannhatban.info

  • Just Registered
  • Posts: 1
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: SMF PremiumBeat Mp3 Player
« Reply #12 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?

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #13 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>';

Offline texasman1979

  • Semi Newbie
  • *
  • Posts: 38
  • Gender: Male
  • sup
    • project
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: SMF PremiumBeat Mp3 Player
« Reply #14 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?
SMF 2.0 RC5
SimplePortal 2.3.4

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #15 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

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.
 

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #16 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

Offline defdave

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 1.1.12
  • SP Version: None
Re: SMF PremiumBeat Mp3 Player
« Reply #17 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:


I'm using SMF 1.1.13 and Simple Portal 2.3.3

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #18 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:


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.


Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: SMF PremiumBeat Mp3 Player
« Reply #19 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]
« Last Edit: May 02, 2011, 01:10:53 PM by Underdog »