MP3-jPlayer - Version 1.7.1

Version Description

  • Fixed widgets on search pages, and added 'search' as an include/exclude value for the page filter.
  • Fixed default colours pick-up when using template tags, and the indicator on single players.
Download this release

Release Info

Developer simon.ward
Plugin Icon 128x128 MP3-jPlayer
Version 1.7.1
Comparing to
See all releases

Code changes from version 1.7 to 1.7.1

css/player-text.css CHANGED
@@ -105,10 +105,10 @@
105
  font-family: 'trebuchet ms', Arial, sans-serif;
106
  }
107
 
108
- div.jp-play-time { bottom: 23px; width:37px; opacity:0.6; filter:alpha(opacity=60); }
109
  /*div.jp-total-time { top: 63px; width:37px; visibility:hidden; } */
110
  div.jp-total-time { visibility:hidden; }
111
- div.statusMI { bottom: 23px; left: 37px; }
112
 
113
  /*span.mp3-finding { background: url('../css/images/finding-bar1b.gif') repeat-y -4px 3px; margin-left: -3px; padding-left: 4px; }
114
  span.mp3-loading { background: url('../css/images/finding-bar1b.gif') repeat-y -4px 3px; margin-left: -3px; padding-left: 4px; } */
@@ -147,10 +147,10 @@
147
  div.buttons_mp3jpause:hover { background:transparent !important; }
148
 
149
  /* prev & next buttons */
150
- div.Prev_mp3j, div.Next_mp3j { text-indent:0px !important; float:right; height: 25px; line-height:25px !important; font-size:12px; }
151
- div.Prev_mp3j { width:38px; margin:0px 0px 0px 0px; background: transparent !important; }
152
  div.Prev_mp3j:hover { background: transparent !important; }
153
- div.Next_mp3j { width:38px; margin:0px 0px 0px 0px; background: transparent !important; font-size:12px; }
154
  div.Next_mp3j:hover { background: transparent !important; }
155
 
156
  /* stop button */
@@ -161,10 +161,10 @@
161
  /* other buttons*/
