MP3-jPlayer - Version 1.3.4

Version Description

  • Added template tags.
  • Added new shortcode attributes play and list, and added more values for pos.
  • Added new default position options on settings page
  • Added a smaller player option
Download this release

Release Info

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

Code changes from version 1.3.3 to 1.3.4

css/images/Thumbs.db CHANGED
Binary file
css/mp3-jplayer-cyanALT-sidebar.css ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ____________________________________________
2
+
3
+ MP3-jPlayer CSS - ALT cyan - www.sjward.org
4
+ ____________________________________________
5
+ */
6
+
7
+
8
+ div.jp-playlist-player {
9
+
10
+ /* NOTE position or float is set at the admin panel */
11
+
12
+ border: 0px solid #f00;
13
+ margin: 0px;
14
+ font-family: Verdana, Arial, sans-serif;
15
+ color: #666;
16
+ width: auto;
17
+ background: transparent; }
18
+
19
+
20
+ /* skin
21
+ ----------------------------------------- */
22
+ div.jp-innerwrap { position: relative;
23
+ width: 201px;
24
+ background: transparent; }
25
+
26
+ #innerx { position: absolute;
27
+ width: 181px; /* IE6 */
28
+ height: 103px;
29
+ left: 10px;
30
+ right: 10px;
31
+ top: 0px;
32
+ background: url('images/case2-x.png') repeat-x left top; }
33
+
34
+ #innerleft { position: absolute;
35
+ width: 10px;
36
+ height: 103px; /* IE6 */
37
+ left: 0px;
38
+ top: 0px;
39
+ background: url('images/case2-l.png') no-repeat left top; }
40
+
41
+ #innerright { position: absolute;
42
+ width: 10px;
43
+ height: 103px; /* IE6 */
44
+ right: 0px;
45
+ top: 0px;
46
+ background: url('images/case2-r.png') no-repeat left top; }
47
+
48
+ #innertab { position: absolute;
49
+ width: 100px;
50
+ height: 20px;
51
+ right: 0px;
52
+ top: 0px;
53
+ background: url('images/case2-tabr.png') no-repeat right top; }
54
+
55
+
56
+ /* interface
57
+ ----------------------------------------- */
58
+ div.jp-interface { position: relative;
59
+ width:201px;
60
+ height: 103px;
61
+ border: 0px solid #505050;
62
+ cursor: default; }
63
+
64
+
65
+ /* display */
66
+ #player-track-title {
67
+ position: absolute;
68
+ font: normal normal 500 11px 'verdana', 'Lucida Grande', 'arial', sans-serif;
69
+ top: 22px;
70
+ left: 10px;
71
+ width: auto;
72
+ max-width: 182px;
73
+ color: #4f9ad4; /* 444 01ace5 */
74
+ line-height: 14px;
75
+ white-space: nowrap;
76
+ overflow: hidden; }
77
+
78
+ #player-artist {
79
+ position: absolute;
80
+ font: normal normal 500 9px 'verdana', 'Lucida Grande', 'arial', sans-serif;
81
+ top: 9px;
82
+ left: 16px;
83
+ width: auto;
84
+ color: #909090;
85
+ line-height: 12px;
86
+ max-width: 100px;
87
+ white-space: nowrap;
88
+ overflow: hidden; }
89
+
90
+ div.jp-play-time,
91
+ div.jp-total-time,
92
+ #status { position: absolute;
93
+ font: normal normal 500 8px 'verdana', 'Lucida Grande', 'arial', sans-serif;
94
+ color: #aaacad;
95
+ text-align: left; }
96
+
97
+
98
+
99
+
100
+
101
+ div.jp-play-time { left: 97px; top: 42px; }
102
+ div.jp-total-time { right: 8px; top: 42px; }
103
+ #status { right: 35px; top: 42px; width: 40px; }
104
+
105
+
106
+ #status { font-size: 8px; }
107
+
108
+
109
+
110
+ span.mp3-finding { background: url('../css/images/finding-bar9.gif') no-repeat left top; }
111
+ span.mp3-loading { background: url('../css/images/finding-bar9b.gif') no-repeat right top; }
112
+
113
+
114
+ /* transport buttons */
115
+ div.jp-interface ul.jp-controls {
116
+ list-style-type:none;
117
+ padding:0;
118
+ margin: 0px 0px 0px 16px !important; }
119
+
120
+ div.jp-interface ul.jp-controls li {
121
+ position: absolute;
122
+ margin: 0px;
123
+ padding: 0px;
124
+ list-style-type:none !important; }
125
+
126
+ div.jp-interface ul.jp-controls a, div.jp-interface ul.jp-controls a:hover {
127
+ display: block;
128
+ position: absolute;
129
+ overflow:hidden;
130
+ text-indent:-9999px;
131
+ outline: none;
132
+ margin: 0px;
133
+ padding: 0px;
134
+ border-bottom: none !important; }
135
+
136
+ a.jp-play,
137
+ a.jp-pause,
138
+ a.jp-stop,
139
+ a.jp-previous,
140
+ a.jp-next {
141
+ top:65px;
142
+ width:30px;
143
+ height:30px;
144
+ border: 0px solid #b2b2b2;
145
+ cursor: default;
146
+ border-bottom: none !important; }
147
+
148
+ a.jp-play { left: 152px; width:29px; height:31px; background: url("images/buttons2.png") -110px 1px no-repeat; }
149
+ a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
150
+
151
+ a.jp-pause { left: 152px; width:29px; height:31px; background: url("images/buttons2.png") -2px 1px no-repeat; }
152
+ a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
153
+
154
+ a.jp-stop { left: 123px; width:28px; height:31px; background: url("images/buttons2.png") -80px 1px no-repeat; }
155
+ a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
156
+
157
+ a.jp-previous { left:75px; width:22px; top:66px; background: url("images/buttons2.png") -32px 0px no-repeat; }
158
+ a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
159
+
160
+ a.jp-next { left:97px; width:22px; top:66px; background: url("images/buttons2.png") -55px 0px no-repeat; }
161
+ a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
162
+
163
+
164
+ /* other buttons*/
165
+ #playlist-toggle, #downloadmp3-button {
166
+ position: absolute;
167
+ font: normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif;
168
+ top: 82px;
169
+ left: 1px;
170
+ color: #696969;
171
+ padding: 2px 5px 2px 5px;
172
+ line-height: 11px;
173
+ border: 1px solid #acacac;
174
+ border-left: 1px solid #b1b1b1;
175
+ background: #bbb;
176
+ -moz-border-radius-topright: 3px;
177
+ -webkit-border-top-right-radius: 3px;
178
+ cursor: default; }
179
+
180
+ #playlist-toggle:hover { background: #ccc; color: #777; }
181
+
182
+ #downloadmp3-button { top: 41px; left: 3px; width: 75px;
183
+ padding: 1px 3px 2px 0px;
184
+ border: 0px;
185
+ background-color: #dadada;
186
+ color: #fff;
187
+ -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 5px;
188
+ -webkit-border-top-left-radius: 0px; -webkit-border-top-right-radius: 5px;
189
+ overflow: hidden; }
190
+
191
+ /* #downloadmp3-button:hover { background-color: #49bbff; } */
192
+
193
+ #downloadmp3-button.betweenlinks { background-color: #dadada; }
194
+
195
+ #downloadmp3-button.whilelinks { background-color: #bbb; } /* c7b9a0 d4be96 bbb */
196
+ #downloadmp3-button.whilelinks:hover { background-color: #c7b9a0; }
197
+
198
+ #downloadmp3-button a { color: #ececec;
199
+ display: block;
200
+ width: 100%;
201
+ padding: 0px 5px 0px 5px;
202
+ background: transparent;
203
+ text-decoration: none;
204
+ outline: none;
205
+ border-bottom: none; }
206
+
207
+ #downloadmp3-button a:hover { outline: none; border-bottom: none; color: #ececec; }
208
+
209
+ #downloadmp3-button.betweenlinks a { color: #ececec; }
210
+ #downloadmp3-button.whilelinks a { color: #fff; }
211
+ #downloadmp3-button.whilelinks a:hover { color: #fff; }
212
+
213
+ /* sliders/bars */
214
+ .ui-state-disabled { cursor: default !important; }
215
+ .ui-slider { position: relative; text-align: left; }
216
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
217
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
218
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
219
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
220
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
221
+
222
+ .ui-state-default, .ui-widget-content .ui-state-default {
223
+ outline: none; }
224
+
225
+
226
+ .ui-widget-header { border: 1px solid #888;
227
+ border-left: 0px;
228
+ border-right: 0px;
229
+ background: #77ccff url('images/pos-bar2.gif') repeat-x left top;
230
+ color: #888;
231
+ font-weight: bold; }
232
+
233
+ #sliderVolume { position:absolute;
234
+ top:7px;
235
+ right: 10px;
236
+ width: 58px;
237
+ height:2px;
238
+ background: #777;
239
+ border: 1px solid #444;
240
+ font-size: 1px; /* IE6 - sorts out div height */
241
+ cursor: default; }
242
+
243
+ #sliderVolume .ui-widget-header { background: #ccc; /* 5d84dcb4a488 */ }
244
+
245
+ #sliderVolume .ui-slider-handle {
246
+ height: 11px;
247
+ width: 10px;
248
+ margin-left: -4px;
249
+ top: -5px;
250
+ border: 0px;
251
+ -moz-border-radius: 2px;
252
+ -webkit-border-radius: 2px;
253
+ background: transparent url('images/vol-handle2.gif') no-repeat -1px 0px; }
254
+
255
+ #sliderVolume .ui-slider-handle:hover {
256
+ border-color: #888;
257
+ background: #606060;
258
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px; }
259
+
260
+ #sliderVolume .ui-state-active,
261
+ #sliderVolume .ui-widget-content .ui-state-active {
262
+ border: 0px solid #777;
263
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px;
264
+ outline: none; }
265
+
266
+ #bars_holder { position:absolute;
267
+ top: 55px;
268
+ left: 2px;
269
+ width:197px;
270
+ height: 9px;
271
+ background: #888;
272
+ font-size: 1px; /* IE6 - sorts out div height */
273
+ cursor: default; }
274
+
275
+ #sliderPlayback { position: absolute;
276
+ width: 189px;
277
+ background: #888;
278
+ top: 0px;
279
+ font-size: 5px; /* IE6 - sorts out div height */
280
+ border: 1px solid #888;
281
+ border-bottom: 0px solid #888;
282
+ border-left: 0px solid #888; }
283
+
284
+ #sliderPlayback .ui-slider-handle {
285
+ top: -2px;
286
+ margin-left: -2px;
287
+ border: 0px;
288
+ height: 13px;
289
+ width: 12px;
290
+ background: transparent url('images/pos-handle3.gif') no-repeat left top; }
291
+
292
+ #sliderPlayback .ui-slider-handle:hover {
293
+ background: transparent url('images/pos-handle3H.gif') no-repeat left top; }
294
+
295
+ #sliderPlayback .ui-state-active, #sliderPlayback .ui-widget-content .ui-state-active {
296
+ border: 0px solid #777;
297
+ background: transparent url('images/pos-handle3H.gif') no-repeat left top;
298
+ outline: none; }
299
+
300
+ #loaderBar { position: absolute;
301
+ top: 6px;
302
+ background: #888; }
303
+
304
+ #loaderBar.ui-progressbar {
305
+ text-align: left;
306
+ height: 1px;
307
+ border: 0px solid #888;
308
+ width: 197px;
309
+ background: #888; }
310
+
311
+ .ui-progressbar .ui-progressbar-value {margin: 0px; height:100%; background: #77ccff; }
312
+
313
+ #bars_holder .ui-slider-horizontal { height: 5px; }
314
+
315
+
316
+ /* playlist
317
+ ----------------------------------------- */
318
+ #playlist-wrap { position: relative; }
319
+
320
+ div.jp-playlist { width: 199px; }
321
+
322
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist ul {
323
+ list-style-type:none;
324
+ margin:-1px 0 0 1px !important;
325
+ padding:2px 0px 0px 0px !important;
326
+ background: #f1f1f1 url('images/list-x.gif') repeat-x left -60px;
327
+ border:0px solid #666;
328
+ border-top:none; }
329
+
330
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist li, #playlist-wrap div.jp-playlist li {
331
+ padding:0px 0px 0px 2px !important;
332
+ border-bottom:1px solid #ebebeb !important;
333
+ font-family: 'verdana', 'Lucida Grande', 'arial';
334
+ font-weight: 500;
335
+ font-size: 10px;
336
+ line-height: 18px;
337
+ letter-spacing: 0px;
338
+ word-spacing: 0px;
339
+ margin: 0px;
340
+ background-image: none;
341
+ list-style-type:none !important; }
342
+
343
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_item_last { border-bottom:none; background-image: none; }
344
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_current { background-image: none; }
345
+
346
+
347
+ div.jp-playlist-player div.jp-playlist a, #playlist-wrap div.jp-playlist a {
348
+ color: #444;
349
+ text-decoration: none;
350
+ display: block !important;
351
+ width: 184px;
352
+ padding: 5px 0px 4px 10px !important;
353
+ white-space: nowrap;
354
+ overflow: hidden !important;
355
+ outline: none;
356
+ margin: 0px !important;
357
+ font-family: 'verdana', 'Lucida Grande', 'arial';
358
+ font-weight: 500;
359
+ background-image: none;
360
+ border: 0px; }
361
+
362
+ div.jp-playlist-player div.jp-playlist a:hover, #playlist-wrap div.jp-playlist a:hover {
363
+ color:#00c0f0;
364
+ background: #f7f7f7; }
365
+
366
+ div.jp-playlist-player div.jp-playlist a.jplayer_playlist_current, #playlist-wrap div.jp-playlist a.jplayer_playlist_current {
367
+ color:#77c0f0;
368
+ background: #f4f4f4; }
369
+
370
+
371
+ /* ______________________________________________________________________ */
372
+
css/mp3jplayer-blu-sidebar.css ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ________________________________________
2
+
3
+ MP3-jPlayer CSS - Blue - www.sjward.org
4
+ ________________________________________
5
+ */
6
+
7
+
8
+ div.jp-playlist-player {
9
+
10
+ /* NOTE position or float is set at the admin panel */
11
+
12
+ border: 0px solid #f00;
13
+ margin: 0px;
14
+ font-family: Verdana, Arial, sans-serif;
15
+ color: #666;
16
+ width: auto;
17
+ background: transparent; }
18
+
19
+
20
+ /* skin
21
+ ----------------------------------------- */
22
+ div.jp-innerwrap { position: relative;
23
+ width: 201px;
24
+ background: transparent;
25
+ }
26
+
27
+ #innerx { position: absolute;
28
+ width: 183px; /* IE6 */
29
+ height: 90px;
30
+ left: 9px;
31
+ right: 9px;
32
+ top: 0px;
33
+ background: url('images/case2-x.png') repeat-x left bottom; }
34
+
35
+ #innerleft { position: absolute;
36
+ width: 10px;
37
+ height: 90px; /* IE6 */
38
+ left: -1px;
39
+ top: 0px;
40
+ background: url('images/case2-l.png') no-repeat left bottom; }
41
+
42
+ #innerright { position: absolute;
43
+ width: 10px;
44
+ height: 44px; /* IE6 */
45
+ right: -1px;
46
+ bottom: 0px;
47
+ background: url('images/case2-r.png') no-repeat left bottom; }
48
+
49
+ #innertab { position: absolute;
50
+ width: 100px;
51
+ height: 20px;
52
+ right: 0px;
53
+ top: 0px; }
54
+
55
+
56
+ /* interface
57
+ ----------------------------------------- */
58
+ div.jp-interface { position: relative;
59
+ width:201px;
60
+ height: 90px;
61
+ border: 0px solid #505050;
62
+ cursor: default; }
63
+
64
+
65
+ /* display */
66
+ #player-track-title {
67
+ position: absolute;
68
+ font: normal normal 500 11px 'verdana', 'Lucida Grande', 'arial', sans-serif;
69
+ top: 6px;
70
+ left: 7px;
71
+ width: auto;
72
+ max-width: 182px;
73
+ color: #fff;
74
+ line-height: 14px;
75
+ white-space: nowrap;
76
+ overflow: hidden;
77
+ z-index: 50; }
78
+
79
+ #player-artist {
80
+ position: absolute;
81
+ font: normal normal 500 9px 'verdana', 'Lucida Grande', 'arial', sans-serif;
82
+ top: 22px;
83
+ left: 24px;
84
+ width: auto;
85
+ color: #fff;
86
+ line-height: 12px;
87
+ max-width: 165px;
88
+ white-space: nowrap;
89
+ overflow: hidden;
90
+ z-index: 50; }
91
+
92
+ div.jp-play-time,
93
+ div.jp-total-time,
94
+ #status { position: absolute;
95
+ font: normal normal 500 8px 'verdana', 'Lucida Grande', 'arial', sans-serif;
96
+ color: #eee;
97
+ top: 42px;
98
+ text-align: left;
99
+ z-index: 50; }
100
+
101
+
102
+
103
+
104
+
105
+ div.jp-play-time { left: 95px; color: #fff; }
106
+ div.jp-total-time { right: 10px; }
107
+ #status { right: 37px; width: 40px; }
108
+
109
+
110
+ #status { font-size: 8px; }
111
+
112
+ span.mp3-finding { background: url('../css/images/finding-bar10.gif') repeat-y -2px 3px; margin-left: -3px; padding-left: 4px; }
113
+ span.mp3-loading { background: url('../css/images/finding-barBc.gif') repeat-y -2px 3px; margin-left: -3px; padding-left: 4px; }
114
+
115
+ /* span.mp3-finding { background: url('../css/images/finding-bar11.gif') repeat-y 0px 3px; padding-left: 6px; }
116
+ span.mp3-loading { background: url('../css/images/finding-bar11b.gif') repeat-y 0px 3px; padding-left: 6px; } */
117
+
118
+
119
+ /* transport buttons */
120
+ div.jp-interface ul.jp-controls {
121
+ list-style-type:none;
122
+ padding:0;
123
+ margin: 0px 0px 0px 16px !important; }
124
+
125
+ div.jp-interface ul.jp-controls li {
126
+ position: absolute;
127
+ margin: 0px;
128
+ padding: 0px;
129
+ list-style-type:none !important; }
130
+
131
+ div.jp-interface ul.jp-controls a, div.jp-interface ul.jp-controls a:hover {
132
+ display: block;
133
+ position: absolute;
134
+ overflow:hidden;
135
+ text-indent:-9999px;
136
+ outline: none;
137
+ margin: 0px;
138
+ padding: 0px;
139
+ border-bottom: none !important; }
140
+
141
+ a.jp-play,
142
+ a.jp-pause,
143
+ a.jp-stop,
144
+ a.jp-previous,
145
+ a.jp-next {
146
+ top:57px;
147
+ width:28px;
148
+ height:28px;
149
+ border: 0px solid #b2b2b2;
150
+ cursor: default;
151
+ border-bottom: none !important; }
152
+
153
+ a.jp-play { left: 153px; background: url("images/buttons2.png") -110px -2px no-repeat; }
154
+ a.jp-play:hover { background: url("images/buttons2H.png") -110px -2px no-repeat; border-bottom: none; }
155
+
156
+ a.jp-pause { left: 153px; background: url("images/buttons2.png") -2px -2px no-repeat; }
157
+ a.jp-pause:hover { background: url("images/buttons2H.png") -2px -2px no-repeat; border-bottom: none; }
158
+
159
+ a.jp-stop { left: 124px; background: url("images/buttons2.png") -80px -2px no-repeat; }
160
+ a.jp-stop:hover { background: url("images/buttons2H.png") -80px -2px no-repeat; border-bottom: none; }
161
+
162
+ a.jp-previous { left:75px; width:22px; top:56px; background: url("images/buttons2.png") -32px -2px no-repeat; }
163
+ a.jp-previous:hover { background: url("images/buttons2H.png") -32px -2px no-repeat; border-bottom: none; }
164
+
165
+ a.jp-next { left:98px; width:22px; top:56px; background: url("images/buttons2.png") -55px -2px no-repeat; }
166
+ a.jp-next:hover { background: url("images/buttons2H.png") -55px -2px no-repeat; border-bottom: none; }
167
+
168
+
169
+ /* other buttons*/
170
+ #playlist-toggle, #downloadmp3-button {
171
+ position: absolute;
172
+ font: normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif;
173
+ top: 69px;
174
+ left: 1px;
175
+ color: #696969;
176
+ padding: 2px 5px 2px 5px;
177
+ line-height: 11px;
178
+ border: 1px solid #acacac;
179
+ border-left: 1px solid #b1b1b1;
180
+ background: #bbb;
181
+ -moz-border-radius-topright: 3px;
182
+ -webkit-border-top-right-radius: 3px;
183
+ cursor: default; }
184
+
185
+ #playlist-toggle:hover { background: #ccc; color: #777; }
186
+
187
+ #downloadmp3-button { top: 40px; left: 1px; width: 81px;
188
+ padding: 1px 3px 2px 0px;
189
+ border: 0px;
190
+ background-color: #ccc;
191
+ color: #fff;
192
+ -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 7px;
193
+ -webkit-border-top-left-radius: 0px; -webkit-border-top-right-radius: 7px;
194
+
195
+ -moz-border-radius-bottomleft: 0px; -moz-border-radius-bottomright: 0px;
196
+ -webkit-border-bottom-left-radius: 0px; -webkit-border-bottom-right-radius: 0px;
197
+ overflow: hidden;
198
+ z-index: 150; }
199
+
200
+ /* #downloadmp3-button:hover { background-color: #49bbff; } */
201
+
202
+ #downloadmp3-button.betweenlinks { background-color: #c0c0c0; }
203
+
204
+ #downloadmp3-button.whilelinks { background-color: #676767; }
205
+ #downloadmp3-button.whilelinks:hover { background-color: #737373; }
206
+
207
+ #downloadmp3-button a { color: #ececec;
208
+ display: block;
209
+ width: 100%;
210
+ padding: 0px 8px 0px 8px;
211
+ background: transparent;
212
+ text-decoration: none;
213
+ border-bottom: none; }
214
+
215
+ #downloadmp3-button a:hover { outline: none; border-bottom: none; color: #ececec; }
216
+
217
+ #downloadmp3-button.betweenlinks a { color: #d7d7d7; }
218
+ #downloadmp3-button.whilelinks a { color: #f3f3f3; }
219
+ #downloadmp3-button.whilelinks a:hover { color: #fff; }
220
+
221
+
222
+ /* sliders/bars */
223
+ .ui-state-disabled { cursor: default !important; }
224
+ .ui-slider { position: relative; text-align: left; }
225
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 100; width: 1.2em; height: 1.2em; cursor: default; }
226
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
227
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
228
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
229
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
230
+
231
+ .ui-state-default, .ui-widget-content .ui-state-default {
232
+ outline: none;
233
+ border: 0px;
234
+ }
235
+
236
+
237
+ .ui-widget-header { border: 0px solid #888;
238
+ border-left: 0px;
239
+ border-right: 0px;
240
+ background: #a8bdda url('images/blue-bar.gif') repeat-y right top;
241
+ color: #888;
242
+ font-weight: bold; }
243
+
244
+ #sliderVolume { position:absolute;
245
+ top:0px;
246
+ right: 1px;
247
+ width: 108px;
248
+ height:2px;
249
+ background: #778;
250
+ border: 1px solid #aab;
251
+ font-size: 1px; /* IE6 */
252
+ cursor: default;
253
+ z-index: 150; }
254
+
255
+ #sliderVolume .ui-widget-header { background: #ccc; }
256
+
257
+ #sliderVolume .ui-slider-handle {
258
+ height: 11px;
259
+ width: 10px;
260
+ margin-left: -8px;
261
+ top: -4px;
262
+ border: 0px;
263
+ -moz-border-radius: 2px;
264
+ -webkit-border-radius: 2px;
265
+ background: transparent url('images/vol-handle2.gif') no-repeat -1px 0px;
266
+ z-index: 150;
267
+ cursor: default; }
268
+
269
+ #sliderVolume .ui-slider-handle:hover {
270
+ border-color: #888;
271
+ background: #606060;
272
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px; }
273
+
274
+ #sliderVolume .ui-state-active,
275
+ #sliderVolume .ui-widget-content .ui-state-active {
276
+ border: 0px solid #777;
277
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px;
278
+ outline: none; }
279
+
280
+ #bars_holder { position:absolute;
281
+ top: 0px;
282
+ left: 0px;
283
+ width:201px;
284
+ height: 55px;
285
+ background: #f0f0f0;
286
+ font-size: 1px; /* IE6 */
287
+ cursor: default; }
288
+
289
+ #sliderPlayback { position:absolute;
290
+ width: 199px;
291
+ left: 1px;
292
+ top: 0px;
293
+ background: transparent;
294
+ font-size: 5px; /* IE6 */
295
+ border: 0px solid #888;
296
+ border-bottom: 0px solid #888;
297
+ border-left: 0px solid #888; }
298
+
299
+ #sliderPlayback .ui-slider-handle {
300
+ top: -6px;
301
+ margin-left: -10px;
302
+ border: 0px;
303
+ height: 58px;
304
+ width: 20px;
305
+ z-index: 100;
306
+ background: transparent url('images/pos-handle40.png') no-repeat 0px top;
307
+ cursor: e-resize; }
308
+
309
+ #sliderPlayback .ui-slider-handle:hover {
310
+ background: transparent url('images/pos-handle40H.png') no-repeat 0px top; }
311
+
312
+ #sliderPlayback .ui-state-active, #sliderPlayback .ui-widget-content .ui-state-active {
313
+ border: 0px solid #777;
314
+ background: transparent url('images/pos-handle40H.gpng') no-repeat 0px top;
315
+ outline: none;
316
+ z-index: 100; }
317
+
318
+ #loaderBar { position:absolute;
319
+ top: 0px;
320
+ left: 1px;
321
+ background: #ddd; }
322
+
323
+ #loaderBar.ui-progressbar {
324
+ text-align: left;
325
+ height: 54px;
326
+ border: 0px solid #888;
327
+ width: 199px;
328
+ background: #c0c0c0; }
329
+
330
+ .ui-progressbar .ui-progressbar-value {margin: 0px; height:100%;
331
+ background: #90a0b7;
332
+ }
333
+
334
+ #bars_holder .ui-slider-horizontal { height: 53px; }
335
+
336
+
337
+ /* playlist
338
+ ----------------------------------------- */
339
+ #playlist-wrap { position: relative; }
340
+
341
+ div.jp-playlist { width: 199px; }
342
+
343
+ /* #playlist-wrap div.jp-playlist ul{ */
344
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist ul{
345
+ list-style-type:none;
346
+ margin:-1px 0 0 1px !important;
347
+ padding:2px 0px 0px 0px !important;
348
+ background: #f1f1f1 url('images/list-x.gif') repeat-x left -60px;
349
+ border:0px solid #666;
350
+ border-top:none; }
351
+
352
+ /* div.jp-playlist-player div.jp-playlist li, #playlist-wrap div.jp-playlist li { */
353
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist li, #playlist-wrap div.jp-playlist li {
354
+ padding:0px 0px 0px 2px !important;
355
+ border-bottom:1px solid #ebebeb !important;
356
+ font-family: 'verdana', 'Lucida Grande', 'arial';
357
+ font-weight: 500;
358
+ font-size: 10px;
359
+ line-height: 18px;
360
+ letter-spacing: 0px;
361
+ word-spacing: 0px;
362
+ margin: 0px;
363
+ background-image: none;
364
+ list-style-type:none !important; }
365
+
366
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_item_last { border-bottom:none; background-image: none; }
367
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_current { background-image: none; }
368
+
369
+
370
+ div.jp-playlist-player div.jp-playlist a, #playlist-wrap div.jp-playlist a {
371
+ color: #444;
372
+ text-decoration: none;
373
+ display: block !important;
374
+ width: 184px;
375
+ padding: 5px 0px 4px 10px !important;
376
+ white-space: nowrap;
377
+ overflow: hidden !important;
378
+ outline: none;
379
+ margin: 0px !important;
380
+ font-family: 'verdana', 'Lucida Grande', 'arial';
381
+ font-weight: 500;
382
+ background-image: none;
383
+ border: 0px; }
384
+
385
+ div.jp-playlist-player div.jp-playlist a:hover, #playlist-wrap div.jp-playlist a:hover {
386
+ color:#808080; /* b4b4b4 c7b67f d1b37c 00c0f0 */
387
+ background: #f7f7f7; }
388
+
389
+ div.jp-playlist-player div.jp-playlist a.jplayer_playlist_current, #playlist-wrap div.jp-playlist a.jplayer_playlist_current {
390
+ color:#b8a47e; /* 77c0f0 */
391
+ background: #f4f4f4; }
392
+
393
+
394
+ /* ______________________________________________________________________ */
css/mp3jplayer-blu.css CHANGED
@@ -150,19 +150,19 @@ div.jp-interface { position: relative;
150
  cursor: default;
151
  border-bottom: none !important; }
