PremiumBeat Mp3 Player

Started by Chen Zhen, August 30, 2010, 05:20:07 PM

Previous topic - Next topic

Chen Zhen

LINK TO MODIFICATION

SMF 2.0x - Premiumbeat Mp3 Player

Mp3 Platform for SMF forums c/o [email protected]
      
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




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)




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://webdevelop.comli.com) 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.
Block codes are available from the main download page.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

!RFAN

its not working... not on my site but on ur site as well...

Chen Zhen

Quote from: !RFAN on August 31, 2010, 03:12:06 AM
its not working... not on my site but on ur site as well...

it appears to work fine for me.

What browser are you using?

The player requires the latest version of Adobe Flash to be installed into your browser add-ons.
If you are using IE8 64 bit, adobe has not released an add-on for it yet therefore this player will not work with it at the moment.

It does work with firefox, IE 32 bit and Chrome.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

!RFAN

90% of world population will not be able to use it...
m using chrome and firefox
dnt u think that it should work on all browsers???

or maybe in future adobe will release add-on for it??

simmi2121

Its working fine 4 me .... but there is 1 problem as we have to refresh our page to load playlist rest all is good

Chen Zhen

#5
Don't have a portal installed and/or don't want one? ... but you want to use this player?  No problem!

With some manual edits to your themes index.templates, this player can operate without the use of a portal.



The following edit will have to be performed to every theme's index.template.php



Top of forum placement:

Navigate to:  Themes  ->  YOUR_THEME  ->  index.template.php

Find:

// Show the menu here, according to the menu sub template.
template_menu();


Premiumbeat code: Add this BEFORE the above code

/*   Premiumbeat Flash Music Player    */
/*   Your playlist is located in your SMF Admin Panel (under Features and Options for SMF 1.x)  */
/* Your default mp3 folder is located at: /my_music/music/  */
/*  (whole url's can be used for mp3 source files in your mp3 playlist or directly from your site directory)  */
/*  Outside sources are recommended for shared hosting  */
/* This block has been edited to not operate during SMF Arcade or E-Arcade game play.  */

/* Set Playlist ID Number  - default is 1  */
/* Playlist number 1 will play on all blocks... Other playlists are block specific  */
$playlist_id = 3;
global $boardurl, $scripturl, $modSettings;
if (empty($modSettings['customMusic_count'])) {$modSettings['customMusic_count'] = 0;}
if ($modSettings['customMusic_count'] > 0)
{
$id_of_game = !empty($_REQUEST['game']) ? (int) $_REQUEST['game'] : 0;
if ($id_of_game < 1)
{

/* Adjustable parameters  */
$width = 0;
$height = 0;
$skin = '#FFFFFF';
$autoplay = 'no';   /*  yes = autoplay,    no = manual play  */

/*  Read database settings for block -  these can be overidden by adding remark tags around this part and adjusting above variables */
if (!empty($modSettings['customMusic_width']))
{$width = $modSettings['customMusic_width'];}
if (!empty($modSettings['customMusic_height']))
{$height = $modSettings['customMusic_height'];}
if (!empty($modSettings['customMusic_skin']))
{$skin = '&#35;' . $modSettings['customMusic_skin'];}
if (!empty($modSettings['customMusic_autoplay']))
{
  if (empty($modSettings['customMusic_autoplay'])) {$modSettings['customMusic_autoplay'] = 0;}
  if($modSettings['customMusic_autoplay'] == 1)
     {$autoplay = 'yes';}
   else
    {$autoplay = 'no';}
}

$_SESSION['customMusic_checker'] = true;
if($playlist_id < 1) {$playlist_id = 1;}
$_SESSION['playlist_id'] = $playlist_id;

echo'<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", "mymovie", "'.$width.'", "'.$height.'", "7", "'.$skin.'");
   so.addVariable("autoPlay","'.$autoplay.'")
   so.addVariable("playlistPath","',$scripturl,'?action=customMusic", "SESSION")
   so.write("flashPlayer");
</script>';
}
}





With this type of setup I would use the player as invisible (0 width -and- 0 height) and then set the player to autoplay. (adjust settings from admin menu)

If you want it visible, the above edit will place it at the top of the forum. You can take that above block of code and place it at the bottom of the page if preferred.




To place it at the bottom of the page:

Find:

function template_body_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;


Place the premiumbeat code AFTER the above code.




You can adjust the playlist id number in the above code to a number between 1 - 50 but the mp3's you want played here must have their playlist id set at either 1  - OR  -  matching the number in the above code.

ref.

/* Set Playlist ID Number  - default is 1  */
/* Playlist number 1 will play on all blocks... Other playlists are block specific  */
$playlist_id = 3;






My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

BRiNGiTT