162
  div.playlist-toggle-MI {
163
  position: absolute;
164
- bottom: 4px;
165
  left: 2px;
166
  width: auto;
167
- font-size: 11px;
168
  opacity:0.7;
169
  filter:alpha(opacity=70);
170
  font-family: 'trebuchet ms', Arial, sans-serif;
@@ -178,7 +178,7 @@
178
  div.dloadmp3-MI {
179
  position: absolute;
180
  font-size: 11px;
181
- bottom: 4px;
182
  height: auto;
183
  right:3px !important;
184
  margin:0;
105
  font-family: 'trebuchet ms', Arial, sans-serif;
106
  }
107
 
108
+ div.jp-play-time { bottom: 27px; width:37px; opacity:0.6; filter:alpha(opacity=60); }
109
  /*div.jp-total-time { top: 63px; width:37px; visibility:hidden; } */
110
  div.jp-total-time { visibility:hidden; }
111
+ div.statusMI { bottom: 27px; left: 37px; }
112
 
113
  /*span.mp3-finding { background: url('../css/images/finding-bar1b.gif') repeat-y -4px 3px; margin-left: -3px; padding-left: 4px; }
114
  span.mp3-loading { background: url('../css/images/finding-bar1b.gif') repeat-y -4px 3px; margin-left: -3px; padding-left: 4px; } */
147
  div.buttons_mp3jpause:hover { background:transparent !important; }
148
 
149
  /* prev & next buttons */
150
+ div.Prev_mp3j, div.Next_mp3j { text-indent:0px !important; float:right; height: 23px; line-height:23px !important; font-size:12px; }
151
+ div.Prev_mp3j { width:36px; margin:2px 0px 0px 0px; background: transparent !important; }
152
  div.Prev_mp3j:hover { background: transparent !important; }
153
+ div.Next_mp3j { width:36px; margin:2px 0px 0px 0px; background: transparent !important; font-size:12px; }
154
  div.Next_mp3j:hover { background: transparent !important; }
155
 
156
  /* stop button */
161
  /* other buttons*/
162
  div.playlist-toggle-MI {
163
  position: absolute;
164
+ bottom: 8px;
165
  left: 2px;
166
  width: auto;
167
+ font-size: 10px;
168
  opacity:0.7;
169
  filter:alpha(opacity=70);
170
  font-family: 'trebuchet ms', Arial, sans-serif;
178
  div.dloadmp3-MI {
179
  position: absolute;
180
  font-size: 11px;
181
+ bottom: 8px;
182
  height: auto;
183
  right:3px !important;
184
  margin:0;
mp3j_frontend.php CHANGED
@@ -139,6 +139,13 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") )
139
  $scripts = true;
140
  }
141
  }
 
 
 
 
 
 
 
142
 
143
  // Add the scripts
144
  if ( $scripts ) {
@@ -631,30 +638,39 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") )
631
  <div style="padding: 0px; margin: 0px 120px 0px 0px; border-bottom: 1px solid #ddd;"><h2 style="margin-top: 4px; margin-bottom: -6px;">Mp3<span style="font-size: 15px;"> - </span>jPlayer<span class="description" style="font-size: 10px;">&nbsp; <?php echo $this->version_of_plugin; ?></span></h2></div>
632
  <h5 style="margin: 10px 120px 20px 0px; color:#888;"><a href="javascript:mp3jp_listtoggle('fox_help1','help');" id="fox_help1-toggle">Show help</a></h5>
633
  <div id="fox_help1-list" style="display:none;margin:15px 0px 30px 0px; border-bottom:1px solid #ddd;">
634
- <h5 class="description" style="margin: 10px 120px 20px 0px;">Add players using<code>[mp3j]</code> <code>[mp3t]</code> <code>[mp3-jplayer]</code> <code>[mp3-link]</code> shortcodes and/or <a href="widgets.php">widgets</a>.</h5>
635
- <p class="description" style="margin: 10px 120px 10px 10px;">Use these instead of a filename to playlist folders or the library:</p>
636
- <p class="description" style="margin: 10px 120px 20px 10px;"><code>FEED:LIB</code> - Play entire library<br /><code>FEED:DF</code> - Play the default folder (this will only work if your default folder setting is local)<br /><code>FEED:/mymusic</code> - Play the local folder 'mymusic' (folder paths must be local and are relative to the root of your site, NOT the Wordpress install)</p>
 
 
 
637
 
638
  <h4 class="description" style="margin:0px 0px 0px 10px; color:#606060;">Shortcode Parameters</h4>
639
  <div style="margin:0px 0px 0px 15px;">
640
  <h5 style="margin:10px 0px 5px 0px;"><code>[mp3j]</code> &amp; <code>[mp3t]</code> add a single-track player</h5>
641
  <p class="description" style="margin: 0px 120px 20px 10px;">
642
- <code>track</code> filename or URI<br /><code>caption</code> caption text<br /><code>vol</code> 0 - 100<br /><code>autoplay</code> y/n<br /><code>loop</code> y/n, repeat play track (overides subsequent autoplay players)<br />
643
- <code>title</code> replaces default title and caption<br /><code>bold</code> y/n, bold font<br /><code>flip</code> y/n, move play/pause button to other side<br /><code>ind</code> y/n, hide indicator and time<br /><code>flow</code> y/n, set to 'y' to put players within paragraphs without line-breaking (works for line heights around 22px)</p>
644
  <h5 style="margin: 0px 120px 1px 10px;">Also for <code>[mp3t]</code></h5>
645
- <p style="margin: 0px 120px 1px 10px;"><code>play</code> play button text<br /><code>stop</code> pause button text</p>
646
  <h5 style="margin:15px 0px 5px 0px;"><code>[mp3-jplayer]</code> adds a playlist player</h5>
647
  <p class="description" style="margin: 0px 120px 1px 10px;">
648
- <code>tracks</code> Comma separated list of filenames/URI's/folders. Change titles using '@' eg. Mytitle@filename.mp3<br /><code>captions</code> Semi-colon separated list eg. "caption 1; caption 2;"<br /><code>vol</code> 0 - 100<br /><code>autoplay</code> y/n<br /><code>loop</code> y/n, repeat plays track(s)<br /><code>dload</code> y/n, show/hide download link<br /><code>list</code> y/n, show/hide playlist<br /><code>pick</code> number, picks random selection<br /><code>shuffle</code> y/n, shuffle track order<br />
649
  <code>title</code> appears above player<br /><code>pos</code> rel-L, rel-C, rel-R, left, right<br /><code>width</code> px or %<br /><code>height</code> px only, player height excluding list<br /><code>pn</code> y/n, hide prev/next buttons<br /><code>stop</code> y/n, hide stop button<br /><code>mods</code> y/n, add css mods (makes fonts smaller as standard)<br /><code>id</code> a page id to read the custom fields from (ignored if 'tracks' is used in same shortcode, or id has no tracks)</p>
 
 
 
 
 
 
650
  <h5 style="margin:15px 0px 5px 0px;"><code>[mp3-link]</code> plays a track from a playlist player on the same page.</h5>
651
  <p class="description" style="margin: 0px 120px 1px 10px;">
652
- <code>player</code> number of the player<br /><code>track</code> the track number<br /><code>text</code> link text, defaults to 'Play'<br /><code>bold</code> y/n</p>
653
  </div>
654
 
655
  <h4 class="description" style="margin:20px 0px 2px 10px; color:#606060;">Custom Fields (optional)</h4>
656
  <p class="description" style="margin: 0px 120px 10px 10px;">Available on page/post edit screens (may be hidden) for writing playlist as follows:</p>
657
- <p class="description" style="margin: 0px 120px 6px 10px;">1. Enter <code>mp3</code> into the left hand box.<br />2. Write the filename/URI into the right hand box and hit 'add custom field'</p>
658
  <p class="description" style="margin: 0px 120px 10px 10px;">Add each track in a new field pair.</p>
659
  <h5 class="description" style="margin: 12px 120px 2px 10px;"><strong>Title and caption</strong></h5>
660
  <p class="description" style="margin: 0px 120px 5px 10px;">1. Add a dot, then the caption in the left hand box, eg: <code>mp3.Mycaption</code><br />2. Add the title, then an '@' before the filename in the right box, eg: <code>Mytitle@filename</code></p>
139
  $scripts = true;
140
  }
141
  }
142
+ // On search pages
143
+ if ( is_search() ) {
144
+ if ( $allowed_widget || $allowed_widget_B ) {
145
+ $scripts = true;
146
+ }
147
+ }
148
+
149
 
150
  // Add the scripts
151
  if ( $scripts ) {
638
  <div style="padding: 0px; margin: 0px 120px 0px 0px; border-bottom: 1px solid #ddd;"><h2 style="margin-top: 4px; margin-bottom: -6px;">Mp3<span style="font-size: 15px;"> - </span>jPlayer<span class="description" style="font-size: 10px;">&nbsp; <?php echo $this->version_of_plugin; ?></span></h2></div>
639
  <h5 style="margin: 10px 120px 20px 0px; color:#888;"><a href="javascript:mp3jp_listtoggle('fox_help1','help');" id="fox_help1-toggle">Show help</a></h5>
640
  <div id="fox_help1-list" style="display:none;margin:15px 0px 30px 0px; border-bottom:1px solid #ddd;">
641
+ <h5 class="description" style="margin: 10px 120px 0px 10px;">Add players using<code>[mp3j]</code> <code>[mp3t]</code> <code>[mp3-jplayer]</code> <code>[mp3-link]</code> shortcodes and/or <a href="widgets.php">widgets</a>.</h5>
642
+
643
+ <p style="margin: 10px 120px 15px 10px;"><span class="description">Eg.<br />
644
+ Play a single file:</span> <code>[mp3j track="myfile.mp3"]</code><br />
645
+ <span class="description">Playlist files:</span> <code>[mp3-jplayer tracks="myfileA.mp3, myfileB.mp3, myfileC.mp3"]</code></p>
646
+
647
 
648
  <h4 class="description" style="margin:0px 0px 0px 10px; color:#606060;">Shortcode Parameters</h4>
649
  <div style="margin:0px 0px 0px 15px;">
650
  <h5 style="margin:10px 0px 5px 0px;"><code>[mp3j]</code> &amp; <code>[mp3t]</code> add a single-track player</h5>
651
  <p class="description" style="margin: 0px 120px 20px 10px;">
652
+ <code>track</code> filename or URI. Add title using '@' as separator eg. Mytitle@filename.mp3<br /><code>caption</code> caption text. Appears to the right of title<br /><code>vol</code> 0 - 100<br /><code>autoplay</code> y/n<br /><code>loop</code> y/n, repeat play track (overides subsequent autoplay)<br />
653
+ <code>title</code> replaces both title and caption<br /><code>bold</code> y/n, makes font bold<br /><code>flip</code> y/n, move play/pause button to other side<br /><code>ind</code> y/n, hide indicator and time<br /><code>flow</code> y/n, set to 'y' to put players within paragraphs without line-breaking (works ok for line heights around 22px)</p>
654
  <h5 style="margin: 0px 120px 1px 10px;">Also for <code>[mp3t]</code></h5>
655
+ <p class="description" style="margin: 0px 120px 1px 10px;"><code>play</code> play button text<br /><code>stop</code> pause button text</p>
656
  <h5 style="margin:15px 0px 5px 0px;"><code>[mp3-jplayer]</code> adds a playlist player</h5>
657
  <p class="description" style="margin: 0px 120px 1px 10px;">
658
+ <code>tracks</code> Comma separated list of filenames/URI's/folders. Add titles using '@' as separator eg. Mytitle@filename.mp3<br /><code>captions</code> Semi-colon separated list eg. "caption 1; caption 2;"<br /><code>vol</code> 0 - 100<br /><code>autoplay</code> y/n<br /><code>loop</code> y/n, repeat plays track(s)<br /><code>dload</code> y/n, show/hide download link<br /><code>list</code> y/n, show/hide playlist<br /><code>pick</code> number, picks random selection<br /><code>shuffle</code> y/n, shuffle track order<br />
659
  <code>title</code> appears above player<br /><code>pos</code> rel-L, rel-C, rel-R, left, right<br /><code>width</code> px or %<br /><code>height</code> px only, player height excluding list<br /><code>pn</code> y/n, hide prev/next buttons<br /><code>stop</code> y/n, hide stop button<br /><code>mods</code> y/n, add css mods (makes fonts smaller as standard)<br /><code>id</code> a page id to read the custom fields from (ignored if 'tracks' is used in same shortcode, or id has no tracks)</p>
660
+
661
+ <h5 style="margin: 10px 120px 5px 10px;">Use these instead of a filename to playlist folders or the library:</h5>
662
+ <p class="description" style="margin: 0px 120px 20px 10px;"><code>FEED:LIB</code> - Play entire library<br /><code>FEED:DF</code> - Play the default folder (this will only work if your default folder setting is local)<br /><code>FEED:/mymusic</code> - Play the local folder 'mymusic' (folder paths must be local and are relative to the root of your site, NOT the Wordpress install)</p>
663
+
664
+
665
+
666
  <h5 style="margin:15px 0px 5px 0px;"><code>[mp3-link]</code> plays a track from a playlist player on the same page.</h5>
667
  <p class="description" style="margin: 0px 120px 1px 10px;">
668
+ <code>player</code> number of the player (including single file players in the count)<br /><code>track</code> the track number<br /><code>text</code> link text, defaults to 'Play'<br /><code>bold</code> y/n</p>
669
  </div>
670
 
671
  <h4 class="description" style="margin:20px 0px 2px 10px; color:#606060;">Custom Fields (optional)</h4>
672
  <p class="description" style="margin: 0px 120px 10px 10px;">Available on page/post edit screens (may be hidden) for writing playlist as follows:</p>
673
+ <p class="description" style="margin: 0px 120px 6px 10px;">1. Enter <code>mp3</code> into the left hand box.<br />2. Write the filename, URI, or 'FEED' (see above) into the right hand box and hit 'add custom field'</p>
674
  <p class="description" style="margin: 0px 120px 10px 10px;">Add each track in a new field pair.</p>
675
  <h5 class="description" style="margin: 12px 120px 2px 10px;"><strong>Title and caption</strong></h5>
676
  <p class="description" style="margin: 0px 120px 5px 10px;">1. Add a dot, then the caption in the left hand box, eg: <code>mp3.Mycaption</code><br />2. Add the title, then an '@' before the filename in the right box, eg: <code>Mytitle@filename</code></p>
mp3j_main.php CHANGED
@@ -6,7 +6,7 @@ if ( !class_exists("MP3j_Main") )
6
  class MP3j_Main
7
  {
8
  // ------------------------- Update Me
9
- var $version_of_plugin = "1.7";
10
  // -----------------------------------
11
  var $WPinstallpath;
12
  var $Rooturl;
@@ -97,7 +97,7 @@ if ( !class_exists("MP3j_Main") )
97
 
98
  $mp3FoxAdminOptions = array( // default settings
99
  'initial_vol' => '100',
100
- 'auto_play' => 'true',
101
  'mp3_dir' => '/',
102
  'player_theme' => 'styleF',
103
  'allow_remoteMp3' => 'true',
@@ -115,7 +115,7 @@ if ( !class_exists("MP3j_Main") )
115
  'echo_debug' => 'false',
116
  'add_track_numbering' => 'true',
117
  'enable_popout' => 'true',
118
- 'playlist_repeat' => 'true',
119
  'player_width' => '40%',
120
  'popout_background' => '',
121
  'popout_background_image' => '',
@@ -881,7 +881,7 @@ if ( !class_exists("MP3j_Main") )
881
  $pagelist[$i] = str_replace( " ", "", $id );
882
  }
883
  }
884
- if ( !is_singular() ) { // Look for 'index' or 'archive'
885
  if ( $mode == "include" ) {
886
  if ( is_home() ) {
887
  if ( strpos($list, "index") === false ) { $f = true; }
@@ -889,6 +889,9 @@ if ( !class_exists("MP3j_Main") )
889
  if ( is_archive() ) {
890
  if ( strpos($list, "archive") === false ) { $f = true; }
891
  }
 
 
 
892
  }
893
  if ( $mode == "exclude" ) {
894
  if ( is_home() ) {
@@ -897,6 +900,9 @@ if ( !class_exists("MP3j_Main") )
897
  if ( is_archive() ) {
898
  if ( strpos($list, "archive") !== false ) { $f = true; }
899
  }
 
 
 
900
  }
901
  } else { // Check the id's against current page
902
  global $post;
@@ -979,7 +985,7 @@ if ( !class_exists("MP3j_Main") )
979
 
980
  // Write popout css and js vars to header
981
  $PPcsslink = ( strpos($themepath, "http://") === false ) ? $this->WPinstallpath . $themepath : $themepath;
982
- $this->write_user_style( $PPcsslink );
983
  return;
984
  }
985
 
@@ -987,13 +993,15 @@ if ( !class_exists("MP3j_Main") )
987
  /**
988
  * Writes user colour settings
989
  */
990
- function write_user_style( $PPcsslink ) {
991
 
992
  $settings = $this->theSettings;
993
  if ( $settings['use_fixed_css'] == "false" )
994
  {
995
  $pluginpath = $this->WPinstallpath . "/wp-content/plugins/mp3-jplayer/";
996
- $colours = $this->set_colours( $settings['colour_settings'], $settings['player_theme'], $pluginpath );
 
 
997
 
998
  $screen_opac = "; opacity:" . $colours['screen_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['screen_opacity'] . ")";
999
  $loaderbar_opac = "; opacity:" . $colours['loadbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['loadbar_opacity'] . ")";
@@ -1023,7 +1031,7 @@ if ( !class_exists("MP3j_Main") )
1023
  $listBGa = "none";
1024
  $vol_grad = ( $colours['volume_grad'] == "light" ) ? "transparent url('" . $pluginpath . "css/images/vol-grad60w2.png') repeat-y -15px top" : "transparent url('" . $pluginpath . "css/images/vol-grad60b2.png') repeat-y 0px top";
1025
  $opac = ( $colours['indicator'] == "tint" ) ? "35" : "100";
1026
- $indicator = ( $colours['indicator'] == "tint" ) ? "transparent" : $colours['posbar_colour'];
1027
  $gif_opac = "opacity:" . $opac*0.01 . "; filter:alpha(opacity=" . $opac . ")";
1028
 
1029
  echo "\n\n<style type=\"text/css\">
@@ -1058,7 +1066,7 @@ if ( !class_exists("MP3j_Main") )
1058
  function set_colours( $current, $style, $pluginpath ) {
1059
 
1060
  $silver = array( // defaults
1061
- 'screen_colour' => '#c7c7c7', 'screen_opacity' => '20',
1062
  'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
1063
  'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '80', 'posbar_tint' => 'softenT',
1064
  'playlist_colour' => '#f1f1f1', 'playlist_opacity' => '100', 'playlist_tint' => 'darken1', 'list_divider' => 'med',
@@ -1081,7 +1089,7 @@ if ( !class_exists("MP3j_Main") )
1081
 
1082
  $text = array( // defaults
1083
  'screen_colour' => 'transparent', 'screen_opacity' => '100',
1084
- 'loadbar_colour' => '#999', 'loadbar_opacity' => '10',
1085
  'posbar_colour' => '#999', 'posbar_opacity' => '10', 'posbar_tint' => 'none',
1086
  'playlist_colour' => '#fbfbfb', 'playlist_opacity' => '100', 'playlist_tint' => 'lighten1', 'list_divider' => 'none',
1087
  'screen_text_colour' => '#555',
@@ -1275,7 +1283,9 @@ if ( !class_exists("MP3j_Main") )
1275
  if ( is_singular() ) { echo "\nTemplate: Singular "; }
1276
  if ( is_single() ) { echo "Post"; }
1277
  if ( is_page() ) { echo "Page"; }
 
1278
  if ( is_home() ) { echo "\nTemplate: Posts index"; }
 
1279
  if ( is_archive() ) { echo "\nTemplate: Archive"; }
1280
  echo "\nUse tags: ";
1281
  if ( $this->theSettings['disable_template_tag'] == "false" ) { echo "Yes"; }
6
  class MP3j_Main
7
  {
8
  // ------------------------- Update Me
9
+ var $version_of_plugin = "1.7.1";
10
  // -----------------------------------
11
  var $WPinstallpath;
12
  var $Rooturl;
97
 
98
  $mp3FoxAdminOptions = array( // default settings
99
  'initial_vol' => '100',
100
+ 'auto_play' => 'false',
101
  'mp3_dir' => '/',
102
  'player_theme' => 'styleF',
103
  'allow_remoteMp3' => 'true',
115
  'echo_debug' => 'false',
116
  'add_track_numbering' => 'true',
117
  'enable_popout' => 'true',
118
+ 'playlist_repeat' => 'false',
119
  'player_width' => '40%',
120
  'popout_background' => '',
121
  'popout_background_image' => '',
881
  $pagelist[$i] = str_replace( " ", "", $id );
882
  }
883
  }
884
+ if ( !is_singular() ) { // Look for 'index' or 'archive' or 'search'
885
  if ( $mode == "include" ) {
886
  if ( is_home() ) {
887
  if ( strpos($list, "index") === false ) { $f = true; }
889
  if ( is_archive() ) {
890
  if ( strpos($list, "archive") === false ) { $f = true; }
891
  }
892
+ if ( is_search() ) {
893
+ if ( strpos($list, "search") === false ) { $f = true; }
894
+ }
895
  }
896
  if ( $mode == "exclude" ) {
897
  if ( is_home() ) {
900
  if ( is_archive() ) {
901
  if ( strpos($list, "archive") !== false ) { $f = true; }
902
  }
903
+ if ( is_search() ) {
904
+ if ( strpos($list, "search") !== false ) { $f = true; }
905
+ }
906
  }
907
  } else { // Check the id's against current page
908
  global $post;
985
 
986
  // Write popout css and js vars to header
987
  $PPcsslink = ( strpos($themepath, "http://") === false ) ? $this->WPinstallpath . $themepath : $themepath;
988
+ $this->write_user_style( $PPcsslink, $theme );
989
  return;
990
  }
991
 
993
  /**
994
  * Writes user colour settings
995
  */
996
+ function write_user_style( $PPcsslink, $theme ) {
997
 
998
  $settings = $this->theSettings;
999
  if ( $settings['use_fixed_css'] == "false" )
1000
  {
1001
  $pluginpath = $this->WPinstallpath . "/wp-content/plugins/mp3-jplayer/";
1002
+ //$colours = $this->set_colours( $settings['colour_settings'], $settings['player_theme'], $pluginpath );
1003
+ //$colours = $this->set_colours( $settings['colour_settings'], $this->stylesheet, $pluginpath );
1004
+ $colours = $this->set_colours( $settings['colour_settings'], $theme, $pluginpath );
1005
 
1006
  $screen_opac = "; opacity:" . $colours['screen_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['screen_opacity'] . ")";
1007
  $loaderbar_opac = "; opacity:" . $colours['loadbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['loadbar_opacity'] . ")";
1031
  $listBGa = "none";
1032
  $vol_grad = ( $colours['volume_grad'] == "light" ) ? "transparent url('" . $pluginpath . "css/images/vol-grad60w2.png') repeat-y -15px top" : "transparent url('" . $pluginpath . "css/images/vol-grad60b2.png') repeat-y 0px top";
1033
  $opac = ( $colours['indicator'] == "tint" ) ? "35" : "100";
1034
+ $indicator = ( $colours['indicator'] == "tint" ) ? "#ccc" : $colours['posbar_colour'];
1035
  $gif_opac = "opacity:" . $opac*0.01 . "; filter:alpha(opacity=" . $opac . ")";
1036
 
1037
  echo "\n\n<style type=\"text/css\">
1066
  function set_colours( $current, $style, $pluginpath ) {
1067
 
1068
  $silver = array( // defaults
1069
+ 'screen_colour' => '#a7a7a7', 'screen_opacity' => '35',
1070
  'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
1071
  'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '80', 'posbar_tint' => 'softenT',
1072
  'playlist_colour' => '#f1f1f1', 'playlist_opacity' => '100', 'playlist_tint' => 'darken1', 'list_divider' => 'med',
1089
 
1090
  $text = array( // defaults
1091
  'screen_colour' => 'transparent', 'screen_opacity' => '100',
1092
+ 'loadbar_colour' => '#aaa', 'loadbar_opacity' => '15',
1093
  'posbar_colour' => '#999', 'posbar_opacity' => '10', 'posbar_tint' => 'none',
1094
  'playlist_colour' => '#fbfbfb', 'playlist_opacity' => '100', 'playlist_tint' => 'lighten1', 'list_divider' => 'none',
1095
  'screen_text_colour' => '#555',
1283
  if ( is_singular() ) { echo "\nTemplate: Singular "; }
1284
  if ( is_single() ) { echo "Post"; }
1285
  if ( is_page() ) { echo "Page"; }
1286
+ if ( is_search() ) { echo "\nTemplate: Search"; }
1287
  if ( is_home() ) { echo "\nTemplate: Posts index"; }
1288
+ if ( is_front_page() ) { echo " (Home page)"; }
1289
  if ( is_archive() ) { echo "\nTemplate: Archive"; }
1290
  echo "\nUse tags: ";
1291
  if ( $this->theSettings['disable_template_tag'] == "false" ) { echo "Yes"; }
mp3j_widget.php CHANGED
@@ -18,7 +18,7 @@ if ( class_exists("WP_Widget") )
18
 
19
  $widget_ops = array(
20
  'classname' => 'mp3jplayerwidget',
21
- 'description' => __('Add playlist players by choosing the playback mode, ticking some boxes and maybe writing a playlist.',
22
  'mp3jplayerwidget')
23
  );
24
  $control_ops = array(
@@ -34,6 +34,8 @@ if ( class_exists("WP_Widget") )
34
  */
35
  function widget( $args, $instance ) {
36
 
 
 
37
  global $mp3_fox;
38
  // Return if widget not for this page
39
  if ( $mp3_fox->page_filter( $instance['restrict_list'], $instance['restrict_mode'] ) ) { return; }
@@ -291,7 +293,7 @@ if ( class_exists("WP_Widget") )
291
  Include <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="include" <?php if ($instance['restrict_mode'] == "include") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
292
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
293
  Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
294
- <p class="description" style="font-size:11px; margin-top:4px; margin-bottom:1px; <?php echo $helptext_col; ?>">A comma separated list, can use post ID's, <code>index</code>, and <code>archive</code>.</p>
295
  <p style="margin: -43px 0px 25px 420px; font-size: 11px;">Widget Heading: <input class="widefat" style="width:260px;" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
296
  <?php
297
  }
@@ -330,6 +332,8 @@ if ( class_exists("WP_Widget") )
330
  */
331
  function widget( $args, $instance ) {
332
 
 
 
333
  global $mp3_fox;
334
  if ( $mp3_fox->page_filter( $instance['restrict_list'], $instance['restrict_mode'] ) ) { return; }
335
 
@@ -384,7 +388,7 @@ if ( class_exists("WP_Widget") )
384
  Include <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="include" <?php if ($instance['restrict_mode'] == "include") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
385
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
386
  Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
387
- <p class="description" style="font-size:11px; color:#999999; margin-top:4px; margin-bottom:1px;">A comma separated list, can use post ID's, <code>index</code>, and <code>archive</code>.</p>
388
  <!-- Widget Heading -->
389
  <p style="margin: -43px 0px 35px 420px; font-size:11px;">Widget Heading: <input style="width:260px;"class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
390
 
18
 
19
  $widget_ops = array(
20
  'classname' => 'mp3jplayerwidget',
21
+ 'description' => __('Adds a playlist player. Choose playback mode and options.',
22
  'mp3jplayerwidget')
23
  );
24
  $control_ops = array(
34
  */
35
  function widget( $args, $instance ) {
36
 
37
+ if ( !is_home() && !is_archive() && !is_singular() && !is_search() ) { return; }
38
+
39
  global $mp3_fox;
40
  // Return if widget not for this page
41
  if ( $mp3_fox->page_filter( $instance['restrict_list'], $instance['restrict_mode'] ) ) { return; }
293
  Include <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="include" <?php if ($instance['restrict_mode'] == "include") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
294
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
295
  Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
296
+ <p class="description" style="font-size:11px; margin-top:4px; margin-bottom:1px; <?php echo $helptext_col; ?>">A comma separated list, can use post ID's, <code>index</code>, <code>archive</code>, and <code>search</code>.</p>
297
  <p style="margin: -43px 0px 25px 420px; font-size: 11px;">Widget Heading: <input class="widefat" style="width:260px;" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
298
  <?php
299
  }
332
  */
333
  function widget( $args, $instance ) {
334
 
335
+ if ( !is_home() && !is_archive() && !is_singular() && !is_search() ) { return; }
336
+
337
  global $mp3_fox;
338
  if ( $mp3_fox->page_filter( $instance['restrict_list'], $instance['restrict_mode'] ) ) { return; }
339
 
388
  Include <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="include" <?php if ($instance['restrict_mode'] == "include") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
389
  or <input type="radio" id="<?php echo $this->get_field_id( 'restrict_mode' ); ?>" name="<?php echo $this->get_field_name( 'restrict_mode' ); ?>" value="exclude" <?php if ($instance['restrict_mode'] == "exclude") { _e('checked="checked"', "mp3jplayerwidget2"); }?> />
390
  Exclude pages &nbsp;<input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'restrict_list' ); ?>" name="<?php echo $this->get_field_name( 'restrict_list' ); ?>" value="<?php echo $instance['restrict_list']; ?>" /></p>
391
+ <p class="description" style="font-size:11px; color:#999999; margin-top:4px; margin-bottom:1px;">A comma separated list, can use post ID's, <code>index</code>, <code>archive</code>, and <code>search</code>.</p>
392
  <!-- Widget Heading -->
393
  <p style="margin: -43px 0px 35px 420px; font-size:11px;">Widget Heading: <input style="width:260px;"class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" /></p>
394
 
mp3jplayer.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
- Description: Adds a settings page, a bunch of shortcodes, and a widget for playing mp3's. Multi-player, CSS customisable, HTML5/Flash.
6
- Version: 1.7
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
@@ -21,7 +21,7 @@ License: GPL2
21
 
22
  You should have received a copy of the GNU General Public License
23
  along with this program; if not, write to the Free Software
24
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
 
@@ -59,7 +59,7 @@ if ( isset($mp3_fox) )
59
  do_action('mp3j_addscripts', $style);
60
  }
61
 
62
- // Depreciated since 1.6
63
  function mp3j_flag( $set = 1 ) {
64
  do_action('mp3j_flag', $set);
65
  }
@@ -91,7 +91,7 @@ if ( isset($mp3_fox) )
91
  }
92
  }
93
 
94
- // Depreciated since 1.7
95
  function mp3j_set_meta( $tracks, $captions = "", $startnum = 1 ) {
96
  if ( empty($tracks) || !is_array($tracks) ) {
97
  return;
2
  /*
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
+ Description: Add mp3 players to posts, pages, and sidebars. HTML5 / Flash. Shortcodes, widgets, and template tags. See the help on the settings page for a full list of options.
6
+ Version: 1.7.1
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
21
 
22
  You should have received a copy of the GNU General Public License
23
  along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
 
59
  do_action('mp3j_addscripts', $style);
60
  }
61
 
62
+ // depreciated since 1.6
63
  function mp3j_flag( $set = 1 ) {
64
  do_action('mp3j_flag', $set);
65
  }
91
  }
92
  }
93
 
94
+ // Depreciated since 1.7 //
95
  function mp3j_set_meta( $tracks, $captions = "", $startnum = 1 ) {
96
  if ( empty($tracks) || !is_array($tracks) ) {
97
  return;
readme.txt CHANGED
@@ -4,8 +4,8 @@ Plugin URI: http://www.sjward.org/jplayer-for-wordpress
4
  Contributors: simon.ward
5
  Tags: mp3, audio, player, music, jplayer, integration, mp3 player, playlist, media, jquery, javascript, plugin, shortcode, widget, widgets, css, posts, page, sidebar
6
  Requires at least: 2.8
7
- Tested up to: 3.1.3
8
- Stable tag: 1.7
9
 
10
  Add mp3 players to posts, pages, and sidebars. HTML5 / Flash.
11
 
@@ -70,7 +70,7 @@ Other examples:
70
 
71
  <code>[mp3t vol="70" loop="y" track="myfile.mp3"]</code>
72
 
73
- <code>[mp3-jplayer width="30%" height="80px" autoplay="y" tracks="FEED:DF"]
74
 
75
  <code>[mp3j flip="y"]</code>
76
 
@@ -115,16 +115,22 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
115
 
116
  == Screenshots ==
117
 
118
- 1. Example players 1
119
- 2. Example players 2,
120
  3. Popout player
121
- 4. Admin settings page
122
- 5. Colour settings
123
- 6. Other options
 
124
 
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
128
  = 1.7 =
129
  * Added multiple players ability, backwards compatible (see notes below).
130
  * Added single-file players.
4
  Contributors: simon.ward
5
  Tags: mp3, audio, player, music, jplayer, integration, mp3 player, playlist, media, jquery, javascript, plugin, shortcode, widget, widgets, css, posts, page, sidebar
6
  Requires at least: 2.8
7
+ Tested up to: 3.2
8
+ Stable tag: 1.7.1
9
 
10
  Add mp3 players to posts, pages, and sidebars. HTML5 / Flash.
11
 
70
 
71
  <code>[mp3t vol="70" loop="y" track="myfile.mp3"]</code>
72
 
73
+ <code>[mp3-jplayer width="30%" height="80px" autoplay="y" tracks="FEED:DF"]</code>
74
 
75
  <code>[mp3j flip="y"]</code>
76
 
115
 
116
  == Screenshots ==
117
 
118
+ 1. Players eg.1
119
+ 2. Players eg.2
120
  3. Popout player
121
+ 4. Players eg.3
122
+ 5. Admin settings page
123
+ 6. Colour settings
124
+ 7. Other options
125
 
126
 
127
  == Changelog ==
128
 
129
+ = 1.7.1 =
130
+ * Fixed widgets on search pages, and added 'search' as an include/exclude value for the page filter.
131
+ * Fixed default colours pick-up when using template tags, and the indicator on single players.
132
+
133
+
134
  = 1.7 =
135
  * Added multiple players ability, backwards compatible (see notes below).
136
  * Added single-file players.
screenshot-1.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png ADDED
Binary file