Version Description
- Released on 10/13/2009
- Added 4 new mp3 flash players: 1 Pixel Out Audio Player, Mp3 Player Maxi, Simple Flash MP3 Player and AudioPlay player.
- Added PodPress Stats Archive view (option available in Settings > Basic Settings page).
- Added 'Verify' media option next to Media URL box to check entered URL and detect file size/duration information.
- Added Password Protect option for Custom Podcast Channels, allows for Premium Content (feature explained and enabled under Tools page).
- Relabeled Custom Podcast Feeds to Custom Podcast Channels to clear up confusion.
- Reorganized settings pages with tabbed sections.
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 0.9.11 to 1.0.2
- 3rdparty/colorpicker/css/colorpicker.css +155 -0
- 3rdparty/colorpicker/images/colorpicker_overlay.png +0 -0
- 3rdparty/colorpicker/images/colorpicker_select.gif +0 -0
- 3rdparty/colorpicker/images/custom_background2.png +0 -0
- 3rdparty/colorpicker/images/custom_indic.gif +0 -0
- 3rdparty/colorpicker/js/colorpicker.js +496 -0
- 3rdparty/jquery.cookie.js +97 -0
- 3rdparty/maxi_player/generator.js +147 -0
- audio-player.swf +0 -0
- audioplay.swf +0 -0
- buttons/classic/pausedown.png +0 -0
- buttons/classic/pauseover.png +0 -0
- buttons/classic/pauseup.png +0 -0
- buttons/classic/playdown.png +0 -0
- buttons/classic/playover.png +0 -0
- buttons/classic/playup.png +0 -0
- buttons/classic/stopdown.png +0 -0
- buttons/classic/stopover.png +0 -0
- buttons/classic/stopup.png +0 -0
- buttons/classic_small/pausedown.png +0 -0
- buttons/classic_small/pauseover.png +0 -0
- buttons/classic_small/pauseup.png +0 -0
- buttons/classic_small/playdown.png +0 -0
- buttons/classic_small/playover.png +0 -0
- buttons/classic_small/playup.png +0 -0
- buttons/classic_small/stopdown.png +0 -0
- buttons/classic_small/stopover.png +0 -0
- buttons/classic_small/stopup.png +0 -0
- buttons/negative/pausedown.png +0 -0
- buttons/negative/pauseover.png +0 -0
- buttons/negative/pauseup.png +0 -0
- buttons/negative/playdown.png +0 -0
- buttons/negative/playover.png +0 -0
- buttons/negative/playup.png +0 -0
- buttons/negative/stopdown.png +0 -0
- buttons/negative/stopover.png +0 -0
- buttons/negative/stopup.png +0 -0
- buttons/negative_small/pausedown.png +0 -0
- buttons/negative_small/pauseover.png +0 -0
- buttons/negative_small/pauseup.png +0 -0
- buttons/negative_small/playdown.png +0 -0
- buttons/negative_small/playover.png +0 -0
- buttons/negative_small/playup.png +0 -0
- buttons/negative_small/stopdown.png +0 -0
- buttons/negative_small/stopover.png +0 -0
- buttons/negative_small/stopup.png +0 -0
- css/admin.css +132 -0
- images/color_preview.gif +0 -0
- mp3info.class.php +7 -7
- player.js +3 -3
- player_mp3_maxi.swf +0 -0
- powerpress-feed-auth.php +51 -0
- powerpress-player.php +303 -0
- powerpress.php +133 -27
- powerpressadmin-appearance.php +0 -191
- powerpressadmin-basic.php +517 -186
- powerpressadmin-customfeeds.php +12 -12
- powerpressadmin-editfeed.php +444 -168
- powerpressadmin-metabox.php +17 -13
- powerpressadmin-mode.php +1 -5
- powerpressadmin-player-page.php +1612 -0
- powerpressadmin-player.php +109 -0
- powerpressadmin-podpress-stats.php +61 -0
- powerpressadmin-podpress.php +1 -1
- powerpressadmin-tools.php +48 -10
- powerpressadmin.php +477 -174
- readme.txt +123 -46
- screenshot-1.jpg +0 -0
- screenshot-1.png +0 -0
- screenshot-2.jpg +0 -0
- screenshot-2.png +0 -0
- screenshot-3.jpg +0 -0
- screenshot-3.png +0 -0
- screenshot-4.jpg +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- simple_mp3.swf +0 -0
3rdparty/colorpicker/css/colorpicker.css
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.colorpicker {
|
2 |
+
width: 286px;
|
3 |
+
height: 176px;
|
4 |
+
overflow: hidden;
|
5 |
+
position: absolute;
|
6 |
+
font-family: Arial, Helvetica, sans-serif;
|
7 |
+
display: none;
|
8 |
+
background-image: url(../images/custom_background2.png);
|
9 |
+
position: absolute;
|
10 |
+
bottom: 0;
|
11 |
+
left: 0;
|
12 |
+
}
|
13 |
+
.colorpicker_color {
|
14 |
+
width: 150px;
|
15 |
+
height: 150px;
|
16 |
+
left: 14px;
|
17 |
+
top: 13px;
|
18 |
+
position: absolute;
|
19 |
+
background: #f00;
|
20 |
+
overflow: hidden;
|
21 |
+
cursor: crosshair;
|
22 |
+
}
|
23 |
+
.colorpicker_color div {
|
24 |
+
position: absolute;
|
25 |
+
top: 0;
|
26 |
+
left: 0;
|
27 |
+
width: 150px;
|
28 |
+
height: 150px;
|
29 |
+
background: url(../images/colorpicker_overlay.png);
|
30 |
+
}
|
31 |
+
.colorpicker_color div div {
|
32 |
+
position: absolute;
|
33 |
+
top: 0;
|
34 |
+
left: 0;
|
35 |
+
width: 11px;
|
36 |
+
height: 11px;
|
37 |
+
overflow: hidden;
|
38 |
+
background: url(../images/colorpicker_select.gif);
|
39 |
+
margin: -5px 0 0 -5px;
|
40 |
+
}
|
41 |
+
.colorpicker_hue {
|
42 |
+
position: absolute;
|
43 |
+
top: 13px;
|
44 |
+
left: 171px;
|
45 |
+
width: 35px;
|
46 |
+
height: 150px;
|
47 |
+
cursor: n-resize;
|
48 |
+
}
|
49 |
+
.colorpicker_hue div {
|
50 |
+
position: absolute;
|
51 |
+
width: 35px;
|
52 |
+
height: 9px;
|
53 |
+
overflow: hidden;
|
54 |
+
background: url(../images/custom_indic.gif) left top;
|
55 |
+
margin: -4px 0 0 0;
|
56 |
+
left: 0px;
|
57 |
+
}
|
58 |
+
.colorpicker_new_color {
|
59 |
+
position: absolute;
|
60 |
+
width: 60px;
|
61 |
+
height: 30px;
|
62 |
+
left: 213px;
|
63 |
+
top: 13px;
|
64 |
+
background: #f00;
|
65 |
+
}
|
66 |
+
.colorpicker_current_color {
|
67 |
+
position: absolute;
|
68 |
+
width: 60px;
|
69 |
+
height: 30px;
|
70 |
+
left: 283px;
|
71 |
+
top: 13px;
|
72 |
+
background: #f00;
|
73 |
+
display: none;
|
74 |
+
}
|
75 |
+
.colorpicker input {
|
76 |
+
background-color: transparent;
|
77 |
+
border: 1px solid transparent;
|
78 |
+
position: absolute;
|
79 |
+
font-size: 10px;
|
80 |
+
font-family: Arial, Helvetica, sans-serif;
|
81 |
+
color: #898989;
|
82 |
+
top: 4px;
|
83 |
+
right: 11px;
|
84 |
+
text-align: right;
|
85 |
+
margin: 0;
|
86 |
+
padding: 0;
|
87 |
+
height: 11px;
|
88 |
+
}
|
89 |
+
.colorpicker_hex {
|
90 |
+
display: none;
|
91 |
+
}
|
92 |
+
.colorpicker_hex input {
|
93 |
+
display: none;
|
94 |
+
}
|
95 |
+
.colorpicker_field {
|
96 |
+
height: 22px;
|
97 |
+
width: 62px;
|
98 |
+
background-position: top;
|
99 |
+
position: absolute;
|
100 |
+
}
|
101 |
+
.colorpicker_field span {
|
102 |
+
position: absolute;
|
103 |
+
width: 12px;
|
104 |
+
height: 22px;
|
105 |
+
overflow: hidden;
|
106 |
+
top: 0;
|
107 |
+
right: 0;
|
108 |
+
cursor: n-resize;
|
109 |
+
}
|
110 |
+
.colorpicker_rgb_r {
|
111 |
+
display: none;
|
112 |
+
}
|
113 |
+
.colorpicker_rgb_g {
|
114 |
+
display: none;
|
115 |
+
}
|
116 |
+
.colorpicker_rgb_b {
|
117 |
+
display: none;
|
118 |
+
}
|
119 |
+
.colorpicker_hsb_h {
|
120 |
+
display: none;
|
121 |
+
}
|
122 |
+
.colorpicker_hsb_s {
|
123 |
+
display: none;
|
124 |
+
}
|
125 |
+
.colorpicker_hsb_b {
|
126 |
+
display: none;
|
127 |
+
}
|
128 |
+
.colorpicker_submit {
|
129 |
+
position: absolute;
|
130 |
+
left: 210px;
|
131 |
+
top: 142px;
|
132 |
+
overflow: hidden;
|
133 |
+
width: 60px;
|
134 |
+
font-family: Arial, Helvetica, sans-serif;
|
135 |
+
font-weight: bold;
|
136 |
+
}
|
137 |
+
.colorpicker_focus {
|
138 |
+
background-position: center;
|
139 |
+
}
|
140 |
+
.colorpicker_hex.colorpicker_focus {
|
141 |
+
background-position: bottom;
|
142 |
+
}
|
143 |
+
.colorpicker_submit.colorpicker_focus {
|
144 |
+
background-position: bottom;
|
145 |
+
}
|
146 |
+
.colorpicker_slider {
|
147 |
+
background-position: bottom;
|
148 |
+
}
|
149 |
+
.color_preview {
|
150 |
+
vertical-align:text-top;
|
151 |
+
margin-top: 3px;
|
152 |
+
margin-left: 4px;
|
153 |
+
cursor: pointer;
|
154 |
+
border: 1px solid #000000;
|
155 |
+
}
|
3rdparty/colorpicker/images/colorpicker_overlay.png
ADDED
Binary file
|
3rdparty/colorpicker/images/colorpicker_select.gif
ADDED
Binary file
|
3rdparty/colorpicker/images/custom_background2.png
ADDED
Binary file
|
3rdparty/colorpicker/images/custom_indic.gif
ADDED
Binary file
|
3rdparty/colorpicker/js/colorpicker.js
ADDED
@@ -0,0 +1,496 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
* Color picker
|
4 |
+
* Author: Stefan Petre www.eyecon.ro
|
5 |
+
*
|
6 |
+
* Dual licensed under the MIT and GPL licenses
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
(function ($) {
|
10 |
+
var ColorPicker = function () {
|
11 |
+
var
|
12 |
+
ids = {},
|
13 |
+
inAction,
|
14 |
+
charMin = 65,
|
15 |
+
visible,
|
16 |
+
tpl = '<div class="colorpicker round"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" class="round picker_hex" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" class="round" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" class="round" /><span></span></div><button class="colorpicker_submit">Done</button></div>',
|
17 |
+
defaults = {
|
18 |
+
eventName: 'click',
|
19 |
+
onShow: function () {},
|
20 |
+
onBeforeShow: function(){},
|
21 |
+
onHide: function () {},
|
22 |
+
onChange: function () {},
|
23 |
+
onSubmit: function () {},
|
24 |
+
color: 'ff0000',
|
25 |
+
livePreview: true,
|
26 |
+
flat: false
|
27 |
+
},
|
28 |
+
fillRGBFields = function (hsb, cal) {
|
29 |
+
var rgb = HSBToRGB(hsb);
|
30 |
+
$(cal).data('colorpicker').fields
|
31 |
+
.eq(1).val(rgb.r).end()
|
32 |
+
.eq(2).val(rgb.g).end()
|
33 |
+
.eq(3).val(rgb.b).end();
|
34 |
+
},
|
35 |
+
fillHSBFields = function (hsb, cal) {
|
36 |
+
$(cal).data('colorpicker').fields
|
37 |
+
.eq(4).val(hsb.h).end()
|
38 |
+
.eq(5).val(hsb.s).end()
|
39 |
+
.eq(6).val(hsb.b).end();
|
40 |
+
},
|
41 |
+
fillHexFields = function (hsb, cal) {
|
42 |
+
$(cal).data('colorpicker').fields
|
43 |
+
.eq(0).val(HSBToHex(hsb)).end();
|
44 |
+
},
|
45 |
+
setSelector = function (hsb, cal) {
|
46 |
+
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
47 |
+
$(cal).data('colorpicker').selectorIndic.css({
|
48 |
+
left: parseInt(150 * hsb.s/100, 10),
|
49 |
+
top: parseInt(150 * (100-hsb.b)/100, 10)
|
50 |
+
});
|
51 |
+
},
|
52 |
+
setHue = function (hsb, cal) {
|
53 |
+
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
54 |
+
},
|
55 |
+
setCurrentColor = function (hsb, cal) {
|
56 |
+
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
57 |
+
},
|
58 |
+
setNewColor = function (hsb, cal) {
|
59 |
+
$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
60 |
+
},
|
61 |
+
keyDown = function (ev) {
|
62 |
+
var pressedKey = ev.charCode || ev.keyCode || -1;
|
63 |
+
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
var cal = $(this).parent().parent();
|
67 |
+
if (cal.data('colorpicker').livePreview === true) {
|
68 |
+
change.apply(this);
|
69 |
+
}
|
70 |
+
},
|
71 |
+
change = function (ev) {
|
72 |
+
var cal = $(this).parent().parent(), col;
|
73 |
+
if (this.parentNode.className.indexOf('_hex') > 0) {
|
74 |
+
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
75 |
+
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
76 |
+
cal.data('colorpicker').color = col = fixHSB({
|
77 |
+
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
78 |
+
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
79 |
+
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
80 |
+
});
|
81 |
+
} else {
|
82 |
+
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
83 |
+
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
84 |
+
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
85 |
+
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
86 |
+
}));
|
87 |
+
}
|
88 |
+
if (ev) {
|
89 |
+
fillRGBFields(col, cal.get(0));
|
90 |
+
fillHexFields(col, cal.get(0));
|
91 |
+
fillHSBFields(col, cal.get(0));
|
92 |
+
}
|
93 |
+
setSelector(col, cal.get(0));
|
94 |
+
setHue(col, cal.get(0));
|
95 |
+
setNewColor(col, cal.get(0));
|
96 |
+
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
97 |
+
},
|
98 |
+
blur = function (ev) {
|
99 |
+
var cal = $(this).parent().parent();
|
100 |
+
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
101 |
+
},
|
102 |
+
focus = function () {
|
103 |
+
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
104 |
+
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
105 |
+
$(this).parent().addClass('colorpicker_focus');
|
106 |
+
},
|
107 |
+
downIncrement = function (ev) {
|
108 |
+
var field = $(this).parent().find('input').focus();
|
109 |
+
var current = {
|
110 |
+
el: $(this).parent().addClass('colorpicker_slider'),
|
111 |
+
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
112 |
+
y: ev.pageY,
|
113 |
+
field: field,
|
114 |
+
val: parseInt(field.val(), 10),
|
115 |
+
preview: $(this).parent().parent().data('colorpicker').livePreview
|
116 |
+
};
|
117 |
+
$(document).bind('mouseup', current, upIncrement);
|
118 |
+
$(document).bind('mousemove', current, moveIncrement);
|
119 |
+
$(document).bind('mousedown', current, moveIncrement);
|
120 |
+
},
|
121 |
+
moveIncrement = function (ev) {
|
122 |
+
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
123 |
+
if (ev.data.preview) {
|
124 |
+
change.apply(ev.data.field.get(0), [true]);
|
125 |
+
}
|
126 |
+
return false;
|
127 |
+
},
|
128 |
+
upIncrement = function (ev) {
|
129 |
+
change.apply(ev.data.field.get(0), [true]);
|
130 |
+
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
131 |
+
$(document).unbind('mouseup', upIncrement);
|
132 |
+
$(document).unbind('mousemove', moveIncrement);
|
133 |
+
$(document).unbind('mousedown', moveIncrement);
|
134 |
+
return false;
|
135 |
+
},
|
136 |
+
downHue = function (ev) {
|
137 |
+
var current = {
|
138 |
+
cal: $(this).parent(),
|
139 |
+
y: $(this).offset().top
|
140 |
+
};
|
141 |
+
current.preview = current.cal.data('colorpicker').livePreview;
|
142 |
+
$(document).bind('mouseup', current, upHue);
|
143 |
+
$(document).bind('mousemove', current, moveHue);
|
144 |
+
$(document).bind('mousedown', current, moveHue);
|
145 |
+
},
|
146 |
+
moveHue = function (ev) {
|
147 |
+
change.apply(
|
148 |
+
ev.data.cal.data('colorpicker')
|
149 |
+
.fields
|
150 |
+
.eq(4)
|
151 |
+
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
152 |
+
.get(0),
|
153 |
+
[ev.data.preview]
|
154 |
+
);
|
155 |
+
return false;
|
156 |
+
},
|
157 |
+
upHue = function (ev) {
|
158 |
+
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
159 |
+
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
160 |
+
$(document).unbind('mouseup', upHue);
|
161 |
+
$(document).unbind('mousemove', moveHue);
|
162 |
+
$(document).unbind('mousedown', moveHue);
|
163 |
+
return false;
|
164 |
+
},
|
165 |
+
downSelector = function (ev) {
|
166 |
+
var current = {
|
167 |
+
cal: $(this).parent(),
|
168 |
+
pos: $(this).offset()
|
169 |
+
};
|
170 |
+
current.preview = current.cal.data('colorpicker').livePreview;
|
171 |
+
$(document).bind('mouseup', current, upSelector);
|
172 |
+
$(document).bind('mousemove', current, moveSelector);
|
173 |
+
$(document).bind('mousedown', current, moveSelector);
|
174 |
+
},
|
175 |
+
moveSelector = function (ev) {
|
176 |
+
change.apply(
|
177 |
+
ev.data.cal.data('colorpicker')
|
178 |
+
.fields
|
179 |
+
.eq(6)
|
180 |
+
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
181 |
+
.end()
|
182 |
+
.eq(5)
|
183 |
+
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
184 |
+
.get(0),
|
185 |
+
[ev.data.preview]
|
186 |
+
);
|
187 |
+
return false;
|
188 |
+
},
|
189 |
+
upSelector = function (ev) {
|
190 |
+
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
191 |
+
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
192 |
+
$(document).unbind('mouseup', upSelector);
|
193 |
+
$(document).unbind('mousemove', moveSelector);
|
194 |
+
$(document).unbind('mousedown', moveSelector);
|
195 |
+
return false;
|
196 |
+
},
|
197 |
+
enterSubmit = function (ev) {
|
198 |
+
$(this).addClass('colorpicker_focus');
|
199 |
+
},
|
200 |
+
leaveSubmit = function (ev) {
|
201 |
+
$(this).removeClass('colorpicker_focus');
|
202 |
+
},
|
203 |
+
clickSubmit = function (ev) {
|
204 |
+
var cal = $(this).parent();
|
205 |
+
var col = cal.data('colorpicker').color;
|
206 |
+
cal.data('colorpicker').origColor = col;
|
207 |
+
setCurrentColor(col, cal.get(0));
|
208 |
+
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
|
209 |
+
ev.preventDefault();
|
210 |
+
return false;
|
211 |
+
},
|
212 |
+
show = function (ev) {
|
213 |
+
var cal = $('#' + $(this).data('colorpickerId'));
|
214 |
+
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
215 |
+
var pos = $(this).offset();
|
216 |
+
var viewPort = getViewport();
|
217 |
+
var top = pos.top + this.offsetHeight;
|
218 |
+
var left = pos.left;
|
219 |
+
if (top + 176 > viewPort.t + viewPort.h) {
|
220 |
+
top -= this.offsetHeight + 176;
|
221 |
+
}
|
222 |
+
if (left + 356 > viewPort.l + viewPort.w) {
|
223 |
+
left -= 356;
|
224 |
+
}
|
225 |
+
cal.css({left: left + 'px', top: top + 'px'});
|
226 |
+
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
227 |
+
cal.show();
|
228 |
+
}
|
229 |
+
$(document).bind('mousedown', {cal: cal}, hide);
|
230 |
+
return false;
|
231 |
+
},
|
232 |
+
hide = function (ev) {
|
233 |
+
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
234 |
+
var hex = HSBToHex(ev.data.cal.data('colorpicker').color);
|
235 |
+
if (ev.data.cal.data('colorpicker').onHide(ev.data.cal.get(0), hex) != false) {
|
236 |
+
ev.data.cal.hide();
|
237 |
+
}
|
238 |
+
$(document).unbind('mousedown', hide);
|
239 |
+
}
|
240 |
+
},
|
241 |
+
isChildOf = function(parentEl, el, container) {
|
242 |
+
if (parentEl == el) {
|
243 |
+
return true;
|
244 |
+
}
|
245 |
+
if (parentEl.contains) {
|
246 |
+
return parentEl.contains(el);
|
247 |
+
}
|
248 |
+
if ( parentEl.compareDocumentPosition ) {
|
249 |
+
return !!(parentEl.compareDocumentPosition(el) & 16);
|
250 |
+
}
|
251 |
+
var prEl = el.parentNode;
|
252 |
+
while(prEl && prEl != container) {
|
253 |
+
if (prEl == parentEl)
|
254 |
+
return true;
|
255 |
+
prEl = prEl.parentNode;
|
256 |
+
}
|
257 |
+
return false;
|
258 |
+
},
|
259 |
+
getViewport = function () {
|
260 |
+
var m = document.compatMode == 'CSS1Compat';
|
261 |
+
return {
|
262 |
+
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
263 |
+
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
264 |
+
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
265 |
+
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
266 |
+
};
|
267 |
+
},
|
268 |
+
fixHSB = function (hsb) {
|
269 |
+
return {
|
270 |
+
h: Math.min(360, Math.max(0, hsb.h)),
|
271 |
+
s: Math.min(100, Math.max(0, hsb.s)),
|
272 |
+
b: Math.min(100, Math.max(0, hsb.b))
|
273 |
+
};
|
274 |
+
},
|
275 |
+
fixRGB = function (rgb) {
|
276 |
+
return {
|
277 |
+
r: Math.min(255, Math.max(0, rgb.r)),
|
278 |
+
g: Math.min(255, Math.max(0, rgb.g)),
|
279 |
+
b: Math.min(255, Math.max(0, rgb.b))
|
280 |
+
};
|
281 |
+
},
|
282 |
+
fixHex = function (hex) {
|
283 |
+
var len = 6 - hex.length;
|
284 |
+
if (len > 0) {
|
285 |
+
var o = [];
|
286 |
+
for (var i=0; i<len; i++) {
|
287 |
+
o.push('0');
|
288 |
+
}
|
289 |
+
o.push(hex);
|
290 |
+
hex = o.join('');
|
291 |
+
}
|
292 |
+
return hex;
|
293 |
+
},
|
294 |
+
HexToRGB = function (hex) {
|
295 |
+
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
296 |
+
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
297 |
+
},
|
298 |
+
HexToHSB = function (hex) {
|
299 |
+
return RGBToHSB(HexToRGB(hex));
|
300 |
+
},
|
301 |
+
RGBToHSB = function (rgb) {
|
302 |
+
var hsb = {
|
303 |
+
h: 0,
|
304 |
+
s: 0,
|
305 |
+
b: 0
|
306 |
+
};
|
307 |
+
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
308 |
+
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
309 |
+
var delta = max - min;
|
310 |
+
hsb.b = max;
|
311 |
+
if (max != 0) {
|
312 |
+
|
313 |
+
}
|
314 |
+
hsb.s = max != 0 ? 255 * delta / max : 0;
|
315 |
+
if (hsb.s != 0) {
|
316 |
+
if (rgb.r == max) {
|
317 |
+
hsb.h = (rgb.g - rgb.b) / delta;
|
318 |
+
} else if (rgb.g == max) {
|
319 |
+
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
320 |
+
} else {
|
321 |
+
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
322 |
+
}
|
323 |
+
} else {
|
324 |
+
hsb.h = -1;
|
325 |
+
}
|
326 |
+
hsb.h *= 60;
|
327 |
+
if (hsb.h < 0) {
|
328 |
+
hsb.h += 360;
|
329 |
+
}
|
330 |
+
hsb.s *= 100/255;
|
331 |
+
hsb.b *= 100/255;
|
332 |
+
return hsb;
|
333 |
+
},
|
334 |
+
HSBToRGB = function (hsb) {
|
335 |
+
var rgb = {};
|
336 |
+
var h = Math.round(hsb.h);
|
337 |
+
var s = Math.round(hsb.s*255/100);
|
338 |
+
var v = Math.round(hsb.b*255/100);
|
339 |
+
if(s == 0) {
|
340 |
+
rgb.r = rgb.g = rgb.b = v;
|
341 |
+
} else {
|
342 |
+
var t1 = v;
|
343 |
+
var t2 = (255-s)*v/255;
|
344 |
+
var t3 = (t1-t2)*(h%60)/60;
|
345 |
+
if(h==360) h = 0;
|
346 |
+
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
347 |
+
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
348 |
+
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
349 |
+
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
350 |
+
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
351 |
+
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
352 |
+
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
353 |
+
}
|
354 |
+
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
355 |
+
},
|
356 |
+
RGBToHex = function (rgb) {
|
357 |
+
var hex = [
|
358 |
+
rgb.r.toString(16),
|
359 |
+
rgb.g.toString(16),
|
360 |
+
rgb.b.toString(16)
|
361 |
+
];
|
362 |
+
$.each(hex, function (nr, val) {
|
363 |
+
if (val.length == 1) {
|
364 |
+
hex[nr] = '0' + val;
|
365 |
+
}
|
366 |
+
});
|
367 |
+
return hex.join('');
|
368 |
+
},
|
369 |
+
HSBToHex = function (hsb) {
|
370 |
+
return RGBToHex(HSBToRGB(hsb));
|
371 |
+
},
|
372 |
+
restoreOriginal = function () {
|
373 |
+
var cal = $(this).parent();
|
374 |
+
var col = cal.data('colorpicker').origColor;
|
375 |
+
cal.data('colorpicker').color = col;
|
376 |
+
fillRGBFields(col, cal.get(0));
|
377 |
+
fillHexFields(col, cal.get(0));
|
378 |
+
fillHSBFields(col, cal.get(0));
|
379 |
+
setSelector(col, cal.get(0));
|
380 |
+
setHue(col, cal.get(0));
|
381 |
+
setNewColor(col, cal.get(0));
|
382 |
+
};
|
383 |
+
return {
|
384 |
+
init: function (opt) {
|
385 |
+
opt = $.extend({}, defaults, opt||{});
|
386 |
+
if (typeof opt.color == 'string') {
|
387 |
+
opt.color = HexToHSB(opt.color);
|
388 |
+
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
389 |
+
opt.color = RGBToHSB(opt.color);
|
390 |
+
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
391 |
+
opt.color = fixHSB(opt.color);
|
392 |
+
} else {
|
393 |
+
return this;
|
394 |
+
}
|
395 |
+
return this.each(function () {
|
396 |
+
if (!$(this).data('colorpickerId')) {
|
397 |
+
var options = $.extend({}, opt);
|
398 |
+
options.origColor = opt.color;
|
399 |
+
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
400 |
+
$(this).data('colorpickerId', id);
|
401 |
+
var cal = $(tpl).attr('id', id);
|
402 |
+
if (options.flat) {
|
403 |
+
cal.appendTo(this).show();
|
404 |
+
} else {
|
405 |
+
cal.appendTo(document.body);
|
406 |
+
}
|
407 |
+
options.fields = cal
|
408 |
+
.find('input')
|
409 |
+
.bind('keyup', keyDown)
|
410 |
+
.bind('change', change)
|
411 |
+
.bind('blur', blur)
|
412 |
+
.bind('focus', focus);
|
413 |
+
cal
|
414 |
+
.find('span').bind('mousedown', downIncrement).end()
|
415 |
+
.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
|
416 |
+
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
417 |
+
options.selectorIndic = options.selector.find('div div');
|
418 |
+
options.el = this;
|
419 |
+
options.hue = cal.find('div.colorpicker_hue div');
|
420 |
+
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
421 |
+
options.newColor = cal.find('div.colorpicker_new_color');
|
422 |
+
options.currentColor = cal.find('div.colorpicker_current_color');
|
423 |
+
cal.data('colorpicker', options);
|
424 |
+
cal.find('.colorpicker_submit')
|
425 |
+
.bind('mouseenter', enterSubmit)
|
426 |
+
.bind('mouseleave', leaveSubmit)
|
427 |
+
.bind('click', clickSubmit);
|
428 |
+
fillRGBFields(options.color, cal.get(0));
|
429 |
+
fillHSBFields(options.color, cal.get(0));
|
430 |
+
fillHexFields(options.color, cal.get(0));
|
431 |
+
setHue(options.color, cal.get(0));
|
432 |
+
setSelector(options.color, cal.get(0));
|
433 |
+
setCurrentColor(options.color, cal.get(0));
|
434 |
+
setNewColor(options.color, cal.get(0));
|
435 |
+
if (options.flat) {
|
436 |
+
cal.css({
|
437 |
+
position: 'relative',
|
438 |
+
display: 'block'
|
439 |
+
});
|
440 |
+
} else {
|
441 |
+
$(this).bind(options.eventName, show);
|
442 |
+
}
|
443 |
+
}
|
444 |
+
});
|
445 |
+
},
|
446 |
+
showPicker: function() {
|
447 |
+
return this.each( function () {
|
448 |
+
if ($(this).data('colorpickerId')) {
|
449 |
+
show.apply(this);
|
450 |
+
}
|
451 |
+
});
|
452 |
+
},
|
453 |
+
hidePicker: function() {
|
454 |
+
return this.each( function () {
|
455 |
+
if ($(this).data('colorpickerId')) {
|
456 |
+
$('#' + $(this).data('colorpickerId')).hide();
|
457 |
+
}
|
458 |
+
});
|
459 |
+
},
|
460 |
+
setColor: function(col) {
|
461 |
+
if (typeof col == 'string') {
|
462 |
+
col = HexToHSB(col);
|
463 |
+
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
464 |
+
col = RGBToHSB(col);
|
465 |
+
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
466 |
+
col = fixHSB(col);
|
467 |
+
} else {
|
468 |
+
return this;
|
469 |
+
}
|
470 |
+
return this.each(function(){
|
471 |
+
if ($(this).data('colorpickerId')) {
|
472 |
+
var cal = $('#' + $(this).data('colorpickerId'));
|
473 |
+
cal.data('colorpicker').color = col;
|
474 |
+
cal.data('colorpicker').origColor = col;
|
475 |
+
fillRGBFields(col, cal.get(0));
|
476 |
+
fillHSBFields(col, cal.get(0));
|
477 |
+
fillHexFields(col, cal.get(0));
|
478 |
+
setHue(col, cal.get(0));
|
479 |
+
setSelector(col, cal.get(0));
|
480 |
+
setCurrentColor(col, cal.get(0));
|
481 |
+
setNewColor(col, cal.get(0));
|
482 |
+
}
|
483 |
+
});
|
484 |
+
},
|
485 |
+
rgb2hex: function(rgb) {
|
486 |
+
|
487 |
+
}
|
488 |
+
};
|
489 |
+
}();
|
490 |
+
$.fn.extend({
|
491 |
+
ColorPicker: ColorPicker.init,
|
492 |
+
ColorPickerHide: ColorPicker.hidePicker,
|
493 |
+
ColorPickerShow: ColorPicker.showPicker,
|
494 |
+
ColorPickerSetColor: ColorPicker.setColor
|
495 |
+
});
|
496 |
+
})(jQuery)
|
3rdparty/jquery.cookie.js
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Cookie plugin
|
3 |
+
*
|
4 |
+
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
5 |
+
* Dual licensed under the MIT and GPL licenses:
|
6 |
+
* http://www.opensource.org/licenses/mit-license.php
|
7 |
+
* http://www.gnu.org/licenses/gpl.html
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Create a cookie with the given name and value and other optional parameters.
|
13 |
+
*
|
14 |
+
* @example $.cookie('the_cookie', 'the_value');
|
15 |
+
* @desc Set the value of a cookie.
|
16 |
+
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
17 |
+
* @desc Create a cookie with all available options.
|
18 |
+
* @example $.cookie('the_cookie', 'the_value');
|
19 |
+
* @desc Create a session cookie.
|
20 |
+
* @example $.cookie('the_cookie', null);
|
21 |
+
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
22 |
+
* used when the cookie was set.
|
23 |
+
*
|
24 |
+
* @param String name The name of the cookie.
|
25 |
+
* @param String value The value of the cookie.
|
26 |
+
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
27 |
+
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
28 |
+
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
29 |
+
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
30 |
+
* when the the browser exits.
|
31 |
+
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
32 |
+
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
33 |
+
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
34 |
+
* require a secure protocol (like HTTPS).
|
35 |
+
* @type undefined
|
36 |
+
*
|
37 |
+
* @name $.cookie
|
38 |
+
* @cat Plugins/Cookie
|
39 |
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
40 |
+
*/
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get the value of a cookie with the given name.
|
44 |
+
*
|
45 |
+
* @example $.cookie('the_cookie');
|
46 |
+
* @desc Get the value of a cookie.
|
47 |
+
*
|
48 |
+
* @param String name The name of the cookie.
|
49 |
+
* @return The value of the cookie.
|
50 |
+
* @type String
|
51 |
+
*
|
52 |
+
* @name $.cookie
|
53 |
+
* @cat Plugins/Cookie
|
54 |
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
55 |
+
*/
|
56 |
+
jQuery.cookie = function(name, value, options) {
|
57 |
+
|
58 |
+
if (typeof value != 'undefined') { // name and value given, set cookie
|
59 |
+
options = options || {};
|
60 |
+
if (value === null) {
|
61 |
+
value = '';
|
62 |
+
options.expires = -1;
|
63 |
+
}
|
64 |
+
var expires = '';
|
65 |
+
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
66 |
+
var date;
|
67 |
+
if (typeof options.expires == 'number') {
|
68 |
+
date = new Date();
|
69 |
+
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
70 |
+
} else {
|
71 |
+
date = options.expires;
|
72 |
+
}
|
73 |
+
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
74 |
+
}
|
75 |
+
// CAUTION: Needed to parenthesize options.path and options.domain
|
76 |
+
// in the following expressions, otherwise they evaluate to undefined
|
77 |
+
// in the packed version for some reason...
|
78 |
+
var path = options.path ? '; path=' + (options.path) : '';
|
79 |
+
var domain = options.domain ? '; domain=' + (options.domain) : '';
|
80 |
+
var secure = options.secure ? '; secure' : '';
|
81 |
+
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
82 |
+
} else { // only name given, get cookie
|
83 |
+
var cookieValue = null;
|
84 |
+
if (document.cookie && document.cookie != '') {
|
85 |
+
var cookies = document.cookie.split(';');
|
86 |
+
for (var i = 0; i < cookies.length; i++) {
|
87 |
+
var cookie = jQuery.trim(cookies[i]);
|
88 |
+
// Does this cookie string begin with the name we want?
|
89 |
+
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
90 |
+
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
91 |
+
break;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
return cookieValue;
|
96 |
+
}
|
97 |
+
};
|
3rdparty/maxi_player/generator.js
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var generator = new Object();
|
2 |
+
generator.params = new Object();
|
3 |
+
generator.updateParam = function(name, value)
|
4 |
+
{
|
5 |
+
//var element = document.getElementById(id);
|
6 |
+
switch (this.params[name].type) {
|
7 |
+
case "url":
|
8 |
+
case "text":
|
9 |
+
case "color":
|
10 |
+
this.params[name].value = value;
|
11 |
+
break;
|
12 |
+
case "int":
|
13 |
+
this.params[name].value = Number(value);
|
14 |
+
break;
|
15 |
+
case "bool":
|
16 |
+
this.params[name].value = value; // (value == "on")?1:0;
|
17 |
+
break;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
generator.addParam = function(id, name, type, defaultValue)
|
22 |
+
{
|
23 |
+
var element = document.getElementById(id);
|
24 |
+
this.params[name] = new Object();
|
25 |
+
this.params[name].type = type;
|
26 |
+
this.params[name].defaultValue = defaultValue;
|
27 |
+
this.params[name].element = element;
|
28 |
+
switch (type) {
|
29 |
+
case "url":
|
30 |
+
case "text":
|
31 |
+
this.params[name].value = element.value;
|
32 |
+
element.onchange = delegate(this.params[name], function()
|
33 |
+
{
|
34 |
+
this.value = this.element.value;
|
35 |
+
generator.updatePlayer();
|
36 |
+
});
|
37 |
+
break;
|
38 |
+
case "color":
|
39 |
+
this.params[name].value = element.value.replace(/#/, '');
|
40 |
+
element.onchange = delegate(this.params[name], function()
|
41 |
+
{
|
42 |
+
this.value = this.element.value;
|
43 |
+
generator.updatePlayer();
|
44 |
+
});
|
45 |
+
break;
|
46 |
+
break;
|
47 |
+
case "int":
|
48 |
+
this.params[name].value = Number(element.value);
|
49 |
+
element.onchange = delegate(this.params[name], function()
|
50 |
+
{
|
51 |
+
this.value = Number(this.element.value);
|
52 |
+
generator.updatePlayer();
|
53 |
+
});
|
54 |
+
break;
|
55 |
+
case "bool":
|
56 |
+
this.params[name].value = element.value; // (element.value == "on")?1:0;
|
57 |
+
element.onchange = delegate(this.params[name], function()
|
58 |
+
{
|
59 |
+
this.value = this.element.value; // (this.element.value == "on")?1:0;
|
60 |
+
generator.updatePlayer();
|
61 |
+
});
|
62 |
+
break;
|
63 |
+
}
|
64 |
+
};
|
65 |
+
generator.updatePlayer = function()
|
66 |
+
{
|
67 |
+
var out = '<object type="application/x-shockwave-flash" data="'+this.player+'" width="'+this.params.width.value+'" height="'+this.params.height.value+'">'+"\n";
|
68 |
+
out += ' <param name="movie" value="'+this.player+'" />'+"\n";
|
69 |
+
if (this.params.bgcolor) {
|
70 |
+
out += ' <param name="bgcolor" value="#'+this.params.bgcolor.value.replace(/#/, '')+'" />'+"\n";
|
71 |
+
}
|
72 |
+
out += ' <param name="FlashVars" value="';
|
73 |
+
|
74 |
+
var separator = '';
|
75 |
+
for (var i in this.params) {
|
76 |
+
if (this.params[i].value != this.params[i].defaultValue && this.params[i].value != '' ) {
|
77 |
+
if (this.params[i].type == "url") {
|
78 |
+
out += separator + i + '=' + escape(this.params[i].value);
|
79 |
+
}
|
80 |
+
else if(this.params[i].type == "color") {
|
81 |
+
out += separator + i + '=' + this.params[i].value.replace(/#/, '');
|
82 |
+
}
|
83 |
+
else {
|
84 |
+
out += separator + i + '=' + escapeHTML(this.params[i].value);
|
85 |
+
}
|
86 |
+
separator = '&';
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
out += '" />'+"\n";
|
91 |
+
out += '</object>';
|
92 |
+
|
93 |
+
var player = document.getElementById("player_preview");
|
94 |
+
player.innerHTML = out;
|
95 |
+
};
|
96 |
+
|
97 |
+
var params = new Object();
|
98 |
+
|
99 |
+
/* =============== UTILS =============== */
|
100 |
+
var delegate = function(pTarget, pFunction)
|
101 |
+
{
|
102 |
+
var f = function(){
|
103 |
+
arguments.callee.func.apply(arguments.callee.target, arguments);
|
104 |
+
};
|
105 |
+
f.target = pTarget;
|
106 |
+
f.func = pFunction;
|
107 |
+
return f;
|
108 |
+
}
|
109 |
+
var escapeHTML = function(str) {
|
110 |
+
str = String(str);
|
111 |
+
str = str.replace(/&/gi, '');
|
112 |
+
|
113 |
+
var div = document.createElement("div");
|
114 |
+
var text = document.createTextNode('');
|
115 |
+
div.appendChild(text);
|
116 |
+
text.data = str;
|
117 |
+
|
118 |
+
var result = div.innerHTML;
|
119 |
+
result = result.replace(/"/gi, '"');
|
120 |
+
|
121 |
+
return result;
|
122 |
+
}
|
123 |
+
var findPosX = function (obj)
|
124 |
+
{
|
125 |
+
var curleft = 0;
|
126 |
+
do {
|
127 |
+
curleft += obj.offsetLeft || 0;
|
128 |
+
obj = obj.offsetParent;
|
129 |
+
} while (obj);
|
130 |
+
return curleft;
|
131 |
+
};
|
132 |
+
var findPosY = function (obj)
|
133 |
+
{
|
134 |
+
var curtop = 0;
|
135 |
+
do {
|
136 |
+
curtop += obj.offsetTop || 0;
|
137 |
+
obj = obj.offsetParent;
|
138 |
+
} while (obj);
|
139 |
+
return curtop;
|
140 |
+
};
|
141 |
+
var twoChar = function (str)
|
142 |
+
{
|
143 |
+
if (str.length == 1) {
|
144 |
+
return "0" + str;
|
145 |
+
}
|
146 |
+
return str;
|
147 |
+
};
|
audio-player.swf
ADDED
Binary file
|
audioplay.swf
ADDED
Binary file
|
buttons/classic/pausedown.png
ADDED
Binary file
|
buttons/classic/pauseover.png
ADDED
Binary file
|
buttons/classic/pauseup.png
ADDED
Binary file
|
buttons/classic/playdown.png
ADDED
Binary file
|
buttons/classic/playover.png
ADDED
Binary file
|
buttons/classic/playup.png
ADDED
Binary file
|
buttons/classic/stopdown.png
ADDED
Binary file
|
buttons/classic/stopover.png
ADDED
Binary file
|
buttons/classic/stopup.png
ADDED
Binary file
|
buttons/classic_small/pausedown.png
ADDED
Binary file
|
buttons/classic_small/pauseover.png
ADDED
Binary file
|
buttons/classic_small/pauseup.png
ADDED
Binary file
|
buttons/classic_small/playdown.png
ADDED
Binary file
|
buttons/classic_small/playover.png
ADDED
Binary file
|
buttons/classic_small/playup.png
ADDED
Binary file
|
buttons/classic_small/stopdown.png
ADDED
Binary file
|
buttons/classic_small/stopover.png
ADDED
Binary file
|
buttons/classic_small/stopup.png
ADDED
Binary file
|
buttons/negative/pausedown.png
ADDED
Binary file
|
buttons/negative/pauseover.png
ADDED
Binary file
|
buttons/negative/pauseup.png
ADDED
Binary file
|
buttons/negative/playdown.png
ADDED
Binary file
|
buttons/negative/playover.png
ADDED
Binary file
|
buttons/negative/playup.png
ADDED
Binary file
|
buttons/negative/stopdown.png
ADDED
Binary file
|
buttons/negative/stopover.png
ADDED
Binary file
|
buttons/negative/stopup.png
ADDED
Binary file
|
buttons/negative_small/pausedown.png
ADDED
Binary file
|
buttons/negative_small/pauseover.png
ADDED
Binary file
|
buttons/negative_small/pauseup.png
ADDED
Binary file
|
buttons/negative_small/playdown.png
ADDED
Binary file
|
buttons/negative_small/playover.png
ADDED
Binary file
|
buttons/negative_small/playup.png
ADDED
Binary file
|
buttons/negative_small/stopdown.png
ADDED
Binary file
|
buttons/negative_small/stopover.png
ADDED
Binary file
|
buttons/negative_small/stopup.png
ADDED
Binary file
|
css/admin.css
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* admin.css */
|
2 |
+
|
3 |
+
.powerpress-notice {
|
4 |
+
margin-top: 10px;
|
5 |
+
margin-bottom: 10px;
|
6 |
+
line-height: 29px;
|
7 |
+
font-size: 12px;
|
8 |
+
border-width: 1px;
|
9 |
+
border-style: solid;
|
10 |
+
font-weight: bold;
|
11 |
+
}
|
12 |
+
.powerpress-error {
|
13 |
+
margin-top: 10px;
|
14 |
+
margin-bottom: 10px;
|
15 |
+
line-height: 29px;
|
16 |
+
font-size: 12px;
|
17 |
+
border-width: 1px;
|
18 |
+
border-style: solid;
|
19 |
+
font-weight: bold;
|
20 |
+
}
|
21 |
+
#powerpress_settings {
|
22 |
+
background-image:url(http://images.blubrry.com/powerpress/blubrry_logo.png);
|
23 |
+
background-repeat: no-repeat;
|
24 |
+
background-position: bottom right;
|
25 |
+
}
|
26 |
+
|
27 |
+
#powerpress_settings ul li ul {
|
28 |
+
list-style: disc;
|
29 |
+
}
|
30 |
+
#powerpress_settings ul li ul li {
|
31 |
+
margin-left: 50px;
|
32 |
+
font-size: 90%;
|
33 |
+
}
|
34 |
+
#powerpress_settings label {
|
35 |
+
font-size: 120%;
|
36 |
+
}
|
37 |
+
.bpp_input_sm {
|
38 |
+
width: 120px;
|
39 |
+
}
|
40 |
+
.bpp_input_med {
|
41 |
+
width: 250px;
|
42 |
+
}
|
43 |
+
.powerpress_color_box {
|
44 |
+
float: left;
|
45 |
+
width: 16px;
|
46 |
+
height: 16px;
|
47 |
+
cursor: pointer;
|
48 |
+
margin: 4px 1px;
|
49 |
+
border: 1px solid #666666;
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
.powerpress_tabbed_content > ul {
|
54 |
+
margin-left:10px;
|
55 |
+
position:relative;
|
56 |
+
top:1px;
|
57 |
+
z-index:100;
|
58 |
+
}
|
59 |
+
|
60 |
+
.powerpress_tabbed_content > ul li { list-style:none; float:left; margin-bottom:0;}
|
61 |
+
.powerpress_tabbed_content > ul a {
|
62 |
+
text-decoration:none;
|
63 |
+
-moz-border-radius-bottomleft:0;
|
64 |
+
-moz-border-radius-bottomright:0;
|
65 |
+
-moz-border-radius-topleft:3px;
|
66 |
+
-moz-border-radius-topright:3px;
|
67 |
+
border-style:solid;
|
68 |
+
border-width:1px;
|
69 |
+
cursor:pointer;
|
70 |
+
display:block;
|
71 |
+
height:18px;
|
72 |
+
margin:5px 5px 0 0;
|
73 |
+
padding:4px 5px 2px;
|
74 |
+
background-color:#F1F1F1;
|
75 |
+
border-color:#DFDFDF;
|
76 |
+
color:#999999;
|
77 |
+
|
78 |
+
}
|
79 |
+
.powerpress_tabbed_content ul a:hover {
|
80 |
+
}
|
81 |
+
|
82 |
+
.powerpress_tabbed_content ul .ui-tabs-selected a {
|
83 |
+
background-color:#FFFFFF;
|
84 |
+
border-bottom:0 none;
|
85 |
+
color:#333333;
|
86 |
+
cursor:default;
|
87 |
+
padding-bottom:3px;
|
88 |
+
}
|
89 |
+
|
90 |
+
.powerpress_tabbed_content > div {
|
91 |
+
padding: 0px 10px 10px 10px;
|
92 |
+
*padding-top:3px;
|
93 |
+
*margin-top:-15px;
|
94 |
+
clear:left;
|
95 |
+
}
|
96 |
+
.powerpress_tabbed_content .wrap {
|
97 |
+
padding:0;
|
98 |
+
}
|
99 |
+
|
100 |
+
.powerpress_tab {
|
101 |
+
-moz-border-radius-bottomleft:0;
|
102 |
+
-moz-border-radius-bottomright:0;
|
103 |
+
-moz-border-radius-topleft:6px;
|
104 |
+
-moz-border-radius-topright:6px;
|
105 |
+
background: #FFF;
|
106 |
+
border-collapse:separate;
|
107 |
+
border-style:solid;
|
108 |
+
border-width:1px;
|
109 |
+
border-color:#DFDFDF;
|
110 |
+
padding-bottom: 15px;
|
111 |
+
}
|
112 |
+
.powerpress_tab .form-table {
|
113 |
+
margin-top: 0;
|
114 |
+
margin-bottom: 0;
|
115 |
+
}
|
116 |
+
|
117 |
+
.powerpress_tab .form-table td {
|
118 |
+
margin-bottom: 4px;
|
119 |
+
padding: 4px 10px 4px;
|
120 |
+
line-height: 20px;
|
121 |
+
font-size: 11px;
|
122 |
+
}
|
123 |
+
|
124 |
+
#powerpress_support {
|
125 |
+
|
126 |
+
}
|
127 |
+
#powerpress_support li {
|
128 |
+
margin-left: 70px;
|
129 |
+
list-style-type:disc;
|
130 |
+
margin-top: 0;
|
131 |
+
margin-bottom: 0;
|
132 |
+
}
|
images/color_preview.gif
ADDED
Binary file
|
mp3info.class.php
CHANGED
@@ -6,10 +6,10 @@
|
|
6 |
// for efficienccy
|
7 |
|
8 |
class Mp3Info {
|
9 |
-
//var $m_DownloadBytesLimit = 1638400; //
|
10 |
-
//var $m_DownloadBytesLimit = 204800; //
|
11 |
-
var $m_DownloadBytesLimit = 327680; //
|
12 |
-
//var $m_DownloadBytesLimit = 409600; //
|
13 |
var $m_RedirectLimit = 12; // Number of times to do the 302 redirect
|
14 |
var $m_UserAgent = 'Blubrry PowerPress';
|
15 |
var $m_error = '';
|
@@ -110,7 +110,7 @@
|
|
110 |
// The following code relies on fopen_url capability.
|
111 |
if( $RedirectCount > $this->m_RedirectLimit )
|
112 |
{
|
113 |
-
$this->SetError( '
|
114 |
return false;
|
115 |
}
|
116 |
|
@@ -263,7 +263,7 @@
|
|
263 |
{
|
264 |
if( $RedirectCount > $this->m_RedirectLimit )
|
265 |
{
|
266 |
-
$this->SetError( '
|
267 |
return false;
|
268 |
}
|
269 |
$this->m_RedirectCount = $RedirectCount;
|
@@ -305,7 +305,7 @@
|
|
305 |
case 307: {
|
306 |
if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
|
307 |
{
|
308 |
-
$this->SetError( '
|
309 |
}
|
310 |
else
|
311 |
{
|
6 |
// for efficienccy
|
7 |
|
8 |
class Mp3Info {
|
9 |
+
//var $m_DownloadBytesLimit = 1638400; // 1600K (1600*1024) bytes file
|
10 |
+
//var $m_DownloadBytesLimit = 204800; // 200K (200*1024) bytes file
|
11 |
+
var $m_DownloadBytesLimit = 327680; // 320K (320*1024) bytes file
|
12 |
+
//var $m_DownloadBytesLimit = 409600; // 400K (400*1024) bytes file
|
13 |
var $m_RedirectLimit = 12; // Number of times to do the 302 redirect
|
14 |
var $m_UserAgent = 'Blubrry PowerPress';
|
15 |
var $m_error = '';
|
110 |
// The following code relies on fopen_url capability.
|
111 |
if( $RedirectCount > $this->m_RedirectLimit )
|
112 |
{
|
113 |
+
$this->SetError( 'Media URL exceeded redirect limit of '.$this->m_RedirectLimit .' (fopen).' );
|
114 |
return false;
|
115 |
}
|
116 |
|
263 |
{
|
264 |
if( $RedirectCount > $this->m_RedirectLimit )
|
265 |
{
|
266 |
+
$this->SetError( 'Media URL exceeded redirect limit of '.$this->m_RedirectLimit .' (cURL in safe mode).' );
|
267 |
return false;
|
268 |
}
|
269 |
$this->m_RedirectCount = $RedirectCount;
|
305 |
case 307: {
|
306 |
if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
|
307 |
{
|
308 |
+
$this->SetError( 'Media URL exceeded redirect limit of '.$this->m_RedirectLimit .' (cURL).' );
|
309 |
}
|
310 |
else
|
311 |
{
|
player.js
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
@width - width of player
|
29 |
@height - height of player
|
30 |
*/
|
31 |
-
function powerpress_embed_quicktime(div,media_url,width,height)
|
32 |
{
|
33 |
if( document.getElementById(div) )
|
34 |
{
|
@@ -48,11 +48,11 @@ function powerpress_embed_quicktime(div,media_url,width,height)
|
|
48 |
Html += '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+ width +'" height="'+ height +'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n';
|
49 |
Html += ' <param name="src" value="'+ media_url +'" />\n';
|
50 |
Html += ' <param name="href" value="'+ media_url +'" />\n';
|
51 |
-
Html += ' <param name="scale" value="
|
52 |
Html += ' <param name="controller" value="true" />\n';
|
53 |
Html += ' <param name="autoplay" value="true" />\n';
|
54 |
Html += ' <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />\n';
|
55 |
-
Html += ' <embed type="'+ contentType +'" src="'+ media_url +'" width="'+ width +'" height="'+ height +'" scale="
|
56 |
Html += '</object>\n';
|
57 |
document.getElementById(div).innerHTML = Html;
|
58 |
return false; // stop the default link from proceeding
|
28 |
@width - width of player
|
29 |
@height - height of player
|
30 |
*/
|
31 |
+
function powerpress_embed_quicktime(div,media_url,width,height,scale)
|
32 |
{
|
33 |
if( document.getElementById(div) )
|
34 |
{
|
48 |
Html += '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+ width +'" height="'+ height +'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n';
|
49 |
Html += ' <param name="src" value="'+ media_url +'" />\n';
|
50 |
Html += ' <param name="href" value="'+ media_url +'" />\n';
|
51 |
+
Html += ' <param name="scale" value="'+ scale +'" />\n';
|
52 |
Html += ' <param name="controller" value="true" />\n';
|
53 |
Html += ' <param name="autoplay" value="true" />\n';
|
54 |
Html += ' <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />\n';
|
55 |
+
Html += ' <embed type="'+ contentType +'" src="'+ media_url +'" width="'+ width +'" height="'+ height +'" scale="'+ scale +'" correction="full" cache="true" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></embed>';
|
56 |
Html += '</object>\n';
|
57 |
document.getElementById(div).innerHTML = Html;
|
58 |
return false; // stop the default link from proceeding
|
player_mp3_maxi.swf
ADDED
Binary file
|
powerpress-feed-auth.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// powerpress-feed-auth.php
|
3 |
+
|
4 |
+
function powerpress_feed_auth($feed_slug)
|
5 |
+
{
|
6 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
7 |
+
|
8 |
+
if( !isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) )
|
9 |
+
powerpress_feed_auth_basic( $FeedSettings['title'] );
|
10 |
+
|
11 |
+
$user = $_SERVER['PHP_AUTH_USER'];
|
12 |
+
$password = $_SERVER['PHP_AUTH_PW'];
|
13 |
+
|
14 |
+
$user = wp_authenticate($user, $password);
|
15 |
+
|
16 |
+
if( !is_wp_error($user) )
|
17 |
+
{
|
18 |
+
// Check capability...
|
19 |
+
if( $user->has_cap( $FeedSettings['premium'] ) )
|
20 |
+
return; // Nice, let us continue...
|
21 |
+
|
22 |
+
powerpress_feed_auth_basic( $FeedSettings['title'], __('Access Denied') );
|
23 |
+
}
|
24 |
+
|
25 |
+
// user authenticated here
|
26 |
+
powerpress_feed_auth_basic( $FeedSettings['title'], __('Authorization Failed') );
|
27 |
+
}
|
28 |
+
|
29 |
+
function powerpress_feed_auth_basic($realm_name, $error = false )
|
30 |
+
{
|
31 |
+
if( !$error )
|
32 |
+
$error = __('Unauthorized');
|
33 |
+
header('HTTP/1.0 401 Unauthorized');
|
34 |
+
header('WWW-Authenticate: Basic realm="'. str_replace('"', '', $realm_name).'"');
|
35 |
+
|
36 |
+
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">';
|
37 |
+
echo "\n";
|
38 |
+
?>
|
39 |
+
<html>
|
40 |
+
<head>
|
41 |
+
<title><?php echo $error; ?></title>
|
42 |
+
</head>
|
43 |
+
<body>
|
44 |
+
<p><?php echo $error; ?></p>
|
45 |
+
</body>
|
46 |
+
</html>
|
47 |
+
<?php
|
48 |
+
exit;
|
49 |
+
}
|
50 |
+
|
51 |
+
?>
|
powerpress-player.php
ADDED
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
PowerPress player options
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Let PowerPress know that the powerpress_player filter event will be handeled
|
7 |
+
if( !defined('POWERPRESS_PLAYER') )
|
8 |
+
define('POWERPRESS_PLAYER', true);
|
9 |
+
|
10 |
+
if( !defined('PHP_EOL') )
|
11 |
+
define('PHP_EOL', "\n"); // We need this variable defined for new lines.
|
12 |
+
|
13 |
+
function powerpressplayer_get_root_url()
|
14 |
+
{
|
15 |
+
return WP_PLUGIN_URL . '/'. basename( dirname(__FILE__) ) .'/';
|
16 |
+
}
|
17 |
+
|
18 |
+
function powerpressplayer_filter($content, $media_url, $ExtraData = array())
|
19 |
+
{
|
20 |
+
$Settings = get_option('powerpress_general');
|
21 |
+
// Check if we are using a custom flash player...
|
22 |
+
if( !isset($Settings['player']) || $Settings['player'] == 'default' ) // Either the default player is selected or the user never selected a player
|
23 |
+
return $content;
|
24 |
+
|
25 |
+
// Next check that we're working with an mp3
|
26 |
+
$parts = pathinfo($media_url);
|
27 |
+
if( $parts['extension'] != 'mp3' && $EpisdoeData['type'] != 'audio/mpeg' ) // we just need condition one to be false
|
28 |
+
return $content; // We're apparently not working with an mp3
|
29 |
+
|
30 |
+
$player_content = powerpressplayer_build( $media_url, $Settings, $ExtraData );
|
31 |
+
return $content . $player_content;
|
32 |
+
}
|
33 |
+
|
34 |
+
function powerpressplayer_build($media_url, $Settings, $ExtraData = array())
|
35 |
+
{
|
36 |
+
global $g_powerpress_player_id; // Use the global unique player id variable for the surrounding div
|
37 |
+
if( !isset($g_powerpress_player_id) )
|
38 |
+
$g_powerpress_player_id = rand(0, 10000);
|
39 |
+
$g_powerpress_player_id++; // increment the player id for the next div so it is unique
|
40 |
+
$content = '';
|
41 |
+
$autoplay = false;
|
42 |
+
if( isset($ExtraData['autoplay']) && $ExtraData['autoplay'] )
|
43 |
+
$autoplay = true; // TODO: We need to handle this
|
44 |
+
|
45 |
+
switch( $Settings['player'] )
|
46 |
+
{
|
47 |
+
case 'audio-player': {
|
48 |
+
|
49 |
+
$PlayerSettings = get_option('powerpress_audio-player');
|
50 |
+
|
51 |
+
if($PlayerSettings == ""):
|
52 |
+
$PlayerSettings = array(
|
53 |
+
'width'=>'290',
|
54 |
+
'transparentpagebg' => 'yes',
|
55 |
+
'lefticon' => '#333333',
|
56 |
+
'leftbg' => '#CCCCCC',
|
57 |
+
'bg' => '#E5E5E5',
|
58 |
+
'voltrack' => '#F2F2F2',
|
59 |
+
'volslider' => '#666666',
|
60 |
+
'rightbg' => '#B4B4B4',
|
61 |
+
'rightbghover' => '#999999',
|
62 |
+
'righticon' => '#333333',
|
63 |
+
'righticonhover' => '#FFFFFF',
|
64 |
+
'loader' => '#009900',
|
65 |
+
'track' => '#FFFFFF',
|
66 |
+
'tracker' => '#DDDDDD',
|
67 |
+
'border' => '#CCCCCC',
|
68 |
+
'skip' => '#666666',
|
69 |
+
'text' => '#333333',
|
70 |
+
'pagebg' => '',
|
71 |
+
'noinfo'=>'yes',
|
72 |
+
'rtl' => 'no'
|
73 |
+
);
|
74 |
+
endif;
|
75 |
+
|
76 |
+
//$PlayerSettings['noinfo'] = 'yes';
|
77 |
+
if( $PlayerSettings['titles'] == '' )
|
78 |
+
$PlayerSettings['titles'] = 'Blubrry PowerPress';
|
79 |
+
|
80 |
+
$keys = array_keys($PlayerSettings);
|
81 |
+
$flashvars ='';
|
82 |
+
foreach ($keys as $key) {
|
83 |
+
if($PlayerSettings[$key] != "") {
|
84 |
+
$flashvars .= '&'. $key .'='. preg_replace('/\#/','',$PlayerSettings[$key]);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
if( $autoplay )
|
89 |
+
{
|
90 |
+
$flashvars .= '&autostart=yes';
|
91 |
+
}
|
92 |
+
|
93 |
+
if($PlayerSettings['pagebg'] != ""){
|
94 |
+
$transparency = '<param name="bgcolor" value="'.$PlayerSettings['pagebg'].'" />';
|
95 |
+
$PlayerSettings['transparentpagebg'] = "no";
|
96 |
+
$flashvars .= '&transparentpagebg=no';
|
97 |
+
$flashvars .= '&pagebg='.$PlayerSettings['pagebg'];
|
98 |
+
}
|
99 |
+
else {
|
100 |
+
$PlayerSettings['transparentpagebg'] = "yes";
|
101 |
+
$transparency = '<param name="wmode" value="transparent" />';
|
102 |
+
$flashvars .= '&transparentpagebg=yes';
|
103 |
+
}
|
104 |
+
// TODO: Add audio-player player here
|
105 |
+
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
|
106 |
+
$content .= '<script language="JavaScript" src="'.powerpressplayer_get_root_url().'audio-player.js"></script>'.PHP_EOL;
|
107 |
+
$content .= '<object type="application/x-shockwave-flash" data="'.powerpressplayer_get_root_url().'audio-player.swf" id="'.$g_powerpress_player_id.'" height="24" width="290">'.PHP_EOL;
|
108 |
+
$content .= '<param name="movie" value="'.powerpressplayer_get_root_url().'/audio-player.swf">'.PHP_EOL;
|
109 |
+
$content .= '<param name="FlashVars" value="playerID='.$g_powerpress_player_id.'&soundFile='.$media_url.$flashvars.'">'.PHP_EOL;
|
110 |
+
$content .= '<param name="quality" value="high">'.PHP_EOL;
|
111 |
+
$content .= '<param name="menu" value="false">'.PHP_EOL;
|
112 |
+
$content .= '<param name="wmode" value="transparent">'.PHP_EOL;
|
113 |
+
$content .= '</object>'.PHP_EOL;
|
114 |
+
$content .= '</div>'.PHP_EOL;
|
115 |
+
|
116 |
+
}; break;
|
117 |
+
case 'flashmp3-maxi': {
|
118 |
+
|
119 |
+
$PlayerSettings = get_option('powerpress_flashmp3-maxi');
|
120 |
+
$keys = array('bgcolor1','bgcolor2','bgcolor','textcolor','buttoncolor','buttonovercolor','showstop','showinfo','showvolume','height','width','showloading','buttonwidth','volume','showslider');
|
121 |
+
|
122 |
+
//set PlayerSettings as blank array for initial setup
|
123 |
+
//This keeps the foreach loop from returning an error
|
124 |
+
if($PlayerSettings == ""){
|
125 |
+
$PlayerSettings = array(
|
126 |
+
'bgcolor1'=>'#7c7c7c',
|
127 |
+
'bgcolor2'=>'#333333',
|
128 |
+
'textcolor' => '#FFFFFF',
|
129 |
+
'buttoncolor' => '#FFFFFF',
|
130 |
+
'buttonovercolor' => '#FFFF00',
|
131 |
+
'showstop' => '0',
|
132 |
+
'showinfo' => '0',
|
133 |
+
'showvolume' => '1',
|
134 |
+
'height' => '20',
|
135 |
+
'width' => '200',
|
136 |
+
'showloading' => 'autohide',
|
137 |
+
'buttonwidth' => '26',
|
138 |
+
'volume' => '100',
|
139 |
+
'showslider' => '1',
|
140 |
+
'slidercolor1'=>'#cccccc',
|
141 |
+
'slidercolor2'=>'#888888',
|
142 |
+
'sliderheight' => '10',
|
143 |
+
'sliderwidth' => '20',
|
144 |
+
'loadingcolor' => '#FFFF00',
|
145 |
+
'volumeheight' => '6',
|
146 |
+
'volumewidth' => '30',
|
147 |
+
'sliderovercolor' => '#eeee00'
|
148 |
+
);
|
149 |
+
}
|
150 |
+
|
151 |
+
$flashvars = '';
|
152 |
+
$flashvars .= "mp3=" . $media_url;
|
153 |
+
if( $autoplay )
|
154 |
+
$flashvars .= '&autoplay=1';
|
155 |
+
|
156 |
+
//set non-blank options without dependencies as flash variables for preview
|
157 |
+
foreach($keys as $key) {
|
158 |
+
if($PlayerSettings[$key] != "") {
|
159 |
+
$flashvars .= '&'. $key .'='. preg_replace('/\#/','',$PlayerSettings[''.$key.'']);
|
160 |
+
}
|
161 |
+
}
|
162 |
+
//set slider dependencies
|
163 |
+
if($PlayerSettings['showslider'] != "0") {
|
164 |
+
if($PlayerSettings['sliderheight'] != "") {
|
165 |
+
$flashvars .= '&sliderheight='. $PlayerSettings['sliderheight'];
|
166 |
+
}
|
167 |
+
if($PlayerSettings['sliderwidth'] != "") {
|
168 |
+
$flashvars .= '&sliderwidth='. $PlayerSettings['sliderwidth'];
|
169 |
+
}
|
170 |
+
if($PlayerSettings['sliderovercolor'] != ""){
|
171 |
+
$flashvars .= '&sliderovercolor='. preg_replace('/\#/','',$PlayerSettings['sliderovercolor']);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
//set volume dependencies
|
175 |
+
if($PlayerSettings['showvolume'] != "0") {
|
176 |
+
if($PlayerSettings['volumeheight'] != "") {
|
177 |
+
$flashvars .= '&volumeheight='. $PlayerSettings['volumeheight'];
|
178 |
+
}
|
179 |
+
if($PlayerSettings['volumewidth'] != "") {
|
180 |
+
$flashvars .= '&volumewidth='. $PlayerSettings['volumewidth'];
|
181 |
+
}
|
182 |
+
}
|
183 |
+
//set autoload dependencies
|
184 |
+
if($PlayerSettings['showloading'] != "never") {
|
185 |
+
if($PlayerSettings['loadingcolor'] != "") {
|
186 |
+
$flashvars .= '&loadingcolor='. preg_replace('/\#/','',$PlayerSettings['loadingcolor']);
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
|
191 |
+
//set default width for object
|
192 |
+
if($PlayerSettings['width'] == ""){
|
193 |
+
$width = "200";
|
194 |
+
}else{
|
195 |
+
$width = $PlayerSettings['width'];
|
196 |
+
}
|
197 |
+
if($PlayerSettings['height'] == ""){
|
198 |
+
$height = "20";
|
199 |
+
}else{
|
200 |
+
$height = $PlayerSettings['height'];
|
201 |
+
}
|
202 |
+
|
203 |
+
//set background transparency
|
204 |
+
if($PlayerSettings['bgcolor'] != ""){
|
205 |
+
$transparency = '<param name="bgcolor" value="'. $color7 .'" />';
|
206 |
+
}else{
|
207 |
+
$transparency = '<param name="wmode" value="transparent" />';
|
208 |
+
}
|
209 |
+
|
210 |
+
//set flashvars
|
211 |
+
if($flashvars != ""){
|
212 |
+
$flashvars= '<param name="FlashVars" value="'. $flashvars .'" />'.PHP_EOL;
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
|
217 |
+
// TODO: Add flashmp3-maxi player here
|
218 |
+
$content = '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'"></div>'.PHP_EOL;
|
219 |
+
$content .= '<object type="application/x-shockwave-flash" data="'. powerpressplayer_get_root_url().'player_mp3_maxi.swf" id="'.$g_powerpress_player_id.'" width="'. $width.'" height="'. $height .'">'.PHP_EOL;
|
220 |
+
$content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'player_mp3_maxi.swf" />'.PHP_EOL;
|
221 |
+
$content .= $transparency.PHP_EOL;
|
222 |
+
$content .= $flashvars;
|
223 |
+
$content .= '</object>'.PHP_EOL;
|
224 |
+
$content .= '</div>'.PHP_EOL;
|
225 |
+
|
226 |
+
|
227 |
+
}; break;
|
228 |
+
case 'audioplay' : {
|
229 |
+
|
230 |
+
$PlayerSettings = get_option('powerpress_audioplay');
|
231 |
+
if($PlayerSettings == "") {
|
232 |
+
$PlayerSettings = array(
|
233 |
+
'bgcolor' => '',
|
234 |
+
'buttondir' => 'negative',
|
235 |
+
'mode' => 'playpause'
|
236 |
+
);
|
237 |
+
}
|
238 |
+
|
239 |
+
$width = $height = (strstr($PlayerSettings['buttondir'], 'small')===false?30:15);
|
240 |
+
|
241 |
+
// Set standard variables for player
|
242 |
+
$flashvars = 'file=http://';
|
243 |
+
$flashvars .= '&repeat=1';
|
244 |
+
if( $autoplay )
|
245 |
+
$flashvars .= '&auto=yes';
|
246 |
+
|
247 |
+
if($PlayerSettings['bgcolor'] == ""){
|
248 |
+
$flashvars .= "&usebgcolor=no";
|
249 |
+
$transparency = '<param name="wmode" value="transparent" />';
|
250 |
+
$htmlbg = "";
|
251 |
+
}
|
252 |
+
else{
|
253 |
+
$flashvars .= "&bgcolor=". preg_replace('/\#/','0x',$PlayerSettings['bgcolor']);
|
254 |
+
$transparency = '<param name="bgcolor" value="'. $PlayerSettings['bgcolor']. '" />';
|
255 |
+
$htmlbg = 'bgcolor="'. $PlayerSettings['bgcolor'].'"';
|
256 |
+
|
257 |
+
}
|
258 |
+
|
259 |
+
if($PlayerSettings['buttondir'] == "") {
|
260 |
+
$flashvars .= "&buttondir=".powerpressplayer_get_root_url()."buttons/negative";
|
261 |
+
}else{
|
262 |
+
$flashvars .= "&buttondir=".powerpressplayer_get_root_url().'buttons/'.$PlayerSettings['buttondir'];
|
263 |
+
|
264 |
+
}
|
265 |
+
|
266 |
+
$flashvars .= '&mode='. $PlayerSettings['mode'];
|
267 |
+
|
268 |
+
// TODO: Add audioplay player here
|
269 |
+
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
|
270 |
+
$content .= '<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" id="'.$g_powerpress_player_id.'" data="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'">'.PHP_EOL;
|
271 |
+
$content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'" />'.PHP_EOL;
|
272 |
+
$content .= '<param name="quality" value="high" />'.PHP_EOL;
|
273 |
+
$content .= $transparency.PHP_EOL;
|
274 |
+
$content .= '<param name="FlashVars" value="'.$flashvars.'" />'.PHP_EOL;
|
275 |
+
$content .= '<embed src="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'" quality="high" width="30" height="30" type="application/x-shockwave-flash">'.PHP_EOL;
|
276 |
+
$content .= "</embed>\n </object>\n";
|
277 |
+
$content .= "</div>\n";
|
278 |
+
|
279 |
+
}; break;
|
280 |
+
case 'simple_flash' : {
|
281 |
+
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
|
282 |
+
$content .= '<object type="application/x-shockwave-flash" data="'. powerpressplayer_get_root_url() .'simple_mp3.swf" id="'.$g_powerpress_player_id.'" width="150" height="50">';
|
283 |
+
$content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'simple_mp3.swf" />';
|
284 |
+
$content .= '<param name="wmode" value="transparent" />';
|
285 |
+
$content .= '<param name="FlashVars" value="'. get_bloginfo('home') .'?url='. $media_url.'&autostart='. ($autostart?'true':'false') .'" />';
|
286 |
+
$content .= '<param name="quality" value="high" />';
|
287 |
+
$content .= '<embed wmode="transparent" src="'. get_bloginfo('home') .'?url='.$media_url.'&autostart='. ($autostart?'true':'false') .'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="50"></embed>';
|
288 |
+
$content .= '</object>';
|
289 |
+
$content .= "</div>\n";
|
290 |
+
}; break;
|
291 |
+
// Let all other cases fall through...
|
292 |
+
}
|
293 |
+
|
294 |
+
return $content;
|
295 |
+
}
|
296 |
+
|
297 |
+
// Hook into the powerprss_player filter
|
298 |
+
add_filter('powerpress_player', 'powerpressplayer_filter', 10, 3);
|
299 |
+
|
300 |
+
//if( is_admin() )
|
301 |
+
// require_once(dirname(__FILE__).'/powerpressadmin-player.php');
|
302 |
+
|
303 |
+
?>
|
powerpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://www.blubrry.com/powerpress/
|
5 |
Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
|
6 |
-
Version: 0.
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
@@ -33,7 +33,7 @@ if( !function_exists('add_action') )
|
|
33 |
die("access denied.");
|
34 |
|
35 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
36 |
-
define('POWERPRESS_VERSION', '0.
|
37 |
|
38 |
/////////////////////////////////////////////////////
|
39 |
// The following define options should be placed in your
|
@@ -93,6 +93,18 @@ function powerpress_content($content)
|
|
93 |
return $content;
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
// Problem: If the_excerpt is used instead of the_content, both the_exerpt and the_content will be called here.
|
97 |
// Important to note, get_the_excerpt will be called before the_content is called, so we add a simple little hack
|
98 |
if( current_filter() == 'get_the_excerpt' )
|
@@ -105,8 +117,7 @@ function powerpress_content($content)
|
|
105 |
return $content; // We don't want to do anything to this excerpt content in this call either...
|
106 |
}
|
107 |
|
108 |
-
|
109 |
-
$GeneralSettings = get_option('powerpress_general');
|
110 |
if( !isset($GeneralSettings['custom_feeds']) )
|
111 |
$GeneralSettings['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
|
112 |
|
@@ -139,6 +150,9 @@ function powerpress_content($content)
|
|
139 |
$ExcludePlayers = array();
|
140 |
if( isset($GeneralSettings['disable_player']) )
|
141 |
$ExcludePlayers = $GeneralSettings['disable_player']; // automatically disable the players configured
|
|
|
|
|
|
|
142 |
|
143 |
if( preg_match_all('/(.?)\[(powerpress)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s', $content, $matches) )
|
144 |
{
|
@@ -186,15 +200,22 @@ function powerpress_content($content)
|
|
186 |
//if( preg_match('/\[powerpress(.*)\]/is', $content) == 0 )
|
187 |
if( !isset($ExcludePlayers[ $feed_slug ]) ) // If the player is not in our exclude list because it's already in the post body somewhere...
|
188 |
{
|
189 |
-
if( $GeneralSettings['
|
190 |
{
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
}
|
196 |
-
|
197 |
-
$new_content .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData);
|
198 |
}
|
199 |
}
|
200 |
|
@@ -204,10 +225,10 @@ function powerpress_content($content)
|
|
204 |
switch( $GeneralSettings['display_player'] )
|
205 |
{
|
206 |
case 1: { // Below posts
|
207 |
-
return $content.$new_content;
|
208 |
}; break;
|
209 |
case 2: { // Above posts
|
210 |
-
return
|
211 |
}; break;
|
212 |
}
|
213 |
return $content;
|
@@ -750,6 +771,23 @@ add_filter('option_rss_language', 'powerpress_rss_language');
|
|
750 |
function powerpress_do_podcast_feed($for_comments=false)
|
751 |
{
|
752 |
global $wp_query;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
$wp_query->get_posts();
|
754 |
do_feed_rss2($for_comments);
|
755 |
}
|
@@ -783,7 +821,10 @@ function powerpress_init()
|
|
783 |
|
784 |
if( isset($_GET['powerpress_pinw']) )
|
785 |
powerpress_do_pinw($_GET['powerpress_pinw'], @$GeneralSettings['process_podpress']);
|
786 |
-
|
|
|
|
|
|
|
787 |
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
788 |
return false; // Another podcasting plugin is enabled...
|
789 |
|
@@ -1128,6 +1169,11 @@ function powerpress_player_filter($content, $media_url, $ExtraData = array() )
|
|
1128 |
|
1129 |
switch( strtolower($parts['extension']) )
|
1130 |
{
|
|
|
|
|
|
|
|
|
|
|
1131 |
// Flash Player:
|
1132 |
case 'mp3':
|
1133 |
|
@@ -1170,6 +1216,10 @@ function powerpress_player_filter($content, $media_url, $ExtraData = array() )
|
|
1170 |
case 'qt':
|
1171 |
case 'mov': {
|
1172 |
|
|
|
|
|
|
|
|
|
1173 |
// If there is no cover image specified, lets use the default...
|
1174 |
if( $cover_image == '' )
|
1175 |
$cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
|
@@ -1178,14 +1228,14 @@ function powerpress_player_filter($content, $media_url, $ExtraData = array() )
|
|
1178 |
{
|
1179 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'"></div>'.PHP_EOL;
|
1180 |
$content .= '<script type="text/javascript">'.PHP_EOL;
|
1181 |
-
$content .= "powerpress_embed_quicktime('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height} );\n";
|
1182 |
$content .= "</script>\n";
|
1183 |
}
|
1184 |
else
|
1185 |
{
|
1186 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">'.PHP_EOL;
|
1187 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
|
1188 |
-
$content .= "return powerpress_embed_quicktime('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height} );";
|
1189 |
$content .= '">';
|
1190 |
$content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
|
1191 |
$content .= '</a>';
|
@@ -1324,6 +1374,12 @@ function powerpress_shortcode_handler( $attributes, $content = null )
|
|
1324 |
|
1325 |
if( !isset($EpisodeData['no_player']) )
|
1326 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
1327 |
$return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed, 'image'=>$image, 'type'=>$EpisodeData['type']) );
|
1328 |
$return .= powerpress_get_player_links($post->ID, $feed, $EpisodeData );
|
1329 |
}
|
@@ -1340,12 +1396,21 @@ function powerpress_shortcode_handler( $attributes, $content = null )
|
|
1340 |
continue;
|
1341 |
|
1342 |
$EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
|
|
|
|
|
|
|
1343 |
if( !$EpisodeData )
|
1344 |
continue;
|
1345 |
|
1346 |
if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
|
1347 |
$return .= $EpisodeData['embed'];
|
1348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1349 |
if( !isset($EpisodeData['no_player']) )
|
1350 |
{
|
1351 |
$return .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed_slug, 'image'=>$image, 'type'=>$EpisodeData['type']) );
|
@@ -1428,11 +1493,15 @@ body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; }
|
|
1428 |
<body>
|
1429 |
<div style="margin: 5px;">
|
1430 |
<?php
|
1431 |
-
|
1432 |
if( !$EpisodeData )
|
1433 |
{
|
1434 |
echo '<p>Unable to retrieve media information.</p>';
|
1435 |
}
|
|
|
|
|
|
|
|
|
1436 |
else if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
|
1437 |
{
|
1438 |
echo $EpisodeData['embed'];
|
@@ -2060,7 +2129,8 @@ function powerpress_get_player_links($post_id, $feed_slug = 'podcast', $EpisodeD
|
|
2060 |
return '';
|
2061 |
|
2062 |
$GeneralSettings = get_option('powerpress_general');
|
2063 |
-
|
|
|
2064 |
// Build links for player
|
2065 |
$player_links = '';
|
2066 |
switch( $GeneralSettings['player_function'] )
|
@@ -2068,10 +2138,12 @@ function powerpress_get_player_links($post_id, $feed_slug = 'podcast', $EpisodeD
|
|
2068 |
case 1: // Play on page and new window
|
2069 |
case 3: // Play in new window only
|
2070 |
case 5: { // Play in page and new window
|
2071 |
-
if( $
|
|
|
|
|
2072 |
$player_links .= "<a href=\"{$EpisodeData['url']}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" onclick=\"return powerpress_pinw('{$post_id}-{$feed_slug}');\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
2073 |
else
|
2074 |
-
$player_links .= "<a href=\"{$EpisodeData['url']}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\"
|
2075 |
}; break;
|
2076 |
case 2:
|
2077 |
case 4:{ // Play in/on page only
|
@@ -2102,13 +2174,51 @@ function powerpress_get_player_links($post_id, $feed_slug = 'podcast', $EpisodeD
|
|
2102 |
|
2103 |
if( $player_links )
|
2104 |
{
|
2105 |
-
|
2106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2107 |
else
|
2108 |
-
return '<p class="powerpress_links">'. htmlspecialchars(POWERPRESS_LINKS_TEXT) .': '. $player_links . '</p>'.PHP_EOL;
|
2109 |
}
|
2110 |
return '';
|
2111 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2112 |
/*
|
2113 |
End Helper Functions
|
2114 |
*/
|
@@ -2116,9 +2226,5 @@ End Helper Functions
|
|
2116 |
// Are we in the admin?
|
2117 |
if( is_admin() )
|
2118 |
require_once(dirname(__FILE__).'/powerpressadmin.php');
|
2119 |
-
|
2120 |
-
|
2121 |
-
if( defined('POWERPRESS_PLAYERS') && POWERPRESS_PLAYERS )
|
2122 |
-
require_once(dirname(__FILE__).'/player.php');
|
2123 |
|
2124 |
?>
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://www.blubrry.com/powerpress/
|
5 |
Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
|
6 |
+
Version: 1.0.2
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
33 |
die("access denied.");
|
34 |
|
35 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
36 |
+
define('POWERPRESS_VERSION', '1.0.2' );
|
37 |
|
38 |
/////////////////////////////////////////////////////
|
39 |
// The following define options should be placed in your
|
93 |
return $content;
|
94 |
}
|
95 |
|
96 |
+
// PowerPress settings:
|
97 |
+
$GeneralSettings = get_option('powerpress_general');
|
98 |
+
|
99 |
+
if( @$GeneralSettings['player_aggressive'] )
|
100 |
+
{
|
101 |
+
if( strstr($content, '<!--powerpress_player-->') !== false )
|
102 |
+
return $content; // The players were already added to the content
|
103 |
+
|
104 |
+
if( $g_powerpress_excerpt_post_id > 0 )
|
105 |
+
$g_powerpress_excerpt_post_id = 0; // Hack, set this to zero so it always goes past...
|
106 |
+
}
|
107 |
+
|
108 |
// Problem: If the_excerpt is used instead of the_content, both the_exerpt and the_content will be called here.
|
109 |
// Important to note, get_the_excerpt will be called before the_content is called, so we add a simple little hack
|
110 |
if( current_filter() == 'get_the_excerpt' )
|
117 |
return $content; // We don't want to do anything to this excerpt content in this call either...
|
118 |
}
|
119 |
|
120 |
+
|
|
|
121 |
if( !isset($GeneralSettings['custom_feeds']) )
|
122 |
$GeneralSettings['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
|
123 |
|
150 |
$ExcludePlayers = array();
|
151 |
if( isset($GeneralSettings['disable_player']) )
|
152 |
$ExcludePlayers = $GeneralSettings['disable_player']; // automatically disable the players configured
|
153 |
+
|
154 |
+
if( @$GeneralSettings['process_podpress'] && strstr($content, '[display_podcast]') )
|
155 |
+
return $content;
|
156 |
|
157 |
if( preg_match_all('/(.?)\[(powerpress)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s', $content, $matches) )
|
158 |
{
|
200 |
//if( preg_match('/\[powerpress(.*)\]/is', $content) == 0 )
|
201 |
if( !isset($ExcludePlayers[ $feed_slug ]) ) // If the player is not in our exclude list because it's already in the post body somewhere...
|
202 |
{
|
203 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
|
204 |
{
|
205 |
+
$new_content .= powerpress_premium_content_message($post->ID, $feed_slug, $EpisodeData);
|
206 |
+
}
|
207 |
+
else
|
208 |
+
{
|
209 |
+
if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
|
210 |
+
{
|
211 |
+
if( $EpisodeData && isset($EpisodeData['embed']) )
|
212 |
+
$new_content .= $EpisodeData['embed'];
|
213 |
+
if( !isset($EpisodeData['no_player']) )
|
214 |
+
$new_content .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed_slug, 'type'=>$EpisodeData['type']) );
|
215 |
+
}
|
216 |
+
|
217 |
+
$new_content .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData);
|
218 |
}
|
|
|
|
|
219 |
}
|
220 |
}
|
221 |
|
225 |
switch( $GeneralSettings['display_player'] )
|
226 |
{
|
227 |
case 1: { // Below posts
|
228 |
+
return $content.$new_content.(@$GeneralSettings['player_aggressive']?'<!--powerpress_player-->':'');
|
229 |
}; break;
|
230 |
case 2: { // Above posts
|
231 |
+
return (@$GeneralSettings['player_aggressive']?'<!--powerpress_player-->':'').$new_content.$content;
|
232 |
}; break;
|
233 |
}
|
234 |
return $content;
|
771 |
function powerpress_do_podcast_feed($for_comments=false)
|
772 |
{
|
773 |
global $wp_query;
|
774 |
+
|
775 |
+
$GeneralSettings = get_option('powerpress_general');
|
776 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] )
|
777 |
+
{
|
778 |
+
$feed_slug = get_query_var('feed');
|
779 |
+
|
780 |
+
if( $feed_slug != 'podcast' )
|
781 |
+
{
|
782 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
783 |
+
if( @$FeedSettings['premium'] )
|
784 |
+
{
|
785 |
+
require_once( dirname(__FILE__).'/powerpress-feed-auth.php');
|
786 |
+
powerpress_feed_auth( $feed_slug );
|
787 |
+
}
|
788 |
+
}
|
789 |
+
}
|
790 |
+
|
791 |
$wp_query->get_posts();
|
792 |
do_feed_rss2($for_comments);
|
793 |
}
|
821 |
|
822 |
if( isset($_GET['powerpress_pinw']) )
|
823 |
powerpress_do_pinw($_GET['powerpress_pinw'], @$GeneralSettings['process_podpress']);
|
824 |
+
|
825 |
+
if( @$GeneralSettings['player_options'] )
|
826 |
+
require_once( dirname(__FILE__).'/powerpress-player.php');
|
827 |
+
|
828 |
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
829 |
return false; // Another podcasting plugin is enabled...
|
830 |
|
1169 |
|
1170 |
switch( strtolower($parts['extension']) )
|
1171 |
{
|
1172 |
+
// PDFs:
|
1173 |
+
case 'pdf': {
|
1174 |
+
return $content; // We don't add a player for PDFs!
|
1175 |
+
}; break;
|
1176 |
+
|
1177 |
// Flash Player:
|
1178 |
case 'mp3':
|
1179 |
|
1216 |
case 'qt':
|
1217 |
case 'mov': {
|
1218 |
|
1219 |
+
$GeneralSettings = get_option('powerpress_general');
|
1220 |
+
if( !isset($GeneralSettings['player_scale']) )
|
1221 |
+
$GeneralSettings['player_scale'] = 'tofit';
|
1222 |
+
|
1223 |
// If there is no cover image specified, lets use the default...
|
1224 |
if( $cover_image == '' )
|
1225 |
$cover_image = powerpress_get_root_url() . 'play_video_default.jpg';
|
1228 |
{
|
1229 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'"></div>'.PHP_EOL;
|
1230 |
$content .= '<script type="text/javascript">'.PHP_EOL;
|
1231 |
+
$content .= "powerpress_embed_quicktime('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height}, '{$GeneralSettings['player_scale']}');\n";
|
1232 |
$content .= "</script>\n";
|
1233 |
}
|
1234 |
else
|
1235 |
{
|
1236 |
$content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">'.PHP_EOL;
|
1237 |
$content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" onclick="';
|
1238 |
+
$content .= "return powerpress_embed_quicktime('powerpress_player_{$g_powerpress_player_id}', '{$media_url}', {$player_width}, {$player_height}, '{$GeneralSettings['player_scale']}' );";
|
1239 |
$content .= '">';
|
1240 |
$content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_PLAY_TEXT) .'" />';
|
1241 |
$content .= '</a>';
|
1374 |
|
1375 |
if( !isset($EpisodeData['no_player']) )
|
1376 |
{
|
1377 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed) )
|
1378 |
+
{
|
1379 |
+
$return .= powerpress_premium_content_message($post->ID, $feed, $EpisodeData);
|
1380 |
+
continue;
|
1381 |
+
}
|
1382 |
+
|
1383 |
$return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed, 'image'=>$image, 'type'=>$EpisodeData['type']) );
|
1384 |
$return .= powerpress_get_player_links($post->ID, $feed, $EpisodeData );
|
1385 |
}
|
1396 |
continue;
|
1397 |
|
1398 |
$EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
|
1399 |
+
if( !$EpisodeData && $GeneralSettings['process_podpress'] && $feed_slug == 'podcast' )
|
1400 |
+
$EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
|
1401 |
+
|
1402 |
if( !$EpisodeData )
|
1403 |
continue;
|
1404 |
|
1405 |
if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
|
1406 |
$return .= $EpisodeData['embed'];
|
1407 |
|
1408 |
+
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($GeneralSettings) )
|
1409 |
+
{
|
1410 |
+
$return .= powerpress_premium_content_message($post->ID, $feed_slug, $EpisodeData);
|
1411 |
+
continue;
|
1412 |
+
}
|
1413 |
+
|
1414 |
if( !isset($EpisodeData['no_player']) )
|
1415 |
{
|
1416 |
$return .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed_slug, 'image'=>$image, 'type'=>$EpisodeData['type']) );
|
1493 |
<body>
|
1494 |
<div style="margin: 5px;">
|
1495 |
<?php
|
1496 |
+
$GeneralSettings = get_option('powerpress_general');
|
1497 |
if( !$EpisodeData )
|
1498 |
{
|
1499 |
echo '<p>Unable to retrieve media information.</p>';
|
1500 |
}
|
1501 |
+
else if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
|
1502 |
+
{
|
1503 |
+
echo powerpress_premium_content_message($post_id, $feed_slug, $EpisodeData);
|
1504 |
+
}
|
1505 |
else if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
|
1506 |
{
|
1507 |
echo $EpisodeData['embed'];
|
2129 |
return '';
|
2130 |
|
2131 |
$GeneralSettings = get_option('powerpress_general');
|
2132 |
+
$is_pdf = (strtolower( substr($EpisodeData['url'], -3) ) == 'pdf' );
|
2133 |
+
|
2134 |
// Build links for player
|
2135 |
$player_links = '';
|
2136 |
switch( $GeneralSettings['player_function'] )
|
2138 |
case 1: // Play on page and new window
|
2139 |
case 3: // Play in new window only
|
2140 |
case 5: { // Play in page and new window
|
2141 |
+
if( $is_pdf )
|
2142 |
+
$player_links .= "<a href=\"{$EpisodeData['url']}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". __('Open in New Window') ."\">". __('Open in New Window') ."</a>".PHP_EOL;
|
2143 |
+
else if( $post_id )
|
2144 |
$player_links .= "<a href=\"{$EpisodeData['url']}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" onclick=\"return powerpress_pinw('{$post_id}-{$feed_slug}');\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
2145 |
else
|
2146 |
+
$player_links .= "<a href=\"{$EpisodeData['url']}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
|
2147 |
}; break;
|
2148 |
case 2:
|
2149 |
case 4:{ // Play in/on page only
|
2174 |
|
2175 |
if( $player_links )
|
2176 |
{
|
2177 |
+
$extension = 'unknown';
|
2178 |
+
$parts = pathinfo($EpisodeData['url']);
|
2179 |
+
if( $parts && isset($parts['extension']) )
|
2180 |
+
$extension = strtolower($parts['extension']);
|
2181 |
+
|
2182 |
+
if( $is_pdf )
|
2183 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. __('E-Book PDF') . ( $feed_slug=='pdf'||$feed_slug=='podcast'?'':" ($feed_slug)") .': '. $player_links . '</p>'.PHP_EOL;
|
2184 |
+
else if( $feed_slug != 'podcast' )
|
2185 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. htmlspecialchars(POWERPRESS_LINKS_TEXT) .' ('. htmlspecialchars($feed_slug) .'): '. $player_links . '</p>'.PHP_EOL;
|
2186 |
else
|
2187 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. htmlspecialchars(POWERPRESS_LINKS_TEXT) .': '. $player_links . '</p>'.PHP_EOL;
|
2188 |
}
|
2189 |
return '';
|
2190 |
}
|
2191 |
+
|
2192 |
+
function powerpress_premium_content_authorized($feed_slug)
|
2193 |
+
{
|
2194 |
+
if( $feed_slug != 'podcast' )
|
2195 |
+
{
|
2196 |
+
$FeedSettings = get_option('powerpress_feed_'. $feed_slug);
|
2197 |
+
if( isset($FeedSettings['premium']) && $FeedSettings['premium'] != '' )
|
2198 |
+
return current_user_can($FeedSettings['premium']);
|
2199 |
+
}
|
2200 |
+
return true; // any user can access this content
|
2201 |
+
}
|
2202 |
+
|
2203 |
+
function powerpress_premium_content_message($post_id, $feed_slug, $EpisodeData = false)
|
2204 |
+
{
|
2205 |
+
if( !$EpisodeData && $post_id )
|
2206 |
+
$EpisodeData = powerpress_get_enclosure_data($post_id, $feed_slug);
|
2207 |
+
|
2208 |
+
if( !$EpisodeData )
|
2209 |
+
return '';
|
2210 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
2211 |
+
|
2212 |
+
$extension = 'unknown';
|
2213 |
+
$parts = pathinfo($EpisodeData['url']);
|
2214 |
+
if( $parts && isset($parts['extension']) )
|
2215 |
+
$extension = strtolower($parts['extension']);
|
2216 |
+
|
2217 |
+
if( isset($FeedSettings['premium_label']) && $FeedSettings['premium_label'] != '' ) // User has a custom label
|
2218 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. $FeedSettings['premium_label'] . '</p>'.PHP_EOL;
|
2219 |
+
|
2220 |
+
return '<p class="powerpress_links powerpress_links_'. $extension .'">'. htmlspecialchars($FeedSettings['title']) .': <a href="'. get_bloginfo('home') .'wp-login.php" title="Protected Content">(Protected Content)</a></p>'.PHP_EOL;
|
2221 |
+
}
|
2222 |
/*
|
2223 |
End Helper Functions
|
2224 |
*/
|
2226 |
// Are we in the admin?
|
2227 |
if( is_admin() )
|
2228 |
require_once(dirname(__FILE__).'/powerpressadmin.php');
|
|
|
|
|
|
|
|
|
2229 |
|
2230 |
?>
|
powerpressadmin-appearance.php
CHANGED
@@ -1,196 +1,5 @@
|
|
1 |
<?php
|
2 |
// powerpressadmin-appearance.php
|
3 |
|
4 |
-
function powerpressadmin_appearance()
|
5 |
-
{
|
6 |
-
$General = powerpress_get_settings('powerpress_general');
|
7 |
-
$General = powerpress_default_settings($General, 'appearance');
|
8 |
-
|
9 |
-
|
10 |
-
$Players = array('podcast'=>'Default Podcast (podcast)');
|
11 |
-
if( isset($General['custom_feeds']) )
|
12 |
-
{
|
13 |
-
while( list($podcast_slug, $podcast_title) = each($General['custom_feeds']) )
|
14 |
-
{
|
15 |
-
if( $podcast_slug == 'podcast' )
|
16 |
-
continue;
|
17 |
-
$Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
?>
|
22 |
-
<input type="hidden" name="action" value="powerpress-save-appearance" />
|
23 |
-
<h2><?php echo __("Appearance Settings"); ?></h2>
|
24 |
-
|
25 |
-
<p style="margin-bottom: 0;">Configure how your media will be found on your blog.</p>
|
26 |
-
|
27 |
-
|
28 |
-
<table class="form-table">
|
29 |
-
<tr valign="top">
|
30 |
-
<th scope="row"><?php echo __("Media Presentation"); ?></th>
|
31 |
-
<td><select name="General[display_player]" class="bpp_input_sm">
|
32 |
-
<?php
|
33 |
-
$displayoptions = array(1=>"Below Post", 2=>"Above Post", 0=>"None");
|
34 |
-
|
35 |
-
while( list($value,$desc) = each($displayoptions) )
|
36 |
-
echo "\t<option value=\"$value\"". ($General['display_player']==$value?' selected':''). ">$desc</option>\n";
|
37 |
-
|
38 |
-
?>
|
39 |
-
</select> (where player and/or links will be displayed)
|
40 |
-
<p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if($General['display_player_excerpt']) echo 'checked '; ?>/> Display player / links in <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="Explanation of an excerpt in Wordpress" target="_blank">excerpts</a> (e.g. search results)</p>
|
41 |
-
</td>
|
42 |
-
</tr>
|
43 |
-
|
44 |
-
<tr valign="top">
|
45 |
-
<th scope="row">
|
46 |
-
<?php _e("Display Media Player"); ?></th>
|
47 |
-
<td><select name="General[player_function]" class="bpp_input_med">
|
48 |
-
<?php
|
49 |
-
$playeroptions = array(1=>'On Page & New Window', 2=>'On Page Only', 3=>'New Window Only', /* 4=>'On Page Link', 5=>'On Page Link & New Window', */ 0=>'Disable');
|
50 |
-
|
51 |
-
while( list($value,$desc) = each($playeroptions) )
|
52 |
-
echo "\t<option value=\"$value\"". ($General['player_function']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
53 |
-
|
54 |
-
?>
|
55 |
-
</select>
|
56 |
-
<?php
|
57 |
-
global $wp_version;
|
58 |
-
if( version_compare($wp_version, '2.7') < 0 ) // Wordpress before version 2.7
|
59 |
-
{
|
60 |
-
?>
|
61 |
-
<p><input name="CheckSWF" type="checkbox" value="1" /> Verify flash player</p>
|
62 |
-
<?php
|
63 |
-
}
|
64 |
-
?>
|
65 |
-
</td>
|
66 |
-
</tr>
|
67 |
-
<?php
|
68 |
-
if( count($Players) > 1 )
|
69 |
-
{
|
70 |
-
?>
|
71 |
-
<tr valign="top">
|
72 |
-
<th scope="row"><?php echo __("Disable Player for"); ?></th>
|
73 |
-
<td>
|
74 |
-
<input type="hidden" name="UpdateDisablePlayer" value="1" />
|
75 |
-
<?php
|
76 |
-
while( list($podcast_slug, $podcast_title) = each($Players) )
|
77 |
-
{
|
78 |
-
?>
|
79 |
-
<p><input name="DisablePlayer[<?php echo $podcast_slug; ?>]" type="checkbox" value="1" <?php if( isset($General['disable_player'][$podcast_slug]) ) echo 'checked '; ?>/> <?php echo htmlspecialchars($podcast_title); ?> <?php echo __('feed episodes'); ?></p>
|
80 |
-
<?php
|
81 |
-
}
|
82 |
-
?>
|
83 |
-
<p>Check the custom podcast feeds above that you do not want in-page players for.</p>
|
84 |
-
</td>
|
85 |
-
</tr>
|
86 |
-
<?php
|
87 |
-
}
|
88 |
-
?>
|
89 |
-
|
90 |
-
<tr valign="top">
|
91 |
-
<th scope="row">
|
92 |
-
|
93 |
-
<?php _e("Download Link"); ?></th>
|
94 |
-
<td>
|
95 |
-
<select name="General[podcast_link]" class="bpp_input_med">
|
96 |
-
<?php
|
97 |
-
$linkoptions = array(1=>"Display", 2=>"Display with file size", 3=>"Display with file size and duration", 0=>"Disable");
|
98 |
-
|
99 |
-
while( list($value,$desc) = each($linkoptions) )
|
100 |
-
echo "\t<option value=\"$value\"". ($General['podcast_link']==$value?' selected':''). ">$desc</option>\n";
|
101 |
-
|
102 |
-
?>
|
103 |
-
</select>
|
104 |
-
</td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr valign="top">
|
108 |
-
<th scope="row" style="background-image: url(../wp-includes/images/smilies/icon_exclaim.gif); background-position: 10px 10px; background-repeat: no-repeat; ">
|
109 |
-
|
110 |
-
<div style="margin-left: 24px;"><?php _e("Hybrid Themes"); ?></div></th>
|
111 |
-
<td>
|
112 |
-
<p style="margin-top: 5px;">
|
113 |
-
The Hybrid Theme system will fail to display the player and links when the Hybrid Theme Setting "Use the excerpt on single posts for your meta description?" is checked. To fix,
|
114 |
-
either uncheck the option or use the <a href="http://wordpress.org/extend/plugins/hybrid-bugfix/" target="_blank">Hybrid Theme Bugfix plugin</a>.
|
115 |
-
</p>
|
116 |
-
</td>
|
117 |
-
</tr>
|
118 |
-
</table>
|
119 |
-
|
120 |
-
|
121 |
-
<h2><?php echo __("Play in New Window Settings"); ?></h2>
|
122 |
-
|
123 |
-
<p style="margin-bottom: 0;">Configure the width and height of the new window.</p>
|
124 |
-
|
125 |
-
|
126 |
-
<table class="form-table">
|
127 |
-
|
128 |
-
<tr valign="top">
|
129 |
-
<th scope="row">
|
130 |
-
<?php echo __("New Window Width"); ?>
|
131 |
-
</th>
|
132 |
-
<td>
|
133 |
-
<input type="text" name="General[new_window_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['new_window_width']; ?>" maxlength="4" />
|
134 |
-
Width of new window (leave blank for 320 default)
|
135 |
-
</td>
|
136 |
-
</tr>
|
137 |
-
|
138 |
-
<tr valign="top">
|
139 |
-
<th scope="row">
|
140 |
-
<?php echo __("New Window Height"); ?>
|
141 |
-
</th>
|
142 |
-
<td>
|
143 |
-
<input type="text" name="General[new_window_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['new_window_height']; ?>" maxlength="4" />
|
144 |
-
Height of new window (leave blank for 240 default)
|
145 |
-
</td>
|
146 |
-
</tr>
|
147 |
-
</table>
|
148 |
-
|
149 |
-
|
150 |
-
<h2><?php echo __("Default Player Settings"); ?></h2>
|
151 |
-
|
152 |
-
<p style="margin-bottom: 0;">Configure the width and height of the default media player.</p>
|
153 |
-
|
154 |
-
|
155 |
-
<table class="form-table">
|
156 |
-
<tr valign="top">
|
157 |
-
<th scope="row">
|
158 |
-
<?php echo __("Player Width"); ?>
|
159 |
-
</th>
|
160 |
-
<td>
|
161 |
-
<input type="text" name="General[player_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_width']; ?>" maxlength="4" />
|
162 |
-
Width of player (leave blank for 320 default)
|
163 |
-
</td>
|
164 |
-
</tr>
|
165 |
-
|
166 |
-
<tr valign="top">
|
167 |
-
<th scope="row">
|
168 |
-
<?php echo __("Player Height"); ?>
|
169 |
-
</th>
|
170 |
-
<td>
|
171 |
-
<input type="text" name="General[player_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_height']; ?>" maxlength="4" />
|
172 |
-
Height of player (leave blank for 240 default)
|
173 |
-
</td>
|
174 |
-
</tr>
|
175 |
-
|
176 |
-
<tr valign="top">
|
177 |
-
<th scope="row">
|
178 |
-
<?php echo __("Player Width Audio"); ?>
|
179 |
-
</th>
|
180 |
-
<td>
|
181 |
-
<input type="text" name="General[player_width_audio]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_width_audio']; ?>" maxlength="4" />
|
182 |
-
Width of Audio mp3 player (leave blank for 320 default)
|
183 |
-
</td>
|
184 |
-
</tr>
|
185 |
-
|
186 |
-
</table>
|
187 |
-
<p>
|
188 |
-
Looking for a better Audio Player? Check out the <a href="http://wpaudioplayer.com" target="_blank" title="WP Audio Player 2.0">WP Audio Player 2.0</a>.
|
189 |
-
The WP Audio Player 2.0 options include
|
190 |
-
theme colors, initial volume, player width and more.
|
191 |
-
</p>
|
192 |
-
<br />
|
193 |
-
<?php
|
194 |
-
} // End powerpress_admin_appearance()
|
195 |
|
196 |
?>
|
1 |
<?php
|
2 |
// powerpressadmin-appearance.php
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
?>
|
powerpressadmin-basic.php
CHANGED
@@ -3,18 +3,22 @@
|
|
3 |
function powerpress_admin_basic()
|
4 |
{
|
5 |
$General = powerpress_get_settings('powerpress_general');
|
6 |
-
$AdvancedMode = $General['advanced_mode'];
|
7 |
$General = powerpress_default_settings($General, 'basic');
|
8 |
|
9 |
// Default setings for advanced mode:
|
10 |
if( $General['episode_box_mode'] != 2 )
|
11 |
{
|
12 |
-
|
13 |
-
$General['
|
|
|
14 |
$General['episode_box_keywords'] = 0;
|
15 |
$General['episode_box_subtitle'] = 0;
|
16 |
$General['episode_box_summary'] = 0;
|
|
|
17 |
}
|
|
|
|
|
|
|
18 |
|
19 |
|
20 |
?>
|
@@ -37,68 +41,265 @@ function CheckRedirect(obj)
|
|
37 |
}
|
38 |
function SelectEntryBox(mode)
|
39 |
{
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
document.getElementById('episode_box_subtitle').disabled = (mode!=2);
|
45 |
-
document.getElementById('episode_box_summary').disabled = (mode!=2);
|
46 |
-
document.getElementById('episode_box_explicit').disabled = (mode!=2);
|
47 |
-
document.getElementById('episode_box_mode_adv').style.display = (mode==2?'block':'none');
|
48 |
}
|
49 |
|
|
|
|
|
|
|
50 |
</script>
|
51 |
-
<input type="hidden" name="action" value="powerpress-save-basic" />
|
52 |
-
<h2><?php echo __("Basic Settings"); ?></h2>
|
53 |
|
54 |
-
<
|
55 |
|
|
|
56 |
|
57 |
-
<
|
58 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
<?php echo __("Mode"); ?></th>
|
61 |
-
<td><input type="hidden" name="General[advanced_mode]" id="powerpress_advanced_mode" value="<?php echo $General['advanced_mode']; ?>" />
|
62 |
<?php
|
63 |
-
if( $General['
|
64 |
{
|
65 |
?>
|
66 |
-
|
67 |
-
|
68 |
-
<p>
|
69 |
-
|
70 |
</p>
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
<?php
|
73 |
}
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
{
|
76 |
?>
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
<?php
|
79 |
}
|
80 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
</td>
|
82 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
-
<?php if( $AdvancedMode ) { ?>
|
86 |
<tr valign="top">
|
87 |
-
<th scope="row"
|
|
|
88 |
<td>
|
89 |
-
<
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
94 |
</td>
|
95 |
</tr>
|
96 |
-
|
|
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
if( $General['process_podpress'] || powerpress_podpress_episodes_exist() )
|
100 |
{
|
101 |
?>
|
|
|
|
|
|
|
102 |
<tr valign="top">
|
103 |
<th scope="row">
|
104 |
|
@@ -115,39 +316,99 @@ while( list($value,$desc) = each($options) )
|
|
115 |
</select> (includes podcast episodes previously created in PodPress)
|
116 |
</td>
|
117 |
</tr>
|
118 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
-
<?php if( $AdvancedMode ) { ?>
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
|
|
|
|
123 |
<tr valign="top">
|
124 |
-
<th scope="row"><?php _e("iTunes URL"); ?></th>
|
125 |
<td>
|
|
|
|
|
|
|
|
|
|
|
126 |
<input type="text" style="width: 80%;" name="General[itunes_url]" value="<?php echo $General['itunes_url']; ?>" maxlength="250" />
|
|
|
|
|
|
|
127 |
<p>Click the following link to <a href="https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast" target="_blank" title="Publish a Podcast on iTunes">Publish a Podcast on iTunes</a>.
|
128 |
-
|
129 |
</p>
|
130 |
-
<p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
</td>
|
132 |
</tr>
|
133 |
|
134 |
<?php
|
135 |
-
|
|
|
136 |
?>
|
137 |
<tr valign="top">
|
138 |
<th scope="row">
|
139 |
|
140 |
<?php _e("Update iTunes Listing"); ?></th>
|
141 |
<td>
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
<select name="General[ping_itunes]"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> class="bpp_input_sm">
|
143 |
<?php
|
|
|
144 |
$options = array(0=>'No ', 1=>'Yes ');
|
145 |
|
|
|
146 |
if( $OpenSSLSupport == false )
|
147 |
$value = 0;
|
148 |
|
149 |
while( list($value,$desc) = each($options) )
|
150 |
-
echo "\t<option value=\"$value\"". ($
|
151 |
|
152 |
?>
|
153 |
</select> Notify (ping) iTunes when you publish a new episode.
|
@@ -207,131 +468,16 @@ while( list($value,$desc) = each($options) )
|
|
207 |
<?php } ?>
|
208 |
</td>
|
209 |
</tr>
|
210 |
-
<?php } // End if $AdvancedMode ?>
|
211 |
-
</table>
|
212 |
-
<?php if( $OpenSSLSupport == false && $AdvancedMode ) { ?>
|
213 |
-
<div class="error powerpress-error">Ping iTunes requires OpenSSL in PHP. Please refer to your php.ini to enable the php_openssl module.</div>
|
214 |
-
<?php } // End if !$OpenSSLSupport ?>
|
215 |
-
|
216 |
-
|
217 |
-
<h2><?php _e("Podcast Entry Box Options"); ?></h2>
|
218 |
-
<p style="margin-bottom: 0;">Configure how the Podcast Episode entry box functions when editing blog posts and pages.</p>
|
219 |
-
<table class="form-table">
|
220 |
-
<tr valign="top">
|
221 |
-
<th scope="row">
|
222 |
-
|
223 |
-
<?php _e("Podcast Entry Box"); ?></th>
|
224 |
-
<td>
|
225 |
-
|
226 |
-
<ul>
|
227 |
-
<li><label><input type="radio" name="General[episode_box_mode]" value="1" <?php if( $General['episode_box_mode'] == 1 ) echo 'checked'; ?> onclick="SelectEntryBox(1);" /> Simple</label></li>
|
228 |
-
<li>
|
229 |
-
<ul>
|
230 |
-
<li>Episode entry box includes Media URL field only. File Size and Duration will be auto detected.</li>
|
231 |
-
</ul>
|
232 |
-
</li>
|
233 |
-
|
234 |
-
<li><label><input type="radio" name="General[episode_box_mode]" value="0" <?php if( $General['episode_box_mode'] == 0 ) echo 'checked'; ?> onclick="SelectEntryBox(0);" /> Normal</label> (default)</li>
|
235 |
-
<li>
|
236 |
-
<ul>
|
237 |
-
<li>Episode entry box includes Media URL, File Size and Duration fields.</li>
|
238 |
-
</ul>
|
239 |
-
</li>
|
240 |
-
|
241 |
-
<li><label><input type="radio" name="General[episode_box_mode]" value="2" <?php if( $General['episode_box_mode'] == 2 ) echo 'checked'; ?> onclick="SelectEntryBox(2);" /> Custom</label></li>
|
242 |
-
<li>
|
243 |
-
<ul>
|
244 |
-
<li>Episode entry box includes Media URL, File Size and Duration fields, plus:
|
245 |
-
<div id="episode_box_mode_adv" style="display: <?php echo ($General['episode_box_mode'] == 2?'block':'none'); ?>;">
|
246 |
-
<p style="margin-top: 15px;"><input id="episode_box_embed" name="General[episode_box_embed]" <?php if( $General['episode_box_mode'] != 2 ) echo 'disabled'; ?> type="checkbox" value="1"<?php if( $General['episode_box_embed'] ) echo ' checked'; ?> /> Embed Field
|
247 |
-
(Enter embed code from sites such as YouTube, Viddler and Blip.tv)</p>
|
248 |
-
<p style="margin-top: 15px;"><input id="episode_box_no_player" name="General[episode_box_no_player]" <?php if( $General['episode_box_mode'] != 2 ) echo 'disabled'; ?> type="checkbox" value="1"<?php if( $General['episode_box_no_player'] ) echo ' checked'; ?> /> No Player Option
|
249 |
-
(Disable player on a per episode basis)</p>
|
250 |
-
|
251 |
-
<p style="margin-top: 15px;"><input id="episode_box_keywords" name="General[episode_box_keywords]" <?php if( $General['episode_box_mode'] != 2 ) echo 'disabled'; ?> type="checkbox" value="1"<?php if( $General['episode_box_keywords'] ) echo ' checked'; ?> /> iTunes Keywords Field
|
252 |
-
(Leave unchecked to use your blog post tags)</p>
|
253 |
-
<p style="margin-top: 15px;"><input id="episode_box_subtitle" name="General[episode_box_subtitle]" <?php if( $General['episode_box_mode'] != 2 ) echo 'disabled'; ?> type="checkbox" value="1"<?php if( $General['episode_box_subtitle'] ) echo ' checked'; ?> /> iTunes Subtitle Field
|
254 |
-
(Leave unchecked to use the first 250 characters of your blog post)</p>
|
255 |
-
<p style="margin-top: 15px;"><input id="episode_box_summary" name="General[episode_box_summary]" <?php if( $General['episode_box_mode'] != 2 ) echo 'disabled'; ?> type="checkbox" value="1"<?php if( $General['episode_box_summary'] ) echo ' checked'; ?> /> iTunes Summary Field
|
256 |
-
(Leave unchecked to use your blog post)</p>
|
257 |
-
<p style="margin-top: 15px;"><input id="episode_box_explicit" name="General[episode_box_explicit]" <?php if( $General['episode_box_mode'] != 2 ) echo 'disabled'; ?> type="checkbox" value="1"<?php if( $General['episode_box_explicit'] ) echo ' checked'; ?> /> iTunes Explicit Field
|
258 |
-
(Leave unchecked to use your feed's explicit setting)</p>
|
259 |
-
|
260 |
-
<em>NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing.
|
261 |
-
It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.</em><br />
|
262 |
-
<em><strong>USE THE ITUNES FIELDS ABOVE AT YOUR OWN RISK.</strong></em>
|
263 |
-
</div>
|
264 |
-
</li>
|
265 |
-
</ul>
|
266 |
-
</li>
|
267 |
-
</ul>
|
268 |
-
|
269 |
-
</td>
|
270 |
-
</tr>
|
271 |
-
</table>
|
272 |
-
<div id="episode_entry_settings" style="<?php if( $General['episode_box_mode'] == 1 ) echo 'display:none;'; ?>">
|
273 |
-
<?php if( $AdvancedMode ) { ?>
|
274 |
-
<table class="form-table">
|
275 |
-
<tr valign="top">
|
276 |
-
<th scope="row">
|
277 |
-
|
278 |
-
<?php _e("File Size Default"); ?></th>
|
279 |
-
<td>
|
280 |
-
<select name="General[set_size]" class="bpp_input_med">
|
281 |
-
<?php
|
282 |
-
$options = array(0=>'Auto detect file size', 1=>'User specify');
|
283 |
-
|
284 |
-
while( list($value,$desc) = each($options) )
|
285 |
-
echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
|
286 |
-
|
287 |
-
?>
|
288 |
-
</select> (specify default file size option when creating a new episode)
|
289 |
-
</td>
|
290 |
-
</tr>
|
291 |
-
|
292 |
-
<tr valign="top">
|
293 |
-
<th scope="row">
|
294 |
-
<?php _e("Duration Default"); ?></th>
|
295 |
-
<td>
|
296 |
-
<select name="General[set_duration]" class="bpp_input_med">
|
297 |
<?php
|
298 |
-
|
299 |
-
|
300 |
-
while( list($value,$desc) = each($options) )
|
301 |
-
echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
|
302 |
-
|
303 |
?>
|
304 |
-
</select> (specify default duration option when creating a new episode)
|
305 |
-
</td>
|
306 |
-
</tr>
|
307 |
-
|
308 |
-
<tr valign="top">
|
309 |
-
<th scope="row">
|
310 |
-
<?php _e("Auto Add Media"); ?></th>
|
311 |
-
<td>
|
312 |
-
<select name="General[auto_enclose]" class="bpp_input_med">
|
313 |
-
<?php
|
314 |
-
$options = array(0=>'Disabled (default)', 1=>'First media link found in post content', 2=>'Last media link found in post content');
|
315 |
-
|
316 |
-
while( list($value,$desc) = each($options) )
|
317 |
-
echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
|
318 |
-
|
319 |
-
?>
|
320 |
-
</select>
|
321 |
-
<p>When enabled, the first or last media link found in the post content is automatically added as your podcast episode.</p>
|
322 |
-
<p style="margin-bottom: 0;"><em>NOTE: Use this feature with caution. Links to media files could unintentionally become podcast episodes.</em></p>
|
323 |
-
</td>
|
324 |
-
</tr>
|
325 |
|
326 |
</table>
|
327 |
-
<br />
|
328 |
<?php
|
329 |
-
|
330 |
-
?>
|
331 |
-
</div>
|
332 |
-
|
333 |
|
334 |
-
|
|
|
335 |
|
336 |
$ModeDesc = 'None';
|
337 |
if( $General['blubrry_auth'] )
|
@@ -343,18 +489,21 @@ while( list($value,$desc) = each($options) )
|
|
343 |
$StatsInDashboard = false;
|
344 |
|
345 |
?>
|
346 |
-
<
|
347 |
<p>
|
348 |
Adds <a href="http://www.blubrry.com/podcast_statistics/" title="Blubrry Media Statistics" target="_blank">Blubrry Media Statistics</a> to your blog's <a href="<?php echo admin_url(); ?>" title="WordPress Dashboard">dashboard</a> plus
|
349 |
features for <a href="https://secure.blubrry.com/podcast-publishing-premium-with-hosting/" title="Blubrry Media Hosting" target="_blank">Blubrry Media Hosting</a> users to quickly select and publish uploaded media.
|
350 |
</p>
|
|
|
|
|
|
|
351 |
<table class="form-table">
|
352 |
<tr valign="top">
|
353 |
<th scope="row">
|
354 |
-
<?php _e("Blubrry Services");
|
355 |
</th>
|
356 |
<td>
|
357 |
-
<p style="margin-top: 5px;"><span id="service_mode"><?php echo $ModeDesc; ?></span> (<strong><a href="<?php echo admin_url(); echo wp_nonce_url(
|
358 |
</td>
|
359 |
</tr>
|
360 |
|
@@ -366,10 +515,21 @@ while( list($value,$desc) = each($options) )
|
|
366 |
<p style="margin-top: 5px;"><input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> /> Display Statistics in WordPress Dashboard</p>
|
367 |
</td>
|
368 |
</tr>
|
369 |
-
|
370 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
|
372 |
-
|
|
|
|
|
|
|
373 |
<p>
|
374 |
Enter your Redirect URL issued by your media statistics service provider below.
|
375 |
</p>
|
@@ -455,40 +615,211 @@ Enter your Redirect URL issued by your media statistics service provider below.
|
|
455 |
</tr>
|
456 |
</table>
|
457 |
</div>
|
|
|
|
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
|
460 |
-
|
461 |
-
|
462 |
-
The services above must support redirects that do
|
463 |
-
not include nested 'http://' within the URL. Statistics services such as
|
464 |
-
<a href="http://www.podtrac.com" target="_blank" title="PodTrac">PodTrac.com</a>,
|
465 |
-
<a href="http://www.blubrry.com/podcast_statistics/" target="_blank" title="Blubrry Statistics">Blubrry.com</a>,
|
466 |
-
<a href="http://www.techpodcasts.com/podcast_statistics/" target="_blank" title="TechPodcasts Statistics">TechPodcasts.com</a>,
|
467 |
-
<a href="http://www.rawvoice.com/products/statistics/" target="_blank" title="RawVoice Statistics">RawVoice.com</a>
|
468 |
-
are supported.
|
469 |
-
</p>
|
470 |
-
-->
|
471 |
|
|
|
|
|
|
|
472 |
|
473 |
<?php
|
474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
|
476 |
-
function powerpress_admin_basic_diagnostics()
|
477 |
-
{
|
478 |
?>
|
479 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
<table class="form-table">
|
|
|
481 |
<tr valign="top">
|
482 |
-
<th scope="row"
|
|
|
|
|
483 |
<td>
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
</td>
|
489 |
</tr>
|
490 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
<?php
|
492 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
?>
|
3 |
function powerpress_admin_basic()
|
4 |
{
|
5 |
$General = powerpress_get_settings('powerpress_general');
|
|
|
6 |
$General = powerpress_default_settings($General, 'basic');
|
7 |
|
8 |
// Default setings for advanced mode:
|
9 |
if( $General['episode_box_mode'] != 2 )
|
10 |
{
|
11 |
+
/*
|
12 |
+
$General['episode_box_embed'] = 0;
|
13 |
+
$General['episode_box_no_player'] = 0;
|
14 |
$General['episode_box_keywords'] = 0;
|
15 |
$General['episode_box_subtitle'] = 0;
|
16 |
$General['episode_box_summary'] = 0;
|
17 |
+
*/
|
18 |
}
|
19 |
+
|
20 |
+
$FeedSettings = powerpress_get_settings('powerpress_feed');
|
21 |
+
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
|
22 |
|
23 |
|
24 |
?>
|
41 |
}
|
42 |
function SelectEntryBox(mode)
|
43 |
{
|
44 |
+
if( mode==2 )
|
45 |
+
jQuery('.episode_box_option').removeAttr("disabled");
|
46 |
+
else
|
47 |
+
jQuery('.episode_box_option').attr("disabled","disabled");
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
</script>
|
|
|
|
|
54 |
|
55 |
+
<input type="hidden" name="action" value="powerpress-save-settings" />
|
56 |
|
57 |
+
<h2><?php echo __("Blubrry PowerPress Settings"); ?></h2>
|
58 |
|
59 |
+
<div id="powerpress_settings_page" class="powerpress_tabbed_content">
|
60 |
+
<ul class="powerpress_settings_tabs">
|
61 |
+
<li><a href="#tab1"><span>Basic Settings</span></a></li>
|
62 |
+
<li><a href="#tab2"><span>Services & Statistics</span></a></li>
|
63 |
+
<li><a href="#tab3"><span>Appearance</span></a></li>
|
64 |
+
<li><a href="#tab4"><span>Feeds</span></a></li>
|
65 |
+
<li><a href="#tab5"><span>iTunes</span></a></li>
|
66 |
+
</ul>
|
67 |
+
|
68 |
+
<div id="tab1" class="powerpress_tab">
|
69 |
+
<?php
|
70 |
+
powerpressadmin_edit_entry_options($General);
|
71 |
+
powerpressadmin_edit_podpress_options($General);
|
72 |
+
?>
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<div id="tab2" class="powerpress_tab">
|
76 |
+
<?php
|
77 |
+
powerpressadmin_edit_blubrry_services($General);
|
78 |
+
powerpressadmin_edit_media_statistics($General);
|
79 |
+
?>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<div id="tab3" class="powerpress_tab">
|
83 |
+
<?php
|
84 |
+
powerpressadmin_appearance($General);
|
85 |
+
?>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<div id="tab4" class="powerpress_tab">
|
89 |
+
<?php
|
90 |
+
powerpressadmin_edit_feed_general($FeedSettings, $General);
|
91 |
+
powerpressadmin_edit_feed_settings($FeedSettings, $General);
|
92 |
+
?>
|
93 |
+
</div>
|
94 |
+
|
95 |
+
<div id="tab5" class="powerpress_tab">
|
96 |
+
<?php
|
97 |
+
powerpressadmin_edit_itunes_general($General);
|
98 |
+
powerpressadmin_edit_itunes_feed($FeedSettings, $General);
|
99 |
+
?>
|
100 |
+
</div>
|
101 |
+
|
102 |
+
</div>
|
103 |
+
<div class="clear"></div>
|
104 |
+
|
105 |
+
<div style="margin-left: 10px;">
|
106 |
+
<h3>Advanced Options</h3>
|
107 |
+
<div style="margin-left: 50px;">
|
108 |
+
<div>
|
109 |
+
<input type="checkbox" name="General[advanced_mode]" value="0" <?php echo ($General['advanced_mode']==0?' checked':''); ?>/> <strong>Simple Mode</strong> -
|
110 |
+
Display only the essential settings. Perfect for folks who may feel overwelmed.
|
111 |
+
</div>
|
112 |
+
<div>
|
113 |
+
<input type="checkbox" name="General[player_options]" value="1" <?php echo ($General['player_options']?' checked':''); ?>/> <strong>Audio Player Options</strong> -
|
114 |
+
Select from 5 different web based audio flash players. <span style="font-size: 85%;">(feature will appear in left menu when enabled)</span>
|
115 |
+
</div>
|
116 |
+
<div>
|
117 |
+
<input type="checkbox" name="General[channels]" value="1" <?php echo ($General['channels']?' checked':''); ?>/> <strong>Custom Podcast Channels</strong> -
|
118 |
+
Manage multiple media files and/or formats to one blog post. <span style="font-size: 85%;">(feature will appear in left menu when enabled)</span>
|
119 |
+
</div>
|
120 |
+
<div>
|
121 |
+
<input type="checkbox" name="General[cat_casting]" value="1" <?php echo ($General['cat_casting']?' checked':''); ?>/> <strong>Category Casting</strong> -
|
122 |
+
Manage category podcast feeds. <span style="font-size: 85%;">(feature will appear in left menu when enabled)</span>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
|
|
|
|
|
127 |
<?php
|
128 |
+
if( $General['timestamp'] > 0 && $General['timestamp'] < ( time()- (60*60*24*14) ) ) // Lets wait 14 days before we annoy them asking for support
|
129 |
{
|
130 |
?>
|
131 |
+
<div style="margin-left: 10px;">
|
132 |
+
<h3 style="margin-bottom: 5px;">Like The Plugin?</h3>
|
133 |
+
<p style="margin-top: 0;">
|
134 |
+
This plugin is great, don't you think? If you like the plugin we'd be ever so grateful if you'd give it your support. Here's how:
|
135 |
</p>
|
136 |
+
<ul id="powerpress_support">
|
137 |
+
<li>Rate this plugin 5 stars in the <a href="http://wordpress.org/extend/plugins/powerpress/" title="Rate this plugin 5 stars in the WordPress Plugins Directory" target="_blank">WordPress Plugins Directory</a>.</li>
|
138 |
+
<li>Tell the world about PowerPress by writing about it on your blog,
|
139 |
+
<a href="http://twitter.com/home/?status=<?php echo urlencode('I\'m podcasting with Blubrry PowerPress (http://blubrry.com/powerpress/) #powerpress #wordpress'); ?>" target="_blank" title="Tweet about Blubrry PowerPress">tweet</a>,
|
140 |
+
<a href="http://www.facebook.com/share.php?u=<?php echo urlencode('http://www.blubrry.com/powerpress/'); ?>&t=<?php echo urlencode('I podcast with Blubrry PowerPress'); ?>" target="_blank" title="Share Blubrry PowerPress on Facebook">facebook</a>,
|
141 |
+
<a href="http://digg.com/submit?phase=2&url=<?php echo urlencode('http://www.blubrry.com/powerpress'); ?>&title=<?php echo urlencode('Blubrry PowerPress Podcasting Plugin for WordPress'); ?>" target="_blank" title="Digg about Blubrry PowerPress">digg</a>,
|
142 |
+
etc...</li>
|
143 |
+
<li><a href="http://www.blubrry.com/contact.php" target="_blank" title="Send blubrry.com feedback">Send us feedback</a> (we love getting suggestions for new features!)</li>
|
144 |
+
</ul>
|
145 |
+
</div>
|
146 |
<?php
|
147 |
}
|
148 |
+
}
|
149 |
+
|
150 |
+
function powerpressadmin_edit_entry_options($General)
|
151 |
+
{
|
152 |
+
$OpenSSLSupport = extension_loaded('openssl');
|
153 |
+
?>
|
154 |
+
<h3><?php echo __("Episode Entry Options"); ?></h3>
|
155 |
+
|
156 |
+
<table class="form-table">
|
157 |
+
<?php
|
158 |
+
if( @$General['advanced_mode'] )
|
159 |
{
|
160 |
?>
|
161 |
+
<tr valign="top">
|
162 |
+
<th scope="row"><?php _e("Default Media URL"); ?></th>
|
163 |
+
<td>
|
164 |
+
<input type="text" style="width: 80%;" name="General[default_url]" value="<?php echo $General['default_url']; ?>" maxlength="250" />
|
165 |
+
<p>e.g. http://example.com/mediafolder/</p>
|
166 |
+
<p>URL above will prefix entered file names that do not start with 'http://'. URL above must end with a trailing slash.
|
167 |
+
You may leave blank if you always enter the complete URL to your media when creating podcast episodes.
|
168 |
+
</p>
|
169 |
+
</td>
|
170 |
+
</tr>
|
171 |
<?php
|
172 |
}
|
173 |
?>
|
174 |
+
<tr valign="top">
|
175 |
+
<th scope="row">
|
176 |
+
|
177 |
+
<?php _e("Podcast Entry Box"); ?></th>
|
178 |
+
<td>
|
179 |
+
|
180 |
+
<ul>
|
181 |
+
<li><label><input type="radio" name="General[episode_box_mode]" value="1" <?php if( $General['episode_box_mode'] == 1 ) echo 'checked'; ?> onclick="SelectEntryBox(1);" /> Simple</label></li>
|
182 |
+
<li>
|
183 |
+
<ul>
|
184 |
+
<li>Episode entry box includes Media URL field only. File Size and Duration will be auto detected upon saving the post.</li>
|
185 |
+
</ul>
|
186 |
+
</li>
|
187 |
+
|
188 |
+
<li><label><input type="radio" name="General[episode_box_mode]" value="0" <?php if( $General['episode_box_mode'] == 0 ) echo 'checked'; ?> onclick="SelectEntryBox(0);" /> Normal</label> (default)</li>
|
189 |
+
<li>
|
190 |
+
<ul>
|
191 |
+
<li>Episode entry box includes Media URL, File Size and Duration fields.</li>
|
192 |
+
</ul>
|
193 |
+
</li>
|
194 |
+
|
195 |
+
<li><label><input type="radio" name="General[episode_box_mode]" value="2" <?php if( $General['episode_box_mode'] == 2 ) echo 'checked'; ?> onclick="SelectEntryBox(2);" /> Custom</label></li>
|
196 |
+
<li>
|
197 |
+
<ul>
|
198 |
+
<li>Episode entry box includes Media URL, File Size and Duration fields, plus:
|
199 |
+
<div id="episode_box_mode_adv">
|
200 |
+
<p style="margin-top: 15px;"><input id="episode_box_embed" class="episode_box_option" name="General[episode_box_embed]" type="checkbox" value="1"<?php if( $General['episode_box_embed'] ) echo ' checked'; ?> /> Embed Field
|
201 |
+
(Enter embed code from sites such as YouTube, Viddler and Blip.tv)</p>
|
202 |
+
<p style="margin-top: 15px;"><input id="episode_box_no_player" class="episode_box_option" name="General[episode_box_no_player]" type="checkbox" value="1"<?php if( $General['episode_box_no_player'] ) echo ' checked'; ?> /> No Player Option
|
203 |
+
(Disable player on a per episode basis)</p>
|
204 |
+
|
205 |
+
<p style="margin-top: 15px;"><input id="episode_box_keywords" class="episode_box_option" name="General[episode_box_keywords]" type="checkbox" value="1"<?php if( $General['episode_box_keywords'] ) echo ' checked'; ?> /> iTunes Keywords Field
|
206 |
+
(Leave unchecked to use your blog post tags)</p>
|
207 |
+
<p style="margin-top: 15px;"><input id="episode_box_subtitle" class="episode_box_option" name="General[episode_box_subtitle]" type="checkbox" value="1"<?php if( $General['episode_box_subtitle'] ) echo ' checked'; ?> /> iTunes Subtitle Field
|
208 |
+
(Leave unchecked to use the first 250 characters of your blog post)</p>
|
209 |
+
<p style="margin-top: 15px;"><input id="episode_box_summary" class="episode_box_option" name="General[episode_box_summary]" type="checkbox" value="1"<?php if( $General['episode_box_summary'] ) echo ' checked'; ?> /> iTunes Summary Field
|
210 |
+
(Leave unchecked to use your blog post)</p>
|
211 |
+
<p style="margin-top: 15px;"><input id="episode_box_explicit" class="episode_box_option" name="General[episode_box_explicit]" type="checkbox" value="1"<?php if( $General['episode_box_explicit'] ) echo ' checked'; ?> /> iTunes Explicit Field
|
212 |
+
(Leave unchecked to use your feed's explicit setting)</p>
|
213 |
+
|
214 |
+
<em>NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing.
|
215 |
+
It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.</em><br />
|
216 |
+
<em><strong>USE THE ITUNES FIELDS ABOVE AT YOUR OWN RISK.</strong></em>
|
217 |
+
</div>
|
218 |
+
</li>
|
219 |
+
</ul>
|
220 |
+
</li>
|
221 |
+
</ul>
|
222 |
+
|
223 |
</td>
|
224 |
</tr>
|
225 |
+
</table>
|
226 |
+
<script language="javascript">
|
227 |
+
SelectEntryBox(<?php echo $General['episode_box_mode']; ?>);
|
228 |
+
</script>
|
229 |
+
|
230 |
+
<?php
|
231 |
+
if( @$General['advanced_mode'] )
|
232 |
+
{
|
233 |
+
?>
|
234 |
+
<div id="episode_entry_settings" style="<?php if( $General['episode_box_mode'] == 1 ) echo 'display:none;'; ?>">
|
235 |
+
<table class="form-table">
|
236 |
+
<tr valign="top">
|
237 |
+
<th scope="row">
|
238 |
|
239 |
+
<?php _e("File Size Default"); ?></th>
|
240 |
+
<td>
|
241 |
+
<select name="General[set_size]" class="bpp_input_med">
|
242 |
+
<?php
|
243 |
+
$options = array(0=>'Auto detect file size', 1=>'User specify');
|
244 |
+
|
245 |
+
while( list($value,$desc) = each($options) )
|
246 |
+
echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
|
247 |
+
|
248 |
+
?>
|
249 |
+
</select> (specify default file size option when creating a new episode)
|
250 |
+
</td>
|
251 |
+
</tr>
|
252 |
|
|
|
253 |
<tr valign="top">
|
254 |
+
<th scope="row">
|
255 |
+
<?php _e("Duration Default"); ?></th>
|
256 |
<td>
|
257 |
+
<select name="General[set_duration]" class="bpp_input_med">
|
258 |
+
<?php
|
259 |
+
$options = array(0=>'Auto detect duration (mp3\'s only)', 1=>'User specify', -1=>'Not specified (not recommended)');
|
260 |
+
|
261 |
+
while( list($value,$desc) = each($options) )
|
262 |
+
echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
|
263 |
+
|
264 |
+
?>
|
265 |
+
</select> (specify default duration option when creating a new episode)
|
266 |
</td>
|
267 |
</tr>
|
268 |
+
</table>
|
269 |
+
</div>
|
270 |
|
271 |
+
<table class="form-table">
|
272 |
+
<tr valign="top">
|
273 |
+
<th scope="row">
|
274 |
+
<?php _e("Auto Add Media"); ?></th>
|
275 |
+
<td>
|
276 |
+
<select name="General[auto_enclose]" class="bpp_input_med">
|
277 |
<?php
|
278 |
+
$options = array(0=>'Disabled (default)', 1=>'First media link found in post content', 2=>'Last media link found in post content');
|
279 |
+
|
280 |
+
while( list($value,$desc) = each($options) )
|
281 |
+
echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
|
282 |
+
|
283 |
+
?>
|
284 |
+
</select>
|
285 |
+
<p>When enabled, the first or last media link found in the post content is automatically added as your podcast episode.</p>
|
286 |
+
<p style="margin-bottom: 0;"><em>NOTE: Use this feature with caution. Links to media files could unintentionally become podcast episodes.</em></p>
|
287 |
+
</td>
|
288 |
+
</tr>
|
289 |
+
|
290 |
+
</table>
|
291 |
+
<?php
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
function powerpressadmin_edit_podpress_options($General)
|
296 |
+
{
|
297 |
if( $General['process_podpress'] || powerpress_podpress_episodes_exist() )
|
298 |
{
|
299 |
?>
|
300 |
+
|
301 |
+
<h3>PodPress Options</h3>
|
302 |
+
<table class="form-table">
|
303 |
<tr valign="top">
|
304 |
<th scope="row">
|
305 |
|
316 |
</select> (includes podcast episodes previously created in PodPress)
|
317 |
</td>
|
318 |
</tr>
|
319 |
+
<?php if( @$General['podpress_stats'] || powerpress_podpress_stats_exist() ) { ?>
|
320 |
+
<tr valign="top">
|
321 |
+
<th scope="row">
|
322 |
+
|
323 |
+
<?php _e("PodPress Stats Archive"); ?></th>
|
324 |
+
<td>
|
325 |
+
<select name="General[podpress_stats]" class="bpp_input_sm">
|
326 |
+
<?php
|
327 |
+
$options = array(0=>'Hide', 1=>'Display');
|
328 |
+
|
329 |
+
while( list($value,$desc) = each($options) )
|
330 |
+
echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
|
331 |
+
|
332 |
+
?>
|
333 |
+
</select> (display archive of old PodPress statistics)
|
334 |
+
</td>
|
335 |
+
</tr>
|
336 |
+
<?php } ?>
|
337 |
+
</table>
|
338 |
+
<?php
|
339 |
+
}
|
340 |
+
}
|
341 |
|
|
|
342 |
|
343 |
+
function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
|
344 |
+
{
|
345 |
+
$OpenSSLSupport = extension_loaded('openssl');
|
346 |
+
if( $OpenSSLSupport == false )
|
347 |
+
{
|
348 |
+
?>
|
349 |
+
<div class="error powerpress-error">Ping iTunes requires OpenSSL in PHP. Please refer to your php.ini to enable the php_openssl module.</div>
|
350 |
+
<?php } // End if !$OpenSSLSupport ?>
|
351 |
|
352 |
+
<h3>iTunes Listing Information</h3>
|
353 |
+
<table class="form-table">
|
354 |
<tr valign="top">
|
355 |
+
<th scope="row"><?php _e("iTunes Subscription URL"); ?></th>
|
356 |
<td>
|
357 |
+
<?php
|
358 |
+
if( $FeedSettings ) {
|
359 |
+
?>
|
360 |
+
<input type="text" style="width: 80%;" name="Feed[itunes_url]" value="<?php echo $FeedSettings['itunes_url']; ?>" maxlength="250" />
|
361 |
+
<?php } else { ?>
|
362 |
<input type="text" style="width: 80%;" name="General[itunes_url]" value="<?php echo $General['itunes_url']; ?>" maxlength="250" />
|
363 |
+
<?php } ?>
|
364 |
+
<p>e.g. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=000000000</p>
|
365 |
+
|
366 |
<p>Click the following link to <a href="https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast" target="_blank" title="Publish a Podcast on iTunes">Publish a Podcast on iTunes</a>.
|
367 |
+
iTunes will send an email to your <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.
|
368 |
</p>
|
369 |
+
<p>
|
370 |
+
Recommended feed to submit to iTunes:
|
371 |
+
<?php
|
372 |
+
if( $cat_ID )
|
373 |
+
{
|
374 |
+
echo get_category_feed_link($cat_ID);
|
375 |
+
}
|
376 |
+
else
|
377 |
+
{
|
378 |
+
echo get_feed_link($feed_slug);
|
379 |
+
}
|
380 |
+
?>
|
381 |
+
</p>
|
382 |
+
|
383 |
</td>
|
384 |
</tr>
|
385 |
|
386 |
<?php
|
387 |
+
if( @$General['advanced_mode'] )
|
388 |
+
{
|
389 |
?>
|
390 |
<tr valign="top">
|
391 |
<th scope="row">
|
392 |
|
393 |
<?php _e("Update iTunes Listing"); ?></th>
|
394 |
<td>
|
395 |
+
<?php
|
396 |
+
if( $FeedSettings )
|
397 |
+
{
|
398 |
+
?>
|
399 |
+
<select name="Feed[ping_itunes]"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> class="bpp_input_sm">
|
400 |
+
<?php } else { ?>
|
401 |
<select name="General[ping_itunes]"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> class="bpp_input_sm">
|
402 |
<?php
|
403 |
+
}
|
404 |
$options = array(0=>'No ', 1=>'Yes ');
|
405 |
|
406 |
+
$ping_itunes = ($FeedSettings?$FeedSettings['ping_itunes']:$General['ping_itunes']);
|
407 |
if( $OpenSSLSupport == false )
|
408 |
$value = 0;
|
409 |
|
410 |
while( list($value,$desc) = each($options) )
|
411 |
+
echo "\t<option value=\"$value\"". ($ping_itunes==$value?' selected':''). ">$desc</option>\n";
|
412 |
|
413 |
?>
|
414 |
</select> Notify (ping) iTunes when you publish a new episode.
|
468 |
<?php } ?>
|
469 |
</td>
|
470 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
<?php
|
472 |
+
} // end advanced_mode
|
|
|
|
|
|
|
|
|
473 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
|
475 |
</table>
|
|
|
476 |
<?php
|
477 |
+
} // end itunes general
|
|
|
|
|
|
|
478 |
|
479 |
+
function powerpressadmin_edit_blubrry_services($General)
|
480 |
+
{
|
481 |
|
482 |
$ModeDesc = 'None';
|
483 |
if( $General['blubrry_auth'] )
|
489 |
$StatsInDashboard = false;
|
490 |
|
491 |
?>
|
492 |
+
<h3><?php _e("Blubrry Services Integration"); ?></h3>
|
493 |
<p>
|
494 |
Adds <a href="http://www.blubrry.com/podcast_statistics/" title="Blubrry Media Statistics" target="_blank">Blubrry Media Statistics</a> to your blog's <a href="<?php echo admin_url(); ?>" title="WordPress Dashboard">dashboard</a> plus
|
495 |
features for <a href="https://secure.blubrry.com/podcast-publishing-premium-with-hosting/" title="Blubrry Media Hosting" target="_blank">Blubrry Media Hosting</a> users to quickly select and publish uploaded media.
|
496 |
</p>
|
497 |
+
<p>
|
498 |
+
<em>Note: <strong>No membership or service is required</strong> to use this free open source podcasting plugin.</em>
|
499 |
+
</p>
|
500 |
<table class="form-table">
|
501 |
<tr valign="top">
|
502 |
<th scope="row">
|
503 |
+
<?php _e("Blubrry Services"); ?>*
|
504 |
</th>
|
505 |
<td>
|
506 |
+
<p style="margin-top: 5px;"><span id="service_mode"><?php echo $ModeDesc; ?></span> (<strong><a href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account'); ?>&KeepThis=true&TB_iframe=true&width=500&height=400&modal=true" target="_blank" class="thickbox" style="color: #3D517E;" title="Blubrry Services Integration">Click here to configure Blubrry Services</a></strong>)</p>
|
507 |
</td>
|
508 |
</tr>
|
509 |
|
515 |
<p style="margin-top: 5px;"><input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> /> Display Statistics in WordPress Dashboard</p>
|
516 |
</td>
|
517 |
</tr>
|
|
|
518 |
</table>
|
519 |
+
<p>
|
520 |
+
*<em>The Blubrry basic statistics service is FREE. Our
|
521 |
+
<a href="https://secure.blubrry.com/podcast-statistics-premium/" title="Blubrry Premium Statistics Service" target="_blank">Premium Statistics Service</a>,
|
522 |
+
which includes U.S. downloads, trending and exporting, is available for $5 month. Blubrry
|
523 |
+
<a href="https://secure.blubrry.com/podcast-publishing-premium-with-hosting/" title="Blubrry Media Hosting" target="_blank">Media Hosting</a>
|
524 |
+
packages start at $12.</em>
|
525 |
+
</p>
|
526 |
+
<?php
|
527 |
+
}
|
528 |
|
529 |
+
function powerpressadmin_edit_media_statistics($General)
|
530 |
+
{
|
531 |
+
?>
|
532 |
+
<h3><?php _e("Media Statistics"); ?></h3>
|
533 |
<p>
|
534 |
Enter your Redirect URL issued by your media statistics service provider below.
|
535 |
</p>
|
615 |
</tr>
|
616 |
</table>
|
617 |
</div>
|
618 |
+
<?php
|
619 |
+
}
|
620 |
|
621 |
+
function powerpressadmin_appearance($General=false)
|
622 |
+
{
|
623 |
+
if( $General === false )
|
624 |
+
$General = powerpress_get_settings('powerpress_general');
|
625 |
+
$General = powerpress_default_settings($General, 'appearance');
|
626 |
+
|
627 |
+
$Players = array('podcast'=>'Default Podcast (podcast)');
|
628 |
+
if( isset($General['custom_feeds']) )
|
629 |
+
{
|
630 |
+
while( list($podcast_slug, $podcast_title) = each($General['custom_feeds']) )
|
631 |
+
{
|
632 |
+
if( $podcast_slug == 'podcast' )
|
633 |
+
continue;
|
634 |
+
$Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
|
635 |
+
}
|
636 |
+
}
|
637 |
|
638 |
+
// <input type="hidden" name="action" value="powerpress-save-appearance" />
|
639 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
|
641 |
+
<h3><?php echo __("Appearance Settings"); ?></h3>
|
642 |
+
|
643 |
+
<table class="form-table">
|
644 |
|
645 |
<?php
|
646 |
+
if( @$General['advanced_mode'] )
|
647 |
+
{
|
648 |
+
?>
|
649 |
+
<tr valign="top">
|
650 |
+
<th scope="row"><?php echo __("Media Presentation"); ?></th>
|
651 |
+
<td><select name="General[display_player]" class="bpp_input_sm">
|
652 |
+
<?php
|
653 |
+
$displayoptions = array(1=>"Below Post", 2=>"Above Post", 0=>"None");
|
654 |
+
|
655 |
+
while( list($value,$desc) = each($displayoptions) )
|
656 |
+
echo "\t<option value=\"$value\"". ($General['display_player']==$value?' selected':''). ">$desc</option>\n";
|
657 |
|
|
|
|
|
658 |
?>
|
659 |
+
</select> (where player and/or links will be displayed)
|
660 |
+
<p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if($General['display_player_excerpt']) echo 'checked '; ?>/> Display player / links in <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="Explanation of an excerpt in Wordpress" target="_blank">excerpts</a> (e.g. search results)</p>
|
661 |
+
</td>
|
662 |
+
</tr>
|
663 |
+
|
664 |
+
<tr valign="top">
|
665 |
+
<th scope="row">
|
666 |
+
<?php _e("Display Media Player"); ?></th>
|
667 |
+
<td><select name="General[player_function]" class="bpp_input_med" onchange="javascript: jQuery('#new_window_settings').css('display', (this.value==1||this.value==3?'block':'none') );">
|
668 |
+
<?php
|
669 |
+
$playeroptions = array(1=>'On Page & New Window', 2=>'On Page Only', 3=>'New Window Only', /* 4=>'On Page Link', 5=>'On Page Link & New Window', */ 0=>'Disable');
|
670 |
+
|
671 |
+
while( list($value,$desc) = each($playeroptions) )
|
672 |
+
echo "\t<option value=\"$value\"". ($General['player_function']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
673 |
+
|
674 |
+
?>
|
675 |
+
</select>
|
676 |
+
</td>
|
677 |
+
</tr>
|
678 |
+
</table>
|
679 |
+
|
680 |
+
<div id="new_window_settings" style="display: <?php echo ( $General['player_function']==1 || $General['player_function']==3 ?'block':'none'); ?>">
|
681 |
<table class="form-table">
|
682 |
+
|
683 |
<tr valign="top">
|
684 |
+
<th scope="row">
|
685 |
+
<?php echo __("New Window Width"); ?>
|
686 |
+
</th>
|
687 |
<td>
|
688 |
+
<input type="text" name="General[new_window_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['new_window_width']; ?>" maxlength="4" />
|
689 |
+
Width of new window (leave blank for 320 default)
|
690 |
+
</td>
|
691 |
+
</tr>
|
692 |
+
|
693 |
+
<tr valign="top">
|
694 |
+
<th scope="row">
|
695 |
+
<?php echo __("New Window Height"); ?>
|
696 |
+
</th>
|
697 |
+
<td>
|
698 |
+
<input type="text" name="General[new_window_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['new_window_height']; ?>" maxlength="4" />
|
699 |
+
Height of new window (leave blank for 240 default)
|
700 |
</td>
|
701 |
</tr>
|
702 |
</table>
|
703 |
+
</div>
|
704 |
+
|
705 |
+
|
706 |
+
<table class="form-table">
|
707 |
+
|
708 |
+
<tr valign="top">
|
709 |
+
<th scope="row">
|
710 |
+
|
711 |
+
<?php _e("Download Link"); ?></th>
|
712 |
+
<td>
|
713 |
+
<select name="General[podcast_link]" class="bpp_input_med">
|
714 |
<?php
|
715 |
+
$linkoptions = array(1=>"Display", 2=>"Display with file size", 3=>"Display with file size and duration", 0=>"Disable");
|
716 |
+
|
717 |
+
while( list($value,$desc) = each($linkoptions) )
|
718 |
+
echo "\t<option value=\"$value\"". ($General['podcast_link']==$value?' selected':''). ">$desc</option>\n";
|
719 |
+
|
720 |
+
?>
|
721 |
+
</select>
|
722 |
+
</td>
|
723 |
+
</tr>
|
724 |
+
|
725 |
+
<?php
|
726 |
+
} // end advanced mode
|
727 |
+
?>
|
728 |
+
|
729 |
+
|
730 |
+
<tr valign="top">
|
731 |
+
<th scope="row" style="background-image: url(../wp-includes/images/smilies/icon_exclaim.gif); background-position: 10px 10px; background-repeat: no-repeat; ">
|
732 |
+
|
733 |
+
<div style="margin-left: 24px;"><?php _e("Having Theme Issues?"); ?></div></th>
|
734 |
+
<td>
|
735 |
+
<select name="General[player_aggressive]" class="bpp_input_med">
|
736 |
+
<?php
|
737 |
+
$linkoptions = array(0=>"No, everything is working great", 1=>"Yes, please try to fix");
|
738 |
+
|
739 |
+
while( list($value,$desc) = each($linkoptions) )
|
740 |
+
echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
|
741 |
+
|
742 |
+
?>
|
743 |
+
</select>
|
744 |
+
<p style="margin-top: 5px;">
|
745 |
+
Use this option if you are having problems with the players not appearing in your pages.
|
746 |
+
</p>
|
747 |
+
</td>
|
748 |
+
</tr>
|
749 |
+
</table>
|
750 |
+
|
751 |
+
|
752 |
+
|
753 |
+
<h3><?php echo __("Video Player Settings"); ?></h3>
|
754 |
+
|
755 |
+
<table class="form-table">
|
756 |
+
<tr valign="top">
|
757 |
+
<th scope="row">
|
758 |
+
<?php echo __("Player Width"); ?>
|
759 |
+
</th>
|
760 |
+
<td>
|
761 |
+
<input type="text" name="General[player_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_width']; ?>" maxlength="4" />
|
762 |
+
Width of player (leave blank for 320 default)
|
763 |
+
</td>
|
764 |
+
</tr>
|
765 |
+
|
766 |
+
<tr valign="top">
|
767 |
+
<th scope="row">
|
768 |
+
<?php echo __("Player Height"); ?>
|
769 |
+
</th>
|
770 |
+
<td>
|
771 |
+
<input type="text" name="General[player_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_height']; ?>" maxlength="4" />
|
772 |
+
Height of player (leave blank for 240 default)
|
773 |
+
</td>
|
774 |
+
</tr>
|
775 |
+
|
776 |
+
<tr valign="top">
|
777 |
+
<th scope="row">
|
778 |
+
<?php _e("QuickTime Scale"); ?></th>
|
779 |
+
<td>
|
780 |
+
<select name="General[player_scale]" class="bpp_input_sm" onchange="javascript:jQuery('#player_scale_custom').css('display', (this.value=='tofit'||this.value=='aspect'? 'none':'inline' ))">
|
781 |
+
<?php
|
782 |
+
$scale_options = array('tofit'=>"ToFit (default)", 'aspect'=>"Aspect" );
|
783 |
+
if( !isset($General['player_scale']) )
|
784 |
+
$General['player_scale'] = 'tofit'; // Tofit works in almost all cases
|
785 |
+
|
786 |
+
if( is_numeric($General['player_scale']) )
|
787 |
+
$scale_options[ $General['player_scale'] ]='Custom';
|
788 |
+
else
|
789 |
+
$scale_options['custom']='Custom';
|
790 |
+
|
791 |
+
|
792 |
+
|
793 |
+
while( list($value,$desc) = each($scale_options) )
|
794 |
+
echo "\t<option value=\"$value\"". ($General['player_scale']==$value?' selected':''). ">$desc</option>\n";
|
795 |
+
|
796 |
+
?>
|
797 |
+
</select>
|
798 |
+
<span id="player_scale_custom" style="display: <?php echo (is_numeric($General['player_scale'])?'inline':'none'); ?>">
|
799 |
+
Scale: <input type="text" name="PlayerScaleCustom" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9.]/g, '');" value="<?php echo (is_numeric($General['player_scale'])?$General['player_scale']:''); ?>" maxlength="4" /> e.g. 1.5
|
800 |
+
</span>
|
801 |
+
<p style="margin-top: 5px;">
|
802 |
+
If you do not see video, adjust the width, height and scale settings above.
|
803 |
+
</p>
|
804 |
+
</td>
|
805 |
+
</tr>
|
806 |
+
|
807 |
+
</table>
|
808 |
+
|
809 |
+
<h3>Audio Player Settings</h3>
|
810 |
+
<table class="form-table">
|
811 |
+
<tr valign="top">
|
812 |
+
<th scope="row">
|
813 |
+
<?php echo __("Default Player Width"); ?>
|
814 |
+
</th>
|
815 |
+
<td>
|
816 |
+
<input type="text" name="General[player_width_audio]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" value="<?php echo $General['player_width_audio']; ?>" maxlength="4" />
|
817 |
+
Width of Audio mp3 player (leave blank for 320 default)
|
818 |
+
</td>
|
819 |
+
</tr>
|
820 |
+
</table>
|
821 |
+
|
822 |
+
<?php
|
823 |
+
} // End powerpress_admin_appearance()
|
824 |
|
825 |
?>
|
powerpressadmin-customfeeds.php
CHANGED
@@ -20,9 +20,9 @@ function powerpress_admin_customfeeds()
|
|
20 |
|
21 |
|
22 |
?>
|
23 |
-
<h2><?php echo __("Custom Podcast
|
24 |
<p>
|
25 |
-
Custom podcast
|
26 |
</p>
|
27 |
<p>
|
28 |
If you are looking to organize episodes by topic, please use <a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php'); ?>" title="Category Podcast Feeds">Category Podcast Feeds</a>.
|
@@ -105,7 +105,7 @@ function powerpress_admin_customfeeds()
|
|
105 |
$columns = powerpress_admin_customfeeds_columns();
|
106 |
$hidden = array();
|
107 |
if( $feed_slug == 'podcast' )
|
108 |
-
$feed_title = 'Podcast Feed
|
109 |
$feed_title = wp_specialchars($feed_title);
|
110 |
if( $count % 2 == 0 )
|
111 |
echo '<tr valign="middle" class="alternate">';
|
@@ -136,7 +136,7 @@ function powerpress_admin_customfeeds()
|
|
136 |
}; break;
|
137 |
case 'name': {
|
138 |
|
139 |
-
echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . attribute_escape(sprintf(__('Edit "%s"'), $feed_title)) . '">'.$feed_title.'</a></strong
|
140 |
$actions = array();
|
141 |
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
|
142 |
$actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&action=powerpress-delete-feed&feed_slug=$feed_slug", 'powerpress-delete-feed-' . $feed_slug) . "' onclick=\"if ( confirm('" . js_escape(sprintf( __("You are about to delete feed '%s'\n 'Cancel' to stop, 'OK' to delete."), $feed_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
|
@@ -185,7 +185,7 @@ function powerpress_admin_customfeeds()
|
|
185 |
<div id="col-left">
|
186 |
<div class="col-wrap">
|
187 |
<div class="form-wrap">
|
188 |
-
<h3><?php _e('Add Podcast
|
189 |
<div id="ajax-response"></div>
|
190 |
<input type="hidden" name="action" value="powerpress-addfeed" />
|
191 |
<?php
|
@@ -205,7 +205,7 @@ function powerpress_admin_customfeeds()
|
|
205 |
<p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
|
206 |
</div>
|
207 |
|
208 |
-
<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Podcast
|
209 |
|
210 |
</div>
|
211 |
</div>
|
@@ -216,16 +216,16 @@ function powerpress_admin_customfeeds()
|
|
216 |
|
217 |
<h3>Example Usage</h3>
|
218 |
<p>
|
219 |
-
Example 1: You want to distribute both an mp3 and an ogg version of your podcast. Use the default podcast
|
220 |
-
media and create a custom
|
221 |
</p>
|
222 |
<p>
|
223 |
-
Example 2: You have a video podcast with multiple file formats. Use the default podcast
|
224 |
-
want to appear on your blog (e.g. m4v). Create additional
|
225 |
</p>
|
226 |
<p>
|
227 |
-
Example 3: You create two versions of your podcast, a 20 minute summary and a full 2 hour episode. Use the default
|
228 |
-
your 20 minute summary episodes and create a new custom
|
229 |
</p>
|
230 |
|
231 |
<?php
|
20 |
|
21 |
|
22 |
?>
|
23 |
+
<h2><?php echo __("Custom Podcast Channels"); ?></h2>
|
24 |
<p>
|
25 |
+
Custom podcast Channels allow you to associate multiple media files and/or formats to one blog post.
|
26 |
</p>
|
27 |
<p>
|
28 |
If you are looking to organize episodes by topic, please use <a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php'); ?>" title="Category Podcast Feeds">Category Podcast Feeds</a>.
|
105 |
$columns = powerpress_admin_customfeeds_columns();
|
106 |
$hidden = array();
|
107 |
if( $feed_slug == 'podcast' )
|
108 |
+
$feed_title = 'Podcast Feed';
|
109 |
$feed_title = wp_specialchars($feed_title);
|
110 |
if( $count % 2 == 0 )
|
111 |
echo '<tr valign="middle" class="alternate">';
|
136 |
}; break;
|
137 |
case 'name': {
|
138 |
|
139 |
+
echo '<td '.$class.'><strong><a class="row-title" href="'.$edit_link.'" title="' . attribute_escape(sprintf(__('Edit "%s"'), $feed_title)) . '">'.$feed_title.'</a></strong>'. ( $feed_slug == 'podcast' ?' (default channel)':'').'<br />';
|
140 |
$actions = array();
|
141 |
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
|
142 |
$actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&action=powerpress-delete-feed&feed_slug=$feed_slug", 'powerpress-delete-feed-' . $feed_slug) . "' onclick=\"if ( confirm('" . js_escape(sprintf( __("You are about to delete feed '%s'\n 'Cancel' to stop, 'OK' to delete."), $feed_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
|
185 |
<div id="col-left">
|
186 |
<div class="col-wrap">
|
187 |
<div class="form-wrap">
|
188 |
+
<h3><?php _e('Add Podcast Channel'); ?></h3>
|
189 |
<div id="ajax-response"></div>
|
190 |
<input type="hidden" name="action" value="powerpress-addfeed" />
|
191 |
<?php
|
205 |
<p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
|
206 |
</div>
|
207 |
|
208 |
+
<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Podcast Channel'); ?>" /></p>
|
209 |
|
210 |
</div>
|
211 |
</div>
|
216 |
|
217 |
<h3>Example Usage</h3>
|
218 |
<p>
|
219 |
+
Example 1: You want to distribute both an mp3 and an ogg version of your podcast. Use the default podcast channel for your mp3
|
220 |
+
media and create a custom channel for your ogg media.
|
221 |
</p>
|
222 |
<p>
|
223 |
+
Example 2: You have a video podcast with multiple file formats. Use the default podcast channel for the main media that you
|
224 |
+
want to appear on your blog (e.g. m4v). Create additional channels for the remaining formats (e.g. wmv, mov, mpeg).
|
225 |
</p>
|
226 |
<p>
|
227 |
+
Example 3: You create two versions of your podcast, a 20 minute summary and a full 2 hour episode. Use the default channel for
|
228 |
+
your 20 minute summary episodes and create a new custom channels for your full length episodes.
|
229 |
</p>
|
230 |
|
231 |
<?php
|
powerpressadmin-editfeed.php
CHANGED
@@ -105,20 +105,51 @@ function powerpress_languages()
|
|
105 |
$langs['uk'] = 'Ukranian';
|
106 |
return $langs;
|
107 |
}
|
108 |
-
|
109 |
-
function
|
110 |
{
|
111 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
$UploadArray = wp_upload_dir();
|
113 |
if( false === $UploadArray['error'] )
|
114 |
{
|
115 |
$upload_path = $UploadArray['basedir'].'/powerpress/';
|
116 |
|
117 |
if( !file_exists($upload_path) )
|
118 |
-
$
|
119 |
else
|
120 |
-
$
|
121 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
$General = powerpress_get_settings('powerpress_general');
|
123 |
|
124 |
|
@@ -131,6 +162,9 @@ function powerpress_admin_editfeed($feed_slug=false, $cat_ID =false)
|
|
131 |
$FeedSettings['title'] = $General['custom_feeds'][$feed_slug];
|
132 |
}
|
133 |
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
|
|
|
|
|
|
|
134 |
}
|
135 |
else if( $cat_ID )
|
136 |
{
|
@@ -146,38 +180,108 @@ function powerpress_admin_editfeed($feed_slug=false, $cat_ID =false)
|
|
146 |
$FeedTitle = __('Feed Settings');
|
147 |
if( $feed_slug )
|
148 |
{
|
149 |
-
$FeedTitle = sprintf( '
|
150 |
echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
|
151 |
}
|
152 |
else if( $cat_ID )
|
153 |
{
|
154 |
$category = get_category_to_edit($cat_ID);
|
155 |
-
$FeedTitle = sprintf( 'Category
|
156 |
echo sprintf('<input type="hidden" name="cat" value="%s" />', $cat_ID);
|
157 |
}
|
158 |
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
?>
|
161 |
-
<h2><?php echo $FeedTitle; ?></h2>
|
162 |
-
<?php if( $feed_slug ) { ?>
|
163 |
<input type="hidden" name="action" value="powerpress-save-customfeed" />
|
164 |
<p style="margin-bottom: 0;">
|
165 |
<?php _e('Configure your custom podcast feed.'); ?>
|
166 |
</p>
|
167 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
168 |
<input type="hidden" name="action" value="powerpress-save-categoryfeedsettings" />
|
169 |
<p style="margin-bottom: 0;">
|
170 |
<?php _e('Configure your category feed to support podcasting.'); ?>
|
171 |
</p>
|
172 |
-
<?php
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
178 |
<table class="form-table">
|
179 |
-
|
180 |
-
<?php
|
|
|
|
|
|
|
181 |
<tr valign="top">
|
182 |
<th scope="row">
|
183 |
|
@@ -201,28 +305,12 @@ function powerpress_admin_editfeed($feed_slug=false, $cat_ID =false)
|
|
201 |
<li><label><input type="radio" name="Feed[apply_to]" value="0" <?php if( $FeedSettings['apply_to'] == 0 ) echo 'checked'; ?> /> Do Not Enhance Feeds</label></li>
|
202 |
<li>
|
203 |
<ul>
|
204 |
-
<li>Feed Settings below will only apply to your podcast
|
205 |
</ul>
|
206 |
</li>
|
207 |
</ul>
|
208 |
-
|
209 |
-
<?php /* ?>
|
210 |
-
<select name="Feed[apply_to]" class="bpp_input_large" style="width: 60%;">
|
211 |
-
<?php
|
212 |
-
$applyoptions = array(1=>'All RSS2 Feeds (category / tag specific podcast feeds)', 2=>'Main RSS2 Feed only', 0=>'Disable (settings below ignored)');
|
213 |
-
|
214 |
-
while( list($value,$desc) = each($applyoptions) )
|
215 |
-
echo "\t<option value=\"$value\"". ($FeedSettings['apply_to']==$value?' selected':''). ">$desc</option>\n";
|
216 |
-
|
217 |
-
?>
|
218 |
-
</select>
|
219 |
-
<p>Select 'All RSS Feeds' to include podcast episodes in all feeds such as category and tag feeds.</p>
|
220 |
-
<p>Select 'Main RSS2 Feed only' to include podcast episodes only in your primary RSS2 feed.</p>
|
221 |
-
<p>Select 'Disable' to prevent Blubrry PowerPress from adding podcast episodes to any feeds.</p>
|
222 |
-
<?php */ ?>
|
223 |
</td>
|
224 |
</tr>
|
225 |
-
<?php } // End AdvancedMode ?>
|
226 |
|
227 |
<tr valign="top">
|
228 |
<th scope="row">
|
@@ -232,16 +320,17 @@ while( list($value,$desc) = each($applyoptions) )
|
|
232 |
<p style="margin-top: 5px; margin-bottom: 0;">Main RSS2 Feed: <a href="<?php echo get_bloginfo('rss2_url'); ?>" title="Main RSS 2 Feed" target="_blank"><?php echo get_bloginfo('rss2_url'); ?></a> | <a href="http://www.feedvalidator.org/check.cgi?url=<?php echo urlencode(get_bloginfo('rss2_url')); ?>" title="Validate Feed" target="_blank">validate</a></p>
|
233 |
</td>
|
234 |
</tr>
|
235 |
-
|
236 |
-
|
|
|
237 |
<tr valign="top">
|
238 |
<th scope="row">
|
239 |
|
240 |
-
<?php _e("
|
241 |
<td>
|
242 |
<?php
|
243 |
|
244 |
-
|
245 |
$Feeds = array('podcast'=>'Special Podcast only Feed');
|
246 |
if( isset($General['custom_feeds']['podcast']) )
|
247 |
$Feeds = $General['custom_feeds'];
|
@@ -250,22 +339,32 @@ while( list($value,$desc) = each($applyoptions) )
|
|
250 |
|
251 |
while( list($feed_slug, $feed_title) = each($Feeds) )
|
252 |
{
|
253 |
-
$edit_link = admin_url(
|
254 |
?>
|
255 |
<p><?php echo $feed_title; ?>: <a href="<?php echo get_feed_link($feed_slug); ?>" title="<?php echo $feed_title; ?>" target="_blank"><?php echo get_feed_link($feed_slug); ?></a>
|
256 |
| <a href="http://www.feedvalidator.org/check.cgi?url=<?php echo urlencode(get_feed_link($feed_slug)); ?>" title="Validate Feed" target="_blank">validate</a>
|
257 |
-
<?php if( $
|
258 |
-
| <a href="<?php echo $edit_link; ?>" title="Edit
|
259 |
<?php } ?>
|
260 |
</p>
|
261 |
<?php } ?>
|
262 |
</td>
|
263 |
</tr>
|
264 |
-
|
|
|
|
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
<tr valign="top">
|
267 |
<th scope="row">
|
268 |
-
<?php _e("Feed URL"); ?>
|
269 |
</th>
|
270 |
<td>
|
271 |
<?php if( $cat_ID ) { ?>
|
@@ -275,8 +374,17 @@ while( list($value,$desc) = each($applyoptions) )
|
|
275 |
<?php } ?>
|
276 |
</td>
|
277 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
|
279 |
-
|
|
|
|
|
|
|
280 |
<tr valign="top">
|
281 |
<th scope="row">
|
282 |
<?php _e("Feed Title"); ?>
|
@@ -320,7 +428,8 @@ while( list($value,$desc) = each($applyoptions) )
|
|
320 |
|
321 |
<?php
|
322 |
|
323 |
-
|
|
|
324 |
{
|
325 |
?>
|
326 |
<tr valign="top">
|
@@ -427,67 +536,272 @@ else
|
|
427 |
<td>
|
428 |
<input type="text" name="Feed[posts_per_rss]"style="width: 50px;" value="<?php echo $FeedSettings['posts_per_rss']; ?>" maxlength="5" /> episodes / posts per feed (leave blank to use blog default: <?php form_option('posts_per_rss'); ?>)
|
429 |
<?php if( !$feed_slug && !$cat_ID ) { ?>
|
430 |
-
<p style="margin-top: 5px; margin-bottomd: 0;">Note: Setting above applies only to
|
431 |
<?php } ?>
|
432 |
</td>
|
433 |
</tr>
|
434 |
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
|
|
|
|
|
|
438 |
|
439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
<td>
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
<input type="text" name="Feed[itunes_new_feed_url]"style="width: 55%;" value="<?php echo $FeedSettings['itunes_new_feed_url']; ?>" maxlength="250" />
|
456 |
-
</p>
|
457 |
-
<p style="margin-left: 25%;margin-top: 0;font-size: 90%;">(Leave blank for no New Feed URL)</p>
|
458 |
-
<p>More information regarding the iTunes New Feed URL is available <a href="http://www.apple.com/itunes/whatson/podcasts/specs.html#changing" target="_blank" title="Apple iTunes Podcasting Specificiations">here</a>.</p>
|
459 |
</div>
|
|
|
|
|
|
|
|
|
|
|
460 |
</td>
|
461 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
|
|
|
463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
<tr valign="top">
|
465 |
<th scope="row">
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
|
467 |
-
|
|
|
|
|
|
|
468 |
<td>
|
469 |
<p style="margin-top: 5px;">Your summary may not contain HTML and cannot exceed 4,000 characters in length.</p>
|
470 |
|
471 |
<textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo $FeedSettings['itunes_summary']; ?></textarea>
|
472 |
-
<?php if ( version_compare( '5', phpversion(), '>=' ) ) { ?>
|
473 |
-
<div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo ($FeedSettings['enhance_itunes_summary']?'checked ':''); ?>/> Optimize iTunes Summary from Blog Posts (<a href="http://help.blubrry.com/blubrry-powerpress/settings/enhanced-itunes-summary/" target="_blank">What's this</a>)
|
474 |
-
</div>
|
475 |
-
<?php } ?>
|
476 |
</td>
|
477 |
</tr>
|
478 |
|
479 |
<tr valign="top">
|
480 |
<th scope="row">
|
481 |
-
|
482 |
-
|
483 |
<td>
|
484 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
</td>
|
486 |
</tr>
|
487 |
-
<?php
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
<tr valign="top">
|
492 |
<th scope="row">
|
493 |
<?php _e("iTunes Program Keywords"); ?> <br />
|
@@ -520,7 +834,10 @@ reset($Categories);
|
|
520 |
</td>
|
521 |
</tr>
|
522 |
|
523 |
-
<?php
|
|
|
|
|
|
|
524 |
<tr valign="top">
|
525 |
<th scope="row">
|
526 |
<?php _e("iTunes Category 2"); ?>
|
@@ -561,7 +878,9 @@ reset($Categories);
|
|
561 |
</select>
|
562 |
</td>
|
563 |
</tr>
|
564 |
-
<?php
|
|
|
|
|
565 |
|
566 |
<tr valign="top">
|
567 |
<th scope="row">
|
@@ -600,59 +919,13 @@ while( list($value,$desc) = each($explicit) )
|
|
600 |
</td>
|
601 |
</tr>
|
602 |
|
603 |
-
<tr valign="top">
|
604 |
-
<th scope="row">
|
605 |
-
<?php _e("RSS2 Image"); ?> <br />
|
606 |
-
</th>
|
607 |
-
<td>
|
608 |
-
<input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%;" value="<?php echo $FeedSettings['rss2_image']; ?>" maxlength="250" />
|
609 |
-
<a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;">preview</a>
|
610 |
-
|
611 |
-
<p>Place the URL to the RSS image above. e.g. http://mysite.com/images/rss.jpg</p>
|
612 |
-
<p>RSS image should be at least 88 and at most 144 pixels wide and at least 31 and at most 400 pixels high in either .gif, .jpg and .png format. A square 144 x 144 pixel image is recommended.</p>
|
613 |
-
|
614 |
-
<?php if( $SupportUploads ) { ?>
|
615 |
-
<p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> Upload new image</p>
|
616 |
-
<div style="display:none" id="rss_image_upload">
|
617 |
-
<label for="rss2_image">Choose file:</label><input type="file" name="rss2_image_file" />
|
618 |
-
</div>
|
619 |
-
<?php } ?>
|
620 |
-
</td>
|
621 |
-
</tr>
|
622 |
-
|
623 |
-
<?php if( $AdvancedMode ) { ?>
|
624 |
-
<tr valign="top">
|
625 |
-
<th scope="row">
|
626 |
-
|
627 |
-
<?php _e("Feed Language"); ?></th>
|
628 |
-
<td>
|
629 |
<?php
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
?>
|
634 |
-
<select name="Feed[rss_language]" class="bpp_input_med">
|
635 |
-
<?php
|
636 |
-
$Languages = powerpress_languages();
|
637 |
-
|
638 |
-
echo '<option value="">Blog Default Language</option>';
|
639 |
-
while( list($value,$desc) = each($Languages) )
|
640 |
-
echo "\t<option value=\"$value\"". ($FeedSettings['rss_language']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
641 |
-
?>
|
642 |
-
</select>
|
643 |
-
<?php
|
644 |
-
$rss_language = get_option('rss_language');
|
645 |
-
if( isset($Languages[ $rss_language ]) )
|
646 |
-
{
|
647 |
?>
|
648 |
-
Blog Default: <?php echo $Languages[ $rss_language ]; ?>
|
649 |
-
<?php } ?>
|
650 |
-
</td>
|
651 |
-
</tr>
|
652 |
-
|
653 |
<tr valign="top">
|
654 |
<th scope="row">
|
655 |
-
<?php _e("Talent Name"); ?> <br />
|
656 |
</th>
|
657 |
<td>
|
658 |
<input type="text" name="Feed[itunes_talent_name]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
|
@@ -660,53 +933,56 @@ if( isset($Languages[ $rss_language ]) )
|
|
660 |
|
661 |
</td>
|
662 |
</tr>
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
<?php } // End AdvancedMode ?>
|
667 |
|
668 |
<tr valign="top">
|
669 |
<th scope="row">
|
670 |
-
<?php _e("Email"); ?>
|
671 |
</th>
|
672 |
<td>
|
673 |
<input type="text" name="Feed[email]" style="width: 60%;" value="<?php echo $FeedSettings['email']; ?>" maxlength="250" />
|
|
|
674 |
</td>
|
675 |
</tr>
|
676 |
|
677 |
-
<?php
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
<
|
683 |
-
<input type="text" name="Feed[copyright]" style="width: 60%;" value="<?php echo $FeedSettings['copyright']; ?>" maxlength="250" />
|
684 |
-
</td>
|
685 |
-
</tr>
|
686 |
-
<?php } // End AdvancedMode ?>
|
687 |
-
<?php if( $feed_slug ) { ?>
|
688 |
-
<tr valign="top">
|
689 |
-
<th scope="row">
|
690 |
-
<?php _e("Episode Box Background Color"); ?>
|
691 |
-
</th>
|
692 |
-
<td>
|
693 |
-
<input type="text" id="episode_background_color" name="EpisodeBoxBGColor[<?php echo $feed_slug; ?>]" style="width: 100px; float:left; border: 1px solid #333333; <?php if( !empty($General['episode_box_background_color'][ $feed_slug ]) ) echo 'background-color: '.$General['episode_box_background_color'][ $feed_slug ]; ?>;" value="<?php if( !empty($General['episode_box_background_color'][ $feed_slug ]) ) echo $General['episode_box_background_color'][ $feed_slug ]; ?>" maxlength="10" onblur="jQuery('#episode_background_color').css({'background-color' : this.value });" />
|
694 |
-
<div style="background-color: #FFDFEF;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#FFDFEF'; jQuery('#episode_background_color').css({'background-color' :'#FFDFEF' });"></div>
|
695 |
-
<div style="background-color: #FBECD8;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#FBECD8'; jQuery('#episode_background_color').css({'background-color' :'#FBECD8' });"></div>
|
696 |
-
<div style="background-color: #FFFFCC;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#FFFFCC'; jQuery('#episode_background_color').css({'background-color' :'#FFFFCC' });"></div>
|
697 |
-
<div style="background-color: #DFFFDF;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#DFFFDF'; jQuery('#episode_background_color').css({'background-color' :'#DFFFDF' });"></div>
|
698 |
|
699 |
-
|
700 |
-
<
|
701 |
-
<div
|
702 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
703 |
|
704 |
-
<div class="clear"></div>
|
705 |
-
</td>
|
706 |
-
</tr>
|
707 |
-
<?php } // end customm feeds ?>
|
708 |
</table>
|
709 |
<?php
|
710 |
-
|
711 |
|
712 |
?>
|
105 |
$langs['uk'] = 'Ukranian';
|
106 |
return $langs;
|
107 |
}
|
108 |
+
|
109 |
+
function powerpress_admin_capabilities()
|
110 |
{
|
111 |
+
global $wp_roles;
|
112 |
+
|
113 |
+
$capnames = array();
|
114 |
+
// Get Role List
|
115 |
+
foreach($wp_roles->role_objects as $key => $role) {
|
116 |
+
foreach($role->capabilities as $cap => $grant) {
|
117 |
+
$capnames[$cap] = ucwords( str_replace('_', ' ', $cap) );
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
$capnames = array_unique($capnames);
|
122 |
+
$remove_keys = array('level_0', 'level_1', 'level_2', 'level_3', 'level_4', 'level_5', 'level_6', 'level_7', 'level_8', 'level_9', 'level_10');
|
123 |
+
while( list($null,$key) = each($remove_keys) )
|
124 |
+
unset($capnames[ $key ]);
|
125 |
+
asort($capnames);
|
126 |
+
return $capnames;
|
127 |
+
}
|
128 |
+
$g_SupportUploads = null;
|
129 |
+
function powerpressadmin_support_uploads()
|
130 |
+
{
|
131 |
+
global $g_SupportUploads;
|
132 |
+
if( $g_SupportUploads != null )
|
133 |
+
return $g_SupportUploads;
|
134 |
+
|
135 |
+
$g_SupportUploads = false;
|
136 |
$UploadArray = wp_upload_dir();
|
137 |
if( false === $UploadArray['error'] )
|
138 |
{
|
139 |
$upload_path = $UploadArray['basedir'].'/powerpress/';
|
140 |
|
141 |
if( !file_exists($upload_path) )
|
142 |
+
$g_SupportUploads = @wp_mkdir_p( rtrim($upload_path, '/') );
|
143 |
else
|
144 |
+
$g_SupportUploads = true;
|
145 |
}
|
146 |
+
return $g_SupportUploads;
|
147 |
+
}
|
148 |
+
|
149 |
+
// powerpressadmin_editfeed.php
|
150 |
+
function powerpress_admin_editfeed($feed_slug=false, $cat_ID =false)
|
151 |
+
{
|
152 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
153 |
$General = powerpress_get_settings('powerpress_general');
|
154 |
|
155 |
|
162 |
$FeedSettings['title'] = $General['custom_feeds'][$feed_slug];
|
163 |
}
|
164 |
$FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
|
165 |
+
|
166 |
+
if( !isset($General['custom_feeds'][$feed_slug]) )
|
167 |
+
$General['custom_feeds'][$feed_slug] = 'Podcast (default)';
|
168 |
}
|
169 |
else if( $cat_ID )
|
170 |
{
|
180 |
$FeedTitle = __('Feed Settings');
|
181 |
if( $feed_slug )
|
182 |
{
|
183 |
+
$FeedTitle = sprintf( 'Edit Podcast Channel: %s', $General['custom_feeds'][$feed_slug]);
|
184 |
echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
|
185 |
}
|
186 |
else if( $cat_ID )
|
187 |
{
|
188 |
$category = get_category_to_edit($cat_ID);
|
189 |
+
$FeedTitle = sprintf( 'Edit Category Feed: %s', $FeedTitle, $category->name);
|
190 |
echo sprintf('<input type="hidden" name="cat" value="%s" />', $cat_ID);
|
191 |
}
|
192 |
|
193 |
+
echo '<h2>'. $FeedTitle .'</h2>';
|
194 |
+
?>
|
195 |
+
<div id="powerpress_settings_page" class="powerpress_tabbed_content">
|
196 |
+
<ul class="powerpress_settings_tabs">
|
197 |
+
<li><a href="#feed_tab_feed"><span>Feed Settings</span></a></li>
|
198 |
+
<li><a href="#feed_tab_itunes"><span>iTunes Settings</span></a></li>
|
199 |
+
<?php if( $feed_slug ) { ?>
|
200 |
+
<li><a href="#feed_tab_appearance"><span>Appearance</span></a></li>
|
201 |
+
<li><a href="#feed_tab_other"><span>Other Settings</span></a></li>
|
202 |
+
<?php } ?>
|
203 |
+
</ul>
|
204 |
+
|
205 |
+
|
206 |
+
<div id="feed_tab_feed" class="powerpress_tab">
|
207 |
+
<?php
|
208 |
+
//powerpressadmin_edit_feed_general($FeedSettings, $General);
|
209 |
+
//powerpressadmin_edit_feed_settings($FeedSettings, $General);
|
210 |
+
powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID, $feed_slug );
|
211 |
+
?>
|
212 |
+
</div>
|
213 |
+
|
214 |
+
<div id="feed_tab_itunes" class="powerpress_tab">
|
215 |
+
<?php
|
216 |
+
//powerpressadmin_edit_itunes_general($General);
|
217 |
+
if( $feed_slug != 'podcast' )
|
218 |
+
powerpressadmin_edit_itunes_general($General, $FeedSettings, $feed_slug, $cat_ID);
|
219 |
+
powerpressadmin_edit_itunes_feed($FeedSettings, $General);
|
220 |
+
?>
|
221 |
+
</div>
|
222 |
+
|
223 |
+
<?php if( $feed_slug ) { ?>
|
224 |
+
<div id="feed_tab_appearance" class="powerpress_tab">
|
225 |
+
<?php
|
226 |
+
//powerpressadmin_appearance($General);
|
227 |
+
powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_slug);
|
228 |
+
?>
|
229 |
+
</div>
|
230 |
+
|
231 |
+
<div id="feed_tab_other" class="powerpress_tab">
|
232 |
+
<?php
|
233 |
+
powerpressadmin_edit_basics_feed($General, $FeedSettings, $feed_slug)
|
234 |
+
?>
|
235 |
+
</div>
|
236 |
+
<?php } ?>
|
237 |
+
|
238 |
+
</div>
|
239 |
+
<div class="clear"></div>
|
240 |
+
<?php
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
|
245 |
+
//if( !$cat_ID && !$feed_slug )
|
246 |
+
// powerpressadmin_edit_feed_general($FeedSettings, $General);
|
247 |
+
|
248 |
+
|
249 |
+
|
250 |
+
|
251 |
+
}
|
252 |
+
|
253 |
+
function powerpressadmin_edit_podcast_channel($FeedSettings, $General)
|
254 |
+
{
|
255 |
+
// TODO
|
256 |
?>
|
|
|
|
|
257 |
<input type="hidden" name="action" value="powerpress-save-customfeed" />
|
258 |
<p style="margin-bottom: 0;">
|
259 |
<?php _e('Configure your custom podcast feed.'); ?>
|
260 |
</p>
|
261 |
+
<?php
|
262 |
+
}
|
263 |
+
|
264 |
+
function powerpressadmin_edit_category_feed($FeedSettings, $General)
|
265 |
+
{
|
266 |
+
?>
|
267 |
<input type="hidden" name="action" value="powerpress-save-categoryfeedsettings" />
|
268 |
<p style="margin-bottom: 0;">
|
269 |
<?php _e('Configure your category feed to support podcasting.'); ?>
|
270 |
</p>
|
271 |
+
<?php
|
272 |
+
}
|
273 |
+
|
274 |
+
function powerpressadmin_edit_feed_general($FeedSettings, $General)
|
275 |
+
{
|
276 |
+
$AdvancedMode = $General['advanced_mode'];
|
277 |
+
?>
|
278 |
+
<h3>Podcast Feeds</h3>
|
279 |
<table class="form-table">
|
280 |
+
|
281 |
+
<?php
|
282 |
+
if( @$General['advanced_mode'] )
|
283 |
+
{
|
284 |
+
?>
|
285 |
<tr valign="top">
|
286 |
<th scope="row">
|
287 |
|
305 |
<li><label><input type="radio" name="Feed[apply_to]" value="0" <?php if( $FeedSettings['apply_to'] == 0 ) echo 'checked'; ?> /> Do Not Enhance Feeds</label></li>
|
306 |
<li>
|
307 |
<ul>
|
308 |
+
<li>Feed Settings below will only apply to your podcast channel feeds</li>
|
309 |
</ul>
|
310 |
</li>
|
311 |
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
</td>
|
313 |
</tr>
|
|
|
314 |
|
315 |
<tr valign="top">
|
316 |
<th scope="row">
|
320 |
<p style="margin-top: 5px; margin-bottom: 0;">Main RSS2 Feed: <a href="<?php echo get_bloginfo('rss2_url'); ?>" title="Main RSS 2 Feed" target="_blank"><?php echo get_bloginfo('rss2_url'); ?></a> | <a href="http://www.feedvalidator.org/check.cgi?url=<?php echo urlencode(get_bloginfo('rss2_url')); ?>" title="Validate Feed" target="_blank">validate</a></p>
|
321 |
</td>
|
322 |
</tr>
|
323 |
+
<?php
|
324 |
+
}
|
325 |
+
?>
|
326 |
<tr valign="top">
|
327 |
<th scope="row">
|
328 |
|
329 |
+
<?php _e("Your Podcast Feeds"); ?></th>
|
330 |
<td>
|
331 |
<?php
|
332 |
|
333 |
+
//$General = get_option('powerpress_general');
|
334 |
$Feeds = array('podcast'=>'Special Podcast only Feed');
|
335 |
if( isset($General['custom_feeds']['podcast']) )
|
336 |
$Feeds = $General['custom_feeds'];
|
339 |
|
340 |
while( list($feed_slug, $feed_title) = each($Feeds) )
|
341 |
{
|
342 |
+
$edit_link = admin_url( 'admin.php?page=powerpress/powerpressadmin_customfeeds.php&action=powerpress-editfeed&feed_slug=') . $feed_slug;
|
343 |
?>
|
344 |
<p><?php echo $feed_title; ?>: <a href="<?php echo get_feed_link($feed_slug); ?>" title="<?php echo $feed_title; ?>" target="_blank"><?php echo get_feed_link($feed_slug); ?></a>
|
345 |
| <a href="http://www.feedvalidator.org/check.cgi?url=<?php echo urlencode(get_feed_link($feed_slug)); ?>" title="Validate Feed" target="_blank">validate</a>
|
346 |
+
<?php if( false && $feed_slug != 'podcast' ) { ?>
|
347 |
+
| <a href="<?php echo $edit_link; ?>" title="Edit Podcast Channel">edit</a>
|
348 |
<?php } ?>
|
349 |
</p>
|
350 |
<?php } ?>
|
351 |
</td>
|
352 |
</tr>
|
353 |
+
</table>
|
354 |
+
<?php
|
355 |
+
}
|
356 |
|
357 |
+
function powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID = false, $feed_slug = false)
|
358 |
+
{
|
359 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
360 |
+
if( $cat_ID || $feed_slug )
|
361 |
+
{
|
362 |
+
?>
|
363 |
+
<h3>Feed Information</h3>
|
364 |
+
<table class="form-table">
|
365 |
<tr valign="top">
|
366 |
<th scope="row">
|
367 |
+
<?php _e("Feed URL"); ?>
|
368 |
</th>
|
369 |
<td>
|
370 |
<?php if( $cat_ID ) { ?>
|
374 |
<?php } ?>
|
375 |
</td>
|
376 |
</tr>
|
377 |
+
</table>
|
378 |
+
<?php
|
379 |
+
}
|
380 |
+
?>
|
381 |
+
<h3>Feed Settings</h3>
|
382 |
+
<table class="form-table">
|
383 |
|
384 |
+
<?php
|
385 |
+
if( $feed_slug || $cat_ID )
|
386 |
+
{
|
387 |
+
?>
|
388 |
<tr valign="top">
|
389 |
<th scope="row">
|
390 |
<?php _e("Feed Title"); ?>
|
428 |
|
429 |
<?php
|
430 |
|
431 |
+
// TODO: This is a bug, user should be able to ping a specific feed without pinging the main feed.
|
432 |
+
if( false && $General['ping_itunes'] && $feed_slug != 'podcast' )
|
433 |
{
|
434 |
?>
|
435 |
<tr valign="top">
|
536 |
<td>
|
537 |
<input type="text" name="Feed[posts_per_rss]"style="width: 50px;" value="<?php echo $FeedSettings['posts_per_rss']; ?>" maxlength="5" /> episodes / posts per feed (leave blank to use blog default: <?php form_option('posts_per_rss'); ?>)
|
538 |
<?php if( !$feed_slug && !$cat_ID ) { ?>
|
539 |
+
<p style="margin-top: 5px; margin-bottomd: 0;">Note: Setting above applies only to podcast channel feeds</p>
|
540 |
<?php } ?>
|
541 |
</td>
|
542 |
</tr>
|
543 |
|
544 |
+
<tr valign="top">
|
545 |
+
<th scope="row">
|
546 |
+
<?php _e("RSS2 Image"); ?> <br />
|
547 |
+
</th>
|
548 |
+
<td>
|
549 |
+
<input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%;" value="<?php echo $FeedSettings['rss2_image']; ?>" maxlength="250" />
|
550 |
+
<a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;">preview</a>
|
551 |
|
552 |
+
<p>Place the URL to the RSS image above. e.g. http://mysite.com/images/rss.jpg</p>
|
553 |
+
<p>RSS image should be at least 88 and at most 144 pixels wide and at least 31 and at most 400 pixels high in either .gif, .jpg and .png format. A square 144 x 144 pixel image is recommended.</p>
|
554 |
+
|
555 |
+
<?php if( $SupportUploads ) { ?>
|
556 |
+
<p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> Upload new image</p>
|
557 |
+
<div style="display:none" id="rss_image_upload">
|
558 |
+
<label for="rss2_image">Choose file:</label><input type="file" name="rss2_image_file" />
|
559 |
+
</div>
|
560 |
+
<?php } ?>
|
561 |
+
</td>
|
562 |
+
</tr>
|
563 |
+
|
564 |
+
<?php
|
565 |
+
if( @$General['advanced_mode'] )
|
566 |
+
{
|
567 |
+
?>
|
568 |
+
<tr valign="top">
|
569 |
+
<th scope="row">
|
570 |
+
|
571 |
+
<?php _e("Feed Language"); ?></th>
|
572 |
+
<td>
|
573 |
+
<select name="Feed[rss_language]" class="bpp_input_med">
|
574 |
+
<?php
|
575 |
+
$Languages = powerpress_languages();
|
576 |
+
|
577 |
+
echo '<option value="">Blog Default Language</option>';
|
578 |
+
while( list($value,$desc) = each($Languages) )
|
579 |
+
echo "\t<option value=\"$value\"". ($FeedSettings['rss_language']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
580 |
+
?>
|
581 |
+
</select>
|
582 |
+
<?php
|
583 |
+
$rss_language = get_option('rss_language');
|
584 |
+
if( isset($Languages[ $rss_language ]) )
|
585 |
+
{
|
586 |
+
?>
|
587 |
+
Blog Default: <?php echo $Languages[ $rss_language ]; ?>
|
588 |
+
<?php } ?>
|
589 |
+
</td>
|
590 |
+
</tr>
|
591 |
+
|
592 |
+
<tr valign="top">
|
593 |
+
<th scope="row">
|
594 |
+
<?php _e("Copyright"); ?>
|
595 |
+
</th>
|
596 |
+
<td>
|
597 |
+
<input type="text" name="Feed[copyright]" style="width: 60%;" value="<?php echo $FeedSettings['copyright']; ?>" maxlength="250" />
|
598 |
+
</td>
|
599 |
+
</tr>
|
600 |
+
<?php
|
601 |
+
} // end advanced_mode
|
602 |
+
?>
|
603 |
+
</table>
|
604 |
+
<?php
|
605 |
+
}
|
606 |
+
|
607 |
+
|
608 |
+
function powerpressadmin_edit_basics_feed($General, $FeedSettings, $feed_slug)
|
609 |
+
{
|
610 |
+
?>
|
611 |
+
|
612 |
+
<h3>Episode Entry Box</h3>
|
613 |
+
<table class="form-table">
|
614 |
+
<tr valign="top">
|
615 |
+
<th scope="row">
|
616 |
+
<?php _e("Background Color"); ?>
|
617 |
+
</th>
|
618 |
+
<td>
|
619 |
+
<input type="text" id="episode_background_color" name="EpisodeBoxBGColor[<?php echo $feed_slug; ?>]" style="width: 100px; float:left; border: 1px solid #333333; <?php if( !empty($General['episode_box_background_color'][ $feed_slug ]) ) echo 'background-color: '.$General['episode_box_background_color'][ $feed_slug ]; ?>;" value="<?php if( !empty($General['episode_box_background_color'][ $feed_slug ]) ) echo $General['episode_box_background_color'][ $feed_slug ]; ?>" maxlength="10" onblur="jQuery('#episode_background_color').css({'background-color' : this.value });" />
|
620 |
+
<div style="background-color: #FFDFEF;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#FFDFEF'; jQuery('#episode_background_color').css({'background-color' :'#FFDFEF' });"></div>
|
621 |
+
<div style="background-color: #FBECD8;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#FBECD8'; jQuery('#episode_background_color').css({'background-color' :'#FBECD8' });"></div>
|
622 |
+
<div style="background-color: #FFFFCC;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#FFFFCC'; jQuery('#episode_background_color').css({'background-color' :'#FFFFCC' });"></div>
|
623 |
+
<div style="background-color: #DFFFDF;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#DFFFDF'; jQuery('#episode_background_color').css({'background-color' :'#DFFFDF' });"></div>
|
624 |
+
|
625 |
+
<div style="background-color: #EBFFFF;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#EBFFFF'; jQuery('#episode_background_color').css({'background-color' :'#EBFFFF' });"></div>
|
626 |
+
<div style="background-color: #D9E0EF;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#D9E0EF'; jQuery('#episode_background_color').css({'background-color' :'#D9E0EF' });"></div>
|
627 |
+
<div style="background-color: #EBE0EB;" class="powerpress_color_box" onclick="document.getElementById('episode_background_color').value='#EBE0EB'; jQuery('#episode_background_color').css({'background-color' :'#EBE0EB' });"></div>
|
628 |
+
(leave blank for default)
|
629 |
+
|
630 |
+
<p class="clear">Use a distinctive background color for this podcast channel's episode box.</p>
|
631 |
+
</td>
|
632 |
+
</tr>
|
633 |
+
</table>
|
634 |
+
|
635 |
+
<!-- password protected feed option -->
|
636 |
+
|
637 |
+
<?php
|
638 |
+
if( @$General['premium_caps'] && $feed_slug && $feed_slug != 'podcast' )
|
639 |
+
{
|
640 |
+
?>
|
641 |
+
<h3>Password Protect Podcast Channel</h3>
|
642 |
+
<p>
|
643 |
+
Require visitors to have membership to your blog in order to gain access to this channel's Premium Content.
|
644 |
+
</p>
|
645 |
+
<table class="form-table">
|
646 |
+
<tr valign="top">
|
647 |
+
<th scope="row">
|
648 |
+
|
649 |
+
<?php _e("Protect Content"); ?></th>
|
650 |
+
<td>
|
651 |
+
<p style="margin-top: 5px;"><input type="checkbox" name="ProtectContent" value="1" <?php echo ($FeedSettings['premium']?'checked ':''); ?> onchange="powerpress_toggle_premium_content(this.checked);" /> Require user to be signed-in to access feed.</p>
|
652 |
+
<?php ?>
|
653 |
+
<div style="margin-left: 20px; display: <?php echo ($FeedSettings['premium']?'block':'none'); ?>;" id="premium_role">User must have
|
654 |
+
<select name="Feed[premium]" class="bpp_input_med">
|
655 |
+
<?php
|
656 |
+
$caps = powerpress_admin_capabilities();
|
657 |
+
$actual_premium_value = $FeedSettings['premium'];
|
658 |
+
if( !isset($FeedSettings['premium']) || $FeedSettings['premium'] == '' )
|
659 |
+
$actual_premium_value = 'premium_content';
|
660 |
+
|
661 |
+
echo '<option value="">None</option>';
|
662 |
+
while( list($value,$desc) = each($caps) )
|
663 |
+
echo "\t<option value=\"$value\"". ($actual_premium_value==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
664 |
+
?>
|
665 |
+
</select> capability.</div>
|
666 |
+
</td>
|
667 |
+
</tr>
|
668 |
+
</table>
|
669 |
+
<div id="protected_content_message" style="display: <?php echo ($FeedSettings['premium']?'block':'none'); ?>;">
|
670 |
+
<script language="Javascript" type="text/javascript">
|
671 |
+
function powerpress_toggle_premium_content(enabled)
|
672 |
+
{
|
673 |
+
jQuery('#premium_role').css('display', (enabled?'block':'none') );
|
674 |
+
jQuery('#protected_content_message').css('display', (enabled?'block':'none') );
|
675 |
+
}
|
676 |
+
function powerpress_premium_label_append_signin_link()
|
677 |
+
{
|
678 |
+
jQuery('#premium_label').val( jQuery('#premium_label').val() + '<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php" title="Sign In">Sign In<\/a>');
|
679 |
+
}
|
680 |
+
function powerpress_default_premium_label(event)
|
681 |
+
{
|
682 |
+
if( confirm('Use default label, are you sure?') )
|
683 |
+
{
|
684 |
+
jQuery('#premium_label_custom').css('display', (this.checked==false?'block':'none') );
|
685 |
+
jQuery('#premium_label').val('');
|
686 |
+
}
|
687 |
+
else
|
688 |
+
{
|
689 |
+
return false;
|
690 |
+
}
|
691 |
+
return true;
|
692 |
+
}
|
693 |
+
</script>
|
694 |
+
<table class="form-table">
|
695 |
+
<tr valign="top">
|
696 |
+
<th scope="row">
|
697 |
+
<?php _e("Unauthorized Label"); ?>
|
698 |
+
</th>
|
699 |
<td>
|
700 |
+
<p style="margin-top: 5px;"><input type="radio" name="PremiumLabel" value="0" <?php echo ($FeedSettings['premium_label']==''?'checked ':''); ?> onclick="return powerpress_default_premium_label(this)" />
|
701 |
+
Use default label:
|
702 |
+
</p>
|
703 |
+
<p style="margin-left: 20px;">
|
704 |
+
<?php echo $FeedSettings['title']; ?>: <a href="<?php echo get_settings('siteurl'); ?>/wp-login.php" target="_blank" title="Protected Content">(Protected Content)</a>
|
705 |
+
</p>
|
706 |
+
<p style="margin-top: 5px;"><input type="radio" name="PremiumLabel" id="premium_label_1" value="1" <?php echo ($FeedSettings['premium_label']!=''?'checked ':''); ?> onchange="jQuery('#premium_label_custom').css('display', (this.checked?'block':'none') );" />
|
707 |
+
Use a custom label:
|
708 |
+
</p>
|
709 |
+
|
710 |
+
<div id="premium_label_custom" style="margin-left: 20px; display: <?php echo ($FeedSettings['premium_label']!=''?'block':'none'); ?>;">
|
711 |
+
<textarea name="Feed[premium_label]" id="premium_label" style="width: 80%; height: 65px; margin-bottom: 0; padding-bottom: 0;"><?php echo htmlspecialchars(@$FeedSettings['premium_label']); ?></textarea>
|
712 |
+
<div style="width: 80%; font-size: 85%; text-align: right;">
|
713 |
+
<a href="#" onclick="powerpress_premium_label_append_signin_link();return false;">Add sign in link to message</a>
|
|
|
|
|
|
|
|
|
714 |
</div>
|
715 |
+
<p style="width: 80%;">
|
716 |
+
Label above appears in place of the in-page player and links when
|
717 |
+
the current signed-in user does not have access to the protected content.
|
718 |
+
</p>
|
719 |
+
</div>
|
720 |
</td>
|
721 |
</tr>
|
722 |
+
</table>
|
723 |
+
</div>
|
724 |
+
<?php
|
725 |
+
}
|
726 |
+
}
|
727 |
+
|
728 |
+
function powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_slug)
|
729 |
+
{
|
730 |
+
// Appearance Settings
|
731 |
+
?>
|
732 |
+
<h3>Appearance Settings</h3>
|
733 |
+
<table class="form-table">
|
734 |
+
<tr valign="top">
|
735 |
+
<th scope="row">
|
736 |
+
<?php _e("Disable Player"); ?>
|
737 |
+
</th>
|
738 |
+
<td>
|
739 |
+
<input name="DisablePlayerFor" type="checkbox" <?php if( isset($General['disable_player'][$feed_slug]) ) echo 'checked '; ?> value="1" /> Do not display web player or links for this podcast channel.
|
740 |
+
<input type="hidden" name="UpdateDisablePlayer" value="<?php echo $feed_slug; ?>" />
|
741 |
+
</td>
|
742 |
+
</tr>
|
743 |
+
</table>
|
744 |
+
<?php
|
745 |
|
746 |
+
}
|
747 |
|
748 |
+
function powerpressadmin_edit_itunes_feed($FeedSettings, $General)
|
749 |
+
{
|
750 |
+
$SupportUploads = powerpressadmin_support_uploads();
|
751 |
+
?>
|
752 |
+
<h3>iTunes Feed Settings</h3>
|
753 |
+
<table class="form-table">
|
754 |
+
|
755 |
+
<?php
|
756 |
+
if( @$General['advanced_mode'] )
|
757 |
+
{
|
758 |
+
?>
|
759 |
<tr valign="top">
|
760 |
<th scope="row">
|
761 |
+
<?php _e("iTunes Program Subtitle"); ?> <br />
|
762 |
+
</th>
|
763 |
+
<td>
|
764 |
+
<input type="text" name="Feed[itunes_subtitle]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_subtitle']; ?>" maxlength="250" />
|
765 |
+
</td>
|
766 |
+
</tr>
|
767 |
|
768 |
+
<tr valign="top">
|
769 |
+
<th scope="row">
|
770 |
+
|
771 |
+
<?php _e("iTunes Program Summary"); ?></th>
|
772 |
<td>
|
773 |
<p style="margin-top: 5px;">Your summary may not contain HTML and cannot exceed 4,000 characters in length.</p>
|
774 |
|
775 |
<textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo $FeedSettings['itunes_summary']; ?></textarea>
|
|
|
|
|
|
|
|
|
776 |
</td>
|
777 |
</tr>
|
778 |
|
779 |
<tr valign="top">
|
780 |
<th scope="row">
|
781 |
+
|
782 |
+
<?php _e("iTunes Episode Summary"); ?></th>
|
783 |
<td>
|
784 |
+
|
785 |
+
<?php if ( version_compare( '5', phpversion(), '<=' ) ) { ?>
|
786 |
+
<div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo ($FeedSettings['enhance_itunes_summary']?'checked ':''); ?>/> Optimize iTunes Summary from Blog Posts (<a href="http://help.blubrry.com/blubrry-powerpress/settings/enhanced-itunes-summary/" target="_blank">What's this</a>)
|
787 |
+
</div>
|
788 |
+
<p>
|
789 |
+
Creates a friendlier view of your post/episode content by converting web links and images to clickable links in iTunes.
|
790 |
+
</p>
|
791 |
+
<?php } else { ?>
|
792 |
+
|
793 |
+
<strong>Option Not Available</strong>
|
794 |
+
|
795 |
+
<p>
|
796 |
+
This feature requires PHP version 5 or newer.
|
797 |
+
Your server's version of PHP is <?php echo phpversion(); ?>.
|
798 |
+
</p>
|
799 |
+
<?php } ?>
|
800 |
</td>
|
801 |
</tr>
|
802 |
+
<?php
|
803 |
+
}
|
804 |
+
?>
|
|
|
805 |
<tr valign="top">
|
806 |
<th scope="row">
|
807 |
<?php _e("iTunes Program Keywords"); ?> <br />
|
834 |
</td>
|
835 |
</tr>
|
836 |
|
837 |
+
<?php
|
838 |
+
if( @$General['advanced_mode'] )
|
839 |
+
{
|
840 |
+
?>
|
841 |
<tr valign="top">
|
842 |
<th scope="row">
|
843 |
<?php _e("iTunes Category 2"); ?>
|
878 |
</select>
|
879 |
</td>
|
880 |
</tr>
|
881 |
+
<?php
|
882 |
+
} // end advanced_mode
|
883 |
+
?>
|
884 |
|
885 |
<tr valign="top">
|
886 |
<th scope="row">
|
919 |
</td>
|
920 |
</tr>
|
921 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
922 |
<?php
|
923 |
+
if( @$General['advanced_mode'] )
|
924 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
925 |
?>
|
|
|
|
|
|
|
|
|
|
|
926 |
<tr valign="top">
|
927 |
<th scope="row">
|
928 |
+
<?php _e("iTunes Talent Name"); ?> <br />
|
929 |
</th>
|
930 |
<td>
|
931 |
<input type="text" name="Feed[itunes_talent_name]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
|
933 |
|
934 |
</td>
|
935 |
</tr>
|
936 |
+
<?php
|
937 |
+
}
|
938 |
+
?>
|
|
|
939 |
|
940 |
<tr valign="top">
|
941 |
<th scope="row">
|
942 |
+
<?php _e("iTunes Email"); ?>
|
943 |
</th>
|
944 |
<td>
|
945 |
<input type="text" name="Feed[email]" style="width: 60%;" value="<?php echo $FeedSettings['email']; ?>" maxlength="250" />
|
946 |
+
<div>(iTunes will email this address when your podcast is accepted into the iTunes Directory.)</div>
|
947 |
</td>
|
948 |
</tr>
|
949 |
|
950 |
+
<?php
|
951 |
+
if( @$General['advanced_mode'] )
|
952 |
+
{
|
953 |
+
?>
|
954 |
+
<tr valign="top">
|
955 |
+
<th scope="row" >
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
|
957 |
+
<?php _e("iTunes New Feed URL"); ?></th>
|
958 |
+
<td>
|
959 |
+
<div id="new_feed_url_step_1" style="display: <?php echo ($FeedSettings['itunes_new_feed_url'] || $FeedSettings['itunes_new_feed_url_podcast'] ?'none':'block'); ?>;">
|
960 |
+
<p style="margin-top: 5px;"><a href="#" onclick="return powerpress_new_feed_url_prompt();">Click here</a> if you need to change the Feed URL for iTunes subscribers.</p>
|
961 |
+
</div>
|
962 |
+
<div id="new_feed_url_step_2" style="display: <?php echo ($FeedSettings['itunes_new_feed_url'] || $FeedSettings['itunes_new_feed_url_podcast'] ?'block':'none'); ?>;">
|
963 |
+
<p style="margin-top: 5px;"><strong>WARNING: Changes made here are permanent. If the New Feed URL entered is incorrect, you will lose subscribers and will no longer be able to update your listing in the iTunes Store.</strong></p>
|
964 |
+
<p><strong>DO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.</strong></p>
|
965 |
+
<p>
|
966 |
+
Apple recommends you maintain the <itunes:new-feed-url> tag in your feed for at least two weeks to ensure that most subscribers will receive the new New Feed URL.
|
967 |
+
</p>
|
968 |
+
<p>
|
969 |
+
Example URL: <?php echo get_feed_link( ($feed_slug?$feed_slug:'podcast') ); ?>
|
970 |
+
</p>
|
971 |
+
<p style="margin-bottom: 0;">
|
972 |
+
<label style="width: 25%; float:left; display:block; font-weight: bold;">New Feed URL</label>
|
973 |
+
<input type="text" name="Feed[itunes_new_feed_url]"style="width: 55%;" value="<?php echo $FeedSettings['itunes_new_feed_url']; ?>" maxlength="250" />
|
974 |
+
</p>
|
975 |
+
<p style="margin-left: 25%;margin-top: 0;font-size: 90%;">(Leave blank for no New Feed URL)</p>
|
976 |
+
<p>More information regarding the iTunes New Feed URL is available <a href="http://www.apple.com/itunes/whatson/podcasts/specs.html#changing" target="_blank" title="Apple iTunes Podcasting Specificiations">here</a>.</p>
|
977 |
+
</div>
|
978 |
+
</td>
|
979 |
+
</tr>
|
980 |
+
<?php
|
981 |
+
} // end advanced_mode
|
982 |
+
?>
|
983 |
|
|
|
|
|
|
|
|
|
984 |
</table>
|
985 |
<?php
|
986 |
+
}
|
987 |
|
988 |
?>
|
powerpressadmin-metabox.php
CHANGED
@@ -100,14 +100,18 @@ function powerpress_meta_box($object, $box)
|
|
100 |
}
|
101 |
?>
|
102 |
<div id="powerpress_podcast_edit_<?php echo $FeedSlug; ?>">
|
103 |
-
<div class="error below-h2" id="powerpress_warning_<?php echo $FeedSlug; ?>" style="display:none;"
|
|
|
104 |
<div class="powerpress_row">
|
105 |
-
<label for
|
106 |
<div class="powerpress_row_content">
|
107 |
-
<input id="powerpress_url_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][url]" value="<?php echo $EnclosureURL; ?>"
|
108 |
<?php if( @$GeneralSettings['blubrry_hosting'] == 1 ) { ?>
|
109 |
-
|
110 |
<?php } ?>
|
|
|
|
|
|
|
111 |
<input type="hidden" id="powerpress_hosting_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][hosting]" value="0" />
|
112 |
<?php
|
113 |
|
@@ -128,11 +132,11 @@ function powerpress_meta_box($object, $box)
|
|
128 |
<label for "size">File Size</label>
|
129 |
<div class="powerpress_row_content">
|
130 |
<div style="margin-bottom: 4px;">
|
131 |
-
<input id="
|
132 |
</div>
|
133 |
<div>
|
134 |
-
<input id="
|
135 |
-
<input id="powerpress_size_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][size]" value="<?php echo $EnclosureLength; ?>" style="width: 110px; font-size: 90%;" /> in bytes
|
136 |
</div>
|
137 |
</div>
|
138 |
</div>
|
@@ -140,16 +144,16 @@ function powerpress_meta_box($object, $box)
|
|
140 |
<label for "size">Duration</label>
|
141 |
<div class="powerpress_row_content">
|
142 |
<div style="margin-bottom: 4px;">
|
143 |
-
<input id="
|
144 |
</div>
|
145 |
<div style="margin-bottom: 4px;">
|
146 |
-
<input id="
|
147 |
-
<input id="
|
148 |
-
<input id="
|
149 |
-
<input id="
|
150 |
</div>
|
151 |
<div>
|
152 |
-
<input id="
|
153 |
</div>
|
154 |
</div>
|
155 |
</div>
|
100 |
}
|
101 |
?>
|
102 |
<div id="powerpress_podcast_edit_<?php echo $FeedSlug; ?>">
|
103 |
+
<div class="error below-h2" id="powerpress_warning_<?php echo $FeedSlug; ?>" style="display:none;"></div>
|
104 |
+
<div class="success below-h2" id="powerpress_success_<?php echo $FeedSlug; ?>" style="display:none;"></div>
|
105 |
<div class="powerpress_row">
|
106 |
+
<label for="Powerpress[<?php echo $FeedSlug; ?>][url]">Media URL</label>
|
107 |
<div class="powerpress_row_content">
|
108 |
+
<input id="powerpress_url_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][url]" value="<?php echo $EnclosureURL; ?>" onchange="powerpress_check_url(this.value,'powerpress_warning_<?php echo $FeedSlug; ?>')" style="width: 70%; font-size: 90%;" />
|
109 |
<?php if( @$GeneralSettings['blubrry_hosting'] == 1 ) { ?>
|
110 |
+
<a href="<?php echo admin_url(); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=true" title="Select Media File" class="thickbox"><img src="<?php echo powerpress_get_root_url(); ?>/images/blubrry_folder.png" alt="Browse Media Files" /></a>
|
111 |
<?php } ?>
|
112 |
+
<input type="button" id="powerpress_check_<?php echo $FeedSlug; ?>_button" name="powerpress_check_<?php echo $FeedSlug; ?>_button" value="Verify" onclick="powerpress_get_media_info('<?php echo $FeedSlug; ?>');" alt="Verify Media" />
|
113 |
+
<img id="powerpress_check_<?php echo $FeedSlug; ?>" src="<?php echo admin_url(); ?>images/loading.gif" style="vertical-align:text-top; display: none;" alt="Checking Media" />
|
114 |
+
|
115 |
<input type="hidden" id="powerpress_hosting_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][hosting]" value="0" />
|
116 |
<?php
|
117 |
|
132 |
<label for "size">File Size</label>
|
133 |
<div class="powerpress_row_content">
|
134 |
<div style="margin-bottom: 4px;">
|
135 |
+
<input id="powerpress_set_size_0_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_size]" value="0" type="radio" <?php echo ($GeneralSettings['set_size']==0?'checked':''); ?> /> Auto detect file size
|
136 |
</div>
|
137 |
<div>
|
138 |
+
<input id="powerpress_set_size_1_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_size]" value="1" type="radio" <?php echo ($GeneralSettings['set_size']==1?'checked':''); ?> /> Specify:
|
139 |
+
<input id="powerpress_size_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][size]" value="<?php echo $EnclosureLength; ?>" style="width: 110px; font-size: 90%;" onchange="javascript:jQuery('#powerpress_set_size_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /> in bytes
|
140 |
</div>
|
141 |
</div>
|
142 |
</div>
|
144 |
<label for "size">Duration</label>
|
145 |
<div class="powerpress_row_content">
|
146 |
<div style="margin-bottom: 4px;">
|
147 |
+
<input id="powerpress_set_duration_0_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="0" type="radio" <?php echo ($GeneralSettings['set_duration']==0?'checked':''); ?> /> Auto detect duration (mp3's only)
|
148 |
</div>
|
149 |
<div style="margin-bottom: 4px;">
|
150 |
+
<input id="powerpress_set_duration_1_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="1" type="radio" <?php echo ($GeneralSettings['set_duration']==1?'checked':''); ?> /> Specify:
|
151 |
+
<input id="powerpress_duration_hh_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][duration_hh]" maxlength="2" value="<?php echo $DurationHH; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /><strong>:</strong>
|
152 |
+
<input id="powerpress_duration_mm_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][duration_mm]" maxlength="2" value="<?php echo $DurationMM; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /><strong>:</strong>
|
153 |
+
<input id="powerpress_duration_ss_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][duration_ss]" maxlength="10" value="<?php echo $DurationSS; ?>" style="width: 24px; font-size: 90%; text-align: right;" onchange="javascript:jQuery('#powerpress_set_duration_1_<?php echo $FeedSlug; ?>').attr('checked', true);" /> HH:MM:SS
|
154 |
</div>
|
155 |
<div>
|
156 |
+
<input id="powerpress_set_duration_2_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][set_duration]" value="-1" type="radio" <?php echo ($GeneralSettings['set_duration']==-1?'checked':''); ?> /> Not specified
|
157 |
</div>
|
158 |
</div>
|
159 |
</div>
|
powerpressadmin-mode.php
CHANGED
@@ -30,13 +30,9 @@
|
|
30 |
<p>Advanced Mode gives you all of the features packaged in Blubrry PowerPress. This mode is perfect for someone who may want to distribute multiple versions of their podcast, customize the web player & download links,
|
31 |
or import data from a previous podcasting platform.</p>
|
32 |
<ul><li>Features Include:<ul>
|
33 |
-
<li><em>Advanced Settings</em> - Tweak additional
|
34 |
<li><em>Presentation Settings</em> - Customize web player and media download links</li>
|
35 |
<li><em>Extensive Feed Settings</em> - Tweak all available feed settings</li>
|
36 |
-
<li><em>Manage Custom Podcast Feeds</em> - Manage and add custom podcast feeds</li>
|
37 |
-
<li><em>Manage Category Podcast Feeds</em> - Manage and add category podcast feeds</li>
|
38 |
-
<li><em>MP3 ID3 Tags</em> - Blubrry Media Hosting users can configure how their MP3 ID3 tags are written to hosted media</li>
|
39 |
-
<li><em>Useful Tools</em> - Import data from previous sites (PodPress, MovableType, Blogger), add Update Sservices to your blog and more</li>
|
40 |
</ul></li></ul>
|
41 |
|
42 |
</td>
|
30 |
<p>Advanced Mode gives you all of the features packaged in Blubrry PowerPress. This mode is perfect for someone who may want to distribute multiple versions of their podcast, customize the web player & download links,
|
31 |
or import data from a previous podcasting platform.</p>
|
32 |
<ul><li>Features Include:<ul>
|
33 |
+
<li><em>Advanced Settings</em> - Tweak additional settings.</li>
|
34 |
<li><em>Presentation Settings</em> - Customize web player and media download links</li>
|
35 |
<li><em>Extensive Feed Settings</em> - Tweak all available feed settings</li>
|
|
|
|
|
|
|
|
|
36 |
</ul></li></ul>
|
37 |
|
38 |
</td>
|
powerpressadmin-player-page.php
ADDED
@@ -0,0 +1,1612 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// PowerPress Player settings page
|
3 |
+
|
4 |
+
function powerpress_admin_players()
|
5 |
+
{
|
6 |
+
$General = powerpress_get_settings('powerpress_general');
|
7 |
+
$select_player = false;
|
8 |
+
if( isset($_GET['sp']) )
|
9 |
+
$select_player = true;
|
10 |
+
else if( !isset($General['player']) )
|
11 |
+
$select_player = true;
|
12 |
+
|
13 |
+
$Audio = array();
|
14 |
+
$Audio['default'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlowPlayerClassic.mp3';
|
15 |
+
$Audio['audio-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/1_Pixel_Out_Flash_Player.mp3';
|
16 |
+
$Audio['flashmp3-maxi'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Flash_Maxi_Player.mp3';
|
17 |
+
$Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3';
|
18 |
+
$Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3';
|
19 |
+
|
20 |
+
|
21 |
+
/*
|
22 |
+
<div><
|
23 |
+
object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30">
|
24 |
+
<PARAM NAME=movie VALUE="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><embed src="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div><!-- End of generated code -->
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
?>
|
29 |
+
<link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/css/colorpicker.css" type="text/css" />
|
30 |
+
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/js/colorpicker.js"></script>
|
31 |
+
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>player.js"></script>
|
32 |
+
<script type="text/javascript">
|
33 |
+
|
34 |
+
function rgb2hex(rgb) {
|
35 |
+
|
36 |
+
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
37 |
+
function hex(x) {
|
38 |
+
hexDigits = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
|
39 |
+
return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];
|
40 |
+
}
|
41 |
+
|
42 |
+
if( rgb )
|
43 |
+
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
44 |
+
return '';
|
45 |
+
}
|
46 |
+
|
47 |
+
function UpdatePlayerPreview(name, value)
|
48 |
+
{
|
49 |
+
if( typeof(generator) != "undefined" ) // Update the Maxi player...
|
50 |
+
{
|
51 |
+
generator.updateParam(name, value);
|
52 |
+
generator.updatePlayer();
|
53 |
+
}
|
54 |
+
|
55 |
+
if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player...
|
56 |
+
update_audio_player();
|
57 |
+
}
|
58 |
+
|
59 |
+
jQuery(document).ready(function($) {
|
60 |
+
|
61 |
+
jQuery('.color_preview').ColorPicker({
|
62 |
+
onSubmit: function(hsb, hex, rgb, el) {
|
63 |
+
jQuery(el).css({ 'background-color' : '#' + hex });
|
64 |
+
jQuery(el).ColorPickerHide();
|
65 |
+
var Id = jQuery(el).attr('id');
|
66 |
+
Id = Id.replace(/_prev/, '');
|
67 |
+
jQuery('#'+ Id ).val( '#' + hex );
|
68 |
+
UpdatePlayerPreview(Id, '#'+hex );
|
69 |
+
},
|
70 |
+
onBeforeShow: function () {
|
71 |
+
jQuery(this).ColorPickerSetColor( rgb2hex( jQuery(this).css("background-color") ) );
|
72 |
+
}
|
73 |
+
})
|
74 |
+
.bind('keyup', function(){
|
75 |
+
jQuery(this).ColorPickerSetColor( rgb2hex( jQuery(this).css("background-color") ) );
|
76 |
+
});
|
77 |
+
|
78 |
+
jQuery('.color_field').bind('change', function () {
|
79 |
+
var Id = jQuery(this).attr('id');
|
80 |
+
jQuery('#'+ Id + '_prev' ).css( { 'background-color' : jQuery(this).val() } );
|
81 |
+
if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player...
|
82 |
+
update_audio_player();
|
83 |
+
});
|
84 |
+
|
85 |
+
jQuery('.other_field').bind('change', function () {
|
86 |
+
if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player...
|
87 |
+
update_audio_player();
|
88 |
+
});
|
89 |
+
|
90 |
+
});
|
91 |
+
|
92 |
+
</script>
|
93 |
+
|
94 |
+
|
95 |
+
<!-- special page styling goes here -->
|
96 |
+
<style type="text/css">
|
97 |
+
div.color_control { display: block; float:left; width: 100%; padding: 0; }
|
98 |
+
div.color_control input { display: inline; float: left; }
|
99 |
+
div.color_control div.color_picker { display: inline; float: left; margin-top: 3px; }
|
100 |
+
#player_preview { margin-bottom: 0px; height: 50px; margin-top: 8px;}
|
101 |
+
input#colorpicker-value-input {
|
102 |
+
width: 60px;
|
103 |
+
height: 16px;
|
104 |
+
padding: 0;
|
105 |
+
margin: 0;
|
106 |
+
font-size: 12px;
|
107 |
+
}
|
108 |
+
</style>
|
109 |
+
<?php
|
110 |
+
|
111 |
+
// mainly 2 pages, first page selects a player, second configures the player, if there are optiosn to configure for that player. If the user is on the second page,
|
112 |
+
// a link should be provided to select a different player.
|
113 |
+
if( $select_player )
|
114 |
+
{
|
115 |
+
?>
|
116 |
+
<script language="javascript" type="text/javascript">
|
117 |
+
function powerpress_activate_player(Player)
|
118 |
+
{
|
119 |
+
jQuery('#player_'+Player).attr('checked', true);
|
120 |
+
jQuery("form:first").submit();
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
</script>
|
124 |
+
<input type="hidden" name="action" value="powerpress-select-player" />
|
125 |
+
<h2><?php echo __('Blubrry PowerPress Player Options'); ?></h2>
|
126 |
+
<p style="margin-bottom: 0;"><?php echo __('Select the media player you would like to use.'); ?></p>
|
127 |
+
<table class="form-table">
|
128 |
+
<tr valign="top">
|
129 |
+
<th scope="row"><?php echo __('Select Player'); ?></th>
|
130 |
+
<td>
|
131 |
+
|
132 |
+
<ul>
|
133 |
+
<li><label><input type="radio" name="Player[player]" id="player_default" value="default" <?php if( $General['player'] == 'default' || !isset($General['default']) ) echo 'checked'; ?> /> Flow Player Classic (default)</label>
|
134 |
+
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" onclick="return powerpress_activate_player('default');" title="Activate and Configure Flow Player Classic">Activate and Configure Now</a></strong>
|
135 |
+
</li>
|
136 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
137 |
+
<p>
|
138 |
+
<?php
|
139 |
+
$media_url = '';
|
140 |
+
$content = '';
|
141 |
+
$content .= '<div id="flow_player_classic"></div>'.PHP_EOL;
|
142 |
+
$content .= '<script type="text/javascript">'.PHP_EOL;
|
143 |
+
$content .= "pp_flashembed(\n";
|
144 |
+
$content .= " 'flow_player_classic',\n";
|
145 |
+
$content .= " {src: '". powerpress_get_root_url() ."FlowPlayerClassic.swf', width: 320, height: 24 },\n";
|
146 |
+
$content .= " {config: { autoPlay: false, autoBuffering: false, initialScale: 'scale', showFullScreenButton: false, showMenu: false, videoFile: '{$Audio['default']}', loop: false, autoRewind: true } }\n";
|
147 |
+
$content .= ");\n";
|
148 |
+
$content .= "</script>\n";
|
149 |
+
echo $content;
|
150 |
+
?>
|
151 |
+
</p>
|
152 |
+
<p>
|
153 |
+
Flow Player Classic is an open source flash player that supports both audio (mp3 only) and video (flv only) media files.
|
154 |
+
It includes all the necessary features for playback including a play/pause button, scrollable position bar, ellapsed time,
|
155 |
+
total time, mute button and volume control.
|
156 |
+
</p>
|
157 |
+
<p>
|
158 |
+
Flow Player Classic was chosen as the default player in Blubrry PowerPress because if its backwards compatibility with older versions of Flash and support for both audio and flash video.
|
159 |
+
</p>
|
160 |
+
</li>
|
161 |
+
|
162 |
+
<li><label><input type="radio" name="Player[player]" id="player_audio_player" value="audio-player" <?php if( $General['player'] == 'audio-player' ) echo 'checked'; ?> /> 1 Pixel Out Audio Player</label>
|
163 |
+
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" onclick="return powerpress_activate_player('audio_player');" title="Activate and Configure 1 Pixel Out Audio Player">Activate and Configure Now</a></strong>
|
164 |
+
</li>
|
165 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
166 |
+
<p>
|
167 |
+
<script language="JavaScript" src="<?php echo powerpressplayer_get_root_url();?>audio-player.js"></script>
|
168 |
+
<object type="application/x-shockwave-flash" data="<?php echo powerpressplayer_get_root_url();?>audio-player.swf" id="audioplayer1" height="24" width="290">
|
169 |
+
<param name="movie" value="<?php echo powerpressplayer_get_root_url();?>/audio-player.swf">
|
170 |
+
<param name="FlashVars" value="playerID=1&soundFile=<?php echo $Audio['audio-player']; ?>">
|
171 |
+
<param name="quality" value="high">
|
172 |
+
<param name="menu" value="false">
|
173 |
+
<param name="wmode" value="transparent">
|
174 |
+
</object> </p>
|
175 |
+
<p>
|
176 |
+
1 Pixel Out Audio Player is a popular customizable audio (mp3 only) flash player.
|
177 |
+
Features include an animated play/pause button, scrollable position bar, ellapsed/remaining time, volume control and color styling options.
|
178 |
+
</p>
|
179 |
+
</li>
|
180 |
+
|
181 |
+
<li><label><input type="radio" name="Player[player]" id="player_flashmp3_maxi" value="flashmp3-maxi" <?php if( $General['player'] == 'flashmp3-maxi' ) echo 'checked'; ?> /> Mp3 Player Maxi</label>
|
182 |
+
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" onclick="return powerpress_activate_player('flashmp3_maxi');" title="Activate and Configure Mp3 Player Maxi">Activate and Configure Now</a></strong>
|
183 |
+
</li>
|
184 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
185 |
+
<p>
|
186 |
+
<object type="application/x-shockwave-flash" data="<?php echo powerpressplayer_get_root_url(); ?>player_mp3_maxi.swf" width="200" height="20">
|
187 |
+
<param name="movie" value="<?php echo powerpressplayer_get_root_url(); ?>player_mp3_maxi.swf" />
|
188 |
+
<param name="bgcolor" value="#ffffff" />
|
189 |
+
<param name="FlashVars" value="mp3=<?php echo $Audio['flashmp3-maxi']; ?>&showstop=1&showinfo=1&showvolume=1" />
|
190 |
+
</object>
|
191 |
+
</p>
|
192 |
+
<p>
|
193 |
+
Flash Mp3 Maxi Player is a customizable open source audio (mp3 only) flash player. Features include pause/play/stop/file info buttons, scrollable position bar, volume control and color styling options.
|
194 |
+
</p>
|
195 |
+
</li>
|
196 |
+
|
197 |
+
<li><label><input type="radio" name="Player[player]" id="player_simple_flash" value="simple_flash" <?php if( $General['player'] == 'simple_flash' ) echo 'checked'; ?> /> Simple Flash MP3 Player</label>
|
198 |
+
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" onclick="return powerpress_activate_player('simple_flash');" title="Activate and Configure Simple Flash MP3 Player">Activate and Configure Now</a></strong>
|
199 |
+
</li>
|
200 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
201 |
+
<p>
|
202 |
+
|
203 |
+
<object type="application/x-shockwave-flash" data="<?php echo powerpressplayer_get_root_url(); ?>simple_mp3.swf" width="150" height="50">
|
204 |
+
<param name="movie" value="<?php echo powerpressplayer_get_root_url(); ?>simple_mp3.swf" />
|
205 |
+
<param name="wmode" value="transparent" />
|
206 |
+
<param name="FlashVars" value="url=<?php echo $Audio['simple_flash']; ?>&autostart=false" />
|
207 |
+
<param name="quality" value="high" />
|
208 |
+
<embed wmode="transparent" src="<?php echo get_bloginfo('home'); ?>?url=<?php echo $Audio['simple_flash']; ?>&autostart=false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="50"></embed>
|
209 |
+
</object>
|
210 |
+
</p>
|
211 |
+
<p>
|
212 |
+
Simple Flash MP3 Player is a free and simple audio (mp3 only) flash player. Features include play/pause and stop buttons.
|
213 |
+
</p>
|
214 |
+
</li>
|
215 |
+
|
216 |
+
<li><label><input type="radio" name="Player[player]" id="player_audioplay" value="audioplay" <?php if( $General['player'] == 'audioplay' ) echo 'checked'; ?> /> AudioPlay</label>
|
217 |
+
<strong style="padding-top: 8px; margin-left: 20px;"><a href="#" onclick="return powerpress_activate_player('audioplay');" title="Activate and Configure AudioPlay">Activate and Configure Now</a></strong>
|
218 |
+
</li>
|
219 |
+
<li style="margin-left: 30px; margin-bottom:16px;">
|
220 |
+
<p>
|
221 |
+
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30">
|
222 |
+
<param name="movie" value="<?php echo powerpressplayer_get_root_url(); ?>audioplay.swf?buttondir=<?php echo powerpressplayer_get_root_url(); ?>buttons/negative" />
|
223 |
+
<param name="quality" value="high" />
|
224 |
+
<param name="bgcolor" value="#FFFFFF" />
|
225 |
+
|
226 |
+
<param name="FlashVars" value="buttondir=<?php echo powerpressplayer_get_root_url(); ?>buttons/negative&mode=playstop" />
|
227 |
+
<embed src="<?php echo powerpressplayer_get_root_url(); ?>audioplay.swf?file=<?php echo $Audio['audioplay']; ?>&auto=no&&sendstop=yes&repeat=1&mode=playpause&buttondir=<?php echo powerpressplayer_get_root_url(); ?>buttons/negative" quality=high bgcolor=#FFFFFF width="30" height="30"
|
228 |
+
align="" TYPE="application/x-shockwave-flash"
|
229 |
+
pluginspage="http://www.macromedia.com/go/getflashplayer">
|
230 |
+
</embed>
|
231 |
+
|
232 |
+
</object>
|
233 |
+
|
234 |
+
</p>
|
235 |
+
<p>
|
236 |
+
AudioPlay is one button freeware audio (mp3 only) flash player. Features include a play/stop or play/pause button available in two sizes in either black or white.
|
237 |
+
</p>
|
238 |
+
</li>
|
239 |
+
|
240 |
+
|
241 |
+
</ul>
|
242 |
+
|
243 |
+
</td>
|
244 |
+
</tr>
|
245 |
+
</table>
|
246 |
+
<h4 style="margin-bottom: 0;">Click 'Save Changes' to activate and configure selected player.</h4>
|
247 |
+
<?php
|
248 |
+
}
|
249 |
+
else
|
250 |
+
{
|
251 |
+
?>
|
252 |
+
<h2><?php _e("Configure Player"); ?></h2>
|
253 |
+
<p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url(( @$General['advanced_mode']?'admin':'options-general').".php?page=powerpress/powerpressadmin_player.php&sp=1"); ?>" title="Select a different flash player">Select a different flash player</a></strong></p>
|
254 |
+
<?php
|
255 |
+
// Start adding logic here to display options based on the player selected...
|
256 |
+
switch( $General['player'] )
|
257 |
+
{
|
258 |
+
case 'audio-player': {
|
259 |
+
|
260 |
+
$PlayerSettings = powerpress_get_settings('powerpress_audio-player');
|
261 |
+
if($PlayerSettings == ""):
|
262 |
+
$PlayerSettings = array(
|
263 |
+
'width'=>'290',
|
264 |
+
'transparentpagebg' => 'yes',
|
265 |
+
'lefticon' => '#333333',
|
266 |
+
'leftbg' => '#CCCCCC',
|
267 |
+
'bg' => '#E5E5E5',
|
268 |
+
'voltrack' => '#F2F2F2',
|
269 |
+
'volslider' => '#666666',
|
270 |
+
'rightbg' => '#B4B4B4',
|
271 |
+
'rightbghover' => '#999999',
|
272 |
+
'righticon' => '#333333',
|
273 |
+
'righticonhover' => '#FFFFFF',
|
274 |
+
'loader' => '#009900',
|
275 |
+
'track' => '#FFFFFF',
|
276 |
+
'tracker' => '#DDDDDD',
|
277 |
+
'border' => '#CCCCCC',
|
278 |
+
'skip' => '#666666',
|
279 |
+
'text' => '#333333',
|
280 |
+
'pagebg' => '',
|
281 |
+
'rtl' => 'no',
|
282 |
+
'initialvolume'=>'60',
|
283 |
+
'animation'=>'yes'
|
284 |
+
);
|
285 |
+
endif;
|
286 |
+
$keys = array_keys($PlayerSettings);
|
287 |
+
$flashvars ='';
|
288 |
+
foreach ($keys as $key) {
|
289 |
+
if($PlayerSettings[$key] != "") {
|
290 |
+
$flashvars .= '&'. $key .'='. preg_replace('/\#/','',$PlayerSettings[$key]);
|
291 |
+
}
|
292 |
+
}
|
293 |
+
|
294 |
+
if($PlayerSettings['pagebg'] != ""){
|
295 |
+
$transparency = '<param name="bgcolor" value="'.$PlayerSettings['pagebg'].'" />';
|
296 |
+
$PlayerSettings['transparentpagebg'] = "no";
|
297 |
+
$flashvars .= '&transparentpagebg=no';
|
298 |
+
$flashvars .= '&pagebg='.$PlayerSettings['pagebg'];
|
299 |
+
}
|
300 |
+
else {
|
301 |
+
$PlayerSettings['transparentpagebg'] = "yes";
|
302 |
+
$transparency = '<param name="wmode" value="transparent" />';
|
303 |
+
$flashvars .= '&transparentpagebg=yes';
|
304 |
+
}
|
305 |
+
?>
|
306 |
+
|
307 |
+
<script type="text/javascript">
|
308 |
+
|
309 |
+
function update_audio_player()
|
310 |
+
{
|
311 |
+
var myParams = new Array("lefticon","leftbg", "bg", "voltrack", "rightbg", "rightbghover", "righticon", "righticonhover", "loader", "track", "tracker", "border", "skip", "text", "pagebg", "rtl", "animation", "titles", "initialvolume");
|
312 |
+
var myWidth = document.getElementById('player_width').value;
|
313 |
+
var myBackground = '';
|
314 |
+
if( myWidth < 10 || myWidth > 900 )
|
315 |
+
myWidth = 290;
|
316 |
+
|
317 |
+
var out = '<object type="application/x-shockwave-flash" data="<?php echo powerpressplayer_get_root_url();?>/audio-player.swf" width="'+myWidth+'" height="24">'+"\n";
|
318 |
+
out += ' <param name="movie" value="<?php echo powerpressplayer_get_root_url();?>/audio-player.swf" />'+"\n";
|
319 |
+
out += ' <param name="FlashVars" value="playerID=1&soundFile=<?php echo $Audio['audio-player']; ?>';
|
320 |
+
|
321 |
+
var x = 0;
|
322 |
+
for( x = 0; x < myParams.length; x++ )
|
323 |
+
{
|
324 |
+
if( myParams[ x ] == 'border' )
|
325 |
+
var Element = document.getElementById( 'player_border' );
|
326 |
+
else
|
327 |
+
var Element = document.getElementById( myParams[ x ] );
|
328 |
+
|
329 |
+
if( Element )
|
330 |
+
{
|
331 |
+
if( Element.value != '' )
|
332 |
+
{
|
333 |
+
out += '&';
|
334 |
+
out += myParams[ x ];
|
335 |
+
out += '=';
|
336 |
+
out += Element.value.replace(/^#/, '');
|
337 |
+
if( myParams[ x ] == 'pagebg' )
|
338 |
+
{
|
339 |
+
myBackground = '<param name="bgcolor" value="'+ Element.value +'" />';
|
340 |
+
out += '&transparentpagebg=no';
|
341 |
+
}
|
342 |
+
}
|
343 |
+
else
|
344 |
+
{
|
345 |
+
if( myParams[ x ] == 'pagebg' )
|
346 |
+
{
|
347 |
+
out += '&transparentpagebg=yes';
|
348 |
+
myBackground = '<param name="wmode" value="transparent" />';
|
349 |
+
}
|
350 |
+
}
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
out += '" />'+"\n";
|
355 |
+
out += '<param name="quality" value="high" />';
|
356 |
+
out += '<param name="menu" value="false" />';
|
357 |
+
out += myBackground;
|
358 |
+
out += '</object>';
|
359 |
+
|
360 |
+
var player = document.getElementById("player_preview");
|
361 |
+
player.innerHTML = out;
|
362 |
+
}
|
363 |
+
|
364 |
+
function audio_player_defaults()
|
365 |
+
{
|
366 |
+
if( confirm('Set defaults, are you sure?\n\nAll of the current settings will be overwritten!') )
|
367 |
+
{
|
368 |
+
jQuery('#player_width').val('290');
|
369 |
+
UpdatePlayerPreview('player_width',jQuery('#player_width').val() );
|
370 |
+
|
371 |
+
jQuery('#transparentpagebg').val( 'yes');
|
372 |
+
UpdatePlayerPreview('transparentpagebg',jQuery('#transparentpagebg').val() );
|
373 |
+
|
374 |
+
jQuery('#lefticon').val( '#333333');
|
375 |
+
UpdatePlayerPreview('lefticon',jQuery('#lefticon').val() );
|
376 |
+
jQuery('#lefticon_prev' ).css( { 'background-color' : '#333333' } );
|
377 |
+
|
378 |
+
jQuery('#leftbg').val( '#CCCCCC');
|
379 |
+
UpdatePlayerPreview('leftbg',jQuery('#leftbg').val() );
|
380 |
+
jQuery('#leftbg_prev' ).css( { 'background-color' : '#CCCCCC' } );
|
381 |
+
|
382 |
+
jQuery('#bg').val( '#E5E5E5');
|
383 |
+
UpdatePlayerPreview('bg',jQuery('#bg').val() );
|
384 |
+
jQuery('#bg_prev' ).css( { 'background-color' : '#E5E5E5' } );
|
385 |
+
|
386 |
+
jQuery('#voltrack').val( '#F2F2F2');
|
387 |
+
UpdatePlayerPreview('voltrack',jQuery('#voltrack').val() );
|
388 |
+
jQuery('#voltrack_prev' ).css( { 'background-color' : '#F2F2F2' } );
|
389 |
+
|
390 |
+
jQuery('#volslider').val( '#666666');
|
391 |
+
UpdatePlayerPreview('volslider',jQuery('#volslider').val() );
|
392 |
+
jQuery('#volslider_prev' ).css( { 'background-color' : '#666666' } );
|
393 |
+
|
394 |
+
jQuery('#rightbg').val( '#B4B4B4');
|
395 |
+
UpdatePlayerPreview('rightbg',jQuery('#rightbg').val() );
|
396 |
+
jQuery('#rightbg_prev' ).css( { 'background-color' : '#B4B4B4' } );
|
397 |
+
|
398 |
+
jQuery('#rightbghover').val( '#999999');
|
399 |
+
UpdatePlayerPreview('rightbghover',jQuery('#rightbghover').val() );
|
400 |
+
jQuery('#rightbghover_prev' ).css( { 'background-color' : '#999999' } );
|
401 |
+
|
402 |
+
jQuery('#righticon').val( '#333333');
|
403 |
+
UpdatePlayerPreview('righticon',jQuery('#righticon').val() );
|
404 |
+
jQuery('#righticon_prev' ).css( { 'background-color' : '#333333' } );
|
405 |
+
|
406 |
+
jQuery('#righticonhover').val( '#FFFFFF');
|
407 |
+
UpdatePlayerPreview('righticonhover',jQuery('#righticonhover').val() );
|
408 |
+
jQuery('#righticonhover_prev' ).css( { 'background-color' : '#FFFFFF' } );
|
409 |
+
|
410 |
+
jQuery('#loader').val( '#009900');
|
411 |
+
UpdatePlayerPreview('loader',jQuery('#loader').val() );
|
412 |
+
jQuery('#loader_prev' ).css( { 'background-color' : '#009900' } );
|
413 |
+
|
414 |
+
jQuery('#track').val( '#FFFFFF');
|
415 |
+
UpdatePlayerPreview('track',jQuery('#track').val() );
|
416 |
+
jQuery('#track_prev' ).css( { 'background-color' : '#FFFFFF' } );
|
417 |
+
|
418 |
+
jQuery('#tracker').val( '#DDDDDD');
|
419 |
+
UpdatePlayerPreview('tracker',jQuery('#tracker').val() );
|
420 |
+
jQuery('#tracker_prev' ).css( { 'background-color' : '#DDDDDD' } );
|
421 |
+
|
422 |
+
jQuery('#player_border').val( '#CCCCCC');
|
423 |
+
UpdatePlayerPreview('player_border',jQuery('#player_border').val() );
|
424 |
+
jQuery('#player_border_prev' ).css( { 'background-color' : '#CCCCCC' } );
|
425 |
+
|
426 |
+
jQuery('#skip').val( '#666666');
|
427 |
+
UpdatePlayerPreview('skip',jQuery('#skip').val() );
|
428 |
+
jQuery('#skip_prev' ).css( { 'background-color' : '#666666' } );
|
429 |
+
|
430 |
+
jQuery('#text').val( '#333333');
|
431 |
+
UpdatePlayerPreview('text',jQuery('#text').val() );
|
432 |
+
jQuery('#text_prev' ).css( { 'background-color' : '#333333' } );
|
433 |
+
|
434 |
+
jQuery('#pagebg').val( '');
|
435 |
+
UpdatePlayerPreview('pagebg',jQuery('#pagebg').val() );
|
436 |
+
|
437 |
+
jQuery('#animation').val( 'yes');
|
438 |
+
UpdatePlayerPreview('animation',jQuery('#animation').val() );
|
439 |
+
|
440 |
+
jQuery('#rtl' ).val( 'no' );
|
441 |
+
UpdatePlayerPreview('rtl',jQuery('#rtl').val() );
|
442 |
+
|
443 |
+
jQuery('#initialvolume').val('60');
|
444 |
+
UpdatePlayerPreview('initialvolume',jQuery('#initialvolume').val() );
|
445 |
+
|
446 |
+
update_audio_player();
|
447 |
+
}
|
448 |
+
}
|
449 |
+
|
450 |
+
</script>
|
451 |
+
<input type="hidden" name="action" value="powerpress-audio-player" />
|
452 |
+
Configure the 1 pixel out Audio Player
|
453 |
+
|
454 |
+
|
455 |
+
<table class="form-table">
|
456 |
+
|
457 |
+
<tr valign="top">
|
458 |
+
<th scope="row">
|
459 |
+
<?php _e("Preview of Player"); ?>
|
460 |
+
</th>
|
461 |
+
<td>
|
462 |
+
<div id="player_preview">
|
463 |
+
<object type="application/x-shockwave-flash" data="<?php echo powerpressplayer_get_root_url();?>audio-player.swf" id="audioplayer1" height="24" width="<?php echo $PlayerSettings['width']; ?>">
|
464 |
+
<param name="movie" value="<?php echo powerpressplayer_get_root_url();?>/audio-player.swf">
|
465 |
+
<param name="FlashVars" value="playerID=1&soundFile=<?php echo $Audio['audio-player']; ?><?php echo $flashvars;?>">
|
466 |
+
<param name="quality" value="high">
|
467 |
+
<param name="menu" value="false">
|
468 |
+
<?php echo $transparency; ?>
|
469 |
+
</object>
|
470 |
+
</div>
|
471 |
+
</td>
|
472 |
+
</tr>
|
473 |
+
</table>
|
474 |
+
|
475 |
+
<div id="powerpress_settings_page" class="powerpress_tabbed_content" style="position: relative;">
|
476 |
+
<div style="position: absolute; top: 6px; right:0px;">
|
477 |
+
<a href="#" onclick="audio_player_defaults();return false;">Set Defaults</a>
|
478 |
+
</div>
|
479 |
+
<ul class="powerpress_settings_tabs">
|
480 |
+
<li><a href="#tab_general"><span>Basic Settings</span></a></li>
|
481 |
+
<li><a href="#tab_progress"><span>Progress Bar</span></a></li>
|
482 |
+
<li><a href="#tab_volume"><span>Volume Button</span></a></li>
|
483 |
+
<li><a href="#tab_play"><span>Play / Pause Button</span></a></li>
|
484 |
+
</ul>
|
485 |
+
|
486 |
+
<div id="tab_general" class="powerpress_tab">
|
487 |
+
<h3>General Settings</h3>
|
488 |
+
<table class="form-table">
|
489 |
+
<tr valign="top">
|
490 |
+
<th scope="row">
|
491 |
+
<?php _e("Page Background Color"); ?>
|
492 |
+
|
493 |
+
</th>
|
494 |
+
<td>
|
495 |
+
<div class="color_control">
|
496 |
+
<input type="text" style="width: 100px;" id="pagebg" name="Player[pagebg]" class="color_field" value="<?php echo $PlayerSettings['pagebg']; ?>" maxlength="20" />
|
497 |
+
<img id="pagebg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['pagebg']; ?>;" class="color_preview" />
|
498 |
+
</div>
|
499 |
+
<small>(<?php _e('leave blank for transparent'); ?>)</small>
|
500 |
+
</td>
|
501 |
+
</tr> <tr valign="top">
|
502 |
+
<th scope="row">
|
503 |
+
<?php _e("Player Background Color"); ?>
|
504 |
+
</th>
|
505 |
+
<td>
|
506 |
+
<div class="color_control">
|
507 |
+
<input type="text" style="width: 100px;" id="bg" name="Player[bg]" class="color_field" value="<?php echo $PlayerSettings['bg']; ?>" maxlength="20" />
|
508 |
+
<img id="bg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bg']; ?>;" class="color_preview" />
|
509 |
+
</div>
|
510 |
+
</td>
|
511 |
+
</tr>
|
512 |
+
<tr valign="top">
|
513 |
+
<th scope="row">
|
514 |
+
<?php _e("Width (in pixels)"); ?>
|
515 |
+
</th>
|
516 |
+
<td>
|
517 |
+
<input type="text" style="width: 50px;" id="player_width" name="Player[width]" class="other_field" value="<?php echo $PlayerSettings['width']; ?>" maxlength="20" />
|
518 |
+
width of the player. e.g. 290 (290 pixels) or 100%
|
519 |
+
</td>
|
520 |
+
</tr>
|
521 |
+
<tr valign="top">
|
522 |
+
<th scope="row">
|
523 |
+
<?php _e("Right-to-Left"); ?>
|
524 |
+
</th>
|
525 |
+
<td>
|
526 |
+
<select style="width: 50px;" id="rtl" name="Player[rtl]" class="other_field">
|
527 |
+
<?php
|
528 |
+
$option = array('no','yes');
|
529 |
+
foreach($option as $option){
|
530 |
+
if($PlayerSettings['rtl'] == $option):
|
531 |
+
$selected = " SELECTED";
|
532 |
+
else:
|
533 |
+
$selected = "";
|
534 |
+
endif;
|
535 |
+
echo '<option value="'. $option .'"'. $selected .' >'. ucwords($option) .'</option>';
|
536 |
+
}?>
|
537 |
+
</select> switches the layout to animate from the right to the left
|
538 |
+
</td>
|
539 |
+
</tr>
|
540 |
+
|
541 |
+
<tr valign="top">
|
542 |
+
<th scope="row">
|
543 |
+
<?php _e("Loading Bar Color"); ?>
|
544 |
+
</th>
|
545 |
+
<td>
|
546 |
+
<div class="color_control">
|
547 |
+
<input type="text" style="width: 100px;" id="loader" name="Player[loader]" class="color_field" value="<?php echo $PlayerSettings['loader']; ?>" maxlength="20" />
|
548 |
+
<img id="loader_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['loader']; ?>;" class="color_preview" />
|
549 |
+
</div>
|
550 |
+
</td>
|
551 |
+
</tr>
|
552 |
+
|
553 |
+
<tr valign="top">
|
554 |
+
<th scope="row">
|
555 |
+
<?php _e("Text Color"); ?>
|
556 |
+
</th>
|
557 |
+
<td>
|
558 |
+
<div class="color_control">
|
559 |
+
<input type="text" style="width: 100px;" id="text" name="Player[text]" class="color_field" value="<?php echo $PlayerSettings['text']; ?>" maxlength="20" />
|
560 |
+
<img id="text_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['text']; ?>;" class="color_preview" />
|
561 |
+
</div>
|
562 |
+
</td>
|
563 |
+
</tr>
|
564 |
+
|
565 |
+
<tr valign="top">
|
566 |
+
<th scope="row">
|
567 |
+
<?php _e("Text In Player"); ?>
|
568 |
+
</th>
|
569 |
+
<td>
|
570 |
+
<input type="text" style="width: 60%;" id="titles" name="Player[titles]" class="other_field" value="<?php echo $PlayerSettings['titles']; ?>" maxlength="100" />
|
571 |
+
</td>
|
572 |
+
</tr>
|
573 |
+
|
574 |
+
<tr valign="top">
|
575 |
+
<th scope="row">
|
576 |
+
<?php _e("Play Animation"); ?>
|
577 |
+
</th>
|
578 |
+
<td>
|
579 |
+
<div class="color_control">
|
580 |
+
<select style="width: 50px;" id="animation" name="Player[animation]" class="other_field">
|
581 |
+
<?php
|
582 |
+
$option = array('yes','no');
|
583 |
+
foreach($option as $option){
|
584 |
+
if($PlayerSettings['animation'] == $option):
|
585 |
+
$selected = " SELECTED";
|
586 |
+
else:
|
587 |
+
$selected = "";
|
588 |
+
endif;
|
589 |
+
echo '<option value="'. $option .'"'. $selected .' >'. ucwords($option) .'</option>';
|
590 |
+
}?>
|
591 |
+
</select> if no, player is always open</div>
|
592 |
+
</td>
|
593 |
+
</tr>
|
594 |
+
|
595 |
+
</table>
|
596 |
+
</div>
|
597 |
+
|
598 |
+
<div id="tab_progress" class="powerpress_tab">
|
599 |
+
<h3>Progress Bar</h3>
|
600 |
+
<table class="form-table">
|
601 |
+
<tr valign="top">
|
602 |
+
<th scope="row">
|
603 |
+
<?php _e("Progress Bar Background"); ?>
|
604 |
+
</th>
|
605 |
+
<td>
|
606 |
+
<div class="color_control">
|
607 |
+
<input type="text" style="width: 100px;" id="track" name="Player[track]" class="color_field" value="<?php echo $PlayerSettings['track']; ?>" maxlength="20" />
|
608 |
+
<img id="track_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['track']; ?>;" class="color_preview" />
|
609 |
+
</div>
|
610 |
+
</td>
|
611 |
+
</tr>
|
612 |
+
<tr valign="top">
|
613 |
+
<th scope="row">
|
614 |
+
<?php _e("Progress Bar Color"); ?>
|
615 |
+
</th>
|
616 |
+
<td>
|
617 |
+
<div class="color_control">
|
618 |
+
<input type="text" style="width: 100px;" id="tracker" name="Player[tracker]" class="color_field" value="<?php echo $PlayerSettings['tracker']; ?>" maxlength="20" />
|
619 |
+
<img id="tracker_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['tracker']; ?>;" class="color_preview" />
|
620 |
+
</div>
|
621 |
+
</td>
|
622 |
+
</tr>
|
623 |
+
<tr valign="top">
|
624 |
+
<th scope="row">
|
625 |
+
<?php _e("Progress Bar Border"); ?>
|
626 |
+
</th>
|
627 |
+
<td>
|
628 |
+
<div class="color_control">
|
629 |
+
<input type="text" style="width: 100px;" id="player_border" name="Player[border]" class="color_field" value="<?php echo $PlayerSettings['border']; ?>" maxlength="20" />
|
630 |
+
<img id="player_border_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['border']; ?>;" class="color_preview" />
|
631 |
+
</div>
|
632 |
+
</td>
|
633 |
+
</tr>
|
634 |
+
</table>
|
635 |
+
</div>
|
636 |
+
|
637 |
+
|
638 |
+
<div id="tab_volume" class="powerpress_tab">
|
639 |
+
<h3>Volume Button Settings</h3>
|
640 |
+
<table class="form-table">
|
641 |
+
<tr valign="top">
|
642 |
+
<th scope="row">
|
643 |
+
<?php _e("Initial Volume"); ?>
|
644 |
+
</th>
|
645 |
+
<td>
|
646 |
+
<select style="width: 100px;" id="initialvolume" name="Player[initialvolume]" class="other_field">
|
647 |
+
<?php
|
648 |
+
|
649 |
+
for($x = 0; $x <= 100; $x +=5 )
|
650 |
+
{
|
651 |
+
echo '<option value="'. $x .'"'. ($PlayerSettings['initialvolume'] == $x?' selected':'') .'>'. $x .'%</option>';
|
652 |
+
}?>
|
653 |
+
</select> initial volume level (default: 60)
|
654 |
+
</td>
|
655 |
+
</tr>
|
656 |
+
|
657 |
+
<tr valign="top">
|
658 |
+
<th scope="row">
|
659 |
+
<?php _e("Volumn Background Color"); ?>
|
660 |
+
</th>
|
661 |
+
<td>
|
662 |
+
<div class="color_control">
|
663 |
+
<input type="text" style="width: 100px;" id="leftbg" name="Player[leftbg]" class="color_field" value="<?php echo $PlayerSettings['leftbg']; ?>" maxlength="20" />
|
664 |
+
<img id="leftbg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['leftbg']; ?>;" class="color_preview" />
|
665 |
+
</div>
|
666 |
+
</td>
|
667 |
+
</tr>
|
668 |
+
<tr valign="top">
|
669 |
+
<th scope="row">
|
670 |
+
<?php _e("Speaker Icon Color"); ?>
|
671 |
+
</th>
|
672 |
+
<td>
|
673 |
+
<div class="color_control">
|
674 |
+
<input type="text" style="width: 100px;" id="lefticon" name="Player[lefticon]" class="color_field" value="<?php echo $PlayerSettings['lefticon']; ?>" maxlength="20" />
|
675 |
+
<img id="lefticon_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['lefticon']; ?>;" class="color_preview" />
|
676 |
+
</div>
|
677 |
+
</td>
|
678 |
+
</tr>
|
679 |
+
<tr valign="top">
|
680 |
+
<th scope="row">
|
681 |
+
<?php _e("Volume Icon Background"); ?>
|
682 |
+
</th>
|
683 |
+
<td>
|
684 |
+
<div class="color_control">
|
685 |
+
<input type="text" style="width: 100px;" id="voltrack" name="Player[voltrack]" class="color_field" value="<?php echo $PlayerSettings['voltrack']; ?>" maxlength="20" />
|
686 |
+
<img id="voltrack_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['voltrack']; ?>;" class="color_preview" />
|
687 |
+
</div>
|
688 |
+
</td>
|
689 |
+
</tr>
|
690 |
+
<tr valign="top">
|
691 |
+
<th scope="row">
|
692 |
+
<?php _e("Volume Slider Color"); ?>
|
693 |
+
</th>
|
694 |
+
<td>
|
695 |
+
<div class="color_control">
|
696 |
+
<input type="text" style="width: 100px;" id="volslider" name="Player[volslider]" class="color_field" value="<?php echo $PlayerSettings['volslider']; ?>" maxlength="20" />
|
697 |
+
<img id="volslider_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['volslider']; ?>;" class="color_preview" />
|
698 |
+
</div>
|
699 |
+
</td>
|
700 |
+
</tr>
|
701 |
+
</table>
|
702 |
+
</div>
|
703 |
+
|
704 |
+
<div id="tab_play" class="powerpress_tab">
|
705 |
+
<h3>Play / Pause Button Settings</h3>
|
706 |
+
<table class="form-table">
|
707 |
+
<tr valign="top">
|
708 |
+
<th scope="row">
|
709 |
+
<?php _e("Play/Pause Background Color"); ?>
|
710 |
+
</th>
|
711 |
+
<td>
|
712 |
+
<div class="color_control">
|
713 |
+
<input type="text" style="width: 100px;" id="rightbg" name="Player[rightbg]" class="color_field" value="<?php echo $PlayerSettings['rightbg']; ?>" maxlength="20" />
|
714 |
+
<img id="rightbg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['rightbg']; ?>;" class="color_preview" />
|
715 |
+
</div>
|
716 |
+
</td>
|
717 |
+
</tr>
|
718 |
+
<tr valign="top">
|
719 |
+
<th scope="row">
|
720 |
+
<?php _e("Play/Pause Hover Color"); ?>
|
721 |
+
</th>
|
722 |
+
<td>
|
723 |
+
<div class="color_control">
|
724 |
+
<input type="text" style="width: 100px;" id="rightbghover" name="Player[rightbghover]" class="color_field" value="<?php echo $PlayerSettings['rightbghover']; ?>" maxlength="20" />
|
725 |
+
<img id="rightbghover_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['rightbghover']; ?>;" class="color_preview" />
|
726 |
+
</div>
|
727 |
+
</td>
|
728 |
+
</tr>
|
729 |
+
<tr valign="top">
|
730 |
+
<th scope="row">
|
731 |
+
<?php _e("Play/Pause Icon Color"); ?>
|
732 |
+
</th>
|
733 |
+
<td>
|
734 |
+
<div class="color_control">
|
735 |
+
<input type="text" style="width: 100px;" id="righticon" name="Player[righticon]" class="color_field" value="<?php echo $PlayerSettings['righticon']; ?>" maxlength="20" />
|
736 |
+
<img id="righticon_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['righticon']; ?>;" class="color_preview" />
|
737 |
+
</div>
|
738 |
+
</td>
|
739 |
+
</tr>
|
740 |
+
<tr valign="top">
|
741 |
+
<th scope="row">
|
742 |
+
<?php _e("Play/Pause Icon Hover Color"); ?>
|
743 |
+
</th>
|
744 |
+
<td>
|
745 |
+
<div class="color_control">
|
746 |
+
<input type="text" style="width: 100px;" id="righticonhover" name="Player[righticonhover]" class="color_field" value="<?php echo $PlayerSettings['righticonhover']; ?>" maxlength="20" />
|
747 |
+
<img id="righticonhover_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['righticonhover']; ?>;" class="color_preview" />
|
748 |
+
</div>
|
749 |
+
</td>
|
750 |
+
</tr>
|
751 |
+
|
752 |
+
</table>
|
753 |
+
</div> <!-- end tab -->
|
754 |
+
</div> <!-- end tab wrapper -->
|
755 |
+
|
756 |
+
<?php
|
757 |
+
}; break;
|
758 |
+
case 'simple_flash':{ ?>
|
759 |
+
<table class="form-table">
|
760 |
+
<tr valign="top">
|
761 |
+
<th scope="row">
|
762 |
+
<?php _e("Preview of Player"); ?>
|
763 |
+
</th>
|
764 |
+
<td>
|
765 |
+
<p>
|
766 |
+
<object type="application/x-shockwave-flash" data="<?php echo powerpressplayer_get_root_url(); ?>simple_mp3.swf" width="150" height="50">
|
767 |
+
<param name="movie" value="<?php echo powerpressplayer_get_root_url(); ?>simple_mp3.swf" />
|
768 |
+
<param name="wmode" value="transparent" />
|
769 |
+
<param name="FlashVars" value="url=<?php echo $Audio['simple_flash']; ?>&autostart=false" />
|
770 |
+
<param name="quality" value="high" />
|
771 |
+
<embed wmode="transparent" src="?url=<?php echo $Audio['simple_flash']; ?>&autostart=false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="50"></embed>
|
772 |
+
</object>
|
773 |
+
|
774 |
+
</p>
|
775 |
+
</td>
|
776 |
+
</tr>
|
777 |
+
|
778 |
+
<tr valign="top">
|
779 |
+
<th scope="row">
|
780 |
+
|
781 |
+
</th>
|
782 |
+
<td>
|
783 |
+
<p>Simple Flash Player has no additional settings.</p>
|
784 |
+
</td>
|
785 |
+
</tr>
|
786 |
+
</table>
|
787 |
+
<?php }; break;
|
788 |
+
|
789 |
+
case 'flashmp3-maxi': {
|
790 |
+
//get settings for Flash MP3 Maxi player
|
791 |
+
$PlayerSettings = powerpress_get_settings('powerpress_flashmp3-maxi');
|
792 |
+
|
793 |
+
|
794 |
+
//set array values for dropdown lists
|
795 |
+
$options = array('0','1');
|
796 |
+
$autoload = array('always','never','autohide');
|
797 |
+
$volume = array('0','25','50','75','100','125','150','175','200');
|
798 |
+
|
799 |
+
//set array values for flash variables with no dependencies
|
800 |
+
$keys = array('bgcolor1','bgcolor2','bgcolor','textcolor','buttoncolor','buttonovercolor','showstop','showinfo','showvolume','height','width','showloading','buttonwidth','volume','showslider');
|
801 |
+
|
802 |
+
//set PlayerSettings as blank array for initial setup
|
803 |
+
//This keeps the foreach loop from returning an error
|
804 |
+
if($PlayerSettings == ""){
|
805 |
+
$PlayerSettings = array(
|
806 |
+
'bgcolor1'=>'#7c7c7c',
|
807 |
+
'bgcolor2'=>'#333333',
|
808 |
+
'textcolor' => '#FFFFFF',
|
809 |
+
'buttoncolor' => '#FFFFFF',
|
810 |
+
'buttonovercolor' => '#FFFF00',
|
811 |
+
'showstop' => '0',
|
812 |
+
'showinfo' => '0',
|
813 |
+
'showvolume' => '1',
|
814 |
+
'height' => '20',
|
815 |
+
'width' => '200',
|
816 |
+
'showloading' => 'autohide',
|
817 |
+
'buttonwidth' => '26',
|
818 |
+
'volume' => '100',
|
819 |
+
'showslider' => '1',
|
820 |
+
'slidercolor1'=>'#cccccc',
|
821 |
+
'slidercolor2'=>'#888888',
|
822 |
+
'sliderheight' => '10',
|
823 |
+
'sliderwidth' => '20',
|
824 |
+
'loadingcolor' => '#FFFF00',
|
825 |
+
'volumeheight' => '6',
|
826 |
+
'volumewidth' => '30',
|
827 |
+
'sliderovercolor' => '#eeee00'
|
828 |
+
);
|
829 |
+
}
|
830 |
+
|
831 |
+
$flashvars = '';
|
832 |
+
$flashvars .= "mp3=".$Audio['flashmp3-maxi'];
|
833 |
+
|
834 |
+
//set non-blank options without dependencies as flash variables for preview
|
835 |
+
foreach($keys as $key) {
|
836 |
+
if($PlayerSettings[$key] != "") {
|
837 |
+
$flashvars .= '&'. $key .'='. preg_replace('/\#/','',$PlayerSettings[''.$key.'']);
|
838 |
+
}
|
839 |
+
}
|
840 |
+
//set slider dependencies
|
841 |
+
if($PlayerSettings['showslider'] != "0") {
|
842 |
+
if($PlayerSettings['sliderheight'] != "") {
|
843 |
+
$flashvars .= '&sliderheight='. $PlayerSettings['sliderheight'];
|
844 |
+
}
|
845 |
+
if($PlayerSettings['sliderwidth'] != "") {
|
846 |
+
$flashvars .= '&sliderwidth='. $PlayerSettings['sliderwidth'];
|
847 |
+
}
|
848 |
+
if($PlayerSettings['sliderovercolor'] != ""){
|
849 |
+
$flashvars .= '&sliderovercolor='. preg_replace('/\#/','',$PlayerSettings['sliderovercolor']);
|
850 |
+
}
|
851 |
+
}
|
852 |
+
//set volume dependencies
|
853 |
+
if($PlayerSettings['showvolume'] != "0") {
|
854 |
+
if($PlayerSettings['volumeheight'] != "") {
|
855 |
+
$flashvars .= '&volumeheight='. $PlayerSettings['volumeheight'];
|
856 |
+
}
|
857 |
+
if($PlayerSettings['volumewidth'] != "") {
|
858 |
+
$flashvars .= '&volumewidth='. $PlayerSettings['volumewidth'];
|
859 |
+
}
|
860 |
+
}
|
861 |
+
//set autoload dependencies
|
862 |
+
if($PlayerSettings['showautoload'] != "never") {
|
863 |
+
if($PlayerSettings['loadingcolor'] != "") {
|
864 |
+
$flashvars .= '&laodingcolor='. preg_replace('/\#/','',$PlayerSettings['loadingcolor']);
|
865 |
+
}
|
866 |
+
}
|
867 |
+
|
868 |
+
|
869 |
+
//set default width for object
|
870 |
+
if($PlayerSettings['width'] == ""){
|
871 |
+
$width = "200";
|
872 |
+
}else{
|
873 |
+
$width = $PlayerSettings['width'];
|
874 |
+
}
|
875 |
+
if($PlayerSettings['height'] == ""){
|
876 |
+
$height = "20";
|
877 |
+
}else{
|
878 |
+
$height = $PlayerSettings['height'];
|
879 |
+
}
|
880 |
+
|
881 |
+
//set background transparency
|
882 |
+
if($PlayerSettings['bgcolor'] != ""){
|
883 |
+
$transparency = '<param name="bgcolor" value="'. $color7 .'" />';
|
884 |
+
}else{
|
885 |
+
$transparency = '<param name="wmode" value="transparent" />';
|
886 |
+
}
|
887 |
+
|
888 |
+
//set flashvars
|
889 |
+
if($flashvars != ""){
|
890 |
+
$flashvars= '<param name="FlashVars" value="'. $flashvars .'" />'.PHP_EOL;
|
891 |
+
}
|
892 |
+
|
893 |
+
?>
|
894 |
+
<script type="text/javascript">
|
895 |
+
|
896 |
+
function audio_player_defaults()
|
897 |
+
{
|
898 |
+
if( confirm('Set defaults, are you sure?\n\nAll of the current settings will be overwritten!') )
|
899 |
+
{
|
900 |
+
jQuery('#bgcolor1').val('#7c7c7c');
|
901 |
+
UpdatePlayerPreview('bgcolor1',jQuery('#bgcolor1').val() );
|
902 |
+
jQuery('#bgcolor1_prev' ).css( { 'background-color' : '#7c7c7c' } );
|
903 |
+
|
904 |
+
jQuery('#bgcolor2').val('#333333' );
|
905 |
+
UpdatePlayerPreview('bgcolor2',jQuery('#bgcolor2').val() );
|
906 |
+
jQuery('#bgcolor2_prev' ).css( { 'background-color' : '#333333' } );
|
907 |
+
|
908 |
+
jQuery('#textcolor' ).val( '#FFFFFF' );
|
909 |
+
UpdatePlayerPreview('textcolor',jQuery('#textcolor').val() );
|
910 |
+
jQuery('#textcolor_prev' ).css( { 'background-color' : '#FFFFFF' } );
|
911 |
+
|
912 |
+
jQuery('#buttoncolor' ).val( '#FFFFFF' );
|
913 |
+
UpdatePlayerPreview('buttoncolor',jQuery('#buttoncolor').val() );
|
914 |
+
jQuery('#buttoncolor_prev' ).css( { 'background-color' : '#FFFFFF' } );
|
915 |
+
|
916 |
+
jQuery('#buttonovercolor' ).val( '#FFFF00' );
|
917 |
+
UpdatePlayerPreview('buttonovercolor',jQuery('#buttonovercolor').val() );
|
918 |
+
jQuery('#buttonovercolor_prev' ).css( { 'background-color' : '#FFFF00' } );
|
919 |
+
|
920 |
+
jQuery('#showstop' ).val( '0' );
|
921 |
+
UpdatePlayerPreview('showstop',jQuery('#showstop').val() );
|
922 |
+
jQuery('#showinfo' ).val( '0' );
|
923 |
+
UpdatePlayerPreview('showinfo',jQuery('#showinfo').val() );
|
924 |
+
jQuery('#showvolume' ).val( '1' );
|
925 |
+
UpdatePlayerPreview('showvolume',jQuery('#showvolume').val() );
|
926 |
+
|
927 |
+
jQuery('#player_height' ).val( '20' );
|
928 |
+
UpdatePlayerPreview('height',jQuery('#player_height').val() );
|
929 |
+
|
930 |
+
jQuery('#player_width' ).val( '200' );
|
931 |
+
UpdatePlayerPreview('width',jQuery('#player_width').val() );
|
932 |
+
|
933 |
+
jQuery('#showloading' ).val( 'autohide' );
|
934 |
+
UpdatePlayerPreview('showloading',jQuery('#showloading').val() );
|
935 |
+
|
936 |
+
|
937 |
+
jQuery('#slidercolor1').val('#cccccc' );
|
938 |
+
UpdatePlayerPreview('slidercolor1',jQuery('#slidercolor1').val() );
|
939 |
+
jQuery('#slidercolor1_prev' ).css( { 'background-color' : '#cccccc' } );
|
940 |
+
|
941 |
+
jQuery('#slidercolor2').val('#888888' );
|
942 |
+
UpdatePlayerPreview('slidercolor2',jQuery('#slidercolor2').val() );
|
943 |
+
jQuery('#slidercolor2_prev' ).css( { 'background-color' : '#888888' } );
|
944 |
+
|
945 |
+
jQuery('#sliderheight' ).val( '10' );
|
946 |
+
UpdatePlayerPreview('sliderheight',jQuery('#sliderheight').val() );
|
947 |
+
jQuery('#sliderwidth' ).val( '20' );
|
948 |
+
UpdatePlayerPreview('sliderwidth',jQuery('#sliderwidth').val() );
|
949 |
+
|
950 |
+
jQuery('#loadingcolor' ).val( '#FFFF00' );
|
951 |
+
UpdatePlayerPreview('loadingcolor',jQuery('#loadingcolor').val() );
|
952 |
+
jQuery('#loadingcolor_prev' ).css( { 'background-color' : '#FFFF00' } );
|
953 |
+
|
954 |
+
jQuery('#bgcolor').val('');
|
955 |
+
UpdatePlayerPreview('bgcolor',jQuery('#bgcolor').val() );
|
956 |
+
jQuery('#bgcolor_prev' ).css( { 'background-color' : '' } );
|
957 |
+
|
958 |
+
jQuery('#volumeheight' ).val( '6' );
|
959 |
+
UpdatePlayerPreview('volumeheight',jQuery('#volumeheight').val() );
|
960 |
+
jQuery('#volumewidth' ).val( '30' );
|
961 |
+
UpdatePlayerPreview('volumewidth',jQuery('#volumewidth').val() );
|
962 |
+
|
963 |
+
jQuery('#sliderovercolor' ).val( '#eeee00' );
|
964 |
+
UpdatePlayerPreview('sliderovercolor',jQuery('#sliderovercolor').val() );
|
965 |
+
jQuery('#sliderovercolor_prev' ).css( { 'background-color' : '#eeee00' } );
|
966 |
+
|
967 |
+
jQuery('#volume' ).val( '100' );
|
968 |
+
UpdatePlayerPreview('volume',jQuery('#volume').val() );
|
969 |
+
|
970 |
+
jQuery('#showslider' ).val( '1' );
|
971 |
+
UpdatePlayerPreview('showslider',jQuery('#showslider').val() );
|
972 |
+
|
973 |
+
jQuery('#buttonwidth' ).val( '26' );
|
974 |
+
UpdatePlayerPreview('buttonwidth',jQuery('#buttonwidth').val() );
|
975 |
+
|
976 |
+
//update_audio_player();
|
977 |
+
generator.updatePlayer();
|
978 |
+
}
|
979 |
+
}
|
980 |
+
|
981 |
+
</script>
|
982 |
+
<input type="hidden" name="action" value="powerpress-flashmp3-maxi" />
|
983 |
+
Configure the Flash Mp3 Maxi Player
|
984 |
+
<table class="form-table">
|
985 |
+
|
986 |
+
<tr valign="top">
|
987 |
+
<th scope="row">
|
988 |
+
<?php _e("Preview of Player"); ?>
|
989 |
+
</th>
|
990 |
+
<td>
|
991 |
+
<div id="player_preview">
|
992 |
+
<?php
|
993 |
+
|
994 |
+
$content = '<object type="application/x-shockwave-flash" data="'. powerpressplayer_get_root_url().'player_mp3_maxi.swf" width="'. $width.'" height="'. $height .'">'.PHP_EOL;
|
995 |
+
$content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'player_mp3_maxi.swf" />'.PHP_EOL;
|
996 |
+
$content .= $transparency.PHP_EOL;
|
997 |
+
$content .= $flashvars;
|
998 |
+
$content .= '</object>'.PHP_EOL;
|
999 |
+
|
1000 |
+
// print $content;
|
1001 |
+
?>
|
1002 |
+
</div>
|
1003 |
+
|
1004 |
+
<script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/maxi_player/generator.js"></script>
|
1005 |
+
<input type="hidden" id="gen_mp3" name="gen_mp3" value="<?php echo $Audio['flashmp3-maxi']; ?>" />
|
1006 |
+
|
1007 |
+
|
1008 |
+
</td>
|
1009 |
+
</tr>
|
1010 |
+
</table>
|
1011 |
+
|
1012 |
+
<div id="powerpress_settings_page" class="powerpress_tabbed_content" style="position: relative;">
|
1013 |
+
<div style="position: absolute; top: 6px; right:0px;">
|
1014 |
+
<a href="#" onclick="audio_player_defaults();return false;">Set Defaults</a>
|
1015 |
+
</div>
|
1016 |
+
<ul class="powerpress_settings_tabs">
|
1017 |
+
<li><a href="#tab_general"><span>Basic Settings</span></a></li>
|
1018 |
+
<li><a href="#tab_buttons"><span>Button Settings</span></a></li>
|
1019 |
+
<li><a href="#tab_volume"><span>Volume Settings</span></a></li>
|
1020 |
+
<li><a href="#tab_slider"><span>Slider Settings</span></a></li>
|
1021 |
+
</ul>
|
1022 |
+
|
1023 |
+
<div id="tab_general" class="powerpress_tab">
|
1024 |
+
<h3><?php _e('General Settings'); ?></h3>
|
1025 |
+
<table class="form-table">
|
1026 |
+
<tr valign="top">
|
1027 |
+
<td colspan="2">
|
1028 |
+
|
1029 |
+
<?php _e('leave blank for default values'); ?>
|
1030 |
+
</td>
|
1031 |
+
</tr>
|
1032 |
+
<tr valign="top">
|
1033 |
+
<th scope="row">
|
1034 |
+
<?php _e("Player Gradient Color Top"); ?>
|
1035 |
+
</th>
|
1036 |
+
<td>
|
1037 |
+
<div class="color_control">
|
1038 |
+
<input type="text" style="width: 100px;" id="bgcolor1" name="Player[bgcolor1]" class="color_field" value="<?php echo $PlayerSettings['bgcolor1']; ?>" maxlength="20" />
|
1039 |
+
<img id="bgcolor1_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor1']; ?>;" class="color_preview" />
|
1040 |
+
</div>
|
1041 |
+
</td>
|
1042 |
+
</tr>
|
1043 |
+
<tr valign="top">
|
1044 |
+
<th scope="row">
|
1045 |
+
<?php _e("Player Gradient Color Bottom"); ?>
|
1046 |
+
</th>
|
1047 |
+
<td>
|
1048 |
+
<div class="color_control">
|
1049 |
+
<input type="text" style="width: 100px;" id="bgcolor2" name="Player[bgcolor2]" class="color_field" value="<?php echo $PlayerSettings['bgcolor2']; ?>" maxlength="20" />
|
1050 |
+
<img id="bgcolor2_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor2']; ?>;" class="color_preview" />
|
1051 |
+
</div>
|
1052 |
+
</td>
|
1053 |
+
</tr>
|
1054 |
+
<tr valign="top">
|
1055 |
+
<th scope="row">
|
1056 |
+
<?php _e("Background Color"); ?>
|
1057 |
+
|
1058 |
+
</th>
|
1059 |
+
<td>
|
1060 |
+
<div class="color_control">
|
1061 |
+
<input type="text" style="width: 100px;" id="bgcolor" name="Player[bgcolor]" class="color_field" value="<?php echo $PlayerSettings['bgcolor']; ?>" maxlength="20" />
|
1062 |
+
<img id="bgcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor']; ?>;" class="color_preview" />
|
1063 |
+
</div>
|
1064 |
+
<small><?php _e("leave blank for transparent");?></small>
|
1065 |
+
</td>
|
1066 |
+
</tr>
|
1067 |
+
<tr valign="top">
|
1068 |
+
<th scope="row">
|
1069 |
+
<?php _e("Text Color"); ?>
|
1070 |
+
</th>
|
1071 |
+
<td>
|
1072 |
+
<div class="color_control">
|
1073 |
+
<input type="text" style="width: 100px;" id="textcolor" name="Player[textcolor]" class="color_field" value="<?php echo $PlayerSettings['textcolor']; ?>" maxlength="20" />
|
1074 |
+
<img id="textcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['textcolor']; ?>;" class="color_preview" />
|
1075 |
+
</div>
|
1076 |
+
</td>
|
1077 |
+
</tr>
|
1078 |
+
|
1079 |
+
<tr valign="top">
|
1080 |
+
<th scope="row">
|
1081 |
+
<?php _e("Player Height (in pixels)"); ?>
|
1082 |
+
</th>
|
1083 |
+
<td>
|
1084 |
+
<div class="color_control">
|
1085 |
+
<input type="text" style="width: 50px;" id="player_height" name="Player[height]" value="<?php echo $PlayerSettings['height']; ?>" maxlength="20" />
|
1086 |
+
</div>
|
1087 |
+
</td>
|
1088 |
+
</tr>
|
1089 |
+
<tr valign="top">
|
1090 |
+
<th scope="row">
|
1091 |
+
<?php _e("Player Width (in pixels)"); ?>
|
1092 |
+
</th>
|
1093 |
+
<td>
|
1094 |
+
<div class="color_control">
|
1095 |
+
<input type="text" style="width: 50px;" id="player_width" name="Player[width]" value="<?php echo $PlayerSettings['width']; ?>" maxlength="20" />
|
1096 |
+
</div>
|
1097 |
+
</td>
|
1098 |
+
</tr>
|
1099 |
+
</table>
|
1100 |
+
</div>
|
1101 |
+
|
1102 |
+
<div id="tab_buttons" class="powerpress_tab">
|
1103 |
+
<h3><?php _e('Button Settings'); ?></h3>
|
1104 |
+
<table class="form-table">
|
1105 |
+
<tr valign="top">
|
1106 |
+
<th scope="row">
|
1107 |
+
<?php _e("Button Color"); ?>
|
1108 |
+
</th>
|
1109 |
+
<td>
|
1110 |
+
<div class="color_control">
|
1111 |
+
<input type="text" style="width: 100px;" id="buttoncolor" name="Player[buttoncolor]" class="color_field" value="<?php echo $PlayerSettings['buttoncolor']; ?>" maxlength="20" />
|
1112 |
+
<img id="buttoncolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['buttoncolor']; ?>;" class="color_preview" />
|
1113 |
+
</div>
|
1114 |
+
</td>
|
1115 |
+
</tr>
|
1116 |
+
<tr valign="top">
|
1117 |
+
<th scope="row">
|
1118 |
+
<?php _e("Button Hover Color"); ?>
|
1119 |
+
</th>
|
1120 |
+
<td>
|
1121 |
+
<div class="color_control">
|
1122 |
+
<input type="text" style="width: 100px;" id="buttonovercolor" name="Player[buttonovercolor]" class="color_field" value="<?php echo $PlayerSettings['buttonovercolor']; ?>" maxlength="20" />
|
1123 |
+
<img id="buttonovercolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['buttonovercolor']; ?>;" class="color_preview" />
|
1124 |
+
</div>
|
1125 |
+
</td>
|
1126 |
+
</tr>
|
1127 |
+
<tr valign="top">
|
1128 |
+
<th scope="row">
|
1129 |
+
<?php _e("Button Width (in pixels)"); ?>
|
1130 |
+
</th>
|
1131 |
+
<td>
|
1132 |
+
<div class="color_control">
|
1133 |
+
<input type="text" style="width: 50px;" id="buttonwidth" name="Player[buttonwidth]" value="<?php echo $PlayerSettings['buttonwidth']; ?>" maxlength="20" />
|
1134 |
+
</div>
|
1135 |
+
</td>
|
1136 |
+
</tr>
|
1137 |
+
<tr valign="top">
|
1138 |
+
<th scope="row">
|
1139 |
+
<?php _e("Show Stop Button"); ?>
|
1140 |
+
</th>
|
1141 |
+
<td>
|
1142 |
+
<div class="color_control">
|
1143 |
+
<select style="width: 100px;" id="showstop" name="Player[showstop]">
|
1144 |
+
<?php foreach($options as $option){
|
1145 |
+
if($PlayerSettings['showstop'] == $option):
|
1146 |
+
$selected = " SELECTED";
|
1147 |
+
else:
|
1148 |
+
$selected = "";
|
1149 |
+
endif;
|
1150 |
+
if($option == "1"):
|
1151 |
+
$name = "Yes";
|
1152 |
+
else:
|
1153 |
+
$name = "No";
|
1154 |
+
endif;
|
1155 |
+
echo '<option value="'. $option .'"'. $selected .' >'. $name .'</option>';
|
1156 |
+
}?>
|
1157 |
+
</select>
|
1158 |
+
</div>
|
1159 |
+
</td>
|
1160 |
+
</tr>
|
1161 |
+
<tr valign="top">
|
1162 |
+
<th scope="row">
|
1163 |
+
<?php _e("Show Info"); ?>
|
1164 |
+
</th>
|
1165 |
+
<td>
|
1166 |
+
<div class="color_control">
|
1167 |
+
<select style="width: 100px;" id="showinfo" name="Player[showinfo]">
|
1168 |
+
<?php foreach($options as $option){
|
1169 |
+
if($PlayerSettings['showinfo'] == $option):
|
1170 |
+
$selected = " SELECTED";
|
1171 |
+
else:
|
1172 |
+
$selected = "";
|
1173 |
+
endif;
|
1174 |
+
if($option == "1"):
|
1175 |
+
$name = "Yes";
|
1176 |
+
else:
|
1177 |
+
$name = "No";
|
1178 |
+
endif;
|
1179 |
+
echo '<option value="'. $option .'"'. $selected .' >'. $name .'</option>';
|
1180 |
+
}?>
|
1181 |
+
</select>
|
1182 |
+
</div>
|
1183 |
+
</td>
|
1184 |
+
</tr>
|
1185 |
+
</table>
|
1186 |
+
</div>
|
1187 |
+
|
1188 |
+
<div id="tab_volume" class="powerpress_tab">
|
1189 |
+
<h3><?php _e('Volume Settings'); ?></h3>
|
1190 |
+
<table class="form-table">
|
1191 |
+
|
1192 |
+
<tr valign="top">
|
1193 |
+
<th scope="row">
|
1194 |
+
<?php _e("Show Volume"); ?>
|
1195 |
+
</th>
|
1196 |
+
<td>
|
1197 |
+
<div class="color_control">
|
1198 |
+
<select style="width: 100px;" id="showvolume" name="Player[showvolume]">
|
1199 |
+
<?php foreach($options as $option){
|
1200 |
+
if($PlayerSettings['showvolume'] == $option):
|
1201 |
+
$selected = " SELECTED";
|
1202 |
+
else:
|
1203 |
+
$selected = "";
|
1204 |
+
endif;
|
1205 |
+
if($option == "1"):
|
1206 |
+
$name = "Yes";
|
1207 |
+
else:
|
1208 |
+
$name = "No";
|
1209 |
+
endif;
|
1210 |
+
echo '<option value="'. $option .'"'. $selected .' >'. $name .'</option>';
|
1211 |
+
}?>
|
1212 |
+
</select>
|
1213 |
+
</div>
|
1214 |
+
</td>
|
1215 |
+
</tr>
|
1216 |
+
<tr valign="top">
|
1217 |
+
<th scope="row">
|
1218 |
+
<?php _e("Volume"); ?>
|
1219 |
+
</th>
|
1220 |
+
<td>
|
1221 |
+
<div class="color_control">
|
1222 |
+
<select style="width: 100px;" id="volume" name="Player[volume]">
|
1223 |
+
<?php foreach($volume as $volume){
|
1224 |
+
if($PlayerSettings['volume'] == $volume):
|
1225 |
+
$selected = " SELECTED";
|
1226 |
+
else:
|
1227 |
+
$selected = "";
|
1228 |
+
endif;
|
1229 |
+
echo '<option value="'. $volume .'"'. $selected .' >'. $volume .'%</option>';
|
1230 |
+
}?>
|
1231 |
+
</select>
|
1232 |
+
</div>
|
1233 |
+
</td>
|
1234 |
+
</tr>
|
1235 |
+
<tr valign="top">
|
1236 |
+
<th scope="row">
|
1237 |
+
<?php _e("Volume Height (in pixels)"); ?>
|
1238 |
+
</th>
|
1239 |
+
<td>
|
1240 |
+
<div class="color_control">
|
1241 |
+
<input type="text" style="width: 50px;" id="volumeheight" name="Player[volumeheight]" value="<?php echo $PlayerSettings['volumeheight']; ?>" maxlength="20" />
|
1242 |
+
</div>
|
1243 |
+
</td>
|
1244 |
+
</tr>
|
1245 |
+
<tr valign="top">
|
1246 |
+
<th scope="row">
|
1247 |
+
<?php _e("Volume Width (in pixels)"); ?>
|
1248 |
+
</th>
|
1249 |
+
<td>
|
1250 |
+
<div class="color_control">
|
1251 |
+
<input type="text" style="width: 50px;" id="volumewidth" name="Player[volumewidth]" value="<?php echo $PlayerSettings['volumewidth']; ?>" maxlength="20" />
|
1252 |
+
</div>
|
1253 |
+
</td>
|
1254 |
+
</tr>
|
1255 |
+
|
1256 |
+
</table>
|
1257 |
+
</div>
|
1258 |
+
|
1259 |
+
<div id="tab_slider" class="powerpress_tab">
|
1260 |
+
<h3><?php _e('Slider Settings'); ?></h3>
|
1261 |
+
<table class="form-table">
|
1262 |
+
|
1263 |
+
<tr valign="top">
|
1264 |
+
<th scope="row">
|
1265 |
+
<?php _e("Show Slider"); ?>
|
1266 |
+
</th>
|
1267 |
+
<td>
|
1268 |
+
<div class="color_control">
|
1269 |
+
<select style="width: 100px;" id="showslider" name="Player[showslider]">
|
1270 |
+
<?php foreach($options as $option){
|
1271 |
+
if($PlayerSettings['showslider'] == $option):
|
1272 |
+
$selected = " SELECTED";
|
1273 |
+
else:
|
1274 |
+
$selected = "";
|
1275 |
+
endif;
|
1276 |
+
if($option == "1"):
|
1277 |
+
$name = "Yes";
|
1278 |
+
else:
|
1279 |
+
$name = "No";
|
1280 |
+
endif;
|
1281 |
+
echo '<option value="'. $option .'"'. $selected .' >'. $name .'</option>';
|
1282 |
+
}?>
|
1283 |
+
</select>
|
1284 |
+
</div>
|
1285 |
+
</td>
|
1286 |
+
</tr>
|
1287 |
+
|
1288 |
+
<tr valign="top">
|
1289 |
+
<th scope="row">
|
1290 |
+
<?php _e("Slider Color Top"); ?>
|
1291 |
+
</th>
|
1292 |
+
<td>
|
1293 |
+
<div class="color_control">
|
1294 |
+
<input type="text" style="width: 100px;" id="slidercolor1" name="Player[slidercolor1]" class="color_field" value="<?php echo $PlayerSettings['slidercolor1']; ?>" maxlength="20" />
|
1295 |
+
<img id="slidercolor1_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['slidercolor1']; ?>;" class="color_preview" />
|
1296 |
+
</div>
|
1297 |
+
</td>
|
1298 |
+
</tr>
|
1299 |
+
<tr valign="top">
|
1300 |
+
<th scope="row">
|
1301 |
+
<?php _e("Slider Color Bottom"); ?>
|
1302 |
+
</th>
|
1303 |
+
<td>
|
1304 |
+
<div class="color_control">
|
1305 |
+
<input type="text" style="width: 100px;" id="slidercolor2" name="Player[slidercolor2]" class="color_field" value="<?php echo $PlayerSettings['slidercolor2']; ?>" maxlength="20" />
|
1306 |
+
<img id="slidercolor2_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['slidercolor2']; ?>;" class="color_preview" />
|
1307 |
+
</div>
|
1308 |
+
</td>
|
1309 |
+
</tr>
|
1310 |
+
|
1311 |
+
<tr valign="top">
|
1312 |
+
<th scope="row">
|
1313 |
+
<?php _e("Slider Hover Color"); ?>
|
1314 |
+
</th>
|
1315 |
+
<td>
|
1316 |
+
<div class="color_control">
|
1317 |
+
<input type="text" style="width: 100px;" id="sliderovercolor" name="Player[sliderovercolor]" class="color_field" value="<?php echo $PlayerSettings['sliderovercolor']; ?>" maxlength="20" />
|
1318 |
+
<img id="sliderovercolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['sliderovercolor']; ?>;" class="color_preview" />
|
1319 |
+
</div>
|
1320 |
+
</td>
|
1321 |
+
</tr>
|
1322 |
+
<tr valign="top">
|
1323 |
+
<th scope="row">
|
1324 |
+
<?php _e("Slider Height (in pixels)"); ?>
|
1325 |
+
</th>
|
1326 |
+
<td>
|
1327 |
+
<div class="color_control">
|
1328 |
+
<input type="text" style="width: 50px;" id="sliderheight" name="Player[sliderheight]" value="<?php echo $PlayerSettings['sliderheight']; ?>" maxlength="20" />
|
1329 |
+
</div>
|
1330 |
+
</td>
|
1331 |
+
</tr>
|
1332 |
+
<tr valign="top">
|
1333 |
+
<th scope="row">
|
1334 |
+
<?php _e("Slider Width (in pixels)"); ?>
|
1335 |
+
</th>
|
1336 |
+
<td>
|
1337 |
+
<div class="color_control">
|
1338 |
+
<input type="text" style="width: 50px;" id="sliderwidth" name="Player[sliderwidth]" value="<?php echo $PlayerSettings['sliderwidth']; ?>" maxlength="20" />
|
1339 |
+
</div>
|
1340 |
+
</td>
|
1341 |
+
</tr>
|
1342 |
+
|
1343 |
+
<tr valign="top">
|
1344 |
+
<th scope="row">
|
1345 |
+
<?php _e("Show Loading Buffer"); ?>
|
1346 |
+
</th>
|
1347 |
+
<td>
|
1348 |
+
<div class="color_control">
|
1349 |
+
<select style="width: 100px;" id="showloading" name="Player[showloading]">
|
1350 |
+
<?php foreach($autoload as $option){
|
1351 |
+
if($PlayerSettings['showloading'] == $option):
|
1352 |
+
$selected = " SELECTED";
|
1353 |
+
else:
|
1354 |
+
$selected = "";
|
1355 |
+
endif;
|
1356 |
+
echo '<option value="'. $option .'"'. $selected .' >'. $option .'</option>';
|
1357 |
+
}?>
|
1358 |
+
</select>
|
1359 |
+
</div>
|
1360 |
+
</td>
|
1361 |
+
</tr>
|
1362 |
+
<tr valign="top">
|
1363 |
+
<th scope="row">
|
1364 |
+
<?php _e("Loading Buffer Color"); ?>
|
1365 |
+
</th>
|
1366 |
+
<td>
|
1367 |
+
<div class="color_control">
|
1368 |
+
<input type="text" style="width: 100px;" id="loadingcolor" name="Player[loadingcolor]" class="color_field" value="<?php echo $PlayerSettings['loadingcolor']; ?>" maxlength="20" />
|
1369 |
+
<img id="loadingcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['loadingcolor']; ?>;" class="color_preview" />
|
1370 |
+
</div>
|
1371 |
+
</td>
|
1372 |
+
</tr>
|
1373 |
+
|
1374 |
+
</table>
|
1375 |
+
</div> <!-- end tab -->
|
1376 |
+
</div><!-- end tab container -->
|
1377 |
+
|
1378 |
+
<script type="text/javascript">
|
1379 |
+
|
1380 |
+
generator.player = '<?php echo powerpressplayer_get_root_url(); ?>player_mp3_maxi.swf';
|
1381 |
+
generator.addParam("gen_mp3", "mp3", "url", '');
|
1382 |
+
generator.addParam("player_height", "height", "int", "20");
|
1383 |
+
generator.addParam("player_width", "width", "int", "200");
|
1384 |
+
generator.addParam("bgcolor1", "bgcolor1", "color", "#7c7c7c");
|
1385 |
+
generator.addParam("bgcolor2", "bgcolor2", "color", "#333333");
|
1386 |
+
generator.addParam("bgcolor", "bgcolor", "color", "");
|
1387 |
+
generator.addParam("textcolor", "textcolor", "color", "#FFFFFF");
|
1388 |
+
generator.addParam("loadingcolor", "loadingcolor", "color", "#FFFF00");
|
1389 |
+
generator.addParam("buttoncolor", "buttoncolor", "color", "#FFFFFF");
|
1390 |
+
generator.addParam("buttonovercolor", "buttonovercolor", "color", "#FFFF00");
|
1391 |
+
generator.addParam("showloading", "showloading", "text", "autohide");
|
1392 |
+
generator.addParam("showinfo", "showinfo", "bool", "0");
|
1393 |
+
generator.addParam("showstop", "showstop", "int", "0");
|
1394 |
+
generator.addParam("showvolume", "showvolume", "int", "0");
|
1395 |
+
generator.addParam("buttonwidth", "buttonwidth", "int", "26");
|
1396 |
+
generator.addParam("volume", "volume", "int", "100");
|
1397 |
+
generator.addParam("volumeheight", "volumeheight", "int", "6");
|
1398 |
+
generator.addParam("volumewidth", "volumewidth", "int", "30");
|
1399 |
+
generator.addParam("sliderovercolor", "sliderovercolor", "color", "#eeee00");
|
1400 |
+
generator.addParam("showslider", "showslider", "bool", "1");
|
1401 |
+
generator.addParam("slidercolor1", "slidercolor1", "color", "#cccccc");
|
1402 |
+
generator.addParam("slidercolor2", "slidercolor2", "color", "#888888");
|
1403 |
+
generator.addParam("sliderheight", "sliderheight", "int", "10");
|
1404 |
+
generator.addParam("sliderwidth", "sliderwidth", "int", "20");
|
1405 |
+
|
1406 |
+
generator.updatePlayer();
|
1407 |
+
</script>
|
1408 |
+
|
1409 |
+
<?php
|
1410 |
+
}; break;
|
1411 |
+
|
1412 |
+
case 'audioplay': {
|
1413 |
+
$PlayerSettings = powerpress_get_settings('powerpress_audioplay');
|
1414 |
+
if($PlayerSettings == "") {
|
1415 |
+
$PlayerSettings = array(
|
1416 |
+
'bgcolor' => '',
|
1417 |
+
'buttondir' => 'negative',
|
1418 |
+
'mode' => 'playpause'
|
1419 |
+
);
|
1420 |
+
}
|
1421 |
+
|
1422 |
+
// Set standard variables for player
|
1423 |
+
$flashvars = 'file='. $Audio['audioplay'];
|
1424 |
+
$flashvars .= '&repeat=1';
|
1425 |
+
|
1426 |
+
if($PlayerSettings['bgcolor'] == ""){
|
1427 |
+
$flashvars .= "&usebgcolor=no";
|
1428 |
+
$transparency = '<param name="wmode" value="transparent" />';
|
1429 |
+
$htmlbg = "";
|
1430 |
+
}
|
1431 |
+
else{
|
1432 |
+
$flashvars .= "&bgcolor=". preg_replace('/\#/','0x',$PlayerSettings['bgcolor']);
|
1433 |
+
$transparency = '<param name="bgcolor" value="'. $PlayerSettings['bgcolor']. '" />';
|
1434 |
+
$htmlbg = 'bgcolor="'. $PlayerSettings['bgcolor'].'"';
|
1435 |
+
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
if($PlayerSettings['buttondir'] == "") {
|
1439 |
+
$flashvars .= "&buttondir=".powerpressplayer_get_root_url()."buttons/negative";
|
1440 |
+
}else{
|
1441 |
+
$flashvars .= "&buttondir=".powerpressplayer_get_root_url().'buttons/'.$PlayerSettings['buttondir'];
|
1442 |
+
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
$width = $height = (strstr($PlayerSettings['buttondir'], 'small')===false?30:15);
|
1446 |
+
|
1447 |
+
$flashvars .= '&mode='. $PlayerSettings['mode'];
|
1448 |
+
|
1449 |
+
?>
|
1450 |
+
<input type="hidden" name="action" value="powerpress-audioplay" />
|
1451 |
+
Configure the AudioPlay Player<br clear="all" />
|
1452 |
+
|
1453 |
+
<table class="form-table">
|
1454 |
+
|
1455 |
+
<tr valign="top">
|
1456 |
+
<th scope="row">
|
1457 |
+
<?php _e("Preview of Player"); ?>
|
1458 |
+
</th>
|
1459 |
+
<td colspan="2">
|
1460 |
+
<div id="player_preview">
|
1461 |
+
|
1462 |
+
<?php
|
1463 |
+
$content = '<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" data="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'">'.PHP_EOL;
|
1464 |
+
$content .= '<param name="movie" value="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'" />'.PHP_EOL;
|
1465 |
+
$content .= '<param name="quality" value="high" />'.PHP_EOL;
|
1466 |
+
$content .= $transparency.PHP_EOL;
|
1467 |
+
$content .= '<param name="FlashVars" value="'.$flashvars.'" />'.PHP_EOL;
|
1468 |
+
$content .= '<embed src="'. powerpressplayer_get_root_url().'audioplay.swf?'.$flashvars.'" quality="high" width="30" height="30" type="application/x-shockwave-flash">'.PHP_EOL;
|
1469 |
+
$content .= "</embed>\n </object>\n";
|
1470 |
+
|
1471 |
+
print $content;
|
1472 |
+
?>
|
1473 |
+
</div>
|
1474 |
+
</td>
|
1475 |
+
</tr>
|
1476 |
+
</table>
|
1477 |
+
|
1478 |
+
<h2>General Settings</h2>
|
1479 |
+
<table class="form-table">
|
1480 |
+
<tr valign="top">
|
1481 |
+
<th scope="row">
|
1482 |
+
<?php _e("Background Color"); ?>
|
1483 |
+
|
1484 |
+
</th>
|
1485 |
+
<td valign="top">
|
1486 |
+
<div class="color_control">
|
1487 |
+
<input type="text" style="width: 100px;" id="bgcolor" name="Player[bgcolor]" class="color_field" value="<?php echo $PlayerSettings['bgcolor']; ?>" maxlength="20" />
|
1488 |
+
<img id="bgcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor']; ?>;" class="color_preview" />
|
1489 |
+
</div>
|
1490 |
+
<small><?php _e("leave blank for transparent");?></small>
|
1491 |
+
</td>
|
1492 |
+
</tr>
|
1493 |
+
<tr valign="top">
|
1494 |
+
<th scope="row">
|
1495 |
+
<?php _e("Player Mode"); ?>
|
1496 |
+
</th>
|
1497 |
+
<td valign="top">
|
1498 |
+
<div class="color_control">
|
1499 |
+
<select name="Player[mode]" id="mode">
|
1500 |
+
<?php $options = array('playpause','playstop');
|
1501 |
+
foreach($options as $option){
|
1502 |
+
if($PlayerSettings['mode'] == $option):
|
1503 |
+
$selected = " SELECTED";
|
1504 |
+
else:
|
1505 |
+
$selected = "";
|
1506 |
+
endif;
|
1507 |
+
if($option == "playpause"):
|
1508 |
+
$name = "Play/Pause";
|
1509 |
+
else:
|
1510 |
+
$name = "Play/Stop";
|
1511 |
+
endif;
|
1512 |
+
echo '<option value="'. $option .'"'. $selected .' >'. $name .'</option>';
|
1513 |
+
}?>
|
1514 |
+
|
1515 |
+
</select>
|
1516 |
+
</div>
|
1517 |
+
</td>
|
1518 |
+
</tr>
|
1519 |
+
<tr valign="top">
|
1520 |
+
<th scope="row">
|
1521 |
+
<?php _e("Player Button"); ?>
|
1522 |
+
</th>
|
1523 |
+
<td valign="top">
|
1524 |
+
<div class="color_control">
|
1525 |
+
<table cellpadding="0" cellspacing="0">
|
1526 |
+
<?php $options = array('classic','classic_small','negative','negative_small');
|
1527 |
+
foreach($options as $option){
|
1528 |
+
if($PlayerSettings['buttondir'] == $option):
|
1529 |
+
$selected = " CHECKED";
|
1530 |
+
else:
|
1531 |
+
$selected = "";
|
1532 |
+
endif;
|
1533 |
+
if(($option == "classic") || ($option == "classic_small")){
|
1534 |
+
$td = '<td style="background: #999;" align="center">';
|
1535 |
+
$warning = "(ideal for dark backgrounds)";
|
1536 |
+
if($option == "classic_small") {
|
1537 |
+
$name = "Small White";
|
1538 |
+
}else{
|
1539 |
+
$name = "Large White";
|
1540 |
+
}
|
1541 |
+
}
|
1542 |
+
else {
|
1543 |
+
$td = '<td align="center">';
|
1544 |
+
$warning = "";
|
1545 |
+
if($option == "negative_small") {
|
1546 |
+
$name = "Small Black";
|
1547 |
+
}else{
|
1548 |
+
$name = "Large Black";
|
1549 |
+
}
|
1550 |
+
|
1551 |
+
}
|
1552 |
+
echo '<tr><td><input type="radio" name="Player[buttondir]" value="'. $option .'"'. $selected .' /></td>'.$td.'<img src="'. powerpressplayer_get_root_url().'buttons/'.$option.'/playup.png" /></td><td>'.$name.' Button '.$warning.'</td></tr>';
|
1553 |
+
}?>
|
1554 |
+
|
1555 |
+
</table>
|
1556 |
+
</div>
|
1557 |
+
</td>
|
1558 |
+
</tr>
|
1559 |
+
|
1560 |
+
</table>
|
1561 |
+
<?php
|
1562 |
+
}; break;
|
1563 |
+
|
1564 |
+
default: {
|
1565 |
+
|
1566 |
+
?>
|
1567 |
+
|
1568 |
+
<table class="form-table">
|
1569 |
+
<tr valign="top">
|
1570 |
+
<th scope="row">
|
1571 |
+
<?php _e("Preview of Player"); ?>
|
1572 |
+
</th>
|
1573 |
+
<td>
|
1574 |
+
<p>
|
1575 |
+
<?php
|
1576 |
+
$media_url = '';
|
1577 |
+
$content = '';
|
1578 |
+
$content .= '<div id="flow_player_classic"></div>'.PHP_EOL;
|
1579 |
+
$content .= '<script type="text/javascript">'.PHP_EOL;
|
1580 |
+
$content .= "pp_flashembed(\n";
|
1581 |
+
$content .= " 'flow_player_classic',\n";
|
1582 |
+
$content .= " {src: '". powerpress_get_root_url() ."FlowPlayerClassic.swf', width: 320, height: 24 },\n";
|
1583 |
+
$content .= " {config: { autoPlay: false, autoBuffering: false, initialScale: 'scale', showFullScreenButton: false, showMenu: false, videoFile: '{$Audio['default']}', loop: false, autoRewind: true } }\n";
|
1584 |
+
$content .= ");\n";
|
1585 |
+
$content .= "</script>\n";
|
1586 |
+
echo $content;
|
1587 |
+
?>
|
1588 |
+
</p>
|
1589 |
+
</td>
|
1590 |
+
</tr>
|
1591 |
+
|
1592 |
+
<tr valign="top">
|
1593 |
+
<th scope="row">
|
1594 |
+
|
1595 |
+
</th>
|
1596 |
+
<td>
|
1597 |
+
<p>Flow Player Classic has no additional settings.</p>
|
1598 |
+
</td>
|
1599 |
+
</tr>
|
1600 |
+
</table>
|
1601 |
+
|
1602 |
+
|
1603 |
+
<?php
|
1604 |
+
} break;
|
1605 |
+
}
|
1606 |
+
?>
|
1607 |
+
|
1608 |
+
<?php
|
1609 |
+
}
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
?>
|
powerpressadmin-player.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// PowerPress Player administration
|
3 |
+
|
4 |
+
|
5 |
+
// Handle post processing here for the players page.
|
6 |
+
function powerpress_admin_players_init()
|
7 |
+
{
|
8 |
+
//wp_enqueue_script('jquery');
|
9 |
+
|
10 |
+
$Settings = false; // Important, never remove this
|
11 |
+
$Step = 1;
|
12 |
+
|
13 |
+
$action = (isset($_GET['action'])?$_GET['action']: (isset($_POST['action'])?$_POST['action']:false) );
|
14 |
+
|
15 |
+
if( !$action )
|
16 |
+
return;
|
17 |
+
|
18 |
+
switch($action)
|
19 |
+
{
|
20 |
+
case 'powerpress-select-player': {
|
21 |
+
|
22 |
+
$SaveSettings = array();
|
23 |
+
$SaveSettings = $_POST['Player'];
|
24 |
+
powerpress_save_settings($SaveSettings, 'powerpress_general');
|
25 |
+
powerpress_page_message_add_notice('Player activated successfully.');
|
26 |
+
|
27 |
+
}; break;
|
28 |
+
case 'powerpress-audio-player': {
|
29 |
+
|
30 |
+
$SaveSettings = $_POST['Player'];
|
31 |
+
powerpress_save_settings($SaveSettings, 'powerpress_audio-player');
|
32 |
+
powerpress_page_message_add_notice('Audio Player settings saved successfully.');
|
33 |
+
|
34 |
+
}; break;
|
35 |
+
case 'powerpress-flashmp3-maxi': {
|
36 |
+
|
37 |
+
$SaveSettings = $_POST['Player'];
|
38 |
+
powerpress_save_settings($SaveSettings, 'powerpress_flashmp3-maxi');
|
39 |
+
powerpress_page_message_add_notice('Flash Mp3 Maxi settings saved successfully.');
|
40 |
+
|
41 |
+
} ; break;
|
42 |
+
case 'powerpress-audioplay':
|
43 |
+
{
|
44 |
+
$SaveSettings = $_POST['Player'];
|
45 |
+
powerpress_save_settings($SaveSettings, 'powerpress_audioplay');
|
46 |
+
powerpress_page_message_add_notice('AudioPlay settings saved successfully.');
|
47 |
+
}; break;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
// add_action('init', 'powerpress_admin_players_init');
|
52 |
+
|
53 |
+
function powerpress_admin_page_player_error()
|
54 |
+
{
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
// Add what we need to the admin area of Blubrry PowerPress
|
59 |
+
function powerpress_admin_page_player()
|
60 |
+
{
|
61 |
+
// Check that PowerPress is enabled..
|
62 |
+
if( !defined('POWERPRESS_VERSION') )
|
63 |
+
{
|
64 |
+
// Print an error message here..
|
65 |
+
?>
|
66 |
+
<h2><?php echo __("Blubrry PowerPress Player Options"); ?></h2>
|
67 |
+
<p>You must have the Blubrry PowerPress version 1.0 or newer installed for this plugin to work.</p>
|
68 |
+
<?php
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
// Check that PowerPress is new enoguh..
|
73 |
+
if( version_compare(POWERPRESS_VERSION, '0.9') < 1 && !defined('POWERPRESS_PLAYER_SKIP_VERSION_CHECK') )
|
74 |
+
{
|
75 |
+
// Print an error message here..
|
76 |
+
?>
|
77 |
+
<h2><?php echo __("Blubrry PowerPress Player Options"); ?></h2>
|
78 |
+
<p>Your copy of Blubrry PowerPress is out of date. You must have Blubrry PowerPress version 1.0 or newer installed for this plugin to work.</p>
|
79 |
+
<?php
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
|
83 |
+
//$Settings = get_option('powerpress_general');
|
84 |
+
//powerpress_admin_page_header('powerpress/powerpressadmin_player.php', 'powerpress-edit', $simple_mode );
|
85 |
+
require_once( dirname(__FILE__).'/powerpressadmin-player-page.php');
|
86 |
+
powerpress_admin_players();
|
87 |
+
//powerpress_admin_page_footer(true);
|
88 |
+
}
|
89 |
+
|
90 |
+
/*
|
91 |
+
function powerpress_player_admin_menu()
|
92 |
+
{
|
93 |
+
if( current_user_can('manage_options') )
|
94 |
+
{
|
95 |
+
$Settings = get_option('powerpress_general');
|
96 |
+
if( $Settings && @$Settings['advanced_mode'] )
|
97 |
+
{
|
98 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Player Options'), __('Player Options'), 1, 'powerpress/powerpressadmin_player.php', 'powerpress_admin_page_player');
|
99 |
+
}
|
100 |
+
else
|
101 |
+
{
|
102 |
+
add_options_page('Blubrry PowerPress Player Options', 'PowerPress Player Options', 1, 'powerpress/powerpressadmin_player.php', 'powerpress_admin_page_player');
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
add_action('admin_menu', 'powerpress_player_admin_menu', 11); // later priority than PowerPress
|
108 |
+
*/
|
109 |
+
?>
|
powerpressadmin-podpress-stats.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function powerpress_admin_podpress_stats()
|
4 |
+
{
|
5 |
+
global $wpdb;
|
6 |
+
|
7 |
+
$query = "SELECT COUNT(`media`) AS media_count FROM {$wpdb->prefix}podpress_statcounts ";
|
8 |
+
$EpisodeTotal = $wpdb->get_results($query, ARRAY_A);
|
9 |
+
//var_dump($EpisodeTotal);
|
10 |
+
$total = $EpisodeTotal[0]['media_count'];
|
11 |
+
$limit = 20;
|
12 |
+
$start = (!empty($_GET['start'])? $_GET['start']:0);
|
13 |
+
while( $start >= $total && $start > 0 )
|
14 |
+
$start -= $limit;
|
15 |
+
if( $start < 0 )
|
16 |
+
$start = 0;
|
17 |
+
|
18 |
+
?>
|
19 |
+
<h2><?php echo __("Archive of PodPress Stats"); ?></h2>
|
20 |
+
<p><?php echo sprintf(__('Displaying %d - %d of %d total'), $start+1, ($start+$limit<$total?$start+$limit:$total), $total); ?></p>
|
21 |
+
<table class="widefat">
|
22 |
+
<thead><tr>
|
23 |
+
<th><?php echo __("File"); ?></th><th colspan="2"><?php echo __("Feed");?></th><th colspan="2"><?php echo __("Web");?></th>
|
24 |
+
<th colspan="2"><?php echo __("Play");?></th><th><?php echo __("Total");?></th>
|
25 |
+
</tr></thead>
|
26 |
+
<tfoot><tr>
|
27 |
+
<th><?php echo __("File"); ?></th><th colspan="2"><?php echo __("Feed");?></th><th colspan="2"><?php echo __("Web");?></th>
|
28 |
+
<th colspan="2"><?php echo __("Play");?></th><th><?php echo __("Total");?></th>
|
29 |
+
</tr></tfoot>
|
30 |
+
<tbody>
|
31 |
+
<?php
|
32 |
+
|
33 |
+
|
34 |
+
$EpisodeCounts = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}podpress_statcounts LIMIT $start, $limit", ARRAY_A);
|
35 |
+
|
36 |
+
foreach ($EpisodeCounts as $Episode){
|
37 |
+
$t = $Episode['total'];
|
38 |
+
?>
|
39 |
+
|
40 |
+
<tr>
|
41 |
+
<td><?php echo $Episode['media']; ?></td>
|
42 |
+
<td><?php echo $Episode['feed']; ?></td><td><?php echo " (".round(($Episode['feed']/$t)*100,1)."%)"; ?></td>
|
43 |
+
<td><?php echo $Episode['web']; ?></td><td><?php echo " (".round(($Episode['web']/$t)*100,1)."%)"; ?></td>
|
44 |
+
<td><?php echo $Episode['play']; ?></td><td><?php echo " (".round(($Episode['play']/$t)*100,1)."%)"; ?></td>
|
45 |
+
<td><?php echo $Episode['total']; ?></td>
|
46 |
+
</tr>
|
47 |
+
<?php } ?>
|
48 |
+
</tbody>
|
49 |
+
</table>
|
50 |
+
<div style="width: 100px; float: left;">
|
51 |
+
<a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_podpress-stats.php&start=0"); ?>">first</a> |
|
52 |
+
<a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_podpress-stats.php&start=") . ($start-$limit); ?>">prev</a>
|
53 |
+
</div>
|
54 |
+
<div style="width: 100px; float: right; text-align: right;">
|
55 |
+
<a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_podpress-stats.php&start=") . ($start+$limit); ?>">next</a> |
|
56 |
+
<a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_podpress-stats.php&start=") . ($total%$limit==0? $total - $limit : floor($total/$limit)*$limit ); ?>">last</a>
|
57 |
+
</div>
|
58 |
+
<div class="clear"></div>
|
59 |
+
<?php
|
60 |
+
}
|
61 |
+
?>
|
powerpressadmin-podpress.php
CHANGED
@@ -686,7 +686,7 @@ function check_radio_selection(obj, PostID, FileIndex)
|
|
686 |
is why Blubrry PowerPress does not support them.
|
687 |
</p>
|
688 |
<p>
|
689 |
-
As a alternative, PowerPress allows you to create additional <a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php'); ?>">Custom Podcast
|
690 |
</p>
|
691 |
<p class="submit">
|
692 |
<input type="button" name="Submit" id="powerpress_import_button" class="button-primary" value="Import Episodes" onclick="alert('We found blog posts that have <?php echo $results['feeds_required']; ?> media files.\n\nYou will need to create <?php echo ( $results['feeds_required'] - count($Settings['custom_feeds']) ); ?> more Custom Feed<?php if( ( $results['feeds_required'] - count($Settings['custom_feeds']) ) > 1 ) echo 's'; ?> in order to continue. ');" />
|
686 |
is why Blubrry PowerPress does not support them.
|
687 |
</p>
|
688 |
<p>
|
689 |
+
As a alternative, PowerPress allows you to create additional <a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php'); ?>">Custom Podcast Channels</a> to associate additional media files in a blog post to specific feed channels.
|
690 |
</p>
|
691 |
<p class="submit">
|
692 |
<input type="button" name="Submit" id="powerpress_import_button" class="button-primary" value="Import Episodes" onclick="alert('We found blog posts that have <?php echo $results['feeds_required']; ?> media files.\n\nYou will need to create <?php echo ( $results['feeds_required'] - count($Settings['custom_feeds']) ); ?> more Custom Feed<?php if( ( $results['feeds_required'] - count($Settings['custom_feeds']) ) > 1 ) echo 's'; ?> in order to continue. ');" />
|
powerpressadmin-tools.php
CHANGED
@@ -53,31 +53,69 @@
|
|
53 |
?>
|
54 |
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-remove-caps", 'powerpress-remove-caps'); ?>"><?php _e('Remove PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
|
55 |
<p>
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
</p>
|
|
|
61 |
<?php
|
62 |
}
|
63 |
else
|
64 |
{
|
65 |
?>
|
66 |
-
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-add-caps", 'powerpress-add-caps'); ?>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
<p>
|
68 |
-
|
|
|
69 |
</p>
|
70 |
<p>
|
71 |
-
|
|
|
|
|
|
|
72 |
</p>
|
73 |
<?php
|
74 |
}
|
|
|
|
|
75 |
?>
|
76 |
-
|
77 |
-
<p>
|
78 |
-
|
|
|
|
|
|
|
79 |
</p>
|
|
|
|
|
|
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
</td>
|
82 |
</tr>
|
83 |
|
53 |
?>
|
54 |
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-remove-caps", 'powerpress-remove-caps'); ?>"><?php _e('Remove PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
|
55 |
<p>
|
56 |
+
Podcasting capability allows administrators, editors and authors access to create and configure podcast episodes.
|
57 |
+
Only administrators will be able to view media statistics from the WordPress Dashboard. Contributors, subscribers and other
|
58 |
+
custom users will not have access to create podcast episodes or view statistics from the dashboard. Due to this feature's
|
59 |
+
complexity, it is not supported by Blubrry.com.
|
60 |
</p>
|
61 |
+
|
62 |
<?php
|
63 |
}
|
64 |
else
|
65 |
{
|
66 |
?>
|
67 |
+
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-add-caps", 'powerpress-add-caps'); ?>">
|
68 |
+
<?php _e('Add PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
|
69 |
+
<p>
|
70 |
+
Adding podcasting capability will allow administrators, editors and authors access to create and configure podcast episodes.
|
71 |
+
Only administrators will be able to view media statistics from the WordPress Dashboard. Contributors, subscribers and other
|
72 |
+
custom users will not have access to create podcast episodes or view statistics from the dashboard. Due to this feature's
|
73 |
+
complexity, it is not supported by Blubrry.com.
|
74 |
+
</p>
|
75 |
+
<?php
|
76 |
+
}
|
77 |
+
|
78 |
+
if( @$General['premium_caps'] )
|
79 |
+
{
|
80 |
+
?>
|
81 |
+
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-remove-feed-caps", 'powerpress-remove-feed-caps'); ?>"><?php _e('Remove Password Protection Capabilities for Control of Which Users can Access Your Podcasts'); ?></a></strong> (Also kown as Premium Content)</p>
|
82 |
<p>
|
83 |
+
To use this feature, go to '<a href="<?php echo admin_url("admin.php?page=powerpressadmin_customfeeds.php"); ?>" title="Podcast Channels">Podcast Channels</a>'
|
84 |
+
and create a new custom podcast channel. In the Edit Podcast Channel page, click the last tab labeled 'Other Settings'. Place a check in the box labled 'Protect Content' and then click 'Save Changes'.
|
85 |
</p>
|
86 |
<p>
|
87 |
+
Password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
|
88 |
+
podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
|
89 |
+
Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
|
90 |
+
channels. Due to this feature's complexity, it is not supported by Blubrry.com.
|
91 |
</p>
|
92 |
<?php
|
93 |
}
|
94 |
+
else
|
95 |
+
{
|
96 |
?>
|
97 |
+
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-add-feed-caps", 'powerpress-add-feed-caps'); ?>"><?php _e('Add Password Protection Capabilities for Control of Which Users can Access Your Podcasts'); ?></a></strong> (Also kown as Premium Content)</p>
|
98 |
+
<p>
|
99 |
+
Adding password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
|
100 |
+
podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
|
101 |
+
Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
|
102 |
+
channels. Due to this feature's complexity, it is not supported by Blubrry.com.
|
103 |
</p>
|
104 |
+
<?php
|
105 |
+
}
|
106 |
+
?>
|
107 |
|
108 |
+
<p><strong>What are Roles and Capabilities?</strong></p>
|
109 |
+
<p>
|
110 |
+
The WordPress <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Roles and Capabilities</a>
|
111 |
+
feature gives the blog owner the ability to control what users can and cannot
|
112 |
+
do in the blog. You will most likely need a roles and capabilities plugin such as
|
113 |
+
<a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">Role Manager</a>,
|
114 |
+
<a href="http://alkivia.org/wordpress/capsman/" target="_blank">Capability Manager</a>,
|
115 |
+
or <a href="http://agapetry.net/category/plugins/role-scoper/" target="_blank">Role Scoper</a>
|
116 |
+
to take advantage of these features. Due to this feature's complexity, it is not supported by Blubrry.com.
|
117 |
+
</p>
|
118 |
+
|
119 |
</td>
|
120 |
</tr>
|
121 |
|
powerpressadmin.php
CHANGED
@@ -30,6 +30,21 @@ function powerpress_admin_init()
|
|
30 |
global $wp_rewrite;
|
31 |
|
32 |
add_thickbox(); // we use the thckbox for some settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
if( function_exists('powerpress_admin_jquery_init') )
|
35 |
powerpress_admin_jquery_init();
|
@@ -39,15 +54,6 @@ function powerpress_admin_init()
|
|
39 |
powerpress_page_message_add_error( __('You do not have sufficient permission to manage options.') );
|
40 |
return;
|
41 |
}
|
42 |
-
|
43 |
-
if( isset($_POST['CheckSWF']) ) // Leave until we no longer support Wordpress 2.6.x
|
44 |
-
{
|
45 |
-
$md5 = md5_file( dirname(__FILE__).'/FlowPlayerClassic.swf' );
|
46 |
-
if( $md5 == '051ed574774436e228e5dafd97d0f5f0' )
|
47 |
-
powerpress_page_message_add_notice( __('Flash player verified successfully.') );
|
48 |
-
else
|
49 |
-
powerpress_page_message_add_error( __('FlowPlayerClassic.swf is corrupt, please re-upload.') );
|
50 |
-
}
|
51 |
|
52 |
// Check for other podcasting plugin
|
53 |
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
@@ -95,7 +101,7 @@ function powerpress_admin_init()
|
|
95 |
}
|
96 |
|
97 |
// Check the image...
|
98 |
-
$ImageData = getimagesize($temp);
|
99 |
if( $ImageData && ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] ) // Just check that it is an image, the correct image type and that the image is square
|
100 |
{
|
101 |
move_uploaded_file($temp, $upload_path . $filename);
|
@@ -122,7 +128,7 @@ function powerpress_admin_init()
|
|
122 |
} while( file_exists($upload_path . $filename ) );
|
123 |
}
|
124 |
|
125 |
-
if( getimagesize($temp) ) // Just check that it is an image, we may add more to this later
|
126 |
{
|
127 |
move_uploaded_file($temp, $upload_path . $filename);
|
128 |
$Feed['rss2_image'] = $upload_url . $filename;
|
@@ -148,7 +154,7 @@ function powerpress_admin_init()
|
|
148 |
} while( file_exists($upload_path . $filename ) );
|
149 |
}
|
150 |
|
151 |
-
if( getimagesize($temp) ) // Just check that it is an image, we may add more to this later
|
152 |
{
|
153 |
move_uploaded_file($temp, $upload_path . $filename);
|
154 |
$_POST['TagValues']['tag_coverart'] = $upload_url . $filename;
|
@@ -161,9 +167,21 @@ function powerpress_admin_init()
|
|
161 |
|
162 |
if( isset($_POST['UpdateDisablePlayer']) )
|
163 |
{
|
|
|
164 |
$General['disable_player'] = array();
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
|
169 |
|
@@ -189,8 +207,11 @@ function powerpress_admin_init()
|
|
189 |
$General['display_player_excerpt'] = 0; // Set it to zero.
|
190 |
}
|
191 |
|
192 |
-
if( $_POST['action'] == 'powerpress-save-
|
193 |
{
|
|
|
|
|
|
|
194 |
$General['disable_dashboard_widget'] = 0;
|
195 |
if( !isset($_POST['StatsInDashboard'] ) )
|
196 |
$General['disable_dashboard_widget'] = 1;
|
@@ -207,6 +228,16 @@ function powerpress_admin_init()
|
|
207 |
$General['episode_box_summary'] = 0;
|
208 |
if( !isset($General['episode_box_explicit'] ) )
|
209 |
$General['episode_box_explicit'] = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
|
212 |
if( $_POST['action'] == 'powerpress-save-tags' )
|
@@ -265,6 +296,8 @@ function powerpress_admin_init()
|
|
265 |
|
266 |
if( $Feed )
|
267 |
{
|
|
|
|
|
268 |
if( !isset($Feed['enhance_itunes_summary']) )
|
269 |
$Feed['enhance_itunes_summary'] = false;
|
270 |
if( !isset($Feed['itunes_author_post']) )
|
@@ -295,6 +328,9 @@ function powerpress_admin_init()
|
|
295 |
// Settings saved successfully
|
296 |
switch( $_POST['action'] )
|
297 |
{
|
|
|
|
|
|
|
298 |
case 'powerpress-save-appearance': {
|
299 |
powerpress_page_message_add_notice( __('Blubrry PowerPress Appearance settings saved.') );
|
300 |
}; break;
|
@@ -329,7 +365,11 @@ function powerpress_admin_init()
|
|
329 |
|
330 |
if( @$_POST['TestiTunesPing'] == 1 )
|
331 |
{
|
332 |
-
|
|
|
|
|
|
|
|
|
333 |
powerpress_ping_itunes_log($PingResults);
|
334 |
|
335 |
if( @$PingResults['success'] )
|
@@ -561,6 +601,49 @@ function powerpress_admin_init()
|
|
561 |
powerpress_save_settings($General);
|
562 |
powerpress_page_message_add_notice( __('PowerPress Roles and Capabilities removed from WordPress Blog') );
|
563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
}; break;
|
565 |
case 'powerpress-clear-update_plugins': {
|
566 |
check_admin_referer('powerpress-clear-update_plugins');
|
@@ -571,6 +654,14 @@ function powerpress_admin_init()
|
|
571 |
}; break;
|
572 |
}
|
573 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
}
|
575 |
|
576 |
add_action('init', 'powerpress_admin_init');
|
@@ -603,6 +694,8 @@ function powerpress_save_settings($SettingsNew=false, $field = 'powerpress_gener
|
|
603 |
$Settings = array();
|
604 |
while( list($key,$value) = each($SettingsNew) )
|
605 |
$Settings[$key] = $value;
|
|
|
|
|
606 |
update_option($field, $Settings);
|
607 |
}
|
608 |
}
|
@@ -694,22 +787,24 @@ function powerpress_admin_menu()
|
|
694 |
|
695 |
if( current_user_can('manage_options') )
|
696 |
{
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
|
|
|
|
713 |
}
|
714 |
}
|
715 |
|
@@ -1024,58 +1119,15 @@ function powerpress_changemode(Mode)
|
|
1024 |
document.forms[0].submit();
|
1025 |
return false;
|
1026 |
}
|
1027 |
-
</script>
|
1028 |
-
<style type="text/css">
|
1029 |
-
.powerpress-notice {
|
1030 |
-
margin-top: 10px;
|
1031 |
-
margin-bottom: 10px;
|
1032 |
-
line-height: 29px;
|
1033 |
-
font-size: 12px;
|
1034 |
-
border-width: 1px;
|
1035 |
-
border-style: solid;
|
1036 |
-
font-weight: bold;
|
1037 |
-
}
|
1038 |
-
.powerpress-error {
|
1039 |
-
margin-top: 10px;
|
1040 |
-
margin-bottom: 10px;
|
1041 |
-
line-height: 29px;
|
1042 |
-
font-size: 12px;
|
1043 |
-
border-width: 1px;
|
1044 |
-
border-style: solid;
|
1045 |
-
font-weight: bold;
|
1046 |
-
}
|
1047 |
-
#powerpress_settings {
|
1048 |
-
background-image:url(http://images.blubrry.com/powerpress/blubrry_logo.png);
|
1049 |
-
background-repeat: no-repeat;
|
1050 |
-
background-position: bottom right;
|
1051 |
-
}
|
1052 |
|
1053 |
-
|
1054 |
-
|
1055 |
-
}
|
1056 |
-
#powerpress_settings ul li ul li {
|
1057 |
-
margin-left: 50px;
|
1058 |
-
font-size: 90%;
|
1059 |
-
}
|
1060 |
-
#powerpress_settings label {
|
1061 |
-
font-size: 120%;
|
1062 |
-
}
|
1063 |
-
.bpp_input_sm {
|
1064 |
-
width: 120px;
|
1065 |
-
}
|
1066 |
-
.bpp_input_med {
|
1067 |
-
width: 250px;
|
1068 |
-
}
|
1069 |
-
.powerpress_color_box {
|
1070 |
-
float: left;
|
1071 |
-
width: 16px;
|
1072 |
-
height: 16px;
|
1073 |
-
cursor: pointer;
|
1074 |
-
margin: 4px 1px;
|
1075 |
-
border: 1px solid #666666;
|
1076 |
|
1077 |
-
}
|
1078 |
-
|
|
|
|
|
1079 |
<?php
|
1080 |
}
|
1081 |
else if( $page_name == 'edit' || $page_name == 'edit-pages' ) // || $page_name == '' ) // we don't know the page, we better include our CSS just in case
|
@@ -1107,10 +1159,52 @@ function powerpress_changemode(Mode)
|
|
1107 |
margin-bottom: 10px;
|
1108 |
padding: 5px;
|
1109 |
font-size: 12px;
|
|
|
|
|
|
|
1110 |
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
border-width: 1px;
|
1112 |
border-style: solid;
|
1113 |
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
|
|
|
1114 |
}
|
1115 |
</style>
|
1116 |
<script language="javascript">
|
@@ -1121,15 +1215,18 @@ function powerpress_check_url(url)
|
|
1121 |
if( powerpress_check_url.arguments.length > 1 )
|
1122 |
DestDiv = powerpress_check_url.arguments[1];
|
1123 |
|
|
|
|
|
|
|
1124 |
var validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.';
|
1125 |
|
1126 |
for( var x = 0; x < url.length; x++ )
|
1127 |
{
|
1128 |
if( validChars.indexOf( url.charAt(x) ) == -1 )
|
1129 |
{
|
1130 |
-
|
1131 |
-
|
1132 |
-
return;
|
1133 |
}
|
1134 |
|
1135 |
if( x == 5 )
|
@@ -1142,24 +1239,113 @@ function powerpress_check_url(url)
|
|
1142 |
?>
|
1143 |
if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
|
1144 |
{
|
1145 |
-
|
1146 |
-
|
1147 |
-
return;
|
1148 |
}
|
1149 |
<?php
|
1150 |
} else if( POWERPRESS_ENABLE_HTTPS_MEDIA === 'warning' ) {
|
1151 |
?>
|
1152 |
if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
|
1153 |
{
|
1154 |
-
|
1155 |
-
|
1156 |
-
return;
|
1157 |
}
|
1158 |
<?php
|
1159 |
}
|
1160 |
?>
|
1161 |
|
1162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1163 |
}
|
1164 |
|
1165 |
</script>
|
@@ -1174,6 +1360,60 @@ function powerpress_check_url(url)
|
|
1174 |
|
1175 |
add_action('admin_head', 'powerpress_admin_head');
|
1176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1177 |
// Admin page, header
|
1178 |
function powerpress_admin_page_header($page=false, $nonce_field = 'powerpress-edit', $simple_mode=false)
|
1179 |
{
|
@@ -1216,8 +1456,21 @@ function powerpress_admin_page_footer($SaveButton=true, $form=true)
|
|
1216 |
// Admin page, advanced mode: basic settings
|
1217 |
function powerpress_admin_page_basic()
|
1218 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1219 |
powerpress_admin_page_header();
|
1220 |
require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
|
|
|
|
|
1221 |
powerpress_admin_basic();
|
1222 |
powerpress_admin_page_footer(true);
|
1223 |
}
|
@@ -1227,26 +1480,17 @@ function powerpress_admin_page_players()
|
|
1227 |
{
|
1228 |
powerpress_admin_page_header('powerpress/powerpressadmin_player.php');
|
1229 |
require_once( dirname(__FILE__).'/powerpressadmin-player.php');
|
1230 |
-
|
1231 |
powerpress_admin_page_footer(true);
|
1232 |
}
|
1233 |
|
1234 |
-
// Admin page, advanced mode: appearance settings
|
1235 |
-
function powerpress_admin_page_appearance()
|
1236 |
-
{
|
1237 |
-
powerpress_admin_page_header('powerpress/powerpressadmin_appearance.php');
|
1238 |
-
require_once( dirname(__FILE__).'/powerpressadmin-appearance.php');
|
1239 |
-
powerpressadmin_appearance();
|
1240 |
-
powerpress_admin_page_footer();
|
1241 |
-
}
|
1242 |
-
|
1243 |
// Admin page, advanced mode: feed settings
|
1244 |
-
function
|
1245 |
{
|
1246 |
-
powerpress_admin_page_header('powerpress/
|
1247 |
-
require_once( dirname(__FILE__).'/powerpressadmin-
|
1248 |
-
|
1249 |
-
powerpress_admin_page_footer();
|
1250 |
}
|
1251 |
|
1252 |
// Admin page, advanced mode: feed settings
|
@@ -1266,6 +1510,7 @@ function powerpress_admin_page_customfeeds()
|
|
1266 |
case 'powerpress-editfeed' : {
|
1267 |
powerpress_admin_page_header('powerpress/powerpressadmin_customfeeds.php');
|
1268 |
require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
|
|
|
1269 |
powerpress_admin_editfeed($_GET['feed_slug']);
|
1270 |
powerpress_admin_page_footer();
|
1271 |
}; break;
|
@@ -1286,6 +1531,7 @@ function powerpress_admin_page_categoryfeeds()
|
|
1286 |
case 'powerpress-editcategoryfeed' : {
|
1287 |
powerpress_admin_page_header('powerpress/powerpressadmin_categoryfeeds.php');
|
1288 |
require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
|
|
|
1289 |
powerpress_admin_editfeed(false, $_GET['cat']);
|
1290 |
powerpress_admin_page_footer();
|
1291 |
}; break;
|
@@ -1349,43 +1595,25 @@ function powerpress_podpress_episodes_exist()
|
|
1349 |
return false;
|
1350 |
}
|
1351 |
|
1352 |
-
|
1353 |
-
function powerpress_admin_page()
|
1354 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1355 |
|
1356 |
-
|
1357 |
-
$
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
powerpress_admin_page_footer(false);
|
1365 |
-
}
|
1366 |
-
else
|
1367 |
-
{
|
1368 |
-
if( $_GET['action'] == 'powerpress-diagnostics' )
|
1369 |
-
{
|
1370 |
-
powerpress_admin_page_header(false, false);
|
1371 |
-
require_once( dirname(__FILE__).'/powerpressadmin-diagnostics.php');
|
1372 |
-
powerpressadmin_diagnostics();
|
1373 |
-
powerpress_admin_page_footer(false, false);
|
1374 |
-
}
|
1375 |
-
else
|
1376 |
-
{
|
1377 |
-
// Simple mode:
|
1378 |
-
powerpress_admin_page_header(false, 'powerpress-edit', true);
|
1379 |
-
require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
|
1380 |
-
powerpress_admin_basic();
|
1381 |
-
|
1382 |
-
require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
|
1383 |
-
powerpress_admin_editfeed();
|
1384 |
-
|
1385 |
-
powerpress_admin_basic_diagnostics();
|
1386 |
-
powerpress_admin_page_footer(true);
|
1387 |
-
}
|
1388 |
-
}
|
1389 |
}
|
1390 |
|
1391 |
/*
|
@@ -1404,44 +1632,44 @@ function powerpress_do_ping_itunes($post_id)
|
|
1404 |
$PingResults = powerpress_ping_itunes($Settings['itunes_url']);
|
1405 |
powerpress_ping_itunes_log($PingResults, $post_id);
|
1406 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1407 |
|
1408 |
-
|
1409 |
-
if(
|
1410 |
{
|
1411 |
-
$
|
1412 |
-
|
1413 |
-
{
|
1414 |
-
if( !in_array($cat_id, $Settings['custom_cat_feeds']) )
|
1415 |
-
continue; // This isn't a podcast category, so skip it...
|
1416 |
-
|
1417 |
-
$FeedSettings = get_option('powerpress_cat_feed_'.$cat_id);
|
1418 |
-
if( $FeedSettings && $FeedSettings['itunes_url'] )
|
1419 |
-
{
|
1420 |
-
$PingResults = powerpress_ping_itunes($FeedSettings['itunes_url']);
|
1421 |
-
powerpress_ping_itunes_log($PingResults, $post_id);
|
1422 |
-
}
|
1423 |
-
}
|
1424 |
}
|
1425 |
}
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
|
|
|
|
|
|
1429 |
{
|
1430 |
-
|
|
|
|
|
|
|
|
|
|
|
1431 |
{
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
// Next double check we're looking at a podcast episode...
|
1436 |
-
$Enclosure = get_post_meta($post_id, '_'.$feed_slug.':enclosure', true);
|
1437 |
-
if( $Enclosure )
|
1438 |
{
|
1439 |
-
$
|
1440 |
-
|
1441 |
-
{
|
1442 |
-
$PingResults = powerpress_ping_itunes($FeedSettings['itunes_url']);
|
1443 |
-
powerpress_ping_itunes_log($PingResults, $post_id);
|
1444 |
-
}
|
1445 |
}
|
1446 |
}
|
1447 |
}
|
@@ -1891,6 +2119,27 @@ function powerpress_default_settings($Settings, $Section='basic')
|
|
1891 |
{
|
1892 |
case 'basic': {
|
1893 |
// Nothing needs to be pre-set in the basic settings area
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1894 |
}; break;
|
1895 |
case 'editfeed': {
|
1896 |
if( !isset($Settings['apply_to']) )
|
@@ -2041,15 +2290,69 @@ function powerpress_do_enclose( $content, $post_ID, $use_last_media_link = false
|
|
2041 |
}
|
2042 |
}
|
2043 |
|
2044 |
-
function powerpress_get_media_info_local($media_file, $content_type='', $file_size=0, $duration='')
|
2045 |
{
|
2046 |
$error_msg = '';
|
|
|
2047 |
if( $content_type == '' )
|
2048 |
$content_type = powerpress_get_contenttype($media_file);
|
2049 |
|
2050 |
if( $content_type == '' )
|
2051 |
return array('error'=>'Unable to detect content type.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2052 |
|
|
|
|
|
|
|
|
|
|
|
2053 |
if( $content_type == 'audio/mpeg' && $duration === '' ) // if duration has a value or is set to false then we don't want to try to obtain it here...
|
2054 |
{
|
2055 |
// Lets use the mp3info class:
|
30 |
global $wp_rewrite;
|
31 |
|
32 |
add_thickbox(); // we use the thckbox for some settings
|
33 |
+
wp_enqueue_script('jquery');
|
34 |
+
//wp_enqueue_script('jquery-ui-resizable');
|
35 |
+
wp_enqueue_script('jquery-ui-core');
|
36 |
+
wp_enqueue_script('jquery-ui-tabs');
|
37 |
+
//wp_enqueue_script('jquery-ui-selectable');
|
38 |
+
//wp_enqueue_script('interface');
|
39 |
+
|
40 |
+
//wp_enqueue_script('jquery-ui-resizable');
|
41 |
+
//wp_enqueue_script('jquery-ui-draggable');
|
42 |
+
//wp_enqueue_script('jquery-ui-droppable');
|
43 |
+
//wp_enqueue_script('jquery-ui-selectable');
|
44 |
+
//wp_enqueue_script('jquery-ui-sortable');
|
45 |
+
|
46 |
+
wp_enqueue_script( 'powerpress', powerpress_get_root_url().'3rdparty/jquery.cookie.js', array('jquery' ) );
|
47 |
+
|
48 |
|
49 |
if( function_exists('powerpress_admin_jquery_init') )
|
50 |
powerpress_admin_jquery_init();
|
54 |
powerpress_page_message_add_error( __('You do not have sufficient permission to manage options.') );
|
55 |
return;
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
// Check for other podcasting plugin
|
59 |
if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
|
101 |
}
|
102 |
|
103 |
// Check the image...
|
104 |
+
$ImageData = @getimagesize($temp);
|
105 |
if( $ImageData && ( $ImageData[2] == IMAGETYPE_JPEG || $ImageData[2] == IMAGETYPE_PNG ) && $ImageData[0] == $ImageData[1] ) // Just check that it is an image, the correct image type and that the image is square
|
106 |
{
|
107 |
move_uploaded_file($temp, $upload_path . $filename);
|
128 |
} while( file_exists($upload_path . $filename ) );
|
129 |
}
|
130 |
|
131 |
+
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
|
132 |
{
|
133 |
move_uploaded_file($temp, $upload_path . $filename);
|
134 |
$Feed['rss2_image'] = $upload_url . $filename;
|
154 |
} while( file_exists($upload_path . $filename ) );
|
155 |
}
|
156 |
|
157 |
+
if( @getimagesize($temp) ) // Just check that it is an image, we may add more to this later
|
158 |
{
|
159 |
move_uploaded_file($temp, $upload_path . $filename);
|
160 |
$_POST['TagValues']['tag_coverart'] = $upload_url . $filename;
|
167 |
|
168 |
if( isset($_POST['UpdateDisablePlayer']) )
|
169 |
{
|
170 |
+
$player_feed_slug = $_POST['UpdateDisablePlayer'];
|
171 |
$General['disable_player'] = array();
|
172 |
+
$GeneralPrev = get_option('powerpress_general');
|
173 |
+
if( isset($GeneralPrev['disable_player']) )
|
174 |
+
$General['disable_player'] = $GeneralPrev['disable_player'];
|
175 |
+
if( isset($_POST['DisablePlayerFor']) )
|
176 |
+
$General['disable_player'][ $player_feed_slug ] = 1;
|
177 |
+
else
|
178 |
+
unset($General['disable_player'][ $player_feed_slug ]);
|
179 |
+
}
|
180 |
+
|
181 |
+
|
182 |
+
if( isset($_POST['PlayerScaleCustom']) && isset($General['player_scale']) && $General['player_scale'] !='tofit' && $General['player_scale'] != 'aspect' )
|
183 |
+
{
|
184 |
+
$General['player_scale'] = $_POST['PlayerScaleCustom'];
|
185 |
}
|
186 |
|
187 |
|
207 |
$General['display_player_excerpt'] = 0; // Set it to zero.
|
208 |
}
|
209 |
|
210 |
+
if( $_POST['action'] == 'powerpress-save-settings' )
|
211 |
{
|
212 |
+
if( !isset($General['display_player_excerpt']) ) // If we are modifying appearance settings but this option was not checked...
|
213 |
+
$General['display_player_excerpt'] = 0; // Set it to zero.
|
214 |
+
|
215 |
$General['disable_dashboard_widget'] = 0;
|
216 |
if( !isset($_POST['StatsInDashboard'] ) )
|
217 |
$General['disable_dashboard_widget'] = 1;
|
228 |
$General['episode_box_summary'] = 0;
|
229 |
if( !isset($General['episode_box_explicit'] ) )
|
230 |
$General['episode_box_explicit'] = 0;
|
231 |
+
|
232 |
+
// Advanced Features
|
233 |
+
if( !isset($General['player_options'] ) )
|
234 |
+
$General['player_options'] = 0;
|
235 |
+
if( !isset($General['cat_casting'] ) )
|
236 |
+
$General['cat_casting'] = 0;
|
237 |
+
if( !isset($General['channels'] ) )
|
238 |
+
$General['channels'] = 0;
|
239 |
+
if( !isset($General['advanced_mode']) )
|
240 |
+
$General['advanced_mode'] = 1;
|
241 |
}
|
242 |
|
243 |
if( $_POST['action'] == 'powerpress-save-tags' )
|
296 |
|
297 |
if( $Feed )
|
298 |
{
|
299 |
+
if( !isset($_POST['ProtectContent']) && isset($Feed['premium']) )
|
300 |
+
$Feed['premium'] = false;
|
301 |
if( !isset($Feed['enhance_itunes_summary']) )
|
302 |
$Feed['enhance_itunes_summary'] = false;
|
303 |
if( !isset($Feed['itunes_author_post']) )
|
328 |
// Settings saved successfully
|
329 |
switch( $_POST['action'] )
|
330 |
{
|
331 |
+
case 'powerpress-save-settings': {
|
332 |
+
powerpress_page_message_add_notice( __('Blubrry PowerPress settings saved successfully.') );
|
333 |
+
}; break;
|
334 |
case 'powerpress-save-appearance': {
|
335 |
powerpress_page_message_add_notice( __('Blubrry PowerPress Appearance settings saved.') );
|
336 |
}; break;
|
365 |
|
366 |
if( @$_POST['TestiTunesPing'] == 1 )
|
367 |
{
|
368 |
+
if( $_POST['action'] == 'powerpress-save-settings' )
|
369 |
+
$PingResults = powerpress_ping_itunes($General['itunes_url']);
|
370 |
+
else
|
371 |
+
$PingResults = powerpress_ping_itunes($Feed['itunes_url']);
|
372 |
+
|
373 |
powerpress_ping_itunes_log($PingResults);
|
374 |
|
375 |
if( @$PingResults['success'] )
|
601 |
powerpress_save_settings($General);
|
602 |
powerpress_page_message_add_notice( __('PowerPress Roles and Capabilities removed from WordPress Blog') );
|
603 |
|
604 |
+
}; break;
|
605 |
+
case 'powerpress-add-feed-caps': {
|
606 |
+
check_admin_referer('powerpress-add-feed-caps');
|
607 |
+
|
608 |
+
$ps_role = get_role('premium_subscriber');
|
609 |
+
if(!$ps_role)
|
610 |
+
{
|
611 |
+
add_role('premium_subscriber', 'Premium Subscriber', $caps);
|
612 |
+
$ps_role = get_role('premium_subscriber');
|
613 |
+
$ps_role->add_cap('read');
|
614 |
+
$ps_role->add_cap('premium_content');
|
615 |
+
}
|
616 |
+
|
617 |
+
$users = array('administrator','editor', 'author'); // , 'contributor', 'subscriber');
|
618 |
+
while( list($null,$user) = each($users) )
|
619 |
+
{
|
620 |
+
$role = get_role($user);
|
621 |
+
if( !$role->has_cap('premium_content') )
|
622 |
+
$role->add_cap('premium_content');
|
623 |
+
}
|
624 |
+
|
625 |
+
$General = array('premium_caps'=>true);
|
626 |
+
powerpress_save_settings($General);
|
627 |
+
powerpress_page_message_add_notice( __('Podcast Password Protection Capabilities for Custom Channel Feeds added successfully.') );
|
628 |
+
|
629 |
+
}; break;
|
630 |
+
case 'powerpress-remove-feed-caps': {
|
631 |
+
check_admin_referer('powerpress-remove-feed-caps');
|
632 |
+
|
633 |
+
$users = array('administrator','editor', 'author', 'contributor', 'subscriber', 'premium_subscriber');
|
634 |
+
while( list($null,$user) = each($users) )
|
635 |
+
{
|
636 |
+
$role = get_role($user);
|
637 |
+
if( $role->has_cap('premium_content') )
|
638 |
+
$role->remove_cap('premium_content');
|
639 |
+
}
|
640 |
+
|
641 |
+
remove_role('premium_subscriber');
|
642 |
+
|
643 |
+
$General = array('premium_caps'=>false);
|
644 |
+
powerpress_save_settings($General);
|
645 |
+
powerpress_page_message_add_notice( __('Podcast Password Protection Capabilities for Custom Channel Feeds removed successfully.') );
|
646 |
+
|
647 |
}; break;
|
648 |
case 'powerpress-clear-update_plugins': {
|
649 |
check_admin_referer('powerpress-clear-update_plugins');
|
654 |
}; break;
|
655 |
}
|
656 |
}
|
657 |
+
|
658 |
+
$GeneralSettings = get_option('powerpress_general');
|
659 |
+
if( @$GeneralSettings['player_options'] )
|
660 |
+
{
|
661 |
+
// Make sure we include the player-options
|
662 |
+
require_once( dirname(__FILE__).'/powerpressadmin-player.php');
|
663 |
+
powerpress_admin_players_init();
|
664 |
+
}
|
665 |
}
|
666 |
|
667 |
add_action('init', 'powerpress_admin_init');
|
694 |
$Settings = array();
|
695 |
while( list($key,$value) = each($SettingsNew) )
|
696 |
$Settings[$key] = $value;
|
697 |
+
if( $field == 'powerpress_general' && !isset($Settings['timestamp']) )
|
698 |
+
$Settings['timestamp'] = time();
|
699 |
update_option($field, $Settings);
|
700 |
}
|
701 |
}
|
787 |
|
788 |
if( current_user_can('manage_options') )
|
789 |
{
|
790 |
+
$Powerpress = powerpress_default_settings($Powerpress, 'basic');
|
791 |
+
|
792 |
+
add_menu_page(__('PowerPress'), __('PowerPress'), 1, 'powerpress/powerpressadmin_basic.php', 'powerpress_admin_page_basic', powerpress_get_root_url() . 'powerpress_ico.png');
|
793 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Settings'), __('Settings'), 1, 'powerpress/powerpressadmin_basic.php', 'powerpress_admin_page_basic' );
|
794 |
+
if( @$Powerpress['player_options'] )
|
795 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Audio Player Options'), __('Audio Player'), 1, 'powerpress/powerpressadmin_player.php', 'powerpress_admin_page_players');
|
796 |
+
|
797 |
+
if( $Powerpress['channels'] )
|
798 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Custom Podcast Channels'), __('Podcast Channels'), 1, 'powerpress/powerpressadmin_customfeeds.php', 'powerpress_admin_page_customfeeds');
|
799 |
+
if( $Powerpress['cat_casting'] )
|
800 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Category Podcast Feeds'), __('Category Casting'), 1, 'powerpress/powerpressadmin_categoryfeeds.php', 'powerpress_admin_page_categoryfeeds');
|
801 |
+
if( @$Powerpress['podpress_stats'] )
|
802 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PodPress Stats'), __('PodPress Stats'), 1, 'powerpress/powerpressadmin_podpress-stats.php', 'powerpress_admin_page_podpress_stats');
|
803 |
+
|
804 |
+
|
805 |
+
if( isset($Powerpress['blubrry_hosting']) && $Powerpress['blubrry_hosting'] )
|
806 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress MP3 Tags'), __('MP3 Tags'), 1, 'powerpress/powerpressadmin_tags.php', 'powerpress_admin_page_tags');
|
807 |
+
add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Tools'), __('Tools'), 1, 'powerpress/powerpressadmin_tools.php', 'powerpress_admin_page_tools');
|
808 |
}
|
809 |
}
|
810 |
|
1119 |
document.forms[0].submit();
|
1120 |
return false;
|
1121 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1122 |
|
1123 |
+
jQuery(document).ready(function($) {
|
1124 |
+
|
1125 |
+
jQuery("#powerpress_settings_page").tabs({ cookie: { expires: 30 } });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1126 |
|
1127 |
+
});
|
1128 |
+
|
1129 |
+
</script>
|
1130 |
+
<link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>css/admin.css" type="text/css" media="screen" />
|
1131 |
<?php
|
1132 |
}
|
1133 |
else if( $page_name == 'edit' || $page_name == 'edit-pages' ) // || $page_name == '' ) // we don't know the page, we better include our CSS just in case
|
1159 |
margin-bottom: 10px;
|
1160 |
padding: 5px;
|
1161 |
font-size: 12px;
|
1162 |
+
border-width: 1px;
|
1163 |
+
border-style: solid;
|
1164 |
+
font-weight: bold;
|
1165 |
text-align: center;
|
1166 |
+
}
|
1167 |
+
.powerpress_podcast_box .success {
|
1168 |
+
margin-top: 10px;
|
1169 |
+
margin-bottom: 10px;
|
1170 |
+
padding: 5px;
|
1171 |
+
border-width: 1px;
|
1172 |
+
border-style: solid;
|
1173 |
+
font-weight: bold;
|
1174 |
+
text-align: center;
|
1175 |
+
border-width: 1px;
|
1176 |
+
border-style: solid;
|
1177 |
+
-moz-border-radius: 3px;
|
1178 |
+
-khtml-border-radius: 3px;
|
1179 |
+
-webkit-border-radius: 3px;
|
1180 |
+
border-radius: 3px;
|
1181 |
+
border-color: #009900;
|
1182 |
+
background-color: #CCFFCC;
|
1183 |
+
font-size: 12px;
|
1184 |
+
position: relative;
|
1185 |
+
}
|
1186 |
+
.powerpress_podcast_box .success a.close {
|
1187 |
+
position: absolute;
|
1188 |
+
top: 2px;
|
1189 |
+
right: 2px;
|
1190 |
+
text-align: right;
|
1191 |
+
color: #993366;
|
1192 |
+
text-decoration: none;
|
1193 |
+
}
|
1194 |
+
.powerpress_podcast_box .updated {
|
1195 |
+
margin-top: 10px;
|
1196 |
+
margin-bottom: 10px;
|
1197 |
+
padding: 5px;
|
1198 |
+
font-size: 12px;
|
1199 |
border-width: 1px;
|
1200 |
border-style: solid;
|
1201 |
font-weight: bold;
|
1202 |
+
text-align: center;
|
1203 |
+
}
|
1204 |
+
.powerpress_podcast_box input[type="button"] {
|
1205 |
+
height: 20px;
|
1206 |
+
vertical-align: bottom;
|
1207 |
+
font-size: 90%;
|
1208 |
}
|
1209 |
</style>
|
1210 |
<script language="javascript">
|
1215 |
if( powerpress_check_url.arguments.length > 1 )
|
1216 |
DestDiv = powerpress_check_url.arguments[1];
|
1217 |
|
1218 |
+
jQuery( '#'+DestDiv ).addClass("error");
|
1219 |
+
jQuery( '#'+DestDiv ).removeClass("updated");
|
1220 |
+
|
1221 |
var validChars = ':0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/-_.';
|
1222 |
|
1223 |
for( var x = 0; x < url.length; x++ )
|
1224 |
{
|
1225 |
if( validChars.indexOf( url.charAt(x) ) == -1 )
|
1226 |
{
|
1227 |
+
jQuery( '#'+DestDiv ).text('Media URL contains characters that may cause problems for some clients. For maximum compatibility, only use letters, numbers, dash - and underscore _ characters only.');
|
1228 |
+
jQuery( '#'+DestDiv ).css('display', 'block');
|
1229 |
+
return false;
|
1230 |
}
|
1231 |
|
1232 |
if( x == 5 )
|
1239 |
?>
|
1240 |
if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
|
1241 |
{
|
1242 |
+
jQuery( '#'+DestDiv ).html('PowerPress will not accept media URLs starting with https://.<br />Not all podcatching (podcast downloading) applications support secure http.<br />Please enter a different URL beginning with http://.');
|
1243 |
+
jQuery( '#'+DestDiv ).css('display', 'block');
|
1244 |
+
return false;
|
1245 |
}
|
1246 |
<?php
|
1247 |
} else if( POWERPRESS_ENABLE_HTTPS_MEDIA === 'warning' ) {
|
1248 |
?>
|
1249 |
if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
|
1250 |
{
|
1251 |
+
jQuery( '#'+DestDiv ).html('Media URL should not start with https://.<br />Not all podcatching (podcast downloading) applications support secure http.<br />By using https://, you may limit the size of your audience.');
|
1252 |
+
jQuery( '#'+DestDiv ).css('display', 'block');
|
1253 |
+
return false;
|
1254 |
}
|
1255 |
<?php
|
1256 |
}
|
1257 |
?>
|
1258 |
|
1259 |
+
jQuery( '#'+DestDiv ).css('display', 'none');
|
1260 |
+
return true;
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
function powerpress_get_media_info(FeedSlug)
|
1264 |
+
{
|
1265 |
+
if( jQuery('#powerpress_check_'+FeedSlug).css("display") != "none" )
|
1266 |
+
return; // Another process is already running
|
1267 |
+
|
1268 |
+
jQuery( '#powerpress_success_'+FeedSlug ).css('display', 'none');
|
1269 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).text('');
|
1270 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'none');
|
1271 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).addClass("error");
|
1272 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).removeClass("updated");
|
1273 |
+
|
1274 |
+
var Value = jQuery('#powerpress_url_'+FeedSlug).val();
|
1275 |
+
var Hosting = jQuery('#powerpress_hosting_'+FeedSlug).val();
|
1276 |
+
if( Value )
|
1277 |
+
{
|
1278 |
+
if( powerpress_check_url(Value, 'powerpress_warning_'+FeedSlug ) )
|
1279 |
+
{
|
1280 |
+
jQuery('#powerpress_check_'+FeedSlug).css("display", 'inline');
|
1281 |
+
jQuery.ajax( {
|
1282 |
+
type: 'POST',
|
1283 |
+
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
1284 |
+
data: { action: 'powerpress_media_info', media_url : Value, feed_slug : encodeURIComponent(FeedSlug), hosting: Hosting },
|
1285 |
+
timeout: (30 * 1000),
|
1286 |
+
success: function(response) {
|
1287 |
+
|
1288 |
+
var Parts = response.split("\n", 5);
|
1289 |
+
var FeedSlug = Parts[0];
|
1290 |
+
|
1291 |
+
jQuery('#powerpress_check_'+FeedSlug).css("display", 'none');
|
1292 |
+
|
1293 |
+
if( Parts[1] == 'OK' )
|
1294 |
+
{
|
1295 |
+
jQuery('#powerpress_set_size_1_'+FeedSlug).attr('checked', true);
|
1296 |
+
jQuery('#powerpress_size_'+FeedSlug).val( Parts[2] );
|
1297 |
+
if( Parts[3] )
|
1298 |
+
{
|
1299 |
+
jQuery('#powerpress_set_duration_1_'+FeedSlug).attr('checked', true);
|
1300 |
+
var Duration = Parts[3].split(':');
|
1301 |
+
jQuery('#powerpress_duration_hh_'+FeedSlug).val( Duration[0] );
|
1302 |
+
jQuery('#powerpress_duration_mm_'+FeedSlug).val( Duration[1] );
|
1303 |
+
jQuery('#powerpress_duration_ss_'+FeedSlug).val( Duration[2] );
|
1304 |
+
}
|
1305 |
+
else if( jQuery('#powerpress_set_duration_0_'+FeedSlug).attr('checked') )
|
1306 |
+
{
|
1307 |
+
jQuery('#powerpress_set_duration_2_'+FeedSlug).attr('checked', true);
|
1308 |
+
jQuery('#powerpress_duration_hh_'+FeedSlug).val( '' );
|
1309 |
+
jQuery('#powerpress_duration_mm_'+FeedSlug).val( '' );
|
1310 |
+
jQuery('#powerpress_duration_ss_'+FeedSlug).val( '' );
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
if( Parts.length > 4 && Parts[4] != '' )
|
1314 |
+
{
|
1315 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).html( Parts[4] );
|
1316 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
|
1317 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).addClass("updated");
|
1318 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).removeClass("error");
|
1319 |
+
}
|
1320 |
+
else
|
1321 |
+
{
|
1322 |
+
jQuery( '#powerpress_success_'+FeedSlug ).html( 'Media verified successfully. <a href="#" onclick="jQuery( \'#powerpress_success_'+ FeedSlug +'\' ).fadeOut(1000);return false;" title="Close" class="close">X<\/a>' );
|
1323 |
+
jQuery( '#powerpress_success_'+FeedSlug ).css('display', 'block');
|
1324 |
+
// setTimeout( function() { jQuery( '#powerpress_success_'+FeedSlug ).fadeOut(1000); }, 10000 );
|
1325 |
+
}
|
1326 |
+
}
|
1327 |
+
else
|
1328 |
+
{
|
1329 |
+
var Parts = response.split("\n", 2);
|
1330 |
+
if( Parts[1] )
|
1331 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).html( Parts[1] );
|
1332 |
+
else
|
1333 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).text( 'Unknown error occurred while checking Media URL.' );
|
1334 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
|
1335 |
+
}
|
1336 |
+
},
|
1337 |
+
error: function(objAJAXRequest, strError) {
|
1338 |
+
|
1339 |
+
jQuery('#powerpress_check_'+FeedSlug).css("display", 'none');
|
1340 |
+
if( strError == 'timeout' )
|
1341 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).text( 'Operation timed out.' );
|
1342 |
+
else
|
1343 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).text( 'Unknown error occurred.' );
|
1344 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
|
1345 |
+
}
|
1346 |
+
});
|
1347 |
+
}
|
1348 |
+
}
|
1349 |
}
|
1350 |
|
1351 |
</script>
|
1360 |
|
1361 |
add_action('admin_head', 'powerpress_admin_head');
|
1362 |
|
1363 |
+
|
1364 |
+
function powerpress_media_info_ajax()
|
1365 |
+
{
|
1366 |
+
$feed_slug = $_POST['feed_slug'];
|
1367 |
+
$media_url = $_POST['media_url'];
|
1368 |
+
$hosting = $_POST['hosting'];
|
1369 |
+
$size = 0;
|
1370 |
+
$duration = '';
|
1371 |
+
$status = 'OK';
|
1372 |
+
$GeneralSettings = get_option('powerpress_general');
|
1373 |
+
|
1374 |
+
if( defined('POWERPRESS_ENABLE_HTTPS_MEDIA') )
|
1375 |
+
{
|
1376 |
+
if( strpos($media_url, 'http://') !== 0 && strpos($media_url, 'https://') !== 0 && $hosting != 1 ) // If the url entered does not start with a http:// or https://
|
1377 |
+
{
|
1378 |
+
$media_url = rtrim(@$GeneralSettings['default_url'], '/') .'/'. $media_url;
|
1379 |
+
}
|
1380 |
+
}
|
1381 |
+
else
|
1382 |
+
{
|
1383 |
+
if( strpos($media_url, 'http://') !== 0 && $hosting != 1 ) // If the url entered does not start with a http://
|
1384 |
+
{
|
1385 |
+
$media_url = rtrim(@$GeneralSettings['default_url'], '/') .'/'. $media_url;
|
1386 |
+
}
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
// Get media info here...
|
1390 |
+
if( $hosting )
|
1391 |
+
$MediaInfo = powerpress_get_media_info($media_url);
|
1392 |
+
else
|
1393 |
+
$MediaInfo = powerpress_get_media_info_local($media_url, '', 0, '', true);
|
1394 |
+
|
1395 |
+
if( !isset($MediaInfo['error']) && !empty($MediaInfo['length']) )
|
1396 |
+
{
|
1397 |
+
echo "$feed_slug\n";
|
1398 |
+
echo "OK\n";
|
1399 |
+
echo "{$MediaInfo['length']}\n";
|
1400 |
+
echo "{$MediaInfo['duration']}\n";
|
1401 |
+
if( isset($MediaInfo['warnings']) )
|
1402 |
+
echo $MediaInfo['warnings'];
|
1403 |
+
exit;
|
1404 |
+
}
|
1405 |
+
|
1406 |
+
echo "$feed_slug\n";
|
1407 |
+
if( $MediaInfo['error'] )
|
1408 |
+
echo $MediaInfo['error'];
|
1409 |
+
else
|
1410 |
+
echo 'Unknown error occurred looking up media information.';
|
1411 |
+
exit;
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
add_action('wp_ajax_powerpress_media_info', 'powerpress_media_info_ajax');
|
1415 |
+
|
1416 |
+
|
1417 |
// Admin page, header
|
1418 |
function powerpress_admin_page_header($page=false, $nonce_field = 'powerpress-edit', $simple_mode=false)
|
1419 |
{
|
1456 |
// Admin page, advanced mode: basic settings
|
1457 |
function powerpress_admin_page_basic()
|
1458 |
{
|
1459 |
+
$Settings = get_option('powerpress_general');
|
1460 |
+
|
1461 |
+
if( !isset($Settings['advanced_mode']) )
|
1462 |
+
{
|
1463 |
+
powerpress_admin_page_header(false, 'powerpress-edit', true);
|
1464 |
+
require_once( dirname(__FILE__).'/powerpressadmin-mode.php');
|
1465 |
+
powerpress_admin_mode();
|
1466 |
+
powerpress_admin_page_footer(false);
|
1467 |
+
return;
|
1468 |
+
}
|
1469 |
+
|
1470 |
powerpress_admin_page_header();
|
1471 |
require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
|
1472 |
+
require_once( dirname(__FILE__).'/powerpressadmin-appearance.php');
|
1473 |
+
require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
|
1474 |
powerpress_admin_basic();
|
1475 |
powerpress_admin_page_footer(true);
|
1476 |
}
|
1480 |
{
|
1481 |
powerpress_admin_page_header('powerpress/powerpressadmin_player.php');
|
1482 |
require_once( dirname(__FILE__).'/powerpressadmin-player.php');
|
1483 |
+
powerpress_admin_page_player();
|
1484 |
powerpress_admin_page_footer(true);
|
1485 |
}
|
1486 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1487 |
// Admin page, advanced mode: feed settings
|
1488 |
+
function powerpress_admin_page_podpress_stats()
|
1489 |
{
|
1490 |
+
powerpress_admin_page_header('powerpress/powerpressadmin_podpress-stats.php');
|
1491 |
+
require_once( dirname(__FILE__).'/powerpressadmin-podpress-stats.php');
|
1492 |
+
powerpress_admin_podpress_stats();
|
1493 |
+
powerpress_admin_page_footer(false);
|
1494 |
}
|
1495 |
|
1496 |
// Admin page, advanced mode: feed settings
|
1510 |
case 'powerpress-editfeed' : {
|
1511 |
powerpress_admin_page_header('powerpress/powerpressadmin_customfeeds.php');
|
1512 |
require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
|
1513 |
+
require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
|
1514 |
powerpress_admin_editfeed($_GET['feed_slug']);
|
1515 |
powerpress_admin_page_footer();
|
1516 |
}; break;
|
1531 |
case 'powerpress-editcategoryfeed' : {
|
1532 |
powerpress_admin_page_header('powerpress/powerpressadmin_categoryfeeds.php');
|
1533 |
require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
|
1534 |
+
require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
|
1535 |
powerpress_admin_editfeed(false, $_GET['cat']);
|
1536 |
powerpress_admin_page_footer();
|
1537 |
}; break;
|
1595 |
return false;
|
1596 |
}
|
1597 |
|
1598 |
+
function powerpress_podpress_stats_exist()
|
|
|
1599 |
{
|
1600 |
+
global $wpdb;
|
1601 |
+
// First, see if the table exists...
|
1602 |
+
$query = "SHOW TABLES LIKE '{$wpdb->prefix}podpress_statcounts'";
|
1603 |
+
$wpdb->hide_errors();
|
1604 |
+
$results = $wpdb->get_results($query, ARRAY_A);
|
1605 |
+
$wpdb->show_errors();
|
1606 |
+
if( count($results) == 0 )
|
1607 |
+
return false;
|
1608 |
|
1609 |
+
// Now see if a record exists...
|
1610 |
+
$query = "SELECT `media` ";
|
1611 |
+
$query .= "FROM {$wpdb->prefix}podpress_statcounts ";
|
1612 |
+
$query .= "LIMIT 1";
|
1613 |
+
$results = $wpdb->get_results($query, ARRAY_A);
|
1614 |
+
if( count($results) )
|
1615 |
+
return true;
|
1616 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1617 |
}
|
1618 |
|
1619 |
/*
|
1632 |
$PingResults = powerpress_ping_itunes($Settings['itunes_url']);
|
1633 |
powerpress_ping_itunes_log($PingResults, $post_id);
|
1634 |
}
|
1635 |
+
}
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
// Category feeds
|
1639 |
+
if( isset($Settings['custom_cat_feeds']) )
|
1640 |
+
{
|
1641 |
+
$post_categories = wp_get_post_categories($post_id);
|
1642 |
+
while( list($null, $cat_id) = each($post_categories) )
|
1643 |
+
{
|
1644 |
+
if( !in_array($cat_id, $Settings['custom_cat_feeds']) )
|
1645 |
+
continue; // This isn't a podcast category, so skip it...
|
1646 |
|
1647 |
+
$FeedSettings = get_option('powerpress_cat_feed_'.$cat_id);
|
1648 |
+
if( $FeedSettings && @$FeedSettings['ping_itunes'] && $FeedSettings['itunes_url'] )
|
1649 |
{
|
1650 |
+
$PingResults = powerpress_ping_itunes($FeedSettings['itunes_url']);
|
1651 |
+
powerpress_ping_itunes_log($PingResults, $post_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1652 |
}
|
1653 |
}
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
// Custom Podcast Channels
|
1657 |
+
if( isset($Settings['custom_feeds']) )
|
1658 |
+
{
|
1659 |
+
while( list($feed_slug,$null) = each($Settings['custom_feeds']) )
|
1660 |
{
|
1661 |
+
if( $feed_slug == 'podcast' )
|
1662 |
+
continue;
|
1663 |
+
|
1664 |
+
// Next double check we're looking at a podcast episode...
|
1665 |
+
$Enclosure = get_post_meta($post_id, '_'.$feed_slug.':enclosure', true);
|
1666 |
+
if( $Enclosure )
|
1667 |
{
|
1668 |
+
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
|
1669 |
+
if( $FeedSettings && @$FeedSettings['ping_itunes'] && $FeedSettings['itunes_url'] )
|
|
|
|
|
|
|
|
|
1670 |
{
|
1671 |
+
$PingResults = powerpress_ping_itunes($FeedSettings['itunes_url']);
|
1672 |
+
powerpress_ping_itunes_log($PingResults, $post_id);
|
|
|
|
|
|
|
|
|
1673 |
}
|
1674 |
}
|
1675 |
}
|
2119 |
{
|
2120 |
case 'basic': {
|
2121 |
// Nothing needs to be pre-set in the basic settings area
|
2122 |
+
|
2123 |
+
if( !isset($Settings['player_options'] ) )
|
2124 |
+
{
|
2125 |
+
$Settings['player_options'] = 0;
|
2126 |
+
if( isset($Settings['player']) && $Settings['player'] != '' && $Settings['player'] != 'default' )
|
2127 |
+
$Settings['player_options'] = 1;
|
2128 |
+
}
|
2129 |
+
|
2130 |
+
if( !isset($Settings['cat_casting'] ) )
|
2131 |
+
{
|
2132 |
+
$Settings['cat_casting'] = 0;
|
2133 |
+
if( isset($Settings['custom_cat_feeds']) && count($Settings['custom_cat_feeds']) > 0 )
|
2134 |
+
$Settings['cat_casting'] = 1;
|
2135 |
+
}
|
2136 |
+
|
2137 |
+
if( !isset($Settings['channels'] ) )
|
2138 |
+
{
|
2139 |
+
$Settings['channels'] = 0;
|
2140 |
+
if( isset($Settings['custom_feeds']) && count($Settings['custom_feeds']) > 0 )
|
2141 |
+
$Settings['channels'] = 1;
|
2142 |
+
}
|
2143 |
}; break;
|
2144 |
case 'editfeed': {
|
2145 |
if( !isset($Settings['apply_to']) )
|
2290 |
}
|
2291 |
}
|
2292 |
|
2293 |
+
function powerpress_get_media_info_local($media_file, $content_type='', $file_size=0, $duration='', $return_warnings=false)
|
2294 |
{
|
2295 |
$error_msg = '';
|
2296 |
+
$warning_msg = '';
|
2297 |
if( $content_type == '' )
|
2298 |
$content_type = powerpress_get_contenttype($media_file);
|
2299 |
|
2300 |
if( $content_type == '' )
|
2301 |
return array('error'=>'Unable to detect content type.');
|
2302 |
+
|
2303 |
+
$get_duration_info = ($content_type == 'audio/mpeg' && $duration === '');
|
2304 |
+
// Lets use the mp3info class:
|
2305 |
+
require_once(dirname(__FILE__).'/mp3info.class.php');
|
2306 |
+
$Mp3Info = new Mp3Info();
|
2307 |
+
$Mp3Data = $Mp3Info->GetMp3Info($media_file, !$get_duration_info);
|
2308 |
+
if( $Mp3Data )
|
2309 |
+
{
|
2310 |
+
if( $Mp3Info->GetRedirectCount() > 5 )
|
2311 |
+
{
|
2312 |
+
// Add a warning that the redirect count exceeded 5, which may prevent some podcatchers from downloading the media.
|
2313 |
+
$warning = sprintf( __('Warning, the Media URL %s contains %d redirects.'), $media_file, $Mp3Info->GetRedirectCount() );
|
2314 |
+
$warning .= ' [<a href="http://help.blubrry.com/blubrry-powerpress/errors-and-warnings/" title="'. __('Help') .'" target="_blank">'. __('Help') .'</a>]';
|
2315 |
+
if( $return_warnings )
|
2316 |
+
$warning_msg .= $warning;
|
2317 |
+
else
|
2318 |
+
powerpress_add_error( $warning );
|
2319 |
+
}
|
2320 |
+
|
2321 |
+
if( $file_size == 0 )
|
2322 |
+
$file_size = $Mp3Info->GetContentLength();
|
2323 |
+
|
2324 |
+
if( $get_duration_info )
|
2325 |
+
$duration = powerpress_readable_duration($Mp3Data['playtime_string'], true); // Fix so it looks better when viewed for editing
|
2326 |
+
|
2327 |
+
if( count( $Mp3Info->GetWarnings() ) > 0 )
|
2328 |
+
{
|
2329 |
+
$Warnings = $Mp3Info->GetWarnings();
|
2330 |
+
while( list($null, $warning) = each($Warnings) )
|
2331 |
+
{
|
2332 |
+
$warning = sprintf( __('Warning, Media URL %s:'), $media_file) .' '. $warning .' [<a href="http://help.blubrry.com/blubrry-powerpress/errors-and-warnings/" title="'. __('Help') .'" target="_blank">'. __('Help') .'</a>]';
|
2333 |
+
if( $return_warnings )
|
2334 |
+
$warning_msg .= $warning;
|
2335 |
+
else
|
2336 |
+
powerpress_add_error( $warning );
|
2337 |
+
}
|
2338 |
+
}
|
2339 |
+
}
|
2340 |
+
else
|
2341 |
+
{
|
2342 |
+
if( $Mp3Info->GetError() )
|
2343 |
+
return array('error'=>$Mp3Info->GetError() );
|
2344 |
+
else
|
2345 |
+
return array('error'=>'Error occurred obtaining media information.');
|
2346 |
+
}
|
2347 |
+
|
2348 |
+
if( $file_size == 0 )
|
2349 |
+
return array('error'=>'Error occurred obtaining media file size.' );
|
2350 |
|
2351 |
+
if( $return_warnings && $warning_msg != '' )
|
2352 |
+
return array('content-type'=>$content_type, 'length'=>$file_size, 'duration'=>$duration, 'warnings'=>$warning_msg);
|
2353 |
+
return array('content-type'=>$content_type, 'length'=>$file_size, 'duration'=>$duration);
|
2354 |
+
|
2355 |
+
// OLD CODE FOLLOWS:
|
2356 |
if( $content_type == 'audio/mpeg' && $duration === '' ) // if duration has a value or is set to false then we don't want to try to obtain it here...
|
2357 |
{
|
2358 |
// Lets use the mp3info class:
|
readme.txt
CHANGED
@@ -1,55 +1,88 @@
|
|
1 |
=== Podcasting - Blubrry PowerPress Podcast plugin ===
|
2 |
Contributors: Angelo Mandato, Blubrry.com
|
3 |
-
Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry
|
4 |
Requires at least: 2.6.0
|
5 |
Tested up to: 2.8.4
|
6 |
-
Stable tag: 0.
|
7 |
|
8 |
-
|
9 |
|
10 |
== Description ==
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
*
|
24 |
-
|
25 |
-
*
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
* iTunes
|
31 |
-
*
|
32 |
-
* iTunes
|
33 |
-
*
|
34 |
-
*
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
*
|
40 |
-
*
|
41 |
-
*
|
42 |
-
*
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
|
|
|
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
http://help.blubrry.com/blubrry-powerpress/
|
53 |
|
54 |
== Frequently Asked Questions ==
|
55 |
|
@@ -72,22 +105,66 @@ You can insert the media player within yoru blog posts by using the WordPress sh
|
|
72 |
|
73 |
If you want to specify a cover image, add an image attribute which points to the specific image url: [powerpress image="http://example.com/path/to/cover_image.jpg"] *Experimental*
|
74 |
|
|
|
|
|
|
|
|
|
75 |
== Installation ==
|
|
|
76 |
1. Copy the entire directory from the downloaded zip file into the /wp-content/plugins/ folder.
|
77 |
2. Activate the "Blubrry PowerPress" plugin in the Plugin Management page.
|
78 |
3. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
|
79 |
-
|
|
|
80 |
== Screenshots ==
|
81 |
1. Add podcast episode, found within the edit post screen
|
82 |
-
2.
|
83 |
-
3.
|
84 |
-
4.
|
|
|
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
= 0.9.11 =
|
89 |
* Released on 10/01/2009
|
90 |
-
* We are working on PowerPress version 1.0, if you'd like to beta test, please email Angelo (cio [at] rawvoice.com).
|
91 |
* Fixed minor bugs with mp3 media detection: proper user agent set, logic added to deal with LibSyn 406 error, and media detection script can now be used for detecting file size for other media types.
|
92 |
* Improved iTunes subtitle so value is contained within one line.
|
93 |
* Fixed bug with mv4 video displaying incorrectly in PowerPress player.
|
1 |
=== Podcasting - Blubrry PowerPress Podcast plugin ===
|
2 |
Contributors: Angelo Mandato, Blubrry.com
|
3 |
+
Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, wordpressmu, mu, wordpress mu
|
4 |
Requires at least: 2.6.0
|
5 |
Tested up to: 2.8.4
|
6 |
+
Stable tag: 1.0.2
|
7 |
|
8 |
+
Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
|
9 |
|
10 |
== Description ==
|
11 |
+
|
12 |
+
Blubrry PowerPress brings the essential features for podcasting to WordPress. Developed by podcasters for podcasters, PowerPress offers full iTunes support, the Update iTunes Listing feature, web audio/video media players and more.
|
13 |
+
|
14 |
+
*PowerPress is developed and maintained by [Blubrry](http://www.blubrry.com), a podcasting company and community providing tools and resources for podcasters to measure, monetize, publish and host podcasts. Although we'd like you to become a member, **no membership is required** to use this free open source podcasting plugin.*
|
15 |
+
|
16 |
+
= Key Features =
|
17 |
+
- Full iTunes Support: Adds iTunes complaint podcast feeds to your WordPress blog.
|
18 |
+
- Integrated Media Players: Audio/video web players with video embed support from sites such as YouTube and Ustream.tv.
|
19 |
+
- Media Modifiers: Easily add, modify and remove podcasts form blog posts and pages.
|
20 |
+
- Migration tools: Quickly migrate from PodPress, Blogger or Movable Type without losing episodes.
|
21 |
+
- Multi-podcast support: Create separate podcasts by category (category casting) or by media format.
|
22 |
+
- Supported Media Formats: mp3, m4a, ogg, wma, ra, mp4a, m4v, mp4v, mpg, asf, avi, wmv, flv, swf, mov, divx, 3gp, midi, wav, aa, pdf, torrent, m4b, m4r.
|
23 |
+
- *Media Statistics: Get FREE Blubrry Media Statistics from your WordPress dashboard.
|
24 |
+
|
25 |
+
*The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes U.S. downloads, trending and exporting, is available for $5 month.
|
26 |
+
|
27 |
+
= Full iTunes Support =
|
28 |
+
iTunes can make up between 50 and 95 percent of a podcaster's audience. PowerPress comes with the following iTunes specific features.
|
29 |
+
|
30 |
+
* iTunes compliant podcast feeds: The appropriate tags are added to your feeds so your iTunes listing looks great.
|
31 |
+
* Optimized iTunes Summary: Converts your blog post content to a format suited for viewing in iTunes ([learn more](http://help.blubrry.com/blubrry-powerpress/powerpress-settings/enhanced-itunes-summary/))
|
32 |
+
* Update iTunes Listing: Notify (ping) iTunes when you publish new episodes.
|
33 |
+
* Update iTunes Listing Logging: Check the status of your last iTunes listing update.
|
34 |
+
* Upload iTunes Artwork: Upload and change your iTunes artwork directly from within PowerPress settings.
|
35 |
+
|
36 |
+
= Integrated Media Players =
|
37 |
+
Blubrry PowerPress includes extensive web player options to display your podcast audio and video in your web pages.
|
38 |
+
|
39 |
+
* Pick from five mp3 players including the latest version of the popular [1 Pixel Out Player](http://wpaudioplayer.com/whatsnew).
|
40 |
+
* Position player above or below your post content.
|
41 |
+
* Place the player exactly where you want by adding the [powerpress] shortcode tag directly in your post content.
|
42 |
+
* Add video embeds from sites such as YouTube, Viddler, Blip.tv and Ustream.tv.
|
43 |
+
* Provides download and play in new window links.
|
44 |
+
* Formats supported: mp3, m4v, m4a, ogg, mp4, wma, mov, pdf, swf, avi, mpeg and more.
|
45 |
+
|
46 |
+
= Integrates with Blubrry's Services =
|
47 |
+
Make your life easier by adding our FREE or paid services to streamline your podcast productivity.
|
48 |
+
|
49 |
+
* Quickly access your Blubrry media download statistics from your WordPress dashboard.
|
50 |
+
* Publish Blubrry hosted media directly from your blog.
|
51 |
+
* View Blubrry hosting usage quota from your blog.
|
52 |
+
* Configure how Blubrry writes media (ID3) tags within PowerPress settings.
|
53 |
+
|
54 |
+
The Blubrry basic statistics service is FREE. Our [Premium Statistics Service](https://secure.blubrry.com/podcast-statistics-premium/), which includes U.S. downloads, trending and exporting, is available for $5 month. Blubrry [Media Hosting](https://secure.blubrry.com/podcast-publishing-premium-with-hosting/) packages start at $12.
|
55 |
+
|
56 |
+
= Advanced Features =
|
57 |
+
Want more? Check out the advanced features.
|
58 |
+
|
59 |
+
* Media size and duration detection: Enter your media URL and let the PowerPress do the rest.
|
60 |
+
* Category Casting: Add podcast support to your WordPress category feeds.
|
61 |
+
* Custom Podcast Channels: Distribute multiple formats (audio/video) and versions (short/full length).
|
62 |
+
* Tag/Keyword Podcast Feeds (Tag Casting): Add iTunes compliant attributes to your tag feeds.
|
63 |
+
* FeedBurner Support: Use FeedBurner.com to host your podcast feeds.
|
64 |
+
* *User Role Management: Control which users in your blog can podcast.
|
65 |
+
* Diagnostics: Check to see if your server is configured to support all of the available features in PowerPress.
|
66 |
+
* WordPress MU: Blubrry PowerPress is compatible with [WordPress MU](http://mu.wordpress.org/)
|
67 |
+
|
68 |
+
*User Role Management requires a separate plugin to manage WordPress Roles and Capabilities.
|
69 |
+
|
70 |
+
= Migrating from PodPress =
|
71 |
+
We made it easy to migrate from PodPress to PowerPress.
|
72 |
|
73 |
+
* Install PowerPress
|
74 |
+
* Configure the "PodPress Episodes" setting in PowerPress to "Include in Posts and Feeds"
|
75 |
+
* Disable PodPress
|
76 |
|
77 |
+
PowerPress will continue where PodPress left off by including your previously created PodPress episodes in your feeds and web pages.
|
78 |
|
79 |
+
= Need Help? =
|
80 |
+
. . . or have some ideas that could improve the plugin?
|
81 |
+
|
82 |
+
* Visit the Blubrry [Community Forum](http://forum.blubrry.com/)
|
83 |
+
* Use the Blubrry [Contact Us](http://www.blubrry.com/contact.php) form
|
84 |
+
* Blubrry [PowerPress Documentation](http://help.blubrry.com/blubrry-powerpress/)
|
85 |
|
|
|
86 |
|
87 |
== Frequently Asked Questions ==
|
88 |
|
105 |
|
106 |
If you want to specify a cover image, add an image attribute which points to the specific image url: [powerpress image="http://example.com/path/to/cover_image.jpg"] *Experimental*
|
107 |
|
108 |
+
= Why can't you upload large media files? =
|
109 |
+
File uploads are tricky to handle because there are so many web hosting variations with different upload size limits. We recommend using an FTP application to upload large media files. FTP is much more efficient than web based uploads and is typically provided by nearly all web hosting providers.
|
110 |
+
|
111 |
+
|
112 |
== Installation ==
|
113 |
+
To install Blubrry PowerPress manually, follow these steps:
|
114 |
1. Copy the entire directory from the downloaded zip file into the /wp-content/plugins/ folder.
|
115 |
2. Activate the "Blubrry PowerPress" plugin in the Plugin Management page.
|
116 |
3. Configure your Blubrry PowerPress by going to the **Settings** > **Blubrry PowerPress** page.
|
117 |
+
|
118 |
+
|
119 |
== Screenshots ==
|
120 |
1. Add podcast episode, found within the edit post screen
|
121 |
+
2. Select from 5 audio mp3 players for your web site
|
122 |
+
3. Example of the Flow Player Classic in a blog post
|
123 |
+
4. Example of the 1 Pixel Out Audio Player in a blog post
|
124 |
+
5. Cross section of Blubrry PowerPress iTunes settings page
|
125 |
+
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= 1.0.2 =
|
130 |
+
* Released on 10/13/2009
|
131 |
+
* Added 4 new mp3 flash players: 1 Pixel Out Audio Player, Mp3 Player Maxi, Simple Flash MP3 Player and AudioPlay player.
|
132 |
+
* Added PodPress Stats Archive view (option available in Settings > Basic Settings page).
|
133 |
+
* Added 'Verify' media option next to Media URL box to check entered URL and detect file size/duration information.
|
134 |
+
* Added Password Protect option for Custom Podcast Channels, allows for Premium Content (feature explained and enabled under Tools page).
|
135 |
+
* Relabeled Custom Podcast Feeds to Custom Podcast Channels to clear up confusion.
|
136 |
+
* Reorganized settings pages with tabbed sections.
|
137 |
+
|
138 |
+
|
139 |
+
= 1.0.1beta =
|
140 |
+
* Beta released between 10/06/2009 and 10/12/2009
|
141 |
+
* New Password Protected Content feature now applies to both feeds and blog pages.
|
142 |
+
* Added note in services settings page that the plugin does not require blubrry.com membership or blubrry.com services.
|
143 |
+
* New Select and Configure link added on the select players page.
|
144 |
+
* Settings for 1 Pixel Out Audio Player and the Mp3 Flash Maxi player are now in tabbed navigation.
|
145 |
+
* Reset defaults options added to the 1 Pixel Out Audio Player and the Mp3 Flash Maxi player settings pages.
|
146 |
+
* Rewrote descriptions for the Password Protected and User Capabilities listed in the Tools page to clear up confusion.
|
147 |
+
|
148 |
+
|
149 |
+
= 1.0.0beta =
|
150 |
+
* Beta released on 10/06/2009
|
151 |
+
* Added 4 new mp3 flash players: 1 Pixel Out Player, Mp3 Player Maxi, Simple Flash MP3 Player and AudioPlay player.
|
152 |
+
* Added PodPress Stats Archive view (option available in Settings > Basic page).
|
153 |
+
* Added 'Verify' media option next to Media URL box to check entered URL and detect file size/duration information.
|
154 |
+
* Added password protect feed option for Custom Channel feeds (option enabled under Tools page).
|
155 |
+
* Media detection for all types of media now uses the same code which is more reliable than the code found in WordPress core.
|
156 |
+
* New option that may fix issues with themes that strip the player from posts and pages. Confirmed fix works with Hybird based themes.
|
157 |
+
* Relabeled Custom Podcast Feeds to Custom Channels to clear up confusion.
|
158 |
+
* Reorganized settings pages with tabbed sections.
|
159 |
+
* Added new Video Scale setting, users can choose between 'scale', 'tofit, or enter their own scale value such as 1.5.
|
160 |
+
* Added new 'E-Book PDF' label for download links of PDF files.
|
161 |
+
* Added new CSS class to download links in the form of powerpress_links_EXTENSION, where EXTENSION is replaced with the media file extension in lower case. e.g. powerpress_links_mp3. Learn more: [PowerPress Advanced Tweaks](http://help.blubrry.com/blubrry-powerpress/advanced-tweaks/)
|
162 |
+
* Update iTunes Listing option in Podcast Channels and Podcast Category Feeds is now independant of main Update iTunes Listing setting.
|
163 |
+
* Made additional tweaks to further support the old PodPress [display_podcast] shortcode.
|
164 |
+
|
165 |
+
|
166 |
= 0.9.11 =
|
167 |
* Released on 10/01/2009
|
|
|
168 |
* Fixed minor bugs with mp3 media detection: proper user agent set, logic added to deal with LibSyn 406 error, and media detection script can now be used for detecting file size for other media types.
|
169 |
* Improved iTunes subtitle so value is contained within one line.
|
170 |
* Fixed bug with mv4 video displaying incorrectly in PowerPress player.
|
screenshot-1.jpg
DELETED
Binary file
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.jpg
DELETED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
screenshot-3.jpg
DELETED
Binary file
|
screenshot-3.png
ADDED
Binary file
|
screenshot-4.jpg
DELETED
Binary file
|
screenshot-4.png
ADDED
Binary file
|
screenshot-5.png
ADDED
Binary file
|
simple_mp3.swf
ADDED
Binary file
|