152
 
153
- a.jp-play { left: 233px; background: url("images/buttons2.png") -110px 1px no-repeat; }
154
  a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
155
 
156
- a.jp-pause { left: 233px; background: url("images/buttons2.png") -2px 1px no-repeat; }
157
  a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
158
 
159
  a.jp-stop { left: 203px; background: url("images/buttons2.png") -80px 1px no-repeat; }
160
  a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
161
 
162
- a.jp-previous { left:151px; width:22px; top:57px; background: url("images/buttons2.png") -32px 0px no-repeat; }
163
  a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
164
 
165
- a.jp-next { left:175px; width:22px; top:57px; background: url("images/buttons2.png") -55px 0px no-repeat; }
166
  a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
167
 
168
 
150
  cursor: default;
151
  border-bottom: none !important; }
152
 
153
+ a.jp-play { left: 232px; background: url("images/buttons2.png") -110px 1px no-repeat; }
154
  a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
155
 
156
+ a.jp-pause { left: 232px; background: url("images/buttons2.png") -2px 1px no-repeat; }
157
  a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
158
 
159
  a.jp-stop { left: 203px; background: url("images/buttons2.png") -80px 1px no-repeat; }
160
  a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
161
 
162
+ a.jp-previous { left:152px; width:22px; top:58px; background: url("images/buttons2.png") -32px 0px no-repeat; }
163
  a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
164
 
165
+ a.jp-next { left:175px; width:22px; top:58px; background: url("images/buttons2.png") -55px 0px no-repeat; }
166
  a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
167
 
168
 
css/mp3jplayer-green-sidebar.css ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* _________________________________________
2
+
3
+ MP3-jPlayer CSS - Green - www.sjward.org
4
+ _________________________________________
5
+ */
6
+
7
+
8
+ div.jp-playlist-player {
9
+
10
+ /* NOTE position or float is set at the admin panel */
11
+
12
+ border: 0px solid #f00;
13
+ margin: 0px;
14
+ font-family: Verdana, Arial, sans-serif;
15
+ color: #666;
16
+ width: auto;
17
+ background: transparent; }
18
+
19
+
20
+ /* skin
21
+ ----------------------------------------- */
22
+ div.jp-innerwrap { position: relative;
23
+ width: 201px;
24
+ background: transparent; }
25
+
26
+ #innerx { position: absolute;
27
+ width: 183px; /* IE6 */
28
+ height: 90px;
29
+ left: 9px;
30
+ right: 9px;
31
+ top: 0px;
32
+ background: url('images/case2-x.png') repeat-x left bottom; }
33
+
34
+ #innerleft { position: absolute;
35
+ width: 10px;
36
+ height: 90px; /* IE6 */
37
+ left: -1px;
38
+ top: 0px;
39
+ background: url('images/case2-l.png') no-repeat left bottom; }
40
+
41
+ #innerright { position: absolute;
42
+ width: 10px;
43
+ height: 44px; /* IE6 */
44
+ right: -1px;
45
+ bottom: 0px;
46
+ background: url('images/case2-r.png') no-repeat left bottom; }
47
+
48
+ #innertab { position: absolute;
49
+ width: 100px;
50
+ height: 20px;
51
+ right: 0px;
52
+ top: 0px; }
53
+
54
+
55
+ /* interface
56
+ ----------------------------------------- */
57
+ div.jp-interface { position: relative;
58
+ width:201px;
59
+ height: 90px;
60
+ border: 0px solid #505050;
61
+ cursor: default; }
62
+
63
+
64
+ /* display */
65
+ #player-track-title {
66
+ position: absolute;
67
+ font: normal normal 500 11px 'verdana', 'Lucida Grande', 'arial', sans-serif;
68
+ top: 6px;
69
+ left: 7px;
70
+ width: auto;
71
+ max-width: 182px;
72
+ color: #fff; /* 01ace5 444 01ace5 */
73
+ line-height: 14px;
74
+ white-space: nowrap;
75
+ overflow: hidden;
76
+ z-index: 50; }
77
+
78
+ #player-artist {
79
+ position: absolute;
80
+ font: normal normal 500 9px 'verdana', 'Lucida Grande', 'arial', sans-serif;
81
+ top: 22px;
82
+ left: 24px;
83
+ width: auto;
84
+ color: #fff;
85
+ line-height: 12px;
86
+ max-width: 165px;
87
+ white-space: nowrap;
88
+ overflow: hidden;
89
+ z-index: 50; }
90
+
91
+ div.jp-play-time,
92
+ div.jp-total-time,
93
+ #status { position: absolute;
94
+ font: normal normal 500 8px 'verdana', 'Lucida Grande', 'arial', sans-serif;
95
+ color: #eee;
96
+ top: 42px;
97
+ text-align: left;
98
+ z-index: 50; }
99
+
100
+
101
+
102
+
103
+
104
+ div.jp-play-time { left: 95px; color: #fff; }
105
+ div.jp-total-time { right: 10px; }
106
+ #status { right: 37px; width: 40px; color: #fff; }
107
+
108
+
109
+ #status { font-size: 8px; }
110
+
111
+ span.mp3-finding { background: url('../css/images/finding-bar10.gif') repeat-y -2px 3px; margin-left: -3px; padding-left: 4px; }
112
+ span.mp3-loading { background: url('../css/images/finding-bar10b.gif') repeat-y -2px 3px; margin-left: -3px; padding-left: 4px; }
113
+
114
+
115
+ /* transport buttons */
116
+ div.jp-interface ul.jp-controls {
117
+ list-style-type:none;
118
+ padding:0;
119
+ margin: 0px 0px 0px 16px !important; }
120
+
121
+ div.jp-interface ul.jp-controls li {
122
+ position: absolute;
123
+ margin: 0px;
124
+ padding: 0px;
125
+ list-style-type:none !important; }
126
+
127
+ div.jp-interface ul.jp-controls a, div.jp-interface ul.jp-controls a:hover {
128
+ display: block;
129
+ position: absolute;
130
+ overflow:hidden;
131
+ text-indent:-9999px;
132
+ outline: none;
133
+ margin: 0px;
134
+ padding: 0px;
135
+ border-bottom: none !important; }
136
+
137
+ a.jp-play,
138
+ a.jp-pause,
139
+ a.jp-stop,
140
+ a.jp-previous,
141
+ a.jp-next {
142
+ top:57px;
143
+ width:28px;
144
+ height:28px;
145
+ border: 0px solid #b2b2b2;
146
+ cursor: default;
147
+ border-bottom: none !important; }
148
+
149
+ a.jp-play { left: 153px; background: url("images/buttons2.png") -110px -2px no-repeat; }
150
+ a.jp-play:hover { background: url("images/buttons2H.png") -110px -2px no-repeat; border-bottom: none; }
151
+
152
+ a.jp-pause { left: 153px; background: url("images/buttons2.png") -2px -2px no-repeat; }
153
+ a.jp-pause:hover { background: url("images/buttons2H.png") -2px -2px no-repeat; border-bottom: none; }
154
+
155
+ a.jp-stop { left: 124px; background: url("images/buttons2.png") -80px -2px no-repeat; }
156
+ a.jp-stop:hover { background: url("images/buttons2H.png") -80px -2px no-repeat; border-bottom: none; }
157
+
158
+ a.jp-previous { left:75px; width:22px; top:56px; background: url("images/buttons2.png") -32px -2px no-repeat; }
159
+ a.jp-previous:hover { background: url("images/buttons2H.png") -32px -2px no-repeat; border-bottom: none; }
160
+
161
+ a.jp-next { left:98px; width:22px; top:56px; background: url("images/buttons2.png") -55px -2px no-repeat; }
162
+ a.jp-next:hover { background: url("images/buttons2H.png") -55px -2px no-repeat; border-bottom: none; }
163
+
164
+
165
+ /* other buttons*/
166
+ #playlist-toggle, #downloadmp3-button {
167
+ position: absolute;
168
+ font: normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif;
169
+ top: 69px;
170
+ left: 1px;
171
+ color: #696969;
172
+ padding: 2px 5px 2px 5px;
173
+ line-height: 11px;
174
+ border: 1px solid #acacac;
175
+ border-left: 1px solid #b1b1b1;
176
+ background: #bbb;
177
+ -moz-border-radius-topright: 3px;
178
+ -webkit-border-top-right-radius: 3px;
179
+ cursor: default; }
180
+
181
+ #playlist-toggle:hover { background: #ccc; color: #777; }
182
+
183
+ #downloadmp3-button { top: 40px; left: 1px; width: 81px;
184
+ padding: 1px 3px 2px 0px;
185
+ border: 0px;
186
+ background-color: #ccc;
187
+ color: #fff;
188
+ -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 7px;
189
+ -webkit-border-top-left-radius: 0px; -webkit-border-top-right-radius: 7px;
190
+
191
+ -moz-border-radius-bottomleft: 0px; -moz-border-radius-bottomright: 0px;
192
+ -webkit-border-bottom-left-radius: 0px; -webkit-border-bottom-right-radius: 0px;
193
+ overflow: hidden;
194
+ z-index: 150; }
195
+
196
+ /* #downloadmp3-button:hover { background-color: #49bbff; } */
197
+
198
+ #downloadmp3-button.betweenlinks { background-color: #c0c0c0; }
199
+
200
+ #downloadmp3-button.whilelinks { background-color: #676767; }
201
+ #downloadmp3-button.whilelinks:hover { background-color: #737373; }
202
+
203
+ #downloadmp3-button a { color: #ececec;
204
+ display: block;
205
+ width: 100%;
206
+ padding: 0px 8px 0px 8px;
207
+ background: transparent;
208
+ text-decoration: none;
209
+ border-bottom: none; }
210
+
211
+ #downloadmp3-button a:hover { outline: none; border-bottom: none; color: #ececec; }
212
+
213
+ #downloadmp3-button.betweenlinks a { color: #d7d7d7; }
214
+ #downloadmp3-button.whilelinks a { color: #f3f3f3; }
215
+ #downloadmp3-button.whilelinks a:hover { color: #fff; }
216
+
217
+
218
+ /* sliders/bars */
219
+ .ui-state-disabled { cursor: default !important; }
220
+ .ui-slider { position: relative; text-align: left; }
221
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 100; width: 1.2em; height: 1.2em; cursor: default; }
222
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
223
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
224
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
225
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
226
+
227
+ .ui-state-default, .ui-widget-content .ui-state-default {
228
+ outline: none;
229
+ border: 0px;
230
+ }
231
+
232
+
233
+ .ui-widget-header { border: 0px solid #888;
234
+ border-left: 0px;
235
+ border-right: 0px;
236
+ background: #a9cfac url('images/green-bar2.gif') repeat-y right top;
237
+ color: #888;
238
+ font-weight: bold;
239
+ }
240
+
241
+ #sliderVolume { position:absolute;
242
+ top:0px;
243
+ right: 1px;
244
+ width: 108px;
245
+ height:2px;
246
+ background: #777;
247
+ border: 1px solid #aaa;
248
+ font-size: 1px; /* IE6 */
249
+ cursor: default;
250
+ z-index: 150; }
251
+
252
+ #sliderVolume .ui-widget-header { background: #bbb; /* b4a488 */ }
253
+
254
+ #sliderVolume .ui-slider-handle {
255
+ height: 11px;
256
+ width: 10px;
257
+ margin-left: -8px;
258
+ top: -4px;
259
+ border: 0px;
260
+ -moz-border-radius: 2px;
261
+ -webkit-border-radius: 2px;
262
+ background: transparent url('images/vol-handle2.gif') no-repeat -1px 0px;
263
+ z-index: 150;
264
+ cursor: default; }
265
+
266
+ #sliderVolume .ui-slider-handle:hover {
267
+ border-color: #888;
268
+ background: #606060;
269
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px; }
270
+
271
+ #sliderVolume .ui-state-active,
272
+ #sliderVolume .ui-widget-content .ui-state-active {
273
+ border: 0px solid #777;
274
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px;
275
+ outline: none; }
276
+
277
+ #bars_holder { position:absolute;
278
+ top: 0px;
279
+ left: 0px;
280
+ width:201px;
281
+ height: 55px;
282
+ background: #f0f0f0;
283
+ font-size: 1px; /* IE6 */
284
+ cursor: default; }
285
+
286
+ #sliderPlayback { position:absolute;
287
+ width: 199px;
288
+ left: 1px;
289
+ top: 0px;
290
+ background: transparent;
291
+ font-size: 5px; /* IE6 */
292
+ border: 0px solid #888;
293
+ border-bottom: 0px solid #888;
294
+ border-left: 0px solid #888; }
295
+
296
+ #sliderPlayback .ui-slider-handle {
297
+ top: -6px;
298
+ margin-left: -10px;
299
+ border: 0px;
300
+ height: 58px;
301
+ width: 20px;
302
+ z-index: 100;
303
+ background: transparent url('images/pos-handle40.png') no-repeat 0px top;
304
+ cursor: e-resize; }
305
+
306
+ #sliderPlayback .ui-slider-handle:hover {
307
+ background: transparent url('images/pos-handle40H.png') no-repeat 0px top; }
308
+
309
+ #sliderPlayback .ui-state-active, #sliderPlayback .ui-widget-content .ui-state-active {
310
+ border: 0px solid #777;
311
+ background: transparent url('images/pos-handle40H.gpng') no-repeat 0px top;
312
+ outline: none;
313
+ z-index: 100; }
314
+
315
+ #loaderBar { position:absolute;
316
+ top: 0px;
317
+ left: 1px;
318
+ background: #ddd; }
319
+
320
+ #loaderBar.ui-progressbar {
321
+ text-align: left;
322
+ height: 54px;
323
+ border: 0px solid #888;
324
+ width: 199px;
325
+ background: #c7c7c7; }
326
+
327
+ .ui-progressbar .ui-progressbar-value {margin: 0px; height:100%;
328
+ background: #a3baa5; /* b0b8b1 b8 a3baa5 94c098 8dc392 83b387 b5cfb7 */
329
+ }
330
+
331
+ #bars_holder .ui-slider-horizontal { height: 53px; }
332
+
333
+
334
+ /* playlist
335
+ ----------------------------------------- */
336
+ #playlist-wrap { position: relative; }
337
+
338
+ div.jp-playlist { width: 199px; }
339
+
340
+ /* #playlist-wrap div.jp-playlist ul{ */
341
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist ul {
342
+ list-style-type:none;
343
+ margin:-1px 0 0 1px !important;
344
+ padding:2px 0px 0px 0px !important;
345
+ background: #f1f1f1 url('images/list-x.gif') repeat-x left -60px;
346
+ border:0px solid #666;
347
+ border-top:none; }
348
+
349
+ /* div.jp-playlist-player div.jp-playlist li, #playlist-wrap div.jp-playlist li { */
350
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist li, #playlist-wrap div.jp-playlist li {
351
+ padding:0px 0px 0px 2px !important;
352
+ border-bottom:1px solid #ebebeb !important;
353
+ font-family: 'verdana', 'Lucida Grande', 'arial';
354
+ font-weight: 500;
355
+ font-size: 10px;
356
+ line-height: 18px;
357
+ letter-spacing: 0px;
358
+ word-spacing: 0px;
359
+ margin: 0px;
360
+ background-image: none;
361
+ list-style-type:none !important; }
362
+
363
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_item_last { border-bottom:none; background-image: none; }
364
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_current { background-image: none; }
365
+
366
+
367
+ div.jp-playlist-player div.jp-playlist a, #playlist-wrap div.jp-playlist a {
368
+ color: #444;
369
+ text-decoration: none;
370
+ display: block !important;
371
+ width: 184px;
372
+ padding: 5px 0px 4px 10px !important;
373
+ white-space: nowrap;
374
+ overflow: hidden !important;
375
+ outline: none;
376
+ margin: 0px !important;
377
+ font-family: 'verdana', 'Lucida Grande', 'arial';
378
+ font-weight: 500;
379
+ background-image: none;
380
+ border: 0px; }
381
+
382
+ div.jp-playlist-player div.jp-playlist a:hover, #playlist-wrap div.jp-playlist a:hover {
383
+ color:#808080; /* b4b4b4 c7b67f d1b37c 00c0f0 */
384
+ background: #f7f7f7; }
385
+
386
+ div.jp-playlist-player div.jp-playlist a.jplayer_playlist_current, #playlist-wrap div.jp-playlist a.jplayer_playlist_current {
387
+ color:#b8a47e; /* 77c0f0 */
388
+ background: #f4f4f4; }
389
+
390
+
391
+ /* ______________________________________________________________________ */
css/mp3jplayer-green.css CHANGED
@@ -146,19 +146,19 @@ div.jp-interface { position: relative;
146
  cursor: default;
147
  border-bottom: none !important; }
