This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
mp3j_admin.php
748 lines (647 loc) · 62.4 KB
/
mp3j_admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
<?php
function mp3j_print_admin_page() {
global $mp3_fox;
$O = $mp3_fox->getAdminOptions();
$colours_array = array();
if ( isset( $_POST['update_mp3foxSettings'] ) )
{
//prep/sanitize number values
if (isset($_POST['mp3foxVol'])) {
$O['initial_vol'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxVol']);
if ($O['initial_vol'] < 0 || $O['initial_vol']=="") { $O['initial_vol'] = "0"; }
if ($O['initial_vol'] > 100) { $O['initial_vol'] = "100"; }
}
if (isset($_POST['mp3foxPopoutMaxHeight'])) {
$O['popout_max_height'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxPopoutMaxHeight']);
if ( $O['popout_max_height'] == "" ) { $O['popout_max_height'] = "750"; }
if ( $O['popout_max_height'] < 200 ) { $O['popout_max_height'] = "200"; }
if ( $O['popout_max_height'] > 1200 ) { $O['popout_max_height'] = "1200"; }
}
if (isset($_POST['mp3foxPopoutWidth'])) {
$O['popout_width'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxPopoutWidth']);
if ( $O['popout_width'] == "" ) { $O['popout_width'] = "400"; }
if ( $O['popout_width'] < 250 ) { $O['popout_width'] = "250"; }
if ( $O['popout_width'] > 1600 ) { $O['popout_width'] = "1600"; }
}
if (isset($_POST['mp3foxMaxListHeight'])) {
$O['max_list_height'] = preg_replace("/[^0-9]/", "", $_POST['mp3foxMaxListHeight']);
if ( $O['max_list_height'] < 0 ) { $O['max_list_height'] = ""; }
}
//prep/sanitize paths
if (isset($_POST['mp3foxfolder'])) {
$O['mp3_dir'] = $mp3_fox->prep_path( $_POST['mp3foxfolder'] );
}
if (isset($_POST['mp3foxCustomStylesheet'])) {
$O['custom_stylesheet'] = $mp3_fox->prep_path( $_POST['mp3foxCustomStylesheet'] );
}
if (isset($_POST['mp3foxPopoutBGimage'])) {
$O['popout_background_image'] = $mp3_fox->prep_path( $_POST['mp3foxPopoutBGimage'] );
}
$O['dloader_remote_path'] = ( isset($_POST['dloader_remote_path']) ) ? $mp3_fox->prep_value( $_POST['dloader_remote_path'] ) : "";
$O['loggedout_dload_link'] = ( $_POST['loggedout_dload_link'] == "" ) ? "" : $mp3_fox->prep_value( $_POST['loggedout_dload_link'] ); //allow it to be empty
//prep/sanitize options and checkboxes
if (isset($_POST['mp3foxTheme'])) {
$O['player_theme'] = $mp3_fox->prep_value( $_POST['mp3foxTheme'] );
}
if (isset($_POST['mp3foxFloat'])) {
$O['player_float'] = $mp3_fox->prep_value( $_POST['mp3foxFloat'] );
}
if (isset($_POST['librarySortcol'])) {
$O['library_sortcol'] = $mp3_fox->prep_value( $_POST['librarySortcol'] );
}
if (isset($_POST['libraryDirection'])) {
$O['library_direction'] = $mp3_fox->prep_value( $_POST['libraryDirection'] );
}
if (isset($_POST['file_separator'])) {
$O['f_separator'] = $mp3_fox->prep_value( $_POST['file_separator'] );
}
if (isset($_POST['caption_separator'])) {
$O['c_separator'] = $mp3_fox->prep_value( $_POST['caption_separator'] );
}
if (isset($_POST['mp3foxDownloadMp3'])) {
$O['show_downloadmp3'] = $mp3_fox->prep_value( $_POST['mp3foxDownloadMp3'] );
}
$O['disable_template_tag'] = ( isset($_POST['disableTemplateTag']) ) ? "true" : "false";
$O['echo_debug'] = ( isset($_POST['mp3foxEchoDebug']) ) ? "true" : "false";
$O['add_track_numbering'] = ( isset($_POST['mp3foxAddTrackNumbers']) ) ? "true" : "false";
$O['enable_popout'] = ( isset($_POST['mp3foxEnablePopout']) ) ? "true" : "false";
$O['playlist_repeat'] = ( isset($_POST['mp3foxPlaylistRepeat']) ) ? "true" : "false";
$O['use_fixed_css'] = ( isset($_POST['mp3foxUseFixedCSS']) ) ? "true" : "false";
$O['encode_files'] = ( isset($_POST['mp3foxEncodeFiles']) ) ? "true" : "false";
$O['run_shcode_in_excerpt'] = ( isset($_POST['runShcodeInExcerpt']) ) ? "true" : "false";
$O['volslider_on_singles'] = ( isset($_POST['volslider_onsingles']) ) ? "true" : "false";
$O['volslider_on_mp3j'] = ( isset($_POST['volslider_onmp3j']) ) ? "true" : "false";
$O['touch_punch_js'] = ( isset($_POST['touch_punch_js']) ) ? "true" : "false";
$O['force_browser_dload'] = ( isset($_POST['force_browser_dload']) ) ? "true" : "false";
$O['make_player_from_link'] = ( isset($_POST['make_player_from_link']) ) ? "true" : "false";
$O['auto_play'] = ( isset($_POST['mp3foxAutoplay']) ) ? "true" : "false";
$O['allow_remoteMp3'] = ( isset($_POST['mp3foxAllowRemote']) ) ? "true" : "false";
$O['player_onblog'] = ( isset($_POST['mp3foxOnBlog']) ) ? "true" : "false";
$O['playlist_show'] = ( isset($_POST['mp3foxShowPlaylist']) ) ? "true" : "false";
$O['remember_settings'] = ( isset($_POST['mp3foxRemember']) ) ? "true" : "false";
$O['hide_mp3extension'] = ( isset($_POST['mp3foxHideExtension']) ) ? "true" : "false";
//prep/sanitize other values
if (isset($_POST['mp3foxPlayerWidth'])) {
$O['player_width'] = $mp3_fox->prep_value( $_POST['mp3foxPlayerWidth'] );
}
if (isset($_POST['disableJSlibs'])) {
$O['disable_jquery_libs'] = ( preg_match("/^yes$/i", $_POST['disableJSlibs']) ) ? "yes" : "";
}
$O['paddings_top'] = ( $_POST['mp3foxPaddings_top'] == "" ) ? "0px" : $mp3_fox->prep_value( $_POST['mp3foxPaddings_top'] );
$O['paddings_bottom'] = ( $_POST['mp3foxPaddings_bottom'] == "" ) ? "0px" : $mp3_fox->prep_value( $_POST['mp3foxPaddings_bottom'] );
$O['paddings_inner'] = ( $_POST['mp3foxPaddings_inner'] == "" ) ? "0px" : $mp3_fox->prep_value( $_POST['mp3foxPaddings_inner'] );
if ( isset($_POST['mp3foxPopoutBackground']) ) {
$O['popout_background'] = $mp3_fox->prep_value( $_POST['mp3foxPopoutBackground'] );
}
if ( isset($_POST['mp3foxPluginVersion']) ) {
$O['db_plugin_version'] = $mp3_fox->prep_value( $_POST['mp3foxPluginVersion'] );
}
if ( isset($_POST['MtogBox1']) ) {
$O['admin_toggle_1'] = $mp3_fox->prep_value( $_POST['MtogBox1'] );
}
//prep/sanitize text
$O['dload_text'] = ( $_POST['dload_text'] == "" ) ? "DOWNLOAD MP3" : $mp3_fox->prep_text( $_POST['dload_text'] );
$O['loggedout_dload_text'] = ( $_POST['loggedout_dload_text'] == "" ) ? "" : $mp3_fox->prep_text( $_POST['loggedout_dload_text'] );
if ( isset($_POST['mp3foxPopoutButtonText']) ) {
$O['popout_button_title'] = $mp3_fox->prep_text( $_POST['mp3foxPopoutButtonText'] );
}
if ( isset($_POST['make_player_from_link_shcode']) ) {
$O['make_player_from_link_shcode'] = $mp3_fox->prep_text( $_POST['make_player_from_link_shcode'] );
}
// Colours array//
if (isset($_POST['mp3foxScreenColour'])) { $colours_array['screen_colour'] = $mp3_fox->prep_value( $_POST['mp3foxScreenColour'] ); }
if (isset($_POST['mp3foxScreenOpac'])) { $colours_array['screen_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxScreenOpac'] ); }
if (isset($_POST['mp3foxLoadbarColour'])) { $colours_array['loadbar_colour'] = $mp3_fox->prep_value( $_POST['mp3foxLoadbarColour'] ); }
if (isset($_POST['mp3foxLoadbarOpac'])) { $colours_array['loadbar_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxLoadbarOpac'] ); }
if (isset($_POST['mp3foxPosbarColour'])) { $colours_array['posbar_colour'] = $mp3_fox->prep_value( $_POST['mp3foxPosbarColour'] ); }
if (isset($_POST['mp3foxPosbarTint'])) { $colours_array['posbar_tint'] = $mp3_fox->prep_value( $_POST['mp3foxPosbarTint'] ); }
if (isset($_POST['mp3foxPosbarOpac'])) { $colours_array['posbar_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxPosbarOpac'] ); }
if (isset($_POST['mp3foxScreenTextColour'])) { $colours_array['screen_text_colour'] = $mp3_fox->prep_value( $_POST['mp3foxScreenTextColour'] ); }
if (isset($_POST['mp3foxPlaylistColour'])) { $colours_array['playlist_colour'] = $mp3_fox->prep_value( $_POST['mp3foxPlaylistColour'] ); }
if (isset($_POST['mp3foxPlaylistTint'])) { $colours_array['playlist_tint'] = $mp3_fox->prep_value( $_POST['mp3foxPlaylistTint'] ); }
if (isset($_POST['mp3foxPlaylistOpac'])) { $colours_array['playlist_opacity'] = $mp3_fox->prep_value( $_POST['mp3foxPlaylistOpac'] ); }
if (isset($_POST['mp3foxListTextColour'])) { $colours_array['list_text_colour'] = $mp3_fox->prep_value( $_POST['mp3foxListTextColour'] ); }
if (isset($_POST['mp3foxListCurrentColour'])) { $colours_array['list_current_colour'] = $mp3_fox->prep_value( $_POST['mp3foxListCurrentColour'] ); }
if (isset($_POST['mp3foxListHoverColour'])) { $colours_array['list_hover_colour'] = $mp3_fox->prep_value( $_POST['mp3foxListHoverColour'] ); }
if (isset($_POST['mp3foxListBGaHover'])) { $colours_array['listBGa_hover'] = $mp3_fox->prep_value( $_POST['mp3foxListBGaHover'] ); }
if (isset($_POST['mp3foxListBGaCurrent'])) { $colours_array['listBGa_current'] = $mp3_fox->prep_value( $_POST['mp3foxListBGaCurrent'] ); }
if (isset($_POST['mp3foxVolGrad'])) { $colours_array['volume_grad'] = $mp3_fox->prep_value( $_POST['mp3foxVolGrad'] ); }
if (isset($_POST['mp3foxListDivider'])) { $colours_array['list_divider'] = $mp3_fox->prep_value( $_POST['mp3foxListDivider'] ); }
if (isset($_POST['mp3foxIndicator'])) { $colours_array['indicator'] = $mp3_fox->prep_value( $_POST['mp3foxIndicator'] ); }
$O['colour_settings'] = $colours_array;
update_option($mp3_fox->adminOptionsName, $O);
$mp3_fox->theSettings = $O;
?>
<!-- Settings saved message -->
<div class="updated"><p><strong><?php _e("Settings Updated.", $mp3_fox->textdomain );?></strong></p></div>
<?php
}
// Pick up current colours
$current_colours = $O['colour_settings'];
?>
<div class="wrap">
<h2> </h2>
<h1>MP3<span style="font-size:16px;"> - </span>jPlayer<span class="description" style="font-size:10px;"> <?php echo $mp3_fox->version_of_plugin; ?></span>
<?php if ( $O['disable_jquery_libs'] == "yes" ) { ?><span style="font-size: 11px; font-weight:700; color:#f66;">(jQuery and UI scripts are turned off)</span><?php } ?></h1>
<h5 style="margin: 0 0 30px 0; padding:0; font-size:10px;">
<a href="javascript:MP3J_ADMIN.toggleit('tog_0','HELP');" id="tog_0-toggle" class="fox_buttonlink">HELP</a> <a href="widgets.php" class="fox_buttonlink">WIDGETS</a>
</h5>
<div id="tog_0-list" style="border-bottom:1px solid #ccc; margin-bottom:25px;">
<p>Add players using <code>[mp3j]</code> <code>[mp3t]</code> <code>[mp3-jplayer]</code> <code>[mp3-popout]</code> shortcodes, links to mp3s, <a href="widgets.php">widgets</a>, and <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tags</a>.</p>
<br />
<h3 style="margin-left:0;">Shortcode Parameters</h3>
<div class="Ahelp1">
<h4><code>[mp3-jplayer]</code> <span class="description">Playlist player</span></h4>
<h5>Parameters:</h5>
<p><code>tracks</code> <span class="description">filenames/URIs/FEEDs (<code>,</code> separated)</span><br />
<code>captions</code> <span class="description">caption text (<code>;</code> separated)</span><br />
<code>vol</code> <span class="description">0 - 100</span><br />
<code>autoplay</code> <span class="description">y/n</span><br />
<code>loop</code> <span class="description">y/n</span><br />
<code>dload</code> <span class="description">y / n / loggedin (show download link)</span><br />
<code>list</code> <span class="description">y/n (show playlist)</span><br />
<code>pick</code> <span class="description">a number (picks random selection)</span><br />
<code>shuffle</code> <span class="description">y/n (shuffle track order)</span><br />
<code>title</code> <span class="description">text above player</span><br />
<code>pos</code> <span class="description">rel-L, rel-C, rel-R, left, right</span><br />
<code>width</code> <span class="description">in px or %</span><br />
<code>height</code> <span class="description">in px (player height excluding list)</span><br />
<code>pn</code> <span class="description">y/n (show prev/next buttons)</span><br />
<code>stop</code> <span class="description">y/n (show stop button)</span><br />
<code>id</code> <span class="description">a page id (to read the custom fields from)</span><br />
<code>images</code> <span class="description">comma separated list of track image urls</span><br />
<!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
<code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
</div>
<div class="Ahelp1">
<h4><code>[mp3j]</code> & <code>[mp3t]</code> <span class="description">Single-track players</span></h4>
<h5>Parameters:</h5>
<p><code>track</code> <span class="description">filename or URI</span><br />
<code>caption</code> <span class="description">caption text (right of title)</span><br />
<code>vol</code> <span class="description">0 - 100</span><br />
<code>volslider</code> <span class="description">y/n</span><br />
<code>autoplay</code> <span class="description">y/n</span><br />
<code>loop</code> <span class="description">y/n</span><br />
<code>title</code> <span class="description">text (replaces both title and caption)</span><br />
<code>bold</code> <span class="description">y/n</span><br />
<code>flip</code> <span class="description">y/n (play/pause)</span><br />
<code>ind</code> <span class="description">y/n (hide indicator and time)</span><br />
<code>flow</code> <span class="description">y/n (don't line break)</span><br />
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
<h5>Also for <code>[mp3t]</code></h5>
<p><code>play</code> play button text<br /><code>stop</code> pause button text</p>
</div>
<div class="Ahelp1">
<h4><code>[mp3-popout]</code> <span class="description">Link to pop-out player</span></h4>
<h5>Parameters:</h5>
<p><code>tracks</code> <span class="description">files/URIs/FEEDs (<code>,</code> separated)</span><br />
<code>captions</code> <span class="description">caption text (<code>;</code> separated)</span><br />
<code>vol</code> <span class="description">0 - 100</span><br />
<code>autoplay</code> <span class="description">y / n</span><br />
<code>loop</code> <span class="description">y / n</span><br />
<code>dload</code> <span class="description">y / n / loggedin (show download link)</span><br />
<code>list</code> <span class="description">y/n (show popout playlist)</span><br />
<code>pick</code> <span class="description">number (pick random selection)</span><br />
<code>shuffle</code> <span class="description">y/n (shuffle track order)</span><br />
<code>title</code> <span class="description">title for the popout window</span><br />
<code>pos</code> <span class="description">rel-L, rel-C, rel-R, left, right (link position)</span><br />
<code>text</code> <span class="description">text for the link</span><br />
<code>height</code> <span class="description">px (popout player height excluding it's list)</span><br />
<code>id</code> <span class="description">a page id (to read the custom fields from)</span><br />
<code>tag</code> <span class="description">html tag for text (eg. <code>h2</code>, Default is <code>p</code>)</span><br />
<code>image</code> <span class="description">image for the popout link</span><br />
<code>images</code> <span class="description">comma separated list of track image urls</span><br />
<!--<code>imglinks</code> <span class="description">comma separated list of arbitrary links</span><br />-->
<code>fsort</code> <span class="description">asc/desc (folder feed direction)</span><br />
<code>style</code> <span class="description">modify player style</span> <strong><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Help</a></strong></p>
</div>
<!-- Not in this release
<div class="Ahelp1">
<h5><code>[mp3-link]</code> Play from a playlist player</h5>
<p><code>player</code> number of the player to operate<br /><code>track</code> the track number<br /><code>text</code> link text, defaults to <code>Play</code><br /><code>bold</code> y/n</p>
</div>
-->
<br class="clearB" /><br />
<p><strong>Eg</strong>. <span class="description">Play a url:</span> <code>[mp3j track="http://somedomain.com/myfile.mp3"]</code><br />
<strong>Eg</strong>. <span class="description">Play a file from default folder (set below) or library:</span> <code>[mp3j track="myfile.mp3"]</code><br />
<strong>Eg</strong>. <span class="description">Make a playlist player:</span> <code>[mp3-jplayer tracks="fileA.mp3, http://somedomain.com/fileB.mp3, fileC.mp3"]</code><br />
<strong>Eg</strong>. <span class="description">Add titles:</span> <code>[mp3-jplayer tracks="My [email protected], My [email protected], My [email protected]"]</code><br />
<strong>Eg</strong>. <span class="description">Add captions:</span> <code>[mp3-jplayer tracks="fileA.mp3, fileB.mp3" captions="Caption A; Caption B"]</code></p>
<p><a href="http://sjward.org/jplayer-for-wordpress" target="_blank">More shortcode examples</a></p>
<br />
<p><strong>Use these commands with [mp3-jplayer] in the <code>tracks</code> parameter to playlist entire folders or the library:</strong></p>
<p><code>FEED:LIB</code> playlists all mp3s in the library.<br />
<code>FEED:DF</code> playlists your default folder.<br />
<code>FEED:/my/music</code> playlists a folder or subfolder (relative to root of domain, not the WP install)</p>
<p><strong>Eg</strong>. Play 5 random tracks from the library: <code>[mp3-jplayer tracks="FEED:LIB" pick="5"]</code><br />
<strong>Eg</strong>. Play everything in the folder called 'tunes': <code>[mp3-jplayer tracks="FEED:/tunes"]</code></p>
<p>The <code>tracks</code> parameter can contain a mix of FEEDs and filenames/urls, eg. <code>[mp3-jplayer tracks="myfileA.mp3, FEED:/tunes, [email protected], FEED:DF"]</code>.
When just a filename is used the file must be in either your media library or in the default folder (set on this page). You can also specify a file in a sub
directory in the default folder eg. <code>tracks="subfolder/file.mp3"</code>.</p>
<br />
<h3 style="margin-left:0;">Custom Fields</h3>
<p>You can write playlists into the custom fields that are on page and post edit screens (check your 'screen options' at top-right
if they're not visible). They can be picked up with any of the shortcodes (from any page/post, or with the template tag, or by the widgets). See below for how
to set them up and some example uses:</p>
<p class="description">1. Enter <code>mp3</code> into the left hand box (the 'key' box).<br />2. Write the filename, URI, or 'FEED' (see above) into the right hand box (the 'value' box) and hit 'add custom field'</p>
<p>Add each track or 'FEED' in a new field pair.</p>
<p>To add titles and captions in the custom fields use the following format:</p>
<p class="description">1. Add a dot, then the caption in the left hand box, eg: <code>mp3.My Caption</code>
<br />2. Add the title, then an '@' before the filename in the right box, eg: <code>My Title@filename</code></p>
<p>The keys (left boxes) can be numbered, eg:<code>1 mp3</code> will be first on the playlist.</p>
<p><strong>Eg</strong>. If a custom field key / value pair is set as <code>mp3</code> / <code>FEED:LIB</code>, then the library is available to any shortcodes, so:<br />
<code>[mp3j]</code> or <code>[mp3t]</code> <span class="description">plays the next track from the library in a single player</span> <br />
<code>[mp3j track="3"]</code> or <code>[mp3t track="3"]</code> <span class="description">plays track 3 from the library in a single player</span> <br />
<code>[mp3-jplayer]</code> <span class="description">playlists all the custom fields in a playlist player</span><br /></p>
<br />
<h3 style="margin-left:0;">Widgets</h3>
<p class="description">
MP3j-sh - <span class="description">Adds players by writing shortcodes.</span><br />
MP3j-ui - <span class="description">Adds a playlist player by using tick boxes and modes. Note that some features such as manually written captions, and additional style (css classes) cannot be set with this widget, use the mp3j-sh widget instead.</span>
</p>
<br />
<h3 style="margin-left:0;">Template Tags</h3>
<p class="description">For use in theme files, See <a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a> for more details.</p>
<p style="line-height:22px;"><code style="font-size:13px;">mp3j_addscripts( $style )</code><br /><code style="font-size:13px;">mp3j_put( $shortcodes )</code><br /><code style="font-size:13px;">mp3j_grab_library( $format )</code><br/><code style="font-size:13px;">mp3j_debug()</code></p>
<br />
<h3 style="margin-left:0;">Testing</h3>
<p><strong>Make sure you're using default plugin settings for these tests.</strong></p>
<p>You can test the plugin with a valid mp3 by copy/pasting the following shortcode into a page or post:<br />
<code>[mp3-jplayer tracks="http://sjward.org/seven.mp3"]</code></p>
<p>To test link replacement copy/paste one of these links, if you're not sure which one then paste them both (one of them should work):</p>
<p>If you use the visual (default) editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code><br />
If you use the text editor: <code><a href="http://sjward.org/seven.mp3">Test link</a></code></p>
<p><br />Links to info:<br /><a href="http://sjward.org/jplayer-for-wordpress">Demo page</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/style-param-help.htm">Style Parameter Help</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">Forcing Remote Downloads</a><br /><a href="<?php echo $mp3_fox->PluginFolder; ?>/template-tag-help.htm">Template Tag Help</a></p>
<br /><br />
</div>
<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
<p class="jtext">Initial volume <input type="text" style="text-align:center;" size="2" name="mp3foxVol" value="<?php echo $O['initial_vol']; ?>" /> <span class="description">(0 - 100)</span></p>
<p class="jtick"><input type="checkbox" name="mp3foxAutoplay" value="true" <?php if ($O['auto_play'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Autoplay</p>
<p class="jtick"><input type="checkbox" name="mp3foxPlaylistRepeat" value="true" <?php if ($O['playlist_repeat'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Loop</p>
<p class="jtick"><input type="checkbox" name="mp3foxAddTrackNumbers" value="true" <?php if ($O['add_track_numbering'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Number the tracks</p>
<br />
<p class="jtick"><input type="checkbox" name="make_player_from_link" value="true" <?php if ($O['make_player_from_link'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> />
Turn mp3 links into players</p>
<p style="margin-left:45px;"><span class="description">(Use the 'Add media' button on the edit screen to add links, or you can manually add/write links into the page. Links will be turned into players using the shortcode specified under 'Template Options' below.)</span></p>
<br />
<p class="jtick"><input type="checkbox" name="mp3foxOnBlog" value="true" <?php if ($O['player_onblog'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Show players in posts on index, archive, and search pages <span class="description">(doesn't affect widgets)</span></p>
<p class="jtick"><input type="checkbox" name="runShcodeInExcerpt" value="true" <?php if ($O['run_shcode_in_excerpt'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Run shortcodes in post excerpts <span class="description">(this works for manually written post excerpts only)</span></p>
<br />
<?php
$greyout_field = ( $O['player_theme'] != "styleI" ) ? "background:#fcfcfc; color:#d6d6d6; border-color:#f0f0f0;" : "background:#fff; color:#000; border-color:#dfdfdf;";
$greyout_text = ( $O['player_theme'] != "styleI" ) ? "color:#d6d6d6;" : "color:#444;";
?>
<!-- COLOUR / STYLE -->
<div style="height:35px"><p style="width:55px; margin:0 0 0 20px; line-height:32px;">Players:</p></div>
<p style="margin:-35px 0px 0px 75px; line-height:32px;"><select name="mp3foxTheme" id="player-select" style="width:94px; font-size:11px; line-height:19px;">
<option value="styleF" <?php if ( 'styleF' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Silver</option>
<option value="styleG" <?php if ( 'styleG' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark</option>
<option value="styleH" <?php if ( 'styleH' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Text</option>
<option value="styleI" <?php if ( 'styleI' == $O['player_theme'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Custom</option>
</select>
<span id="player-csssheet" style=" <?php echo $greyout_text; ?>"> uri:</span><input type="text" id="mp3fcss" style="width:480px; <?php echo $greyout_field; ?>" name="mp3foxCustomStylesheet" value="<?php echo $O['custom_stylesheet']; ?>" /></p>
<?php
//$showbox = ( $O['admin_toggle_1'] == "true" ) ? "" : " display:none;";
//$hide = ( $O['admin_toggle_1'] == "true" ) ? "Hide " : "";
?>
<p style="margin:4px 0px 15px 20px;"><a href="javascript:MP3J_ADMIN.toggleit('tog_1','Colour Settings');" id="tog_1-toggle" class="fox_buttonlink bl2">Colour Settings</a></p>
<div id="tog_1-list" style="position:relative; margin:0px 0px 15px 20px; width:579px;">
<div style="position:relative; width:579px; height:20px; padding-top:2px; border-top:1px solid #eee; border-bottom:1px solid #eee; background:#f9f9f9;">
<div style="float:left; width:90px; margin-left:9px;"><p class="description" style="margin:0px;"><strong>AREA</strong></p></div>
<div style="float:left; width:390px;"><p class="description" style="margin:0px;"> Opacity Colour</p></div>
</div>
<div style="position:relative; width:579px; padding-top:6px;">
<div style="float:left; width:90px; margin-left:9px; border:0px solid #aaa;"><p style="margin:0px;line-height:32px;">Screen:<br />Loading bar:<br />Position bar:<br />Playlist:</p></div>
<div style="float:left; width:390px; border:0px solid #aaa;">
<p style="margin:0px;line-height:32px;">
<input type="text" size="4" name="mp3foxScreenOpac" value="<?php echo $current_colours['screen_opacity']; ?>" />
<input type="text" id="opA" onkeyup="udfcol('opA','blA');" size="10" name="mp3foxScreenColour" value="<?php echo $current_colours['screen_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opA','blA');"> + </span>
<span class="bl" onclick="sendfcolour('opA');" id="blA" style="background:<?php echo $current_colours['screen_colour']; ?>;"> </span>
<br />
<input type="text" size="4" name="mp3foxLoadbarOpac" value="<?php echo $current_colours['loadbar_opacity']; ?>" />
<input type="text" id="opB" onkeyup="udfcol('opB','blB');" size="10" name="mp3foxLoadbarColour" value="<?php echo $current_colours['loadbar_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opB','blB');"> + </span>
<span class="bl" onclick="sendfcolour('opB');" id="blB" style="background:<?php echo $current_colours['loadbar_colour']; ?>;"> </span>
<br />
<input type="text" size="4" name="mp3foxPosbarOpac" value="<?php echo $current_colours['posbar_opacity']; ?>" />
<input type="text" id="opC" onkeyup="udfcol('opC','blC');" size="10" name="mp3foxPosbarColour" value="<?php echo $current_colours['posbar_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opC','blC');"> + </span>
<span class="bl" onclick="sendfcolour('opC');" id="blC" style="background:<?php echo $current_colours['posbar_colour']; ?>;"> </span>
<select name="mp3foxPosbarTint" style="width:115px; font-size:11px;">
<option value="" <?php if ( '' == $current_colours['posbar_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>(default)</option>
<option value="soften" <?php if ( 'soften' == $current_colours['posbar_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Light grad</option>
<option value="softenT" <?php if ( 'softenT' == $current_colours['posbar_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Tip</option>
<option value="darken" <?php if ( 'darken' == $current_colours['posbar_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark grad</option>
<option value="none" <?php if ( 'none' == $current_colours['posbar_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>None</option>
</select>
<br />
<input type="text" size="4" name="mp3foxPlaylistOpac" value="<?php echo $current_colours['playlist_opacity']; ?>" />
<input type="text" id="opD" onkeyup="udfcol('opD','blD');" size="10" name="mp3foxPlaylistColour" value="<?php echo $current_colours['playlist_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opD','blD');"> + </span>
<span class="bl" onclick="sendfcolour('opD');" id="blD" style="background:<?php echo $current_colours['playlist_colour']; ?>;"> </span>
<select name="mp3foxPlaylistTint" style="width:115px; font-size:11px;">
<option value="" <?php if ( '' == $current_colours['playlist_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>(default)</option>
<option value="lighten2" <?php if ( 'lighten2' == $current_colours['playlist_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Light grad</option>
<option value="lighten1" <?php if ( 'lighten1' == $current_colours['playlist_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Soft grad</option>
<option value="darken1" <?php if ( 'darken1' == $current_colours['playlist_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark grad</option>
<option value="darken2" <?php if ( 'darken2' == $current_colours['playlist_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Darker grad</option>
<option value="none" <?php if ( 'none' == $current_colours['playlist_tint'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>None</option>
</select>
</p>
</div>
<br clear="all" />
</div>
<div id="pickerwrap">
<div id="plugHEX"></div>
<div id="plugCUR"></div>
<div id="plugin" onmousedown="HSVslide('drag','plugin',event); return false;"><div id="SV" onmousedown="HSVslide('SVslide','plugin',event)"><div id="SVslide" style="top:-4px; left:-4px;"><br /></div></div><div id="H" onmousedown="HSVslide('Hslide','plugin',event)"><div id="Hslide" style="top:-7px; left:-8px;"><br /></div><div id="Hmodel"></div></div></div>
</div>
<div style="position:relative;width:175px; height:150px; margin:-200px 0px 28px 405px; padding:50px 0px 0px 0px; border:0px solid #666;">
<p style="margin:0px 0px 8px 0px; text-align:right;">Indicator:
<select name="mp3foxIndicator" style="width:80px; font-size:11px;">
<option value="" <?php if ( '' == $current_colours['indicator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>(default)</option>
<option value="tint" <?php if ( 'tint' == $current_colours['indicator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Greyscale</option>
<option value="colour" <?php if ( 'colour' == $current_colours['indicator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Colour</option>
</select></p>
<p style="margin:0px 0px 8px 0px; text-align:right;">Volume bar:
<select name="mp3foxVolGrad" style="width:80px; font-size:11px;">
<option value="" <?php if ( '' == $current_colours['volume_grad'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>(default)</option>
<option value="light" <?php if ( 'light' == $current_colours['volume_grad'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Light</option>
<option value="dark" <?php if ( 'dark' == $current_colours['volume_grad'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark</option>
</select></p>
<p style="margin:0px 0px 0px 0px; text-align:right;">Dividers:
<select name="mp3foxListDivider" style="width:80px; font-size:11px;">
<option value="" <?php if ( '' == $current_colours['list_divider'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>(default)</option>
<option value="light" <?php if ( 'light' == $current_colours['list_divider'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Light</option>
<option value="med" <?php if ( 'med' == $current_colours['list_divider'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Medium</option>
<option value="dark" <?php if ( 'dark' == $current_colours['list_divider'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Dark</option>
<option value="none" <?php if ( 'none' == $current_colours['list_divider'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>None</option>
</select></p>
</div>
<div style="position:relative; width:579px; height:20px; padding-top:2px; border-top:1px solid #eee; border-bottom:1px solid #eee; background:#f9f9f9;">
<div style="float:left; width:90px; margin-left:9px;"><p class="description" style="margin:0px;"><strong>TEXT</strong></p></div>
<div style="float:left; width:430px;"><p class="description" style="margin:0px;">Colour</p></div>
<br clear="all" />
</div>
<div style="position:relative; width:579px; padding-top:6px;">
<div style="float:left; width:65px; margin-left:9px; border:0px solid #aaa;"><p style="margin:0px;line-height:32px;">Screen:<br />Playlist:<br />Selected:<br />Hover:</p></div>
<div style="float:left; width:460px; border:0px solid #aaa;">
<p style="margin:0px;line-height:32px;">
<input type="text" id="opE" onkeyup="udfcol('opE','blE');" size="10" name="mp3foxScreenTextColour" value="<?php echo $current_colours['screen_text_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opE','blE');"> + </span>
<span class="bl" onclick="sendfcolour('opE');" id="blE" style="background:<?php echo $current_colours['screen_text_colour']; ?>;"> </span>
<br />
<input type="text" id="opF" onkeyup="udfcol('opF','blF');" size="10" name="mp3foxListTextColour" value="<?php echo $current_colours['list_text_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opF','blF');"> + </span>
<span class="bl" onclick="sendfcolour('opF');" id="blF" style="background:<?php echo $current_colours['list_text_colour']; ?>;"> </span>
<br />
<input type="text" id="opG" onkeyup="udfcol('opG','blG');" size="10" name="mp3foxListCurrentColour" value="<?php echo $current_colours['list_current_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opG','blG');"> + </span>
<span class="bl" onclick="sendfcolour('opG');" id="blG" style="background:<?php echo $current_colours['list_current_colour']; ?>;"> </span>
Background: <input type="text" id="opH" onkeyup="udfcol('opH','blH');" size="10" name="mp3foxListBGaCurrent" value="<?php echo $current_colours['listBGa_current']; ?>" />
<span class="addcol" onclick="putfcolour('opH','blH');"> + </span>
<span class="bl" onclick="sendfcolour('opH');" id="blH" style="background:<?php echo $current_colours['listBGa_current']; ?>;"> </span>
<br />
<input type="text" id="opI" onkeyup="udfcol('opI','blI');" size="10" name="mp3foxListHoverColour" value="<?php echo $current_colours['list_hover_colour']; ?>" />
<span class="addcol" onclick="putfcolour('opI','blI');"> + </span>
<span class="bl" onclick="sendfcolour('opI');" id="blI" style="background:<?php echo $current_colours['list_hover_colour']; ?>;"> </span>
Background: <input type="text" id="opJ" onkeyup="udfcol('opJ','blJ');" size="10" name="mp3foxListBGaHover" value="<?php echo $current_colours['listBGa_hover']; ?>" />
<span class="addcol" onclick="putfcolour('opJ','blJ');"> + </span>
<span class="bl" onclick="sendfcolour('opJ');" id="blJ" style="background:<?php echo $current_colours['listBGa_hover']; ?>;"> </span>
</p>
</div>
<br clear="all" />
</div>
<div style="position:relative; width:579px; height:20px; margin-top:30px; padding-top:2px; border-top:1px solid #eee; border-bottom:1px solid #eee; background:#f9f9f9;">
<div style="float:left; width:90px; margin-left:9px;"><p class="description" style="margin:0px;"><strong>POP-OUT</strong></p></div>
<div style="float:left; width:430px;"><p class="description" style="margin:0px;">Background</p></div>
<br clear="all" />
</div>
<div style="width:579px; padding-top:6px;">
<div style="float:left; width:65px; margin-left:9px; border:0px solid #aaa;"><p style="margin:0px;line-height:32px;">Colour:<br />Image:</p></div>
<div style="float:left; width:460px; border:0px solid #aaa;">
<p style="margin:0px;line-height:32px;">
<input type="text" id="opK" onkeyup="udfcol('opK','blK');" size="10" name="mp3foxPopoutBackground" value="<?php echo $O['popout_background']; ?>" />
<span class="addcol" onclick="putfcolour('opK','blK');"> + </span>
<span class="bl" onclick="sendfcolour('opK');" id="blK" style="background:<?php echo $O['popout_background']; ?>;"> </span></p>
<p style="margin:4px 0px 0px 0px;line-height:32px;">
<input type="text" style="width:503px;" name="mp3foxPopoutBGimage" value="<?php echo $O['popout_background_image']; ?>" /></p>
</div>
<br clear="all" />
</div>
<p class="description" style="margin-top: 30px; margin-bottom: 0px;"> (Opacity values from 0 to 100, leave any fields blank to use the default setting)</p>
</div><!-- close fox_styling-list -->
<br /><br />
<!-- MP3s -->
<h3>Media Library</h3>
<?php
// create library file list //
$library = $mp3_fox->grab_library_info();
$L_count = ( $library ) ? $library['count'] : "0";
echo "<p class=\"description\" style=\"margin:0 0 2px 35px;\">Library contains <strong>" . $L_count . "</strong> mp3";
if ( $library['count'] != 1 ) { echo "'s "; }
else { echo " "; }
if ( $L_count > 0 ) {
//echo "<a href=\"javascript:mp3jp_listtoggle('fox_library','files');\" id=\"fox_library-toggle\">Show files</a> | <a href=\"media-new.php\">Upload new</a>";
echo "<a href=\"javascript:MP3J_ADMIN.showhideit('fox_library','files');\" id=\"fox_library-toggle\">Show files</a> | <a href=\"media-new.php\">Upload new</a>";
echo "</p>";
//echo "<div id=\"fox_library-list\" style=\"display:none;\">\n";
echo "<div id=\"fox_library-list\">\n";
$liblist = '<p style="margin-left:0px;">';
$br = '<br />';
$tagclose = '</p>';
$n = 1;
foreach ( $library['filenames'] as $i => $file ) {
//$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " </span> " . $file . " <span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span>" . $br;
switch( $O['library_sortcol'] ) {
case "title":
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " \"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span> " . $file . $br;
break;
case "caption":
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . " " . $library['excerpts'][$i] . " \"" . $library['titles'][$i] . "\"</span> " . $file . $br;
break;
default:
$liblist .= "<a href=\"media.php?attachment_id=" . $library['postIDs'][$i] . "&action=edit\" style=\"font-size:11px;\">[Edit]</a> <span style=\"color:#aaa;font-size:11px;\">" . $n++ . "</span> " . $file . " <span style=\"color:#aaa;font-size:11px;\">\"" . $library['titles'][$i] . "\" " . $library['excerpts'][$i] . "</span>" . $br;
}
}
$liblist .= $tagclose;
echo $liblist;
echo '</div>';
}
else { echo "<a href=\"media-new.php\">Upload new</a></p>"; }
?>
<p class="description" style="margin:0 0 0 33px;">You just need to write filenames in playlists to play from the library.</p>
<p style="margin:12px 0 12px 34px;">Order playlists by:
<select name="librarySortcol" style="width:110px; font-size:11px;">
<option value="file" <?php if ( 'file' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Filename</option>
<option value="date" <?php if ( 'date' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Date Uploaded</option>
<option value="caption" <?php if ( 'caption' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Caption, Title</option>
<option value="title" <?php if ( 'title' == $O['library_sortcol'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Title</option>
</select>
Direction:
<select name="libraryDirection" style="width:60px; font-size:11px;">
<option value="ASC" <?php if ( 'ASC' == $O['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>ASC</option>
<option value="DESC" <?php if ( 'DESC' == $O['library_direction'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>DESC</option>
</select>
</p><br />
<!-- Folder -->
<h3>Folder or URI</h3>
<p class="description" style="margin:0 0 0 35px;">Set a default folder or uri for playing mp3's in the box below, eg. <code>/music</code> or <code>www.anothersite.com/music</code><br />You just need to write filenames in playlists to play from here.</p>
<p style="margin:10px 0px 5px 35px;">Default path: <input type="text" style="width:385px;" name="mp3foxfolder" value="<?php echo $O['mp3_dir']; ?>" /></p>
<?php
// create file-list if directory is local
$n = 1;
$folderuris = $mp3_fox->grab_local_folder_mp3s( $O['mp3_dir'] );
if ( is_array($folderuris) ){
foreach ( $folderuris as $i => $uri ) {
$files[$i] = strrchr( $uri, "/" );
$files[$i] = str_replace( "/", "", $files[$i] );
}
$c = (!empty($files)) ? count($files) : 0;
echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">This folder contains <strong>" . $c . "</strong> mp3";
if ( $c != 1 ) { echo "'s "; }
else { echo " "; }
if ( $c > 0 ) {
//echo "<a href=\"javascript:mp3jp_listtoggle('fox_folder','files');\" id=\"fox_folder-toggle\">Show files</a></p>";
echo "<a href=\"javascript:MP3J_ADMIN.showhideit('fox_folder','files');\" id=\"fox_folder-toggle\">Show files</a></p>";
//echo "<div id=\"fox_folder-list\" style=\"display:none;\">\n<p style=\"margin-left:0px;\">";
echo "<div id=\"fox_folder-list\">\n<p style=\"margin-left:0px;\">";
//natcasesort($files);
foreach ( $files as $i => $val ) {
echo "<span style=\"color:#aaa;font-size:11px;\">" . $n++ . "</span> " . $val . "<br />";
}
echo "</p>\n</div>\n";
}
else { echo "</p>"; }
}
elseif ( $folderuris == true )
echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">Unable to read or locate the folder <code>" . $O['mp3_dir'] . "</code> check the path and folder permissions</p>";
else
echo "<p class=\"description\" style=\"margin: 0px 0px 14px 117px;\">No info is available on remote folders but you can play from here if you know the filenames</p>";
?>
<br />
<div class="joptionswrap">
<!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>-->
<a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op1','Playlist Player Options');" id="fox_op1-toggle">Playlist Player Options</a>
<div id="fox_op1-list" class="jopbox">
<br />
<p>Width: <input type="text" style="width:75px;" name="mp3foxPlayerWidth" value="<?php echo $O['player_width']; ?>" /> <span class="description">pixels (px) or percent (%)</span></p>
<p>Align:
<select name="mp3foxFloat" style="width:94px; font-size:11px; line-height:16px;">
<option value="none" <?php if ( 'none' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Left</option>
<option value="rel-C" <?php if ( 'rel-C' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Centre</option>
<option value="rel-R" <?php if ( 'rel-R' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Right</option>
<option value="left" <?php if ( 'left' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float left</option>
<option value="right" <?php if ( 'right' == $O['player_float'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Float right</option>
</select></p>
<br /><br />
<!-- <p><input type="checkbox" name="mp3foxDownloadMp3" value="true" <?php //if ($O['show_downloadmp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Display a 'Download mp3' link</p> -->
<h3 style="margin-left:0;"><strong>Downloads</strong></h3>
<p style="margin-bottom:10px;">Show download link:
<select name="mp3foxDownloadMp3" style="width:120px; font-size:11px; line-height:16px;">
<option value="true" <?php if ( 'true' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>Yes</option>
<option value="false" <?php if ( 'false' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>No</option>
<option value="loggedin" <?php if ( 'loggedin' == $O['show_downloadmp3'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>To logged in users</option>
</select>
</p>
<p class="description" style="margin:0 0 5px 30px;">When setting a player for logged in downloads, use the following options to add text/link for logged out visitors:</p>
<p style="margin-left:30px;">Visitor text: <input type="text" style="width:145px;" name="loggedout_dload_text" value="<?php echo $O['loggedout_dload_text']; ?>" /> <span class="description">(leave blank for no text/link)</span></p>
<p style="margin-left:30px;">Visitor link: <input type="text" style="width:350px;" name="loggedout_dload_link" value="<?php echo $O['loggedout_dload_link']; ?>" /> <span class="description">(optional url for visitor text)</span></p>
<br />
<!--<span class="description">(can be set per-player via shortcodes)</span>-->
<p>Download link text: <input type="text" style="width:140px;" name="dload_text" value="<?php echo $O['dload_text']; ?>" /></p>
<p style="margin-top:15px;"><input type="checkbox" name="force_browser_dload" value="true" <?php if ($O['force_browser_dload'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> />
Try to force browsers to save downloads <span class="description">(no mobile support yet)</span>
<!-- Local files
<input type="radio" name="force_browser_dload_remote" value="false" <?php //if ($O['force_browser_dload_remote'] == "false") { echo 'checked="checked"'; } ?> />
|
<input type="radio" name="force_browser_dload_remote" value="true" <?php //if ($O['force_browser_dload_remote'] == "true") { echo 'checked="checked"'; } ?>/>
All files -->
</p>
<p style="margin:10px 0 0 30px;"><span class="description">If you play from other domains and want to force the download, then use
the field<br />below to specify a path to a downloader file. <a href="<?php echo $mp3_fox->PluginFolder; ?>/remote/help.txt">See help on setting this up</a>.</span></p>
<p style="margin:5px 0 0 30px;">Path to remote downloader files: <input type="text" style="width:240px;" name="dloader_remote_path" value="<?php echo $O['dloader_remote_path']; ?>" /></p>
<!--<p style="margin:5px 0 0 25px;"><span class="description">(if you select 'All files' then you'll need to place a downloader file on any remote servers you want to force downloads from.
There's a file included in the plugin for use on servers running php, see <a href="<?php //echo $mp3_fox->PluginFolder; ?>/remote/help.txt">remote setup help</a> for instructions)</span></p>-->
<br /><br />
<h3 style="margin-left:0;"><strong>Margins</strong></h3>
<p>Above players: <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_top" value="<?php echo $O['paddings_top']; ?>" /> <span class="description"> pixels (px) or percent (%)</span><br />
Inner margin: (floated players) <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_inner" value="<?php echo $O['paddings_inner']; ?>" /> <span class="description"> pixels (px) or percent (%)</span><br />
Below players: <input type="text" size="5" style="text-align:center;" name="mp3foxPaddings_bottom" value="<?php echo $O['paddings_bottom']; ?>" /> <span class="description"> pixels (px) or percent (%)</span></p>
<br /><br />
<h3 style="margin-left:0;"><strong>Playlists</strong></h3>
<p>Max playlist height: <input type="text" size="6" style="text-align:center;" name="mp3foxMaxListHeight" value="<?php echo $O['max_list_height']; ?>" /> px <span class="description">(a scroll bar will show for longer playlists, leave it blank for no limit)</span></p>
<p><input type="checkbox" name="mp3foxShowPlaylist" value="true" <?php if ($O['playlist_show'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Start with playlists showing</p>
<div style="margin: 10px 0px 10px 0px; padding:6px; background:#f9f9f9; border:1px solid #eee;">
<p>Playlist Separators <span class="description">- CAUTION: You'll need to manually update any existing playlists if you change the separators!</p>
<p style="margin-left:20px;">Files:
<select name="file_separator" style="width:120px; font-size:11px; line-height:16px;">
<option value="," <?php if ( ',' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
<option value=";" <?php if ( ';' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
<option value="###" <?php if ( '###' == $O['f_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
</select>
<span class="description">eg.</span> <code>tracks="fileA.mp3 <?php echo $O['f_separator']; ?> [email protected] <?php echo $O['f_separator']; ?> fileC.mp3"</code></p>
<p style="margin-left:20px;">Captions:
<select name="caption_separator" style="width:120px; font-size:11px; line-height:16px;">
<option value="," <?php if ( ',' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>, (comma)</option>
<option value=";" <?php if ( ';' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>; (semicolon)</option>
<option value="###" <?php if ( '###' == $O['c_separator'] ) { _e('selected="selected"', $mp3_fox->textdomain ); } ?>>### (3 hashes)</option>
</select>
<span class="description">eg.</span> <code>captions="Caption A <?php echo $O['c_separator']; ?> Caption B <?php echo $O['c_separator']; ?> Caption C"</code></p>
</div>
</div>
<!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op5','Single Player Options');" id="fox_op5-toggle">Single Player Options</a>-->
<a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op5','Single Player Options');" id="fox_op5-toggle">Single Player Options</a>
<div id="fox_op5-list" class="jopbox">
<p><input type="checkbox" name="volslider_onsingles" value="true" <?php if ($O['volslider_on_singles'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Volume sliders on [mp3<strong>t</strong>] players</p>
<p><input type="checkbox" name="volslider_onmp3j" value="true" <?php if ($O['volslider_on_mp3j'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Volume sliders on [mp3<strong>j</strong>] players</p>
</div>
<!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op2','Pop-Out Options');" id="fox_op2-toggle">Pop-Out Options</a>-->
<a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op2','Pop-Out Options');" id="fox_op2-toggle">Pop-Out Options</a>
<div id="fox_op2-list" class="jopbox">
<p><input type="checkbox" name="mp3foxEnablePopout" value="true" <?php if ($O['enable_popout'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Enable the pop-out player</p>
<p>Window width: <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutWidth" value="<?php echo $O['popout_width']; ?>" /> px <span class="description"> (250 - 1600)</span></p>
<p>Window max height: <input type="text" size="4" style="text-align:center;" name="mp3foxPopoutMaxHeight" value="<?php echo $O['popout_max_height']; ?>" /> px <span class="description"> (200 - 1200) a scroll bar will show for longer playlists</span></p>
<p>Launch button text: <input type="text" style="width:200px;" name="mp3foxPopoutButtonText" value="<?php echo $O['popout_button_title']; ?>" /></p>
</div>
<!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op3','File Options');" id="fox_op3-toggle">File Options</a>-->
<a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op3','File Options');" id="fox_op3-toggle">File Options</a>
<div id="fox_op3-list" class="jopbox">
<p><input type="checkbox" name="mp3foxHideExtension" value="true" <?php if ($O['hide_mp3extension'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Hide '.mp3' extension if a filename is displayed<br /><span class="description" style="margin-left:28px;">(filenames are displayed when there's no available titles)</span></p>
<p><input type="checkbox" name="mp3foxEncodeFiles" value="true" <?php if ($O['encode_files'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Encode URI's and filenames<br /><span class="description" style="margin-left:28px;">(provides some obfuscation of your urls in the page source)</span></p>
<p><input type="checkbox" name="mp3foxAllowRemote" value="true" <?php if ($O['allow_remoteMp3'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Allow playing of off-site mp3's<br /><span class="description" style="margin-left:28px;">(unchecking this option doesn't affect mp3's playing from a remote default folder if one is set above)</span></p>
</div>
<!--<a class="fox_buttonlink bl3" href="javascript:mp3jp_listtoggle('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>-->
<a class="fox_buttonlink bl3" href="javascript:MP3J_ADMIN.toggleit('fox_op4','Template Options');" id="fox_op4-toggle">Template Options</a>
<div id="fox_op4-list" class="jopbox">
<p style="margin:10px 0 10px 0px;">Shortcode for 'Turn mp3 links into players' option:</p>
<p style="margin:0px 0 20px 25px;"><textarea class="widefat" style="width:580px; height:100px;" name="make_player_from_link_shcode"><?php
$deslashed = str_replace('\"', '"', $O['make_player_from_link_shcode'] );
echo $deslashed;
?></textarea><br /><span class="description">Can also include text/html. Placeholders:</span> <code>{TEXT}</code> <span class="description">- Link text,</span> <code>{URL}</code> <span class="description">- Link url.</span></p>
<p><input type="checkbox" name="mp3foxUseFixedCSS" value="true" <?php if ($O['use_fixed_css'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Bypass colour settings<br /> <span class="description">(colours can still be set in css)</span></p>
<p><input type="checkbox" name="disableTemplateTag" value="true" <?php if ($O['disable_template_tag'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Bypass player template-tags in theme files<br /> <span class="description">(ignores mp3j_addscripts() and mp3j_put() template functions)</span></p>
<?php $greyout_text = ( $O['disable_jquery_libs'] == "yes" ) ? ' style="color:#d6d6d6;"' : ''; ?>
<p<?php echo $greyout_text; ?>><input type="checkbox" name="touch_punch_js" value="true" <?php if ($O['touch_punch_js'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Include additional js for touch screen support<br /> <span class="description"<?php echo $greyout_text; ?>>(adds jquery.ui.touch-punch.js script)</span></p>
<p><input type="checkbox" name="mp3foxEchoDebug" value="true" <?php if ($O['echo_debug'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /> Turn on debug<br /> <span class="description">(info appears in the source view near the bottom)</span></p>
<?php $bgc = ( $O['disable_jquery_libs'] == "yes" ) ? "#fdd" : "#f9f9f9"; ?>
<div style="margin: 20px 0px 10px 0px; padding:6px; background:<?php echo $bgc; ?>; border:1px solid #eee;">
<p style="margin:0 0 5px 18px;">Disable jQuery and jQuery-UI javascript libraries? <input type="text" style="width:60px;" name="disableJSlibs" value="<?php echo $O['disable_jquery_libs']; ?>" /></p>
<p style="margin: 0 0 8px 18px;"><span class="description"><strong>CAUTION!!</strong> This option will bypass the request <strong>from this plugin only</strong> for both jQuery <strong>and</strong> jQuery-UI scripts,
you <strong>MUST</strong> be providing these scripts from an alternative source.
<br />Type <code>yes</code> in the box and save settings to bypass jQuery and jQuery-UI.</span></p>
</div>
</div>
</div><!-- close .joptionswrap -->
<p style="margin-top: 4px;"><input type="submit" name="update_mp3foxSettings" class="button-primary" value="<?php _e('Update Settings', $mp3_fox->textdomain ) ?>" /> Remember settings if plugin is deactivated <input type="checkbox" name="mp3foxRemember" value="true" <?php if ($O['remember_settings'] == "true") { _e('checked="checked"', $mp3_fox->textdomain ); }?> /></p>
<input id="fox_styling" type="hidden" name="MtogBox1" value="<?php echo $O['admin_toggle_1']; // Colour settings toggle state ?>" />
<input type="hidden" name="mp3foxPluginVersion" value="<?php echo $mp3_fox->version_of_plugin; ?>" />
</form><br />
<div style="margin: 15px 120px 25px 0px; border-top: 1px solid #999; height: 30px;"><p class="description" style="margin: 0px 120px px 0px;"><a href="http://sjward.org/jplayer-for-wordpress">Plugin home page</a></p></div>
</div>
<?php
}
?>