MP3-jPlayer - Version 1.8.3

Version Description

  • Moved to jQuery.jPlayer 2.2.0 (fixes plugin problems with recent flash release (v11.6) in browsers like IE and Firefox (time was displaying as 'NaN', tracks not advancing/autoplaying)).
  • Fixed the auto number option for arbitrary single players (they were all numbered 1!).
  • Fixed quotes in captions (they were unescaped still and would break players), thanks to Chris for reporting.
  • Fixed a couple of routines that could throw php warnings, thanks to Rami for reporting.
  • Added the much requested option to try force browsers into saving mp3 downloads (instead of playing them in some kinda built-in player). Maintains right click save-ability. No mobile support just yet. Switched on for local files by default. Can also be set up for remote files (see the help). Option is under 'Playlist player options' on the settings page. Please feedback any issues.
  • Added option to turn any mp3 links in a page into players, which means you can now add players using the 'Add media' button on the page/post edit screens. It has as an editable shortcode on the player settings page (under template options). Option is on by default. Switch it off near top of settings page.
  • Added the 'style' parameter onto the MP3j-ui widget.
Download this release

Release Info

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

Code changes from version 1.8.1 to 1.8.3

css/images/Thumbs.db CHANGED
Binary file
css/images/fdloadB-x.png ADDED
Binary file
css/images/fdloadW-x.png ADDED
Binary file
css/images/finding-bar9.gif ADDED
Binary file
css/images/loader-w.gif ADDED
Binary file
css/images/loader-w2.gif ADDED
Binary file
css/images/loader.gif ADDED
Binary file
css/mp3j-admin-1.8.css CHANGED
@@ -67,6 +67,7 @@ div.wrap {
67
  border:1px solid #f0f0f0;
68
  padding:10px 20px;
69
  margin-bottom:15px;
 
70
  }
71
  a.bl3 {
72
  display:block;
67
  border:1px solid #f0f0f0;
68
  padding:10px 20px;
69
  margin-bottom:15px;
70
+ min-width:550px;
71
  }
72
  a.bl3 {
73
  display:block;
css/player-silverALT.css CHANGED
@@ -265,9 +265,9 @@
265
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important;
266
  /* background */
267
  }
268
- ul.UL_mp3j li { margin:0px !important; padding:0px 0px 0px 15px !important; content:none !important; background:none !important; }
269
  ul.UL_mp3j li:before { content:none !important; }
270
- ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:16px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; }
271
  ul.UL-MI_mp3j li:before { content:none !important; }
272
  ul.UL-MI_mp3j.mp3j_widgetmods li { font-size:10px !important; line-height:14px !important; }
273
 
@@ -280,8 +280,47 @@
280
 
281
 
282
 
283
-
 
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
 
286
 
287
  /*-------------------------
@@ -566,10 +605,10 @@
566
 
567
  /* ===== wtransbars ==== */
568
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
569
- .wtransbars div.poscolMI_mp3j { background:#fff url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
570
  .wtransbars div.player-track-title { color:#fff; }
571
 
572
  /* ===== btransbars ==== */
573
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
574
- .btransbars div.poscolMI_mp3j { background:#000 url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
575
  .btransbars div.player-track-title { color:#000; }
265
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important;
266
  /* background */
267
  }
268
+ ul.UL_mp3j li { margin:0px !important; padding:0px 0px 0px 15px !important; background:none !important; }
269
  ul.UL_mp3j li:before { content:none !important; }
270
+ ul.UL-MI_mp3j li { margin:0px !important; list-style-type:none !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:16px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; }
271
  ul.UL-MI_mp3j li:before { content:none !important; }
272
  ul.UL-MI_mp3j.mp3j_widgetmods li { font-size:10px !important; line-height:14px !important; }
273
 
280
 
281
 
282
 
283
+ /* FORCED DOWNLOAD FRAME
284
+ ------------------------ */
285
 
286
+ div.mp3j-dlframe, iframe.mp3j-dlframe {
287
+ border:0px solid #ddd;
288
+ width:1px;
289
+ height:1px;
290
+ overflow:hidden;
291
+ margin:0;
292
+ padding:0;
293
+ display:none !important;
294
+ }
295
+
296
+ /* MESSAGES */
297
+ div.mp3j-finfo {
298
+ position:absolute;
299
+ top:36px;
300
+ z-index:9999 !important;
301
+ width:80%;
302
+ left:10%;
303
+ -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;
304
+ background:url('images/fdloadW-x.png') repeat-x left top;
305
+ -webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
306
+ padding:0;
307
+ min-height:31px;
308
+ overflow:hidden;
309
+ min-width:170px;
310
+ }
311
+
312
+ div.mp3j-finfo * { font-family:Arial, Helvetica, sans-serif !important; }
313
+ div.mp3j-finfo-sleeve { position:relative !important; width:100%; height:100%; }
314
+ div.mp3j-finfo-gif { position:absolute !important; top:0; left:0; right:10%; bottom:0; background:url('images/loader.gif') no-repeat center 37px; width:auto; padding:0px; height:100%; }
315
+ div.mp3j-finfo-txt { position:relative !important; margin:0px 15px 0 15px !important; padding:10px 0 10px 0 !important; width:auto; }
316
+ div.mp3j-finfo-close { position:absolute !important; width:31px !important; height:27px !important; padding-top:5px !important; right:0 !important; top:0 !important; text-align:center !important; font-weight:700 !important; font-size:18px !important; line-height:22px !important; color:#aaa !important; border-bottom:1px solid #ccc !important; border-left:1px solid #ccc !important; background:url('images/t40w.png') repeat left top !important; }
317
+ div.mp3j-finfo-close:hover { color:#888 !important; }
318
+
319
+ div.mp3j-finfo-txt h2 { font-size:15px !important; color:#333 !important; margin:0 0 10px 0 !important; }
320
+ div.mp3j-finfo-txt h3 { font-size:14px !important; color:#333 !important; margin:0 0 15px 0 !important; }
321
+ div.mp3j-finfo-txt p { font-size:11px !important; color:#555 !important; line-height:13px !important; margin:0 0 5px 0 !important; }
322
+ div.mp3j-finfo-txt a { }
323
+
324
 
325
 
326
  /*-------------------------
605
 
606
  /* ===== wtransbars ==== */
607
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
608
+ .wtransbars div.poscolMI_mp3j { background:#fff url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
609
  .wtransbars div.player-track-title { color:#fff; }
610
 
611
  /* ===== btransbars ==== */
612
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
613
+ .btransbars div.poscolMI_mp3j { background:#000 url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
614
  .btransbars div.player-track-title { color:#000; }
css/players-1-8-dark.css CHANGED
@@ -29,7 +29,7 @@
29
  div.playlist-colour { position:absolute; width:100%; height:100%; left:0px; top:0px; /* background set from admin */ /* opacity set from admin */ }
30
  div.playlist-wrap-MI ul { position:static; }
31
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important; /* background */ }
32
- ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:15px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; }
33
  ul.UL-MI_mp3j li:before { content:none !important; }
34
  ul.UL-MI_mp3j li a { font-size:11px !important; border:0 !important; line-height:15px !important; font-weight:500 !important; text-decoration:none !important; display:block !important; width:auto !important; font-family:'verdana', 'Lucida Grande', 'arial', sans-serif !important; outline:none !important; padding:6px 0px 6px 14px !important; }
35
 
@@ -129,6 +129,50 @@
129
  div.posbarMI_mp3j .ui-slider-handle:hover { background:none; z-index:100; }
130
 
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /* backwards compat
133
  ------------------- */
134
  div.player-track-title.mp3j_widgetmods { font-size: 11px; top: 7px; left:5px; }
@@ -200,6 +244,14 @@
200
  .silver div.playlist-toggle-MI:hover { background:#c6c6c6; color:#777; }
201
  .silver .MI-image img { background-color:#bbb; }
202
 
 
 
 
 
 
 
 
 
203
 
204
  /* ===== "text" ===== */
205
  div.wrap-MI.text { /*min-width:300px;*/ }
@@ -436,7 +488,7 @@
436
 
437
 
438
  /* ===== "smaller" ===== */
439
- .smaller div.player-track-title { font:normal normal 500 11px/13px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; left:3px; right:5px; }
440
  .smaller div.player-track-title span { font:normal normal 500 10px/10px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; padding:0; }
441
  .smaller ul.UL-MI_mp3j li a, .smaller ul.UL-MI_mp3j li { font-size:10px !important; font-family:'verdana', Helvetica, sans-serif !important; line-height:13px !important; }
442
 
@@ -460,12 +512,12 @@
460
 
461
  /* ===== wtransbars ==== */
462
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
463
- .wtransbars div.poscolMI_mp3j { background:#fff url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
464
  .wtransbars div.player-track-title { color:#fff; }
465
 
466
  /* ===== btransbars ==== */
467
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
468
- .btransbars div.poscolMI_mp3j { background:#000 url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
469
  .btransbars div.player-track-title { color:#000; }
470
 
471
 
29
  div.playlist-colour { position:absolute; width:100%; height:100%; left:0px; top:0px; /* background set from admin */ /* opacity set from admin */ }
30
  div.playlist-wrap-MI ul { position:static; }
31
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important; /* background */ }
32
+ ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:15px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; list-style-type:none !important; }
33
  ul.UL-MI_mp3j li:before { content:none !important; }
34
  ul.UL-MI_mp3j li a { font-size:11px !important; border:0 !important; line-height:15px !important; font-weight:500 !important; text-decoration:none !important; display:block !important; width:auto !important; font-family:'verdana', 'Lucida Grande', 'arial', sans-serif !important; outline:none !important; padding:6px 0px 6px 14px !important; }
35
 
129
  div.posbarMI_mp3j .ui-slider-handle:hover { background:none; z-index:100; }
130
 
131
 
132
+
133
+ /* FORCED DOWNLOAD FRAME
134
+ ------------------------ */
135
+ div.mp3j-dlframe, iframe.mp3j-dlframe {
136
+ border:0px solid #ddd;
137
+ width:1px;
138
+ height:1px;
139
+ overflow:hidden;
140
+ margin:0;
141
+ padding:0;
142
+ display:none !important;
143
+ }
144
+
145
+ /* MESSAGES */
146
+ div.mp3j-finfo {
147
+ position:absolute !important;
148
+ top:36px;
149
+ z-index:9999;
150
+ width:80%;
151
+ left:10%;
152
+ -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;
153
+ background:url('images/fdloadB-x.png') repeat-x left top;
154
+ -webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
155
+ padding:0;
156
+ min-height:31px;
157
+ overflow:hidden;
158
+ min-width:170px;
159
+ }
160
+
161
+ div.mp3j-finfo * { font-family:Arial, Helvetica, sans-serif !important; }
162
+ div.mp3j-finfo-sleeve { position:relative !important; width:100%; height:100%; }
163
+ div.mp3j-finfo-gif { position:absolute !important; top:0; left:0; right:10%; bottom:0; background:url('images/loader-w2.gif') no-repeat center 37px; width:auto; padding:0px !important; height:100%; }
164
+ div.mp3j-finfo-txt { position:relative !important; margin:0px 15px 0 15px !important; padding:10px 0 10px 0 !important; width:auto; }
165
+ div.mp3j-finfo-close { position:absolute !important; width:31px !important; height:27px !important; padding-top:5px !important; right:0 !important; top:0 !important; text-align:center !important; font-weight:700 !important; font-size:18px !important; line-height:22px !important; color:#999 !important; border-bottom:1px solid #777 !important; border-left:1px solid #777 !important; background:url('images/t40b.png') repeat left top; }
166
+ div.mp3j-finfo-close:hover { color:#eee !important; }
167
+
168
+ div.mp3j-finfo-txt h2 { font-size:15px !important; color:#fff !important; margin:0 0 10px 0 !important; }
169
+ div.mp3j-finfo-txt h3 { font-size:14px !important; color:#fff !important; margin:0 0 15px 0 !important; }
170
+ div.mp3j-finfo-txt p { font-size:11px !important; color:#fff !important; line-height:13px !important; margin:0 0 5px 0 !important; }
171
+ div.mp3j-finfo-txt a { }
172
+
173
+
174
+
175
+
176
  /* backwards compat
177
  ------------------- */
178
  div.player-track-title.mp3j_widgetmods { font-size: 11px; top: 7px; left:5px; }
244
  .silver div.playlist-toggle-MI:hover { background:#c6c6c6; color:#777; }
245
  .silver .MI-image img { background-color:#bbb; }
246
 
247
+ .silver div.mp3j-finfo { background:url('images/fdloadW-x.png') repeat-x left top; }
248
+ .silver div.mp3j-finfo-gif { background:url('images/loader.gif') no-repeat center 37px; }
249
+ .silver div.mp3j-finfo-close { color:#aaa !important; border-bottom:1px solid #ccc !important; border-left:1px solid #ccc !important; background:url('images/t40w.png') repeat left top !important; }
250
+ .silver div.mp3j-finfo-close:hover { color:#888 !important; }
251
+ .silver div.mp3j-finfo-txt h2 { color:#333 !important; }
252
+ .silver div.mp3j-finfo-txt h3 { color:#333 !important; }
253
+ .silver div.mp3j-finfo-txt p { color:#555 !important; }
254
+
255
 
256
  /* ===== "text" ===== */
257
  div.wrap-MI.text { /*min-width:300px;*/ }
488
 
489
 
490
  /* ===== "smaller" ===== */
491
+ .smaller div.player-track-title { font:normal normal 500 11px/13px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; left:5px; right:5px; }
492
  .smaller div.player-track-title span { font:normal normal 500 10px/10px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; padding:0; }
493
  .smaller ul.UL-MI_mp3j li a, .smaller ul.UL-MI_mp3j li { font-size:10px !important; font-family:'verdana', Helvetica, sans-serif !important; line-height:13px !important; }
494
 
512
 
513
  /* ===== wtransbars ==== */
514
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
515
+ .wtransbars div.poscolMI_mp3j { background:#fff url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
516
  .wtransbars div.player-track-title { color:#fff; }
517
 
518
  /* ===== btransbars ==== */
519
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
520
+ .btransbars div.poscolMI_mp3j { background:#000 url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
521
  .btransbars div.player-track-title { color:#000; }
522
 
523
 
css/players-1-8-silver.css CHANGED
@@ -29,7 +29,7 @@
29
  div.playlist-colour { position:absolute; width:100%; height:100%; left:0px; top:0px; /* background set from admin */ /* opacity set from admin */ }
30
  div.playlist-wrap-MI ul { position:static; }
31
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important; /* background set from admin */ }
32
- ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:15px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; }
33
  ul.UL-MI_mp3j li:before { content:none !important; }
34
  ul.UL-MI_mp3j li a { font-size:11px !important; border:0 !important; line-height:15px !important; font-weight:500 !important; text-decoration:none !important; display:block !important; width:auto !important; font-family:'verdana', 'Lucida Grande', 'arial', sans-serif !important; outline:none !important; padding:6px 0px 6px 14px !important; }
35
 
@@ -129,6 +129,48 @@
129
  div.posbarMI_mp3j .ui-slider-handle:hover { background:none; z-index:100; }
130
 
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /* backwards compat
133
  ------------------- */
134
  div.player-track-title.mp3j_widgetmods { font-size: 11px; top: 7px; left:5px; }
@@ -204,6 +246,15 @@
204
  .dark div.playlist-toggle-MI:hover { background:#585858; color:#aaa; }
205
  .dark .MI-image img { background-color:#777; }
206
 
 
 
 
 
 
 
 
 
 
207
  /* ===== "text" ===== */
208
  div.wrap-MI.text { /*min-width:300px;*/ }
209
  .text div.innerx, .text div.innerleft, .text div.innerright { position: absolute; visibility: hidden; }
@@ -462,8 +513,8 @@
462
  .bigger5.bl .vol_mp3j .ui-slider-handle:hover, .bigger5.bl .vol_mp3t .ui-slider-handle:hover { background:url('images/volhandle-dark2-b.png') no-repeat -257px bottom; }
463
 
464
 
465
- /* ===== "smaller" ===== */
466
- .smaller div.player-track-title { font:normal normal 500 11px/13px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; left:3px; right:5px; }
467
  .smaller div.player-track-title span { font:normal normal 500 10px/10px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; padding:0; }
468
  .smaller ul.UL-MI_mp3j li a, .smaller ul.UL-MI_mp3j li { font-size:10px !important; font-family:'verdana', Helvetica, sans-serif !important; line-height:13px !important; }
469
 
@@ -489,11 +540,23 @@
489
 
490
  /* ===== wtransbars ==== */
491
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
492
- .wtransbars div.poscolMI_mp3j { background:#fff url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
493
  .wtransbars div.player-track-title { color:#fff; }
494
 
495
  /* ===== btransbars ==== */
496
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
497
- .btransbars div.poscolMI_mp3j { background:#000 url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
498
  .btransbars div.player-track-title { color:#000; }
499
-
 
 
 
 
 
 
 
 
 
 
 
 
29
  div.playlist-colour { position:absolute; width:100%; height:100%; left:0px; top:0px; /* background set from admin */ /* opacity set from admin */ }
30
  div.playlist-wrap-MI ul { position:static; }
31
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important; /* background set from admin */ }
32
+ ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:15px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; list-style-type:none !important; }
33
  ul.UL-MI_mp3j li:before { content:none !important; }
34
  ul.UL-MI_mp3j li a { font-size:11px !important; border:0 !important; line-height:15px !important; font-weight:500 !important; text-decoration:none !important; display:block !important; width:auto !important; font-family:'verdana', 'Lucida Grande', 'arial', sans-serif !important; outline:none !important; padding:6px 0px 6px 14px !important; }
35
 
129
  div.posbarMI_mp3j .ui-slider-handle:hover { background:none; z-index:100; }
130
 
131
 
132
+ /* FORCED DOWNLOAD FRAME
133
+ ------------------------ */
134
+
135
+ div.mp3j-dlframe, iframe.mp3j-dlframe {
136
+ border:0px solid #ddd;
137
+ width:1px;
138
+ height:1px;
139
+ overflow:hidden;
140
+ margin:0;
141
+ padding:0;
142
+ display:none !important;
143
+ }
144
+
145
+ /* MESSAGES */
146
+ div.mp3j-finfo {
147
+ position:absolute;
148
+ top:36px;
149
+ z-index:9999 !important;
150
+ width:80%;
151
+ left:10%;
152
+ -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;
153
+ background:url('images/fdloadW-x.png') repeat-x left top;
154
+ -webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
155
+ padding:0;
156
+ min-height:31px;
157
+ overflow:hidden;
158
+ min-width:170px;
159
+ }
160
+
161
+ div.mp3j-finfo * { font-family:Arial, Helvetica, sans-serif !important; }
162
+ div.mp3j-finfo-sleeve { position:relative !important; width:100%; height:100%; }
163
+ div.mp3j-finfo-gif { position:absolute !important; top:0; left:0; right:10%; bottom:0; background:url('images/loader.gif') no-repeat center 37px; width:auto; padding:0px; height:100%; }
164
+ div.mp3j-finfo-txt { position:relative !important; margin:0px 15px 0 15px !important; padding:10px 0 10px 0 !important; width:auto; }
165
+ div.mp3j-finfo-close { position:absolute !important; width:31px !important; height:27px !important; padding-top:5px !important; right:0 !important; top:0 !important; text-align:center !important; font-weight:700 !important; font-size:18px !important; line-height:22px !important; color:#aaa !important; border-bottom:1px solid #ccc !important; border-left:1px solid #ccc !important; background:url('images/t40w.png') repeat left top !important; }
166
+ div.mp3j-finfo-close:hover { color:#888 !important; }
167
+
168
+ div.mp3j-finfo-txt h2 { font-size:15px !important; color:#333 !important; margin:0 0 10px 0 !important; }
169
+ div.mp3j-finfo-txt h3 { font-size:14px !important; color:#333 !important; margin:0 0 15px 0 !important; }
170
+ div.mp3j-finfo-txt p { font-size:11px !important; color:#555 !important; line-height:13px !important; margin:0 0 5px 0; }
171
+ div.mp3j-finfo-txt a { }
172
+
173
+
174
  /* backwards compat
175
  ------------------- */
176
  div.player-track-title.mp3j_widgetmods { font-size: 11px; top: 7px; left:5px; }
246
  .dark div.playlist-toggle-MI:hover { background:#585858; color:#aaa; }
247
  .dark .MI-image img { background-color:#777; }
248
 
249
+ .dark div.mp3j-finfo { background:url('images/fdloadB-x.png') repeat-x left top; }
250
+ .dark div.mp3j-finfo-gif { background:url('images/loader-w2.gif') no-repeat center 37px; }
251
+ .dark div.mp3j-finfo-close { color:#999 !important; border-bottom:1px solid #777 !important; border-left:1px solid #777 !important; background:url('images/t40b.png') repeat left top !important; }
252
+ .dark div.mp3j-finfo-close:hover { color:#eee !important; }
253
+ .dark div.mp3j-finfo-txt h2 { color:#fff !important; }
254
+ .dark div.mp3j-finfo-txt h3 { color:#fff !important; }
255
+ .dark div.mp3j-finfo-txt p { color:#fff !important; }
256
+
257
+
258
  /* ===== "text" ===== */
259
  div.wrap-MI.text { /*min-width:300px;*/ }
260
  .text div.innerx, .text div.innerleft, .text div.innerright { position: absolute; visibility: hidden; }
513
  .bigger5.bl .vol_mp3j .ui-slider-handle:hover, .bigger5.bl .vol_mp3t .ui-slider-handle:hover { background:url('images/volhandle-dark2-b.png') no-repeat -257px bottom; }
514
 
515
 
516
+ /* ===== smaller ===== */
517
+ .smaller div.player-track-title { font:normal normal 500 11px/13px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; left:5px; right:5px; }
518
  .smaller div.player-track-title span { font:normal normal 500 10px/10px 'verdana', 'Lucida Grande', 'arial', sans-serif !important; padding:0; }
519
  .smaller ul.UL-MI_mp3j li a, .smaller ul.UL-MI_mp3j li { font-size:10px !important; font-family:'verdana', Helvetica, sans-serif !important; line-height:13px !important; }
520
 
540
 
541
  /* ===== wtransbars ==== */
542
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
543
+ .wtransbars div.poscolMI_mp3j { background:#fff url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
544
  .wtransbars div.player-track-title { color:#fff; }
545
 
546
  /* ===== btransbars ==== */
547
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
548
+ .btransbars div.poscolMI_mp3j { background:#000 url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
549
  .btransbars div.player-track-title { color:#000; }
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
css/players-1-8-text.css CHANGED
@@ -29,7 +29,7 @@
29
  div.playlist-colour { position:absolute; width:100%; height:100%; left:0px; top:0px; /* background set from admin */ /* opacity set from admin */ }
30
  div.playlist-wrap-MI ul { position:static; }
31
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important; /* background */ }
32
- ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; font-weight:500 !important; line-height:15px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; }
33
  ul.UL-MI_mp3j li:before { content:none !important; }
34
  ul.UL-MI_mp3j li a { font-size:11px !important; border:0 !important; line-height:15px !important; font-weight:500 !important; text-decoration:none !important; display:block !important; width:auto !important; font-family:'verdana', 'Lucida Grande', 'arial', sans-serif !important; outline:none !important; padding:6px 0px 6px 14px !important; }
35
 
@@ -167,6 +167,51 @@
167
 
168
 
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  /* backwards compat
171
  ------------------- */
172
  div.player-track-title.mp3j_widgetmods { font-size: 14px; }
@@ -434,12 +479,12 @@
434
 
435
  /* ===== wtransbars ==== */
436
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
437
- .wtransbars div.poscolMI_mp3j { background:#fff url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
438
  .wtransbars div.player-track-title { color:#fff; }
439
 
440
  /* ===== btransbars ==== */
441
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
442
- .btransbars div.poscolMI_mp3j { background:#000 url('http://sjward.org/wp-content/plugins/mp3-jplayer/css/images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
443
  .btransbars div.player-track-title { color:#000; }
444
 
445
 
29
  div.playlist-colour { position:absolute; width:100%; height:100%; left:0px; top:0px; /* background set from admin */ /* opacity set from admin */ }
30
  div.playlist-wrap-MI ul { position:static; }
31
  ul.UL-MI_mp3j { margin:0px !important; padding:0px 0px 0px 0px !important; list-style-type:none !important; list-style:none !important; list-style-image:none !important; font-weight: 500 !important; /* background */ }
32
+ ul.UL-MI_mp3j li { margin:0px !important; padding:0px 0px 1px 0px !important; list-style-type:none !important; font-weight:500 !important; line-height:15px !important; letter-spacing:0px !important; font-size:11px !important; word-spacing:0px !important; margin:0px 1px 0px 1px !important; }
33
  ul.UL-MI_mp3j li:before { content:none !important; }
34
  ul.UL-MI_mp3j li a { font-size:11px !important; border:0 !important; line-height:15px !important; font-weight:500 !important; text-decoration:none !important; display:block !important; width:auto !important; font-family:'verdana', 'Lucida Grande', 'arial', sans-serif !important; outline:none !important; padding:6px 0px 6px 14px !important; }
35
 
167
 
168
 
169
 
170
+ /* FORCED DOWNLOAD FRAME
171
+ ------------------------ */
172
+
173
+ div.mp3j-dlframe, iframe.mp3j-dlframe {
174
+ border:0px solid #ddd;
175
+ width:1px;
176
+ height:1px;
177
+ overflow:hidden;
178
+ margin:0;
179
+ padding:0;
180
+ display:none !important;
181
+ }
182
+
183
+ /* MESSAGES */
184
+ div.mp3j-finfo {
185
+ position:absolute;
186
+ top:36px;
187
+ z-index:9999 !important;
188
+ width:80%;
189
+ left:10%;
190
+ -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;
191
+ background:url('images/fdloadW-x.png') repeat-x left top;
192
+ -webkit-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); -moz-box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35); box-shadow:0px 1px 4px rgba(0, 0, 0, 0.35);
193
+ padding:0;
194
+ min-height:31px;
195
+ overflow:hidden;
196
+ min-width:170px;
197
+ }
198
+
199
+ div.mp3j-finfo * { font-family:Arial, Helvetica, sans-serif !important; }
200
+ div.mp3j-finfo-sleeve { position:relative !important; width:100%; height:100%; }
201
+ div.mp3j-finfo-gif { position:absolute !important; top:0; left:0; right:10%; bottom:0; background:url('images/loader.gif') no-repeat center 37px; width:auto; padding:0px; height:100%; }
202
+ div.mp3j-finfo-txt { position:relative !important; margin:0px 15px 0 15px !important; padding:10px 0 10px 0 !important; width:auto; }
203
+ div.mp3j-finfo-close { position:absolute !important; width:31px !important; height:27px !important; padding-top:5px !important; right:0 !important; top:0 !important; text-align:center !important; font-weight:700 !important; font-size:18px !important; line-height:22px !important; color:#aaa !important; border-bottom:1px solid #ccc !important; border-left:1px solid #ccc !important; background:url('images/t40w.png') repeat left top !important; }
204
+ div.mp3j-finfo-close:hover { color:#888 !important; }
205
+
206
+ div.mp3j-finfo-txt h2 { font-size:15px !important; color:#333 !important; margin:0 0 10px 0 !important; }
207
+ div.mp3j-finfo-txt h3 { font-size:14px !important; color:#333 !important; margin:0 0 15px 0 !important; }
208
+ div.mp3j-finfo-txt p { font-size:11px !important; color:#555 !important; line-height:13px !important; margin:0 0 5px 0 !important; }
209
+ div.mp3j-finfo-txt a { }
210
+
211
+
212
+
213
+
214
+
215
  /* backwards compat
216
  ------------------- */
217
  div.player-track-title.mp3j_widgetmods { font-size: 14px; }
479
 
480
  /* ===== wtransbars ==== */
481
  .wtransbars div.loadMI_mp3j { background:#fff; opacity:0.1; filter:alpha(opacity=10); }
482
+ .wtransbars div.poscolMI_mp3j { background:#fff url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
483
  .wtransbars div.player-track-title { color:#fff; }
484
 
485
  /* ===== btransbars ==== */
486
  .btransbars div.loadMI_mp3j { background:#000; opacity:0.1; filter:alpha(opacity=10); }
487
+ .btransbars div.poscolMI_mp3j { background:#000 url('images/posbar-soften-tipped-2.png') repeat-y right top; opacity:0.15; filter:alpha(opacity=15); }
488
  .btransbars div.player-track-title { color:#000; }
489
 
490
 
download.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ MP3-jPlayer 1.8.3
4
+ www.sjward.org
5
+ */
6
+
7
+ $mp3 = false;
8
+ $playerID = "";
9
+ $fp = "";
10
+ $file = "";
11
+ $dbug = "";
12
+ $sent = "";
13
+ $pagetext = '';
14
+ $js_pagetext = '';
15
+ $rooturl = preg_replace("/^www\./i", "", $_SERVER['HTTP_HOST']);
16
+
17
+ if ( isset($_GET['mp3']) ) {
18
+
19
+ $mp3 = strip_tags($_GET['mp3']);
20
+ $playerID = ( isset($_GET['pID']) ) ? strip_tags($_GET['pID']) : "";
21
+
22
+ if ( preg_match("!\.mp3$!i", $mp3) ) {
23
+
24
+ $sent = substr($mp3, 3);
25
+ $file = substr(strrchr($sent, "/"), 1);
26
+
27
+ if ( ($lp = strpos($sent, $rooturl)) || preg_match("!^/!", $sent) ) { //if local
28
+
29
+ if ( $lp !== false ) { //url
30
+
31
+ $fp = str_replace($rooturl, "", $sent);
32
+ $fp = str_replace("www.", "", $fp);
33
+ $fp = str_replace("http://", "", $fp);
34
+ $fp = str_replace("https://", "", $fp);
35
+
36
+ } else { //folder path
37
+
38
+ $fp = $sent;
39
+ }
40
+
41
+ if ( ($fsize = @filesize($_SERVER['DOCUMENT_ROOT'] . $fp)) !== false ) { //if file can be read then set headers and cookie
42
+
43
+ $cookiename = 'mp3Download' . $playerID;
44
+ setcookie($cookiename, "true", 0, '/', '', '', false);
45
+ header('Accept-Ranges: bytes'); // download resume
46
+ header('Content-Disposition: attachment; filename=' . $file);
47
+ header('Content-Type: audio/mpeg');
48
+ header('Content-Length: ' . $fsize);
49
+
50
+ readfile($_SERVER['DOCUMENT_ROOT'] . $fp);
51
+
52
+
53
+ $dbug .= "#read failed"; //if past readfile() then something went wrong
54
+
55
+ } else {
56
+
57
+ $dbug .= "#no file";
58
+ }
59
+
60
+ } else {
61
+
62
+ $dbug .= "#unreadable";
63
+ }
64
+
65
+ } else {
66
+
67
+ $dbug .= "#not an mp3";
68
+ }
69
+
70
+ } else {
71
+
72
+ $dbug .= "#no get param";
73
+ }
74
+
75
+ ?>
76
+ <!DOCTYPE html>
77
+ <html>
78
+ <head>
79
+ <title>Download MP3</title>
80
+ </head>
81
+ <body>
82
+
83
+ <?php
84
+ echo $js_pagetext;
85
+ $info = "<p>
86
+ Get: " . $_GET['mp3'] . "<br />
87
+ Sent: " . $sent . "<br />
88
+ File: " . $file . "<br />
89
+ Open: " . $_SERVER['DOCUMENT_ROOT'] . $fp . "<br />
90
+ Root: " . $rooturl . "<br />
91
+ pID: " . $playerID . "<br />
92
+ Dbug: " . $dbug . "<br /></p>";
93
+ echo $info;
94
+
95
+ if ( $playerID != "" ) {
96
+ ?>
97
+
98
+ <script type="text/javascript">
99
+ if ( typeof window.parent.MP3_JPLAYER.dl_dialogs !== 'undefined' ) {
100
+ window.parent.MP3_JPLAYER.dl_dialogs[<?php echo $playerID; ?>] = window.parent.MP3_JPLAYER.vars.message_fail;
101
+ }
102
+ </script>
103
+
104
+ <?php
105
+ }
106
+ ?>
107
+
108
+ </body>
109
+ </html>
js/Jplayer.swf CHANGED
Binary file
js/jquery.jplayer.min.js CHANGED
@@ -1,45 +1,97 @@
1
  /*
2
  * jPlayer Plugin for jQuery JavaScript Library
3
- * http://www.happyworm.com/jquery/jplayer
4
  *
5
- * Copyright (c) 2009 - 2010 Happyworm Ltd
6
  * Dual licensed under the MIT and GPL licenses.
7
  * - http://www.opensource.org/licenses/mit-license.php
8
  * - http://www.gnu.org/copyleft/gpl.html
9
  *
10
  * Author: Mark J Panaghiston
11
- * Version: 1.2.0
12
- * Date: 11th July 2010
13
  */
14
 
15
- (function(c){function k(a,b){var d=function(e){e=c[a][e]||[];return typeof e=="string"?e.split(/,?\s+/):e}("getter");return c.inArray(b,d)!=-1}c.fn.jPlayer=function(a){var b=typeof a=="string",d=Array.prototype.slice.call(arguments,1);if(b&&a.substring(0,1)=="_")return this;if(b&&k("jPlayer",a,d)){var e=c.data(this[0],"jPlayer");return e?e[a].apply(e,d):undefined}return this.each(function(){var h=c.data(this,"jPlayer");!h&&!b&&c.data(this,"jPlayer",new c.jPlayer(this,a))._init();h&&b&&c.isFunction(h[a])&&
16
- h[a].apply(h,d)})};c.jPlayer=function(a,b){this.options=c.extend({},b);this.element=c(a)};c.jPlayer.getter="jPlayerOnProgressChange jPlayerOnSoundComplete jPlayerVolume jPlayerReady getData jPlayerController";c.jPlayer.defaults={cssPrefix:"jqjp",swfPath:"js",volume:80,oggSupport:false,nativeSupport:true,preload:"none",customCssIds:false,graphicsFix:true,errorAlerts:false,warningAlerts:false,position:"absolute",width:"0",height:"0",top:"0",left:"0",quality:"high",bgcolor:"#ffffff"};c.jPlayer._config=
17
- {version:"1.2.0",swfVersionRequired:"1.2.0",swfVersion:"unknown",jPlayerControllerId:undefined,delayedCommandId:undefined,isWaitingForPlay:false,isFileSet:false};c.jPlayer._diag={isPlaying:false,src:"",loadPercent:0,playedPercentRelative:0,playedPercentAbsolute:0,playedTime:0,totalTime:0};c.jPlayer._cssId={play:"jplayer_play",pause:"jplayer_pause",stop:"jplayer_stop",loadBar:"jplayer_load_bar",playBar:"jplayer_play_bar",volumeMin:"jplayer_volume_min",volumeMax:"jplayer_volume_max",volumeBar:"jplayer_volume_bar",
18
- volumeBarValue:"jplayer_volume_bar_value"};c.jPlayer.count=0;c.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};c.jPlayer.convertTime=function(a){var b=new Date(a),d=b.getUTCHours();a=b.getUTCMinutes();b=b.getUTCSeconds();d=c.jPlayer.timeFormat.padHour&&d<10?"0"+d:d;a=c.jPlayer.timeFormat.padMin&&a<10?"0"+a:a;b=c.jPlayer.timeFormat.padSec&&b<10?"0"+b:b;return(c.jPlayer.timeFormat.showHour?d+c.jPlayer.timeFormat.sepHour:
19
- "")+(c.jPlayer.timeFormat.showMin?a+c.jPlayer.timeFormat.sepMin:"")+(c.jPlayer.timeFormat.showSec?b+c.jPlayer.timeFormat.sepSec:"")};c.jPlayer.prototype={_init:function(){var a=this,b=this.element;this.config=c.extend({},c.jPlayer.defaults,this.options,c.jPlayer._config);this.config.diag=c.extend({},c.jPlayer._diag);this.config.cssId={};this.config.cssSelector={};this.config.cssDisplay={};this.config.clickHandler={};this.element.data("jPlayer.config",this.config);c.extend(this.config,{id:this.element.attr("id"),
20
- swf:this.config.swfPath+(this.config.swfPath!=""&&this.config.swfPath.slice(-1)!="/"?"/":"")+"Jplayer.swf",fid:this.config.cssPrefix+"_flash_"+c.jPlayer.count,aid:this.config.cssPrefix+"_audio_"+c.jPlayer.count,hid:this.config.cssPrefix+"_force_"+c.jPlayer.count,i:c.jPlayer.count,volume:this._limitValue(this.config.volume,0,100),autobuffer:this.config.preload!="none"});c.jPlayer.count++;if(this.config.ready!=undefined)if(c.isFunction(this.config.ready))this.jPlayerReadyCustom=this.config.ready;else this._warning("Constructor's ready option is not a function.");
21
- this.config.audio=document.createElement("audio");this.config.audio.id=this.config.aid;c.extend(this.config,{canPlayMP3:!!(this.config.audio.canPlayType?""!=this.config.audio.canPlayType("audio/mpeg")&&"no"!=this.config.audio.canPlayType("audio/mpeg"):false),canPlayOGG:!!(this.config.audio.canPlayType?""!=this.config.audio.canPlayType("audio/ogg")&&"no"!=this.config.audio.canPlayType("audio/ogg"):false),aSel:c("#"+this.config.aid)});c.extend(this.config,{html5:!!(this.config.oggSupport?this.config.canPlayOGG?
22
- true:this.config.canPlayMP3:this.config.canPlayMP3)});c.extend(this.config,{usingFlash:!(this.config.html5&&this.config.nativeSupport),usingMP3:!(this.config.oggSupport&&this.config.canPlayOGG&&this.config.nativeSupport)});var d={setButtons:function(g,f){a.config.diag.isPlaying=f;if(a.config.cssId.play!=undefined&&a.config.cssId.pause!=undefined)if(f){a.config.cssSelector.play.css("display","none");a.config.cssSelector.pause.css("display",a.config.cssDisplay.pause)}else{a.config.cssSelector.play.css("display",
23
- a.config.cssDisplay.play);a.config.cssSelector.pause.css("display","none")}if(f)a.config.isWaitingForPlay=false}},e={setFile:function(g,f){try{a._getMovie().fl_setFile_mp3(f);a.config.autobuffer&&b.trigger("jPlayer.load");a.config.diag.src=f;a.config.isFileSet=true;b.trigger("jPlayer.setButtons",false)}catch(j){a._flashError(j)}},clearFile:function(){try{b.trigger("jPlayer.setButtons",false);a._getMovie().fl_clearFile_mp3();a.config.diag.src="";a.config.isFileSet=false}catch(g){a._flashError(g)}},
24
- load:function(){try{a._getMovie().fl_load_mp3()}catch(g){a._flashError(g)}},play:function(){try{a._getMovie().fl_play_mp3()&&b.trigger("jPlayer.setButtons",true)}catch(g){a._flashError(g)}},pause:function(){try{a._getMovie().fl_pause_mp3()&&b.trigger("jPlayer.setButtons",false)}catch(g){a._flashError(g)}},stop:function(){try{a._getMovie().fl_stop_mp3()&&b.trigger("jPlayer.setButtons",false)}catch(g){a._flashError(g)}},playHead:function(g,f){try{a._getMovie().fl_play_head_mp3(f)&&b.trigger("jPlayer.setButtons",
25
- true)}catch(j){a._flashError(j)}},playHeadTime:function(g,f){try{a._getMovie().fl_play_head_time_mp3(f)&&b.trigger("jPlayer.setButtons",true)}catch(j){a._flashError(j)}},volume:function(g,f){a.config.volume=f;try{a._getMovie().fl_volume_mp3(f)}catch(j){a._flashError(j)}}},h={setFile:function(g,f,j){a.config.diag.src=a.config.usingMP3?f:j;a.config.isFileSet&&!a.config.isWaitingForPlay&&b.trigger("jPlayer.pause");a.config.audio.autobuffer=a.config.autobuffer;a.config.audio.preload=a.config.preload;
26
- if(a.config.autobuffer){a.config.audio.src=a.config.diag.src;a.config.audio.load()}else a.config.isWaitingForPlay=true;a.config.isFileSet=true;a.jPlayerOnProgressChange(0,0,0,0,0);clearInterval(a.config.jPlayerControllerId);if(a.config.autobuffer)a.config.jPlayerControllerId=window.setInterval(function(){a.jPlayerController(false)},100);clearInterval(a.config.delayedCommandId)},clearFile:function(){a.setFile("","");a.config.isWaitingForPlay=false;a.config.isFileSet=false},load:function(){if(a.config.isFileSet)if(a.config.isWaitingForPlay){a.config.audio.autobuffer=
27
- true;a.config.audio.preload="auto";a.config.audio.src=a.config.diag.src;a.config.audio.load();a.config.isWaitingForPlay=false;clearInterval(a.config.jPlayerControllerId);a.config.jPlayerControllerId=window.setInterval(function(){a.jPlayerController(false)},100)}},play:function(){if(a.config.isFileSet){if(a.config.isWaitingForPlay){a.config.audio.src=a.config.diag.src;a.config.audio.load()}a.config.audio.play();b.trigger("jPlayer.setButtons",true);clearInterval(a.config.jPlayerControllerId);a.config.jPlayerControllerId=
28
- window.setInterval(function(){a.jPlayerController(false)},100);clearInterval(a.config.delayedCommandId)}},pause:function(){if(a.config.isFileSet){a.config.audio.pause();b.trigger("jPlayer.setButtons",false);clearInterval(a.config.delayedCommandId)}},stop:function(){if(a.config.isFileSet)try{b.trigger("jPlayer.pause");a.config.audio.currentTime=0;clearInterval(a.config.jPlayerControllerId);a.config.jPlayerControllerId=window.setInterval(function(){a.jPlayerController(true)},100)}catch(g){clearInterval(a.config.delayedCommandId);
29
- a.config.delayedCommandId=window.setTimeout(function(){a.stop()},100)}},playHead:function(g,f){if(a.config.isFileSet)try{b.trigger("jPlayer.load");if(typeof a.config.audio.buffered=="object"&&a.config.audio.buffered.length>0)a.config.audio.currentTime=f*a.config.audio.buffered.end(a.config.audio.buffered.length-1)/100;else if(a.config.audio.duration>0&&!isNaN(a.config.audio.duration))a.config.audio.currentTime=f*a.config.audio.duration/100;else throw"e";b.trigger("jPlayer.play")}catch(j){b.trigger("jPlayer.play");
30
- b.trigger("jPlayer.pause");a.config.delayedCommandId=window.setTimeout(function(){a.playHead(f)},100)}},playHeadTime:function(g,f){if(a.config.isFileSet)try{b.trigger("jPlayer.load");a.config.audio.currentTime=f/1E3;b.trigger("jPlayer.play")}catch(j){b.trigger("jPlayer.play");b.trigger("jPlayer.pause");a.config.delayedCommandId=window.setTimeout(function(){a.playHeadTime(f)},100)}},volume:function(g,f){a.config.volume=f;a.config.audio.volume=f/100;a.jPlayerVolume(f)}};this.config.usingFlash?c.extend(d,
31
- e):c.extend(d,h);for(var i in d){e="jPlayer."+i;this.element.unbind(e);this.element.bind(e,d[i])}if(this.config.usingFlash)if(this._checkForFlash(8))if(c.browser.msie){i='<object id="'+this.config.fid+'"';i+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';i+=' codebase="'+document.URL.substring(0,document.URL.indexOf(":"))+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';i+=' type="application/x-shockwave-flash"';i+=' width="'+this.config.width+'" height="'+this.config.height+
32
- '">';i+="</object>";d=[];d[0]='<param name="movie" value="'+this.config.swf+'" />';d[1]='<param name="quality" value="high" />';d[2]='<param name="FlashVars" value="id='+escape(this.config.id)+"&fid="+escape(this.config.fid)+"&vol="+this.config.volume+'" />';d[3]='<param name="allowScriptAccess" value="always" />';d[4]='<param name="bgcolor" value="'+this.config.bgcolor+'" />';i=document.createElement(i);for(e=0;e<d.length;e++)i.appendChild(document.createElement(d[e]));this.element.html(i)}else{d=
33
- '<embed name="'+this.config.fid+'" id="'+this.config.fid+'" src="'+this.config.swf+'"';d+=' width="'+this.config.width+'" height="'+this.config.height+'" bgcolor="'+this.config.bgcolor+'"';d+=' quality="high" FlashVars="id='+escape(this.config.id)+"&fid="+escape(this.config.fid)+"&vol="+this.config.volume+'"';d+=' allowScriptAccess="always"';d+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.html(d)}else this.element.html("<p>Flash 8 or above is not installed. <a href='http://get.adobe.com/flashplayer'>Get Flash!</a></p>");
34
- else{this.config.audio.autobuffer=this.config.autobuffer;this.config.audio.preload=this.config.preload;this.config.audio.addEventListener("canplay",function(){var g=0.1*Math.random();a.config.audio.volume=(a.config.volume+(a.config.volume<50?g:-g))/100},false);this.config.audio.addEventListener("ended",function(){clearInterval(a.config.jPlayerControllerId);a.jPlayerOnSoundComplete()},false);this.element.append(this.config.audio)}this.element.css({position:this.config.position,top:this.config.top,
35
- left:this.config.left});if(this.config.graphicsFix){this.element.append('<div id="'+this.config.hid+'"></div>');c.extend(this.config,{hSel:c("#"+this.config.hid)});this.config.hSel.css({"text-indent":"-9999px"})}this.config.customCssIds||c.each(c.jPlayer._cssId,function(g,f){a.cssId(g,f)});if(!this.config.usingFlash){this.element.css({left:"-9999px"});window.setTimeout(function(){a.volume(a.config.volume);a.jPlayerReady()},100)}},jPlayerReady:function(a){if(this.config.usingFlash){this.config.swfVersion=
36
- a;this.config.swfVersionRequired!=this.config.swfVersion&&this._error("jPlayer's JavaScript / SWF version mismatch!\n\nJavaScript requires SWF : "+this.config.swfVersionRequired+"\nThe Jplayer.swf used is : "+this.config.swfVersion)}else this.config.swfVersion="n/a";this.jPlayerReadyCustom()},jPlayerReadyCustom:function(){},setFile:function(a,b){this.element.trigger("jPlayer.setFile",[a,b])},clearFile:function(){this.element.trigger("jPlayer.clearFile")},load:function(){this.element.trigger("jPlayer.load")},
37
- play:function(){this.element.trigger("jPlayer.play")},pause:function(){this.element.trigger("jPlayer.pause")},stop:function(){this.element.trigger("jPlayer.stop")},playHead:function(a){this.element.trigger("jPlayer.playHead",[a])},playHeadTime:function(a){this.element.trigger("jPlayer.playHeadTime",[a])},volume:function(a){a=this._limitValue(a,0,100);this.element.trigger("jPlayer.volume",[a])},cssId:function(a,b){var d=this;if(typeof b=="string")if(c.jPlayer._cssId[a]){this.config.cssId[a]!=undefined&&
38
- this.config.cssSelector[a].unbind("click",this.config.clickHandler[a]);this.config.cssId[a]=b;this.config.cssSelector[a]=c("#"+b);this.config.clickHandler[a]=function(h){d[a](h);c(this).blur();return false};this.config.cssSelector[a].click(this.config.clickHandler[a]);var e=this.config.cssSelector[a].css("display");if(a=="play")this.config.cssDisplay.pause=e;if(!(a=="pause"&&e=="none")){this.config.cssDisplay[a]=e;a=="pause"&&this.config.cssSelector[a].css("display","none")}}else this._warning("Unknown/Illegal function in cssId\n\njPlayer('cssId', '"+
39
- a+"', '"+b+"')");else this._warning("cssId CSS Id must be a string\n\njPlayer('cssId', '"+a+"', "+b+")")},loadBar:function(a){if(this.config.cssId.loadBar!=undefined){var b=this.config.cssSelector.loadBar.offset();a=a.pageX-b.left;b=this.config.cssSelector.loadBar.width();this.playHead(100*a/b)}},playBar:function(a){this.loadBar(a)},onProgressChange:function(a){if(c.isFunction(a))this.onProgressChangeCustom=a;else this._warning("onProgressChange parameter is not a function.")},onProgressChangeCustom:function(){},
40
- jPlayerOnProgressChange:function(a,b,d,e,h){this.config.diag.loadPercent=a;this.config.diag.playedPercentRelative=b;this.config.diag.playedPercentAbsolute=d;this.config.diag.playedTime=e;this.config.diag.totalTime=h;this.config.cssId.loadBar!=undefined&&this.config.cssSelector.loadBar.width(a+"%");this.config.cssId.playBar!=undefined&&this.config.cssSelector.playBar.width(b+"%");this.onProgressChangeCustom(a,b,d,e,h);this._forceUpdate()},jPlayerController:function(a){var b=0,d=0,e=0,h=0,i=0;if(this.config.audio.readyState>=
41
- 1){b=this.config.audio.currentTime*1E3;d=this.config.audio.duration*1E3;d=isNaN(d)?0:d;e=d>0?100*b/d:0;if(typeof this.config.audio.buffered=="object"&&this.config.audio.buffered.length>0){h=100*this.config.audio.buffered.end(this.config.audio.buffered.length-1)/this.config.audio.duration;i=100*this.config.audio.currentTime/this.config.audio.buffered.end(this.config.audio.buffered.length-1)}else{h=100;i=e}}!this.config.diag.isPlaying&&h>=100&&clearInterval(this.config.jPlayerControllerId);a?this.jPlayerOnProgressChange(h,
42
- 0,0,0,d):this.jPlayerOnProgressChange(h,i,e,b,d)},volumeMin:function(){this.volume(0)},volumeMax:function(){this.volume(100)},volumeBar:function(a){if(this.config.cssId.volumeBar!=undefined){var b=this.config.cssSelector.volumeBar.offset();a=a.pageX-b.left;b=this.config.cssSelector.volumeBar.width();this.volume(100*a/b)}},volumeBarValue:function(a){this.volumeBar(a)},jPlayerVolume:function(a){if(this.config.cssId.volumeBarValue!=null){this.config.cssSelector.volumeBarValue.width(a+"%");this._forceUpdate()}},
43
- onSoundComplete:function(a){if(c.isFunction(a))this.onSoundCompleteCustom=a;else this._warning("onSoundComplete parameter is not a function.")},onSoundCompleteCustom:function(){},jPlayerOnSoundComplete:function(){this.element.trigger("jPlayer.setButtons",false);this.onSoundCompleteCustom()},getData:function(a){for(var b=a.split("."),d=this.config,e=0;e<b.length;e++)if(d[b[e]]!=undefined)d=d[b[e]];else{this._warning("Undefined data requested.\n\njPlayer('getData', '"+a+"')");return}return d},_getMovie:function(){return document[this.config.fid]},
44
- _checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length>0)if(d=navigator.plugins["Shockwave Flash"])if(navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a)b=true;return b},_forceUpdate:function(){this.config.graphicsFix&&this.config.hSel.text(""+Math.random())},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_flashError:function(a){this._error("Problem with Flash component.\n\nCheck the swfPath points at the Jplayer.swf path.\n\nswfPath = "+
45
- this.config.swfPath+"\nurl: "+this.config.swf+"\n\nError: "+a.message)},_error:function(a){this.config.errorAlerts&&this._alert("Error!\n\n"+a)},_warning:function(a){this.config.warningAlerts&&this._alert("Warning!\n\n"+a)},_alert:function(a){alert("jPlayer "+this.config.version+" : id='"+this.config.id+"' : "+a)}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*
2
  * jPlayer Plugin for jQuery JavaScript Library
3
+ * http://www.jplayer.org
4
  *
5
+ * Copyright (c) 2009 - 2012 Happyworm Ltd
6
  * Dual licensed under the MIT and GPL licenses.
7
  * - http://www.opensource.org/licenses/mit-license.php
8
  * - http://www.gnu.org/copyleft/gpl.html
9
  *
10
  * Author: Mark J Panaghiston
11
+ * Version: 2.2.0
12
+ * Date: 13th September 2012
13
  */
14
 
15
+ (function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this,a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b.data(this,"jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b.data(this,"jPlayer");c?c.option(a||{}):b.data(this,"jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=
16
+ b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent="ready flashreset resize repeat error warning";b.jPlayer.event={ready:"jPlayer_ready",flashreset:"jPlayer_flashreset",resize:"jPlayer_resize",repeat:"jPlayer_repeat",
17
+ click:"jPlayer_click",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",
18
+ timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough ratechange".split(" ");b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,
19
+ sepHour:":",sepMin:":",sepSec:""};b.jPlayer.convertTime=function(a){var c=new Date(1E3*a),d=c.getUTCHours(),a=c.getUTCMinutes(),c=c.getUTCSeconds(),d=b.jPlayer.timeFormat.padHour&&10>d?"0"+d:d,a=b.jPlayer.timeFormat.padMin&&10>a?"0"+a:a,c=b.jPlayer.timeFormat.padSec&&10>c?"0"+c:c;return(b.jPlayer.timeFormat.showHour?d+b.jPlayer.timeFormat.sepHour:"")+(b.jPlayer.timeFormat.showMin?a+b.jPlayer.timeFormat.sepMin:"")+(b.jPlayer.timeFormat.showSec?c+b.jPlayer.timeFormat.sepSec:"")};b.jPlayer.uaBrowser=
20
+ function(a){var a=a.toLowerCase(),c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/,a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),d=/(android)/,e=/(mobile)/,a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(b)||[],b=/(ipad|playbook)/.exec(b)||!e.exec(b)&&d.exec(b)||[];a[1]&&(a[1]=a[1].replace(/\s/g,
21
+ "_"));return{platform:a[1]||"",tablet:b[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var i=b.jPlayer.uaBrowser(navigator.userAgent);i.browser&&(b.jPlayer.browser[i.browser]=!0,b.jPlayer.browser.version=i.version);i=b.jPlayer.uaPlatform(navigator.userAgent);i.platform&&(b.jPlayer.platform[i.platform]=!0,b.jPlayer.platform.mobile=!i.tablet,b.jPlayer.platform.tablet=!!i.tablet);b.jPlayer.prototype={count:0,version:{script:"2.2.0",needFlash:"2.2.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",
22
+ supplied:"mp3",preload:"metadata",volume:0.8,muted:!1,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",
23
+ repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},fullScreen:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1E3},loop:!1,repeat:function(a){a.jPlayer.options.loop?b(this).unbind(".jPlayerRepeat").bind(b.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){b(this).jPlayer("play")}):b(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullScreen:{msie:/msie [0-6]/,ipad:/ipad.*?os [0-4]/,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3](?!.*?mobile)/,
24
+ android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/,playbook:/playbook/},verticalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},
25
+ optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,flash:!0},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0,
26
+ media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},
27
+ ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=b.extend({},this.status);this.internal=b.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require=
28
+ {};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);b.each(this.options.supplied.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.format[e]){var f=false;b.each(a.formats,function(a,b){if(e===b){f=true;return false}});f||a.formats.push(e)}});b.each(this.options.solution.toLowerCase().split(","),function(c,d){var e=
29
+ d.replace(/^\s+|\s+$/g,"");if(a.solution[e]){var f=false;b.each(a.solutions,function(a,b){if(e===b){f=true;return false}});f||a.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=b.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=b.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:f});this.internal.video=
30
+ b.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:f});this.internal.flash=b.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:f,swf:this.options.swfPath+(this.options.swfPath.toLowerCase().slice(-4)!==".swf"?(this.options.swfPath&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf":"")});this.internal.poster=b.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:f});b.each(b.jPlayer.event,function(b,c){if(a.options[b]!==f){a.element.bind(c+".jPlayer",a.options[b]);
31
+ a.options[b]=f}});this.require.audio=false;this.require.video=false;b.each(this.formats,function(b,c){a.require[a.format[c].media]=true});this.options=this.require.video?b.extend(true,{},this.optionsVideo,this.options):b.extend(true,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._restrictNativeVideoControls();
32
+ this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){(!a.status.video||a.status.waitForPlay)&&a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=b("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)});
33
+ this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)}this.flash.available=
34
+ this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};b.each(this.formats,function(b,c){a.html.canPlay[c]=a.html[a.format[c].media].available&&""!==a.htmlElement[a.format[c].media].canPlayType(a.format[c].codec);a.flash.canPlay[c]=a.format[c].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;b.each(this.solutions,function(c,d){if(c===0)a[d].desired=true;else{var e=false,f=false;b.each(a.formats,function(b,c){a[a.solutions[0]].canPlay[c]&&(a.format[c].media===
35
+ "video"?f=true:e=true)});a[d].desired=a.require.audio&&!e||a.require.video&&!f}});this.html.support={};this.flash.support={};b.each(this.formats,function(b,c){a.html.support[c]=a.html.canPlay[c]&&a.html.desired;a.flash.support[c]=a.flash.canPlay[c]&&a.flash.desired});this.html.used=false;this.flash.used=false;b.each(this.solutions,function(c,d){b.each(a.formats,function(b,c){if(a[d].support[c]){a[d].used=true;return false}})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);
36
+ if(!this.html.used&&!this.flash.used){this._error({type:b.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SOLUTION,hint:b.jPlayer.errorHint.NO_SOLUTION});this.css.jq.noSolution.length&&this.css.jq.noSolution.show()}else this.css.jq.noSolution.length&&this.css.jq.noSolution.hide();if(this.flash.used){var c,d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+
37
+ "&muted="+this.options.muted;if(b.jPlayer.browser.msie&&Number(b.jPlayer.browser.version)<=8){d=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+d+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];c=document.createElement('<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0"></object>');
38
+ for(var e=0;e<d.length;e++)c.appendChild(document.createElement(d[e]))}else{e=function(a,b,c){var d=document.createElement("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)};c=document.createElement("object");c.setAttribute("id",this.internal.flash.id);c.setAttribute("data",this.internal.flash.swf);c.setAttribute("type","application/x-shockwave-flash");c.setAttribute("width","1");c.setAttribute("height","1");e(c,"flashvars",d);e(c,"allowscriptaccess","always");e(c,"bgcolor",
39
+ this.options.backgroundColor);e(c,"wmode",this.options.wmode)}this.element.append(c);this.internal.flash.jq=b(c)}if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=b("#"+this.internal.audio.id)}if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=b("#"+this.internal.video.id);
40
+ this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):this.internal.video.jq.css({width:"0px",height:"0px"});this.internal.video.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)})}}this.options.emulateHtml&&this._emulateHtmlBridge();this.html.used&&!this.flash.used&&setTimeout(function(){a.internal.ready=true;a.version.flash="n/a";a._trigger(b.jPlayer.event.repeat);a._trigger(b.jPlayer.event.ready)},100);this._updateNativeVideoControls();
41
+ this._updateInterface();this._updateButtons(false);this._updateAutohide();this._updateVolume(this.options.volume);this._updateMute(this.options.muted);this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();b.jPlayer.prototype.count++},destroy:function(){this.clearMedia();this._removeUiClass();this.css.jq.currentTime.length&&this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");b.each(this.css.jq,function(a,b){b.length&&b.unbind(".jPlayer")});this.internal.poster.jq.unbind(".jPlayer");
42
+ this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer");this.options.emulateHtml&&this._destroyHtmlBridge();this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();delete this.instances[this.internal.instance]},enable:function(){},disable:function(){},_testCanPlayType:function(a){try{a.canPlayType(this.format.mp3.codec);return true}catch(b){return false}},_uaBlocklist:function(a){var c=navigator.userAgent.toLowerCase(),d=false;b.each(a,function(a,b){if(b&&
43
+ b.test(c)){d=true;return false}});return d},_restrictNativeVideoControls:function(){if(this.require.audio&&this.status.nativeVideoControls){this.status.nativeVideoControls=false;this.status.noFullScreen=true}},_updateNativeVideoControls:function(){if(this.html.video.available&&this.html.used){this.htmlElement.video.controls=this.status.nativeVideoControls;this._updateAutohide();if(this.status.nativeVideoControls&&this.require.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,
44
+ height:this.status.height})}else if(this.status.waitForPlay&&this.status.video){this.internal.poster.jq.show();this.internal.video.jq.css({width:"0px",height:"0px"})}}},_addHtmlEventListeners:function(a,c){var d=this;a.preload=this.options.preload;a.muted=this.options.muted;a.volume=this.options.volume;a.addEventListener("progress",function(){if(c.gate){d._getHtmlStatus(a);d._updateInterface();d._trigger(b.jPlayer.event.progress)}},false);a.addEventListener("timeupdate",function(){if(c.gate){d._getHtmlStatus(a);
45
+ d._updateInterface();d._trigger(b.jPlayer.event.timeupdate)}},false);a.addEventListener("durationchange",function(){if(c.gate){d._getHtmlStatus(a);d._updateInterface();d._trigger(b.jPlayer.event.durationchange)}},false);a.addEventListener("play",function(){if(c.gate){d._updateButtons(true);d._html_checkWaitForPlay();d._trigger(b.jPlayer.event.play)}},false);a.addEventListener("playing",function(){if(c.gate){d._updateButtons(true);d._seeked();d._trigger(b.jPlayer.event.playing)}},false);a.addEventListener("pause",
46
+ function(){if(c.gate){d._updateButtons(false);d._trigger(b.jPlayer.event.pause)}},false);a.addEventListener("waiting",function(){if(c.gate){d._seeking();d._trigger(b.jPlayer.event.waiting)}},false);a.addEventListener("seeking",function(){if(c.gate){d._seeking();d._trigger(b.jPlayer.event.seeking)}},false);a.addEventListener("seeked",function(){if(c.gate){d._seeked();d._trigger(b.jPlayer.event.seeked)}},false);a.addEventListener("volumechange",function(){if(c.gate){d.options.volume=a.volume;d.options.muted=
47
+ a.muted;d._updateMute();d._updateVolume();d._trigger(b.jPlayer.event.volumechange)}},false);a.addEventListener("suspend",function(){if(c.gate){d._seeked();d._trigger(b.jPlayer.event.suspend)}},false);a.addEventListener("ended",function(){if(c.gate){if(!b.jPlayer.browser.webkit)d.htmlElement.media.currentTime=0;d.htmlElement.media.pause();d._updateButtons(false);d._getHtmlStatus(a,true);d._updateInterface();d._trigger(b.jPlayer.event.ended)}},false);a.addEventListener("error",function(){if(c.gate){d._updateButtons(false);
48
+ d._seeked();if(d.status.srcSet){clearTimeout(d.internal.htmlDlyCmdId);d.status.waitForLoad=true;d.status.waitForPlay=true;d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"});d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:b.jPlayer.error.URL,context:d.status.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL})}}},false);b.each(b.jPlayer.htmlEvent,
49
+ function(e,g){a.addEventListener(this,function(){c.gate&&d._trigger(b.jPlayer.event[g])},false)})},_getHtmlStatus:function(a,b){var d=0,e=0,g=0,f=0;if(isFinite(a.duration))this.status.duration=a.duration;d=a.currentTime;e=this.status.duration>0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){g=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0}else{g=
50
+ 100;f=e}if(b)e=f=d=0;this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(true,
51
+ {},this.options);a.jPlayer.status=b.extend(true,{},this.status);a.jPlayer.html=b.extend(true,{},this.html);a.jPlayer.flash=b.extend(true,{},this.flash);if(c)a.jPlayer.error=b.extend({},c);if(d)a.jPlayer.warning=b.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);d>0&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}}else{this.internal.ready=
52
+ true;this.internal.flash.jq.css({width:"0px",height:"0px"});this.version.flash=c.version;this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash,message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION});this._trigger(b.jPlayer.event.repeat);this._trigger(a)}if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);
53
+ this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&
54
+ this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(false);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;
55
+ default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(a){if(a!==f){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();
56
+ this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}}if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length)if(this.status.noFullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.hide()}else if(this.options.fullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()}if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length)if(this.options.loop){this.css.jq.repeat.hide();
57
+ this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(b.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(b.jPlayer.convertTime(this.status.duration))},
58
+ _seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},_resetGate:function(){this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false},_resetActive:function(){this.html.active=false;this.flash.active=false},setMedia:function(a){var c=this,d=false,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();b.each(this.formats,
59
+ function(e,f){var i=c.format[f].media==="video";b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g=e==="html";if(i){if(g){c.html.video.gate=true;c._html_setVideo(a);c.html.active=true}else{c.flash.gate=true;c._flash_setVideo(a);c.flash.active=true}c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show();c.status.video=true}else{if(g){c.html.audio.gate=true;c._html_setAudio(a);c.html.active=true}else{c.flash.gate=true;c._flash_setAudio(a);c.flash.active=true}c.css.jq.videoPlay.length&&
60
+ c.css.jq.videoPlay.hide();c.status.video=false}d=true;return false}});if(d)return false});if(d){if((!this.status.nativeVideoControls||!this.html.video.gate)&&this._validString(a.poster))e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show();this.status.srcSet=true;this.status.media=b.extend({},a);this._updateButtons(false);this._updateInterface()}else this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,
61
+ hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(false);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?
62
+ this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a):this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},pauseOthers:function(){var a=
63
+ this;b.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.options.muted=a;this.html.used&&this._html_mute(a);
64
+ this.flash.used&&this._flash_mute(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateMute(a);this._updateVolume(this.options.volume);this._trigger(b.jPlayer.event.volumechange)}},mute:function(a){a=a===f?true:!!a;this._muted(a)},unmute:function(a){a=a===f?true:!!a;this._muted(!a)},_updateMute:function(a){if(a===f)a=this.options.muted;if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(this.status.noVolume){this.css.jq.mute.hide();this.css.jq.unmute.hide()}else if(a){this.css.jq.mute.hide();
65
+ this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateVolume(a);this._trigger(b.jPlayer.event.volumechange)}},volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),d=a.pageX-b.left,e=this.css.jq.volumeBar.width(),a=this.css.jq.volumeBar.height()-
66
+ a.pageY+b.top,b=this.css.jq.volumeBar.height();this.options.verticalVolume?this.volume(a/b):this.volume(d/e)}this.options.muted&&this._muted(false)},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===f)a=this.options.volume;a=this.options.muted?0:a;if(this.status.noVolume){this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide();this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide();this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()}else{this.css.jq.volumeBar.length&&
67
+ this.css.jq.volumeBar.show();if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.show();this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")}this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show()}},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(false)},_cssSelectorAncestor:function(a){var c=this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,
68
+ context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(a,c){var d=this;if(typeof c==="string")if(b.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=c;this.css.cs[a]=this.options.cssSelectorAncestor+
69
+ " "+c;this.css.jq[a]=c?b(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){d[a](c);b(this).blur();return false});c&&this.css.jq[a].length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,
70
+ hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset(),a=a.pageX-b.left,b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(a){if(this.options.loop!==
71
+ a){this.options.loop=a;this._updateButtons();this._trigger(b.jPlayer.event.repeat)}},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(arguments.length===0)return b.extend(true,{},this.options);if(typeof a==="string"){var e=a.split(".");if(c===f){for(var d=b.extend(true,{},this.options),g=0;g<e.length;g++)if(d[e[g]]!==f)d=d[e[g]];else{this._warning({type:b.jPlayer.warning.OPTION_KEY,context:a,message:b.jPlayer.warningMsg.OPTION_KEY,
72
+ hint:b.jPlayer.warningHint.OPTION_KEY});return f}return d}for(var g=d={},h=0;h<e.length;h++)if(h<e.length-1){g[e[h]]={};g=g[e[h]]}else g[e[h]]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,c){var d=this;switch(a){case "volume":this.volume(c);break;case "muted":this._muted(c);break;case "cssSelectorAncestor":this._cssSelectorAncestor(c);break;case "cssSelector":b.each(c,function(a,b){d._cssSelector(a,
73
+ b)});break;case "fullScreen":if(this.options[a]!==c){this._removeUiClass();this.options[a]=c;this._refreshSize()}break;case "size":!this.options.fullScreen&&this.options[a].cssClass!==c.cssClass&&this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "sizeFull":this.options.fullScreen&&this.options[a].cssClass!==c.cssClass&&this._removeUiClass();this.options[a]=b.extend({},this.options[a],c);this._refreshSize();break;case "autohide":this.options[a]=b.extend({},
74
+ this.options[a],c);this._updateAutohide();break;case "loop":this._loop(c);break;case "nativeVideoControls":this.options[a]=b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this._restrictNativeVideoControls();this._updateNativeVideoControls();break;case "noFullScreen":this.options[a]=b.extend({},this.options[a],c);this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);
75
+ this._restrictNativeVideoControls();this._updateButtons();break;case "noVolume":this.options[a]=b.extend({},this.options[a],c);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._updateVolume();this._updateMute();break;case "emulateHtml":if(this.options[a]!==c)(this.options[a]=c)?this._emulateHtmlBridge():this._destroyHtmlBridge()}return this},_refreshSize:function(){this._setSize();this._addUiClass();this._updateSize();this._updateButtons();this._updateAutohide();this._trigger(b.jPlayer.event.resize)},
76
+ _setSize:function(){if(this.options.fullScreen){this.status.width=this.options.sizeFull.width;this.status.height=this.options.sizeFull.height;this.status.cssClass=this.options.sizeFull.cssClass}else{this.status.width=this.options.size.width;this.status.height=this.options.size.height;this.status.cssClass=this.options.size.cssClass}this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){this.ancestorJq.length&&this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){this.ancestorJq.length&&
77
+ this.ancestorJq.removeClass(this.status.cssClass)},_updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height});!this.status.waitForPlay&&this.html.active&&this.status.video||this.html.video.available&&this.html.used&&this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):!this.status.waitForPlay&&(this.flash.active&&this.status.video)&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},
78
+ _updateAutohide:function(){var a=this,b=function(){a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId);a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};if(this.css.jq.gui.length){this.css.jq.gui.stop(true,true);clearTimeout(this.internal.autohideId);this.element.unbind(".jPlayerAutohide");this.css.jq.gui.unbind(".jPlayerAutohide");if(this.status.nativeVideoControls)this.css.jq.gui.hide();
79
+ else if(this.options.fullScreen&&this.options.autohide.full||!this.options.fullScreen&&this.options.autohide.restored){this.element.bind("mousemove.jPlayer.jPlayerAutohide",b);this.css.jq.gui.bind("mousemove.jPlayer.jPlayerAutohide",b);this.css.jq.gui.hide()}else this.css.jq.gui.show()}},fullScreen:function(){this._setOption("fullScreen",true)},restoreScreen:function(){this._setOption("fullScreen",false)},_html_initMedia:function(){this.htmlElement.media.src=this.status.src;this.options.preload!==
80
+ "none"&&this._html_load();this._trigger(b.jPlayer.event.timeupdate)},_html_setAudio:function(a){var c=this;b.each(this.formats,function(b,e){if(c.html.support[e]&&a[e]){c.status.src=a[e];c.status.format[e]=true;c.status.formatType=e;return false}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia()},_html_setVideo:function(a){var c=this;b.each(this.formats,function(b,e){if(c.html.support[e]&&a[e]){c.status.src=a[e];c.status.format[e]=true;c.status.formatType=e;return false}});if(this.status.nativeVideoControls)this.htmlElement.video.poster=
81
+ this._validString(a.poster)?a.poster:"";this.htmlElement.media=this.htmlElement.video;this._html_initMedia()},_html_resetMedia:function(){if(this.htmlElement.media){this.htmlElement.media.id===this.internal.video.id&&!this.status.nativeVideoControls&&this.internal.video.jq.css({width:"0px",height:"0px"});this.htmlElement.media.pause()}},_html_clearMedia:function(){if(this.htmlElement.media){this.htmlElement.media.src="";this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=
82
+ false;this.htmlElement.media.load()}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this;this._html_load();this.htmlElement.media.play();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},100);return}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=
83
+ a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=
84
+ a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=
85
+ a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d]);break;case "rtmpa":c._getMovie().fl_setAudio_rtmp(a[d])}c.status.src=
86
+ a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d]);break;case "rtmpv":c._getMovie().fl_setVideo_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload===
87
+ "auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=
88
+ false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();
89
+ this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length>
90
+ 0)(d=navigator.plugins["Shockwave Flash"])&&navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a&&(b=true);return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return a<b?b:a>d?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],
91
+ context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?
92
+ "\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=true;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=false});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();
93
+ var b=document.createEvent("Event");b.initEvent(c,false,true);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),
94
+ function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",
95
+ NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",
96
+ NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",
97
+ CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery);
js/mp3-jplayer-1.8.3.js ADDED
@@ -0,0 +1,772 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ MP3-jPlayer 1.8.3
3
+ www.sjward.org
4
+ */
5
+
6
+ var MP3_JPLAYER = {
7
+
8
+ tID: '',
9
+ state: '',
10
+ pl_info: [],
11
+ load_pc: 0,
12
+ played_t: 0,
13
+ dl_dialogs: [],
14
+ timeoutIDs: [],
15
+ intervalIDs: [],
16
+ dl_domain: '',
17
+ jp_audio: {},
18
+ jp_seekable: 0,
19
+ sliding: false,
20
+ launched_ID: null,
21
+ jpID: '#mp3_jplayer_1_8',
22
+ plugin_path: '',
23
+
24
+ vars: {
25
+ play_f: false,
26
+ stylesheet_url: '',
27
+ dload_text: 'DOWNLOAD MP3',
28
+ pp_width: 280,
29
+ pp_maxheight: 350,
30
+ pp_bodycolour: '#fff',
31
+ pp_bodyimg: '',
32
+ pp_fixedcss: false,
33
+ pp_windowheight: 600,
34
+ pp_playerheight: 100+142,
35
+ force_dload: false,
36
+ message_interval: '<h2>Download MP3</h2><p style="margin-top:34px !important;">Your download should start in a second!</p>',
37
+ message_ok: '',
38
+ message_indark: '<h2>Download MP3</h2><p>Your download should start in a second!</p>',
39
+ message_promtlink: '<h2>Download MP3</h2><p>Link to the file:</p><h3><a target="_blank" href="#1">#2</a></h3><p>Depending on your browser settings, you may need to right click the link to save it.</p>',
40
+ message_fail: '<h2>Download Failed</h2><p>Sorry, something went wrong!</p>',
41
+ message_timeout: '<h2>Download<br />Unavailable</h2><p>please try again later!</p>',
42
+ dl_remote_path: ''
43
+ },
44
+
45
+ eID: {
46
+ play: '#playpause_mp3j_',
47
+ playW: '#playpause_wrap_mp3j_',
48
+ stp: '#stop_mp3j_',
49
+ prev: '#Prev_mp3j_',
50
+ next: '#Next_mp3j_',
51
+ vol: '#vol_mp3j_',
52
+ loader: '#load_mp3j_',
53
+ pos: '#posbar_mp3j_',
54
+ poscol: '#poscol_mp3j_',
55
+ title: '#T_mp3j_',
56
+ caption: '#C_mp3j_',
57
+ pT: '#P-Time-MI_',
58
+ tT: '#T-Time-MI_',
59
+ dload: '#download_mp3j_',
60
+ plwrap: '#L_mp3j_',
61
+ ul: '#UL_mp3j_',
62
+ a: 'mp3j_A_', //No hash!
63
+ indiM: '#statusMI_',
64
+ toglist: '#playlist-toggle_',
65
+ lPP: '#lpp_mp3j_',
66
+ pplink: '#mp3j_popout_',
67
+ img: '#MI_image_'
68
+ },
69
+
70
+ init: function () {
71
+ var plpath, that = this;
72
+
73
+ plpath = this.plugin_path.split('/');
74
+ this.dl_domain = plpath[2].replace(/^www./i, "");
75
+
76
+ this.unwrap();
77
+ this.write_controls();
78
+ jQuery(this.jpID).jPlayer({
79
+ ready: function () {
80
+ that.startup();
81
+ },
82
+ swfPath: that.plugin_path + '/js',
83
+ volume: 1,
84
+ supplied: "mp3",
85
+ wmode: "window",
86
+ solution:"html, flash",
87
+ preload: "none"
88
+ });
89
+ jQuery(this.jpID).bind(jQuery.jPlayer.event.ended, function(event) {
90
+ that.E_complete(that.tID);
91
+ });
92
+ jQuery(this.jpID).bind(jQuery.jPlayer.event.timeupdate, function(event) {
93
+ var lp = that.get_loaded(event);
94
+ var ppA = event.jPlayer.status.currentPercentAbsolute;
95
+ var pt = event.jPlayer.status.currentTime;
96
+ var tt = event.jPlayer.status.duration;
97
+ that.E_update(that.tID, lp, ppA, pt, tt);
98
+ });
99
+ jQuery(this.jpID).bind(jQuery.jPlayer.event.ready, function(event) {
100
+ if(event.jPlayer.html.used && event.jPlayer.html.audio.available) {
101
+ that.jp_audio = jQuery(that.jpID).data("jPlayer").htmlElement.audio;
102
+ } else {
103
+ that.jp_audio = 'flash';
104
+ }
105
+ });
106
+ jQuery(this.jpID).bind(jQuery.jPlayer.event.progress, function(event) {
107
+ var lp = that.get_loaded(event);
108
+ var pt = event.jPlayer.status.currentTime;
109
+ var tt = event.jPlayer.status.duration;
110
+ that.E_loading( that.tID, lp, tt, pt );
111
+ });
112
+ },
113
+
114
+ get_loaded: function (event) {
115
+ var lp;
116
+ if ( typeof this.jp_audio.buffered === "object" ) {
117
+ if( this.jp_audio.buffered.length > 0 && this.jp_audio.duration > 0 ) {
118
+ lp = 100 * this.jp_audio.buffered.end(this.jp_audio.buffered.length-1) / this.jp_audio.duration;
119
+ } else {
120
+ lp = 0;
121
+ }
122
+ } else {
123
+ lp = event.jPlayer.status.seekPercent;
124
+ }
125
+ this.jp_seekable = event.jPlayer.status.seekPercent; //use this for slider calcs for both html/flash solution
126
+ this.load_pc = lp;
127
+ return lp;
128
+ },
129
+
130
+ Tformat: function ( sec ) {
131
+ var t = sec,
132
+ s = Math.floor((t)%60),
133
+ m = Math.floor((t/60)%60),
134
+ h = Math.floor(t/3600);
135
+ return ((h > 0) ? h+':' : '') + ((m > 9) ? m : '0'+m) + ':' + ((s > 9) ? s : '0'+s);
136
+ },
137
+
138
+ E_loading: function ( j, lp, tt, pt ) {
139
+ if (j !== '') {
140
+ jQuery(this.eID.loader + j).css( "width", lp + '%' );
141
+ if (this.pl_info[j].type === 'MI') {
142
+ if (tt > 0 && this.played_t > 0) {
143
+ jQuery(this.eID.tT + j).text(this.Tformat(tt));
144
+ }
145
+ }
146
+ if ( this.jp_audio !== 'flash' && lp < 100 ) {
147
+ if ( pt === this.played_t && this.state === 'playing' && pt > 0 && !this.sliding ) {
148
+ if (this.pl_info[j].type === 'MI') {
149
+ jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
150
+ }
151
+ if (this.pl_info[j].type === 'single' ) {
152
+ jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
153
+ }
154
+ }
155
+ this.played_t = pt;
156
+ }
157
+ }
158
+ },
159
+
160
+ E_update: function (j, lp, ppA, pt, tt) {
161
+ if (j !== '') {
162
+ jQuery(this.eID.loader + j).css( "width", lp + '%' );
163
+ jQuery(this.eID.poscol + j).css( "width", ppA + '%' );
164
+ if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
165
+ jQuery(this.eID.pos + j).slider('option', 'value', 10*ppA);
166
+ }
167
+ if (pt > 0) {
168
+ jQuery(this.eID.pos + j).css( 'visibility', 'visible' );
169
+ }
170
+ if (this.pl_info[j].type === 'MI') {
171
+ jQuery(this.eID.pT + j).text(this.Tformat(pt));
172
+ }
173
+ if ('playing' === this.state) {
174
+ if ('MI' === this.pl_info[j].type) {
175
+ if (tt > 0 && this.played_t === pt && lp < 100 && !this.sliding ) {
176
+ jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
177
+ jQuery(this.eID.tT + j).text(this.Tformat(tt));
178
+ } else if (pt > 0) {
179
+ jQuery(this.eID.indiM + j).empty().append('Playing');
180
+ jQuery(this.eID.tT + j).text(this.Tformat(tt));
181
+ }
182
+ }
183
+ if ('single' === this.pl_info[j].type){
184
+ if (pt > 0 ) {
185
+ if (this.played_t === pt && lp < 100 && !this.sliding ) {
186
+ jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
187
+ } else {
188
+ jQuery(this.eID.indiM + j).empty().append('<span class="mp3-tint tintmarg"></span> ' + this.Tformat(pt));
189
+ }
190
+ }
191
+ }
192
+ }
193
+ this.played_t = pt;
194
+ }
195
+ },
196
+
197
+ E_complete: function (j) {
198
+ var p = this.pl_info[j];
199
+ if ('MI' === p.type) {
200
+ if (p.loop || p.tr+1 < p.list.length) {
201
+ this.E_change_track(j, 'next');
202
+ } else {
203
+ this.E_dblstop(j);
204
+ this.startup();
205
+ }
206
+ }
207
+ if ('single' === p.type) {
208
+ if (p.loop) {
209
+ this.E_change_track(j, 'next');
210
+ } else {
211
+ this.E_stop(j);
212
+ this.startup();
213
+ }
214
+ }
215
+ },
216
+
217
+ write_controls: function () {
218
+ var j;
219
+ for (j = 0; j < this.pl_info.length; j += 1) {
220
+ this.setup_a_player(j);
221
+ }
222
+ },
223
+
224
+ startup: function () {
225
+ var j;
226
+ for (j = 0; j < this.pl_info.length; j += 1) {
227
+ if (this.pl_info[j].autoplay) {
228
+ this.pl_info[j].autoplay = false;
229
+ this.E_change_track(j, this.pl_info[j].tr);
230
+ return;
231
+ }
232
+ }
233
+ },
234
+
235
+ setup_a_player: function (j) {
236
+ var i, li, sel, that = this, p = this.pl_info[j];
237
+
238
+ //PLAYLISTERS and SINGLES
239
+ if ('MI' === p.type || 'single' === p.type) {
240
+
241
+ jQuery(this.eID.vol + j).slider({
242
+ value : p.vol,
243
+ max: 100,
244
+ range: 'min',
245
+ animate: false,
246
+ slide: function (event, ui) {
247
+ p.vol = ui.value;
248
+ if (j === that.tID) {
249
+ jQuery(that.jpID).jPlayer("volume", ui.value/100);
250
+ }
251
+ }
252
+ });
253
+
254
+ jQuery(this.eID.pos + j).mouseup(function (e) { //for posbar
255
+ that.sliding = false;
256
+ });
257
+
258
+ sel = ('MI' === p.type) ? this.eID.play : this.eID.playW;
259
+ jQuery(sel + j).click(function () { //play-pause click
260
+ that.E_change_track(j, p.tr);
261
+ jQuery(this).blur();
262
+ });
263
+ jQuery(sel + j).dblclick(function () { //play-pause dbl click
264
+ if (that.state !== "playing") {
265
+ that.E_change_track(j, p.tr);
266
+ }
267
+ jQuery(this).blur();
268
+ });
269
+
270
+ this.titles(j, p.tr);
271
+ }
272
+
273
+ //PLAYLISTERS
274
+ if ('MI' === p.type) {
275
+ jQuery(this.eID.pT + j).text('00:00');
276
+ jQuery(this.eID.indiM + j).text('Ready');
277
+ jQuery(this.eID.stp + j).click(function () {
278
+ that.E_stop(j);
279
+ });
280
+ jQuery(this.eID.stp + j).dblclick(function () {
281
+ that.E_dblstop(j);
282
+ });
283
+
284
+ jQuery(this.eID.plwrap + j).hide();
285
+ if (p.list.length > 1) {
286
+ jQuery(this.eID.next + j).click(function () {
287
+ that.E_change_track(j, 'next');
288
+ });
289
+ jQuery(this.eID.prev + j).click(function () {
290
+ that.E_change_track(j, 'prev');
291
+ });
292
+ jQuery(this.eID.ul + j).empty();
293
+ for (i = 0; i < p.list.length; i += 1) {
294
+ li = '<li>';
295
+ li += '<a href="#" id="' + this.eID.a + j + '_' + i + '">' + p.list[i].name + '</a></li>';
296
+ jQuery(this.eID.ul + j).append(li);
297
+ this.add_ul_click(j, i);
298
+ }
299
+ jQuery('#' + this.eID.a + j + '_' + p.tr).addClass('mp3j_A_current');
300
+ jQuery(this.eID.toglist + j).click(function () {
301
+ that.togglelist(j);
302
+ });
303
+ if (p.lstate === true) {
304
+ jQuery(this.eID.plwrap + j).show();
305
+ }
306
+ }
307
+
308
+ this.writedownload(j, p.tr);
309
+ if ( this.vars.force_dload === true ) {
310
+ this.dl_closeinfo_click(j);
311
+ }
312
+
313
+ jQuery(this.eID.lPP + j).click(function () {
314
+ return that.E_launchPP(j);
315
+ });
316
+ }
317
+
318
+ //POPOUT LINKS
319
+ if ('popout' === p.type) {
320
+ jQuery(this.eID.pplink + j).click(function () {
321
+ return that.E_launchPP(j);
322
+ });
323
+ }
324
+ },
325
+
326
+ add_ul_click: function (j, i) { //playlist item click
327
+ var that = this;
328
+ jQuery('#' + this.eID.a + j + "_" + i).click(function (e) {
329
+ that.E_change_track(j, i);
330
+ e.preventDefault();
331
+ });
332
+ },
333
+
334
+ unwrap: function () {
335
+ var i, j, arr;
336
+ if (this.vars.play_f === true && typeof this.lists !== "undefined" && this.lists.length > 0) {
337
+ for (i = 0; i < this.lists.length; i += 1) {
338
+ arr = this.lists[i];
339
+ for (j = 0; j < arr.length; j += 1) {
340
+ arr[j].mp3 = this.f_undo.f_con(arr[j].mp3);
341
+ }
342
+ }
343
+ }
344
+ },
345
+
346
+ f_undo: {
347
+ keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
348
+ f_con : function (input) {
349
+ var output = "", i = 0, chr1, chr2, chr3, enc1, enc2, enc3, enc4;
350
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
351
+ while (i < input.length) {
352
+ enc1 = this.keyStr.indexOf(input.charAt(i++)); enc2 = this.keyStr.indexOf(input.charAt(i++));
353
+ enc3 = this.keyStr.indexOf(input.charAt(i++)); enc4 = this.keyStr.indexOf(input.charAt(i++));
354
+ chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4;
355
+ output = output + String.fromCharCode(chr1);
356
+ if (enc3 !== 64) { output = output + String.fromCharCode(chr2); }
357
+ if (enc4 !== 64) { output = output + String.fromCharCode(chr3); }
358
+ }
359
+ output = this.utf8_f_con(output);
360
+ return output;
361
+ },
362
+ utf8_f_con : function (utftext) {
363
+ var string = "", i = 0, c, c1, c2, c3;
364
+ while (i < utftext.length) {
365
+ c = utftext.charCodeAt(i);
366
+ if (c < 128) {
367
+ string += String.fromCharCode(c); i++;
368
+ } else if ((c > 191) && (c < 224)) {
369
+ c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;
370
+ } else {
371
+ c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;
372
+ }
373
+ }
374
+ return string;
375
+ }
376
+ },
377
+
378
+
379
+ E_stop: function (j) {
380
+ if (j === this.tID && j !== '') {
381
+ this.clearit();
382
+ if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
383
+ jQuery(this.eID.pos + j).slider('destroy');
384
+ }
385
+ jQuery(this.eID.loader + j).css( "width", '0%' );
386
+ this.button(j, 'play');
387
+ if (this.pl_info[j].type === 'MI') {
388
+ jQuery(this.eID.poscol + j).css( "width", '0%' );
389
+ jQuery(this.eID.tT + j).empty();
390
+ jQuery(this.eID.indiM + j).text('Stopped');
391
+ jQuery(this.eID.pT + j).text(this.Tformat(0));
392
+ } else {
393
+ jQuery(this.eID.indiM + j).empty();
394
+ }
395
+ this.load_pc = 0;
396
+ this.played_t = 0;
397
+ }
398
+ },
399
+
400
+ E_dblstop: function (j) {
401
+ this.listclass(j, this.pl_info[j].tr, 0);
402
+ if ( this.pl_info[j].tr !== 0 ) {
403
+ this.titles(j, 0);
404
+ }
405
+ this.writedownload(j, 0);
406
+ this.E_stop(j);
407
+ jQuery(this.eID.indiM + j).text('Ready');
408
+ this.pl_info[j].tr = 0;
409
+ },
410
+
411
+ E_change_track: function (j, change) {
412
+ var track, txt, p = this.pl_info[j];
413
+ if (j === this.tID && change === p.tr) {
414
+ if ('playing' === this.state) {
415
+ if (this.load_pc === 0) {
416
+ this.E_stop(j);
417
+ } else {
418
+ this.pauseit();
419
+ this.button(j, 'play');
420
+ if ('MI' === p.type) {
421
+ jQuery(this.eID.indiM + j).text('Paused');
422
+ }
423
+ }
424
+ return;
425
+ } else if ('paused' === this.state || 'set' === this.state) {
426
+ this.playit();
427
+ this.button(j, 'pause');
428
+ return;
429
+ }
430
+ }
431
+ this.E_stop(this.tID);
432
+ if ('prev' === change) {
433
+ track = (p.tr-1 < 0) ? p.list.length-1 : p.tr-1;
434
+ } else if ('next' === change) {
435
+ track = (p.tr+1 < p.list.length) ? p.tr+1 : 0;
436
+ } else {
437
+ track = change;
438
+ }
439
+ jQuery(this.jpID).jPlayer("volume", 1 ); //Vol scaling fix
440
+ this.setit(p.list[track].mp3);
441
+ this.playit();
442
+ jQuery(this.jpID).jPlayer("volume", p.vol/100 ); //Reset to correct vol
443
+ txt = ('MI' === p.type) ? '<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting' : '<span class="Smp3-finding"></span><span class="mp3-gtint"></span>';
444
+ jQuery(this.eID.indiM + j).empty().append(txt);
445
+ this.button(j, 'pause');
446
+ this.makeslider(j);
447
+ if ('MI' === p.type) {
448
+ this.listclass(j, p.tr, track);
449
+ if ( p.tr !== track ) {
450
+ this.titles(j, track);
451
+ }
452
+ if (p.download) {
453
+ this.writedownload(j, track);
454
+ jQuery(this.eID.dload + j).hide().addClass('whilelinks').fadeIn(400);
455
+ }
456
+ }
457
+ p.tr = track;
458
+ this.tID = j;
459
+ },
460
+
461
+ E_launchPP: function (j) {
462
+ var li_height = 28;
463
+ if ( this.pl_info[j].height !== false ) {
464
+ this.vars.pp_playerheight = 100 + this.pl_info[j].height;
465
+ }
466
+ this.vars.pp_windowheight = ( this.pl_info[j].list.length > 1 ) ? this.vars.pp_playerheight + ( this.pl_info[j].list.length * li_height) : this.vars.pp_playerheight;
467
+ if ( this.vars.pp_windowheight > this.vars.pp_maxheight ) {
468
+ this.vars.pp_windowheight = this.vars.pp_maxheight;
469
+ }
470
+ this.launched_ID = j;
471
+ if ( this.state === "playing" ) {
472
+ this.pl_info[j].autoplay = true;
473
+ }
474
+ this.E_stop(this.tID);
475
+ this.setit(this.plugin_path + '/mp3/silence.mp3');
476
+ this.playit(); //make chrome let go of last track (incase it didn't finish loading)
477
+ this.clearit();
478
+
479
+ var newwindow = window.open(this.plugin_path + '/popout.php', 'mp3jpopout', 'height=300, width=600, location=1, status=1, scrollbars=1, resizable=1, left=25, top=25');
480
+ if ( this.pl_info[j].lstate === true ) {
481
+ newwindow.resizeTo( this.vars.pp_width, this.vars.pp_windowheight );
482
+ } else {
483
+ newwindow.resizeTo( this.vars.pp_width, this.vars.pp_playerheight );
484
+ }
485
+ if (window.focus) {
486
+ newwindow.focus();
487
+ }
488
+ return false;
489
+ },
490
+
491
+ setit: function (file) {
492
+ this.state = 'set';
493
+ jQuery(this.jpID).jPlayer("setMedia", {mp3: file});
494
+ },
495
+ playit: function () {
496
+ this.state = 'playing';
497
+ jQuery(this.jpID).jPlayer("play");
498
+ },
499
+ pauseit: function () {
500
+ this.state = 'paused';
501
+ jQuery(this.jpID).jPlayer("pause");
502
+ },
503
+ clearit: function () {
504
+ this.state = '';
505
+ jQuery(this.jpID).jPlayer("clearMedia");
506
+ },
507
+
508
+ button: function (j, type) {
509
+ if (j === '') { return; }
510
+ if ('pause' === type) {
511
+ if (this.pl_info[j].play_txt === '#USE_G#') {
512
+ jQuery(this.eID.play + j).removeClass('buttons_mp3j').addClass('buttons_mp3jpause');
513
+ } else {
514
+ jQuery(this.eID.play + j).text(this.pl_info[j].pause_txt);
515
+ }
516
+ }
517
+ if ('play' === type) {
518
+ if (this.pl_info[j].play_txt === '#USE_G#') {
519
+ jQuery(this.eID.play + j).removeClass('buttons_mp3jpause').addClass('buttons_mp3j');
520
+ } else {
521
+ jQuery(this.eID.play + j).text(this.pl_info[j].play_txt);
522
+ }
523
+ }
524
+ },
525
+
526
+ listclass: function ( j, rem, add ) {
527
+ jQuery('#'+ this.eID.a + j +'_'+ rem).removeClass('mp3j_A_current');
528
+ jQuery('#'+ this.eID.a + j +'_'+ add).addClass('mp3j_A_current');
529
+ },
530
+
531
+ titles: function ( j, track ) {
532
+ var p = this.pl_info[j], Olink = '', Clink = '';
533
+ if (p.type === "MI") {
534
+ jQuery(this.eID.title + j).empty().append(p.list[track].name).append('<br /><span>' + p.list[track].artist + '</span>');
535
+ if (p.list[track].image !== '') {
536
+ if (p.list[track].imgurl !== '') {
537
+ Olink = '<a href="' + p.list[track].imgurl + '">';
538
+ Clink = '</a>';
539
+ }
540
+ jQuery(this.eID.img + j).empty().hide().append(Olink + '<img src="' + p.list[track].image + '" />' + Clink).fadeIn(300);
541
+ }
542
+ }
543
+ },
544
+
545
+ writedownload: function ( j, track ) {
546
+ var p = this.pl_info[j];
547
+ if (p.download) {
548
+ jQuery(this.eID.dload + j).empty().removeClass('whilelinks').append('<a id="mp3j_dlanchor_' + j + '" href="' + p.list[track].mp3 + '" target="_blank">' + this.vars.dload_text + '</a>');
549
+ if ( this.vars.force_dload === true ) {
550
+ this.dl_button_click( j );
551
+ }
552
+ }
553
+ },
554
+
555
+ togglelist: function ( j ) {
556
+ if (this.pl_info[j].lstate === true) {
557
+ jQuery(this.eID.plwrap + j).fadeOut(300);
558
+ jQuery(this.eID.toglist + j).text('SHOW');
559
+ this.pl_info[j].lstate = false;
560
+ } else if (this.pl_info[j].lstate === false) {
561
+ jQuery(this.eID.plwrap + j).fadeIn("slow");
562
+ jQuery(this.eID.toglist + j).text('HIDE');
563
+ this.pl_info[j].lstate = true;
564
+ }
565
+ },
566
+
567
+ makeslider: function (j) {
568
+ var phmove, cssmove, that = this;
569
+ jQuery(this.eID.pos + j).css( 'visibility', 'hidden' );
570
+ jQuery(this.eID.pos + j).slider({
571
+ max: 1000,
572
+ range: 'min',
573
+ animate: false,
574
+ slide: function (event, ui) {
575
+ if ((ui.value/10) < that.load_pc) {
576
+ cssmove = ui.value/10;
577
+ phmove = ui.value*(10.0/that.jp_seekable);
578
+ } else {
579
+ cssmove = 0.99*that.load_pc;
580
+ phmove = (9.9*that.load_pc)*(10.0/that.jp_seekable);
581
+ }
582
+ jQuery(that.eID.poscol + j).css('width', cssmove + '%');
583
+ jQuery(that.jpID).jPlayer("playHead", phmove );
584
+ if (that.state === 'paused') {
585
+ that.button(j, 'pause');
586
+ that.playit();
587
+ }
588
+ that.state = 'playing';
589
+ that.sliding = true;
590
+ }
591
+ });
592
+ }
593
+
594
+ };
595
+
596
+ // Force browser download
597
+ MP3_JPLAYER.dl_button_click = function ( j ) {
598
+ var that = this, p = this.pl_info[j];
599
+ jQuery('#mp3j_dlanchor_' + j).click(function (e) {
600
+ that.dl_runinfo( p.list[p.tr].mp3, j, e );
601
+ e.preventDefault();
602
+ });
603
+ };
604
+
605
+ MP3_JPLAYER.dl_closeinfo_click = function ( j ) {
606
+ var that = this;
607
+ jQuery('#mp3j_finfo_close_' + j).click(function () {
608
+ that.dl_dialogue( j, '', 'close');
609
+ that.clear_timers( j );
610
+ });
611
+ };
612
+
613
+ MP3_JPLAYER.dl_runinfo = function ( get, j, e ) {
614
+ var can_write,
615
+ dlpath,
616
+ message,
617
+ that = this,
618
+ dlframe = false,
619
+ p = this.pl_info[j],
620
+ is_local = this.is_local_dload( get );
621
+
622
+ if ( !this.intervalIDs[ j ] && !this.timeoutIDs[ j ] ) { //if timers not already running for this player
623
+ can_write = this.write_cookie('mp3Download' + j, 'waiting', '');
624
+ if ( is_local ) {
625
+ if ( can_write !== false ) {
626
+ this.dl_dialogue( j, this.vars.message_interval, 'check');
627
+ } else {
628
+ this.dl_dialogue( j, this.vars.message_indark, 'indark');
629
+ }
630
+ this.intervalIDs[ j ] = setInterval( function(){ that.dl_interval_check( j, can_write ); }, 500);
631
+ this.timeoutIDs[ j ] = setTimeout( function(){ that.dl_timeout( j, can_write ); }, 7000);
632
+ dlframe = true;
633
+ } else {
634
+ if ( this.vars.dl_remote_path === '' ) {
635
+ message = this.vars.message_promtlink.replace('#1', get);
636
+ message = message.replace('#2', p.list[p.tr].name);
637
+ this.dl_dialogue( j, message, 'indark');
638
+ } else {
639
+ message = this.vars.message_indark.replace('#1', get);
640
+ message = message.replace('#2', p.list[p.tr].name);
641
+ this.dl_dialogue( j, message, 'indark');
642
+ dlframe = true;
643
+ }
644
+ }
645
+ this.dl_dialogs[ j ] = 'false';
646
+ if ( dlframe ) {
647
+ dlpath = this.get_dloader_path( get );
648
+ jQuery('#mp3j_dlf_' + j).empty().append('<iframe id="mp3j_dlframe_' + j + '" name="mp3j_dlframe_' + j + '" class="mp3j-dlframe" src="' + dlpath + '?mp3=loc' + get + '&pID=' + j + '" style="display:none;"></iframe>');
649
+ }
650
+ }
651
+ };
652
+
653
+ MP3_JPLAYER.dl_interval_check = function ( j, can_write ) {
654
+ if ( can_write !== false && this.read_cookie('mp3Download' + j) === 'true' ) { //got cookie back, all should be good
655
+ this.dl_dialogue( j, this.vars.message_ok, 'hide');
656
+ //jQuery('#debug').append('<br />check: cookie '+j+' true');
657
+ this.clear_timers( j );
658
+ } else if ( this.dl_dialogs[ j ] !== 'false' ) { //got a message back
659
+ this.dl_dialogue( j, this.dl_dialogs[ j ], 'add');
660
+ //jQuery('#debug').append('<br />check: dialog'+j+' true');
661
+ this.clear_timers( j );
662
+ } //else {
663
+ //jQuery('#debug').append('<br />check: neither '+j+'...# ');
664
+ //}
665
+ };
666
+
667
+ MP3_JPLAYER.dl_timeout = function ( j, can_write ) {
668
+ this.clear_timers( j );
669
+ if ( can_write !== false ) {
670
+ this.dl_dialogue( j, this.vars.message_timeout, 'add');
671
+ }
672
+ //jQuery('#debug').append('<br />no responses ('+j+' timed out) ');
673
+ };
674
+
675
+ MP3_JPLAYER.clear_timers = function ( j ) {
676
+ if ( this.intervalIDs[ j ] !== null && this.timeoutIDs[ j ] !== null ) {
677
+ clearInterval( this.intervalIDs[j] );
678
+ clearTimeout( this.timeoutIDs[j] );
679
+ this.intervalIDs[ j ] = null;
680
+ this.timeoutIDs[j] = null;
681
+ }
682
+ jQuery('#mp3j_dlf_' + j).empty(); //ditch iframe
683
+ this.write_cookie('mp3Download' + j, '', -1); //clear any cookie
684
+ //jQuery('#debug').append('<br />cookie/frame '+j+' cleared');
685
+ };
686
+
687
+ MP3_JPLAYER.dl_dialogue = function ( j, text, state ) {
688
+ if ( 'check' === state ) {
689
+ jQuery('#mp3j_finfo_gif_' + j).show();
690
+ jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
691
+ jQuery('#mp3j_finfo_' + j).show();
692
+ } else if ( 'add' === state ) {
693
+ jQuery('#mp3j_finfo_gif_' + j).hide();
694
+ jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
695
+ } else if ( 'indark' === state ) {
696
+ jQuery('#mp3j_finfo_gif_' + j).hide();
697
+ jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
698
+ jQuery('#mp3j_finfo_' + j).fadeIn(100);
699
+ } else if ( 'close' === state ) {
700
+ jQuery('#mp3j_finfo_gif_' + j).hide();
701
+ jQuery('#mp3j_finfo_' + j).hide();
702
+ } else {
703
+ jQuery('#mp3j_finfo_gif_' + j).hide();
704
+ if ( text !== '' ) {
705
+ jQuery('#mp3j_finfo_txt_' + j).empty().append(text).show();
706
+ }
707
+ jQuery('#mp3j_finfo_' + j).fadeOut(1000);
708
+ }
709
+ };
710
+
711
+ MP3_JPLAYER.read_cookie = function ( name ) {
712
+ var i, cookie, allCookies = document.cookie.split('; ');
713
+ if ( allCookies.length > 0 ) {
714
+ for ( i = 0; i < allCookies.length; i += 1 ) {
715
+ cookie = allCookies[i].split( '=' );
716
+ if ( cookie[0] === name ) {
717
+ return cookie[1];
718
+ }
719
+ }
720
+ }
721
+ return false;
722
+ };
723
+
724
+ MP3_JPLAYER.write_cookie = function ( name, value, days ) {
725
+ var date, expires = "";
726
+ if ( days ) {
727
+ date = new Date();
728
+ date.setTime( date.getTime() + (days*24*60*60*1000) );
729
+ expires = "; expires=" + date.toGMTString();
730
+ }
731
+ document.cookie = name + "=" + value + expires + "; path=/";
732
+ return this.read_cookie( name );
733
+ };
734
+
735
+ MP3_JPLAYER.get_dloader_path = function ( loc ) {
736
+ var k, path = "", file = "", chunks;
737
+ chunks = loc.split('/');
738
+ file = chunks[chunks.length-1];
739
+ //jQuery('#debug').append('<br />');
740
+ //for ( k = 0; k < chunks.length; k += 1 ) {
741
+ // jQuery('#debug').append('<br />[' + k + '] ' + chunks[k]);
742
+ //}
743
+ //jQuery('#debug').append('<br />file:' + file);
744
+ if ( loc.charAt(0) === '/' ) {
745
+ path = this.plugin_path + '/download.php';
746
+ } else {
747
+ path = chunks[2].replace(/^www./i, "");
748
+ if ( path === this.dl_domain ) {
749
+ path = this.plugin_path + '/download.php';
750
+ } else {
751
+ path = chunks[0] + '//' + chunks[2] + this.vars.dl_remote_path;
752
+ }
753
+ }
754
+ //jQuery('#debug').append('<br />path:' + path);
755
+ return path;
756
+ };
757
+
758
+ MP3_JPLAYER.is_local_dload = function ( loc ) {
759
+ var domain = "", file = "", chunks, is_local = false;
760
+ chunks = loc.split('/');
761
+ file = chunks[chunks.length-1];
762
+ if ( loc.charAt(0) === '/' ) {
763
+ is_local = true;
764
+ } else {
765
+ domain = chunks[2].replace(/^www./i, "");
766
+ if ( domain === this.dl_domain ) {
767
+ is_local = true;
768
+ }
769
+ }
770
+ return is_local;
771
+ };
772
+
js/mp3-jplayer-1.8.js DELETED
@@ -1,511 +0,0 @@
1
- /*
2
- MP3-jPlayer 1.8
3
- www.sjward.org
4
- */
5
-
6
- function create_mp3_jplayer() {
7
- var mp3j = {
8
-
9
- tID: '', //id current
10
- state: '', //state current
11
- pl_info: [], //players info
12
- load_pc: 0, //loaded percent
13
- played_t: 0, //played time
14
-
15
- vars: { // Setup vars
16
- pathto_swf: '',
17
- play_f: false,
18
- popout_url: '',
19
- jpID: '#jquery_jplayer',
20
- silence: '',
21
- stylesheet_url: '',
22
- launched_ID: '',
23
- dload_text: 'DOWNLOAD MP3',
24
- pp_width: 280,
25
- pp_maxheight: 350,
26
- pp_bodycolour: '#fff',
27
- pp_bodyimg: '',
28
- pp_fixedcss: false,
29
- pp_playerheight: 100+142,
30
- pp_windowheight: 600
31
- },
32
-
33
- eID: { //html element ID bases
34
- play: '#playpause_mp3j_',
35
- playW: '#playpause_wrap_mp3j_',
36
- stp: '#stop_mp3j_',
37
- prev: '#Prev_mp3j_',
38
- next: '#Next_mp3j_',
39
- vol: '#vol_mp3j_',
40
- loader: '#load_mp3j_',
41
- pos: '#posbar_mp3j_',
42
- poscol: '#poscol_mp3j_',
43
- title: '#T_mp3j_',
44
- caption: '#C_mp3j_',
45
- pT: '#P-Time-MI_',
46
- tT: '#T-Time-MI_',
47
- dload: '#download_mp3j_',
48
- plwrap: '#L_mp3j_',
49
- ul: '#UL_mp3j_',
50
- a: 'mp3j_A_', //No hash!
51
- indiM: '#statusMI_',
52
- toglist: '#playlist-toggle_',
53
- lPP: '#lpp_mp3j_',
54
- pplink: '#mp3j_popout_',
55
- img: '#MI_image_'
56
- },
57
-
58
- init: function () {
59
- var that = this;
60
- this.unwrap();
61
- jQuery(this.vars.jpID).jPlayer({
62
- ready: function () {
63
- that.write_controls();
64
- that.startup();
65
- },
66
- volume: 100,
67
- swfPath: that.vars.pathto_swf
68
- })
69
- .jPlayer("onProgressChange", function (lp, ppR, ppA, pt, tt) {
70
- if (that.state !== '') {
71
- that.E_progress(that.tID, lp, ppR, ppA, pt, tt);
72
- }
73
- })
74
- .jPlayer("onSoundComplete", function () {
75
- that.E_complete(that.tID);
76
- });
77
- },
78
- write_controls: function () { //Sets up each player
79
- var j;
80
- for (j = 0; j < this.pl_info.length; j += 1) {
81
- this.setup_a_player(j);
82
- }
83
- },
84
- startup: function () { //Looks if there's something to play
85
- var j;
86
- for (j = 0; j < this.pl_info.length; j += 1) {
87
- if (this.pl_info[j].autoplay) {
88
- this.pl_info[j].autoplay = false;
89
- this.E_change_track(j, this.pl_info[j].tr);
90
- return;
91
- }
92
- }
93
- },
94
- setup_a_player: function (j) { //Sets up control clicks, lists, text for a player
95
- var i, li, sel, that = this, p = this.pl_info[j];
96
- // VOL SLIDER
97
- jQuery(this.eID.vol + j).slider({
98
- value : p.vol,
99
- max: 100,
100
- range: 'min',
101
- animate: false,
102
- slide: function (event, ui) {
103
- p.vol = ui.value;
104
- if (j === that.tID) {
105
- jQuery(that.vars.jpID).jPlayer("volume", ui.value);
106
- }
107
- }
108
- });
109
- //PLAY-PAUSE CLICKS
110
- sel = ('MI' === p.type) ? this.eID.play : this.eID.playW;
111
- jQuery(sel + j).click(function () {
112
- that.E_change_track(j, p.tr);
113
- jQuery(this).blur();
114
- });
115
- jQuery(sel + j).dblclick(function () {
116
- if (that.state !== "playing") {
117
- that.E_change_track(j, p.tr);
118
- }
119
- jQuery(this).blur();
120
- });
121
- //TEXT
122
- this.titles(j, p.tr);
123
-
124
- if ('MI' === p.type) {
125
- jQuery(this.eID.pT + j).text('00:00');
126
- jQuery(this.eID.indiM + j).text('Ready');
127
- //STOP CLICKS
128
- jQuery(this.eID.stp + j).click(function () {
129
- that.E_stop(j);
130
- jQuery(this).blur();
131
- });
132
- jQuery(this.eID.stp + j).dblclick(function () {
133
- that.E_dblstop(j);
134
- jQuery(this).blur();
135
- });
136
- //PREV & NEXT CLICKS
137
- jQuery(this.eID.plwrap + j).hide();
138
- if (p.list.length > 1) {
139
- jQuery(this.eID.next + j).click(function () {
140
- that.E_change_track(j, 'next');
141
- jQuery(this).blur();
142
- });
143
- jQuery(this.eID.prev + j).click(function () {
144
- that.E_change_track(j, 'prev');
145
- jQuery(this).blur();
146
- });
147
- //UL ITEMS
148
- jQuery(this.eID.ul + j).empty();
149
- for (i = 0; i < p.list.length; i += 1) {
150
- li = '<li>';
151
- li += '<a href="#" id="' + this.eID.a + j + '_' + i + '">' + p.list[i].name + '</a></li>';
152
- jQuery(this.eID.ul + j).append(li);
153
- //UL <a> CLICKS
154
- this.add_ul_click(j, i);
155
- }
156
- jQuery('#' + this.eID.a + j + '_' + p.tr).addClass('mp3j_A_current');
157
- //LIST TOGGLE
158
- jQuery(this.eID.toglist + j).click(function () {
159
- that.togglelist(j);
160
- jQuery(this).blur();
161
- });
162
- if (p.lstate === true) {
163
- jQuery(this.eID.plwrap + j).show();
164
- }
165
- }
166
- //DOWNLOAD
167
- this.writedownload(j, p.tr);
168
- //POPOUT BUTTON
169
- jQuery(this.eID.lPP + j).click(function () {
170
- jQuery(this).blur();
171
- return that.launchPP(j);
172
- });
173
- }
174
-
175
- if ('popout' === p.type) {
176
- jQuery(this.eID.pplink + j).click(function () {
177
- jQuery(this).blur();
178
- return that.launchPP(j);
179
- });
180
- }
181
-
182
- },
183
- add_ul_click: function (j, i) { //Creates the list item click on the <a>
184
- var that = this;
185
- jQuery('#' + this.eID.a + j + "_" + i).click(function () {
186
- that.E_change_track(j, i);
187
- jQuery(this).blur();
188
- return false;
189
- });
190
- },
191
-
192
- unwrap: function () {
193
- var i, j, arr;
194
- if (this.vars.play_f === true && typeof this.lists !== "undefined" && this.lists.length > 0) {
195
- for (i = 0; i < this.lists.length; i += 1) {
196
- arr = this.lists[i];
197
- for (j = 0; j < arr.length; j += 1) {
198
- arr[j].mp3 = this.f_undo.f_con(arr[j].mp3);
199
- }
200
- }
201
- }
202
- },
203
- f_undo: {
204
- keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
205
- f_con : function (input) {
206
- var output = "", i = 0, chr1, chr2, chr3, enc1, enc2, enc3, enc4;
207
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
208
- while (i < input.length) {
209
- enc1 = this.keyStr.indexOf(input.charAt(i++)); enc2 = this.keyStr.indexOf(input.charAt(i++));
210
- enc3 = this.keyStr.indexOf(input.charAt(i++)); enc4 = this.keyStr.indexOf(input.charAt(i++));
211
- chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4;
212
- output = output + String.fromCharCode(chr1);
213
- if (enc3 !== 64) { output = output + String.fromCharCode(chr2); }
214
- if (enc4 !== 64) { output = output + String.fromCharCode(chr3); }
215
- }
216
- output = this.utf8_f_con(output);
217
- return output;
218
- },
219
- utf8_f_con : function (utftext) {
220
- var string = "", i = 0, c, c1, c2, c3;
221
- while (i < utftext.length) {
222
- c = utftext.charCodeAt(i);
223
- if (c < 128) {
224
- string += String.fromCharCode(c); i++;
225
- } else if ((c > 191) && (c < 224)) {
226
- c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;
227
- } else {
228
- c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;
229
- }
230
- }
231
- return string;
232
- }
233
- },
234
-
235
- setit: function (file) {
236
- jQuery(this.vars.jpID).jPlayer("setFile", file);
237
- this.state = 'set';
238
- },
239
- playit: function () {
240
- jQuery(this.vars.jpID).jPlayer("play");
241
- this.state = 'playing';
242
- },
243
- pauseit: function () {
244
- jQuery(this.vars.jpID).jPlayer("pause");
245
- this.state = 'paused';
246
- },
247
- clearit: function () {
248
- jQuery(this.vars.jpID).jPlayer("clearFile");
249
- this.state = '';
250
- },
251
-
252
- Tformat: function (msec) {
253
- var t = msec/1000,
254
- s = Math.floor((t)%60),
255
- m = Math.floor((t/60)%60),
256
- h = Math.floor(t/3600);
257
- return ((h > 0) ? h+':' : '') + ((m > 9) ? m : '0'+m) + ':' + ((s > 9) ? s : '0'+s);
258
- }
259
- }; //Close var mp3j
260
-
261
-
262
- mp3j.E_stop = function (j) {
263
- if (j === this.tID && j !== '') {
264
- this.clearit();
265
- if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
266
- jQuery(this.eID.pos + j).slider('destroy');
267
- }
268
- this.button(j, 'play');
269
- jQuery(this.eID.tT + j).empty();
270
- if (this.pl_info[j].type === 'MI') {
271
- jQuery(this.eID.indiM + j).text('Stopped');
272
- } else {
273
- jQuery(this.eID.indiM + j).empty();
274
- }
275
- this.load_pc = 0;
276
- this.played_t = 0;
277
- }
278
- };
279
-
280
- mp3j.E_dblstop = function (j) {
281
- this.listclass(j, this.pl_info[j].tr, 0);
282
- if ( this.pl_info[j].tr !== 0 ) {
283
- this.titles(j, 0);
284
- }
285
- this.writedownload(j, 0);
286
- this.E_stop(j);
287
- jQuery(this.eID.indiM + j).text('Ready');
288
- this.pl_info[j].tr = 0;
289
- };
290
-
291
- mp3j.E_change_track = function (j, change) {
292
- var track, txt, p = this.pl_info[j];
293
- if (j === this.tID && change === p.tr) {
294
- if ('playing' === this.state) {
295
- if (this.load_pc === 0) {
296
- this.E_stop(j);
297
- } else {
298
- this.pauseit();
299
- this.button(j, 'play');
300
- if ('MI' === p.type) {
301
- jQuery(this.eID.indiM + j).text('Paused');
302
- }
303
- }
304
- return;
305
- } else if ('paused' === this.state || 'set' === this.state) {
306
- this.playit();
307
- this.button(j, 'pause');
308
- return;
309
- }
310
- }
311
- this.E_stop(this.tID);
312
-
313
- if ('prev' === change) {
314
- track = (p.tr-1 < 0) ? p.list.length-1 : p.tr-1;
315
- } else if ('next' === change) {
316
- track = (p.tr+1 < p.list.length) ? p.tr+1 : 0;
317
- } else {
318
- track = change;
319
- }
320
- jQuery(this.vars.jpID).jPlayer("volume", 100 ); //Vol scaling fix
321
- this.setit(p.list[track].mp3);
322
- this.playit();
323
- jQuery(this.vars.jpID).jPlayer("volume", p.vol ); //Reset to correct vol
324
-
325
- txt = ('MI' === p.type) ? '<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting' : '<span class="Smp3-finding"></span><span class="mp3-gtint"></span>';
326
- jQuery(this.eID.indiM + j).empty().append(txt);
327
- this.button(j, 'pause');
328
- this.makeslider(j);
329
- if ('MI' === p.type) {
330
- this.listclass(j, p.tr, track);
331
- if ( p.tr !== track ) {
332
- this.titles(j, track);
333
- }
334
- if (p.download) {
335
- this.writedownload(j, track);
336
- jQuery(this.eID.dload + j).hide().addClass('whilelinks').fadeIn(400);
337
- }
338
- }
339
- p.tr = track;
340
- this.tID = j;
341
- };
342
-
343
- mp3j.E_complete = function (j) {
344
- var p = this.pl_info[j];
345
- if ('MI' === p.type) {
346
- if (p.loop || p.tr+1 < p.list.length) {
347
- this.E_change_track(j, 'next');
348
- } else {
349
- this.E_dblstop(j);
350
- this.startup();
351
- }
352
- }
353
- if ('single' === p.type) {
354
- if (p.loop) {
355
- //this.E_change_track(j, p.tr);
356
- this.E_change_track(j, 'next');
357
- } else {
358
- this.E_stop(j);
359
- this.startup();
360
- }
361
- }
362
- };
363
-
364
- mp3j.E_progress = function (j, lp, ppR, ppA, pt, tt) {
365
- if (j !== '') {
366
- this.load_pc = lp;
367
- jQuery(this.eID.loader + j).css( "width", lp + '%' );
368
- jQuery(this.eID.poscol + j).css( "width", ppA + '%' );
369
- if ( jQuery(this.eID.pos + j + ' div.ui-widget-header').length > 0 ) {
370
- jQuery(this.eID.pos + j).slider('option', 'value', 10*ppA);
371
- }
372
- if (pt > 0) { jQuery(this.eID.pos + j).css( 'visibility', 'visible' ); }
373
- if (this.pl_info[j].type === 'MI') {
374
- jQuery(this.eID.pT + j).text(this.Tformat(pt));
375
- if (tt > 0) { jQuery(this.eID.tT + j).text(this.Tformat(tt)); }
376
- }
377
- if ('playing' === this.state) {
378
- if ('MI' === this.pl_info[j].type) {
379
- if (tt > 0 && this.played_t === pt) {
380
- jQuery(this.eID.indiM + j).empty().append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Buffering');
381
- } else if (pt > 0) {
382
- jQuery(this.eID.indiM + j).empty().append('Playing');
383
- }
384
- }
385
- if ('single' === this.pl_info[j].type){
386
- if (pt > 0 ) {
387
- if (this.played_t === pt) {
388
- jQuery(this.eID.indiM + j).empty().append('<span class="Smp3-finding"></span><span class="mp3-gtint"></span> ' + this.Tformat(pt));
389
- } else {
390
- jQuery(this.eID.indiM + j).empty().append('<span class="mp3-tint tintmarg"></span> ' + this.Tformat(pt));
391
- }
392
- }
393
- }
394
- }
395
- this.played_t = pt;
396
- }
397
- };
398
-
399
- mp3j.launchPP = function (j) {
400
- var li_height = 28;
401
- if ( this.pl_info[j].height !== false ) {
402
- this.vars.pp_playerheight = 100 + this.pl_info[j].height;
403
- }
404
- this.vars.pp_windowheight = ( this.pl_info[j].list.length > 1 ) ? this.vars.pp_playerheight + ( this.pl_info[j].list.length * li_height) : this.vars.pp_playerheight;
405
- if ( this.vars.pp_windowheight > this.vars.pp_maxheight ) {
406
- this.vars.pp_windowheight = this.vars.pp_maxheight;
407
- }
408
- this.vars.launched_ID = j;
409
- if ( this.state === "playing" ) {
410
- this.pl_info[j].autoplay = true;
411
- }
412
- this.E_stop(this.tID);
413
- this.setit(this.vars.silence);
414
- this.playit(); //Chrome let go of last track (incase it didn't finish loading)
415
- this.clearit();
416
-
417
- var newwindow = window.open(this.vars.popout_url, 'mp3jpopout', 'height=300, width=600, location=1, status=1, scrollbars=1, resizable=1, left=25, top=25');
418
- if ( this.pl_info[j].lstate === true ) {
419
- newwindow.resizeTo( this.vars.pp_width, this.vars.pp_windowheight );
420
- } else {
421
- newwindow.resizeTo( this.vars.pp_width, this.vars.pp_playerheight );
422
- }
423
- if (window.focus) {
424
- newwindow.focus();
425
- }
426
- return false;
427
- };
428
-
429
- mp3j.button = function (j, type) {
430
- if (j === '') { return; }
431
- if ('pause' === type) {
432
- if (this.pl_info[j].play_txt === '#USE_G#') {
433
- jQuery(this.eID.play + j).removeClass('buttons_mp3j').addClass('buttons_mp3jpause');
434
- } else {
435
- jQuery(this.eID.play + j).text(this.pl_info[j].pause_txt);
436
- }
437
- }
438
- if ('play' === type) {
439
- if (this.pl_info[j].play_txt === '#USE_G#') {
440
- jQuery(this.eID.play + j).removeClass('buttons_mp3jpause').addClass('buttons_mp3j');
441
- } else {
442
- jQuery(this.eID.play + j).text(this.pl_info[j].play_txt);
443
- }
444
- }
445
- };
446
-
447
- mp3j.listclass = function (j, rem, add) {
448
- jQuery('#'+ this.eID.a + j +'_'+ rem).removeClass('mp3j_A_current');
449
- jQuery('#'+ this.eID.a + j +'_'+ add).addClass('mp3j_A_current');
450
- };
451
-
452
- mp3j.titles = function (j, track) {
453
- var p = this.pl_info[j], Olink = '', Clink = '';
454
- if (p.type === "MI") {
455
- jQuery(this.eID.title + j).empty().append(p.list[track].name).append('<br /><span>' + p.list[track].artist + '</span>');
456
- if (p.list[track].image !== '') {
457
- if (p.list[track].imgurl !== '') {
458
- Olink = '<a href="' + p.list[track].imgurl + '">';
459
- Clink = '</a>';
460
- }
461
- jQuery(this.eID.img + j).empty().hide().append(Olink + '<img src="' + p.list[track].image + '" />' + Clink).fadeIn(300);
462
- }
463
- }
464
- };
465
-
466
- mp3j.writedownload = function (j, track) {
467
- var p = this.pl_info[j];
468
- if (p.download) {
469
- jQuery(this.eID.dload + j).empty().removeClass('whilelinks').append('<a href="' + p.list[track].mp3 + '">' + this.vars.dload_text + '</a>');
470
- }
471
- };
472
-
473
- mp3j.togglelist = function (j) {
474
- if (this.pl_info[j].lstate === true) {
475
- jQuery(this.eID.plwrap + j).fadeOut(300);
476
- jQuery(this.eID.toglist + j).text('SHOW');
477
- this.pl_info[j].lstate = false;
478
- } else if (this.pl_info[j].lstate === false) {
479
- jQuery(this.eID.plwrap + j).fadeIn("slow");
480
- jQuery(this.eID.toglist + j).text('HIDE');
481
- this.pl_info[j].lstate = true;
482
- }
483
- };
484
-
485
- mp3j.makeslider = function (j) {
486
- var phmove, cssmove, that = this;
487
- jQuery(this.eID.pos + j).css( 'visibility', 'hidden' );
488
- jQuery(this.eID.pos + j).slider({
489
- max: 1000,
490
- range: 'min',
491
- animate: false,
492
- slide: function (event, ui) {
493
- if (that.state === 'paused') {
494
- that.button(j, 'pause');
495
- }
496
- if ((ui.value/10) <= that.load_pc) {
497
- cssmove = ui.value/10;
498
- phmove = ui.value*(10.0/that.load_pc);
499
- } else {
500
- cssmove = that.load_pc;
501
- phmove = 100;
502
- }
503
- jQuery(that.eID.poscol + j).css('width', cssmove + '%');
504
- jQuery(that.vars.jpID).jPlayer("playHead", phmove );
505
- that.state = 'playing';
506
- }
507
- });
508
- };
509
-
510
- return mp3j;
511
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mp3j_admin.php CHANGED
@@ -45,6 +45,7 @@
45
  if (isset($_POST['file_separator'])) { $theOptions['f_separator'] = $_POST['file_separator']; }
46
  if (isset($_POST['caption_separator'])) { $theOptions['c_separator'] = $_POST['caption_separator']; }
47
 
 
48
  $theOptions['paddings_top'] = ( $_POST['mp3foxPaddings_top'] == "" ) ? "0px" : $_POST['mp3foxPaddings_top'];
49
  $theOptions['paddings_bottom'] = ( $_POST['mp3foxPaddings_bottom'] == "" ) ? "0px" : $_POST['mp3foxPaddings_bottom'];
50
  $theOptions['paddings_inner'] = ( $_POST['mp3foxPaddings_inner'] == "" ) ? "0px" : $_POST['mp3foxPaddings_inner'];
@@ -79,6 +80,14 @@
79
  $theOptions['volslider_on_mp3j'] = (isset($_POST['volslider_onmp3j'])) ? $_POST['volslider_onmp3j'] : "false";
80
  $theOptions['touch_punch_js'] = (isset($_POST['touch_punch_js'])) ? $_POST['touch_punch_js'] : "false";
81
 
 
 
 
 
 
 
 
 
82
  // Colours array//
83
  if (isset($_POST['mp3foxScreenColour'])) { $colours_array['screen_colour'] = $_POST['mp3foxScreenColour']; }
84
  if (isset($_POST['mp3foxScreenOpac'])) { $colours_array['screen_opacity'] = $_POST['mp3foxScreenOpac']; }
@@ -124,8 +133,10 @@
124
 
125
  <div id="tog_0-list" style="border-bottom:1px solid #ccc; margin-bottom:25px;">
126
 
127
- <p>Add players using <code>[mp3j]</code> <code>[mp3t]</code> <code>[mp3-jplayer]</code> <code>[mp3-popout]</code> shortcodes, and <a href="widgets.php">widgets</a>.</p>
128
 
 
 
129
  <div class="Ahelp1">
130
 
131
  <h4><code>[mp3-jplayer]</code> <span class="description">Playlist player</span></h4>
@@ -150,7 +161,7 @@
150
  <code>images</code> <span class="description">comma separated list of track image urls</span><br />
151
  <!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
152
  <code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
153
- <code>style</code> <span class="description">css class names(s) to add</span></p>
154
 
155
  </div>
156
 
@@ -169,7 +180,7 @@
169
  <code>flip</code> <span class="description">y/n (play/pause)</span><br />
170
  <code>ind</code> <span class="description">y/n (hide indicator and time)</span><br />
171
  <code>flow</code> <span class="description">y/n (don't line break)</span><br />
172
- <code>style</code> <span class="description">css class names(s) to add</span></p>
173
 
174
  <h5>Also for <code>[mp3t]</code></h5>
175
  <p><code>play</code> play button text<br /><code>stop</code> pause button text</p>
@@ -199,7 +210,7 @@
199
  <code>images</code> <span class="description">comma separated list of track image urls</span><br />
200
  <!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
201
  <code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
202
- <code>style</code> <span class="description">css class names(s) to add</span></p>
203
  </div>
204
 
205
  <!-- Not in this release
@@ -211,14 +222,14 @@
211
 
212
  <br class="clearB" /><br />
213
 
214
- <p><strong>Eg</strong>. <span class="description">Single file player:</span> <code>[mp3j track="myfile.mp3"]</code><br />
215
- <strong>Eg</strong>. <span class="description">Playlist fplayer:</span> <code>[mp3-jplayer tracks="myfileA.mp3, myfileB.mp3, myfileC.mp3"]</code><br />
216
- <strong>Eg</strong>. <span class="description">Add titles:</span> <code>[mp3-jplayer tracks="MyTitle@myfileA.mp3, MyTitle@myfileB.mp3, MyTitle@myfileC.mp3"]</code><br />
 
217
  <strong>Eg</strong>. <span class="description">Add captions:</span> <code>[mp3-jplayer tracks="fileA.mp3, fileB.mp3" captions="Caption A; Caption B"]</code></p>
218
-
219
  <br />
220
 
221
-
222
  <p><strong>Use these commands with [mp3-jplayer] in the <code>tracks</code> parameter to playlist entire folders or the library:</strong></p>
223
  <p><code>FEED:LIB</code> playlists all mp3s in the library.<br />
224
  <code>FEED:DF</code> playlists your default folder.<br />
@@ -231,8 +242,8 @@
231
  directory in the default folder eg. <code>tracks=&quot;subfolder/file.mp3&quot;</code>.</p>
232
 
233
  <br />
234
-
235
- <p><strong>Custom Fields</strong></p>
236
  <p>You can write playlists into the custom fields that are on page and post edit screens (check your 'screen options' at top-right
237
  if they're not visible). They can be picked up with any of the shortcodes (from any page/post, or with the template tag, or by the widgets). See below for how
238
  to set them up and some example uses:</p>
@@ -244,7 +255,7 @@
244
  <br />2. Add the title, then an '@' before the filename in the right box, eg: <code>My Title@filename</code></p>
245
  <p>The keys (left boxes) can be numbered, eg:<code>1 mp3</code> will be first on the playlist.</p>
246
 
247
- <p>Example - If a custom field key/value pair is set as <code>mp3</code> and <code>FEED:LIB</code>, then the library is available to any shortcodes, so:<br />
248
 
249
  <code>[mp3j]</code> or <code>[mp3t]</code> <span class="description">plays the next track from the library in a single player</span> <br />
250
  <code>[mp3j track="3"]</code> or <code>[mp3t track="3"]</code> <span class="description">plays track 3 from the library in a single player</span> <br />
@@ -253,34 +264,29 @@
253
  <br />
254
 
255
 
256
- <p><strong>Widgets</strong></p>
257
  <p class="description">
258
  MP3j-sh - <span class="description">Adds players by writing shortcodes.</span><br />
259
  MP3j-ui - <span class="description">Adds a playlist player by using tick boxes and modes. Note that some features such as manually written captions, and additional style (css classes) cannot be set with this widget, use the mp3j-sh widget instead.</span>
260
  </p>
261
  <br />
262
- <h4 class="description" style="color:#606060;">Template Tags</h4>
263
- <p class="description">For use in theme files:</p>
264
- <p style="line-height:22px;"><code style="font-size:13px;">mp3j_addscripts( $style )<br />mp3j_put( $shortcodes )<br />mp3j_grab_library( $format )<br/>mp3j_debug()</code></p>
265
-
266
  <br />
267
 
268
- <!--<p class="description">More Info: &nbsp;<a href="<?php //echo get_bloginfo('wpurl'); ?>/wp-content/plugins/mp3-jplayer/player-help.htm">Player Guide</a> | <a href="<?php //echo get_bloginfo('wpurl'); ?>/wp-content/plugins/mp3-jplayer/template-tag-help.htm">Template Tag Help</a> | <a href="http://sjward.org/jplayer-for-wordpress">Plugin Home Page</a></p>-->
269
- <p class="description">More Info:<br /><a href="http://sjward.org/jplayer-for-wordpress">Demo page</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a></p>
270
-
 
271
 
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
 
 
 
284
 
285
  </div>
286
 
@@ -290,6 +296,13 @@
290
  <p class="jtick"><input type="checkbox" name="mp3foxPlaylistRepeat" value="true" <?php if ($theOptions['playlist_repeat'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Loop</p>
291
  <p class="jtick"><input type="checkbox" name="mp3foxAddTrackNumbers" value="true" <?php if ($theOptions['add_track_numbering'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Number the tracks</p>
292
  <!--<p class="jtick"><input type="checkbox" name="mp3foxAnimSliders" value="true" <?php //if ($theOptions['animate_sliders'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Animate sliders</p>-->
 
 
 
 
 
 
 
293
  <br />
294
  <p class="jtick"><input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($theOptions['player_onblog'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Show players in posts on index, archive, and search pages &nbsp;<span class="description">(doesn't affect widgets)</span></p>
295
  <p class="jtick"><input type="checkbox" name="runShcodeInExcerpt" value="true" <?php if ($theOptions['run_shcode_in_excerpt'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Run shortcodes in post excerpts &nbsp;<span class="description">(this works for manually written post excerpts only)</span></p>
@@ -522,7 +535,7 @@
522
  $files[$i] = strrchr( $uri, "/" );
523
  $files[$i] = str_replace( "/", "", $files[$i] );
524
  }
525
- $c = count($files);
526
  echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">This folder contains <strong>" . $c . "</strong> mp3";
527
  if ( $c != 1 ) { echo "'s&nbsp;"; }
528
  else { echo "&nbsp;"; }
@@ -554,6 +567,7 @@
554
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>-->
555
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>
556
  <div id="fox_op1-list" class="jopbox">
 
557
  <p>Width: &nbsp; <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $theOptions['player_width']; ?>" /> &nbsp; <span class="description">pixels (px) or percent (%)</span></p>
558
  <p>Align: &nbsp;&nbsp;
559
  <select name="mp3foxFloat" style="width:94px; font-size:11px; line-height:16px;">
@@ -563,29 +577,54 @@
563
  <option value="left" <?php if ( 'left' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float left</option>
564
  <option value="right" <?php if ( 'right' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float right</option>
565
  </select></p>
566
- <br />
567
 
568
  <!-- <p><input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php //if ($theOptions['show_downloadmp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Display a 'Download mp3' link</p> -->
569
  <h3 style="margin-left:0;"><strong>Downloads</strong></h3>
570
- <p>Show download link: &nbsp;&nbsp;
571
- <select name="mp3foxDownloadMp3" style="width:125px; font-size:11px; line-height:16px;">
572
  <option value="true" <?php if ( 'true' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Yes</option>
573
  <option value="false" <?php if ( 'false' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>No</option>
574
  <option value="loggedin" <?php if ( 'loggedin' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>To logged in users</option>
575
  </select>
576
- &nbsp; <span class="description">(can be set per-player via shortcodes)</span></p>
577
- <p style="margin-bottom:10px;">Download link text: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" style="width:145px;" name="dload_text" value="<?php echo $theOptions['dload_text']; ?>" /></p>
578
 
579
- <p class="description">When setting a player for logged in downloads, use the following options to add text/link for logged out visitors:</p>
580
  <p style="margin-left:30px;">Visitor text: &nbsp; <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $theOptions['loggedout_dload_text']; ?>" /> &nbsp;<span class="description">(leave blank for no text/link)</span></p>
581
  <p style="margin-left:30px;">Visitor link: &nbsp; <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $theOptions['loggedout_dload_link']; ?>" /> &nbsp;<span class="description">(optional url for visitor text)</span></p>
582
-
583
  <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584
  <h3 style="margin-left:0;"><strong>Margins</strong></h3>
585
  <p>Above players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $theOptions['paddings_top']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
586
  Inner margin: (floated players) &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $theOptions['paddings_inner']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
587
  Below players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $theOptions['paddings_bottom']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span></p>
588
- <br />
 
 
589
  <h3 style="margin-left:0;"><strong>Playlists</strong></h3>
590
  <p>Max playlist height: &nbsp; <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $theOptions['max_list_height']; ?>" /> px &nbsp; <span class="description">(a scroll bar will show for longer playlists, leave it blank for no limit)</span></p>
591
  <p><input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($theOptions['playlist_show'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Start with playlists showing</p>
@@ -638,6 +677,17 @@
638
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>-->
639
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>
640
  <div id="fox_op4-list" class="jopbox">
 
 
 
 
 
 
 
 
 
 
 
641
  <p><input type="checkbox" name="mp3foxUseFixedCSS" value="true" <?php if ($theOptions['use_fixed_css'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass colour settings<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(colours can still be set in css)</span></p>
642
  <p><input type="checkbox" name="disableTemplateTag" value="true" <?php if ($theOptions['disable_template_tag'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass player template-tags in theme files<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(ignores mp3j_addscripts() and mp3j_put() template functions)</span></p>
643
 
@@ -645,7 +695,7 @@
645
  <p<?php echo $greyout_text; ?>><input type="checkbox" name="touch_punch_js" value="true" <?php if ($theOptions['touch_punch_js'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Include additional js for touch screen support<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description"<?php echo $greyout_text; ?>>(adds jquery.ui.touch-punch.js script)</span></p>
646
  <p><input type="checkbox" name="mp3foxEchoDebug" value="true" <?php if ($theOptions['echo_debug'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Turn on debug<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(info appears in the source view near the bottom)</span></p>
647
  <?php $bgc = ( $theOptions['disable_jquery_libs'] == "yes" ) ? "#fdd" : "#f9f9f9"; ?>
648
- <div style="margin: 10px 0px 10px 0px; padding:6px; background:<?php echo $bgc; ?>; border:1px solid #eee;">
649
  <p style="margin:0 0 5px 18px;">Disable jQuery and jQuery-UI javascript libraries? &nbsp; <input type="text" style="width:60px;" name="disableJSlibs" value="<?php echo $theOptions['disable_jquery_libs']; ?>" /></p>
650
  <p style="margin: 0 0 8px 18px;"><span class="description"><strong>CAUTION!!</strong> This option will bypass the request <strong>from this plugin only</strong> for both jQuery <strong>and</strong> jQuery-UI scripts,
651
  you <strong>MUST</strong> be providing these scripts from an alternative source.
45
  if (isset($_POST['file_separator'])) { $theOptions['f_separator'] = $_POST['file_separator']; }
46
  if (isset($_POST['caption_separator'])) { $theOptions['c_separator'] = $_POST['caption_separator']; }
47
 
48
+
49
  $theOptions['paddings_top'] = ( $_POST['mp3foxPaddings_top'] == "" ) ? "0px" : $_POST['mp3foxPaddings_top'];
50
  $theOptions['paddings_bottom'] = ( $_POST['mp3foxPaddings_bottom'] == "" ) ? "0px" : $_POST['mp3foxPaddings_bottom'];
51
  $theOptions['paddings_inner'] = ( $_POST['mp3foxPaddings_inner'] == "" ) ? "0px" : $_POST['mp3foxPaddings_inner'];
80
  $theOptions['volslider_on_mp3j'] = (isset($_POST['volslider_onmp3j'])) ? $_POST['volslider_onmp3j'] : "false";
81
  $theOptions['touch_punch_js'] = (isset($_POST['touch_punch_js'])) ? $_POST['touch_punch_js'] : "false";
82
 
83
+ $theOptions['force_browser_dload'] = (isset($_POST['force_browser_dload'])) ? $_POST['force_browser_dload'] : "false";
84
+ $theOptions['make_player_from_link'] = (isset($_POST['make_player_from_link'])) ? $_POST['make_player_from_link'] : "false";
85
+ if (isset($_POST['make_player_from_link_shcode'])) { $theOptions['make_player_from_link_shcode'] = $_POST['make_player_from_link_shcode']; }
86
+
87
+ //if (isset($_POST['force_browser_dload_remote'])) { $theOptions['force_browser_dload_remote'] = $_POST['force_browser_dload_remote']; }
88
+
89
+ $theOptions['dloader_remote_path'] = (isset($_POST['dloader_remote_path'])) ? $_POST['dloader_remote_path'] : "";
90
+
91
  // Colours array//
92
  if (isset($_POST['mp3foxScreenColour'])) { $colours_array['screen_colour'] = $_POST['mp3foxScreenColour']; }
93
  if (isset($_POST['mp3foxScreenOpac'])) { $colours_array['screen_opacity'] = $_POST['mp3foxScreenOpac']; }
133
 
134
  <div id="tog_0-list" style="border-bottom:1px solid #ccc; margin-bottom:25px;">
135
 
136
+ <p>Add players using <code>[mp3j]</code> <code>[mp3t]</code> <code>[mp3-jplayer]</code> <code>[mp3-popout]</code> shortcodes, links to mp3s, <a href="widgets.php">widgets</a>, and <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tags</a>.</p>
137
 
138
+ <br />
139
+ <h3 style="margin-left:0;">Shortcode Parameters</h3>
140
  <div class="Ahelp1">
141
 
142
  <h4><code>[mp3-jplayer]</code> <span class="description">Playlist player</span></h4>
161
  <code>images</code> <span class="description">comma separated list of track image urls</span><br />
162
  <!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
163
  <code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
164
+ <code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
165
 
166
  </div>
167
 
180
  <code>flip</code> <span class="description">y/n (play/pause)</span><br />
181
  <code>ind</code> <span class="description">y/n (hide indicator and time)</span><br />
182
  <code>flow</code> <span class="description">y/n (don't line break)</span><br />
183
+ <code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
184
 
185
  <h5>Also for <code>[mp3t]</code></h5>
186
  <p><code>play</code> play button text<br /><code>stop</code> pause button text</p>
210
  <code>images</code> <span class="description">comma separated list of track image urls</span><br />
211
  <!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
212
  <code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
213
+ <code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
214
  </div>
215
 
216
  <!-- Not in this release
222
 
223
  <br class="clearB" /><br />
224
 
225
+ <p><strong>Eg</strong>. <span class="description">Play a url:</span> <code>[mp3j track="http://somedomain.com/myfile.mp3"]</code><br />
226
+ <strong>Eg</strong>. <span class="description">Play a file from default folder (set below) or library:</span> <code>[mp3j track="myfile.mp3"]</code><br />
227
+ <strong>Eg</strong>. <span class="description">Make a playlist player:</span> <code>[mp3-jplayer tracks="fileA.mp3, http://somedomain.com/fileB.mp3, fileC.mp3"]</code><br />
228
+ <strong>Eg</strong>. <span class="description">Add titles:</span> <code>[mp3-jplayer tracks="My Title@fileA.mp3, My Title@fileB.mp3, My Title@fileC.mp3"]</code><br />
229
  <strong>Eg</strong>. <span class="description">Add captions:</span> <code>[mp3-jplayer tracks="fileA.mp3, fileB.mp3" captions="Caption A; Caption B"]</code></p>
230
+ <p><a href="http://sjward.org/jplayer-for-wordpress" target="_blank">More shortcode examples</a></p>
231
  <br />
232
 
 
233
  <p><strong>Use these commands with [mp3-jplayer] in the <code>tracks</code> parameter to playlist entire folders or the library:</strong></p>
234
  <p><code>FEED:LIB</code> playlists all mp3s in the library.<br />
235
  <code>FEED:DF</code> playlists your default folder.<br />
242
  directory in the default folder eg. <code>tracks=&quot;subfolder/file.mp3&quot;</code>.</p>
243
 
244
  <br />
245
+
246
+ <h3 style="margin-left:0;">Custom Fields</h3>
247
  <p>You can write playlists into the custom fields that are on page and post edit screens (check your 'screen options' at top-right
248
  if they're not visible). They can be picked up with any of the shortcodes (from any page/post, or with the template tag, or by the widgets). See below for how
249
  to set them up and some example uses:</p>
255
  <br />2. Add the title, then an '@' before the filename in the right box, eg: <code>My Title@filename</code></p>
256
  <p>The keys (left boxes) can be numbered, eg:<code>1 mp3</code> will be first on the playlist.</p>
257
 
258
+ <p><strong>Eg</strong>. If a custom field key / value pair is set as <code>mp3</code> / <code>FEED:LIB</code>, then the library is available to any shortcodes, so:<br />
259
 
260
  <code>[mp3j]</code> or <code>[mp3t]</code> <span class="description">plays the next track from the library in a single player</span> <br />
261
  <code>[mp3j track="3"]</code> or <code>[mp3t track="3"]</code> <span class="description">plays track 3 from the library in a single player</span> <br />
264
  <br />
265
 
266
 
267
+ <h3 style="margin-left:0;">Widgets</h3>
268
  <p class="description">
269
  MP3j-sh - <span class="description">Adds players by writing shortcodes.</span><br />
270
  MP3j-ui - <span class="description">Adds a playlist player by using tick boxes and modes. Note that some features such as manually written captions, and additional style (css classes) cannot be set with this widget, use the mp3j-sh widget instead.</span>
271
  </p>
272
  <br />
273
+ <h3 style="margin-left:0;">Template Tags</h3>
274
+ <p class="description">For use in theme files, See <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a> for more details.</p>
275
+ <p style="line-height:22px;"><code style="font-size:13px;">mp3j_addscripts( $style )</code><br /><code style="font-size:13px;">mp3j_put( $shortcodes )</code><br /><code style="font-size:13px;">mp3j_grab_library( $format )</code><br/><code style="font-size:13px;">mp3j_debug()</code></p>
276
+
277
  <br />
278
 
279
+ <h3 style="margin-left:0;">Testing</h3>
280
+ <p><strong>Make sure you're using default plugin settings for these tests.</strong></p>
281
+ <p>You can test the plugin with a valid mp3 by copy/pasting the following shortcode into a page or post:<br />
282
+ <code>[mp3-jplayer tracks="http://sjward.org/seven.mp3"]</code></p>
283
 
284
+ <p>To test link replacement copy/paste one of these links, if you're not sure which one then paste them both (one of them should work):</p>
285
+ <p>If you use the visual (default) editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code><br />
286
+ If you use the text editor: <code>&lt;a href="http://sjward.org/seven.mp3"&gt;Test link&lt;/a&gt;</code></p>
 
 
 
 
 
 
 
 
287
 
288
+ <p><br />Links to info:<br /><a href="http://sjward.org/jplayer-for-wordpress">Demo page</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Style Parameter Help</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">Forcing Remote Downloads</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a></p>
289
+ <br /><br />
290
 
291
  </div>
292
 
296
  <p class="jtick"><input type="checkbox" name="mp3foxPlaylistRepeat" value="true" <?php if ($theOptions['playlist_repeat'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Loop</p>
297
  <p class="jtick"><input type="checkbox" name="mp3foxAddTrackNumbers" value="true" <?php if ($theOptions['add_track_numbering'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Number the tracks</p>
298
  <!--<p class="jtick"><input type="checkbox" name="mp3foxAnimSliders" value="true" <?php //if ($theOptions['animate_sliders'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Animate sliders</p>-->
299
+
300
+ <br />
301
+ <p class="jtick"><input type="checkbox" name="make_player_from_link" value="true" <?php if ($theOptions['make_player_from_link'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> />
302
+ &nbsp; Turn mp3 links into players</p>
303
+ <p style="margin-left:45px;"><span class="description">(Use the 'Add media' button on the edit screen to add links, or you can manually add/write links into the page. Links will be turned into players using the shortcode specified under 'Template Options' below.)</span></p>
304
+
305
+
306
  <br />
307
  <p class="jtick"><input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($theOptions['player_onblog'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Show players in posts on index, archive, and search pages &nbsp;<span class="description">(doesn't affect widgets)</span></p>
308
  <p class="jtick"><input type="checkbox" name="runShcodeInExcerpt" value="true" <?php if ($theOptions['run_shcode_in_excerpt'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Run shortcodes in post excerpts &nbsp;<span class="description">(this works for manually written post excerpts only)</span></p>
535
  $files[$i] = strrchr( $uri, "/" );
536
  $files[$i] = str_replace( "/", "", $files[$i] );
537
  }
538
+ $c = (!empty($files)) ? count($files) : 0;
539
  echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">This folder contains <strong>" . $c . "</strong> mp3";
540
  if ( $c != 1 ) { echo "'s&nbsp;"; }
541
  else { echo "&nbsp;"; }
567
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>-->
568
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>
569
  <div id="fox_op1-list" class="jopbox">
570
+ <br />
571
  <p>Width: &nbsp; <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $theOptions['player_width']; ?>" /> &nbsp; <span class="description">pixels (px) or percent (%)</span></p>
572
  <p>Align: &nbsp;&nbsp;
573
  <select name="mp3foxFloat" style="width:94px; font-size:11px; line-height:16px;">
577
  <option value="left" <?php if ( 'left' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float left</option>
578
  <option value="right" <?php if ( 'right' == $theOptions['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float right</option>
579
  </select></p>
580
+ <br /><br />
581
 
582
  <!-- <p><input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php //if ($theOptions['show_downloadmp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Display a 'Download mp3' link</p> -->
583
  <h3 style="margin-left:0;"><strong>Downloads</strong></h3>
584
+ <p style="margin-bottom:10px;">Show download link:
585
+ <select name="mp3foxDownloadMp3" style="width:120px; font-size:11px; line-height:16px;">
586
  <option value="true" <?php if ( 'true' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Yes</option>
587
  <option value="false" <?php if ( 'false' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>No</option>
588
  <option value="loggedin" <?php if ( 'loggedin' == $theOptions['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>To logged in users</option>
589
  </select>
590
+ &nbsp;&nbsp;
591
+ </p>
592
 
593
+ <p class="description" style="margin:0 0 5px 30px;">When setting a player for logged in downloads, use the following options to add text/link for logged out visitors:</p>
594
  <p style="margin-left:30px;">Visitor text: &nbsp; <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $theOptions['loggedout_dload_text']; ?>" /> &nbsp;<span class="description">(leave blank for no text/link)</span></p>
595
  <p style="margin-left:30px;">Visitor link: &nbsp; <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $theOptions['loggedout_dload_link']; ?>" /> &nbsp;<span class="description">(optional url for visitor text)</span></p>
596
+
597
  <br />
598
+ <!--<span class="description">(can be set per-player via shortcodes)</span>-->
599
+
600
+ <p>Download link text: <input type="text" style="width:140px;" name="dload_text" value="<?php echo $theOptions['dload_text']; ?>" /></p>
601
+
602
+ <p style="margin-top:15px;"><input type="checkbox" name="force_browser_dload" value="true" <?php if ($theOptions['force_browser_dload'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;
603
+ Try to force browsers to save downloads <span class="description">(no mobile support yet)</span>
604
+ <!--&nbsp; Local files
605
+ <input type="radio" name="force_browser_dload_remote" value="false" <?php //if ($theOptions['force_browser_dload_remote'] == "false") { echo 'checked="checked"'; } ?> />
606
+ &nbsp; | &nbsp;
607
+ <input type="radio" name="force_browser_dload_remote" value="true" <?php //if ($theOptions['force_browser_dload_remote'] == "true") { echo 'checked="checked"'; } ?>/>
608
+ All files -->
609
+ </p>
610
+
611
+ <p style="margin:10px 0 0 30px;"><span class="description">If you play from other domains and want to force the download, then use
612
+ the field<br />below to specify a path to a downloader file. <a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">See help on setting this up</a>.</span></p>
613
+
614
+ <p style="margin:5px 0 0 30px;">Path to remote downloader files: <input type="text" style="width:240px;" name="dloader_remote_path" value="<?php echo $theOptions['dloader_remote_path']; ?>" /></p>
615
+
616
+ <!--<p style="margin:5px 0 0 25px;"><span class="description">(if you select 'All files' then you'll need to place a downloader file on any remote servers you want to force downloads from.
617
+ There's a file included in the plugin for use on servers running php, see <a href="<?php //echo $mp3_fox->PluginFolder; ?>/remote/help.txt">remote setup help</a> for instructions)</span></p>-->
618
+
619
+
620
+ <br /><br />
621
  <h3 style="margin-left:0;"><strong>Margins</strong></h3>
622
  <p>Above players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $theOptions['paddings_top']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
623
  Inner margin: (floated players) &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $theOptions['paddings_inner']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span><br />
624
  Below players: &nbsp; <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $theOptions['paddings_bottom']; ?>" /> <span class="description">&nbsp; pixels (px) or percent (%)</span></p>
625
+
626
+
627
+ <br /><br />
628
  <h3 style="margin-left:0;"><strong>Playlists</strong></h3>
629
  <p>Max playlist height: &nbsp; <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $theOptions['max_list_height']; ?>" /> px &nbsp; <span class="description">(a scroll bar will show for longer playlists, leave it blank for no limit)</span></p>
630
  <p><input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($theOptions['playlist_show'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp; Start with playlists showing</p>
677
  <!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>-->
678
  <a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>
679
  <div id="fox_op4-list" class="jopbox">
680
+
681
+
682
+ <p style="margin:10px 0 10px 0px;">Shortcode for 'Turn mp3 links into players' option:</p>
683
+
684
+ <p style="margin:0px 0 20px 25px;"><textarea class="widefat" style="width:580px; height:100px;" name="make_player_from_link_shcode"><?php
685
+ $deslashed = str_replace('\"', '"', $theOptions['make_player_from_link_shcode'] );
686
+ echo $deslashed;
687
+ ?></textarea><br /><span class="description">Can also include text/html. Placeholders:</span> <code>{TEXT}</code> <span class="description">- Link text,</span> <code>{URL}</code> <span class="description">- Link url.</span></p>
688
+
689
+
690
+
691
  <p><input type="checkbox" name="mp3foxUseFixedCSS" value="true" <?php if ($theOptions['use_fixed_css'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass colour settings<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(colours can still be set in css)</span></p>
692
  <p><input type="checkbox" name="disableTemplateTag" value="true" <?php if ($theOptions['disable_template_tag'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Bypass player template-tags in theme files<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(ignores mp3j_addscripts() and mp3j_put() template functions)</span></p>
693
 
695
  <p<?php echo $greyout_text; ?>><input type="checkbox" name="touch_punch_js" value="true" <?php if ($theOptions['touch_punch_js'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Include additional js for touch screen support<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description"<?php echo $greyout_text; ?>>(adds jquery.ui.touch-punch.js script)</span></p>
696
  <p><input type="checkbox" name="mp3foxEchoDebug" value="true" <?php if ($theOptions['echo_debug'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> &nbsp;Turn on debug<br />&nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(info appears in the source view near the bottom)</span></p>
697
  <?php $bgc = ( $theOptions['disable_jquery_libs'] == "yes" ) ? "#fdd" : "#f9f9f9"; ?>
698
+ <div style="margin: 20px 0px 10px 0px; padding:6px; background:<?php echo $bgc; ?>; border:1px solid #eee;">
699
  <p style="margin:0 0 5px 18px;">Disable jQuery and jQuery-UI javascript libraries? &nbsp; <input type="text" style="width:60px;" name="disableJSlibs" value="<?php echo $theOptions['disable_jquery_libs']; ?>" /></p>
700
  <p style="margin: 0 0 8px 18px;"><span class="description"><strong>CAUTION!!</strong> This option will bypass the request <strong>from this plugin only</strong> for both jQuery <strong>and</strong> jQuery-UI scripts,
701
  you <strong>MUST</strong> be providing these scripts from an alternative source.
mp3j_frontend.php CHANGED
@@ -1,21 +1,20 @@
1
  <?php
2
  if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Front extends MP3j_Main {
3
 
4
- /* Called on deactivation,
5
- keeps settings if option was ticked. */
6
  function uninitFox() {
7
-
8
  $theOptions = get_option($this->adminOptionsName);
9
  if ( $theOptions['remember_settings'] == "false" ) {
10
  delete_option($this->adminOptionsName);
11
  }
12
  }
13
 
 
14
  /* Flags for scripts via
15
  template tag mp3j_addscripts(). */
16
  function scripts_tag_handler( $style = "" ) {
17
-
18
- // Since 1.7 - convert old option name to new
19
  if ( $style == "styleA" || $style == "styleE" ) { $style = "styleF"; }
20
  if ( $style == "styleB" ) { $style = "styleG"; }
21
  if ( $style == "styleC" ) { $style = "styleH"; }
@@ -25,37 +24,37 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
25
  $this->scriptsflag = "true";
26
  return;
27
  }
 
28
 
29
  /* Returns library via
30
  template tag mp3j_grab_library(). */
31
  function grablibrary_handler( $x ) {
32
-
33
  return $this->grab_library_info();
34
  }
35
 
 
36
  /* Checks whether js and css scripts are needed
37
  on the page, and which css sheet to use if they are. */
38
  function header_scripts_handler() {
39
-
40
  $scripts = false;
41
  $allowed_widget = $this->has_allowed_widget( "mp3-jplayer-widget" );
42
  $allowed_widget_B = $this->has_allowed_widget( "mp3mi-widget" );
43
- // Flagged in template
44
  if ( $this->scriptsflag == "true" && $this->theSettings['disable_template_tag'] == "false" ) {
45
  $scripts = true;
46
  }
47
- // On page types
48
  if ( is_home() || is_archive() || is_search() ) {
49
  if ( $allowed_widget || $allowed_widget_B || $this->theSettings['player_onblog'] == "true" ) {
50
  $scripts = true;
51
  }
52
  }
53
  if ( is_singular() ) {
54
- if ( $allowed_widget || $allowed_widget_B || $this->has_shortcodes() ) {
55
  $scripts = true;
56
  }
57
  }
58
- // Add the scripts
59
  if ( $scripts ) {
60
  $style = ( $this->stylesheet == "" ) ? $this->theSettings['player_theme'] : $this->stylesheet;
61
  $this->add_Scripts( $style );
@@ -67,11 +66,12 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
67
  return;
68
  }
69
 
70
- /* Checks whether to write js playlists and startup,
71
- and diagnostic info. */
72
- function footercode_handler() {
73
 
74
- // Write js playlists
 
 
 
 
75
  if ( !empty($this->JS['playlists']) ) {
76
  $c = count($this->JS['playlists']);
77
  echo "\n<script type=\"text/javascript\">\nvar MP3J_PLAYLISTS = {";
@@ -84,14 +84,12 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
84
  echo "\n};\n</script>\n";
85
  }
86
 
87
- // Write doc ready
88
  if ( !empty($this->JS['players']) ) {
89
 
90
  $pp_bodycol = ( $this->theSettings['popout_background'] == "" ) ? "#fff" : $this->theSettings['popout_background'];
91
  echo "\n<script type=\"text/javascript\">\njQuery(document).ready(function () {";
92
- echo "\nif (typeof create_mp3_jplayer !== 'undefined') {";
93
- echo "
94
- MP3_JPLAYER = create_mp3_jplayer();";
95
 
96
  if ( !empty($this->JS['Stitle']) ) {
97
  echo "\n\tMP3_JPLAYER.footerjs = function () {\n" . $this->JS['Stitle'] . "\t};";
@@ -99,11 +97,17 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
99
 
100
  echo "
101
  MP3_JPLAYER.vars.play_f = " . $this->theSettings['encode_files'] . ";
102
- MP3_JPLAYER.vars.pathto_swf = '" . $this->PluginFolder . "/js';";
 
 
 
 
 
 
 
103
 
104
  if ( $this->theSettings['enable_popout'] == "true" ) {
105
  echo "
106
- MP3_JPLAYER.vars.popout_url = '" . $this->PluginFolder . "/popout.php';
107
  MP3_JPLAYER.vars.pp_width = " . $this->theSettings['popout_width'] . ";
108
  MP3_JPLAYER.vars.pp_maxheight = " . $this->theSettings['popout_max_height'] . ";
109
  MP3_JPLAYER.vars.pp_bodycolour = '" . $pp_bodycol . "';
@@ -112,11 +116,10 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
112
  }
113
 
114
  echo "
115
- MP3_JPLAYER.vars.silence = '" . $this->PluginFolder . "/mp3/silence.mp3';
116
  MP3_JPLAYER.vars.dload_text = '" . $this->theSettings['dload_text'] . "';
117
  MP3_JPLAYER.vars.stylesheet_url = '" . $this->PP_css_url . "';";
118
 
119
- // Write players info array js
120
  if ( !empty($this->JS['players']) ) {
121
  $c = count($this->JS['players']);
122
  echo "\n\tMP3_JPLAYER.pl_info = [";
@@ -127,7 +130,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
127
  echo "\n\t];";
128
  }
129
 
130
- //write listnames
131
  if ( !empty($this->JS['listref']) ) {
132
  $c = count($this->JS['listref']);
133
  echo "\n\n\tMP3_JPLAYER.lists = [";
@@ -137,26 +140,31 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
137
  }
138
  echo "\n\t];\n";
139
  }
140
- //add popout_css property
 
141
  echo $this->PP_css_settings;
142
- //add footer titles call
 
143
  echo "\n\tif (typeof MP3_JPLAYER.footerjs !== 'undefined') { MP3_JPLAYER.footerjs(); }";
144
- //add init call
 
145
  echo "\n\tMP3_JPLAYER.init();";
146
  echo "\n}"; //close if create_mp3_jplayer exists
147
  echo"\n});\n</script>\n";
148
  }
149
- // Write debug
 
150
  if ( $this->theSettings['echo_debug'] == "true" ) {
151
  $this->debug_info();
152
  }
 
153
  return;
154
  }
155
 
 
156
  /* Work out playlist
157
  for single players. */
158
  function decide_S_playlist( $track, $caption ) {
159
-
160
  if ( $track == "" ) { // Auto increment
161
  if ( !$this->fieldgrab_check() || $this->Caller == "widget" || $this->F_listlength <= $this->S_autotrack ) {
162
  return false;
@@ -174,17 +182,17 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
174
  }
175
  $track = 1;
176
  $playername = "inline_" . $this->S_no++;
177
- $this->write_playlist_js( $Npl, $playername );
178
  }
179
  return array( 'track' => $track, 'playername' => $playername );
180
  }
181
 
 
182
  /* Handles [mp3t] shortcodes
183
  single players with text buttons. */
184
  function inline_play_handler( $atts, $content = null ) {
185
 
186
  $this->dbug['str'] .= "\n### Checking [mp3t]...";
187
-
188
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
189
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
190
  return;
@@ -226,9 +234,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
226
  }
227
 
228
  // Set font weight
229
- //if ( $cssclass == "" ) {
230
- $b = ( $bold == "false" || $bold == "0" || $bold == "n" ) ? " style=\"font-weight:500;\"" : " style=\"font-weight:700;\"";
231
- //}
232
 
233
  // Set spacer between elements depending on play/stop/title
234
  if ( $play != "" && $title != "" ){
@@ -263,15 +269,18 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
263
  $this->Player_ID++;
264
  return $html;
265
  }
 
266
 
267
  /* Handles [mp3j] shortcodes.
268
  single players with button graphic */
269
  function inline_play_graphic( $atts, $content = null ) {
 
270
  $this->dbug['str'] .= "\n### Checking [mp3j]...";
271
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
272
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
273
  return;
274
  }
 
275
  $id = $this->Player_ID;
276
  extract(shortcode_atts(array( // Defaults
277
  'bold' => 'y',
@@ -305,9 +314,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
305
  $divC = "</div>";
306
  }
307
  // Set font weight
308
- //if ( $cssclass == "" ) {
309
- $b = ( $bold == "false" || $bold == "N" || $bold == "n" ) ? " style=\"font-weight:500;\"" : " style=\"font-weight:700;\"";
310
- //}
311
  // Prep title
312
  $customtitle = ( $title == "#USE#" ) ? "" : $title;
313
  // tell js it's graphics buttons
@@ -339,7 +346,8 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
339
  return $html;
340
  }
341
 
342
- /* Work out playlist
 
343
  for playlist players. */
344
  function decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images = "", $imglinks = "" ) {
345
  $this->folder_order = $fsort;
@@ -363,12 +371,12 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
363
  return $Npl;
364
  }
365
 
 
366
  /* Handles [mp3-jplayer]
367
- shortcodes. */
368
  function primary_player ( $atts, $content = null ) {
369
 
370
  $this->dbug['str'] .= "\n### Checking [mp3-jplayer]...";
371
-
372
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
373
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
374
  return;
@@ -379,16 +387,13 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
379
  'tracks' => '',
380
  'captions' => '',
381
  'dload' => $this->theSettings['show_downloadmp3'],
382
- //'flip' => 'r',
383
  'title' => '',
384
- //'ind' => 'y',
385
  'list' => $this->theSettings['playlist_show'],
386
  'pn' => 'y',
387
  'width' => '',
388
  'pos' => $this->theSettings['player_float'],
389
  'stop' => 'y',
390
  'shuffle' => false,
391
- //'slice' => '',
392
  'pick' => '',
393
  'mods' => false,
394
  'id' => '',
@@ -397,14 +402,13 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
397
  'vol' => $this->theSettings['initial_vol'],
398
  'height' => '',
399
  'fsort' => 'asc',
400
- //'cssclass' => '',
401
  'style' => '',
402
  'images' => '',
403
  'imglinks' => ''
404
  ), $atts));
405
 
406
  $cssclass = $style;
407
- //$Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle );
408
  $Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images, $imglinks );
409
  if ( !$Npl ) {
410
  $this->dbug['str'] .= "\nExiting (no tracks here)";
@@ -419,14 +423,11 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
419
  $pp_height = (int)$height;
420
  $pp_height = ( empty($pp_height) || $pp_height === 0 ) ? 'false' : $pp_height;
421
  $play = "#USE_G#";
422
- $pp_title = ( $title == "" ) ? get_bloginfo('name') : $title;
423
  $pp_title = str_replace("'", "\'", $pp_title);
424
  $pp_title = str_replace("&#039;", "\'", $pp_title);
425
  $list = ( $list == "true" || $list == "y" || $list == "1" ) ? "true" : "false";
426
-
427
- //$cssclass = ( $cssclass == "" ) ? "wrap-MI" : $cssclass;
428
- //$cssclass = ( $cssclass == "" ) ? "wrap-MI" : "wrap-MI " . $cssclass;
429
-
430
  $addclass = ( $mods == "true" || $mods == "y" || $mods == "1" ) ? " mp3j_widgetmods" : "";
431
 
432
  if ( $dload == "true" || $dload == "y" || $dload == "1" ) {
@@ -462,6 +463,7 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
462
  $prevnext = ( $Npl['count'] > 1 && $pn == "y" ) ? "<div class=\"Next_mp3j\" id=\"Next_mp3j_" . $pID . "\">Next&raquo;</div><div class=\"Prev_mp3j\" id=\"Prev_mp3j_" . $pID . "\">&laquo;Prev</div>" : "";
463
  $play_h = "<div class=\"buttons_mp3j\" id=\"playpause_mp3j_" . $pID . "\">Play Pause</div>";
464
  $stop_h = ( $stop == "y" ) ? "<div class=\"stop_mp3j\" id=\"stop_mp3j_" . $pID . "\">Stop</div>" : "";
 
465
  // Build player html
466
  if ( $this->Caller && $width == "" ) { $width = "100%"; } //set a default width when called by tag/sc-widget and it wasn't specified
467
  $player = $this->write_primary_player( $pID, $pos, $width, $addclass, $dload_html, $title, $play_h, $stop_h, $prevnext, $height, $list, $Npl['count'], $cssclass );
@@ -474,12 +476,11 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
474
  }
475
 
476
 
477
- /* Handles [mp3-popout]
478
- shortcodes. */
479
  function popout_link_player ( $atts, $content = null ) {
480
 
481
  $this->dbug['str'] .= "\n### Checking [mp3-popout]...";
482
-
483
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
484
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
485
  return;
@@ -490,13 +491,11 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
490
  'tracks' => '',
491
  'captions' => '',
492
  'dload' => $this->theSettings['show_downloadmp3'],
493
- //'flip' => 'r',
494
  'title' => '',
495
  'text' => '',
496
  'list' => $this->theSettings['playlist_show'],
497
  'pos' => $this->theSettings['player_float'],
498
  'shuffle' => false,
499
- //'slice' => '',
500
  'pick' => '',
501
  'id' => '',
502
  'loop' => $this->theSettings['playlist_repeat'],
@@ -506,7 +505,6 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
506
  'tag' => 'p',
507
  'image' => '',
508
  'fsort' => 'asc',
509
- //'cssclass' => '',
510
  'style' => '',
511
  'images' => '',
512
  'imglinks' => ''
@@ -549,37 +547,9 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
549
  return $player;
550
  }
551
 
552
- /* Handles [mp3-link] shortcodes.
553
- ** Not implemented in this version ** */
554
- function link_plays_track( $atts, $content = null ) {
555
-
556
- if ( is_home() || is_archive() || is_search() ) {
557
- return; //can't really use these on multi-post pages!
558
- }
559
- extract(shortcode_atts(array( // Defaults
560
- 'player' => '',
561
- 'track' => '',
562
- 'text' => 'Play',
563
- 'bold' => 'n'
564
- ), $atts));
565
-
566
- if ( $player == "" ) {
567
- return;
568
- }
569
- if ( $track == "" ) { $track = "0"; }
570
- if ( $bold != "n" ) {
571
- $O_tag = "<strong>";
572
- $C_tag = "</strong>";
573
- } else {
574
- $O_tag = "";
575
- $C_tag = "";
576
- }
577
- $the_link = "<span class=\"mp3j-link-play\" onclick=\"javascript:link_plays_track(" . $player .", " . $track . ");\">" . $O_tag . $text . $C_tag . "</span>";
578
- return $the_link;
579
- }
580
 
581
- /* Called via mp3j_put() in
582
- template to run shortcodes. */
583
  function template_tag_handler( $stuff = "" ) {
584
  if ( $this->theSettings['disable_template_tag'] == "true" ) {
585
  return;
@@ -594,8 +564,9 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
594
  return;
595
  }
596
 
597
- /* Grabs current id's
598
- fields if not done already. */
 
599
  function fieldgrab_check() {
600
  global $post;
601
  if ( $post->ID != "" && $post->ID != $this->postID ) {
@@ -620,6 +591,8 @@ if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Fro
620
  }
621
  return $this->F_listname;
622
  }
623
-
624
- }} // close class, close if
 
 
625
  ?>
1
  <?php
2
  if ( !class_exists("MP3j_Front") && class_exists("MP3j_Main") ) { class MP3j_Front extends MP3j_Main {
3
 
4
+ /* Called on deactivation, deletes
5
+ settings if 'remember' option unticked. */
6
  function uninitFox() {
 
7
  $theOptions = get_option($this->adminOptionsName);
8
  if ( $theOptions['remember_settings'] == "false" ) {
9
  delete_option($this->adminOptionsName);
10
  }
11
  }
12
 
13
+
14
  /* Flags for scripts via
15
  template tag mp3j_addscripts(). */
16
  function scripts_tag_handler( $style = "" ) {
17
+ // Since 1.7 - convert old option name to new
 
18
  if ( $style == "styleA" || $style == "styleE" ) { $style = "styleF"; }
19
  if ( $style == "styleB" ) { $style = "styleG"; }
20
  if ( $style == "styleC" ) { $style = "styleH"; }
24
  $this->scriptsflag = "true";
25
  return;
26
  }
27
+
28
 
29
  /* Returns library via
30
  template tag mp3j_grab_library(). */
31
  function grablibrary_handler( $x ) {
 
32
  return $this->grab_library_info();
33
  }
34
 
35
+
36
  /* Checks whether js and css scripts are needed
37
  on the page, and which css sheet to use if they are. */
38
  function header_scripts_handler() {
 
39
  $scripts = false;
40
  $allowed_widget = $this->has_allowed_widget( "mp3-jplayer-widget" );
41
  $allowed_widget_B = $this->has_allowed_widget( "mp3mi-widget" );
42
+ // Flagged in template
43
  if ( $this->scriptsflag == "true" && $this->theSettings['disable_template_tag'] == "false" ) {
44
  $scripts = true;
45
  }
46
+ // On page types
47
  if ( is_home() || is_archive() || is_search() ) {
48
  if ( $allowed_widget || $allowed_widget_B || $this->theSettings['player_onblog'] == "true" ) {
49
  $scripts = true;
50
  }
51
  }
52
  if ( is_singular() ) {
53
+ if ( $allowed_widget || $allowed_widget_B || $this->has_shortcodes() || ($this->theSettings['make_player_from_link'] == "true" && $this->post_has_string('.mp3')) ) {
54
  $scripts = true;
55
  }
56
  }
57
+ // Add the scripts
58
  if ( $scripts ) {
59
  $style = ( $this->stylesheet == "" ) ? $this->theSettings['player_theme'] : $this->stylesheet;
60
  $this->add_Scripts( $style );
66
  return;
67
  }
68
 
 
 
 
69
 
70
+ /* Writes js playlists,
71
+ startup, and debug info. */
72
+ function footercode_handler() {
73
+
74
+ // Write js playlists
75
  if ( !empty($this->JS['playlists']) ) {
76
  $c = count($this->JS['playlists']);
77
  echo "\n<script type=\"text/javascript\">\nvar MP3J_PLAYLISTS = {";
84
  echo "\n};\n</script>\n";
85
  }
86
 
87
+ // Write doc ready
88
  if ( !empty($this->JS['players']) ) {
89
 
90
  $pp_bodycol = ( $this->theSettings['popout_background'] == "" ) ? "#fff" : $this->theSettings['popout_background'];
91
  echo "\n<script type=\"text/javascript\">\njQuery(document).ready(function () {";
92
+ echo "\nif (typeof MP3_JPLAYER !== 'undefined') {";
 
 
93
 
94
  if ( !empty($this->JS['Stitle']) ) {
95
  echo "\n\tMP3_JPLAYER.footerjs = function () {\n" . $this->JS['Stitle'] . "\t};";
97
 
98
  echo "
99
  MP3_JPLAYER.vars.play_f = " . $this->theSettings['encode_files'] . ";
100
+ MP3_JPLAYER.vars.force_dload = " . $this->theSettings['force_browser_dload'] . ";
101
+ MP3_JPLAYER.plugin_path = '" . $this->PluginFolder . "';";
102
+
103
+ if ( $this->theSettings['force_browser_dload'] == "true" ) {
104
+ echo "
105
+ MP3_JPLAYER.vars.dl_remote_path = '" . $this->theSettings['dloader_remote_path'] . "';";
106
+
107
+ }
108
 
109
  if ( $this->theSettings['enable_popout'] == "true" ) {
110
  echo "
 
111
  MP3_JPLAYER.vars.pp_width = " . $this->theSettings['popout_width'] . ";
112
  MP3_JPLAYER.vars.pp_maxheight = " . $this->theSettings['popout_max_height'] . ";
113
  MP3_JPLAYER.vars.pp_bodycolour = '" . $pp_bodycol . "';
116
  }
117
 
118
  echo "
 
119
  MP3_JPLAYER.vars.dload_text = '" . $this->theSettings['dload_text'] . "';
120
  MP3_JPLAYER.vars.stylesheet_url = '" . $this->PP_css_url . "';";
121
 
122
+ // Write players info array js
123
  if ( !empty($this->JS['players']) ) {
124
  $c = count($this->JS['players']);
125
  echo "\n\tMP3_JPLAYER.pl_info = [";
130
  echo "\n\t];";
131
  }
132
 
133
+ // Write listnames
134
  if ( !empty($this->JS['listref']) ) {
135
  $c = count($this->JS['listref']);
136
  echo "\n\n\tMP3_JPLAYER.lists = [";
140
  }
141
  echo "\n\t];\n";
142
  }
143
+
144
+ // Add popout_css property
145
  echo $this->PP_css_settings;
146
+
147
+ // Add footer titles call
148
  echo "\n\tif (typeof MP3_JPLAYER.footerjs !== 'undefined') { MP3_JPLAYER.footerjs(); }";
149
+
150
+ // Add init call
151
  echo "\n\tMP3_JPLAYER.init();";
152
  echo "\n}"; //close if create_mp3_jplayer exists
153
  echo"\n});\n</script>\n";
154
  }
155
+
156
+ // Write debug
157
  if ( $this->theSettings['echo_debug'] == "true" ) {
158
  $this->debug_info();
159
  }
160
+
161
  return;
162
  }
163
 
164
+
165
  /* Work out playlist
166
  for single players. */
167
  function decide_S_playlist( $track, $caption ) {
 
168
  if ( $track == "" ) { // Auto increment
169
  if ( !$this->fieldgrab_check() || $this->Caller == "widget" || $this->F_listlength <= $this->S_autotrack ) {
170
  return false;
182
  }
183
  $track = 1;
184
  $playername = "inline_" . $this->S_no++;
185
+ $this->write_playlist_js( $Npl, $playername, $this->S_arb++ );
186
  }
187
  return array( 'track' => $track, 'playername' => $playername );
188
  }
189
 
190
+
191
  /* Handles [mp3t] shortcodes
192
  single players with text buttons. */
193
  function inline_play_handler( $atts, $content = null ) {
194
 
195
  $this->dbug['str'] .= "\n### Checking [mp3t]...";
 
196
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
197
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
198
  return;
234
  }
235
 
236
  // Set font weight
237
+ $b = ( $bold == "false" || $bold == "0" || $bold == "n" ) ? " style=\"font-weight:500;\"" : " style=\"font-weight:700;\"";
 
 
238
 
239
  // Set spacer between elements depending on play/stop/title
240
  if ( $play != "" && $title != "" ){
269
  $this->Player_ID++;
270
  return $html;
271
  }
272
+
273
 
274
  /* Handles [mp3j] shortcodes.
275
  single players with button graphic */
276
  function inline_play_graphic( $atts, $content = null ) {
277
+
278
  $this->dbug['str'] .= "\n### Checking [mp3j]...";
279
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
280
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
281
  return;
282
  }
283
+
284
  $id = $this->Player_ID;
285
  extract(shortcode_atts(array( // Defaults
286
  'bold' => 'y',
314
  $divC = "</div>";
315
  }
316
  // Set font weight
317
+ $b = ( $bold == "false" || $bold == "N" || $bold == "n" ) ? " style=\"font-weight:500;\"" : " style=\"font-weight:700;\"";
 
 
318
  // Prep title
319
  $customtitle = ( $title == "#USE#" ) ? "" : $title;
320
  // tell js it's graphics buttons
346
  return $html;
347
  }
348
 
349
+
350
+ /* Work out playlist
351
  for playlist players. */
352
  function decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images = "", $imglinks = "" ) {
353
  $this->folder_order = $fsort;
371
  return $Npl;
372
  }
373
 
374
+
375
  /* Handles [mp3-jplayer]
376
+ playlist player shortcodes. */
377
  function primary_player ( $atts, $content = null ) {
378
 
379
  $this->dbug['str'] .= "\n### Checking [mp3-jplayer]...";
 
380
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
381
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
382
  return;
387
  'tracks' => '',
388
  'captions' => '',
389
  'dload' => $this->theSettings['show_downloadmp3'],
 
390
  'title' => '',
 
391
  'list' => $this->theSettings['playlist_show'],
392
  'pn' => 'y',
393
  'width' => '',
394
  'pos' => $this->theSettings['player_float'],
395
  'stop' => 'y',
396
  'shuffle' => false,
 
397
  'pick' => '',
398
  'mods' => false,
399
  'id' => '',
402
  'vol' => $this->theSettings['initial_vol'],
403
  'height' => '',
404
  'fsort' => 'asc',
 
405
  'style' => '',
406
  'images' => '',
407
  'imglinks' => ''
408
  ), $atts));
409
 
410
  $cssclass = $style;
411
+
412
  $Npl = $this->decide_M_playlist( $fsort, $tracks, $captions, $id, $pick, $shuffle, $images, $imglinks );
413
  if ( !$Npl ) {
414
  $this->dbug['str'] .= "\nExiting (no tracks here)";
423
  $pp_height = (int)$height;
424
  $pp_height = ( empty($pp_height) || $pp_height === 0 ) ? 'false' : $pp_height;
425
  $play = "#USE_G#";
426
+ $pp_title = ( $title == "" ) ? get_bloginfo('name') : $title . " | " . get_bloginfo('name');
427
  $pp_title = str_replace("'", "\'", $pp_title);
428
  $pp_title = str_replace("&#039;", "\'", $pp_title);
429
  $list = ( $list == "true" || $list == "y" || $list == "1" ) ? "true" : "false";
430
+
 
 
 
431
  $addclass = ( $mods == "true" || $mods == "y" || $mods == "1" ) ? " mp3j_widgetmods" : "";
432
 
433
  if ( $dload == "true" || $dload == "y" || $dload == "1" ) {
463
  $prevnext = ( $Npl['count'] > 1 && $pn == "y" ) ? "<div class=\"Next_mp3j\" id=\"Next_mp3j_" . $pID . "\">Next&raquo;</div><div class=\"Prev_mp3j\" id=\"Prev_mp3j_" . $pID . "\">&laquo;Prev</div>" : "";
464
  $play_h = "<div class=\"buttons_mp3j\" id=\"playpause_mp3j_" . $pID . "\">Play Pause</div>";
465
  $stop_h = ( $stop == "y" ) ? "<div class=\"stop_mp3j\" id=\"stop_mp3j_" . $pID . "\">Stop</div>" : "";
466
+
467
  // Build player html
468
  if ( $this->Caller && $width == "" ) { $width = "100%"; } //set a default width when called by tag/sc-widget and it wasn't specified
469
  $player = $this->write_primary_player( $pID, $pos, $width, $addclass, $dload_html, $title, $play_h, $stop_h, $prevnext, $height, $list, $Npl['count'], $cssclass );
476
  }
477
 
478
 
479
+ /* Handles [mp3-popout] shortcode
480
+ link to popout player. */
481
  function popout_link_player ( $atts, $content = null ) {
482
 
483
  $this->dbug['str'] .= "\n### Checking [mp3-popout]...";
 
484
  if ( !$this->Caller && (is_home() || is_archive() || is_search()) && $this->theSettings['player_onblog'] == "false" ) {
485
  $this->dbug['str'] .= "\nExiting (player_onblog is unticked)";
486
  return;
491
  'tracks' => '',
492
  'captions' => '',
493
  'dload' => $this->theSettings['show_downloadmp3'],
 
494
  'title' => '',
495
  'text' => '',
496
  'list' => $this->theSettings['playlist_show'],
497
  'pos' => $this->theSettings['player_float'],
498
  'shuffle' => false,
 
499
  'pick' => '',
500
  'id' => '',
501
  'loop' => $this->theSettings['playlist_repeat'],
505
  'tag' => 'p',
506
  'image' => '',
507
  'fsort' => 'asc',
 
508
  'style' => '',
509
  'images' => '',
510
  'imglinks' => ''
547
  return $player;
548
  }
549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
 
551
+ /* Called via mp3j_put()
552
+ in template to run shortcodes. */
553
  function template_tag_handler( $stuff = "" ) {
554
  if ( $this->theSettings['disable_template_tag'] == "true" ) {
555
  return;
564
  return;
565
  }
566
 
567
+
568
+ /* Grabs current id's fields
569
+ if not done already. */
570
  function fieldgrab_check() {
571
  global $post;
572
  if ( $post->ID != "" && $post->ID != $this->postID ) {
591
  }
592
  return $this->F_listname;
593
  }
594
+
595
+
596
+ // Close class, close if.
597
+ }}
598
  ?>
mp3j_main.php CHANGED
@@ -2,12 +2,13 @@
2
  if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
3
 
4
  // ---------------------- Update Me
5
- var $version_of_plugin = "1.8.1";
6
  var $M_no = 0;
7
  var $F_no = 0;
8
  var $S_no = 0;
9
  var $Caller = false;
10
  var $S_autotrack = 0;
 
11
  var $Player_ID = 0;
12
  var $scriptsflag = "false";
13
  var $JPdiv = false;
@@ -15,8 +16,16 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
15
  var $F_listname = false;
16
  var $F_listlength = false;
17
  var $LibraryI = false;
18
- var $JS = array();
19
- var $dbug = array();
 
 
 
 
 
 
 
 
20
  var $adminOptionsName = "mp3FoxAdminOptions";
21
  var $theSettings = array();
22
  var $Rooturl;
@@ -192,6 +201,7 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
192
  $Kstring = str_replace( array("</p>", "<p>", "<br />", "<br>", "<br/>", chr(10), chr(13)), "", $Kstring );
193
  $Kstring = trim( $Kstring );
194
  $Kstring = trim( $Kstring, $K_sep );
 
195
  //make V's
196
  $Vs = explode( $V_sep, $Vstring );
197
  foreach ( $Vs as $i => $file ) {
@@ -205,13 +215,17 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
205
  foreach ( $Vs as $i => $v ) {
206
  $Ks[$i] = (empty($ks[$i])) ? "" : trim($ks[$i]);
207
  }
 
 
 
 
208
  //make images array
209
  $imgs = array();
210
  if ( !empty($images) ) {
211
  $images = trim( $images, ',' );
212
  $imgs = explode( ',', $images );
213
  }
214
- foreach ( $Vs as $i => $v ) {
215
  $IMGs[$i] = (empty($imgs[$i])) ? "" : trim($imgs[$i]);
216
  }
217
  //make image urls array
@@ -220,11 +234,10 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
220
  $imglinks = trim( $imglinks, ',' );
221
  $iurls = explode( ',', $imglinks );
222
  }
223
- foreach ( $Vs as $i => $v ) {
224
  $IURLs[$i] = (empty($iurls[$i])) ? "" : trim($iurls[$i]);
225
  }
226
- //add any feeds
227
- $meta = $this->collect_delete_feeds( $Vs, $Ks );
228
  //make playlist
229
  $pl = $this->generate_playlist( $meta['Ks'], $meta['Vs'], $IMGs, $IURLs );
230
  if ( $pl['count'] < 1 ) {
@@ -315,7 +328,7 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
315
  $v_split = explode('@', $v_rev, 2);
316
  //filenames
317
  $Filenames[$i] = strrev($v_split[0]);
318
- if ( preg_match('/^www\./i', $Filenames[$i]) && $Filenames[$i] != "www.mp3" ) {
319
  $Filenames[$i] = "http://" . $Filenames[$i];
320
  }
321
  //titles
@@ -330,57 +343,62 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
330
 
331
  /* Does caption, title, path
332
  swapping and cleaning */
333
- function compare_swap( $Ts, $vs, $IMGs, $IURLs ) {
334
- $lib = $this->grab_library_info();
335
- foreach ( $Ts['files'] as $i => $file ) {
336
- $lib_ID = ( $lib === false ) ? false : array_search( $file, $lib['filenames'] );
337
- $http = ( strpos($file, 'http://') === false && strpos($file, 'https://') === false ) ? false : true;
338
-
339
- if ( $lib_ID !== false ) { //in library
340
- $Ts['files'][$i] = $lib['urls'][$lib_ID];
341
- $Ts['titles'][$i] = ( strpos($vs[$i], '@') === false ) ? $lib['titles'][$lib_ID] : $Ts['titles'][$i];
342
- $Ts['artists'][$i] = ( $Ts['artists'][$i] == "" ) ? $lib['excerpts'][$lib_ID] : $Ts['artists'][$i];
343
- } else {
344
- if ( $http ) { //uri
345
- if ( strpos($Ts['titles'][$i], 'http://') !== false || strpos($Ts['titles'][$i], 'https://') !== false ) {
346
- $Ts['titles'][$i] = strrchr($Ts['titles'][$i], "/");
347
- $Ts['titles'][$i] = str_replace( "/", "", $Ts['titles'][$i]);
348
- }
349
- } else { //default path
 
350
  $Ts['files'][$i] = ( $this->theSettings['mp3_dir'] == "/" ) ? $this->theSettings['mp3_dir'] . $Ts['files'][$i] : $this->theSettings['mp3_dir'] . "/" . $Ts['files'][$i];
351
  }
352
  }
353
- $Order[] = $i;
354
  }
355
- $Ts['titles'] = str_replace('"', '\"', $Ts['titles']); //escape quotes for js
356
- $n = count($Ts['files']);
357
- return array( 'artists' => $Ts['artists'], 'titles' => $Ts['titles'], 'files' => $Ts['files'], 'order' => $Order, 'count' => $n, 'images' => $IMGs, 'imgurls' => $IURLs );
358
  }
 
 
 
 
 
359
 
360
  /* Removes remote uri's.
361
  if the admin option is not ticked */
362
- function remove_mp3remote( $Ts ) {
363
- foreach ( $Ts['order'] as $ik => $i ) {
364
- if ( strpos($Ts['files'][$i], $this->Rooturl) !== false
365
- || (strpos($Ts['files'][$i], "http://") === false && strpos($Ts['files'][$i], "https://") === false)
366
- || (strpos($this->theSettings['mp3_dir'], "http://") !== false && strpos($Ts['files'][$i], $this->theSettings['mp3_dir']) !== false) ) {
367
- $Files[$i] = $Ts['files'][$i];
368
- $Titles[$i] = $Ts['titles'][$i];
369
- $Captions[$i] = $Ts['artists'][$i];
370
- $IMGs[$i] = $Ts['images'][$i];
371
- $IURLs[$i] = $Ts['imgurls'][$i];
372
- $Order[] = $i;
373
- }
374
  }
375
- $n = count($Files);
376
- return array( 'artists' => $Captions, 'titles' => $Titles, 'files' => $Files, 'order' => $Order, 'count' => $n, 'images' => $IMGs, 'imgurls' => $IURLs );
377
- }
 
378
 
379
  /* Writes jPlayer
380
  div if needed */
381
  function write_jp_div() {
382
  if ( !$this->JPdiv ) {
383
- echo "\n<div style=\"position:relative;overflow:hidden;\"><div id=\"jquery_jplayer\" style=\"left:-999em;\"></div></div>\n";
384
  $this->JPdiv = true;
385
  $this->dbug['str'] .= "\n(Added jp div)";
386
  }
@@ -388,266 +406,297 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
388
 
389
  /* Picks a random selection of n tracks from
390
  the playlist while preserving track running order. */
391
- function pick_from_playlist( $slicesize, $plist ) {
392
- $no = trim($slicesize);
393
- if ( $no > $plist['count'] ) { $no = $plist['count']; }
394
- $order = $plist['order'];
395
- shuffle($order);
396
- $order = array_slice($order, 0, $no);
397
- natsort($order);
398
- $plist['order'] = array_values($order);
399
- $plist['count'] = count($plist['order']);
400
- return $plist;
401
- }
402
 
403
  /* Looks for any active widget that isn't ruled out by
404
  the page filter. Returns true if finds a widget that will be building. */
405
- function has_allowed_widget( $type ) {
406
- $SBsettings = get_option('sidebars_widgets');
407
- if ( empty($SBsettings) || is_null($SBsettings) ) { return false; }
408
-
409
- $active = array();
410
- $scripts = false;
411
- foreach ( $SBsettings as $key => $arr ) {
412
- if ( is_array($arr) && $key != "wp_inactive_widgets" ) {
413
- foreach ( $arr as $i => $widget ) {
414
- if ( strchr($widget, $type) ) {
415
- $active[] = $widget;
416
- }
417
- }
418
  }
419
  }
420
- $this->dbug['arr'][] = $active;
421
- if ( !empty($active) ) {
422
- $name = "widget_". $type;
423
- $ops = get_option($name);
424
- foreach ( $active as $i => $widget ) {
425
- $wID = strrchr( $widget, "-" );
426
- $wID = str_replace( "-", "", $wID );
427
- foreach ( $ops as $j => $arr ) {
428
- if ( $j == $wID ) {
429
- if ( !$this->page_filter($arr['restrict_list'], $arr['restrict_mode']) ) {
430
- $scripts = true;
431
- break 2;
432
- }
433
- }
434
- }
435
  }
436
  }
437
- return $scripts;
438
  }
 
 
439
 
440
  /* Builds mode-3 widget
441
  playlist. */
442
- function make_widget_playlist( $instance ) {
443
- $Vs = array();
444
- $Ks = array();
445
- // Grab meta from ID
446
- if ( !empty($instance['id_to_play']) && $instance['play_page'] == "true" ) {
447
- $id = trim($instance['id_to_play']);
448
- if ( ($meta = $this->meta_to_KVs($id)) ) {
449
- $Vs = $meta['Vs'];
450
- $Ks = $meta['Ks'];
451
- }
452
  }
453
- // Add library
454
- if ( $instance['play_library'] == "true" ) {
455
- $library = $this->grab_library_info();
456
- if ( $library['count'] >= 1 ) {
457
- foreach ( $library['filenames'] as $i => $v ) {
458
- $Vs[] = $v;
459
- $Ks[] = $library['excerpts'][$i];
460
- }
461
  }
462
  }
463
- // Add a local folder
464
- if ( $instance['play_folder'] == "true" ) {
465
- $folder = ( $instance['folder_to_play'] == "" ) ? $this->theSettings['mp3_dir'] : $instance['folder_to_play'];
466
- $tracks = $this->grab_local_folder_mp3s( $folder );
467
- if ( $tracks !== true && $tracks !== false && count($tracks) > 0 ) {
468
- foreach ( $tracks as $i => $v ) {
469
- $Vs[] = $v;
470
- $Ks[] = "";
471
- }
472
  }
473
  }
474
- if ( count($Vs) < 1 ) { return false; }
475
- // Make the playlist
476
- $thePlayList = $this->generate_playlist( $Ks, $Vs );
477
- if ( $thePlayList['count'] < 1 ) { return false; }
478
- return $thePlayList;
479
  }
 
 
 
 
 
 
 
480
 
481
  /* Checks current page against widget page-filter settings.
482
  returns true if widget should be filtered out. */
483
- function page_filter( $list, $mode ) {
484
- $f = false;
485
- if ( !empty($list) ) {
486
- $pagelist = explode( ",", $list );
487
- if ( !empty($pagelist) ) {
488
- foreach ( $pagelist as $i => $id ) {
489
- $pagelist[$i] = str_replace( " ", "", $id );
 
 
 
 
 
 
 
 
 
 
 
 
490
  }
491
  }
492
- if ( !is_singular() ) { //look for 'index' or 'archive' or 'search'
493
- if ( $mode == "include" ) {
494
- if ( is_home() ) {
495
- if ( strpos($list, "index") === false ) { $f = true; }
496
- }
497
- if ( is_archive() ) {
498
- if ( strpos($list, "archive") === false ) { $f = true; }
499
- }
500
- if ( is_search() ) {
501
- if ( strpos($list, "search") === false ) { $f = true; }
502
- }
503
  }
504
- if ( $mode == "exclude" ) {
505
- if ( is_home() ) {
506
- if ( strpos($list, "index") !== false ) { $f = true; }
507
- }
508
- if ( is_archive() ) {
509
- if ( strpos($list, "archive") !== false ) { $f = true; }
510
- }
511
- if ( is_search() ) {
512
- if ( strpos($list, "search") !== false ) { $f = true; }
513
- }
514
  }
515
- } else { //check the id's against current page
516
- global $post;
517
- $thisID = $post->ID;
518
- if ( $mode == "include" ) {
519
- $f = true;
520
- foreach ( $pagelist as $i => $id ) {
521
- if ( $id == $thisID ) { $f = false; }
522
- }
523
-
524
- if ( is_single() ) {
525
- if ( strpos($list, "post") !== false ) {
526
- $f = false;
527
- }
528
- }
529
  }
530
- if ( $mode == "exclude" ) {
531
- foreach ( $pagelist as $i => $id ) {
532
- if ( $id == $thisID ) { $f = true; }
 
533
  }
534
-
535
- if ( is_single() ) {
536
- if ( strpos($list, "post") !== false ) {
537
- $f = true;
538
- }
 
 
 
 
 
539
  }
540
  }
541
  }
542
  }
543
- return $f;
544
- }
 
 
545
 
546
  /* Checks whether current post ID
547
  content contains a shortcode. */
548
- function has_shortcodes ( $shtype = "" ) {
549
- global $wpdb;
550
- global $post;
551
- if ( empty($post->ID) ) {
552
- return false;
553
- }
554
- $content = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE ID=" . $post->ID );
555
- $con = $content[0]->post_content;
556
- if ( $shtype != "" ) { //check for it
557
- if ( strpos($con, $shtype) !== false ) {
558
- return true;
559
- }
560
  }
561
- else { //check for all player making shortcodes
562
- if ( strpos($con, "[mp3-jplayer") !== false || strpos($con, "[mp3j") !== false || strpos($con, "[mp3t") !== false || strpos($con, "[mp3-popout") !== false ) {
563
- return true;
564
- }
565
  }
 
 
 
 
 
 
 
 
 
566
  return false;
567
  }
 
 
 
 
 
 
 
568
 
569
- /* Enqueues js
570
- and css scripts. */
571
- function add_Scripts( $theme ) {
572
- $version = substr( get_bloginfo('version'), 0, 3);
573
- //jquery and jquery-ui
574
- if ( $this->theSettings['disable_jquery_libs'] != "yes" ) {
575
- if ( $version >= 3.1 ) {
576
- wp_enqueue_script( 'jquery-ui-slider', $this->PluginFolder . '/js/ui.slider.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse' ), '1.8.10' );
577
- } else { //pre WP 3.1
578
- wp_enqueue_script( 'jquery-ui-widget', $this->PluginFolder . '/js/ui.widget.js', array( 'jquery', 'jquery-ui-core' ), '1.8.10' );
579
- wp_enqueue_script( 'jquery-ui-mouse', $this->PluginFolder . '/js/ui.mouse.js', false, '1.8.10' );
580
- wp_enqueue_script( 'jquery-ui-slider', $this->PluginFolder . '/js/ui.slider.js', false, '1.8.10' );
581
- }
582
- if ( $this->theSettings['touch_punch_js'] == "true" ) { // add ui patch for touch screens
583
- wp_enqueue_script( 'jquery-touch-punch', $this->PluginFolder . '/js/jquery.ui.touch-punch.min.js', false, '0.2.2' );
584
- }
585
- $this->dbug['str'] .= "\nScript request added (jQuery & UI)";
586
- } else {
587
- $this->dbug['str'] .= "\nScripts are OFF (jQuery & UI)";
 
 
 
 
 
 
 
 
588
  }
589
- //jplayer and plugin js
590
- wp_enqueue_script( 'jquery.jplayer.min', $this->PluginFolder . '/js/jquery.jplayer.min.js', false, '1.2.0' );
591
- wp_enqueue_script( 'mp3-jplayer', $this->PluginFolder . '/js/mp3-jplayer-1.8.js', false, '1.8' );
592
- //css
593
- if ( $theme == "styleF" ) { $themepath = $this->PluginFolder . "/css/players-1-8-silver.css"; }
594
- elseif ( $theme == "styleG" ) { $themepath = $this->PluginFolder . "/css/players-1-8-dark.css"; }
595
- elseif ( $theme == "styleH" ) { $themepath = $this->PluginFolder . "/css/players-1-8-text.css"; }
596
- elseif ( $theme == "styleI" ) { $themepath = ( $this->theSettings['custom_stylesheet'] == "/" ) ? $this->newCSScustom : $this->theSettings['custom_stylesheet']; }
597
- else { $themepath = $theme; }
598
- $name = strrchr( $themepath, "/");
599
- $name = str_replace( "/", "", $name);
600
- $name = str_replace( ".css", "", $name);
601
- wp_enqueue_style( $name, $themepath );
602
-
603
- $this->dbug['str'] .= "\nScript request added (MP3-jPlayer and css)\n";
604
-
605
- $this->write_user_style( $theme );
606
- $this->PP_css_url = ( strpos($themepath, "http://") === false ) ? $this->WPinstallpath . $themepath : $themepath;
607
- return;
608
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
609
 
610
  /* Writes user colour settings, and
611
  creates js property of popout css. */
612
- function write_user_style( $theme ) {
613
- $settings = $this->theSettings;
614
- if ( $settings['use_fixed_css'] == "false" ) {
615
- //$pluginpath = $this->WPinstallpath . "/wp-content/plugins/mp3-jplayer/";
616
- $pluginpath = $this->PluginFolder . "/";
617
- $colours = $this->set_colours( $settings['colour_settings'], $theme, $pluginpath );
618
-
619
- $screen_opac = "; opacity:" . $colours['screen_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['screen_opacity'] . ")";
620
- $loaderbar_opac = "; opacity:" . $colours['loadbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['loadbar_opacity'] . ")";
621
- $posbar_opac = "; opacity:" . $colours['posbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['posbar_opacity'] . ")";
622
- $playlist_opac = "; opacity:" . $colours['playlist_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['playlist_opacity'] . ")";
623
-
624
- switch( $colours['posbar_tint'] ) {
625
- case "soften": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-soften-2.png') repeat-y right top"; break;
626
- case "softenT": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-soften-tipped-2.png') repeat-y right top"; break;
627
- case "darken": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-darken2-2.png') repeat-y right top"; break;
628
- case "none": $posbar_tint = "";
629
- }
630
- switch( $colours['playlist_tint'] ) {
631
- case "lighten1": $playlist_img = " url('" . $pluginpath . "css/images/pl-lighten1.png') repeat-x left 0px"; break;
632
- case "lighten2": $playlist_img = " url('" . $pluginpath . "css/images/pl-lighten2.png') repeat-x left 0px"; break;
633
- case "darken1": $playlist_img = " url('" . $pluginpath . "css/images/pl-gradlong10g.png') repeat-x left -130px"; break;
634
- case "darken2": $playlist_img = " url('" . $pluginpath . "css/images/pl-darken1.png') repeat-x left 0px"; break;
635
- case "none": $playlist_img = "transparent";
636
- }
637
- switch( $colours['list_divider'] ) {
638
- case "light": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t60w.png') repeat-x left bottom"; break;
639
- case "med": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t75e.png') repeat-x left bottom"; break;
640
- case "dark": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t50g.png') repeat-x left bottom"; break;
641
- case "none": $playlist_divider = "transparent; background-image:none";
642
- }
643
-
644
- $listBGa = "none";
645
- $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";
646
- $opac = ( $colours['indicator'] == "tint" ) ? "35" : "100";
647
- $indicator = ( $colours['indicator'] == "tint" ) ? "#ccc" : $colours['posbar_colour'];
648
- $gif_opac = "opacity:" . $opac*0.01 . "; filter:alpha(opacity=" . $opac . ")";
649
-
650
- echo "\n\n<style type=\"text/css\">
651
  div.jp-interface { color:" . $colours['screen_text_colour'] . "; }
652
  div.innertab { background:" . $colours['screen_colour'] . $screen_opac . "; }
653
  span.mp3-tint { background:" . $indicator . "; }
@@ -666,9 +715,9 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
666
  .MI-image a:hover img { background:" . $colours['list_current_colour'] . ";}
667
  </style>";
668
 
669
- if ( $settings['enable_popout'] == "true" ) {
670
- $popout_bg = ( $settings['popout_background'] == "" ) ? "#fff" : $settings['popout_background'];
671
- $this->PP_css_settings = "
672
  MP3_JPLAYER.popout_css = {
673
  body_col: \"" . $popout_bg . "\",
674
  body_img: \"" . $settings['popout_background_image'] . "\",
@@ -692,65 +741,66 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
692
  list_hover_bg: \"" . $colours['listBGa_hover'] . "\"
693
  };";
694
 
695
- }// end if enable popout
696
- }// end if not fixed_css
697
- return;
698
- }
 
699
 
700
  /* Sets up the colours array prior to writing
701
  according to style / user colours / defaults. */
702
- function set_colours( $current, $style, $pluginpath ) {
703
- $silver = array( // defaults
704
- 'screen_colour' => '#a7a7a7', 'screen_opacity' => '35',
705
- 'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
706
- 'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '80', 'posbar_tint' => 'softenT',
707
- 'playlist_colour' => '#f1f1f1', 'playlist_opacity' => '100', 'playlist_tint' => 'darken1', 'list_divider' => 'med',
708
- 'screen_text_colour' => '#525252',
709
- 'list_text_colour' => '#525252', 'list_current_colour' => '#47ACDE', 'list_hover_colour' => '#768D99',
710
- 'listBGa_current' => '#f4f4f4', 'listBGa_hover' => '#f7f7f7',
711
- 'indicator' => 'colour',
712
- 'volume_grad' => 'light'
713
- );
714
- $darkgrey = array( // defaults
715
- 'screen_colour' => '#333', 'screen_opacity' => '15',
716
- 'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
717
- 'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '100', 'posbar_tint' => 'darken',
718
- 'playlist_colour' => '#fafafa', 'playlist_opacity' => '100', 'playlist_tint' => 'darken2', 'list_divider' => 'none',
719
- 'screen_text_colour' => '#525252',
720
- 'list_text_colour' => '#525252', 'list_current_colour' => '#34A2D9', 'list_hover_colour' => '#768D99',
721
- 'listBGa_current' => "transparent url('" . $pluginpath . "css/images/t40w.png') repeat", 'listBGa_hover' => "transparent url('" . $pluginpath . "css/images/t30w.png') repeat",
722
- 'indicator' => 'colour',
723
- 'volume_grad' => 'dark'
724
- );
725
- $text = array( // defaults
726
- 'screen_colour' => 'transparent', 'screen_opacity' => '100',
727
- 'loadbar_colour' => '#aaa', 'loadbar_opacity' => '20',
728
- 'posbar_colour' => '#fff', 'posbar_opacity' => '58', 'posbar_tint' => 'none',
729
- 'playlist_colour' => '#f6f6f6', 'playlist_opacity' => '100', 'playlist_tint' => 'lighten2', 'list_divider' => 'none',
730
- 'screen_text_colour' => '#869399',
731
- 'list_text_colour' => '#777', 'list_current_colour' => '#47ACDE', 'list_hover_colour' => '#829FAD',
732
- 'listBGa_current' => 'transparent', 'listBGa_hover' => 'transparent',
733
- 'indicator' => 'tint',
734
- 'volume_grad' => 'dark'
735
- );
736
- switch( $style ) {
737
- case "styleG": $colours = $darkgrey; break;
738
- case "styleH": $colours = $text; break;
739
- default: $colours = $silver;
740
- }
741
- if ( !empty($current) ) {
742
- foreach ( $current as $key => $val ) {
743
- if ( $val != "" ) {
744
- $colours[$key] = $val;
745
- }
746
- }
747
  }
748
- return $colours;
749
  }
 
 
750
 
751
  /* Makes js playlist array and stores it for echoing out in footer,
752
  adds list name to js listref array */
753
- function write_playlist_js( $list, $name = "noname" ) {
754
  if ( $list['count'] < 1 ) { return; }
755
  if ( $this->theSettings['encode_files'] == "true" ) {
756
  foreach ( $list['files'] as $k => $file ) {
@@ -758,11 +808,14 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
758
  }
759
  }
760
  $no = 1;
 
761
  $js = $name . ": [";
762
  foreach ( $list['order'] as $ik => $i ) {
763
  $js .= "\n\t\t{ name: \"";
764
  if ( $this->theSettings['add_track_numbering'] == "true" ) {
765
- $js .= $no . ". ";
 
 
766
  }
767
  //$js .= $list['titles'][$i]. "\", mp3: \"" .$list['files'][$i]. "\", artist: \"" .$list['artists'][$i]. "\" }";
768
  $js .= $list['titles'][$i]. "\", mp3: \"" .$list['files'][$i]. "\", artist: \"" .$list['artists'][$i]. "\", image: \"" .$list['images'][$i]. "\", imgurl: \"" .$list['imgurls'][$i]. "\" }";
@@ -776,7 +829,6 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
776
  $this->JS['playlists'][] = $js;
777
  $this->JS['listref'][] = $name;
778
  $c = count($this->JS['playlists']);
779
- //return $c-1;
780
  return;
781
  }
782
 
@@ -806,13 +858,23 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
806
  $showpopoutbutton = ( $this->theSettings['enable_popout'] == "true" ) ? "visibility: visible;" : "visibility: hidden;";
807
  $popouttext = ( $this->theSettings['player_theme'] == "styleH" && $this->theSettings['popout_button_title'] == "") ? "Pop-Out" : $this->theSettings['popout_button_title'];
808
  $PLscroll = ( $this->theSettings['max_list_height'] != "" ) ? " style=\"overflow:auto; max-height:" . $this->theSettings['max_list_height'] . "px;\"" : "";
809
- $list = ( $list == "true" ) ? "HIDE": "SHOW";
810
  $listtog_html = ( $npl_count > 1 ) ? "<div class=\"playlist-toggle-MI" . $addclass . "\" id=\"playlist-toggle_" . $pID. "\">" . $list . " PLAYLIST</div>" : "";
811
 
812
-
813
  $img_html = '<div class="MI-image" id="MI_image_' . $pID . '"></div>';
814
-
815
-
 
 
 
 
 
 
 
 
 
 
 
816
  $list_html = "
817
  <div class=\"listwrap_mp3j\" id=\"L_mp3j_" . $pID . "\"" . $PLscroll . ">
818
  <div class=\"playlist-wrap-MI\">
@@ -824,13 +886,13 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
824
  </div>";
825
 
826
  $player = "\n
827
- <div class=\"wrap-MI " . $cssclass . "\" style=\"" . $floater . $width . "\">" . $title . "
828
  <div class=\"jp-innerwrap\">
829
  <div class=\"innerx\"></div>
830
  <div class=\"innerleft\"></div>
831
  <div class=\"innerright\"></div>
832
  <div class=\"innertab\"></div>\n
833
- <div class=\"jp-interface\"" . $height . ">
834
  " . $img_html . "
835
  <div id=\"T_mp3j_" . $pID . "\" class=\"player-track-title" . $addclass . "\"" . $Tpad . "></div>
836
  <div class=\"MIsliderVolume\" id=\"vol_mp3j_" . $pID . "\"></div>
@@ -845,6 +907,7 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
845
  <div class=\"transport-MI\">" . $play_h . $stop_h . $prevnext . "</div>
846
  " . $dload_html . "
847
  " . $listtog_html . "
 
848
  <div class=\"mp3j-popout-MI" . $addclass . "\" id=\"lpp_mp3j_" . $pID. "\" style=\"" .$showpopoutbutton. "\">" . $popouttext . "</div>
849
  </div>
850
  </div>
@@ -923,17 +986,22 @@ if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
923
  'dload_text' => 'DOWNLOAD MP3',
924
  'loggedout_dload_text' => 'LOG IN TO DOWNLOAD',
925
  'loggedout_dload_link' => $this->WPinstallpath . '/wp-login.php',
926
- 'touch_punch_js' => 'true'
 
 
 
 
 
927
  );
928
  $theOptions = get_option($this->adminOptionsName);
929
  if ( !empty($theOptions) ) {
930
- //backwards compat with v1.4 style
931
  $xfer = $this->transfer_old_colours( $theOptions['player_theme'], $colour_keys, $theOptions['custom_stylesheet'] );
932
  if ( $xfer[0] ) {
933
  $theOptions['player_theme'] = $xfer[0];
934
  $theOptions['custom_stylesheet'] = $xfer[2];
935
- }
936
- //ditch un-needed stored settings
937
  foreach ( $theOptions as $key => $option ){
938
  if ( array_key_exists( $key, $mp3FoxAdminOptions) ) {
939
  $mp3FoxAdminOptions[$key] = $option;
2
  if ( !class_exists("MP3j_Main") ) { class MP3j_Main {
3
 
4
  // ---------------------- Update Me
5
+ var $version_of_plugin = "1.8.3";
6
  var $M_no = 0;
7
  var $F_no = 0;
8
  var $S_no = 0;
9
  var $Caller = false;
10
  var $S_autotrack = 0;
11
+ var $S_arb = 1;
12
  var $Player_ID = 0;
13
  var $scriptsflag = "false";
14
  var $JPdiv = false;
16
  var $F_listname = false;
17
  var $F_listlength = false;
18
  var $LibraryI = false;
19
+ var $JS = array(
20
+ 'playlists' => array(),
21
+ 'listref' => array(),
22
+ 'players' => array(),
23
+ 'Stitle' => ''
24
+ );
25
+ var $dbug = array(
26
+ 'str' => '',
27
+ 'arr' => array()
28
+ );
29
  var $adminOptionsName = "mp3FoxAdminOptions";
30
  var $theSettings = array();
31
  var $Rooturl;
201
  $Kstring = str_replace( array("</p>", "<p>", "<br />", "<br>", "<br/>", chr(10), chr(13)), "", $Kstring );
202
  $Kstring = trim( $Kstring );
203
  $Kstring = trim( $Kstring, $K_sep );
204
+
205
  //make V's
206
  $Vs = explode( $V_sep, $Vstring );
207
  foreach ( $Vs as $i => $file ) {
215
  foreach ( $Vs as $i => $v ) {
216
  $Ks[$i] = (empty($ks[$i])) ? "" : trim($ks[$i]);
217
  }
218
+ //add any feeds
219
+ $meta = $this->collect_delete_feeds( $Vs, $Ks );
220
+
221
+
222
  //make images array
223
  $imgs = array();
224
  if ( !empty($images) ) {
225
  $images = trim( $images, ',' );
226
  $imgs = explode( ',', $images );
227
  }
228
+ foreach ( $meta['Vs'] as $i => $v ) {
229
  $IMGs[$i] = (empty($imgs[$i])) ? "" : trim($imgs[$i]);
230
  }
231
  //make image urls array
234
  $imglinks = trim( $imglinks, ',' );
235
  $iurls = explode( ',', $imglinks );
236
  }
237
+ foreach ( $meta['Vs'] as $i => $v ) {
238
  $IURLs[$i] = (empty($iurls[$i])) ? "" : trim($iurls[$i]);
239
  }
240
+
 
241
  //make playlist
242
  $pl = $this->generate_playlist( $meta['Ks'], $meta['Vs'], $IMGs, $IURLs );
243
  if ( $pl['count'] < 1 ) {
328
  $v_split = explode('@', $v_rev, 2);
329
  //filenames
330
  $Filenames[$i] = strrev($v_split[0]);
331
+ if ( preg_match('/^www\./i', $Filenames[$i]) && $Filenames[$i] != "www.mp3" ) { //if it's url with no http
332
  $Filenames[$i] = "http://" . $Filenames[$i];
333
  }
334
  //titles
343
 
344
  /* Does caption, title, path
345
  swapping and cleaning */
346
+ function compare_swap( $Ts, $vs, $IMGs, $IURLs ) {
347
+ $lib = $this->grab_library_info();
348
+ foreach ( $Ts['files'] as $i => $file ) {
349
+ $lib_ID = ( $lib === false ) ? false : array_search( $file, $lib['filenames'] );
350
+ $http = ( strpos($file, 'http://') === false && strpos($file, 'https://') === false ) ? false : true;
351
+
352
+ if ( $lib_ID !== false ) { //in library
353
+ $Ts['files'][$i] = $lib['urls'][$lib_ID];
354
+ $Ts['titles'][$i] = ( strpos($vs[$i], '@') === false ) ? $lib['titles'][$lib_ID] : $Ts['titles'][$i];
355
+ $Ts['artists'][$i] = ( $Ts['artists'][$i] == "" ) ? $lib['excerpts'][$lib_ID] : $Ts['artists'][$i];
356
+ } else {
357
+ if ( $http ) { //uri
358
+ if ( strpos($Ts['titles'][$i], 'http://') !== false || strpos($Ts['titles'][$i], 'https://') !== false ) {
359
+ $Ts['titles'][$i] = strrchr($Ts['titles'][$i], "/");
360
+ $Ts['titles'][$i] = str_replace( "/", "", $Ts['titles'][$i]);
361
+ }
362
+ } else { //local path
363
+ if ( strpos($Ts['files'][$i], "/") !== 0 ) { //prepend df path
364
  $Ts['files'][$i] = ( $this->theSettings['mp3_dir'] == "/" ) ? $this->theSettings['mp3_dir'] . $Ts['files'][$i] : $this->theSettings['mp3_dir'] . "/" . $Ts['files'][$i];
365
  }
366
  }
 
367
  }
368
+ $Order[] = $i;
369
+ $IMGs[$i] = (empty($IMGs[$i])) ? "" : $IMGs[$i];
370
+ $IURLs[$i] = (empty($IURLs[$i])) ? "" : $IURLs[$i];
371
  }
372
+ $Ts['titles'] = str_replace('"', '\"', $Ts['titles']); //escape quotes for js
373
+ $Ts['artists'] = str_replace('"', '\"', $Ts['artists']); //escape quotes for js
374
+ $n = count($Ts['files']);
375
+ return array( 'artists' => $Ts['artists'], 'titles' => $Ts['titles'], 'files' => $Ts['files'], 'order' => $Order, 'count' => $n, 'images' => $IMGs, 'imgurls' => $IURLs );
376
+ }
377
 
378
  /* Removes remote uri's.
379
  if the admin option is not ticked */
380
+ function remove_mp3remote( $Ts ) {
381
+ foreach ( $Ts['order'] as $ik => $i ) {
382
+ if ( strpos($Ts['files'][$i], $this->Rooturl) !== false
383
+ || (strpos($Ts['files'][$i], "http://") === false && strpos($Ts['files'][$i], "https://") === false)
384
+ || (strpos($this->theSettings['mp3_dir'], "http://") !== false && strpos($Ts['files'][$i], $this->theSettings['mp3_dir']) !== false) ) {
385
+ $Files[$i] = $Ts['files'][$i];
386
+ $Titles[$i] = $Ts['titles'][$i];
387
+ $Captions[$i] = $Ts['artists'][$i];
388
+ $IMGs[$i] = $Ts['images'][$i];
389
+ $IURLs[$i] = $Ts['imgurls'][$i];
390
+ $Order[] = $i;
 
391
  }
392
+ }
393
+ $n = count($Files);
394
+ return array( 'artists' => $Captions, 'titles' => $Titles, 'files' => $Files, 'order' => $Order, 'count' => $n, 'images' => $IMGs, 'imgurls' => $IURLs );
395
+ }
396
 
397
  /* Writes jPlayer
398
  div if needed */
399
  function write_jp_div() {
400
  if ( !$this->JPdiv ) {
401
+ echo "\n<div id=\"mp3_jplayer_items\" style=\"position:relative;overflow:hidden;\">\n\t<div id=\"mp3_jplayer_1_8\" style=\"left:-999em;\"></div>\n</div>\n";
402
  $this->JPdiv = true;
403
  $this->dbug['str'] .= "\n(Added jp div)";
404
  }
406
 
407
  /* Picks a random selection of n tracks from
408
  the playlist while preserving track running order. */
409
+ function pick_from_playlist( $slicesize, $plist ) {
410
+ $no = trim($slicesize);
411
+ if ( $no > $plist['count'] ) { $no = $plist['count']; }
412
+ $order = $plist['order'];
413
+ shuffle($order);
414
+ $order = array_slice($order, 0, $no);
415
+ natsort($order);
416
+ $plist['order'] = array_values($order);
417
+ $plist['count'] = count($plist['order']);
418
+ return $plist;
419
+ }
420
 
421
  /* Looks for any active widget that isn't ruled out by
422
  the page filter. Returns true if finds a widget that will be building. */
423
+ function has_allowed_widget( $type ) {
424
+ $SBsettings = get_option('sidebars_widgets');
425
+ if ( empty($SBsettings) || is_null($SBsettings) ) { return false; }
426
+
427
+ $active = array();
428
+ $scripts = false;
429
+ foreach ( $SBsettings as $key => $arr ) {
430
+ if ( is_array($arr) && $key != "wp_inactive_widgets" ) {
431
+ foreach ( $arr as $i => $widget ) {
432
+ if ( strchr($widget, $type) ) {
433
+ $active[] = $widget;
434
+ }
 
435
  }
436
  }
437
+ }
438
+ $this->dbug['arr'][] = $active;
439
+ if ( !empty($active) ) {
440
+ $name = "widget_". $type;
441
+ $ops = get_option($name);
442
+ foreach ( $active as $i => $widget ) {
443
+ $wID = strrchr( $widget, "-" );
444
+ $wID = str_replace( "-", "", $wID );
445
+ foreach ( $ops as $j => $arr ) {
446
+ if ( $j == $wID ) {
447
+ if ( !$this->page_filter($arr['restrict_list'], $arr['restrict_mode']) ) {
448
+ $scripts = true;
449
+ break 2;
450
+ }
451
+ }
452
  }
453
  }
 
454
  }
455
+ return $scripts;
456
+ }
457
 
458
  /* Builds mode-3 widget
459
  playlist. */
460
+ function make_widget_playlist( $instance ) {
461
+ $Vs = array();
462
+ $Ks = array();
463
+ // Grab meta from ID
464
+ if ( !empty($instance['id_to_play']) && $instance['play_page'] == "true" ) {
465
+ $id = trim($instance['id_to_play']);
466
+ if ( ($meta = $this->meta_to_KVs($id)) ) {
467
+ $Vs = $meta['Vs'];
468
+ $Ks = $meta['Ks'];
 
469
  }
470
+ }
471
+ // Add library
472
+ if ( $instance['play_library'] == "true" ) {
473
+ $library = $this->grab_library_info();
474
+ if ( $library['count'] >= 1 ) {
475
+ foreach ( $library['filenames'] as $i => $v ) {
476
+ $Vs[] = $v;
477
+ $Ks[] = $library['excerpts'][$i];
478
  }
479
  }
480
+ }
481
+ // Add a local folder
482
+ if ( $instance['play_folder'] == "true" ) {
483
+ $folder = ( $instance['folder_to_play'] == "" ) ? $this->theSettings['mp3_dir'] : $instance['folder_to_play'];
484
+ $tracks = $this->grab_local_folder_mp3s( $folder );
485
+ if ( $tracks !== true && $tracks !== false && count($tracks) > 0 ) {
486
+ foreach ( $tracks as $i => $v ) {
487
+ $Vs[] = $v;
488
+ $Ks[] = "";
489
  }
490
  }
 
 
 
 
 
491
  }
492
+ if ( count($Vs) < 1 ) { return false; }
493
+ // Make the playlist
494
+ $thePlayList = $this->generate_playlist( $Ks, $Vs );
495
+ if ( $thePlayList['count'] < 1 ) { return false; }
496
+ return $thePlayList;
497
+ }
498
+
499
 
500
  /* Checks current page against widget page-filter settings.
501
  returns true if widget should be filtered out. */
502
+ function page_filter( $list, $mode ) {
503
+ $f = false;
504
+ if ( !empty($list) ) {
505
+ $pagelist = explode( ",", $list );
506
+ if ( !empty($pagelist) ) {
507
+ foreach ( $pagelist as $i => $id ) {
508
+ $pagelist[$i] = str_replace( " ", "", $id );
509
+ }
510
+ }
511
+ if ( !is_singular() ) { //look for 'index' or 'archive' or 'search'
512
+ if ( $mode == "include" ) {
513
+ if ( is_home() ) {
514
+ if ( strpos($list, "index") === false ) { $f = true; }
515
+ }
516
+ if ( is_archive() ) {
517
+ if ( strpos($list, "archive") === false ) { $f = true; }
518
+ }
519
+ if ( is_search() ) {
520
+ if ( strpos($list, "search") === false ) { $f = true; }
521
  }
522
  }
523
+ if ( $mode == "exclude" ) {
524
+ if ( is_home() ) {
525
+ if ( strpos($list, "index") !== false ) { $f = true; }
 
 
 
 
 
 
 
 
526
  }
527
+ if ( is_archive() ) {
528
+ if ( strpos($list, "archive") !== false ) { $f = true; }
 
 
 
 
 
 
 
 
529
  }
530
+ if ( is_search() ) {
531
+ if ( strpos($list, "search") !== false ) { $f = true; }
532
+ }
533
+ }
534
+ } else { //check the id's against current page
535
+ global $post;
536
+ $thisID = $post->ID;
537
+ if ( $mode == "include" ) {
538
+ $f = true;
539
+ foreach ( $pagelist as $i => $id ) {
540
+ if ( $id == $thisID ) { $f = false; }
 
 
 
541
  }
542
+
543
+ if ( is_single() ) {
544
+ if ( strpos($list, "post") !== false ) {
545
+ $f = false;
546
  }
547
+ }
548
+ }
549
+ if ( $mode == "exclude" ) {
550
+ foreach ( $pagelist as $i => $id ) {
551
+ if ( $id == $thisID ) { $f = true; }
552
+ }
553
+
554
+ if ( is_single() ) {
555
+ if ( strpos($list, "post") !== false ) {
556
+ $f = true;
557
  }
558
  }
559
  }
560
  }
561
+ }
562
+ return $f;
563
+ }
564
+
565
 
566
  /* Checks whether current post ID
567
  content contains a shortcode. */
568
+ function has_shortcodes ( $shtype = "" ) {
569
+ global $wpdb;
570
+ global $post;
571
+ if ( empty($post->ID) ) {
572
+ return false;
573
+ }
574
+ $content = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE ID=" . $post->ID );
575
+ $con = $content[0]->post_content;
576
+ if ( $shtype != "" ) { //check for it
577
+ if ( strpos($con, $shtype) !== false ) {
578
+ return true;
 
579
  }
580
+ } else { //check for all player making shortcodes
581
+ if ( strpos($con, "[mp3-jplayer") !== false || strpos($con, "[mp3j") !== false || strpos($con, "[mp3t") !== false || strpos($con, "[mp3-popout") !== false ) {
582
+ return true;
 
583
  }
584
+ }
585
+ return false;
586
+ }
587
+
588
+ /* Checks for a string in post content */
589
+ function post_has_string ( $str = "" ) {
590
+ global $wpdb;
591
+ global $post;
592
+ if ( empty($post->ID) ) {
593
  return false;
594
  }
595
+ $content = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE ID=" . $post->ID );
596
+ $con = $content[0]->post_content;
597
+ if ( strpos($con, $str) !== false ) {
598
+ return true;
599
+ }
600
+ return false;
601
+ }
602
 
603
+
604
+ /* Swaps out links for player
605
+ shortcodes, hooked to the_content. */
606
+ function replace_links ( $stuff = '' ) {
607
+ if ( ( is_home() || is_archive() || is_search() ) && $this->theSettings['player_onblog'] == "false" ) {
608
+ return $stuff;
609
+ }
610
+ $needles = array( '\"', '{TEXT}', '{URL}' );
611
+ $replacers = array( '"', '$5', '$2' );
612
+ $remove = "/<a ([^=]+=['\"][^\"']+['\"] )*href=['\"](([^\"']+\.mp3))['\"]( [^=]+=['\"][^\"']+['\"])*>([^<]+)<\/a>/i";
613
+ $add = str_replace($needles, $replacers, $this->theSettings['make_player_from_link_shcode'] );
614
+
615
+ return preg_replace( $remove, $add, $stuff );
616
+ }
617
+
618
+
619
+ /* Enqueues js and css scripts. */
620
+ function add_Scripts( $theme ) {
621
+ $version = substr( get_bloginfo('version'), 0, 3);
622
+ //jquery and jquery-ui
623
+ if ( $this->theSettings['disable_jquery_libs'] != "yes" ) {
624
+ if ( $version >= 3.1 ) {
625
+ wp_enqueue_script( 'jquery-ui-slider', $this->PluginFolder . '/js/ui.slider.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse' ), '1.8.10' );
626
+ } else { //pre WP 3.1
627
+ wp_enqueue_script( 'jquery-ui-widget', $this->PluginFolder . '/js/ui.widget.js', array( 'jquery', 'jquery-ui-core' ), '1.8.10' );
628
+ wp_enqueue_script( 'jquery-ui-mouse', $this->PluginFolder . '/js/ui.mouse.js', false, '1.8.10' );
629
+ wp_enqueue_script( 'jquery-ui-slider', $this->PluginFolder . '/js/ui.slider.js', false, '1.8.10' );
630
  }
631
+ if ( $this->theSettings['touch_punch_js'] == "true" ) { // add ui patch for touch screens
632
+ wp_enqueue_script( 'jquery-touch-punch', $this->PluginFolder . '/js/jquery.ui.touch-punch.min.js', false, '0.2.2' );
633
+ }
634
+ $this->dbug['str'] .= "\nScript request added (jQuery & UI)"; //TODO sort 1st thing in dbug!
635
+ } else {
636
+ $this->dbug['str'] .= "\nScripts are OFF (jQuery & UI)";
 
 
 
 
 
 
 
 
 
 
 
 
 
637
  }
638
+ //jplayer and plugin js
639
+ wp_enqueue_script( 'jquery.jplayer.min', $this->PluginFolder . '/js/jquery.jplayer.min.js', false, '2.2.0' );
640
+ wp_enqueue_script( 'mp3-jplayer', $this->PluginFolder . '/js/mp3-jplayer-1.8.3.js', false, '1.8.3' );
641
+ //css
642
+ if ( $theme == "styleF" ) { $themepath = $this->PluginFolder . "/css/players-1-8-silver.css"; }
643
+ elseif ( $theme == "styleG" ) { $themepath = $this->PluginFolder . "/css/players-1-8-dark.css"; }
644
+ elseif ( $theme == "styleH" ) { $themepath = $this->PluginFolder . "/css/players-1-8-text.css"; }
645
+ elseif ( $theme == "styleI" ) { $themepath = ( $this->theSettings['custom_stylesheet'] == "/" ) ? $this->newCSScustom : $this->theSettings['custom_stylesheet']; }
646
+ else { $themepath = $theme; }
647
+ $name = strrchr( $themepath, "/");
648
+ $name = str_replace( "/", "", $name);
649
+ $name = str_replace( ".css", "", $name);
650
+ wp_enqueue_style( $name, $themepath );
651
+
652
+ $this->dbug['str'] .= "\nScript request added (MP3-jPlayer and css)\n";
653
+
654
+ $this->write_user_style( $theme );
655
+ $this->PP_css_url = ( strpos($themepath, "http://") === false ) ? $this->WPinstallpath . $themepath : $themepath;
656
+ return;
657
+ }
658
+
659
 
660
  /* Writes user colour settings, and
661
  creates js property of popout css. */
662
+ function write_user_style( $theme ) {
663
+ $settings = $this->theSettings;
664
+ if ( $settings['use_fixed_css'] == "false" ) {
665
+ $pluginpath = $this->PluginFolder . "/";
666
+ $colours = $this->set_colours( $settings['colour_settings'], $theme, $pluginpath );
667
+
668
+ $screen_opac = "; opacity:" . $colours['screen_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['screen_opacity'] . ")";
669
+ $loaderbar_opac = "; opacity:" . $colours['loadbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['loadbar_opacity'] . ")";
670
+ $posbar_opac = "; opacity:" . $colours['posbar_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['posbar_opacity'] . ")";
671
+ $playlist_opac = "; opacity:" . $colours['playlist_opacity']*0.01 . "; filter:alpha(opacity=" . $colours['playlist_opacity'] . ")";
672
+
673
+ switch( $colours['posbar_tint'] ) {
674
+ case "soften": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-soften-2.png') repeat-y right top"; break;
675
+ case "softenT": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-soften-tipped-2.png') repeat-y right top"; break;
676
+ case "darken": $posbar_tint = " url('" . $pluginpath . "css/images/posbar-darken2-2.png') repeat-y right top"; break;
677
+ case "none": $posbar_tint = "";
678
+ }
679
+ switch( $colours['playlist_tint'] ) {
680
+ case "lighten1": $playlist_img = " url('" . $pluginpath . "css/images/pl-lighten1.png') repeat-x left 0px"; break;
681
+ case "lighten2": $playlist_img = " url('" . $pluginpath . "css/images/pl-lighten2.png') repeat-x left 0px"; break;
682
+ case "darken1": $playlist_img = " url('" . $pluginpath . "css/images/pl-gradlong10g.png') repeat-x left -130px"; break;
683
+ case "darken2": $playlist_img = " url('" . $pluginpath . "css/images/pl-darken1.png') repeat-x left 0px"; break;
684
+ case "none": $playlist_img = "transparent";
685
+ }
686
+ switch( $colours['list_divider'] ) {
687
+ case "light": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t60w.png') repeat-x left bottom"; break;
688
+ case "med": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t75e.png') repeat-x left bottom"; break;
689
+ case "dark": $playlist_divider = "transparent url('" . $pluginpath . "css/images/t50g.png') repeat-x left bottom"; break;
690
+ case "none": $playlist_divider = "transparent; background-image:none";
691
+ }
692
+
693
+ $listBGa = "none";
694
+ $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";
695
+ $opac = ( $colours['indicator'] == "tint" ) ? "35" : "100";
696
+ $indicator = ( $colours['indicator'] == "tint" ) ? "#ccc" : $colours['posbar_colour'];
697
+ $gif_opac = "opacity:" . $opac*0.01 . "; filter:alpha(opacity=" . $opac . ")";
698
+
699
+ echo "\n\n<style type=\"text/css\">
 
700
  div.jp-interface { color:" . $colours['screen_text_colour'] . "; }
701
  div.innertab { background:" . $colours['screen_colour'] . $screen_opac . "; }
702
  span.mp3-tint { background:" . $indicator . "; }
715
  .MI-image a:hover img { background:" . $colours['list_current_colour'] . ";}
716
  </style>";
717
 
718
+ if ( $settings['enable_popout'] == "true" ) {
719
+ $popout_bg = ( $settings['popout_background'] == "" ) ? "#fff" : $settings['popout_background'];
720
+ $this->PP_css_settings = "
721
  MP3_JPLAYER.popout_css = {
722
  body_col: \"" . $popout_bg . "\",
723
  body_img: \"" . $settings['popout_background_image'] . "\",
741
  list_hover_bg: \"" . $colours['listBGa_hover'] . "\"
742
  };";
743
 
744
+ }// end if enable popout
745
+ }// end if not fixed_css
746
+ return;
747
+ }
748
+
749
 
750
  /* Sets up the colours array prior to writing
751
  according to style / user colours / defaults. */
752
+ function set_colours( $current, $style, $pluginpath ) {
753
+ $silver = array( // defaults
754
+ 'screen_colour' => '#a7a7a7', 'screen_opacity' => '35',
755
+ 'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
756
+ 'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '80', 'posbar_tint' => 'softenT',
757
+ 'playlist_colour' => '#f1f1f1', 'playlist_opacity' => '100', 'playlist_tint' => 'darken1', 'list_divider' => 'med',
758
+ 'screen_text_colour' => '#525252',
759
+ 'list_text_colour' => '#525252', 'list_current_colour' => '#47ACDE', 'list_hover_colour' => '#768D99',
760
+ 'listBGa_current' => '#f4f4f4', 'listBGa_hover' => '#f7f7f7',
761
+ 'indicator' => 'colour',
762
+ 'volume_grad' => 'light'
763
+ );
764
+ $darkgrey = array( // defaults
765
+ 'screen_colour' => '#333', 'screen_opacity' => '15',
766
+ 'loadbar_colour' => '#34A2D9', 'loadbar_opacity' => '70',
767
+ 'posbar_colour' => '#5CC9FF', 'posbar_opacity' => '100', 'posbar_tint' => 'darken',
768
+ 'playlist_colour' => '#fafafa', 'playlist_opacity' => '100', 'playlist_tint' => 'darken2', 'list_divider' => 'none',
769
+ 'screen_text_colour' => '#525252',
770
+ 'list_text_colour' => '#525252', 'list_current_colour' => '#34A2D9', 'list_hover_colour' => '#768D99',
771
+ 'listBGa_current' => "transparent url('" . $pluginpath . "css/images/t40w.png') repeat", 'listBGa_hover' => "transparent url('" . $pluginpath . "css/images/t30w.png') repeat",
772
+ 'indicator' => 'colour',
773
+ 'volume_grad' => 'dark'
774
+ );
775
+ $text = array( // defaults
776
+ 'screen_colour' => 'transparent', 'screen_opacity' => '100',
777
+ 'loadbar_colour' => '#aaa', 'loadbar_opacity' => '20',
778
+ 'posbar_colour' => '#fff', 'posbar_opacity' => '58', 'posbar_tint' => 'none',
779
+ 'playlist_colour' => '#f6f6f6', 'playlist_opacity' => '100', 'playlist_tint' => 'lighten2', 'list_divider' => 'none',
780
+ 'screen_text_colour' => '#869399',
781
+ 'list_text_colour' => '#777', 'list_current_colour' => '#47ACDE', 'list_hover_colour' => '#829FAD',
782
+ 'listBGa_current' => 'transparent', 'listBGa_hover' => 'transparent',
783
+ 'indicator' => 'tint',
784
+ 'volume_grad' => 'dark'
785
+ );
786
+ switch( $style ) {
787
+ case "styleG": $colours = $darkgrey; break;
788
+ case "styleH": $colours = $text; break;
789
+ default: $colours = $silver;
790
+ }
791
+ if ( !empty($current) ) {
792
+ foreach ( $current as $key => $val ) {
793
+ if ( $val != "" ) {
794
+ $colours[$key] = $val;
795
+ }
 
796
  }
 
797
  }
798
+ return $colours;
799
+ }
800
 
801
  /* Makes js playlist array and stores it for echoing out in footer,
802
  adds list name to js listref array */
803
+ function write_playlist_js( $list, $name = "noname", $numbering = false ) {
804
  if ( $list['count'] < 1 ) { return; }
805
  if ( $this->theSettings['encode_files'] == "true" ) {
806
  foreach ( $list['files'] as $k => $file ) {
808
  }
809
  }
810
  $no = 1;
811
+
812
  $js = $name . ": [";
813
  foreach ( $list['order'] as $ik => $i ) {
814
  $js .= "\n\t\t{ name: \"";
815
  if ( $this->theSettings['add_track_numbering'] == "true" ) {
816
+ //$js .= $no . ". ";
817
+ $numdisplay = ( $numbering === false ) ? $no : $numbering;
818
+ $js .= $numdisplay . ". ";
819
  }
820
  //$js .= $list['titles'][$i]. "\", mp3: \"" .$list['files'][$i]. "\", artist: \"" .$list['artists'][$i]. "\" }";
821
  $js .= $list['titles'][$i]. "\", mp3: \"" .$list['files'][$i]. "\", artist: \"" .$list['artists'][$i]. "\", image: \"" .$list['images'][$i]. "\", imgurl: \"" .$list['imgurls'][$i]. "\" }";
829
  $this->JS['playlists'][] = $js;
830
  $this->JS['listref'][] = $name;
831
  $c = count($this->JS['playlists']);
 
832
  return;
833
  }
834
 
858
  $showpopoutbutton = ( $this->theSettings['enable_popout'] == "true" ) ? "visibility: visible;" : "visibility: hidden;";
859
  $popouttext = ( $this->theSettings['player_theme'] == "styleH" && $this->theSettings['popout_button_title'] == "") ? "Pop-Out" : $this->theSettings['popout_button_title'];
860
  $PLscroll = ( $this->theSettings['max_list_height'] != "" ) ? " style=\"overflow:auto; max-height:" . $this->theSettings['max_list_height'] . "px;\"" : "";
861
+ $list = ( $list == "true" ) ? "HIDE" : "SHOW";
862
  $listtog_html = ( $npl_count > 1 ) ? "<div class=\"playlist-toggle-MI" . $addclass . "\" id=\"playlist-toggle_" . $pID. "\">" . $list . " PLAYLIST</div>" : "";
863
 
 
864
  $img_html = '<div class="MI-image" id="MI_image_' . $pID . '"></div>';
865
+
866
+ $dlframe = '
867
+ <div id="mp3j_finfo_' . $pID . '" class="mp3j-finfo" style="display:none;">
868
+ <div class="mp3j-finfo-sleeve">
869
+ <div id="mp3j_finfo_gif_' . $pID . '" class="mp3j-finfo-gif"></div>
870
+ <div id="mp3j_finfo_txt_' . $pID . '" class="mp3j-finfo-txt"></div>
871
+ <div class="mp3j-finfo-close" id="mp3j_finfo_close_' . $pID . '">X</div>
872
+ </div>
873
+ </div>
874
+ <div id="mp3j_dlf_' . $pID . '" class="mp3j-dlframe" style="display:none;"></div>';
875
+
876
+ $dlframe_html = ( $this->theSettings['force_browser_dload'] == "true" ) ? $dlframe : "";
877
+
878
  $list_html = "
879
  <div class=\"listwrap_mp3j\" id=\"L_mp3j_" . $pID . "\"" . $PLscroll . ">
880
  <div class=\"playlist-wrap-MI\">
886
  </div>";
887
 
888
  $player = "\n
889
+ <div id=\"wrapperMI_" . $pID . "\" class=\"wrap-MI " . $cssclass . "\" style=\"" . $floater . $width . "\">" . $title . "
890
  <div class=\"jp-innerwrap\">
891
  <div class=\"innerx\"></div>
892
  <div class=\"innerleft\"></div>
893
  <div class=\"innerright\"></div>
894
  <div class=\"innertab\"></div>\n
895
+ <div class=\"jp-interface\"" . $height . " id=\"interfaceMI_" . $pID . "\">
896
  " . $img_html . "
897
  <div id=\"T_mp3j_" . $pID . "\" class=\"player-track-title" . $addclass . "\"" . $Tpad . "></div>
898
  <div class=\"MIsliderVolume\" id=\"vol_mp3j_" . $pID . "\"></div>
907
  <div class=\"transport-MI\">" . $play_h . $stop_h . $prevnext . "</div>
908
  " . $dload_html . "
909
  " . $listtog_html . "
910
+ " . $dlframe_html . "
911
  <div class=\"mp3j-popout-MI" . $addclass . "\" id=\"lpp_mp3j_" . $pID. "\" style=\"" .$showpopoutbutton. "\">" . $popouttext . "</div>
912
  </div>
913
  </div>
986
  'dload_text' => 'DOWNLOAD MP3',
987
  'loggedout_dload_text' => 'LOG IN TO DOWNLOAD',
988
  'loggedout_dload_link' => $this->WPinstallpath . '/wp-login.php',
989
+ 'touch_punch_js' => 'true',
990
+ 'force_browser_dload' => 'true',
991
+ //'force_browser_dload_remote' => 'false',
992
+ 'dloader_remote_path' => '',
993
+ 'make_player_from_link' => 'true',
994
+ 'make_player_from_link_shcode' => '[mp3j track="{TEXT}@{URL}" volslider="y" style="outline"]'
995
  );
996
  $theOptions = get_option($this->adminOptionsName);
997
  if ( !empty($theOptions) ) {
998
+ //backwards compat with v1.4 style
999
  $xfer = $this->transfer_old_colours( $theOptions['player_theme'], $colour_keys, $theOptions['custom_stylesheet'] );
1000
  if ( $xfer[0] ) {
1001
  $theOptions['player_theme'] = $xfer[0];
1002
  $theOptions['custom_stylesheet'] = $xfer[2];
1003
+ }
1004
+ //ditch un-needed stored settings
1005
  foreach ( $theOptions as $key => $option ){
1006
  if ( array_key_exists( $key, $mp3FoxAdminOptions) ) {
1007
  $mp3FoxAdminOptions[$key] = $option;
mp3j_sc-widget.php CHANGED
@@ -60,8 +60,8 @@ if ( class_exists("WP_Widget") ) {
60
  );
61
  $instance = wp_parse_args( (array) $instance, $defaultvalues );
62
  ?>
63
- <p style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="options-general.php?page=mp3jplayer.php">Plugin options</a> | <a href="options-general.php?page=mp3jplayer.php#howto">Help</a></p>
64
- <p style="margin-top:-15px; margin-bottom:4px;">Shortcodes:</p>
65
  <!-- Arbitrary text/shortcodes -->
66
  <p style="margin:8px 0 10px 0; font-size: 11px;"><textarea class="widefat" style="font-size:11px;" rows="8" cols="85" id="<?php echo $this->get_field_id( 'arb_text' ); ?>" name="<?php echo $this->get_field_name( 'arb_text' ); ?>"><?php echo $instance['arb_text']; ?></textarea></p>
67
  <!-- Page Filter -->
60
  );
61
  $instance = wp_parse_args( (array) $instance, $defaultvalues );
62
  ?>
63
+ <h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="options-general.php?page=mp3jplayer.php">Plugin Options and Help</a></h3>
64
+ <p style="margin-top:-18px; margin-bottom:4px;">Shortcodes:</p>
65
  <!-- Arbitrary text/shortcodes -->
66
  <p style="margin:8px 0 10px 0; font-size: 11px;"><textarea class="widefat" style="font-size:11px;" rows="8" cols="85" id="<?php echo $this->get_field_id( 'arb_text' ); ?>" name="<?php echo $this->get_field_name( 'arb_text' ); ?>"><?php echo $instance['arb_text']; ?></textarea></p>
67
  <!-- Page Filter -->
mp3j_widget.php CHANGED
@@ -48,7 +48,7 @@ if ( class_exists("WP_Widget") ) {
48
  $Wplist = $templist;
49
  }
50
  if ( $instance['widget_mode'] == "2" ) {
51
- $captions = ""; // TODO: widget needs captions input
52
  if ( !($Npl = $mp3_fox->string_to_playlist( $instance['arb_playlist'], $captions )) ) {
53
  return;
54
  }
@@ -72,7 +72,9 @@ if ( class_exists("WP_Widget") ) {
72
  $width = ( $instance['player_width'] == "" ) ? $mp3_fox->theSettings['player_width'] : $instance['player_width'];
73
  $popout_title = strip_tags($instance['title']);
74
  $popout_title = trim($popout_title);
75
- $popout_title = ( !empty($popout_title) ) ? $popout_title . " | " . get_bloginfo('name') : get_bloginfo('name') . " | " . get_bloginfo('description');
 
 
76
  $list = ( $instance['playlist_mode'] == "true" ) ? "true" : "false";
77
  $autoplay = ( $instance['autoplay'] == "true" ) ? "true" : "false";
78
  $loop = ( $instance['loop'] == "true" ) ? "true" : "false";
@@ -111,11 +113,11 @@ if ( class_exists("WP_Widget") ) {
111
  // Add info to js info array
112
  $play = "#USE_G#";
113
  $pp_height = (int)$instance['player_height'];
114
- $pp_height = ( empty($pp_height) || $pp_height === 0 ) ? 96 : $pp_height;
115
  $pp_title = str_replace("'", "\'", $popout_title);
116
  $pp_title = str_replace("&#039;", "\'", $pp_title);
117
 
118
- $mp3_fox->JS['players'][] = "{ list: MP3J_PLAYLISTS." . $PlayerName . ", tr: 0, type: 'MI', lstate: " . $list . ", loop: " . $loop . ", play_txt: '" . $play . "', pause_txt: '', pp_title: '" . $pp_title . "', autoplay: " . $autoplay . ", download: " . $dload_info . ", vol: " . $vol . ", height: " . $pp_height . " }";
119
 
120
  // Make transport buttons
121
  $prevnext = ( $Wplist['count'] > 1 && $pn == "true" ) ? "<div class=\"Next_mp3j\" id=\"Next_mp3j_" . $pID . "\">Next&raquo;</div><div class=\"Prev_mp3j\" id=\"Prev_mp3j_" . $pID . "\">&laquo;Prev</div>" : "";
@@ -125,7 +127,8 @@ if ( class_exists("WP_Widget") ) {
125
  // Build player html
126
  //$theplayer = $mp3_fox->write_primary_player( $PlayerName, $pID, $pos, $width, $mods, $dload, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list );
127
  //$theplayer = $mp3_fox->write_primary_player( $pID, $pos, $width, $mods, $dload, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list );
128
- $theplayer = $mp3_fox->write_primary_player( $pID, $pos, $width, $addclass, $dload_html, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list, $Wplist['count'] );
 
129
 
130
  extract( $args ); // supplied WP theme vars
131
  echo $before_widget;
@@ -165,6 +168,7 @@ if ( class_exists("WP_Widget") ) {
165
  $instance['pn_buttons'] = $new_instance['pn_buttons'];
166
  $instance['stop_button'] = $new_instance['stop_button'];
167
  $instance['player_height'] = $new_instance['player_height'];
 
168
 
169
  $instance['folder_to_play'] = strip_tags( $new_instance['folder_to_play'] );
170
  if ( strpos($instance['folder_to_play'], "http://") === false && strpos($instance['folder_to_play'], "www.") === false ) {
@@ -213,15 +217,16 @@ if ( class_exists("WP_Widget") ) {
213
  'position' => 'rel-L',
214
  'pn_buttons' => 'true',
215
  'stop_button' => 'true',
216
- 'player_height' => ''
 
217
  );
218
 
219
  $instance = wp_parse_args( (array) $instance, $defaultvalues );
220
  $helptext_col = "color:#a0a0a0;";
221
  ?>
222
 
223
- <p style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="options-general.php?page=mp3jplayer.php">Plugin options</a> | <a href="options-general.php?page=mp3jplayer.php#howto">Help</a></p>
224
- <p style="margin-top:-10px; margin-bottom:10px;">Play Mode:</p>
225
  <p style="margin-bottom: 10px;"><input type="radio" id="<?php echo $this->get_field_id( 'widget_mode' ); ?>" name="<?php echo $this->get_field_name( 'widget_mode' ); ?>" value="1" <?php if ($instance['widget_mode'] == "1") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
226
  &nbsp;&nbsp;Mode 1 &nbsp;<span class="description" style="margin-left: 0px;">Custom fields</span>
227
  <span class="description" style="margin: 0px 0px 14px 10px; font-size: 11px; <?php echo $helptext_col; ?>">Auto adds a player on SINGLE posts/pages, when they have tracks in their custom fields.</span></p>
@@ -312,6 +317,12 @@ if ( class_exists("WP_Widget") ) {
312
  </select>
313
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="<?php echo $this->get_field_id( 'mods' ); ?>" name="<?php echo $this->get_field_name( 'mods' ); ?>" value="true" <?php if ($instance['mods'] == "true") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
314
  Mods</p>
 
 
 
 
 
 
315
  </div>
316
  <p style="font-size: 11px; margin:10px 0px 4px 0px;">
317
  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"); }?> />
48
  $Wplist = $templist;
49
  }
50
  if ( $instance['widget_mode'] == "2" ) {
51
+ $captions = "";
52
  if ( !($Npl = $mp3_fox->string_to_playlist( $instance['arb_playlist'], $captions )) ) {
53
  return;
54
  }
72
  $width = ( $instance['player_width'] == "" ) ? $mp3_fox->theSettings['player_width'] : $instance['player_width'];
73
  $popout_title = strip_tags($instance['title']);
74
  $popout_title = trim($popout_title);
75
+ //$popout_title = ( !empty($popout_title) ) ? $popout_title . " | " . get_bloginfo('name') : get_bloginfo('name') . " | " . get_bloginfo('description');
76
+ $popout_title = ( !empty($popout_title) ) ? $popout_title . " | " . get_bloginfo('name') : get_bloginfo('name');
77
+
78
  $list = ( $instance['playlist_mode'] == "true" ) ? "true" : "false";
79
  $autoplay = ( $instance['autoplay'] == "true" ) ? "true" : "false";
80
  $loop = ( $instance['loop'] == "true" ) ? "true" : "false";
113
  // Add info to js info array
114
  $play = "#USE_G#";
115
  $pp_height = (int)$instance['player_height'];
116
+ $pp_height = ( empty($pp_height) || $pp_height === 0 ) ? 'false' : $pp_height;
117
  $pp_title = str_replace("'", "\'", $popout_title);
118
  $pp_title = str_replace("&#039;", "\'", $pp_title);
119
 
120
+ $mp3_fox->JS['players'][] = "{ list: MP3J_PLAYLISTS." . $PlayerName . ", tr: 0, type: 'MI', lstate: " . $list . ", loop: " . $loop . ", play_txt: '" . $play . "', pause_txt: '', pp_title: '" . $pp_title . "', autoplay: " . $autoplay . ", download: " . $dload_info . ", vol: " . $vol . ", height: " . $pp_height . ", cssclass: '" . $instance['style'] . "' }";
121
 
122
  // Make transport buttons
123
  $prevnext = ( $Wplist['count'] > 1 && $pn == "true" ) ? "<div class=\"Next_mp3j\" id=\"Next_mp3j_" . $pID . "\">Next&raquo;</div><div class=\"Prev_mp3j\" id=\"Prev_mp3j_" . $pID . "\">&laquo;Prev</div>" : "";
127
  // Build player html
128
  //$theplayer = $mp3_fox->write_primary_player( $PlayerName, $pID, $pos, $width, $mods, $dload, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list );
129
  //$theplayer = $mp3_fox->write_primary_player( $pID, $pos, $width, $mods, $dload, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list );
130
+ //$theplayer = $mp3_fox->write_primary_player( $pID, $pos, $width, $addclass, $dload_html, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list, $Wplist['count'] );
131
+ $theplayer = $mp3_fox->write_primary_player( $pID, $pos, $width, $addclass, $dload_html, '', $play_h, $stop_h, $prevnext, $instance['player_height'], $list, $Wplist['count'], $instance['style'] );
132
 
133
  extract( $args ); // supplied WP theme vars
134
  echo $before_widget;
168
  $instance['pn_buttons'] = $new_instance['pn_buttons'];
169
  $instance['stop_button'] = $new_instance['stop_button'];
170
  $instance['player_height'] = $new_instance['player_height'];
171
+ $instance['style'] = $new_instance['style'];
172
 
173
  $instance['folder_to_play'] = strip_tags( $new_instance['folder_to_play'] );
174
  if ( strpos($instance['folder_to_play'], "http://") === false && strpos($instance['folder_to_play'], "www.") === false ) {
217
  'position' => 'rel-L',
218
  'pn_buttons' => 'true',
219
  'stop_button' => 'true',
220
+ 'player_height' => '',
221
+ 'style' => ''
222
  );
223
 
224
  $instance = wp_parse_args( (array) $instance, $defaultvalues );
225
  $helptext_col = "color:#a0a0a0;";
226
  ?>
227
 
228
+ <h3 style="text-align:right; font-size: 11px; margin-bottom:0px;"><a href="options-general.php?page=mp3jplayer.php">Plugin Options & Help</a></h3>
229
+ <p style="margin-top:-18px; margin-bottom:10px;">Play Mode:</p>
230
  <p style="margin-bottom: 10px;"><input type="radio" id="<?php echo $this->get_field_id( 'widget_mode' ); ?>" name="<?php echo $this->get_field_name( 'widget_mode' ); ?>" value="1" <?php if ($instance['widget_mode'] == "1") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
231
  &nbsp;&nbsp;Mode 1 &nbsp;<span class="description" style="margin-left: 0px;">Custom fields</span>
232
  <span class="description" style="margin: 0px 0px 14px 10px; font-size: 11px; <?php echo $helptext_col; ?>">Auto adds a player on SINGLE posts/pages, when they have tracks in their custom fields.</span></p>
317
  </select>
318
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="<?php echo $this->get_field_id( 'mods' ); ?>" name="<?php echo $this->get_field_name( 'mods' ); ?>" value="true" <?php if ($instance['mods'] == "true") { _e('checked="checked"', "mp3jplayerwidget"); }?> />
319
  Mods</p>
320
+
321
+
322
+ <p style="font-size:11px;">Style (<strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong>) : <input class="widefat" style="font-size:11px; width:200px;" type="text" id="<?php echo $this->get_field_id( 'style' ); ?>" name="<?php echo $this->get_field_name( 'style' ); ?>" value="<?php echo $instance['style']; ?>" />
323
+ <br /></p>
324
+
325
+
326
  </div>
327
  <p style="font-size: 11px; margin:10px 0px 4px 0px;">
328
  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"); }?> />
mp3jplayer.php CHANGED
@@ -3,7 +3,7 @@
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 with Flash fall back. Shortcodes, widgets, and template tags. See the help on the Settings Page for a full list of options.
6
- Version: 1.8.1
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
@@ -26,20 +26,20 @@ License: GPL2
26
 
27
  $mp3j_path = dirname(__FILE__);
28
  include_once( $mp3j_path . '/mp3j_main.php');
29
- include_once( $mp3j_path . '/mp3j_frontend.php'); // extends main
30
 
31
  if ( class_exists("MP3j_Front") ) {
32
  $mp3_fox = new MP3j_Front();
33
  }
34
 
35
  if ( isset($mp3_fox) ) {
36
- include_once( $mp3j_path . '/mp3j_widget.php'); // ui widget
37
- include_once( $mp3j_path . '/mp3j_sc-widget.php'); // sh Widget
38
 
39
  if ( is_admin() ) {
40
  include_once( $mp3j_path . '/mp3j_admin.php'); //settings page
41
 
42
- function mp3j_adminpage() { // add a settings menu page
43
  global $mp3_fox;
44
  if ( function_exists('add_options_page') ) {
45
  $pluginpage = add_options_page('MP3 jPlayer', 'MP3 jPlayer', 'manage_options', basename(__FILE__), 'mp3j_print_admin_page');
@@ -49,7 +49,7 @@ if ( isset($mp3_fox) ) {
49
  }
50
  }
51
 
52
- function mp3j_plugin_links( $links, $file ) { // add a settings link on plugins page
53
  if( $file == 'mp3-jplayer/mp3jplayer.php' ) {
54
  $settings_link = '<a href="options-general.php?page=mp3jplayer.php">'.__('Settings').'</a>';
55
  array_unshift( $links, $settings_link );
@@ -90,7 +90,7 @@ if ( isset($mp3_fox) ) {
90
  add_action( 'widgets_init', 'mp3jplayer_widget_init' );
91
 
92
  function mp3jshortcodes_widget_init() {
93
- register_widget( 'MP3j_single' ); //silly name but can't change it!
94
  }
95
  add_action( 'widgets_init', 'mp3jshortcodes_widget_init' );
96
 
@@ -98,7 +98,6 @@ if ( isset($mp3_fox) ) {
98
  add_shortcode('mp3t', array(&$mp3_fox, 'inline_play_handler'));
99
  add_shortcode('mp3j', array(&$mp3_fox, 'inline_play_graphic'));
100
  add_shortcode('mp3-jplayer', array(&$mp3_fox, 'primary_player'));
101
- //add_shortcode('mp3-link', array(&$mp3_fox, 'link_plays_track')); //not in current version
102
  add_shortcode('mp3-popout', array(&$mp3_fox, 'popout_link_player'));
103
 
104
  // template hooks
@@ -109,6 +108,9 @@ if ( isset($mp3_fox) ) {
109
  add_filter('mp3j_grab_library', array(&$mp3_fox, 'grablibrary_handler'), 10, 1 );
110
  add_action('mp3j_debug', array(&$mp3_fox, 'debug_info'), 10, 1 );
111
  add_action('mp3j_div', array(&$mp3_fox, 'write_jp_div'));
 
 
 
112
 
113
  // retired
114
  function mp3j_set_meta( $tracks, $captions = "", $startnum = 1 ) { } //since 1.7
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 with Flash fall back. Shortcodes, widgets, and template tags. See the help on the Settings Page for a full list of options.
6
+ Version: 1.8.3
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
26
 
27
  $mp3j_path = dirname(__FILE__);
28
  include_once( $mp3j_path . '/mp3j_main.php');
29
+ include_once( $mp3j_path . '/mp3j_frontend.php'); //extends main
30
 
31
  if ( class_exists("MP3j_Front") ) {
32
  $mp3_fox = new MP3j_Front();
33
  }
34
 
35
  if ( isset($mp3_fox) ) {
36
+ include_once( $mp3j_path . '/mp3j_widget.php'); //ui widget
37
+ include_once( $mp3j_path . '/mp3j_sc-widget.php'); //sh Widget
38
 
39
  if ( is_admin() ) {
40
  include_once( $mp3j_path . '/mp3j_admin.php'); //settings page
41
 
42
+ function mp3j_adminpage() { //add a settings menu page
43
  global $mp3_fox;
44
  if ( function_exists('add_options_page') ) {
45
  $pluginpage = add_options_page('MP3 jPlayer', 'MP3 jPlayer', 'manage_options', basename(__FILE__), 'mp3j_print_admin_page');
49
  }
50
  }
51
 
52
+ function mp3j_plugin_links( $links, $file ) { //add a settings link on plugins page
53
  if( $file == 'mp3-jplayer/mp3jplayer.php' ) {
54
  $settings_link = '<a href="options-general.php?page=mp3jplayer.php">'.__('Settings').'</a>';
55
  array_unshift( $links, $settings_link );
90
  add_action( 'widgets_init', 'mp3jplayer_widget_init' );
91
 
92
  function mp3jshortcodes_widget_init() {
93
+ register_widget( 'MP3j_single' ); //silly name but can't change it now!
94
  }
95
  add_action( 'widgets_init', 'mp3jshortcodes_widget_init' );
96
 
98
  add_shortcode('mp3t', array(&$mp3_fox, 'inline_play_handler'));
99
  add_shortcode('mp3j', array(&$mp3_fox, 'inline_play_graphic'));
100
  add_shortcode('mp3-jplayer', array(&$mp3_fox, 'primary_player'));
 
101
  add_shortcode('mp3-popout', array(&$mp3_fox, 'popout_link_player'));
102
 
103
  // template hooks
108
  add_filter('mp3j_grab_library', array(&$mp3_fox, 'grablibrary_handler'), 10, 1 );
109
  add_action('mp3j_debug', array(&$mp3_fox, 'debug_info'), 10, 1 );
110
  add_action('mp3j_div', array(&$mp3_fox, 'write_jp_div'));
111
+ if ( $mp3_fox->theSettings['make_player_from_link'] == "true" ) {
112
+ add_filter('the_content', array(&$mp3_fox, 'replace_links'), 1);
113
+ }
114
 
115
  // retired
116
  function mp3j_set_meta( $tracks, $captions = "", $startnum = 1 ) { } //since 1.7
popout.php CHANGED
@@ -9,13 +9,12 @@
9
  <script type='text/javascript' src='js/ui.mouse.js'></script>
10
  <script type='text/javascript' src='js/ui.slider.js'></script>
11
  <script type='text/javascript' src='js/jquery.jplayer.min.js'></script>
 
12
 
13
- <script type='text/javascript' src='js/mp3-jplayer-1.8.js'></script>
14
 
15
  <script type='text/javascript'>
16
 
17
- var MP3J;
18
-
19
  function loadcss(filename) {
20
  var fileref = document.createElement("link");
21
  fileref.setAttribute("rel", "stylesheet");
@@ -26,38 +25,39 @@ function loadcss(filename) {
26
  }
27
  }
28
 
29
- if(window.opener && !window.opener.closed) {
 
30
  loadcss(window.opener.MP3_JPLAYER.vars.stylesheet_url);
31
- MP3J = create_mp3_jplayer();
32
- MP3J.vars.play_f = false; // always set false!
33
- MP3J.vars.pathto_swf = window.opener.MP3_JPLAYER.vars.pathto_swf;
34
- MP3J.vars.silence = window.opener.MP3_JPLAYER.vars.silence;
35
- MP3J.vars.launched_ID = window.opener.MP3_JPLAYER.vars.launched_ID;
36
- MP3J.vars.dload_text = window.opener.MP3_JPLAYER.vars.dload_text;
37
 
38
- var pl_info_wo = window.opener.MP3_JPLAYER.pl_info;
39
- MP3J.pl_info = [{
40
- list:pl_info_wo[MP3J.vars.launched_ID].list,
41
- tr:pl_info_wo[MP3J.vars.launched_ID].tr,
 
 
 
 
 
 
 
 
42
  type:'MI',
43
- lstate:pl_info_wo[MP3J.vars.launched_ID].lstate,
44
- loop:pl_info_wo[MP3J.vars.launched_ID].loop,
45
- play_txt:pl_info_wo[MP3J.vars.launched_ID].play_txt,
46
- pause_txt:pl_info_wo[MP3J.vars.launched_ID].pause_txt,
47
- pp_title:pl_info_wo[MP3J.vars.launched_ID].pp_title,
48
- autoplay:pl_info_wo[MP3J.vars.launched_ID].autoplay,
49
- download:pl_info_wo[MP3J.vars.launched_ID].download,
50
- vol:pl_info_wo[MP3J.vars.launched_ID].vol,
51
- height:pl_info_wo[MP3J.vars.launched_ID].height,
52
- cssclass:pl_info_wo[MP3J.vars.launched_ID].cssclass
53
  }];
54
 
55
- MP3J.vars.pp_playerheight = window.opener.MP3_JPLAYER.vars.pp_playerheight;
56
- MP3J.vars.pp_windowheight = window.opener.MP3_JPLAYER.vars.pp_windowheight;
57
- MP3J.vars.pp_maxheight = window.opener.MP3_JPLAYER.vars.pp_windowheight;
58
- //MP3J.vars.pp_fixedcss = window.opener.MP3_JPLAYER.vars.pp_fixedcss;
59
 
60
- MP3J.togglelist = function (j) {
61
  var winwidth = jQuery(window).width();
62
  if (this.pl_info[j].lstate === true) {
63
  jQuery(this.eID.plwrap + j).fadeOut(300);
@@ -75,14 +75,14 @@ if(window.opener && !window.opener.closed) {
75
  }
76
 
77
  jQuery(document).ready(function () {
78
- if ( typeof MP3J === "undefined" ) {
 
 
79
  jQuery("body").empty();
80
- jQuery("body").css("background", '#333333');
81
- jQuery("*").css("color", '#cccccc');
82
- jQuery("body").append("<h4 style='margin-left:10px;'>Please launch a playlist from the site to use me,<br />I've been refreshed and can't find my parent window.</h4>");
83
  return;
84
- } else {
85
- MP3J.init();
86
  }
87
  });
88
 
@@ -92,7 +92,11 @@ jQuery(document).ready(function () {
92
 
93
  </head>
94
  <body style="padding:5px 4px 0px 4px; margin:0px;">
95
- <div style="position:relative;overflow:hidden;"><div id="jquery_jplayer" style="left:-999em;"></div></div>
 
 
 
 
96
  <div class="wrap-MI" style="position:relative; padding:0; margin:0px auto 0px auto; width:100%;">
97
  <div class="jp-innerwrap">
98
  <div class="innerx"></div>
@@ -114,6 +118,15 @@ jQuery(document).ready(function () {
114
  <div class="transport-MI"><div class="buttons_mp3j" id="playpause_mp3j_0">Play Pause</div><div class="stop_mp3j" id="stop_mp3j_0">Stop</div><div class="Next_mp3j" id="Next_mp3j_0">Next&raquo;</div><div class="Prev_mp3j" id="Prev_mp3j_0">&laquo;Prev</div></div>
115
  <div id="download_mp3j_0" class="dloadmp3-MI" style="visibility: visible;"></div>
116
  <div class="playlist-toggle-MI" id="playlist-toggle_0"></div>
 
 
 
 
 
 
 
 
 
117
  </div>
118
  </div>
119
  <div class="listwrap_mp3j" id="L_mp3j_0">
@@ -121,58 +134,60 @@ jQuery(document).ready(function () {
121
  <div class="playlist-wrap-MI"><ul class="UL-MI_mp3j" id="UL_mp3j_0"><li></li></ul></div>
122
  </div>
123
  </div>
124
-
125
  <script type="text/javascript">
126
 
127
  if(window.opener && !window.opener.closed) {
128
- if ( MP3J.pl_info[0].height !== false ) {
129
- jQuery("div.jp-interface").css( "height", MP3J.pl_info[0].height+"px" );
130
  }
131
 
132
- if ( !MP3J.pl_info[0].download ) {
133
  jQuery("div.dloadmp3-MI").hide();
134
  }
135
- if ( MP3J.pl_info[0].list.length < 2 ) {
 
136
  jQuery("#Prev_mp3j_0").hide();
137
  jQuery("#Next_mp3j_0").hide();
138
  jQuery("#playlist-toggle_0").hide();
139
  }
140
- if ( MP3J.pl_info[0].lstate ) {
 
141
  jQuery("#playlist-toggle_0").append("HIDE PLAYLIST");
142
  } else {
143
  jQuery("#playlist-toggle_0").append("SHOW PLAYLIST");
144
  }
145
 
146
- jQuery("div.wrap-MI").addClass(MP3J.pl_info[0].cssclass);
147
 
148
  if ( window.opener.MP3_JPLAYER.popout_css !== "undefined" ) {
149
- MP3J.popout_css = window.opener.MP3_JPLAYER.popout_css;
150
- jQuery("body").css( "background" , MP3J.popout_css.body_col + " url('" + MP3J.popout_css.body_img + "')");
151
- jQuery("div.player-track-title, div.player-artist, div.jp-play-time, div.jp-total-time, div.statusMI").css( "color" , MP3J.popout_css.screen_text );
152
- jQuery("ul.UL-MI_mp3j").css( "background" , MP3J.popout_css.list_img );
153
- jQuery("div.playlist-colour").css({ "background" : MP3J.popout_css.list_col, opacity : MP3J.popout_css.list_opac });
154
- jQuery("div.innertab").css({ "background" : MP3J.popout_css.screen_bg, opacity : MP3J.popout_css.screen_opac });
155
- jQuery("div.loadMI_mp3j").css({ "background" : MP3J.popout_css.loader_col, opacity : MP3J.popout_css.loader_opac });
156
- jQuery("div.poscolMI_mp3j").css({ "background" : MP3J.popout_css.posbar_col, opacity : MP3J.popout_css.posbar_opac });
157
 
158
- jQuery('<style type="text/css"> .MI-image a:hover img { background:' + MP3J.popout_css.list_current_text + '; } </style>').appendTo('head');
159
- jQuery('<style type="text/css"> span.mp3-tint { background:' + MP3J.popout_css.indi_tint + '; } </style>').appendTo('head');
160
- jQuery('<style type="text/css"> ul.UL-MI_mp3j li { background:' + MP3J.popout_css.list_divider + '; } </style>').appendTo('head');
161
- jQuery('<style type="text/css"> ul.UL-MI_mp3j li a { color:' + MP3J.popout_css.list_text + '; } </style>').appendTo('head');
162
- jQuery('<style type="text/css"> ul.UL-MI_mp3j li a:hover { color:' + MP3J.popout_css.list_hover_text + '; background:' + MP3J.popout_css.list_hover_bg + '; } </style>').appendTo('head');
163
- jQuery('<style type="text/css"> ul.UL-MI_mp3j li a.mp3j_A_current { color:' + MP3J.popout_css.list_current_text + '; background:' + MP3J.popout_css.list_current_bg + '; } </style>').appendTo('head');
164
- jQuery('<style type="text/css"> div.MIsliderVolume .ui-widget-header { background:' + MP3J.popout_css.vol_slider_bg + '; } </style>').appendTo('head');
165
- jQuery('<style type="text/css"> div.transport-MI div:hover { background-color:' + MP3J.popout_css.list_current_text + '; } </style>').appendTo('head');
166
 
167
- jQuery("div.transport-MI div").css("color", MP3J.popout_css.list_hover_text );
168
  jQuery("div.transport-MI div").mouseover(function () {
169
- jQuery(this).css( "color" , MP3J.popout_css.list_current_text );
170
  });
171
  jQuery("div.transport-MI div").mouseout(function () {
172
- jQuery(this).css("color", MP3J.popout_css.list_hover_text );
173
  });
174
  }
175
- jQuery("title").text(MP3J.pl_info[0].pp_title);
176
  }
177
 
178
  </script>
9
  <script type='text/javascript' src='js/ui.mouse.js'></script>
10
  <script type='text/javascript' src='js/ui.slider.js'></script>
11
  <script type='text/javascript' src='js/jquery.jplayer.min.js'></script>
12
+ <script type='text/javascript' src='js/jquery.ui.touch-punch.min.js'></script>
13
 
14
+ <script type='text/javascript' src='js/mp3-jplayer-1.8.3.js'></script>
15
 
16
  <script type='text/javascript'>
17
 
 
 
18
  function loadcss(filename) {
19
  var fileref = document.createElement("link");
20
  fileref.setAttribute("rel", "stylesheet");
25
  }
26
  }
27
 
28
+ if( window.opener && !window.opener.closed && window.opener.MP3_JPLAYER && window.opener.MP3_JPLAYER.launched_ID !== null ) {
29
+
30
  loadcss(window.opener.MP3_JPLAYER.vars.stylesheet_url);
 
 
 
 
 
 
31
 
32
+ MP3_JPLAYER.vars.play_f = false; // always set false!
33
+ MP3_JPLAYER.plugin_path = window.opener.MP3_JPLAYER.plugin_path;
34
+ MP3_JPLAYER.launched_ID = window.opener.MP3_JPLAYER.launched_ID;
35
+ MP3_JPLAYER.vars.dload_text = window.opener.MP3_JPLAYER.vars.dload_text;
36
+ MP3_JPLAYER.vars.force_dload = window.opener.MP3_JPLAYER.vars.force_dload;
37
+ //MP3_JPLAYER.vars.force_dl_remote = window.opener.MP3_JPLAYER.vars.force_dl_remote;
38
+ MP3_JPLAYER.vars.dl_remote_path = window.opener.MP3_JPLAYER.vars.dl_remote_path;
39
+
40
+ var pl_info_wo = window.opener.MP3_JPLAYER.pl_info; //copy
41
+ MP3_JPLAYER.pl_info = [{
42
+ list:pl_info_wo[MP3_JPLAYER.launched_ID].list,
43
+ tr:pl_info_wo[MP3_JPLAYER.launched_ID].tr,
44
  type:'MI',
45
+ lstate:pl_info_wo[MP3_JPLAYER.launched_ID].lstate,
46
+ loop:pl_info_wo[MP3_JPLAYER.launched_ID].loop,
47
+ play_txt:pl_info_wo[MP3_JPLAYER.launched_ID].play_txt,
48
+ pause_txt:pl_info_wo[MP3_JPLAYER.launched_ID].pause_txt,
49
+ pp_title:pl_info_wo[MP3_JPLAYER.launched_ID].pp_title,
50
+ autoplay:pl_info_wo[MP3_JPLAYER.launched_ID].autoplay,
51
+ download:pl_info_wo[MP3_JPLAYER.launched_ID].download,
52
+ vol:pl_info_wo[MP3_JPLAYER.launched_ID].vol,
53
+ height:pl_info_wo[MP3_JPLAYER.launched_ID].height,
54
+ cssclass:pl_info_wo[MP3_JPLAYER.launched_ID].cssclass
55
  }];
56
 
57
+ MP3_JPLAYER.vars.pp_playerheight = window.opener.MP3_JPLAYER.vars.pp_playerheight;
58
+ MP3_JPLAYER.vars.pp_windowheight = window.opener.MP3_JPLAYER.vars.pp_windowheight;
 
 
59
 
60
+ MP3_JPLAYER.togglelist = function (j) {
61
  var winwidth = jQuery(window).width();
62
  if (this.pl_info[j].lstate === true) {
63
  jQuery(this.eID.plwrap + j).fadeOut(300);
75
  }
76
 
77
  jQuery(document).ready(function () {
78
+ if( window.opener && !window.opener.closed && window.opener.MP3_JPLAYER && window.opener.MP3_JPLAYER.launched_ID !== null ) {
79
+ MP3_JPLAYER.init();
80
+ } else {
81
  jQuery("body").empty();
82
+ jQuery("body").css("background", '#222');
83
+ jQuery("*").css("color", '#ddd');
84
+ jQuery("body").append("<h4 style='margin-left:10px; font:normal normal 700 14px arial,sans-serif;'>Please launch a playlist from the site to use me, I've been refreshed and can't find my parent window.</h4>");
85
  return;
 
 
86
  }
87
  });
88
 
92
 
93
  </head>
94
  <body style="padding:5px 4px 0px 4px; margin:0px;">
95
+
96
+ <div style="position:relative;overflow:hidden;">
97
+ <div id="mp3_jplayer_1_8" style="left:-999em;"></div>
98
+ </div>
99
+
100
  <div class="wrap-MI" style="position:relative; padding:0; margin:0px auto 0px auto; width:100%;">
101
  <div class="jp-innerwrap">
102
  <div class="innerx"></div>
118
  <div class="transport-MI"><div class="buttons_mp3j" id="playpause_mp3j_0">Play Pause</div><div class="stop_mp3j" id="stop_mp3j_0">Stop</div><div class="Next_mp3j" id="Next_mp3j_0">Next&raquo;</div><div class="Prev_mp3j" id="Prev_mp3j_0">&laquo;Prev</div></div>
119
  <div id="download_mp3j_0" class="dloadmp3-MI" style="visibility: visible;"></div>
120
  <div class="playlist-toggle-MI" id="playlist-toggle_0"></div>
121
+
122
+ <div id="mp3j_finfo_0" class="mp3j-finfo" style="display:none;">
123
+ <div class="mp3j-finfo-sleeve">
124
+ <div id="mp3j_finfo_gif_0" class="mp3j-finfo-gif"></div>
125
+ <div id="mp3j_finfo_txt_0" class="mp3j-finfo-txt"></div>
126
+ <div class="mp3j-finfo-close" id="mp3j_finfo_close_0">X</div>
127
+ </div>
128
+ </div>
129
+ <div id="mp3j_dlf_0" class="mp3j-dlframe" style="display:none;"></div>
130
  </div>
131
  </div>
132
  <div class="listwrap_mp3j" id="L_mp3j_0">
134
  <div class="playlist-wrap-MI"><ul class="UL-MI_mp3j" id="UL_mp3j_0"><li></li></ul></div>
135
  </div>
136
  </div>
137
+
138
  <script type="text/javascript">
139
 
140
  if(window.opener && !window.opener.closed) {
141
+ if ( MP3_JPLAYER.pl_info[0].height !== false ) {
142
+ jQuery("div.jp-interface").css( "height", MP3_JPLAYER.pl_info[0].height+"px" );
143
  }
144
 
145
+ if ( !MP3_JPLAYER.pl_info[0].download ) {
146
  jQuery("div.dloadmp3-MI").hide();
147
  }
148
+
149
+ if ( MP3_JPLAYER.pl_info[0].list.length < 2 ) {
150
  jQuery("#Prev_mp3j_0").hide();
151
  jQuery("#Next_mp3j_0").hide();
152
  jQuery("#playlist-toggle_0").hide();
153
  }
154
+
155
+ if ( MP3_JPLAYER.pl_info[0].lstate ) {
156
  jQuery("#playlist-toggle_0").append("HIDE PLAYLIST");
157
  } else {
158
  jQuery("#playlist-toggle_0").append("SHOW PLAYLIST");
159
  }
160
 
161
+ jQuery("div.wrap-MI").addClass(MP3_JPLAYER.pl_info[0].cssclass);
162
 
163
  if ( window.opener.MP3_JPLAYER.popout_css !== "undefined" ) {
164
+ MP3_JPLAYER.popout_css = window.opener.MP3_JPLAYER.popout_css;
165
+ jQuery("body").css( "background" , MP3_JPLAYER.popout_css.body_col + " url('" + MP3_JPLAYER.popout_css.body_img + "')");
166
+ jQuery("div.player-track-title, div.player-artist, div.jp-play-time, div.jp-total-time, div.statusMI").css( "color" , MP3_JPLAYER.popout_css.screen_text );
167
+ jQuery("ul.UL-MI_mp3j").css( "background" , MP3_JPLAYER.popout_css.list_img );
168
+ jQuery("div.playlist-colour").css({ "background" : MP3_JPLAYER.popout_css.list_col, opacity : MP3_JPLAYER.popout_css.list_opac });
169
+ jQuery("div.innertab").css({ "background" : MP3_JPLAYER.popout_css.screen_bg, opacity : MP3_JPLAYER.popout_css.screen_opac });
170
+ jQuery("div.loadMI_mp3j").css({ "background" : MP3_JPLAYER.popout_css.loader_col, opacity : MP3_JPLAYER.popout_css.loader_opac });
171
+ jQuery("div.poscolMI_mp3j").css({ "background" : MP3_JPLAYER.popout_css.posbar_col, opacity : MP3_JPLAYER.popout_css.posbar_opac });
172
 
173
+ jQuery('<style type="text/css"> .MI-image a:hover img { background:' + MP3_JPLAYER.popout_css.list_current_text + '; } </style>').appendTo('head');
174
+ jQuery('<style type="text/css"> span.mp3-tint { background:' + MP3_JPLAYER.popout_css.indi_tint + '; } </style>').appendTo('head');
175
+ jQuery('<style type="text/css"> ul.UL-MI_mp3j li { background:' + MP3_JPLAYER.popout_css.list_divider + '; } </style>').appendTo('head');
176
+ jQuery('<style type="text/css"> ul.UL-MI_mp3j li a { color:' + MP3_JPLAYER.popout_css.list_text + '; } </style>').appendTo('head');
177
+ jQuery('<style type="text/css"> ul.UL-MI_mp3j li a:hover { color:' + MP3_JPLAYER.popout_css.list_hover_text + '; background:' + MP3_JPLAYER.popout_css.list_hover_bg + '; } </style>').appendTo('head');
178
+ jQuery('<style type="text/css"> ul.UL-MI_mp3j li a.mp3j_A_current { color:' + MP3_JPLAYER.popout_css.list_current_text + '; background:' + MP3_JPLAYER.popout_css.list_current_bg + '; } </style>').appendTo('head');
179
+ jQuery('<style type="text/css"> div.MIsliderVolume .ui-widget-header { background:' + MP3_JPLAYER.popout_css.vol_slider_bg + '; } </style>').appendTo('head');
180
+ jQuery('<style type="text/css"> div.transport-MI div:hover { background-color:' + MP3_JPLAYER.popout_css.list_current_text + '; } </style>').appendTo('head');
181
 
182
+ jQuery("div.transport-MI div").css("color", MP3_JPLAYER.popout_css.list_hover_text );
183
  jQuery("div.transport-MI div").mouseover(function () {
184
+ jQuery(this).css( "color" , MP3_JPLAYER.popout_css.list_current_text );
185
  });
186
  jQuery("div.transport-MI div").mouseout(function () {
187
+ jQuery(this).css("color", MP3_JPLAYER.popout_css.list_hover_text );
188
  });
189
  }
190
+ jQuery("title").text(MP3_JPLAYER.pl_info[0].pp_title);
191
  }
192
 
193
  </script>
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: http://www.sjward.org/jplayer-for-wordpress
6
  Tags: mp3, mp3 player, music player, audio, audio player, jplayer, playlist, jquery, shortcode, widget, css, post, page, sidebar, html5
7
  Requires at least: 2.8
8
  Tested up to: 3.5.1
9
- Stable tag: 1.8.1
10
 
11
 
12
  Add mp3 audio players to posts, pages, and sidebars. HTML5 / Flash. Uses jPlayer.
@@ -21,11 +21,12 @@ Add mp3 audio players to posts, pages, and sidebars. HTML5 / Flash. Uses jPlayer
21
  - Uses a single instance of [jPlayer by Happyworm](http://jplayer.org/)
22
  - Good compatibility across browsers/platforms. Works on iPhone 4, iPad. Uses HTML 5 or Flash if necessary.
23
  - Editable player designs via CSS.
 
24
 
25
  [View Demo here](http://sjward.org/jplayer-for-wordpress)
26
 
27
  <br />
28
- This plugin lets you add mp3 players to your site using shortcodes, widgets, and template tags. There's useful stuff on the settings page such as default folder setting, mp3 file lists, and plenty of shortcode parameters to control things like width, height, autoplay, volume etc.
29
 
30
  You can play entire folders with one simple command, or the library, or make playlists track by track, randomise them, add titles and captions (or use the library ones), set playlists for download, hide your urls.
31
 
@@ -138,6 +139,15 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
138
 
139
  == Changelog ==
140
 
 
 
 
 
 
 
 
 
 
141
  = 1.8.1 =
142
  * Some css corrections - missing image for the buttons on the 'custom' style, and the smaller font sizes when using the 'mods' option.
143
 
@@ -164,6 +174,7 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
164
  * Added template tag - mp3j_div() for use in theme files when using players in hidden/collapsable tabs, lightboxes etc (allows players to function ok in hidden elements if flash gets used).
165
  * Added option to bypass jQuery / jQueryUI script requests.
166
  * Added choice of separators to use when writing playlists in shortcodes/widgets.
 
167
  * Many more improvements and minor fixes.
168
 
169
  = 1.7.3 =
@@ -262,3 +273,5 @@ Either on the forum at Wordpress, or [here](http://sjward.org/contact).
262
 
263
  = 1.0 =
264
  * First release
 
 
6
  Tags: mp3, mp3 player, music player, audio, audio player, jplayer, playlist, jquery, shortcode, widget, css, post, page, sidebar, html5
7
  Requires at least: 2.8
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.8.3
10
 
11
 
12
  Add mp3 audio players to posts, pages, and sidebars. HTML5 / Flash. Uses jPlayer.
21
  - Uses a single instance of [jPlayer by Happyworm](http://jplayer.org/)
22
  - Good compatibility across browsers/platforms. Works on iPhone 4, iPad. Uses HTML 5 or Flash if necessary.
23
  - Editable player designs via CSS.
24
+ - Multisite compatible.
25
 
26
  [View Demo here](http://sjward.org/jplayer-for-wordpress)
27
 
28
  <br />
29
+ This plugin lets you add mp3 players to your site using shortcodes, widgets, link replacement, and template tags. There's useful stuff on the settings page such as default folder setting, mp3 file lists, and plenty of shortcode parameters to control things like width, height, autoplay, volume etc.
30
 
31
  You can play entire folders with one simple command, or the library, or make playlists track by track, randomise them, add titles and captions (or use the library ones), set playlists for download, hide your urls.
32
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.8.3 =
143
+ * Moved to jQuery.jPlayer 2.2.0 (fixes plugin problems with recent flash release (v11.6) in browsers like IE and Firefox (time was displaying as 'NaN', tracks not advancing/autoplaying)).
144
+ * Fixed the auto number option for arbitrary single players (they were all numbered 1!).
145
+ * Fixed quotes in captions (they were unescaped still and would break players), thanks to Chris for reporting.
146
+ * Fixed a couple of routines that could throw php warnings, thanks to Rami for reporting.
147
+ * Added the much requested option to try force browsers into saving mp3 downloads (instead of playing them in some kinda built-in player). Maintains right click save-ability. No mobile support just yet. Switched on for local files by default. Can also be set up for remote files (see the help). Option is under 'Playlist player options' on the settings page. Please feedback any issues.
148
+ * Added option to turn any mp3 links in a page into players, which means you can now add players using the 'Add media' button on the page/post edit screens. It has as an editable shortcode on the player settings page (under template options). Option is on by default. Switch it off near top of settings page.
149
+ * Added the 'style' parameter onto the MP3j-ui widget.
150
+
151
  = 1.8.1 =
152
  * Some css corrections - missing image for the buttons on the 'custom' style, and the smaller font sizes when using the 'mods' option.
153
 
174
  * Added template tag - mp3j_div() for use in theme files when using players in hidden/collapsable tabs, lightboxes etc (allows players to function ok in hidden elements if flash gets used).
175
  * Added option to bypass jQuery / jQueryUI script requests.
176
  * Added choice of separators to use when writing playlists in shortcodes/widgets.
177
+ * Added touchpunch.js for useable sliders on touch screen devices.
178
  * Many more improvements and minor fixes.
179
 
180
  = 1.7.3 =
273
 
274
  = 1.0 =
275
  * First release
276
+
277
+
remote/downloader.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Remote Downloader
4
+ MP3-jPlayer 1.8.3
5
+ www.sjward.org
6
+ */
7
+
8
+ $mp3 = false;
9
+ $playerID = "";
10
+ $fp = "";
11
+ $file = "";
12
+ $dbug = "";
13
+ $sent = "";
14
+ $rooturl = preg_replace("/^www\./i", "", $_SERVER['HTTP_HOST']);
15
+
16
+ if ( isset($_GET['mp3']) ) {
17
+
18
+ $mp3 = strip_tags($_GET['mp3']);
19
+ $playerID = ( isset($_GET['pID']) ) ? strip_tags($_GET['pID']) : "";
20
+
21
+ if ( preg_match("!\.mp3$!i", $mp3) ) {
22
+
23
+ $sent = substr($mp3, 3);
24
+ $file = substr(strrchr($sent, "/"), 1);
25
+
26
+ if ( ($lp = strpos($sent, $rooturl)) || preg_match("!^/!", $sent) ) { //if local
27
+
28
+ if ( $lp !== false ) { //a url
29
+
30
+ $fp = str_replace($rooturl, "", $sent);
31
+ $fp = str_replace("www.", "", $fp);
32
+ $fp = str_replace("http://", "", $fp);
33
+ $fp = str_replace("https://", "", $fp);
34
+
35
+ } else { //a folder path
36
+
37
+ $fp = $sent;
38
+ }
39
+
40
+ if ( ($fsize = @filesize($_SERVER['DOCUMENT_ROOT'] . $fp)) !== false ) { //if file can be read then set headers and cookie
41
+
42
+ header('Accept-Ranges: bytes'); // download resume
43
+ header('Content-Disposition: attachment; filename=' . $file);
44
+ header('Content-Type: audio/mpeg');
45
+ header('Content-Length: ' . $fsize);
46
+
47
+ @readfile($_SERVER['DOCUMENT_ROOT'] . $fp);
48
+
49
+ //if past the readfile then something went wrong
50
+ $dbug .= "#read failed";
51
+
52
+ } else {
53
+
54
+ $dbug .= "#no file";
55
+ }
56
+
57
+ } else {
58
+
59
+ $dbug .= "#unreadable";
60
+ }
61
+
62
+ } else {
63
+
64
+ $dbug .= "#not an mp3";
65
+ }
66
+
67
+ } else {
68
+
69
+ $dbug .= "#no get param";
70
+ }
71
+
72
+ ?>
73
+ <!DOCTYPE html>
74
+ <html>
75
+ <head>
76
+ <title>Download MP3</title>
77
+ </head>
78
+ <body>
79
+
80
+ <?php
81
+ $info = "<p>
82
+ Get: " . $_GET['mp3'] . "<br />
83
+ Sent: " . $sent . "<br />
84
+ File: " . $file . "<br />
85
+ Open: " . $_SERVER['DOCUMENT_ROOT'] . $fp . "<br />
86
+ Root: " . $rooturl . "<br />
87
+ pID: " . $playerID . "<br />
88
+ Dbug: " . $dbug . "<br /></p>";
89
+
90
+ echo $info;
91
+ ?>
92
+
93
+ </body>
94
+ </html>
remote/help.txt ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ------------------------------------------------------------
3
+ * MP3-jPlayer 1.8.3
4
+ * How To Force Downloads on Remote Files
5
+ ------------------------------------------------------------
6
+
7
+ This page explains the option field called 'Path to remote downloader files' which is under 'Playlist player' options on the player settings page
8
+
9
+ NOTE 1: If all your mp3 files are on the same domain as this plugin then you can stop reading! You don't need this option, you can leave it blank.
10
+
11
+
12
+ USAGE
13
+ -------
14
+
15
+ With default settings the plugin is ticked to try and force browsrs into saving downloads when the mp3 is on the same domain as the plugin. Using the additional 'Path to remote downloader files' option switches on forced downloads for remote mp3s (mp3s that aren't kept on your domain). To make this option actually work you'll need to place a downloader file on any remote servers you want to force downloads from. The following explains how to do this.
16
+
17
+ NOTE 2: If your remote domains do not run php then you'll need to create an equivalent downloader file to the one that's included and referenced below.
18
+
19
+
20
+
21
+ WHY IT'S NEEDED
22
+ ---------------
23
+
24
+ Because in order to try and make the browser treat the link as a download (rather than playing it as most tend to) the server needs to send instructions (http headers) along with the file. So either the remote server has to be set up to do this by default (unlikely), or we've got to divert to a file that can set the right headers and then send the mp3. This has to be done on the same server as the mp3 file.
25
+
26
+
27
+
28
+ REQUIREMENTS
29
+ ------------
30
+
31
+ - You have access to the remote servers!
32
+
33
+ - That the remote servers all run PHP, or that you can write something equivalent to 'downloader.php' included in the plugin.
34
+
35
+
36
+
37
+ HOW TO SET IT UP
38
+ ----------------
39
+
40
+ 1. Grab a copy of the file called 'downloader.php' that's lives in this directory of the plugin ( mp3-jplayer/remote/ ).
41
+
42
+ 2. Put the 'downloader.php' file anywhere on the remote domain
43
+
44
+ 3. Go to player settings page and enter the path to it (from domain root) in 'Path to remote downloader files' option.
45
+
46
+
47
+ Eg. If you put the file at http://otherdomain.com/downloader.php then enter /downloader.php into the option.
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
screenshot-4.png CHANGED
Binary file
style-param-help.htm ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Style Parameter Help</title>
5
+ <style type="text/css">
6
+ body { font-family: arial, Verdana, sans-serif; }
7
+ p, ul, ol { font-size: 14px; }
8
+ code, pre { font-size: 14px; background:#f0f0f0; line-height:21px; }
9
+ table td { padding:0px 10px 10px 0px; }
10
+ sup { font-size:0.7em; }
11
+ </style>
12
+ </head>
13
+ <body>
14
+
15
+ <div style="width:700px; margin:50px auto 50px auto;">
16
+
17
+ <h3><strong>Style Parameter Help - MP3-jPlayer 1.8.3</strong></h3>
18
+
19
+ <br />
20
+
21
+ <p>The <code>style</code> parameter gives you a way to modify the look of individual players. It takes a list of names separated by spaces (the names refer to css classes).</p>
22
+
23
+ <p>Eg. <code>[mp3t style="bigger3" track="http://sjward.org/seven.mp3"]</code><br />
24
+ Eg. <code>[mp3-jplayer style="dark smaller" tracks="http://sjward.org/seven.mp3"]</code></p>
25
+
26
+ <p>The table below shows a list of the available names that are ready to be used.</p>
27
+ <br />
28
+ <p>If you're comfortable writing css then you can define your own modifications in a custom stylesheet. Use the 'players-1-8-silver.css'
29
+ file in the plugin's css folder as a starting point. Here's how to set it up:</p>
30
+
31
+ <ol>
32
+ <li>Copy 'players-1-8-silver.css' to a folder outside of the plugins folder on your domain.</li>
33
+ <li>Set the style option to 'Custom' on the plugin settings page, and point it to your css file using the 'uri' field.</li>
34
+ </ol>
35
+
36
+ <br /><br />
37
+
38
+ <h3>Available Class Names For Use In <code>style</code> Parameter</h3>
39
+
40
+ <table>
41
+ <tr style="border-bottom:1px solid #bbb;">
42
+ <td style="width:140px;border-bottom:1px solid #bbb;"><strong>NAME</strong></td>
43
+ <td style="width:250px;border-bottom:1px solid #bbb;"><strong>EFFECT</strong></td>
44
+ <td style="width:250px;border-bottom:1px solid #bbb;"><strong>WORKS WITH</strong></td>
45
+ </tr>
46
+ <tr>
47
+ <td>&nbsp;</td>
48
+ <td>&nbsp;</td>
49
+ <td>&nbsp;</td>
50
+ </tr>
51
+ <tr>
52
+ <td>bigger1</td>
53
+ <td>Makes player a bit bigger</td>
54
+ <td>[mp3t], [mp3j]</td>
55
+ </tr>
56
+ <tr>
57
+ <td>bigger2</td>
58
+ <td>A bit bigger still</td>
59
+ <td>[mp3t], [mp3j]</td>
60
+ </tr>
61
+ <tr>
62
+ <td>bigger3</td>
63
+ <td>Even bigger</td>
64
+ <td>[mp3t], [mp3j]</td>
65
+ </tr>
66
+ <tr>
67
+ <td>bigger4</td>
68
+ <td>Quite big</td>
69
+ <td>[mp3t], [mp3j]</td>
70
+ </tr>
71
+ <tr>
72
+ <td>bigger5</td>
73
+ <td>Big</td>
74
+ <td>[mp3t], [mp3j]</td>
75
+ </tr>
76
+ <tr>
77
+ <td>&nbsp;</td>
78
+ <td>&nbsp;</td>
79
+ <td>&nbsp;</td>
80
+ </tr>
81
+ <tr>
82
+ <td>outline</td>
83
+ <td>Button graphic variation</td>
84
+ <td>[mp3j], [mp3-jplayer], [mp3-popout]</td>
85
+ </tr>
86
+ <tr>
87
+ <td>&nbsp;</td>
88
+ <td>&nbsp;</td>
89
+ <td>&nbsp;</td>
90
+ </tr>
91
+ <tr>
92
+ <td>dark</td>
93
+ <td>Same as 'Dark' player style *<sup>1</sup></td>
94
+ <td>[mp3-jplayer], [mp3-popout]</td>
95
+ </tr>
96
+ <tr>
97
+ <td>silver</td>
98
+ <td>Same as 'Silver' player style *<sup>2</sup></td>
99
+ <td>[mp3-jplayer], [mp3-popout]</td>
100
+ </tr>
101
+ <tr>
102
+ <td>text</td>
103
+ <td>Similar to 'Text' player style *<sup>3</sup></td>
104
+ <td>[mp3-jplayer], [mp3-popout]</td>
105
+ </tr>
106
+ <tr>
107
+ <td>noscreen</td>
108
+ <td>removes titles, uses thin bars *<sup>4</sup></td>
109
+ <td>[mp3-jplayer], [mp3-popout]</td>
110
+ </tr>
111
+ <tr>
112
+ <td>&nbsp;</td>
113
+ <td>&nbsp;</td>
114
+ <td>&nbsp;</td>
115
+ </tr>
116
+ <tr>
117
+ <td>nolistbutton</td>
118
+ <td>Removes playlist toggle button</td>
119
+ <td>[mp3-jplayer], [mp3-popout]</td>
120
+ </tr>
121
+ <tr>
122
+ <td>nopopoutbutton</td>
123
+ <td>Removes popout button</td>
124
+ <td>[mp3-jplayer], [mp3-popout]</td>
125
+ </tr>
126
+ <tr>
127
+ <td>nopn</td>
128
+ <td>Removes prev/next buttons</td>
129
+ <td>[mp3-jplayer], [mp3-popout]</td>
130
+ </tr>
131
+ <tr>
132
+ <td>nostop</td>
133
+ <td>Removes stop button</td>
134
+ <td>[mp3-jplayer], [mp3-popout]</td>
135
+ </tr>
136
+ <tr>
137
+ <td>&nbsp;</td>
138
+ <td>&nbsp;</td>
139
+ <td>&nbsp;</td>
140
+ </tr>
141
+ <tr>
142
+ <td>smaller</td>
143
+ <td>Smaller fonts</td>
144
+ <td>[mp3-jplayer], [mp3-popout]</td>
145
+ </tr>
146
+ <tr>
147
+ <td>&nbsp;</td>
148
+ <td>&nbsp;</td>
149
+ <td>&nbsp;</td>
150
+ </tr>
151
+ <tr>
152
+ <td>bars100</td>
153
+ <td>Moves bars/titles 100px to the right (eg. useful if using artwork images)</td>
154
+ <td>[mp3-jplayer], [mp3-popout]</td>
155
+ </tr>
156
+ <tr>
157
+ <td>bars150</td>
158
+ <td>Moves bars/titles 150px to the right (eg. useful if using artwork images)</td>
159
+ <td>[mp3-jplayer], [mp3-popout]</td>
160
+ </tr>
161
+ <tr>
162
+ <td>bars200</td>
163
+ <td>Moves bars/titles 200px to the right (eg. useful if using artwork images)</td>
164
+ <td>[mp3-jplayer], [mp3-popout]</td>
165
+ </tr>
166
+ <tr>
167
+ <td>bars250</td>
168
+ <td>Moves bars/titles 250px to the right (eg. useful if using artwork images)</td>
169
+ <td>[mp3-jplayer], [mp3-popout]</td>
170
+ </tr>
171
+ <tr>
172
+ <td>bars300</td>
173
+ <td>Moves bars/titles 300px to the right (eg. useful if using artwork images)</td>
174
+ <td>[mp3-jplayer], [mp3-popout]</td>
175
+ </tr>
176
+ <tr>
177
+ <td>bars350</td>
178
+ <td>Moves bars/titles 350px to the right (eg. useful if using artwork images)</td>
179
+ <td>[mp3-jplayer], [mp3-popout]]</td>
180
+ </tr>
181
+ <tr>
182
+ <td>bars400</td>
183
+ <td>Moves bars/titles 400px to the right (eg. useful if using artwork images)</td>
184
+ <td>[mp3-jplayer], [mp3-popout]</td>
185
+ </tr>
186
+ <tr>
187
+ <td>&nbsp;</td>
188
+ <td>&nbsp;</td>
189
+ <td>&nbsp;</td>
190
+ </tr>
191
+ <tr>
192
+ <td>wtransbars</td>
193
+ <td>White very transparent bars (eg. useful if using waveform images)</td>
194
+ <td>[mp3-jplayer], [mp3-popout]</td>
195
+ </tr>
196
+ <tr>
197
+ <td>btransbars</td>
198
+ <td>Black very transparent bars (eg. useful if using waveform images))</td>
199
+ <td>[mp3-jplayer], [mp3-popout]</td>
200
+ </tr>
201
+ </table>
202
+
203
+
204
+ <hr />
205
+
206
+ <p>*<sup>1</sup> Available from 'Silver' style only.</p>
207
+
208
+ <p>*<sup>2</sup> Available from 'Dark' style only.</p>
209
+
210
+ <p>*<sup>3</sup> Available from 'Dark' and 'Silver' style only. There are some differences between using this and
211
+ the actual 'Text' player style option on the settings page.</p>
212
+
213
+ <p>*<sup>4</sup> Only works in conjunction with 'text' class at the moment, eg. <code>[mp3-jplayer style="text noscreen"]</code></p>
214
+
215
+
216
+
217
+ <hr /><br /><br />
218
+ </div>
219
+ </body></html>
template-tag-help.htm CHANGED
@@ -16,7 +16,7 @@
16
 
17
  <h3><strong>Template Tags</strong></h3>
18
  <p>Note: there's an admin option to ignore the tags which needs to remain unticked when you want to use them.</p>
19
- <p>Instructions: Place tag (1) in the header, place tag (2) where you want the players to be.
20
  <br /><br />
21
 
22
  <p>(1). <strong><code>mp3j_addscripts( $style )</code></strong></p>
16
 
17
  <h3><strong>Template Tags</strong></h3>
18
  <p>Note: there's an admin option to ignore the tags which needs to remain unticked when you want to use them.</p>
19
+ <p>Instructions: Place tag (1) in the header, place tag (2) where you want the players to be.</p>
20
  <br /><br />
21
 
22
  <p>(1). <strong><code>mp3j_addscripts( $style )</code></strong></p>