148
 
149
- a.jp-play { left: 233px; background: url("images/buttons2.png") -110px 1px no-repeat; }
150
  a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
151
 
152
- a.jp-pause { left: 233px; background: url("images/buttons2.png") -2px 1px no-repeat; }
153
  a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
154
 
155
  a.jp-stop { left: 203px; background: url("images/buttons2.png") -80px 1px no-repeat; }
156
  a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
157
 
158
- a.jp-previous { left:151px; width:22px; top:57px; background: url("images/buttons2.png") -32px 0px no-repeat; }
159
  a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
160
 
161
- a.jp-next { left:175px; width:22px; top:57px; background: url("images/buttons2.png") -55px 0px no-repeat; }
162
  a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
163
 
164
 
146
  cursor: default;
147
  border-bottom: none !important; }
148
 
149
+ a.jp-play { left: 232px; background: url("images/buttons2.png") -110px 1px no-repeat; }
150
  a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
151
 
152
+ a.jp-pause { left: 232px; background: url("images/buttons2.png") -2px 1px no-repeat; }
153
  a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
154
 
155
  a.jp-stop { left: 203px; background: url("images/buttons2.png") -80px 1px no-repeat; }
156
  a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
157
 
158
+ a.jp-previous { left:152px; width:22px; top:58px; background: url("images/buttons2.png") -32px 0px no-repeat; }
159
  a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
160
 
161
+ a.jp-next { left:175px; width:22px; top:58px; background: url("images/buttons2.png") -55px 0px no-repeat; }
162
  a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
163
 
164
 
css/mp3jplayer-grey-sidebar.css ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ___________________________________________________
2
+
3
+ MP3-jPlayer CSS - Neutral colours - www.sjward.org
4
+ ___________________________________________________
5
+ */
6
+
7
+
8
+ div.jp-playlist-player {
9
+
10
+ /* NOTE position or float is set at the admin panel */
11
+
12
+ border: 0px solid #f00;
13
+ margin: 0px;
14
+ font-family: Verdana, Arial, sans-serif;
15
+ color: #666;
16
+ width: auto;
17
+ background: transparent; }
18
+
19
+
20
+ /* skin
21
+ ----------------------------------------- */
22
+ div.jp-innerwrap { position: relative;
23
+ width: 201px;
24
+ background: transparent;
25
+ }
26
+
27
+ #innerx { position: absolute;
28
+ width: 183px; /* IE6 */
29
+ height: 90px;
30
+ left: 9px;
31
+ right: 9px;
32
+ top: 0px;
33
+ background: url('images/case2-x.png') repeat-x left bottom; }
34
+
35
+ #innerleft { position: absolute;
36
+ width: 10px;
37
+ height: 90px; /* IE6 */
38
+ left: -1px;
39
+ top: 0px;
40
+ background: url('images/case2-l.png') no-repeat left bottom; }
41
+
42
+ #innerright { position: absolute;
43
+ width: 10px;
44
+ height: 44px; /* IE6 */
45
+ right: -1px;
46
+ bottom: 0px;
47
+ background: url('images/case2-r.png') no-repeat left bottom; }
48
+
49
+ #innertab { position: absolute;
50
+ width: 100px;
51
+ height: 20px;
52
+ right: 0px;
53
+ top: 0px; }
54
+
55
+
56
+ /* interface
57
+ ----------------------------------------- */
58
+ div.jp-interface { position: relative;
59
+ width:201px;
60
+ height: 90px;
61
+ border: 0px solid #505050;
62
+ cursor: default; }
63
+
64
+
65
+ /* display */
66
+ #player-track-title {
67
+ position: absolute;
68
+ font: normal normal 500 11px 'verdana', 'Lucida Grande', 'arial', sans-serif;
69
+ top: 6px;
70
+ left: 7px;
71
+ width: auto;
72
+ max-width: 182px;
73
+ color: #fff;
74
+ line-height: 14px;
75
+ white-space: nowrap;
76
+ overflow: hidden;
77
+ z-index: 50; }
78
+
79
+ #player-artist {
80
+ position: absolute;
81
+ font: normal normal 500 9px 'verdana', 'Lucida Grande', 'arial', sans-serif;
82
+ top: 22px;
83
+ left: 24px;
84
+ width: auto;
85
+ color: #fff;
86
+ line-height: 12px;
87
+ max-width: 165px;
88
+ white-space: nowrap;
89
+ overflow: hidden;
90
+ z-index: 50; }
91
+
92
+ div.jp-play-time,
93
+ div.jp-total-time,
94
+ #status { position: absolute;
95
+ font: normal normal 500 8px 'verdana', 'Lucida Grande', 'arial', sans-serif;
96
+ color: #eee;
97
+ top: 42px;
98
+ text-align: left;
99
+ z-index: 50; }
100
+
101
+
102
+
103
+
104
+
105
+ div.jp-play-time { left: 95px; color: #fff; }
106
+ div.jp-total-time { right: 10px; }
107
+ #status { right: 37px; width: 40px; color: #fff; }
108
+
109
+
110
+ #status { font-size: 8px; }
111
+
112
+
113
+
114
+ span.mp3-finding { background: url('../css/images/finding-bar10.gif') repeat-y -2px 3px; margin-left: -3px; padding-left: 4px; }
115
+ span.mp3-loading { background: url('../css/images/finding-bar10b.gif') repeat-y -2px 3px; margin-left: -3px; padding-left: 4px; }
116
+
117
+
118
+ /* transport buttons */
119
+ div.jp-interface ul.jp-controls {
120
+ list-style-type:none;
121
+ padding:0;
122
+ margin: 0px 0px 0px 16px !important; }
123
+
124
+ div.jp-interface ul.jp-controls li {
125
+ position: absolute;
126
+ margin: 0px;
127
+ padding: 0px;
128
+ list-style-type:none !important; }
129
+
130
+ div.jp-interface ul.jp-controls a, div.jp-interface ul.jp-controls a:hover {
131
+ display: block;
132
+ position: absolute;
133
+ overflow:hidden;
134
+ text-indent:-9999px;
135
+ outline: none;
136
+ margin: 0px;
137
+ padding: 0px;
138
+ border-bottom: none !important; }
139
+
140
+ a.jp-play,
141
+ a.jp-pause,
142
+ a.jp-stop,
143
+ a.jp-previous,
144
+ a.jp-next {
145
+ top:57px;
146
+ width:28px;
147
+ height:28px;
148
+ border: 0px solid #b2b2b2;
149
+ cursor: default;
150
+ border-bottom: none !important; }
151
+
152
+ a.jp-play { left: 153px; background: url("images/buttons2.png") -110px -2px no-repeat; }
153
+ a.jp-play:hover { background: url("images/buttons2H.png") -110px -2px no-repeat; border-bottom: none; }
154
+
155
+ a.jp-pause { left: 153px; background: url("images/buttons2.png") -2px -2px no-repeat; }
156
+ a.jp-pause:hover { background: url("images/buttons2H.png") -2px -2px no-repeat; border-bottom: none; }
157
+
158
+ a.jp-stop { left: 124px; background: url("images/buttons2.png") -80px -2px no-repeat; }
159
+ a.jp-stop:hover { background: url("images/buttons2H.png") -80px -2px no-repeat; border-bottom: none; }
160
+
161
+ a.jp-previous { left:75px; width:22px; top:56px; background: url("images/buttons2.png") -32px -2px no-repeat; }
162
+ a.jp-previous:hover { background: url("images/buttons2H.png") -32px -2px no-repeat; border-bottom: none; }
163
+
164
+ a.jp-next { left:98px; width:22px; top:56px; background: url("images/buttons2.png") -55px -2px no-repeat; }
165
+ a.jp-next:hover { background: url("images/buttons2H.png") -55px -2px no-repeat; border-bottom: none; }
166
+
167
+
168
+ /* other buttons*/
169
+ #playlist-toggle, #downloadmp3-button {
170
+ position: absolute;
171
+ font: normal normal 500 9px 'trebuchet ms', 'Lucida Grande', 'arial', sans-serif;
172
+ top: 69px;
173
+ left: 1px;
174
+ color: #696969;
175
+ padding: 2px 5px 2px 5px;
176
+ line-height: 11px;
177
+ border: 1px solid #acacac;
178
+ border-left: 1px solid #b1b1b1;
179
+ background: #bbb;
180
+ -moz-border-radius-topright: 3px;
181
+ -webkit-border-top-right-radius: 3px;
182
+ cursor: default; }
183
+
184
+ #playlist-toggle:hover { background: #ccc; color: #777; }
185
+
186
+ #downloadmp3-button { top: 40px; left: 1px; width: 81px;
187
+ padding: 1px 3px 2px 0px;
188
+ border: 0px;
189
+ background-color: #ccc;
190
+ color: #fff;
191
+ -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 7px;
192
+ -webkit-border-top-left-radius: 0px; -webkit-border-top-right-radius: 7px;
193
+
194
+ -moz-border-radius-bottomleft: 0px; -moz-border-radius-bottomright: 0px;
195
+ -webkit-border-bottom-left-radius: 0px; -webkit-border-bottom-right-radius: 0px;
196
+ overflow: hidden;
197
+ z-index: 150;
198
+ }
199
+
200
+ /* #downloadmp3-button:hover { background-color: #49bbff; } */
201
+
202
+ #downloadmp3-button.betweenlinks { background-color: #c0c0c0; }
203
+
204
+ #downloadmp3-button.whilelinks { background-color: #676767; }
205
+ #downloadmp3-button.whilelinks:hover { background-color: #737373; }
206
+
207
+ #downloadmp3-button a { color: #ececec;
208
+ display: block;
209
+ width: 100%;
210
+ padding: 0px 8px 0px 8px;
211
+ background: transparent;
212
+ text-decoration: none;
213
+ border-bottom: none; }
214
+
215
+ #downloadmp3-button a:hover { outline: none; border-bottom: none; color: #ececec; }
216
+
217
+ #downloadmp3-button.betweenlinks a { color: #d7d7d7; }
218
+ #downloadmp3-button.whilelinks a { color: #f3f3f3; }
219
+ #downloadmp3-button.whilelinks a:hover { color: #fff; }
220
+
221
+
222
+ /* sliders/bars */
223
+ .ui-state-disabled { cursor: default !important; }
224
+ .ui-slider { position: relative; text-align: left; }
225
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 100; width: 1.2em; height: 1.2em; cursor: default; }
226
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
227
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
228
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
229
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
230
+
231
+ .ui-state-default, .ui-widget-content .ui-state-default {
232
+ outline: none;
233
+ border: 0px;
234
+ }
235
+
236
+
237
+ .ui-widget-header { border: 0px solid #888;
238
+ border-left: 0px;
239
+ border-right: 0px;
240
+ background: #b4b4b4 url('images/grey-bar2.gif') repeat-y right top;
241
+ color: #888;
242
+ font-weight: bold; }
243
+
244
+ #sliderVolume { position:absolute;
245
+ top:0px;
246
+ right: 1px;
247
+ width: 108px;
248
+ height:2px;
249
+ background: #777;
250
+ border: 1px solid #bbb;
251
+ font-size: 1px; /* IE6 */
252
+ cursor: default;
253
+ z-index: 150; }
254
+
255
+ #sliderVolume .ui-widget-header { background: #d5d5d5; /* b4a488 */ }
256
+
257
+ #sliderVolume .ui-slider-handle {
258
+ height: 11px;
259
+ width: 10px;
260
+ margin-left: -8px;
261
+ top: -4px;
262
+ border: 0px;
263
+ -moz-border-radius: 2px;
264
+ -webkit-border-radius: 2px;
265
+ background: transparent url('images/vol-handle2.gif') no-repeat -1px 0px;
266
+ z-index: 150;
267
+ cursor: default; }
268
+
269
+ #sliderVolume .ui-slider-handle:hover {
270
+ border-color: #888;
271
+ background: #606060;
272
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px; }
273
+
274
+ #sliderVolume .ui-state-active,
275
+ #sliderVolume .ui-widget-content .ui-state-active {
276
+ border: 0px solid #777;
277
+ background: transparent url('images/vol-handleH.gif') no-repeat -1px 0px;
278
+ outline: none; }
279
+
280
+ #bars_holder { position:absolute;
281
+ top: 0px;
282
+ left: 0px;
283
+ width:201px;
284
+ height: 55px;
285
+ background: #f0f0f0;
286
+ font-size: 1px; /* IE6 */
287
+ cursor: default; }
288
+
289
+ #sliderPlayback { position:absolute;
290
+ width: 199px;
291
+ left: 1px;
292
+ top: 0px;
293
+ background: transparent;
294
+ font-size: 5px; /* IE6 */
295
+ border: 0px solid #888;
296
+ border-bottom: 0px solid #888;
297
+ border-left: 0px solid #888; }
298
+
299
+ #sliderPlayback .ui-slider-handle {
300
+ top: -6px;
301
+ margin-left: -10px;
302
+ border: 0px;
303
+ height: 58px;
304
+ width: 20px;
305
+ z-index: 100;
306
+ background: transparent url('images/pos-handle40.png') no-repeat 0px top;
307
+ cursor: e-resize; }
308
+
309
+ #sliderPlayback .ui-slider-handle:hover {
310
+ background: transparent url('images/pos-handle40H.png') no-repeat 0px top; }
311
+
312
+ #sliderPlayback .ui-state-active, #sliderPlayback .ui-widget-content .ui-state-active {
313
+ border: 0px solid #777;
314
+ background: transparent url('images/pos-handle40H.gpng') no-repeat 0px top;
315
+ outline: none;
316
+ z-index: 100; }
317
+
318
+ #loaderBar { position:absolute;
319
+ top: 0px;
320
+ left: 1px;
321
+ background: #ddd; }
322
+
323
+ #loaderBar.ui-progressbar {
324
+ text-align: left;
325
+ height: 54px;
326
+ border: 0px solid #888;
327
+ width: 199px;
328
+ background: #c7c7c7; }
329
+
330
+ .ui-progressbar .ui-progressbar-value {margin: 0px; height:100%;
331
+ background: #bababa;
332
+ }
333
+
334
+ #bars_holder .ui-slider-horizontal { height: 53px; }
335
+
336
+
337
+ /* playlist
338
+ ----------------------------------------- */
339
+ #playlist-wrap { position: relative; }
340
+
341
+ div.jp-playlist { width: 199px; }
342
+
343
+ /* #playlist-wrap div.jp-playlist ul{ */
344
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist ul{
345
+ list-style-type:none;
346
+ margin:-1px 0 0 1px !important;
347
+ padding:2px 0px 0px 0px !important;
348
+ background: #f1f1f1 url('images/list-x.gif') repeat-x left -60px;
349
+ border:0px solid #666;
350
+ border-top:none; }
351
+
352
+ /* div.jp-playlist-player div.jp-playlist li, #playlist-wrap div.jp-playlist li { */
353
+ div.jp-playlist-player div#jplayer_playlist.jp-playlist li, #playlist-wrap div.jp-playlist li {
354
+ padding:0px 0px 0px 2px !important;
355
+ border-bottom:1px solid #ebebeb !important;
356
+ font-family: 'verdana', 'Lucida Grande', 'arial';
357
+ font-weight: 500;
358
+ font-size: 10px;
359
+ line-height: 18px;
360
+ letter-spacing: 0px;
361
+ word-spacing: 0px;
362
+ margin: 0px;
363
+ background-image: none;
364
+ list-style-type:none !important; }
365
+
366
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_item_last { border-bottom:none; background-image: none; }
367
+ div.jp-playlist-player div.jp-playlist li.jplayer_playlist_current { background-image: none; }
368
+
369
+
370
+ div.jp-playlist-player div.jp-playlist a, #playlist-wrap div.jp-playlist a {
371
+ color: #444;
372
+ text-decoration: none;
373
+ display: block !important;
374
+ width: 184px;
375
+ padding: 5px 0px 4px 10px !important;
376
+ white-space: nowrap;
377
+ overflow: hidden !important;
378
+ outline: none;
379
+ margin: 0px !important;
380
+ font-family: 'verdana', 'Lucida Grande', 'arial';
381
+ font-weight: 500;
382
+ background-image: none;
383
+ border: 0px; }
384
+
385
+ div.jp-playlist-player div.jp-playlist a:hover, #playlist-wrap div.jp-playlist a:hover {
386
+ color:#808080;
387
+ background: #f7f7f7; }
388
+
389
+ div.jp-playlist-player div.jp-playlist a.jplayer_playlist_current, #playlist-wrap div.jp-playlist a.jplayer_playlist_current {
390
+ color:#b8a47e;
391
+ background: #f4f4f4; }
392
+
393
+
394
+ /* ______________________________________________________________________ */
css/mp3jplayer-grey.css CHANGED
@@ -149,19 +149,19 @@ div.jp-interface { position: relative;
149
  cursor: default;
150
  border-bottom: none !important; }
151
 
152
- a.jp-play { left: 233px; background: url("images/buttons2.png") -110px 1px no-repeat; }
153
  a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
154
 
155
- a.jp-pause { left: 233px; background: url("images/buttons2.png") -2px 1px no-repeat; }
156
  a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
157
 
158
  a.jp-stop { left: 203px; background: url("images/buttons2.png") -80px 1px no-repeat; }
159
  a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
160
 
161
- a.jp-previous { left:151px; width:22px; top:57px; background: url("images/buttons2.png") -32px 0px no-repeat; }
162
  a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
163
 
164
- a.jp-next { left:175px; width:22px; top:57px; background: url("images/buttons2.png") -55px 0px no-repeat; }
165
  a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
166
 
167
 
149
  cursor: default;
150
  border-bottom: none !important; }
151
 
152
+ a.jp-play { left: 232px; background: url("images/buttons2.png") -110px 1px no-repeat; }
153
  a.jp-play:hover { background: url("images/buttons2H.png") -110px 1px no-repeat; border-bottom: none; }
154
 
155
+ a.jp-pause { left: 232px; background: url("images/buttons2.png") -2px 1px no-repeat; }
156
  a.jp-pause:hover { background: url("images/buttons2H.png") -2px 1px no-repeat; border-bottom: none; }
157
 
158
  a.jp-stop { left: 203px; background: url("images/buttons2.png") -80px 1px no-repeat; }
159
  a.jp-stop:hover { background: url("images/buttons2H.png") -80px 1px no-repeat; border-bottom: none; }
160
 
161
+ a.jp-previous { left:152px; width:22px; top:58px; background: url("images/buttons2.png") -32px 0px no-repeat; }
162
  a.jp-previous:hover { background: url("images/buttons2H.png") -32px 0px no-repeat; border-bottom: none; }
163
 
164
+ a.jp-next { left:175px; width:22px; top:58px; background: url("images/buttons2.png") -55px 0px no-repeat; }
165
  a.jp-next:hover { background: url("images/buttons2H.png") -55px 0px no-repeat; border-bottom: none; }
166
 
167
 
js/mp3-jplayer.js CHANGED
@@ -1,30 +1,30 @@
1
  <!--
2
- // MP3-jPlayer 1.3.3
3
  // www.sjward.org
4
 
5
  var foxcurrentstate = "open";
6
- var togglediv = "playlist-wrap";
7
- var togglebutton = "playlist-toggle";
8
- var togglecount = 0;
9
 
10
  function toggleplaylist(){
11
  if (foxcurrentstate == "open") {
12
- jQuery("#" + togglediv).fadeOut(300);
13
- jQuery("#" + togglebutton).empty();
14
- if (togglecount == 1){
15
- jQuery("#" + togglebutton).append('SHOW PLAYLIST');
16
- togglecount = 0;
17
  }
18
  else {
19
- jQuery("#" + togglebutton).append('SHOW');
20
  }
21
  foxcurrentstate = "closed";
22
  return;
23
  }
24
  if (foxcurrentstate == "closed") {
25
- jQuery("#" + togglediv).fadeIn("slow");
26
- jQuery("#" + togglebutton).empty();
27
- jQuery("#" + togglebutton).append('HIDE&nbsp;');
28
  foxcurrentstate = "open"
29
  return;
30
  }
@@ -207,7 +207,7 @@ jQuery(document).ready(function(){
207
  }
208
 
209
  if (foxShowPlaylist == "false"){
210
- togglecount = 1;
211
  toggleplaylist();
212
  }
213
 
1
  <!--
2
+ // MP3-jPlayer for Wordpress version 1.3.3.12
3
  // www.sjward.org
4
 
5
  var foxcurrentstate = "open";
6
+ var foxtogglediv = "playlist-wrap";
7
+ var foxtogglebutton = "playlist-toggle";
8
+ var foxtogglecount = 0;
9
 
10
  function toggleplaylist(){
11
  if (foxcurrentstate == "open") {
12
+ jQuery("#" + foxtogglediv).fadeOut(300);
13
+ jQuery("#" + foxtogglebutton).empty();
14
+ if (foxtogglecount == 1){
15
+ jQuery("#" + foxtogglebutton).append('SHOW PLAYLIST');
16
+ foxtogglecount = 0;
17
  }
18
  else {
19
+ jQuery("#" + foxtogglebutton).append('SHOW');
20
  }
21
  foxcurrentstate = "closed";
22
  return;
23
  }
24
  if (foxcurrentstate == "closed") {
25
+ jQuery("#" + foxtogglediv).fadeIn("slow");
26
+ jQuery("#" + foxtogglebutton).empty();
27
+ jQuery("#" + foxtogglebutton).append('HIDE&nbsp;');
28
  foxcurrentstate = "open"
29
  return;
30
  }
207
  }
208
 
209
  if (foxShowPlaylist == "false"){
210
+ foxtogglecount = 1;
211
  toggleplaylist();
212
  }
213
 
mp3jplayer.php CHANGED
@@ -3,13 +3,14 @@
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
  Description: Adds an mp3 player with a playlist to any Wordpress pages and posts that you have assigned mp3's to.
6
- Version: 1.3.3
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
10
  */
11
 
12
- /* Copyright 2010 Simon Ward (email: sinomward@yahoo.co.uk)
 
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License, version 2, as
@@ -29,57 +30,100 @@ if (!class_exists("mp3Fox"))
29
  {
30
  class mp3Fox
31
  {
 
 
 
 
 
 
32
  var $playerHasBeenSet = "false";
33
  var $customFieldsGrabbed = "false";
34
  var $countPlaylist = 0;
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  var $adminOptionsName = "mp3FoxAdminOptions";
37
  var $theSettings = array();
38
 
39
- var $postMetaKeys = array();
40
- var $postMetaValues = array();
 
 
 
 
 
 
 
41
 
42
  /**
43
- * CHECKS IF THERE'S TRACKS
44
- * (HOOKED to wp_head and runs first)
 
45
  *
46
- * Checks only when page is singular at the mo and runs add_scripts if there are tracks. (Currently always adding
47
- * scripts to posts index page when player is allowed, and then checking for tracks during content hook)
48
- *
49
- * @todo: conditional enqueuing for post's index - need a fail-safe way of grabbing the post ids that are gonna be be displayed
50
  */
51
  function check_if_scripts_needed() {
52
 
53
- $this->theSettings = get_option( $this->adminOptionsName );
54
- if (is_singular()) {
55
- if ( $this->grab_Custom_Meta() > 0 ) {
56
- $this->add_Scripts( $this->theSettings['player_theme'] );
57
  }
 
 
 
 
 
58
  }
59
- if ( is_home() && $this->theSettings['player_onblog'] == "true" ) {
60
- $this->add_Scripts( $this->theSettings['player_theme'] );
 
 
 
 
 
 
 
61
  }
62
  return;
63
  }
64
-
65
-
66
  /**
67
- * HANDLES PLAYER ADDITION LOGIC.
68
- * (HOOKED to the_content)
69
  *
70
- * The meta key match is done now (rather than in header) on each loop if the page is the posts index.
71
- *
72
- * @todo: move all key-matching (and array-building) to header once a fail-safe method of pulling the right posts/order that
73
- * will be displayed when not in the loop is figured out).
74
  */
75
  function add_player($content='') {
76
 
 
77
  if ($this->playerHasBeenSet == "true") {
78
  return $content;
79
  }
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  if ( is_home() && $this->theSettings['player_onblog'] == "true" ) {
82
- if ( $this->grab_Custom_Meta() > 0 ) {
83
  $customvalues = $this->postMetaValues;
84
  $customkeys = $this->postMetaKeys;
85
  }
@@ -102,57 +146,218 @@ if (!class_exists("mp3Fox"))
102
  if ( $thePlayList['count'] == 0 ) {
103
  return $content;
104
  }
105
-
106
- $this->write_startup_vars( $thePlayList['count'] );
107
- $this->write_playlist( $thePlayList );
108
 
109
  if ( strpos($content, "[mp3-jplayer") !== false ) {
110
- $this->countPlaylist = $thePlayList['count'];
111
  return $content;
112
  }
113
 
 
 
114
 
115
  $theplayer = $this->write_player_html( $thePlayList['count'], $this->theSettings['player_float'], $this->theSettings['show_downloadmp3'] );
116
  $content = $theplayer . $content . "<br clear=\"all\" />";
117
  $this->playerHasBeenSet = "true";
 
 
118
  return $content;
119
  }
120
 
121
 
122
  /**
123
- * SHORTCODE HANDLER function.
124
  * The attributes overide the settings page values.
 
125
  */
126
  function shortcode_handler($atts, $content = null) {
127
 
 
 
 
 
128
  if ($this->playerHasBeenSet == "true") {
129
  return;
130
  }
131
  if ($this->customFieldsGrabbed == "false") {
132
  return;
133
  }
134
-
135
  extract(shortcode_atts(array(
136
  'pos' => $this->theSettings['player_float'],
137
  'dload' => $this->theSettings['show_downloadmp3'],
 
 
138
  ), $atts));
 
 
 
 
139
  $theplayer = $this->write_player_html( $this->countPlaylist, $pos, $dload );
140
  $this->playerHasBeenSet = "true";
 
 
141
  return $theplayer;
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
 
145
  /**
146
- * GETS RELEVANT META keys/values from the current page/post and
147
- * creates arrays with common indexes.
148
- *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  * Returns number of tracks
150
  */
151
- function grab_Custom_Meta() {
 
 
 
 
152
 
153
  global $wpdb;
154
  global $post;
155
- $pagesmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id =" .$post->ID. " ORDER BY meta_key ASC");
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  $i = 0;
158
  $metacount = 0;
@@ -176,22 +381,65 @@ if (!class_exists("mp3Fox"))
176
  if ( $metacount > 0 ) {
177
  $this->customFieldsGrabbed = "true";
178
  }
179
-
180
  return $metacount;
181
  }
182
-
183
-
184
  /**
185
- * GRABS LIBRARY titles/excerpts/uri's of any audio in wp's library
 
186
  *
187
- * Return: excerpts, titles, uri's, filenames, count.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  */
189
  function grab_library_info() {
190
 
191
  global $wpdb;
192
- $audioInLibrary = $wpdb->get_results("SELECT DISTINCT guid, post_title, post_excerpt FROM $wpdb->posts WHERE post_mime_type = 'audio/mpeg'");
193
  $j=0;
194
  $Lcount = count($audioInLibrary);
 
195
 
196
  foreach ( $audioInLibrary as $libkey => $libvalue ) {
197
  foreach ( $libvalue as $itemkey => $itemvalue ) {
@@ -206,24 +454,27 @@ if (!class_exists("mp3Fox"))
206
  if ( $itemkey == "post_excerpt" ) {
207
  $libraryExcerpts[$j] = $itemvalue;
208
  }
 
 
 
209
  }
210
  $j++;
211
  }
212
- $theLibrary = array( 'excerpts' => $libraryExcerpts,
213
  'titles' => $libraryTitles,
214
  'urls' => $libraryURLs,
215
- 'filenames' => $libraryFilenames,
 
216
  'count' => $Lcount );
 
217
  return $theLibrary;
218
  }
219
 
220
-
221
  /**
222
- * SPLITS up the custom keys/values into artist/title/file arrays with correlating indices. if there's
223
  * no title then uses the filename, if there's no artist then checks whether to use the previous artist.
224
  *
225
- * @todo: merging this function with compare_swap is prob more efficient
226
- *
227
  * Return arrays: artists, titles, filenames.
228
  */
229
  function splitup_meta($customkeys, $customvalues) {
@@ -282,17 +533,24 @@ if (!class_exists("mp3Fox"))
282
 
283
 
284
  /**
285
- * LOOKS FOR any $customFilenames that exist in the library and grabs their full uri's, otherwise
286
- * adds the default path or makes sure has an http if uri/remote. Then if needed cleans up titles or swaps
287
- * titles or artists for the library ones. Returns sanitized arrays ready for playlist
 
288
  *
289
  * Return: artists, titles, urls.
290
  */
291
  function compare_swap($theSplitMeta, $customkeys, $customvalues) {
292
-
293
- $library = $this->grab_library_info();
294
 
295
- foreach ( $theSplitMeta['files'] as $i => $cfvalue ) {
 
 
 
 
 
 
 
 
296
  if ( $library['count'] == 0 ) {
297
  $inLibraryID = false;
298
  }
@@ -349,7 +607,7 @@ if (!class_exists("mp3Fox"))
349
 
350
 
351
  /**
352
- * SORTS either the titles(if a-z ticked) or the keys (only if there's
353
  * any numbering in them) and makes an ordering array
354
  *
355
  * Return: artists, titles, files, order.
@@ -392,15 +650,13 @@ if (!class_exists("mp3Fox"))
392
  }
393
 
394
 
395
- /**
396
  * REMOVES any REMOTE tracks from the playlist arrays if allow_remoteMp3 is unticked.
397
  * current logic requires this filter be run after filenames have been sanitized/replaced by compare_swap() which
398
- * is not ideal.
399
  *
400
  * return: artists, titles, filenames, order, count
401
  *
402
- * @todo: re-write function to filter pre compare_swap() 'cos if no tracks left then don't want to have searched
403
- * library and enqueued stuff etc.
404
  */
405
  function remove_mp3remote( $theTrackLists ) {
406
 
@@ -436,7 +692,7 @@ if (!class_exists("mp3Fox"))
436
  /**
437
  * ENQUEUES the js and css scripts.
438
  */
439
- function add_Scripts($theme='') {
440
 
441
  wp_enqueue_script( 'jquery', '/wp-content/plugins/mp3-jplayer/js/jquery.js' );
442
  wp_enqueue_script( 'ui.core', '/wp-content/plugins/mp3-jplayer/js/ui.core.js', array( 'jquery' ) );
@@ -445,18 +701,29 @@ if (!class_exists("mp3Fox"))
445
  wp_enqueue_script( 'jquery.jplayer.min', '/wp-content/plugins/mp3-jplayer/js/jquery.jplayer.min.js', array( 'jquery' ) );
446
  wp_enqueue_script( 'mp3-jplayer', '/wp-content/plugins/mp3-jplayer/js/mp3-jplayer.js', array( 'jquery' ) );
447
 
448
- if ( $theme == "styleB" ) {
449
- wp_enqueue_style( 'mp3jplayer-green', '/wp-content/plugins/mp3-jplayer/css/mp3jplayer-green.css' );
 
 
 
 
 
 
450
  }
451
- else if ( $theme == "styleC" ) {
452
- wp_enqueue_style( 'mp3jplayer-blu', '/wp-content/plugins/mp3-jplayer/css/mp3jplayer-blu.css' );
453
  }
454
- else if ( $theme == "styleD" ) {
455
- wp_enqueue_style( 'mp3-jplayer-cyanALT', '/wp-content/plugins/mp3-jplayer/css/mp3-jplayer-cyanALT.css' );
456
  }
457
- else { // default
458
- wp_enqueue_style( 'mp3jplayer-grey', '/wp-content/plugins/mp3-jplayer/css/mp3jplayer-grey.css' );
459
  }
 
 
 
 
 
460
  return;
461
  }
462
 
@@ -464,19 +731,26 @@ if (!class_exists("mp3Fox"))
464
  /**
465
  * WRITES player START-UP JS vars
466
  */
467
- function write_startup_vars( $count ) {
 
 
 
 
 
 
 
468
 
469
  $wpinstallpath = get_bloginfo('wpurl');
470
  echo "\n\n<script type=\"text/javascript\">\n<!--\n";
471
  echo "var foxpathtoswf = \"" .$wpinstallpath. "/wp-content/plugins/mp3-jplayer/js\";\n";
472
- echo "var foxAutoPlay =" . $this->theSettings['auto_play'] . ";\n";
473
  echo "var foxInitialVolume =" . $this->theSettings['initial_vol'] . ";\n";
474
  echo "var foxpathtoimages = \"" .$wpinstallpath. "/wp-content/plugins/mp3-jplayer/css/images/\";\n";
475
  if ( $count < 2 ) {
476
  echo "var foxShowPlaylist = \"false\";\n";
477
  }
478
  else {
479
- echo "var foxShowPlaylist = \"" .$this->theSettings['playlist_show']. "\";\n";
480
  }
481
  echo "//-->\n</script>\n\n";
482
  return;
@@ -510,21 +784,39 @@ if (!class_exists("mp3Fox"))
510
  */
511
  function write_player_html( $count, $position, $download ) {
512
 
 
 
 
 
 
 
 
513
  if ( $position == "left" ) {
514
  $floater = "float: left; padding: 5px 50px 50px 0px;";
515
  }
516
  else if ( $position == "right" ) {
517
  $floater = "float: right; padding: 5px 0px 50px 50px;";
518
  }
 
 
 
 
 
 
 
 
 
519
  else {
520
  $floater = "position: relative; padding: 5px 0px 50px 0px;";
521
  }
 
522
  if ( $download == "true" ) {
523
  $showMp3Link = "visibility: visible;";
524
  }
525
  else {
526
  $showMp3Link = "visibility: hidden;";
527
  }
 
528
  if ( $count < 2 ) {
529
  $showlistcontrols = "visibility: hidden;";
530
  }
@@ -568,7 +860,64 @@ if (!class_exists("mp3Fox"))
568
 
569
  return $player;
570
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
  /**
574
  * called when PLUGIN is ACTIVATED to create options if none exist.
@@ -590,17 +939,37 @@ if (!class_exists("mp3Fox"))
590
  }
591
  }
592
 
593
-
594
  /**
595
- * RETURNS the ADMIN settings,
596
- * or creates and returns defaults if they don't exist.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  */
598
  function getAdminOptions() {
599
 
600
  $mp3FoxAdminOptions = array( // default settings
601
  'initial_vol' => '100',
602
  'auto_play' => 'true',
603
- 'mp3_dir' => 'http://www.sjward.org/mp3',
604
  'player_theme' => 'styleA',
605
  'allow_remoteMp3' => 'true',
606
  'playlist_AtoZ' => 'false',
@@ -608,9 +977,12 @@ if (!class_exists("mp3Fox"))
608
  'player_onblog' => 'true',
609
  'playlist_UseLibrary' => 'false',
610
  'playlist_show' => 'true',
611
- 'remember_settings' => 'false',
612
  'hide_mp3extension' => 'false',
613
- 'show_downloadmp3' => 'false' );
 
 
 
614
 
615
  $theOptions = get_option($this->adminOptionsName);
616
  if ( !empty($theOptions) ) {
@@ -625,7 +997,6 @@ if (!class_exists("mp3Fox"))
625
 
626
  /**
627
  * UPDATES and DISPLAYS ADMIN settings on the settings page.
628
- *
629
  */
630
  function printAdminPage() {
631
 
@@ -718,6 +1089,18 @@ if (!class_exists("mp3Fox"))
718
  else {
719
  $theOptions['show_downloadmp3'] = "false";
720
  }
 
 
 
 
 
 
 
 
 
 
 
 
721
 
722
  update_option($this->adminOptionsName, $theOptions);
723
  ?>
@@ -731,22 +1114,24 @@ if (!class_exists("mp3Fox"))
731
  <div class="wrap">
732
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
733
 
734
- <h2>Mp3-jPlayer</h2>
735
- <p class="description" style="margin-top: -4px; margin-bottom: 18px;"><a href="#howto">Player Help</a></p>
736
 
737
- <p class="description" style="margin: 5px 120px 30px 0px;">Below are the global settings for Mp3-jPlayer. The player
738
- will automatically appear on any posts or pages that you have assigned mp3's to.</p>
739
-
740
- <h4 style="margin-bottom: 4px;">Player</h4>
741
- <p style="margin-bottom: 6px;">&nbsp; Initial volume &nbsp; <input type="text" style="text-align:right;" size="2" name="mp3foxVol" value="<?php echo $theOptions['initial_vol'] ?>" /> &nbsp; <span class="description">(0 - 100)</span></p>
 
742
  <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxAutoplay" value="true" <?php if ($theOptions['auto_play'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Autoplay</p>
743
  <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($theOptions['playlist_show'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Start with the playlist showing</p>
744
- <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($theOptions['player_onblog'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Show a player on the posts index
745
- page<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(the player is added to the most recent post that has mp3's assigned)</span></p>
746
  <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxAtoZ" value="true" <?php if ($theOptions['playlist_AtoZ'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Playlist the tracks in alphabetical order</p>
 
 
747
 
748
- <h4 style="margin-bottom: 4px;"><br />Library</h4>
749
- <p style="margin-bottom: 5px;">&nbsp; <input type="checkbox" name="mp3foxUseLibrary" value="true" <?php if ($theOptions['playlist_UseLibrary'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Always use my Media Library titles and excerpts when they exist</p>
750
  <p class="description" style="margin: 0px 0px 9px 35px;"><a href="media-new.php">Upload new tracks</a>
751
  <br /><a href="upload.php?post_mime_type=audio">Go to media library</a></p>
752
 
@@ -763,78 +1148,111 @@ if (!class_exists("mp3Fox"))
763
  $localurl = get_bloginfo('url');
764
  $uploadsfolder = str_replace($localurl, "", $upload_dir['baseurl']); // is empty string only if library is empty
765
  if ( $uploadsfolder != "" ) {
766
- echo "<p class=\"description\" style=\"margin: 0px 120px 20px 35px;\">Your Media Library uploads folder is currently set to <code>" .$uploadsfolder. "</code> , you can always <a href=\"" . $mediapagelink . "\">change it</a> without affecting any of your playlists.</p>";
767
  }
768
  ?>
769
 
770
- <p class="description" style="margin: 0px 120px 5px 10px;">If you have mp3's that don't appear in the Media Library (eg.
771
- if you use ftp outside of Wordpress, or want to play music from another domain) then you can specify a default path or URI to the folder that contains them. Doing this means you only need
772
- write their filenames when making a playlist. You can over-ride your default path / URI anytime on a playlist by specifying the full URI for an mp3.</p>
 
 
773
  <p>&nbsp; Default path or URI &nbsp; <input type="text" size="55" name="mp3foxfolder" value="<?php echo $theOptions['mp3_dir'] ?>" /></p>
774
-
775
- <p style="margin-top: 15px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxAllowRemote" value="true" <?php if ($theOptions['allow_remoteMp3'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Allow mp3's from other domains on
776
- the player's playlists<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(unchecking this option doesn't affect mp3's using your default path or URI)</span></p>
777
-
778
- <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxHideExtension" value="true" <?php if ($theOptions['hide_mp3extension'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Hide .mp3 if a filename is displayed
779
  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(filenames are displayed when there's no available titles)</span></p>
780
 
781
- <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php if ($theOptions['show_downloadmp3'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Display a 'Download mp3' button.</p>
782
-
783
- <h4 style="margin-bottom: 4px;"><br />Style</h4>
784
- <p>&nbsp; <input type="radio" name="mp3foxTheme" value="styleA" <?php if ($theOptions['player_theme'] == "styleA") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Neutral<br />
785
  &nbsp; <input type="radio" name="mp3foxTheme" value="styleB" <?php if ($theOptions['player_theme'] == "styleB") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Green<br />
786
  &nbsp; <input type="radio" name="mp3foxTheme" value="styleC" <?php if ($theOptions['player_theme'] == "styleC") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Blue<br />
787
  &nbsp; <input type="radio" name="mp3foxTheme" value="styleD" <?php if ($theOptions['player_theme'] == "styleD") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Cyan (Alternative style)</p>
 
 
 
 
 
 
788
 
789
- <h4 style="margin-bottom: 4px;"><br />Position</h4>
790
- <p>&nbsp; Left &nbsp;<input type="radio" name="mp3foxFloat" value="left" <?php if ($theOptions['player_float'] == "left") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp;
791
- | &nbsp;<input type="radio" name="mp3foxFloat" value="right" <?php if ($theOptions['player_float'] == "right") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Right</p>
792
- <p>&nbsp; Left &nbsp;<input type="radio" name="mp3foxFloat" value="none" <?php if ($theOptions['player_float'] == "none") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp; but not floated <span class="description">(content appears below the player)</span></p>
793
- <br /><br />
794
 
 
 
 
 
795
  <p style="margin-top: 4px;"><input type="submit" name="update_mp3foxSettings" class="button-primary" value="<?php _e('Update Settings', 'mp3Fox') ?>" />
796
  &nbsp; Remember settings if plugin is deactivated &nbsp;<input type="checkbox" name="mp3foxRemember" value="true" <?php if ($theOptions['remember_settings'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /></p>
797
  </form>
798
 
799
- <p>__________________________________________________________________________________</p>
800
  <a name="howto"></a>
801
- <p class="description" style="margin: 20px 120px 5px 10px;"><strong>How to assign an mp3</strong></p>
802
- <p class="description" style="margin: 10px 120px 5px 10px;">from your Media Library or default path/URI:</p>
803
- <p class="description" style="margin: 10px 120px 5px 10px;">1. Go to a page/post edit screen and scroll down to the custom fields (below the content
804
- box)<br />2. Write <code>mp3</code> into the left hand box<br />3. Write the filename* into the right hand box and hit update page</p>
805
- <p class="description" style="margin: 10px 120px 5px 10px;">* If the file is not in either the media library or your default location then use a full URI.</p>
 
 
 
 
806
 
807
  <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Adding a title and caption:</strong></p>
808
- <p class="description" style="margin: 10px 120px 5px 10px;">1. Add a dot, then a caption in the left hand box like so: <code>mp3.Caption</code><br />2. Add the title, then an '@' before the filename like so: <code>Title@filename</code></p>
809
 
810
  <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Ordering the tracks:</strong></p>
811
- <p class="description" style="margin: 10px 120px 5px 10px;">Number the left boxes eg:<code>1 mp3.Caption</code> will be first on the playlist. Un-numbered tracks appear
812
  below any numbered tracks.</p>
813
 
814
  <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Shortcode:</strong></p>
815
  <p class="description" style="margin: 10px 120px 5px 10px;"><code>[mp3-jplayer]</code></p>
816
- <p class="description" style="margin: 5px 120px 5px 10px;">Supports the following parameters for player float position and display of the download button:<br />pos - left, right, none<br />dload - true, false</p>
817
- <p class="description" style="margin: 10px 120px 5px 10px;">eg. <code>[mp3-jplayer pos=&quot;right&quot; dload=&quot;true&quot;]</code></p>
 
 
 
 
818
  <p class="description" style="margin: 5px 120px 5px 10px;">Shortcode parameters over-ride the settings on this page</p>
819
 
820
- <p class="description" style="margin: 10px 120px 5px 10px;"><br />More help and examples are available from the <a href="http://sjward.org/jplayer-for-wordpress">plugin home page</a></p>
821
- <br /><br /><br /><br /><br />
822
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
823
 
824
  <?php
825
  }
826
 
827
- } /* end class mp3Fox */
828
- }
 
829
 
830
  if ( class_exists("mp3Fox") ) {
831
  $mp3_fox = new mp3Fox();
832
  }
833
  if ( isset($mp3_fox) ) {
834
-
835
- /* initialize admin page */
 
836
  if ( !function_exists("mp3Fox_ap") ) {
837
  function mp3Fox_ap() {
 
838
  global $mp3_fox;
839
  if ( !isset($mp3_fox) ) {
840
  return;
@@ -844,16 +1262,71 @@ if ( isset($mp3_fox) ) {
844
  }
845
  }
846
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
847
 
848
- /* hooks */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
849
  add_action('activate_mp3-jplayer/mp3jplayer.php', array(&$mp3_fox, 'initFox'));
850
  add_action('deactivate_mp3-jplayer/mp3jplayer.php', array(&$mp3_fox, 'uninitFox'));
851
- add_action('wp_head', array(&$mp3_fox, 'check_if_scripts_needed'), 1);
852
  add_action('admin_menu', 'mp3Fox_ap');
853
-
854
- add_filter('the_content', array(&$mp3_fox, 'add_player'));
855
 
 
 
 
856
  add_shortcode('mp3-jplayer', array(&$mp3_fox, 'shortcode_handler'));
 
 
 
 
 
 
 
857
 
858
  }
859
  ?>
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://sjward.org/jplayer-for-wordpress
5
  Description: Adds an mp3 player with a playlist to any Wordpress pages and posts that you have assigned mp3's to.
6
+ Version: 1.3.4
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
10
  */
11
 
12
+ /*
13
+ Copyright 2010 Simon Ward (email: sinomward@yahoo.co.uk)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License, version 2, as
30
  {
31
  class mp3Fox
32
  {
33
+ // -------------------------------
34
+ var $version_of_plugin = "1.3.4";
35
+ var $option_count = 16;
36
+ var $iscompat = false;
37
+ // -------------------------------
38
+
39
  var $playerHasBeenSet = "false";
40
  var $customFieldsGrabbed = "false";
41
  var $countPlaylist = 0;
42
+ var $tagflag = "false";
43
+ var $scriptsflag = "false";
44
+ var $postMetaKeys = array();
45
+ var $postMetaValues = array();
46
+ var $feedKeys = array();
47
+ var $feedValues = array();
48
+ var $stylesheet = "";
49
+ var $mp3LibraryWP = array();
50
+ var $mp3LibraryI = array();
51
+ var $PlayerPlaylist = array();
52
+ var $idfirstFound;
53
 
54
  var $adminOptionsName = "mp3FoxAdminOptions";
55
  var $theSettings = array();
56
 
57
+ // debug
58
+ var $playerSetMethod = "*not attempted*";
59
+ var $putTag_runCount = 0;
60
+ var $shortcode_runCount = 0;
61
+ var $defaultAdd_runCount = 0;
62
+ var $playerAddedOnRun = 0;
63
+ var $debugCount = "0";
64
+ var $scriptsForced = "false";
65
+
66
 
67
  /**
68
+ * Handles SCRIPT ADDITION. If page is the posts index then always adding scripts (and then checking for tracks
69
+ * during content hook), if singular then only adding them when either they've been flagged, or when there's mp3s in this id's
70
+ * custom meta.
71
  *
72
+ * (called via wp_head)
 
 
 
73
  */
74
  function check_if_scripts_needed() {
75
 
76
+ $this->make_compatible();
77
+ if ( $this->scriptsflag == "true" && $this->theSettings['disable_template_tag'] == "false" ) {
78
+ if ( $this->stylesheet == "" ) {
79
+ $this->stylesheet = $this->theSettings['player_theme'];
80
  }
81
+ $this->add_Scripts( $this->stylesheet );
82
+ if (is_singular() ) {
83
+ $this->TT_grab_Custom_Meta();
84
+ }
85
+ $this->scriptsForced = "true";
86
  }
87
+ else {
88
+ if ( is_singular() ) {
89
+ if ( $this->TT_grab_Custom_Meta() > 0 ) {
90
+ $this->add_Scripts( $this->theSettings['player_theme'] );
91
+ }
92
+ }
93
+ if ( is_home() && $this->theSettings['player_onblog'] == "true" ) {
94
+ $this->add_Scripts( $this->theSettings['player_theme'] );
95
+ }
96
  }
97
  return;
98
  }
99
+
100
+
101
  /**
102
+ * Handles DEFAULT player addition via CONTENT.
103
+ * (Called via the_content hook)
104
  *
105
+ * The meta key match is done now (rather than in the head) on each loop if the page is the posts index.
 
 
 
106
  */
107
  function add_player($content='') {
108
 
109
+ $this->defaultAdd_runCount++;
110
  if ($this->playerHasBeenSet == "true") {
111
  return $content;
112
  }
113
+ if ( $this->tagflag == "true" && $this->theSettings['disable_template_tag'] == "false" ) {
114
+ if ( empty($this->idfirstFound) ) {
115
+ if ( $this->TT_grab_Custom_Meta() > 0 ) {
116
+ $customvalues = $this->postMetaValues;
117
+ $customkeys = $this->postMetaKeys;
118
+ global $post;
119
+ $this->idfirstFound = $post->ID;
120
+ }
121
+ }
122
+ return $content;
123
+ }
124
 
125
  if ( is_home() && $this->theSettings['player_onblog'] == "true" ) {
126
+ if ( $this->TT_grab_Custom_Meta() > 0 ) {
127
  $customvalues = $this->postMetaValues;
128
  $customkeys = $this->postMetaKeys;
129
  }
146
  if ( $thePlayList['count'] == 0 ) {
147
  return $content;
148
  }
149
+ $this->countPlaylist = $thePlayList['count'];
150
+ $this->PlayerPlaylist = $thePlayList;
 
151
 
152
  if ( strpos($content, "[mp3-jplayer") !== false ) {
 
153
  return $content;
154
  }
155
 
156
+ $this->write_startup_vars( $thePlayList['count'], $this->theSettings['auto_play'], $this->theSettings['playlist_show'] );
157
+ $this->write_playlist( $thePlayList );
158
 
159
  $theplayer = $this->write_player_html( $thePlayList['count'], $this->theSettings['player_float'], $this->theSettings['show_downloadmp3'] );
160
  $content = $theplayer . $content . "<br clear=\"all\" />";
161
  $this->playerHasBeenSet = "true";
162
+ $this->playerSetMethod = "content (default)";
163
+ $this->playerAddedOnRun = $this->defaultAdd_runCount;
164
  return $content;
165
  }
166
 
167
 
168
  /**
169
+ * Handles player addition via SHORTCODE.
170
  * The attributes overide the settings page values.
171
+ * (Called via [mp3-jplayer] shortcode)
172
  */
173
  function shortcode_handler($atts, $content = null) {
174
 
175
+ $this->shortcode_runCount++;
176
+ if ( $this->tagflag == "true" && $this->theSettings['disable_template_tag'] == "false" ) {
177
+ return;
178
+ }
179
  if ($this->playerHasBeenSet == "true") {
180
  return;
181
  }
182
  if ($this->customFieldsGrabbed == "false") {
183
  return;
184
  }
185
+
186
  extract(shortcode_atts(array(
187
  'pos' => $this->theSettings['player_float'],
188
  'dload' => $this->theSettings['show_downloadmp3'],
189
+ 'play' => $this->theSettings['auto_play'],
190
+ 'list' => $this->theSettings['playlist_show']
191
  ), $atts));
192
+
193
+ $this->write_startup_vars( $this->PlayerPlaylist['count'], $play, $list );
194
+ $this->write_playlist( $this->PlayerPlaylist );
195
+
196
  $theplayer = $this->write_player_html( $this->countPlaylist, $pos, $dload );
197
  $this->playerHasBeenSet = "true";
198
+ $this->playerSetMethod = "shortcode";
199
+ $this->playerAddedOnRun = $this->shortcode_runCount;
200
  return $theplayer;
201
  }
202
 
203
+
204
+ /**
205
+ * Handles player addition via mp3j_put TAG.
206
+ */
207
+ function template_tag_handler( $id = "", $pos = "", $dload = "", $play = "", $list = "" ) {
208
+
209
+ $this->putTag_runCount++;
210
+ if ( $this->playerHasBeenSet == "true" ) {
211
+ return;
212
+ }
213
+ if ( $this->theSettings['disable_template_tag'] == "true" ) {
214
+ return;
215
+ }
216
+ if ( $this->tagflag == "false" ) {
217
+ return;
218
+ }
219
+ if ( ((is_home() || is_archive()) && $this->theSettings['player_onblog'] == "true") || is_singular() ) {
220
+ if ( $id == "first" && !empty($this->idfirstFound) ) {
221
+ $id = $this->idfirstFound;
222
+ }
223
+
224
+ if ( $this->TT_grab_Custom_Meta($id) > 0 && $id != "feed" ) {
225
+ $customvalues = $this->postMetaValues;
226
+ $customkeys = $this->postMetaKeys;
227
+ }
228
+ else if ( $id == "feed" ) {
229
+ $customvalues = $this->feedValues;
230
+ $customkeys = $this->feedKeys;
231
+ }
232
+ else {
233
+ return;
234
+ }
235
+ }
236
+ else {
237
+ return;
238
+ }
239
+
240
+ $theSplitMeta = $this->splitup_meta( $customkeys, $customvalues );
241
+ $theAssembledMeta = $this->compare_swap( $theSplitMeta, $customkeys, $customvalues );
242
+ $theTrackLists = $this->sort_tracks( $theAssembledMeta, $customkeys );
243
+ $thePlayList = $this->remove_mp3remote( $theTrackLists );
244
+ if ( $thePlayList['count'] == 0 ) {
245
+ return;
246
+ }
247
+ $this->countPlaylist = $thePlayList['count'];
248
+ $this->PlayerPlaylist = $thePlayList;
249
+
250
+ if ( $pos == "" ) {
251
+ $pos = $this->theSettings['player_float'];
252
+ }
253
+ if ( $dload == "" ) {
254
+ $dload = $this->theSettings['show_downloadmp3'];
255
+ }
256
+ if ( $play == "" ) {
257
+ $play = $this->theSettings['auto_play'];
258
+ }
259
+ if ( $list == "" ) {
260
+ $list = $this->theSettings['playlist_show'];
261
+ }
262
+
263
+ $this->write_startup_vars( $thePlayList['count'], $play, $list );
264
+ $this->write_playlist( $thePlayList );
265
+
266
+ $theplayer = $this->write_player_html( $thePlayList['count'], $pos, $dload );
267
+ $this->playerHasBeenSet = "true";
268
+ $this->playerSetMethod = "mp3j_put";
269
+ $this->playerAddedOnRun = $this->putTag_runCount;
270
+ echo $theplayer;
271
+ return;
272
+ }
273
+
274
 
275
  /**
276
+ * FLAGS for an UPCOMING mp3j_put TAG.
277
+ * Called via mp3j_flag.
278
+ */
279
+ function flag_tag_handler($set = 1) {
280
+ if ( $set == 0 ) {
281
+ $this->tagflag = "false";
282
+ }
283
+ if ( $set == 1 ) {
284
+ $this->tagflag = "true";
285
+ }
286
+ return;
287
+ }
288
+
289
+
290
+ /**
291
+ * FLAGS for SCRIPTS to be added.
292
+ * Called via mp3j_addscripts.
293
+ */
294
+ function scripts_tag_handler( $style = "" ) {
295
+
296
+ $this->scriptsflag = "true";
297
+ if ( $style == "" ) {
298
+ $this->theSettings = get_option($this->adminOptionsName);
299
+ $this->stylesheet = $this->theSettings['player_theme'];
300
+ }
301
+ else {
302
+ $this->stylesheet = $style;
303
+ }
304
+ return;
305
+ }
306
+
307
+
308
+ /**
309
+ * Returns Mp3 LIBRARY in INDEXED arrays.
310
+ * Called via mp3j_grab_library.
311
+ */
312
+ function grablibrary_handler( $thereturn ) {
313
+
314
+ if ( empty($this->mp3LibraryI) ) {
315
+ $this->grab_library_info();
316
+ }
317
+ $thereturn = $this->mp3LibraryI;
318
+ return $thereturn;
319
+ }
320
+
321
+
322
+ /**
323
+ * Returns Mp3 LIBRARY as returned from the SELECT query.
324
+ * Called via mp3j_grab_library.
325
+ */
326
+ function grablibraryWP_handler( $thereturn ) {
327
+
328
+ if ( empty($this->mp3LibraryWP) ) {
329
+ $this->grab_library_info();
330
+ }
331
+ $thereturn = $this->mp3LibraryWP;
332
+ return $thereturn;
333
+ }
334
+
335
+
336
+ /**
337
+ * GETS custom field META from post/page.
338
+ * Takes optional post id, creates indexed arrays.
339
  * Returns number of tracks
340
  */
341
+ function TT_grab_Custom_Meta( $id = "" ) {
342
+
343
+ if ( $id == "feed" ) {
344
+ return 1;
345
+ }
346
 
347
  global $wpdb;
348
  global $post;
349
+ if ( $id == "" ) {
350
+ $id = $post->ID;
351
+ }
352
+ $pagesmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id =" .$id. " ORDER BY meta_key ASC");
353
+
354
+ if ( !empty($this->postMetaValues) ) {
355
+ unset( $this->postMetaKeys );
356
+ unset( $this->postMetaValues );
357
+ $this->postMetaKeys = array();
358
+ $this->postMetaValues = array();
359
+ $this->customFieldsGrabbed = "false";
360
+ }
361
 
362
  $i = 0;
363
  $metacount = 0;
381
  if ( $metacount > 0 ) {
382
  $this->customFieldsGrabbed = "true";
383
  }
 
384
  return $metacount;
385
  }
386
+
387
+
388
  /**
389
+ * Creates ALTERNATIVE META ARRAYS.
390
+ * Called via mp3j_set_meta.
391
  *
392
+ * $mode not used yet
393
+ */
394
+ function feed_metadata( $tracks, $captions = "", $mode = 1 ) {
395
+
396
+ if ( empty($tracks) || !is_array($tracks) ) {
397
+ return;
398
+ }
399
+ if ( $mode == 1 ) {
400
+ unset( $this->feedKeys );
401
+ unset( $this->feedValues );
402
+ $this->feedKeys = array();
403
+ $this->feedValues = array();
404
+
405
+ $j = 1;
406
+ if ( empty($captions) ) {
407
+ foreach ( $tracks as $i => $file ) {
408
+ $this->feedKeys[$i] = $j++ . " mp3";
409
+ $this->feedValues[$i] = $file;
410
+ }
411
+ }
412
+ else {
413
+ foreach ( $tracks as $i => $file ) {
414
+ if ( !empty($captions[$i]) ) {
415
+ $this->feedKeys[$i] = $j++ . " mp3." . $captions[$i];
416
+ }
417
+ else {
418
+ $this->feedKeys[$i] = $j++ . " mp3";
419
+ }
420
+ $this->feedValues[$i] = $file;
421
+ }
422
+ }
423
+
424
+ return;
425
+ }
426
+ else {
427
+ return;
428
+ }
429
+ }
430
+
431
+
432
+ /**
433
+ * Returns LIBRARY mp3 filenames, titles, excerpts, content, uri's
434
+ * in indexed arrays.
435
  */
436
  function grab_library_info() {
437
 
438
  global $wpdb;
439
+ $audioInLibrary = $wpdb->get_results("SELECT DISTINCT guid, post_title, post_excerpt, post_content FROM $wpdb->posts WHERE post_mime_type = 'audio/mpeg'");
440
  $j=0;
441
  $Lcount = count($audioInLibrary);
442
+ $this->mp3LibraryWP = $audioInLibrary;
443
 
444
  foreach ( $audioInLibrary as $libkey => $libvalue ) {
445
  foreach ( $libvalue as $itemkey => $itemvalue ) {
454
  if ( $itemkey == "post_excerpt" ) {
455
  $libraryExcerpts[$j] = $itemvalue;
456
  }
457
+ if ( $itemkey == "post_content" ) {
458
+ $libraryDescriptions[$j] = $itemvalue;
459
+ }
460
  }
461
  $j++;
462
  }
463
+ $theLibrary = array( 'filenames' => $libraryFilenames,
464
  'titles' => $libraryTitles,
465
  'urls' => $libraryURLs,
466
+ 'excerpts' => $libraryExcerpts,
467
+ 'descriptions' => $libraryDescriptions,
468
  'count' => $Lcount );
469
+ $this->mp3LibraryI = $theLibrary;
470
  return $theLibrary;
471
  }
472
 
473
+
474
  /**
475
+ * SPLITS up the custom keys/values into artist/title/file indexed arrays. if there's
476
  * no title then uses the filename, if there's no artist then checks whether to use the previous artist.
477
  *
 
 
478
  * Return arrays: artists, titles, filenames.
479
  */
480
  function splitup_meta($customkeys, $customvalues) {
533
 
534
 
535
  /**
536
+ * Returns PREPARED ARRAYS that are ready for js playlist.
537
+ * Looks for $customFilenames that exist in the library and grabs their full uri's, otherwise
538
+ * adds default path or makes sure has an http when remote. Cleans up titles that are uri's, swaps
539
+ * titles and/or artists for the library ones when required.
540
  *
541
  * Return: artists, titles, urls.
542
  */
543
  function compare_swap($theSplitMeta, $customkeys, $customvalues) {
 
 
544
 
545
+ if ( empty($this->mp3LibraryI) ) {
546
+ $library = $this->grab_library_info();
547
+ }
548
+ else {
549
+ $library = $this->mp3LibraryI;
550
+ }
551
+
552
+ foreach ( $theSplitMeta['files'] as $i => $cfvalue )
553
+ {
554
  if ( $library['count'] == 0 ) {
555
  $inLibraryID = false;
556
  }
607
 
608
 
609
  /**
610
+ * SORTS by either the titles(if a-z ticked) or by the keys (only if there's
611
  * any numbering in them) and makes an ordering array
612
  *
613
  * Return: artists, titles, files, order.
650
  }
651
 
652
 
653
+ /**
654
  * REMOVES any REMOTE tracks from the playlist arrays if allow_remoteMp3 is unticked.
655
  * current logic requires this filter be run after filenames have been sanitized/replaced by compare_swap() which
656
+ * is maybe not ideal.
657
  *
658
  * return: artists, titles, filenames, order, count
659
  *
 
 
660
  */
661
  function remove_mp3remote( $theTrackLists ) {
662
 
692
  /**
693
  * ENQUEUES the js and css scripts.
694
  */
695
+ function add_Scripts( $theme ) {
696
 
697
  wp_enqueue_script( 'jquery', '/wp-content/plugins/mp3-jplayer/js/jquery.js' );
698
  wp_enqueue_script( 'ui.core', '/wp-content/plugins/mp3-jplayer/js/ui.core.js', array( 'jquery' ) );
701
  wp_enqueue_script( 'jquery.jplayer.min', '/wp-content/plugins/mp3-jplayer/js/jquery.jplayer.min.js', array( 'jquery' ) );
702
  wp_enqueue_script( 'mp3-jplayer', '/wp-content/plugins/mp3-jplayer/js/mp3-jplayer.js', array( 'jquery' ) );
703
 
704
+ // Set the style sheets choosable from admin
705
+
706
+ $small = "";
707
+ if ( $this->theSettings['use_small_player'] == "true" ) {
708
+ $small = "-sidebar";
709
+ }
710
+ if ( $theme == "styleA" ) {
711
+ $theme = "/wp-content/plugins/mp3-jplayer/css/mp3jplayer-grey" . $small . ".css";
712
  }
713
+ if ( $theme == "styleB" ) {
714
+ $theme = "/wp-content/plugins/mp3-jplayer/css/mp3jplayer-green" . $small . ".css";
715
  }
716
+ if ( $theme == "styleC" ) {
717
+ $theme = "/wp-content/plugins/mp3-jplayer/css/mp3jplayer-blu" . $small . ".css";
718
  }
719
+ if ( $theme == "styleD" ) {
720
+ $theme = "/wp-content/plugins/mp3-jplayer/css/mp3-jplayer-cyanALT" . $small . ".css";
721
  }
722
+
723
+ $name = strrchr( $theme, "/");
724
+ $name = str_replace( "/", "", $name);
725
+ $name = str_replace( ".css", "", $name);
726
+ wp_enqueue_style( $name, $theme );
727
  return;
728
  }
729
 
731
  /**
732
  * WRITES player START-UP JS vars
733
  */
734
+ function write_startup_vars( $count, $autoplay = "", $showlist = "" ) {
735
+
736
+ if ( $autoplay != "true" && $autoplay != "false" ) {
737
+ $autoplay = $this->theSettings['auto_play'];
738
+ }
739
+ if ( $showlist != "true" && $showlist != "false" ) {
740
+ $showlist = $this->theSettings['playlist_show'];
741
+ }
742
 
743
  $wpinstallpath = get_bloginfo('wpurl');
744
  echo "\n\n<script type=\"text/javascript\">\n<!--\n";
745
  echo "var foxpathtoswf = \"" .$wpinstallpath. "/wp-content/plugins/mp3-jplayer/js\";\n";
746
+ echo "var foxAutoPlay =" . $autoplay . ";\n";
747
  echo "var foxInitialVolume =" . $this->theSettings['initial_vol'] . ";\n";
748
  echo "var foxpathtoimages = \"" .$wpinstallpath. "/wp-content/plugins/mp3-jplayer/css/images/\";\n";
749
  if ( $count < 2 ) {
750
  echo "var foxShowPlaylist = \"false\";\n";
751
  }
752
  else {
753
+ echo "var foxShowPlaylist = \"" .$showlist. "\";\n";
754
  }
755
  echo "//-->\n</script>\n\n";
756
  return;
784
  */
785
  function write_player_html( $count, $position, $download ) {
786
 
787
+ if ( $this->theSettings['use_small_player'] == "true" ) { //set player widths for centred and right aligned positions
788
+ $width = "201px";
789
+ }
790
+ else {
791
+ $width = "281px";
792
+ }
793
+
794
  if ( $position == "left" ) {
795
  $floater = "float: left; padding: 5px 50px 50px 0px;";
796
  }
797
  else if ( $position == "right" ) {
798
  $floater = "float: right; padding: 5px 0px 50px 50px;";
799
  }
800
+ else if ( $position == "absolute" ) {
801
+ $floater = "position: absolute;";
802
+ }
803
+ else if ( $position == "rel-C" ) {
804
+ $floater = "position:relative; padding:5px 0px 50px 0px; width:" . $width . "; margin:0px auto 0px auto;";
805
+ }
806
+ else if ( $position == "rel-R" ) {
807
+ $floater = "position:relative; padding:5px 0px 50px 0px; width:" . $width . "; margin:0px 0px 0px auto;";
808
+ }
809
  else {
810
  $floater = "position: relative; padding: 5px 0px 50px 0px;";
811
  }
812
+
813
  if ( $download == "true" ) {
814
  $showMp3Link = "visibility: visible;";
815
  }
816
  else {
817
  $showMp3Link = "visibility: hidden;";
818
  }
819
+
820
  if ( $count < 2 ) {
821
  $showlistcontrols = "visibility: hidden;";
822
  }
860
 
861
  return $player;
862
  }
863
+
864
+
865
+ /**
866
+ * DEBUG HELP, prints vars/arrays to browser source view.
867
+ * Called via mp3j_debug() template tag.
868
+ * needs improvement.
869
+ */
870
+ function debug_info( $display = "" ) {
871
+
872
+ $this->make_compatible();
873
+ $this->debugCount++;
874
+ echo "\n\n<!-- *** DEBUG " . $this->debugCount;
875
+ if ( $display == "" ) { echo " (Vars)"; }
876
+ else { echo " (All)"; }
877
+ echo " * MP3-jPlayer (" . $this->version_of_plugin . ") ***\n\nPage type: ";
878
+
879
+ if ( is_home() ) { echo "Posts index"; }
880
+ else if ( is_single() ) { echo "Single post"; }
881
+ else if ( is_page() ) { echo "Single page"; }
882
+ else if ( is_archive() ) { echo "Archive"; }
883
+ else { echo "other"; }
884
+ echo "\nAllow tags: ";
885
+ if ( $this->theSettings['disable_template_tag'] == "false" ) { echo "Yes"; }
886
+ else { echo "NO"; }
887
+ echo "\nScripts flagged: " . $this->scriptsflag . "\nScripts forced: " . $this->scriptsForced . "\nCustom fields grabbed: " . $this->customFieldsGrabbed . "\nmp3j_put flagged: " . $this->tagflag;
888
+ echo "\n\n*** Calls to add player functions\ncontent (default): " . $this->defaultAdd_runCount . "\nshortcode: " . $this->shortcode_runCount . "\nmp3j_put: " . $this->putTag_runCount;
889
+ echo "\n\nAttempted to add via: " . $this->playerSetMethod;
890
+ if ( $this->playerAddedOnRun > 0 ) { echo " on call no. " . $this->playerAddedOnRun; }
891
+ echo "\nplaylist count: " . $this->countPlaylist;
892
+ echo "\nflagged as added: " . $this->playerHasBeenSet;
893
+ echo "\n\nADMIN SETTINGS:\n";
894
+ print_r($this->theSettings);
895
+
896
+ if ( $display == "" || $display == "vars" ) {
897
+ echo " \n\n-->\n\n";
898
+ return;
899
+ }
900
 
901
+ //*
902
+ echo "\n\nMETA KEY MATCHES:\n";
903
+ print_r($this->postMetaKeys);
904
+ echo "\n\nMETA VALUES:\n";
905
+ print_r($this->postMetaValues);
906
+ echo "\n\nFEED KEYS:\n";
907
+ print_r($this->feedKeys);
908
+ echo "\n\nFEED VALUES:\n";
909
+ print_r($this->feedValues);
910
+ echo "\n\nTHE PLAYLIST:\n";
911
+ print_r($this->PlayerPlaylist);
912
+ if ( empty($this->mp3LibraryI) ) { $this->grab_library_info(); }
913
+ echo "\n\n* MP3's IN LIBRARY:\n";
914
+ print_r($this->mp3LibraryI);
915
+ // */
916
+
917
+ echo " \n\n-->\n\n";
918
+ return;
919
+ }
920
+
921
 
922
  /**
923
  * called when PLUGIN is ACTIVATED to create options if none exist.
939
  }
940
  }
941
 
942
+
943
  /**
944
+ * Makes sure options array is up to date with current plugin.
945
+ */
946
+ function make_compatible() {
947
+
948
+ if ( $this->iscompat == true ) {
949
+ return;
950
+ }
951
+ $options = get_option($this->adminOptionsName);
952
+ if ( count($options) == $this->option_count ) {
953
+ $this->theSettings = $options;
954
+ }
955
+ else {
956
+ $this->theSettings = $this->getAdminOptions();
957
+ }
958
+ $this->iscompat = true;
959
+ return;
960
+ }
961
+
962
+
963
+ /**
964
+ * RETURNS updated set of ADMIN SETTINGS with any new options and default values
965
+ * Added to the db.
966
  */
967
  function getAdminOptions() {
968
 
969
  $mp3FoxAdminOptions = array( // default settings
970
  'initial_vol' => '100',
971
  'auto_play' => 'true',
972
+ 'mp3_dir' => '/',
973
  'player_theme' => 'styleA',
974
  'allow_remoteMp3' => 'true',
975
  'playlist_AtoZ' => 'false',
977
  'player_onblog' => 'true',
978
  'playlist_UseLibrary' => 'false',
979
  'playlist_show' => 'true',
980
+ 'remember_settings' => 'true',
981
  'hide_mp3extension' => 'false',
982
+ 'show_downloadmp3' => 'false',
983
+ 'disable_template_tag' => 'false',
984
+ 'db_plugin_version' => $this->version_of_plugin,
985
+ 'use_small_player' => 'false' );
986
 
987
  $theOptions = get_option($this->adminOptionsName);
988
  if ( !empty($theOptions) ) {
997
 
998
  /**
999
  * UPDATES and DISPLAYS ADMIN settings on the settings page.
 
1000
  */
1001
  function printAdminPage() {
1002
 
1089
  else {
1090
  $theOptions['show_downloadmp3'] = "false";
1091
  }
1092
+ if (isset($_POST['disableTemplateTag'])) {
1093
+ $theOptions['disable_template_tag'] = $_POST['disableTemplateTag'];
1094
+ }
1095
+ else {
1096
+ $theOptions['disable_template_tag'] = "false";
1097
+ }
1098
+ if (isset($_POST['mp3foxSmallPlayer'])) {
1099
+ $theOptions['use_small_player'] = $_POST['mp3foxSmallPlayer'];
1100
+ }
1101
+ else {
1102
+ $theOptions['use_small_player'] = "false";
1103
+ }
1104
 
1105
  update_option($this->adminOptionsName, $theOptions);
1106
  ?>
1114
  <div class="wrap">
1115
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
1116
 
1117
+ <h2>Mp3-jPlayer <span class="description" style="font-size: 10px;"> (<?php echo $this->version_of_plugin; ?>)</span></h2>
 
1118
 
1119
+ <p class="description" style="margin: 8px 120px 0px 0px;">Below are the global settings for the player, it
1120
+ will automatically appear on any posts and pages that you have a playlist on. You can use the shortcode to over-ride some of these options.</p>
1121
+ <h4 class="description" style="margin-top: 5px; margin-bottom: 30px; font-weight:500"><a href="#howto">Help</a></h4>
1122
+
1123
+ <h3 style="margin-bottom: 0px;">Player</h3>
1124
+ <p style="margin-top: 7px; margin-bottom: 5px;">&nbsp; Initial volume &nbsp; <input type="text" style="text-align:right;" size="2" name="mp3foxVol" value="<?php echo $theOptions['initial_vol'] ?>" /> &nbsp; <span class="description">(0 - 100)</span></p>
1125
  <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxAutoplay" value="true" <?php if ($theOptions['auto_play'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Autoplay</p>
1126
  <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($theOptions['playlist_show'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Start with the playlist showing</p>
1127
+ <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($theOptions['player_onblog'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Show a player on the posts index page when there's something to play
1128
+ <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(the player is added to the highest post in the list that has a playlist)</span></p>
1129
  <p style="margin-top: 0px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxAtoZ" value="true" <?php if ($theOptions['playlist_AtoZ'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Playlist the tracks in alphabetical order</p>
1130
+ <p style="margin-top: 0px; margin-bottom: 15px;">&nbsp; <input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php if ($theOptions['show_downloadmp3'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Display a 'Download mp3' button</p>
1131
+
1132
 
1133
+ <h3 style="margin-bottom: 4px;"><br />Library mp3's</h3>
1134
+ <p style="margin-bottom: 5px;">&nbsp; <input type="checkbox" name="mp3foxUseLibrary" value="true" <?php if ($theOptions['playlist_UseLibrary'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Always use Media Library titles and excerpts when they exist</p>
1135
  <p class="description" style="margin: 0px 0px 9px 35px;"><a href="media-new.php">Upload new tracks</a>
1136
  <br /><a href="upload.php?post_mime_type=audio">Go to media library</a></p>
1137
 
1148
  $localurl = get_bloginfo('url');
1149
  $uploadsfolder = str_replace($localurl, "", $upload_dir['baseurl']); // is empty string only if library is empty
1150
  if ( $uploadsfolder != "" ) {
1151
+ echo "<p class=\"description\" style=\"margin: 0px 120px 15px 35px;\">Your Media Library uploads folder is currently set to <code>" .$uploadsfolder. "</code> , you can always <a href=\"" . $mediapagelink . "\">change it</a> without affecting any playlists.</p>";
1152
  }
1153
  ?>
1154
 
1155
+ <h3 style="margin-bottom: 8px;"><br />Non-Library mp3's</h3>
1156
+ <p class="description" style="margin: 0px 120px 0px 7px;">Set a folder to play non-library tracks from in the box below. eg <code>/mymusic</code>
1157
+ or <code>www.another-domain.com/folder</code>. You only need write filenames for tracks from here. You can over-ride the
1158
+ default path/URI anytime on a playlist by putting the full URI for an mp3.</p>
1159
+
1160
  <p>&nbsp; Default path or URI &nbsp; <input type="text" size="55" name="mp3foxfolder" value="<?php echo $theOptions['mp3_dir'] ?>" /></p>
1161
+ <p style="margin-top: 20px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="mp3foxAllowRemote" value="true" <?php if ($theOptions['allow_remoteMp3'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Allow mp3's from other domains on
1162
+ the player's playlists<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(unchecking this option doesn't affect mp3's using your default path above if it's an external URI)</span></p>
1163
+ <p style="margin-top: 0px; margin-bottom: 14px;">&nbsp; <input type="checkbox" name="mp3foxHideExtension" value="true" <?php if ($theOptions['hide_mp3extension'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Hide .mp3 if a filename is displayed
 
 
1164
  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(filenames are displayed when there's no available titles)</span></p>
1165
 
1166
+ <h3 style="margin-bottom: 6px;"><br />Style</h3>
1167
+ <p style="margin-bottom: 0px;">&nbsp; <input type="radio" name="mp3foxTheme" value="styleA" <?php if ($theOptions['player_theme'] == "styleA") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Neutral<br />
 
 
1168
  &nbsp; <input type="radio" name="mp3foxTheme" value="styleB" <?php if ($theOptions['player_theme'] == "styleB") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Green<br />
1169
  &nbsp; <input type="radio" name="mp3foxTheme" value="styleC" <?php if ($theOptions['player_theme'] == "styleC") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Blue<br />
1170
  &nbsp; <input type="radio" name="mp3foxTheme" value="styleD" <?php if ($theOptions['player_theme'] == "styleD") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;&nbsp;Cyan (Alternative style)</p>
1171
+ <p style="margin-top:10px; margin-bottom: 24px;">&nbsp; <input type="checkbox" name="mp3foxSmallPlayer" value="true" <?php if ($theOptions['use_small_player'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp; Use a small player</p>
1172
+
1173
+ <h3 style="margin-bottom: 6px;"><br />Position</h3>
1174
+ <p>&nbsp; Left &nbsp;<input type="radio" name="mp3foxFloat" value="left" <?php if ($theOptions['player_float'] == "left") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp;&nbsp;
1175
+ | &nbsp;&nbsp;<input type="radio" name="mp3foxFloat" value="right" <?php if ($theOptions['player_float'] == "right") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp; Right
1176
+ <br /><span class="description">&nbsp; (<strong>floated</strong>, content wraps around the player)</span></p>
1177
 
1178
+ <p>&nbsp; Left &nbsp;<input type="radio" name="mp3foxFloat" value="none" <?php if ($theOptions['player_float'] == "none") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp;&nbsp;
1179
+ | &nbsp;&nbsp;<input type="radio" name="mp3foxFloat" value="rel-C" <?php if ($theOptions['player_float'] == "rel-C") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp; Centre &nbsp;
1180
+ | &nbsp;&nbsp;<input type="radio" name="mp3foxFloat" value="rel-R" <?php if ($theOptions['player_float'] == "rel-R") { _e('checked="checked"', "mp3Fox"); }?> />&nbsp; Right
1181
+ <br /><span class="description">&nbsp; (<strong>relative</strong>, content appears above/below the player)</span></p>
 
1182
 
1183
+ <p style="margin-top: 20px; margin-bottom: 8px;">&nbsp; <input type="checkbox" name="disableTemplateTag" value="true" <?php if ($theOptions['disable_template_tag'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /> &nbsp;Ignore player template-tags in theme
1184
+ <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="description">(player positioning within content only)</span></p>
1185
+
1186
+ <br /><br /><br />
1187
  <p style="margin-top: 4px;"><input type="submit" name="update_mp3foxSettings" class="button-primary" value="<?php _e('Update Settings', 'mp3Fox') ?>" />
1188
  &nbsp; Remember settings if plugin is deactivated &nbsp;<input type="checkbox" name="mp3foxRemember" value="true" <?php if ($theOptions['remember_settings'] == "true") { _e('checked="checked"', "mp3Fox"); }?> /></p>
1189
  </form>
1190
 
 
1191
  <a name="howto"></a>
1192
+ <div style="margin: 26px 120px 0px 0px; border-top: 1px solid #555; height: 10px;"></div>
1193
+ <p style="margin: 0px 120px 0px 0px;">&nbsp;</p>
1194
+ <h4 style="margin: 0px 120px 0px 0px">Help</h4>
1195
+ <p class="description" style="margin: 10px 120px 0px 10px;"><strong>How to play mp3's</strong></p>
1196
+ <p class="description" style="margin: 10px 120px 10px 10px;">Add tracks on page/post edit screens using the custom fields (below the content box), as follows:</p>
1197
+ <p class="description" style="margin: 0px 120px 10px 10px;">1. Enter <code>mp3</code> into the left hand box
1198
+ <br />2. Write the filename* into the right hand box and hit 'add custom field'
1199
+ <br />3. Repeat above to add more mp3's and and hit 'update page' when you're done</p>
1200
+ <p class="description" style="margin: 0px 120px 5px 10px;">* If the file is not in either the media library or your default location then use a full URI.</p>
1201
 
1202
  <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Adding a title and caption:</strong></p>
1203
+ <p class="description" style="margin: 10px 120px 5px 10px;">1. Add a dot, then a caption in the left hand box, eg: <code>mp3.Caption</code><br />2. Add the title, then an '@' before the filename, eg: <code>Title@filename</code></p>
1204
 
1205
  <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Ordering the tracks:</strong></p>
1206
+ <p class="description" style="margin: 10px 120px 5px 10px;">Number the left boxes, eg:<code>1 mp3.Caption</code> will be first on the playlist. Un-numbered tracks appear
1207
  below any numbered tracks.</p>
1208
 
1209
  <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Shortcode:</strong></p>
1210
  <p class="description" style="margin: 10px 120px 5px 10px;"><code>[mp3-jplayer]</code></p>
1211
+ <p class="description" style="margin: 5px 120px 5px 10px;">Has the following attributes for control of player position, download, autoplay, and show playlist on each page/post:</p>
1212
+ <p class="description" style="margin: 5px 120px 5px 10px;">pos - left, right, rel (or none), rel-C, rel-R, absolute)
1213
+ <br />dload - true, false
1214
+ <br />play - true, false
1215
+ <br />list - true, false</p>
1216
+ <p class="description" style="margin: 10px 120px 5px 10px;">eg. <code>[mp3-jplayer play=&quot;true&quot; dload=&quot;true&quot; pos=&quot;rel-C&quot;]</code></p>
1217
  <p class="description" style="margin: 5px 120px 5px 10px;">Shortcode parameters over-ride the settings on this page</p>
1218
 
1219
+ <p class="description" style="margin: 20px 120px 5px 10px;"><strong>Template tags:</strong></p>
1220
+ <p class="description" style="margin: 10px 120px 3px 10px;"><code>mp3j_addscripts( $style )</code></p>
1221
+ <p class="description" style="margin: 0px 120px 3px 10px;"><code>mp3j_flag( $set )</code></p>
1222
+ <p class="description" style="margin: 0px 120px 3px 10px;"><code>mp3j_grab_library( $format )</code></p>
1223
+ <p class="description" style="margin: 0px 120px 3px 10px;"><code>mp3j_set_meta( $tracks, $captions )</code></p>
1224
+ <p class="description" style="margin: 0px 120px 3px 10px;"><code>mp3j_put( $id, $pos, $dload, $autoplay, $showplaylist )</code></p>
1225
+ <p class="description" style="margin: 0px 120px 14px 10px;"><code>mp3j_debug( $output )</code></p>
1226
+ <p class="description" style="margin: 0px 120px 5px 10px;">eg: <code>&lt;?php if ( function_exists( 'mp3j_put' ) ) { mp3j_put( 3, 'absolute', '', 'true' ); } ?&gt;</code></p>
1227
+
1228
+ <?php
1229
+ echo '<p class="description" style="margin: 15px 120px 5px 10px;">See the <a href="' . get_bloginfo('wpurl') . '/wp-content/plugins/mp3-jplayer/readme.htm">readme</a> for more detailed info.</p>';
1230
+ //echo '<p class="description" style="margin: 20px 120px 5px 10px;"><a href="http://sjward.org/jplayer-for-wordpress">Plugin home page</a></p>';
1231
+ ?>
1232
+
1233
+ <div style="margin: 40px 120px 0px 0px; border-top: 1px solid #555; height: 30px;">
1234
+ <p class="description" style="margin: 0px 120px px 0px;"><a href="http://sjward.org/jplayer-for-wordpress">Plugin home page</a></p>
1235
+ </div>
1236
+ <br /><br /><br /><br />
1237
+ </div>
1238
 
1239
  <?php
1240
  }
1241
 
1242
+ } //end class
1243
+ } // end if
1244
+
1245
 
1246
  if ( class_exists("mp3Fox") ) {
1247
  $mp3_fox = new mp3Fox();
1248
  }
1249
  if ( isset($mp3_fox) ) {
1250
+
1251
+ /* initialize mp3-jplayer admin page */
1252
+
1253
  if ( !function_exists("mp3Fox_ap") ) {
1254
  function mp3Fox_ap() {
1255
+
1256
  global $mp3_fox;
1257
  if ( !isset($mp3_fox) ) {
1258
  return;
1262
  }
1263
  }
1264
  }
1265
+
1266
+ /* mp3j hooks */
1267
+
1268
+ function mp3j_put( $id = "", $pos = "", $dload = "", $play = "", $list = "" ) {
1269
+
1270
+ do_action( 'mp3j_put', $id, $pos, $dload, $play, $list );
1271
+ }
1272
+
1273
+ function mp3j_flag( $set = 1 ) {
1274
+
1275
+ do_action('mp3j_flag', $set);
1276
+ }
1277
+
1278
+ function mp3j_addscripts( $style = "" ) {
1279
+
1280
+ do_action('mp3j_addscripts', $style);
1281
+ }
1282
+
1283
+ function mp3j_debug( $display = "" ) {
1284
+
1285
+ do_action('mp3j_debug', $display);
1286
+ }
1287
+
1288
+ function mp3j_grab_library( $format = 1 ) {
1289
 
1290
+ $thereturn = array();
1291
+ if ( $format == 1 ) {
1292
+ $library = apply_filters('mp3j_grab_library', $thereturn );
1293
+ return $library;
1294
+ }
1295
+ if ( $format == 0 ) {
1296
+ $library = apply_filters('mp3j_grab_library_wp', $thereturn );
1297
+ return $library;
1298
+ }
1299
+ else {
1300
+ return;
1301
+ }
1302
+ }
1303
+
1304
+ function mp3j_set_meta( $tracks, $captions = "", $mode = 1 ) {
1305
+
1306
+ if ( empty($tracks) || !is_array($tracks) ) {
1307
+ return;
1308
+ }
1309
+ do_action('mp3j_set_meta', $tracks, $captions, $mode);
1310
+ }
1311
+
1312
+ /* register hooks */
1313
+
1314
+ //admin
1315
  add_action('activate_mp3-jplayer/mp3jplayer.php', array(&$mp3_fox, 'initFox'));
1316
  add_action('deactivate_mp3-jplayer/mp3jplayer.php', array(&$mp3_fox, 'uninitFox'));
 
1317
  add_action('admin_menu', 'mp3Fox_ap');
 
 
1318
 
1319
+ //template
1320
+ add_action('wp_head', array(&$mp3_fox, 'check_if_scripts_needed'), 2);
1321
+ add_filter('the_content', array(&$mp3_fox, 'add_player'));
1322
  add_shortcode('mp3-jplayer', array(&$mp3_fox, 'shortcode_handler'));
1323
+ add_action('mp3j_put', array(&$mp3_fox, 'template_tag_handler'), 10, 5 );
1324
+ add_action('mp3j_flag', array(&$mp3_fox, 'flag_tag_handler'), 10, 1 );
1325
+ add_action('mp3j_addscripts', array(&$mp3_fox, 'scripts_tag_handler'), 1, 1 );
1326
+ add_action('mp3j_debug', array(&$mp3_fox, 'debug_info'), 10, 1 );
1327
+ add_filter('mp3j_grab_library', array(&$mp3_fox, 'grablibrary_handler'), 10, 1 );
1328
+ add_filter('mp3j_grab_library_wp', array(&$mp3_fox, 'grablibraryWP_handler'), 10, 1 );
1329
+ add_action('mp3j_set_meta', array(&$mp3_fox, 'feed_metadata'), 10, 3 );
1330
 
1331
  }
1332
  ?>
readme.htm ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <title>Readme</title>
6
+ </head>
7
+ <style type="text/css">
8
+ <!--
9
+ body {
10
+ font-family: Lucida Grande, Verdana, sans-serif;
11
+ }
12
+
13
+ code {
14
+ font-size: 1.3em
15
+ }
16
+
17
+
18
+
19
+ -->
20
+ </style>
21
+ <body>
22
+
23
+
24
+ <h1>MP3-jPlayer</h1>
25
+
26
+ <p><em>Auto adds an mp3 audio player to pages / posts that you make a playlist on. Can be customised into themes.</em></p>
27
+
28
+ <hr />
29
+
30
+ <p>
31
+ <strong>Contributors:</strong> simon.ward<br />
32
+ <strong>Donate link:</strong> <br />
33
+ <strong>Tags:</strong> mp3, audio, player, music, jplayer, integration, music player, mp3 player, playlist, media, jquery, javascript, plugin, shortcode, css, post, page, sidebar<br />
34
+
35
+ <strong>Requires at least:</strong> 2.8<br />
36
+ <strong>Tested up to:</strong> 3.0.1<br />
37
+ <strong>Stable tag:</strong> 1.3.4 </p>
38
+
39
+ <hr />
40
+
41
+ <h3>Description</h3>
42
+ <p>Version 1.3.4 adds a set of template tags for sidebar/header players etc, new shortcode options including centering and download setting, and a smaller player size option.</p>
43
+
44
+ <p>Features:</p>
45
+
46
+ <ul>
47
+ <li>No setup.</li>
48
+ <li>Play mp3's from your Media Library, a default folder, another domain.</li>
49
+ <li>Add titles and captions to any mp3.</li>
50
+
51
+ <li>Set playlists for download.</li>
52
+ <li>Use or overide the library titles/captions.</li>
53
+ <li>Optional shortcode.</li>
54
+ <li>Simple admin panel.</li>
55
+ <li>Template tags.</li>
56
+ <li>CSS styleable.</li>
57
+ <li>Integrates jquery jPlayer, works on the iPad.</li>
58
+ </ul>
59
+
60
+ <p><br />
61
+
62
+ <a href="http://sjward.org/jplayer-for-wordpress">See a Demo here</a></p>
63
+
64
+ <p><br />
65
+ The player can be added to the most recent post on the post index (that has a playlist), or using template tags it can be put in sidebars/headers etc, fed a playlist, appear on archive pages, and set a stylesheet. Player has sliders, loader bar, status info, and optional download button.</p>
66
+
67
+ <p><br /><br />
68
+ <strong>Making a Playlist</strong></p>
69
+
70
+ <p>Add tracks on page/post edit screens using the custom fields (below the content box), as follows:</p>
71
+
72
+ <ol>
73
+ <li><p>In the left box of a new custom-field enter:</p>
74
+
75
+ <p>mp3</p></li>
76
+ <li><p>Write the filename or URI* of the mp3 into the right box and hit 'Add custom field'.</p></li>
77
+ </ol>
78
+
79
+ <p>Repeat the above to add more tracks, and hit the 'update/publish' button when you're done.</p>
80
+
81
+ <p><br />
82
+ *Use a full URI when the mp3 is not in either a) the library or b) from the default folder/uri. You'll need to set the default folder that you want to use on the settings page.</p>
83
+
84
+ <p><br /><br />
85
+ <strong>Adding a Title</strong></p>
86
+
87
+ <p>Add titles in the right box, before the filename (or uri), separate with an @ sign, eg:</p>
88
+
89
+ <pre><code>Title@filename
90
+ </code></pre>
91
+
92
+ <p><br /><br />
93
+ <strong>Adding aCaption</strong></p>
94
+
95
+ <p>Add the caption in the left hand box after 'mp3', separate with a dot, eg.</p>
96
+
97
+ <pre><code>mp3.Caption
98
+ </code></pre>
99
+
100
+ <p>You can blank out a library caption (or a caption that's been carried over from a previous track) by using just the dot (ie. 'mp3.')</p>
101
+
102
+ <p><br /><br />
103
+ <strong>Play Order</strong></p>
104
+
105
+ <p>To control the playlist order number the left hand boxes, eg:</p>
106
+
107
+ <pre><code>1 mp3
108
+
109
+
110
+ 2 mp3.Caption
111
+
112
+
113
+ 3 mp3.Another Caption
114
+ </code></pre>
115
+
116
+ <p><br /><br />
117
+ <strong>Shortcode</strong></p>
118
+
119
+ <p>Using the shortcode is optional, it lets you position the player within the content rather than at the top of it, and has 4 optional attributes for controlling the position (pos), download setting (dload), autoplay (play), and show playlist (list) on each page. The shortcode is:</p>
120
+
121
+ <p><strong><code>&#x5b;mp3-jplayer]</code></strong></p>
122
+
123
+ <p>The attributes are:</p>
124
+
125
+ <p>pos: left, right, rel (or none), rel-C, rel-R, absolute</p>
126
+
127
+ <p>dload: true, false</p>
128
+
129
+ <p>play: true, false</p>
130
+
131
+ <p>list: true, false</p>
132
+
133
+ <p><br />
134
+ for example</p>
135
+
136
+ <p><strong><code>&#x5b;mp3-jplayer play="true" pos="rel-C" dload="true"]</code></strong></p>
137
+
138
+ <p><br /><br />
139
+ <strong>Template Tags</strong></p>
140
+
141
+ <p><strong>Quick example:</strong>
142
+
143
+ <strong>Make the player move to sidebar on the posts index and play 5 random tracks from your library</strong></p>
144
+
145
+ <p>Put this in index.php before the posts loop starts:</p>
146
+
147
+ <pre><code>&lt;?php if ( function_exists('mp3j_flag') ) { mp3j_flag(); } ?&gt;
148
+ </code></pre>
149
+
150
+
151
+ <p><br />
152
+ Put this in sidebar.php somewhere below the opening div(s):</p>
153
+
154
+ <pre><code>&lt;?php
155
+ if ( function_exists( 'mp3j_grab_library' ) ) {
156
+ $lib = mp3j_grab_library();
157
+ $files = $lib&#x5b;'filenames'];
158
+ shuffle( $files );
159
+ $files = array_slice( $files, 0, 5 );
160
+ mp3j_set_meta( $files );
161
+ mp3j_put( 'feed' );
162
+ }
163
+ ?&gt;
164
+
165
+ </code></pre>
166
+
167
+ <p><br />
168
+ To use the smaller player stylesheet on the above example put this in header.php above wp_head():</p>
169
+
170
+ <pre><code>&lt;?php
171
+ if ( function_exists('mp3j_addscripts') ) {
172
+ if ( is_home() ) {
173
+ mp3j_addscripts('/wp-content/plugins/mp3-jplayer/css/mp3jplayer-blu-sidebar.css');
174
+ }
175
+ }
176
+ ?&gt;
177
+ </code></pre>
178
+
179
+ <p><br /><br />
180
+ <strong>Tag Details</strong></p>
181
+
182
+ <p>Note: there's an admin option to ignore the tags which needs to be unticked when you want to use them!</p>
183
+
184
+ <p><strong><code>mp3j_addscripts( $style )</code></strong></p>
185
+
186
+ <ul>
187
+ <li><p>Forces the player's javascript/CSS to be loaded and allows you to change stylesheet. Scripts aren't automatically enqueued on archive pages and any singular that has no playlist of it's own. When used this tag must be placed above wp_head().</p></li>
188
+ <li><p>$style can be either a uri to a stylesheet, or 'styleA', 'styleB', 'styleC', 'styleD' to use one of the included. Defaults to admin setting if not specified.</p></li>
189
+ </ul>
190
+
191
+ <p><br /></p>
192
+
193
+ <p><strong><code>mp3j_flag( $set )</code></strong></p>
194
+
195
+ <ul>
196
+ <li><p>Tells the plugin to ignore content and shortcodes and to wait for an mp3j_put tag. The flag tag can be anywhere and can be used more than once.</p></li>
197
+
198
+ <li><p>$set can be either 1 (set the flag) or 0 (unset the flag), and is 1 if not specified.</p></li>
199
+ </ul>
200
+
201
+ <p><br /></p>
202
+
203
+ <p><strong><code>mp3j_grab_library( $format )</code></strong></p>
204
+
205
+ <ul>
206
+ <li><p>returns an array of all the mp3's in the library with their 'filenames', 'urls', 'titles', 'excerpts', and 'descriptions'. Can be used anywhere.</p></li>
207
+ <li><p>$format can be either 1 (gives back the above fields in indexed arrays) or 0 (gives back the arrays as returned from the select query), defaults to 1.</p></li>
208
+ </ul>
209
+
210
+ <p><br /></p>
211
+
212
+ <p><strong><code>mp3j_set_meta( $tracks, $captions )</code></strong></p>
213
+
214
+ <ul>
215
+ <li><p>Sets an on-the-fly playlist for the mp3j_put tag to pick up. Can be used anywhere to create a playlist. The arrays you feed in go through the same sorting/filtering routine as if the tracks had been pulled from a page or post, and still respond to the admin settings like 'hide file extension' or 'play in alphabetical order'.</p></li>
216
+ <li><p>$tracks must be an indexed array of any mix of either filenames (from default folder or library) or full uri's, and can include a prefixed title using an '@' as a separator same as the fields do. As the admin settings are still applied, if 'always use library titles..' is ticked and it's a library 'filename' that you're using then any corresponding caption in the $captions array won't make it through, to get control of titles and captions for library files use their 'urls' in the $tracks array.</p></li>
217
+ <li><p>$captions is an optional array, the indexes should correspond to the indexes of their files in the $tracks array.</p></li>
218
+ </ul>
219
+
220
+ <p><br /></p>
221
+
222
+ <p><strong><code>mp3j_put( $mode, $position, $dload, $autoplay, $playlist )</code></strong></p>
223
+
224
+ <ul>
225
+ <li><p>Puts the player on the page (but only if mp3j_flag is set and what you're asking it to play results in some tracks!). Can be used multiple times and must be within the &lt;body&gt;&lt;/body&gt; section of a page.</p></li>
226
+ <li><p>$mode can be: A post id to grab tracks from; 'first' to pick up the tracks from the first content encountered that had a playlist (see note below); 'feed' to pick up an alternative playlist created with mp3j_set_meta; or not set ('') to pick up tracks from any current id;</p></li>
227
+ <li><p>$pos can be 'left', 'right' for float; 'none', 'rel-C', 'rel-R' for relative position; or 'absolute'). Defaults to admin setting</p></li>
228
+ <li><p>$dload - show download button, 'true' or 'false'. defaults to admin setting.</p></li>
229
+ <li><p>$autoplay - 'true' or 'false'. defaults to admin setting.</p></li>
230
+ <li><p>$playlist - start with playlist showing, 'true' or 'false'. defaults to admin setting.</p></li>
231
+
232
+ <li><p>Note on 'first': Typically you'd use this on an index page when the player is in the sidebar (ie. when the put tag comes after the loop has run) and you want to play the most recent tracks post. If there is no first id to collect (when no posts have a playlist) the player would not be added, to set a backup use another put tag directly underneath the first with $mode set to some id you want to pick up tracks from, or set to 'feed' to pick up an alternative playlist you've created using mp3j_set_meta.</p></li>
233
+ <li><p>Another note on 'first': Because it actually waits for the content and has a look for tracks, it won't do anything if the put tag using 'first' is above the loop. To get header players to play the first post with tracks you either have to put the put-tag in a div after the loop and css absolute position it, or query the upcoming posts and use the id.</p></li>
234
+ </ul>
235
+
236
+ <p><br /></p>
237
+
238
+ <p><strong><code>mp3j_debug($info)</code></strong></p>
239
+
240
+ <ul>
241
+ <li><p>Prints some info and variables from the plugin to the browser's source view (CTRL+U or Page-&gt;view source) about what content and tags appeared on the page that just ran. Can be used more than once to get info at different points in page. Can be useful for debugging when customising templates.</p></li>
242
+ <li><p>$info can be 'vars' to see info only or 'all' to also see meta and library arrays (a potentially long list), defaults to vars.</p></li>
243
+
244
+ </ul>
245
+
246
+ <p><br /><br />
247
+ Best to use function_exists() to make sure the tags exist before running them, eg:</p>
248
+
249
+ <pre><code>&lt;?php if ( function_exists('mp3j_addscripts') ) { mp3j_addscripts('styleD'); } ?&gt;
250
+ </code></pre>
251
+
252
+ <p>Running them without checking when the plugin is not activated will throw an error.</p>
253
+
254
+ <p><br /></p> <hr />
255
+ <h3>Installation</h3>
256
+
257
+ <p>To install using Wordpress:</p>
258
+
259
+ <ol>
260
+ <li>Download the zip file to your computer.</li>
261
+ <li>Log in to your Wordpress admin and go to 'plugins' -&gt; 'Add New'.</li>
262
+ <li>Click 'Upload' at the top of the page then browse' for the zip file on your computer and hit the 'Install' button, Wordpress should install it for you.</li>
263
+ <li>Once installed go to your Wordpress 'Plugins' menu and activate MP3-jPlayer.</li>
264
+ </ol>
265
+
266
+ <p>To Install manually:</p>
267
+
268
+ <ol>
269
+ <li>Download the zip file and unzip it. </li>
270
+ <li>Open the unzipped folder and upload the entire contents (1 folder and it's files and subfolders) to your <code>/wp-content/plugins</code> directory on the server.</li>
271
+ <li>Activate the plugin via your Wordpress 'Plugins' menu.</li>
272
+ </ol> <hr />
273
+ <h3>Frequently Asked Questions</h3>
274
+
275
+ <h4>Can the player go in the header/sidebar?</h4>
276
+
277
+ <p>Yes from this version 1.3.4 if you use template tags. It's not a widget yet so you can't do it from the admin area currently.</p>
278
+
279
+ <h4>Why is the default folder set to your domain?</h4>
280
+
281
+ <p>It's not anymore, it was going to be for testing a default install without needing to know any mp3's. So you could activate, go to a page and use 'test' as the filename and it would play that file from my domain, but a)i forgot to mention it, and b)it's prob not that useful. On fresh install it's now set to the root of your domain.</p> <hr />
282
+ <h3>Screenshots</h3>
283
+ <ol>
284
+
285
+ <li>Player</li>
286
+ <li>Admin settings page</li>
287
+ <li>Playlist example</li>
288
+ </ol> <hr />
289
+ <h3>Changelog</h3>
290
+ <h4>1.3.4</h4>
291
+
292
+ <ul>
293
+ <li>Added template tags.</li>
294
+
295
+ <li>Added new shortcode attributes play and list, and added more values for pos.</li>
296
+ <li>Added new default position options on settings page</li>
297
+ <li>Added a smaller player option</li>
298
+ </ul>
299
+
300
+ <h4>1.3.3</h4>
301
+
302
+ <ul>
303
+ <li>Fixed the CSS that caused player to display poorly in some themes.</li>
304
+ </ul>
305
+
306
+ <h4>1.3.2</h4>
307
+
308
+ <ul>
309
+ <li>Added the shortcode [mp3-jplayer] and attributes: pos (left, right, none), dload (true, false) which over-ride the admin-panel position and download settings on that post/page. Eg. [mp3-jplayer pos="right" dload="true"]</li>
310
+ <li>Tweaked transport button graphic a wee bit.</li>
311
+ </ul>
312
+
313
+ <h4>1.3.1</h4>
314
+
315
+ <ul>
316
+ <li>Fixed image rollover on buttons when wordpress not installed in root of site.</li>
317
+ </ul>
318
+
319
+ <h4>1.3.0</h4>
320
+
321
+ <ul>
322
+ <li>Updated jquery.jplayer.min.js to version 1.2.0 (including the new .swf file). The plugin should now work on the iPad.</li>
323
+ <li>Fixed admin side broken display of the uploads folder path that occured when a path had been specified but didn't yet exist.</li>
324
+ <li>Fixed the broken link to the (new) media settings page when running in Wordpress 3.</li>
325
+ <li>Changed the 'Use my media library titles...' option logic to allow any titles or captions to independently over-ride the library by default. The option is now 'Always use my media library titles...' which when ticked will give preference to library titles/captions over those in the custom fields.</li>
326
+ <li>Modified the css for compatibility with Internet Explorer 6. The player should now display almost the same in IE6 as in other browsers.</li>
327
+ </ul>
328
+
329
+ <h4>1.2.12</h4>
330
+
331
+ <ul>
332
+ <li>Added play order setting, a 'download mp3' link option, show/hide playlist and option, a connecting state, a new style. </li>
333
+ <li>The 'Default folder' option can now be a remote uri to a folder, if it is then it doesn't get filtered from the playists when 'allow remote' is unticked. </li>
334
+ </ul>
335
+
336
+ <h4>1.2.0</h4>
337
+
338
+ <ul>
339
+ <li>Added playing of media library mp3's in the same way as from the default folder (ie. by entering just a filename). User does not have to specify where the tracks reside (recognises library file, default folder file, and local or remote uri's). </li>
340
+ <li>Added filter option to remove off-site mp3's from the playlists.</li>
341
+ <li>The plugin now clears out it's settings from the database by default upon deactivation. This can be changed from the settings page.</li>
342
+
343
+ <li>It's no longer necessary to include the file extension when writing filenames.</li>
344
+ </ul>
345
+
346
+ <h4>1.1.0</h4>
347
+
348
+ <ul>
349
+ <li>Added captions, player status info, a-z sort option, basic player positioning, detecting of urls/default folder</li>
350
+ <li>Fixed bug where using unescaped double quotes in a title broke the playlist, quotes are now escaped automatically and can be used.</li>
351
+ </ul>
352
+
353
+ <h4>1.0</h4>
354
+
355
+ <ul>
356
+ <li>First release</li>
357
+ </ul> <hr />
358
+
359
+
360
+ </body></html>
readme.txt CHANGED
@@ -2,83 +2,242 @@
2
  Author URI: http://www.sjward.org
3
  Plugin URI: http://www.sjward.org/jplayer-for-wordpress
4
  Contributors: simon.ward
5
- Tags: mp3, audio, player, music, jplayer, integration, music player, mp3 player, playlist, media, jquery, javascript, plugin, shortcode, css, post, page
6
  Requires at least: 2.8
7
  Tested up to: 3.0.1
8
- Stable tag: 1.3.3
9
 
10
- Auto adds an mp3 audio player to pages/posts that you make a playlist on.
11
 
12
 
13
 
14
  == Description ==
 
15
 
16
- This version fixes the mis-aligned playlist/buttons on the player that occurred in some wordpress themes.
17
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- features:
20
- - Easy playing of mp3's from your Media Library, a default folder, another domain
21
- - Make ordered playlists using custom fields
22
- - Add titles and captions, use or overide media library titles and captions
23
- - Set a playlist for download
24
- - Optional shortcode
25
- - No setup
26
- - Simple admin panel
27
- - Integrates jPlayer
28
-
29
- The player has a loader bar and position/vol sliders, status info, and hideable playlist. There's also an option to add the player to the post index's most recent post with a playlist.
30
 
 
31
  [See a Demo here](http://sjward.org/jplayer-for-wordpress)
32
 
 
 
 
33
 
34
- **Shortcode**
35
-
36
- Using the shortcode is optional, it lets you position the player within the content rather than at the top, and has 2 optional attributes for position and download control on each page. The shortcode is:
37
- <code>[mp3-jplayer]</code>
38
 
39
- It's optional attributes are 'pos' (with values of left, right, none), and 'dload' (true, false), eg:
40
- <code>[mp3-jplayer pos="right" dload="true"]</code>
41
 
 
42
 
43
- **Making a Playlist**
44
 
45
- Add tracks on the page/post edit screen using the custom fields (below the content box). Enter them as follows:
46
 
47
- 1. In the left box of a new custom-field line enter:
48
 
49
- <code>mp3</code>
50
 
51
- 2. Write the filename (or URI)* of the mp3 into the right box and hit 'Add custom field'. Repeat the above to add more tracks, and hit the 'update/publish' button when you're done.
52
 
53
- *NOTE - You only need a full URI when the mp3 is not in the library/default folder , otherwise just the filename will do (can leave off the file extension).
54
 
 
 
55
 
56
 
57
- **Adding a Title and Caption**
 
58
 
59
- Add the title in the right hand box before the filename(or uri), separate with an @ sign, eg:
60
 
61
- <code>MyTitle@myfilename</code>
62
 
63
 
 
 
64
 
65
- **Adding Captions**
66
 
67
- Add the caption in the left hand box after <code>mp3</code>, separate with a dot.
68
 
69
- <code>mp3.My Caption</code>
70
 
 
71
 
72
 
 
73
  **Play Order**
74
 
75
  To control the playlist order number the left hand boxes, eg:
 
76
  <code>1 mp3</code>
77
- <code>2 mp3.some caption</code>
 
 
 
 
78
  <code>3 mp3.Another Caption</code>
79
 
80
 
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  == Installation ==
83
 
84
  To install using Wordpress:
@@ -96,9 +255,19 @@ To Install manually:
96
 
97
 
98
 
 
 
 
 
 
 
 
 
 
 
99
  == Screenshots ==
100
 
101
- 1. Player style
102
  2. Admin settings page
103
  3. Playlist example
104
 
@@ -106,6 +275,13 @@ To Install manually:
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
 
109
  = 1.3.3 =
110
  * Fixed the CSS that caused player to display poorly in some themes.
111
 
2
  Author URI: http://www.sjward.org
3
  Plugin URI: http://www.sjward.org/jplayer-for-wordpress
4
  Contributors: simon.ward
5
+ Tags: mp3, audio, player, music, jplayer, integration, music player, mp3 player, playlist, media, jquery, javascript, plugin, shortcode, css, post, page, sidebar
6
  Requires at least: 2.8
7
  Tested up to: 3.0.1
8
+ Stable tag: 1.3.4
9
 
10
+ Auto adds an mp3 audio player to pages / posts that you make a playlist on. Can be customised into themes.
11
 
12
 
13
 
14
  == Description ==
15
+ Version 1.3.4 adds a set of template tags for sidebar/header players etc, new shortcode options including centering and download setting, and a smaller player size option.
16
 
17
+ Features:
18
 
19
+ * No setup.
20
+ * Play mp3's from your Media Library, a default folder, another domain.
21
+ * Add titles and captions to any mp3.
22
+ * Set playlists for download.
23
+ * Use or overide the library titles/captions.
24
+ * Optional shortcode.
25
+ * Simple admin panel.
26
+ * Template tags.
27
+ * CSS styleable.
28
+ * Integrates jquery jPlayer, works on the iPad.
29
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
+ <br />
32
  [See a Demo here](http://sjward.org/jplayer-for-wordpress)
33
 
34
+ <br />
35
+ The player can be added to the most recent post on the post index (that has a playlist), or using template tags it can be put in sidebars/headers etc, fed a playlist, appear on archive pages, and set a stylesheet. Player has sliders, loader bar, status info, and optional download button.
36
+
37
 
38
+ <br /><br />
39
+ **Making a Playlist**
 
 
40
 
 
 
41
 
42
+ Add tracks on page/post edit screens using the custom fields (below the content box), as follows:
43
 
44
+ 1. In the left box of a new custom-field enter:
45
 
46
+ <code>mp3</code>
47
 
 
48
 
49
+ 2. Write the filename or URI* of the mp3 into the right box and hit 'Add custom field'.
50
 
 
51
 
52
+ Repeat the above to add more tracks, and hit the 'update/publish' button when you're done.
53
 
54
+ <br />
55
+ *Use a full URI when the mp3 is not in either a) the library or b) from the default folder/uri. You'll need to set the default folder that you want to use on the settings page.
56
 
57
 
58
+ <br /><br />
59
+ **Adding a Title**
60
 
61
+ Add titles in the right box, before the filename (or uri), separate with an @ sign, eg:
62
 
63
+ <code>Title@filename</code>
64
 
65
 
66
+ <br /><br />
67
+ **Adding aCaption**
68
 
69
+ Add the caption in the left hand box after 'mp3', separate with a dot, eg.
70
 
71
+ <code>mp3.Caption</code>
72
 
 
73
 
74
+ You can blank out a library caption (or a caption that's been carried over from a previous track) by using just the dot (ie. 'mp3.')
75
 
76
 
77
+ <br /><br />
78
  **Play Order**
79
 
80
  To control the playlist order number the left hand boxes, eg:
81
+
82
  <code>1 mp3</code>
83
+
84
+
85
+ <code>2 mp3.Caption</code>
86
+
87
+
88
  <code>3 mp3.Another Caption</code>
89
 
90
 
91
 
92
+ <br /><br />
93
+ **Shortcode**
94
+
95
+ Using the shortcode is optional, it lets you position the player within the content rather than at the top of it, and has 4 optional attributes for controlling the position (pos), download setting (dload), autoplay (play), and show playlist (list) on each page. The shortcode is:
96
+
97
+ **<code>[mp3-jplayer]</code>**
98
+
99
+
100
+ The attributes are:
101
+
102
+ pos: left, right, rel (or none), rel-C, rel-R, absolute
103
+
104
+ dload: true, false
105
+
106
+ play: true, false
107
+
108
+ list: true, false
109
+
110
+
111
+ <br />
112
+ for example
113
+
114
+ **<code>[mp3-jplayer play="true" pos="rel-C" dload="true"]</code>**
115
+
116
+
117
+
118
+ <br /><br />
119
+ **Template Tags**
120
+
121
+ **Quick example:**
122
+ **Make the player move to sidebar on the posts index and play 5 random tracks from your library**
123
+
124
+ Put this in index.php before the posts loop starts:
125
+
126
+ `<?php if ( function_exists('mp3j_flag') ) { mp3j_flag(); } ?>`
127
+
128
+
129
+ <br />
130
+ Put this in sidebar.php somewhere below the opening div(s):
131
+
132
+ `<?php
133
+ if ( function_exists( 'mp3j_grab_library' ) ) {
134
+ $lib = mp3j_grab_library();
135
+ $files = $lib['filenames'];
136
+ shuffle( $files );
137
+ $files = array_slice( $files, 0, 5 );
138
+ mp3j_set_meta( $files );
139
+ mp3j_put( 'feed' );
140
+ }
141
+ ?>`
142
+
143
+
144
+ <br />
145
+ To use the smaller player stylesheet on the above example put this in header.php above wp_head():
146
+
147
+ `<?php
148
+ if ( function_exists('mp3j_addscripts') ) {
149
+ if ( is_home() ) {
150
+ mp3j_addscripts('/wp-content/plugins/mp3-jplayer/css/mp3jplayer-blu-sidebar.css');
151
+ }
152
+ }
153
+ ?>`
154
+
155
+
156
+ <br /><br />
157
+ **Tag Details**
158
+
159
+ Note: there's an admin option to ignore the tags which needs to be unticked when you want to use them!
160
+
161
+ **<code>mp3j_addscripts( $style )</code>**
162
+
163
+
164
+ - Forces the player's javascript/CSS to be loaded and allows you to change stylesheet. Scripts aren't automatically enqueued on archive pages and any singular that has no playlist of it's own. When used this tag must be placed above wp_head().
165
+
166
+ - $style can be either a uri to a stylesheet, or 'styleA', 'styleB', 'styleC', 'styleD' to use one of the included. Defaults to admin setting if not specified.
167
+
168
+
169
+ <br />
170
+
171
+ **<code>mp3j_flag( $set )</code>**
172
+
173
+
174
+ - Tells the plugin to ignore content and shortcodes and to wait for an mp3j_put tag. The flag tag can be anywhere and can be used more than once.
175
+
176
+ - $set can be either 1 (set the flag) or 0 (unset the flag), and is 1 if not specified.
177
+
178
+
179
+ <br />
180
+
181
+ **<code>mp3j_grab_library( $format )</code>**
182
+
183
+
184
+ - returns an array of all the mp3's in the library with their 'filenames', 'urls', 'titles', 'excerpts', and 'descriptions'. Can be used anywhere.
185
+
186
+ - $format can be either 1 (gives back the above fields in indexed arrays) or 0 (gives back the arrays as returned from the select query), defaults to 1.
187
+
188
+
189
+ <br />
190
+
191
+ **<code>mp3j_set_meta( $tracks, $captions )</code>**
192
+
193
+
194
+ - Sets an on-the-fly playlist for the mp3j_put tag to pick up. Can be used anywhere to create a playlist. The arrays you feed in go through the same sorting/filtering routine as if the tracks had been pulled from a page or post, and still respond to the admin settings like 'hide file extension' or 'play in alphabetical order'.
195
+
196
+ - $tracks must be an indexed array of any mix of either filenames (from default folder or library) or full uri's, and can include a prefixed title using an '@' as a separator same as the fields do. As the admin settings are still applied, if 'always use library titles..' is ticked and it's a library 'filename' that you're using then any corresponding caption in the $captions array won't make it through, to get control of titles and captions for library files use their 'urls' in the $tracks array.
197
+
198
+ - $captions is an optional array, the indexes should correspond to the indexes of their files in the $tracks array.
199
+
200
+
201
+ <br />
202
+
203
+ **<code>mp3j_put( $mode, $position, $dload, $autoplay, $playlist )</code>**
204
+
205
+
206
+ - Puts the player on the page (but only if mp3j_flag is set and what you're asking it to play results in some tracks!). Can be used multiple times and must be within the &lt;body&gt;&lt;/body&gt; section of a page.
207
+
208
+ - $mode can be: A post id to grab tracks from; 'first' to pick up the tracks from the first content encountered that had a playlist (see note below); 'feed' to pick up an alternative playlist created with mp3j_set_meta; or not set ('') to pick up tracks from any current id;
209
+
210
+ - $pos can be 'left', 'right' for float; 'none', 'rel-C', 'rel-R' for relative position; or 'absolute'). Defaults to admin setting
211
+
212
+ - $dload - show download button, 'true' or 'false'. defaults to admin setting.
213
+
214
+ - $autoplay - 'true' or 'false'. defaults to admin setting.
215
+
216
+ - $playlist - start with playlist showing, 'true' or 'false'. defaults to admin setting.
217
+
218
+ - Note on 'first': Typically you'd use this on an index page when the player is in the sidebar (ie. when the put tag comes after the loop has run) and you want to play the most recent tracks post. If there is no first id to collect (when no posts have a playlist) the player would not be added, to set a backup use another put tag directly underneath the first with $mode set to some id you want to pick up tracks from, or set to 'feed' to pick up an alternative playlist you've created using mp3j_set_meta.
219
+
220
+ - Another note on 'first': Because it actually waits for the content and has a look for tracks, it won't do anything if the put tag using 'first' is above the loop. To get header players to play the first post with tracks you either have to put the put-tag in a div after the loop and css absolute position it, or query the upcoming posts and use the id.
221
+
222
+ <br />
223
+
224
+ **<code>mp3j_debug($info)</code>**
225
+
226
+
227
+ - Prints some info and variables from the plugin to the browser's source view (CTRL+U or Page->view source) about what content and tags appeared on the page that just ran. Can be used more than once to get info at different points in page. Can be useful for debugging when customising templates.
228
+
229
+ - $info can be 'vars' to see info only or 'all' to also see meta and library arrays (a potentially long list), defaults to vars.
230
+
231
+
232
+ <br /><br />
233
+ Best to use function_exists() to make sure the tags exist before running them, eg:
234
+
235
+ `<?php if ( function_exists('mp3j_addscripts') ) { mp3j_addscripts('styleD'); } ?>`
236
+
237
+ Running them without checking when the plugin is not activated will throw an error.
238
+
239
+
240
+ <br />
241
  == Installation ==
242
 
243
  To install using Wordpress:
255
 
256
 
257
 
258
+ == Frequently Asked Questions ==
259
+
260
+ = Can the player go in the header/sidebar? =
261
+ Yes from this version 1.3.4 if you use template tags. It's not a widget yet so you can't do it from the admin area currently.
262
+
263
+
264
+ = Why is the default folder set to your domain? =
265
+ It's not anymore, it was going to be for testing a default install without needing to know any mp3's. So you could activate, go to a page and use 'test' as the filename and it would play that file from my domain, but a)i forgot to mention it, and b)it's prob not that useful. On fresh install it's now set to the root of your domain.
266
+
267
+
268
  == Screenshots ==
269
 
270
+ 1. Player
271
  2. Admin settings page
272
  3. Playlist example
273
 
275
 
276
  == Changelog ==
277
 
278
+ = 1.3.4 =
279
+ * Added template tags.
280
+ * Added new shortcode attributes play and list, and added more values for pos.
281
+ * Added new default position options on settings page
282
+ * Added a smaller player option
283
+
284
+
285
  = 1.3.3 =
286
  * Fixed the CSS that caused player to display poorly in some themes.
287
 
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file