Pls...I've tried it on PortaMx portal...It never worked....

I then uninstalled it and installed Simple Portal in order to install the premium beat but it's still not working...


Please help me becos my fans are dying to see it work....thnx....
I dnt see what has been done; I only see what remains to be done

Chen Zhen

#7






Quote from: 沙灘排球 on October 03, 2010, 08:10:20 PM
Pls...I've tried it on PortaMx portal...It never worked....

I then uninstalled it and installed Simple Portal in order to install the premium beat but it's still not working...


Please help me becos my fans are dying to see it work....thnx....

Did you install the mod error free?
If so, did you add proper mp3 url's to your mp3 list in the settings menu?
You also need to make sure to set the playlist id for your mp3's to match the one in the top of the block code.
Also: Please use the block code provided in the first post of this thread. 

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

BRiNGiTT

Yeah....that's exactly what I used...

I used the Code in the first post...

The Playlist id =1

But then I've nt installed the mod error free....

when u visited the site u realised there is a block i named Media Player...

That's where it supposed to show but it's not showing.....

I visited ur  site and followed some instructions there as well but still no good result....

I have arcade installed....But I only installed it today....any help...
I dnt see what has been done; I only see what remains to be done

Chen Zhen

Quote from: 沙灘排球 on October 04, 2010, 07:00:00 PM
Yeah....that's exactly what I used...

I used the Code in the first post...

The Playlist id =1

But then I've nt installed the mod error free....

when u visited the site u realised there is a block i named Media Player...

That's where it supposed to show but it's not showing.....

I visited ur  site and followed some instructions there as well but still no good result....

I have arcade installed....But I only installed it today....any help...





I do not seem to be able to send you a PM on your site.
Not the user named 'Admin' .


I can take a look at your settings, block and mp3 entries but I need temporary admin to do that.
It is up to you if you want to grant me that access temporarily to look everything over.

Let me know.

btw - it could be your mp3 source files.

try using the demo source file:

my_music/music/song.mp3


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen


- UPDATE -

Version 1.7 (Public)
- Removed url filter
- Patched mp3 list deletion issue





This update mainly addresses an issue with the mp3 source url's.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

SavvyQc

the player seems to have installed fine on the exblock. I got 2 test songs in, but I can't hear any music?? the equalizer seems to be bubbling.

Chen Zhen

Quote from: SavvyQc on October 14, 2010, 07:22:23 PM
the player seems to have installed fine on the exblock. I got 2 test songs in, but I can't hear any music?? the equalizer seems to be bubbling.

Did you set the playlist id's for your mp3's to match the one in your block?

There is an example mp3 that comes with the mod for testing.

Try this as an mp3 entry to see if it works properly:
my_music/music/song.mp3

You also may need to adjust the settings. Such as autoplay and dimensions.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

BRiNGiTT

Ok...Underdog...I'll assign you Admin Privileges in order for you to check it for me...

I'll really appreciate that....

Thanks....I'lll be waiting....
I dnt see what has been done; I only see what remains to be done

uniektekniek

heya.. nice mod.. doesnt seem to work inside boards though.. im running it in a tinyportal block and it shows ont he index page and the board index.. but inside boards im getting malfunction errors.. any ideas??

Chen Zhen

Quote from: 沙灘排球 on October 25, 2010, 04:08:45 PM
Ok...Underdog...I'll assign you Admin Privileges in order for you to check it for me...

I'll really appreciate that....

Thanks....I'lll be waiting....

I will take a look tomorrow when I have ample time.




Quote from: uniektekniek on October 27, 2010, 01:34:03 AM
heya.. nice mod.. doesnt seem to work inside boards though.. im running it in a tinyportal block and it shows ont he index page and the board index.. but inside boards im getting malfunction errors.. any ideas??

I just ran some tests and it appears to work fine posted on specific boards.
ie. http://askusaquestion.net/index.php?board=34.0
However, this is using Simple Portal... I will run some tests with TP to see if I can duplicate your issue.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

tomce

is it posible this mod to be aytoplay and to continue with the song, not at every loaded page to start over and over

thanks

biguran

Hello, great mod


I do have the same problem like tomce! The mod is installed on a aquatics forum, full with boards. Every time a member clicks on a page the music starts over. To be honest it is really annoying.

Is it possible to have the player playing 24/7, not depending on the activity from the forum?

thanks

amcapt89

Hello there,

I use adk portal and I can create a php block.

Unfortunately when I create it the following error is displayed: "Mp3 Player Malfunction"

The url I used is exactly the following: my_music/music/song.mp3

Any idea on how to solve this issue?

Many thanks for your help.

amcapt89

sharks

Can someone please post a link to a working example of this mod? I have tried the example link from the first post but it's not working anymore as the site is dead.

Advertisement: