NP_FlashMP3.php

With this plugin you can post mp3 by using the tag <%FlashMP3(your.mp3)%> in item or inside a skin

The plugin requires dewplayer. The player file 'dewplayer.swf' must be in the directory /media of your blog.

General Plugin info
Author: Edmond Hui, based on code by Kai Greve, mod by ftruscot
Current Version: v0.8
Download: n/a
Code: NP_FlashMP3_code
Demo: here
Forum Thread: http://forum.nucleuscms.org/viewtopic.php?t=13807

Installing

  1. Cut and paste the code into NP_FlashMP3.php
  2. Upload the plugin to your plugin directory
  3. Install the plugin in the Plugin Manager
  4. Download the http://www.alsacreations.fr/dewplayer and place the file dewplayer.swf in the media/ directory of your blog. Also new in 0.8, support for the dewplayer-vol.swf player http://www.estvideo.net/dew/index/2006/05/02/707-dewplayer-1-5
  5. Add the filetype mp3 in the Global Settings under Allow File Types for Upload
  6. You have to change the Max. upload file size (bytes) in the Global Settings if you want to upload mp3 with more than 1 MB (= 1048576 Bytes) size

How to use the plugin

The easiest way to publish a mp3 is to use the Media Manager from Nucleus:

  1. Upload your mp3 in the same way like images
  2. When the message Text to display appears simply press OK.
  3. The result is a entry like <%media(filename.mp3|)%>
  4. Change it to <%FlashMP3(filename.mp3)%>

When used in items, the plugin automatically adds the path to your member media directory. When used in skins, the plugin automatically add the path to the site media directory. For example, to play the filename.mp3 file from your member media directory in an item use this:

<%FlashMP3(filename.mp3)%>

to play the same file from a skin (assuming the memberid of the fileowner is 1), use this:

<%FlashMP3(1/filename.mp3)%>

If you wish to post mp3 from a remote location (outside of your blog), you can also use the absolute URL to the mp3. The parameter must start with “http:”, for example: <code><%FlashMP3(http://yourdomain.com/mp3/filename.mp3)%></code> =====Plugin Options===== User can set default values of the player from the plugin option menu * dewplayer, either dewplayer, dewplayer-mini, dewplayer-vol (new in 0.8) or dewplayer-multi depending on which you have downloaded. You must download each version you wish to use to your media directory * autoplay, yes to autoplay, no to not autoplay * autoreplay, yes to autoreplay, no to not autoreplay * volume, Integer between 0 (silent) to 100 (loud) * bgcolor, A standard internet color in form of rrggbb (no #) =====Available SkinVars and/or TemplateVars===== * <%FlashMP3(filename.mp3)%> * <%FlashMP3(http://somewhere.com/file.mp3)%> Each of the player options can be overriden in the variable call (in post or in skin) through this format: * <%FlashMP3(mp3_path|autoplay|autoreplay|volume|bgcolor|player)%> * <%FlashMP3(song1.mp3|0|1|50|336699|dewplayer)%> If the player being used is the dewplayer-multi version, the mp3_path variable can be a semi-colon separated list of paths to mp3 files in this format: * <%FlashMP3(mp3_path1;mp3_path2|autoplay|autoreplay|volume|bgcolor|player)%> * <%FlashMP3(song1.mp3;song2.mp3;song3.mp3|1|1|60|4d769a|dewplayer-multi)%> If you specify a directory (from your member media directory) in place of a file name, a random mp3 file will be chosen from that directory. In the case of use of the dewplayer-multi.swf player, a random playlist will be made from the mp3 files in that directory. For example, if a have a directory called 'audiofiles' in my member media directory (media/1/audiofiles/) then this will play a random mp3 from that directory in an item: <code><%FlashMP3(audiofiles)%></code> or in a skin <code><%FlashMP3(1/audiofiles)%></code> =====History===== * Version 0.1 * initial release * Version 0.2 * fixed IE6/7 problem * Version 0.3 (2005-11-17) * fixed remote mp3 path bug * Version 0.4 (2007-01-03) * Add support for skinvar (ftruscot) * Version 0.5 (2007-01-03) * Add options for replay, autoreplay, volume, bgcolor, and which player (ftruscot) * Version 0.6 (2007-01-04) * Fix so can assign mutliple mp3 files when using the dewplayer-multi player (ftruscot) * Version 0.7 (2007-01-05) * Fix authorid for skinvar. Allow filename to be a local directory. Picks random mp3 (or random playlist in case of dewplayer-multi) from the given directory (ftruscot) * Version 0.8 (2007-01-17) * fix of volume bug (thanks creativebin) and add support for dewplayer-vol.swf (requires uninstall of previous version before install of 0.8) ===== Plugin Review ===== NP_FlashMP3 version 0.8 works with Nucleus CMS version 3.31 - 2007-11-03 kg

flashmp3.txt · Last modified: 2007/11/03 22:56 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki