Tags have become easier since version 1.7, you can now send in shortcodes. Note: there's an admin option to ignore the tags which needs to remain unticked when you want to use them.
Instructions: Place tag (1) in the header, place tag (2) where you want the players to be.
(1). mp3j_addscripts( $style )
Loads the player's javascript and CSS files into the page header, and allows you to set a stylesheet. This tag must be placed above wp_head(), and must be used to ensure scripts will be loaded for players set via template tags.
$style can be either a URI to a stylesheet, or 'styleA', 'styleB', 'styleC', 'styleD' to use one available from admin. Defaults to current admin setting if not specified.
(2). mp3j_put( $shortcodes )
Adds player(s) where the tag is placed in the theme. Can use multiple times.
$shortcodes is a string containing any player shortcodes and html
Play 5 random library tracks on the posts index page
Put this in header.php above wp_head()
<?php
mp3j_addscripts();
?>
Put this in index.php
<?php
mp3j_put( '[mp3-jplayer tracks="FEED:LIB" pick="5"]' );
?>
Always use if ( function_exists() ) {}
to check tags exist before running them incase the plugin gets deactivated.
mp3j_grab_library( $format )
Returns an array of all the mp3's in the library with their 'filenames', 'urls', 'titles', 'excerpts', 'descriptions', and original ID (not attachment). Can be used anywhere.
$format can be either 1 (gives back the above fields in indexed arrays) or 0 (gives back the arrays as returned from the select query), defaults to 1.
mp3j_debug( $info )
Prints some info from the plugin to the browser's source view (CTRL+U or Page->view source) about the page that just ran. Can be useful for debugging when customising templates.
$info is depreciated and ignored.
These tags have no use anymore, setting them has no effect.
mp3j_flag( $set )
mp3j_set_meta( $tracks, $captions )