Version Description
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 0.4.0 |
Comparing to | |
See all releases |
Code changes from version 0.3.2 to 0.4.0
- play_default.jpg +0 -0
- player.js +13 -0
- powerpress.php +34 -5
- powerpressadmin.php +4 -1
- readme.txt +5 -2
play_default.jpg
ADDED
Binary file
|
player.js
CHANGED
@@ -23,6 +23,7 @@ function jsMediaPlayer(FlashSrc) {
|
|
23 |
this.m_player_wnd = false;
|
24 |
this.m_one_player_only = false;
|
25 |
this.m_media_url = false;
|
|
|
26 |
|
27 |
|
28 |
this.FlashSrc=function(Src) {
|
@@ -45,6 +46,10 @@ function jsMediaPlayer(FlashSrc) {
|
|
45 |
this.m_one_player_only = Setting;
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
48 |
this.PlayInPage = function() {
|
49 |
|
50 |
// Check if we should even use javascript based player
|
@@ -75,6 +80,14 @@ function jsMediaPlayer(FlashSrc) {
|
|
75 |
case 'qt':
|
76 |
case 'mov': {
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
var contentType = 'video/mpeg'; // Default content type
|
79 |
if( ext == 'm4v' )
|
80 |
contentType = 'video/x-m4v';
|
23 |
this.m_player_wnd = false;
|
24 |
this.m_one_player_only = false;
|
25 |
this.m_media_url = false;
|
26 |
+
this.m_play_image = false;
|
27 |
|
28 |
|
29 |
this.FlashSrc=function(Src) {
|
46 |
this.m_one_player_only = Setting;
|
47 |
}
|
48 |
|
49 |
+
this.PlayImage=function(URL) {
|
50 |
+
this.m_play_image = URL;
|
51 |
+
}
|
52 |
+
|
53 |
this.PlayInPage = function() {
|
54 |
|
55 |
// Check if we should even use javascript based player
|
80 |
case 'qt':
|
81 |
case 'mov': {
|
82 |
|
83 |
+
if( this.m_play_image && this.PlayInPage.arguments.length > 2 && this.PlayInPage.arguments[2] )
|
84 |
+
{
|
85 |
+
// Display the player image here...
|
86 |
+
//alert('sweet');
|
87 |
+
document.getElementById( this.m_player_div ).innerHTML = '<a href="#" onclick="'+ this.PlayInPage.arguments[2] +'.PlayInPage(\''+ this.m_media_url +'\', \''+ this.m_player_div +'\');" title="Play on page"><img src="'+ this.m_play_image +'" alt="Play on page" /></a>';
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
|
91 |
var contentType = 'video/mpeg'; // Default content type
|
92 |
if( ext == 'm4v' )
|
93 |
contentType = 'video/x-m4v';
|
powerpress.php
CHANGED
@@ -3,10 +3,11 @@
|
|
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 and iTunes integration.
|
6 |
-
Version: 0.
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
|
|
10 |
2008-10-05 - v0.3.2: Added alternative logic for those who host their blogs on servers with allow_url_fopen turned off.
|
11 |
2008-10-02 - v0.3.1: iTunes subtitle, keywords and summary values now properly escape html special characters such as added define for adding itunes:new-feed-url tag, added define to display player for legacy Podpress episodes only.
|
12 |
2008-09-24 - v0.3.0: Added important feeds list in feed settings, logic to prevent stats redirect duplication and added podcast only feed.
|
@@ -50,11 +51,16 @@ define('POWERPRESS_VERSION', '0.3.1' );
|
|
50 |
// Display Powerpress player only for previously created Podpress episodes.
|
51 |
// define('POWERPRESS_USE_PLAYER_FOR_PODPRESS_EPISODES', true);
|
52 |
|
|
|
|
|
|
|
53 |
// Define variables, advanced users could define these in their own wp-config.php so lets not try to re-define
|
54 |
if( !defined('POWERPRESS_PLUGIN_PATH') )
|
55 |
define('POWERPRESS_PLUGIN_PATH', '/wp-content/plugins/powerpress/');
|
56 |
if( !defined('POWERPRESS_LINK_SEPARATOR') )
|
57 |
define('POWERPRESS_LINK_SEPARATOR', '|');
|
|
|
|
|
58 |
if( !defined('PHP_EOL') )
|
59 |
define('PHP_EOL', "\n"); // We need this variable defined for new lines.
|
60 |
|
@@ -122,16 +128,21 @@ function powerpress_content($content)
|
|
122 |
switch( $Powerpress['player_function'] )
|
123 |
{
|
124 |
case 1: { // On page and new window
|
125 |
-
//$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in page\" onclick=\"return bpPlayer.PlayInPage(this.href, 'powerpress_player_{$post->ID}');\">Play in page</a>".PHP_EOL;
|
126 |
-
//$player_links .= " ".POWERPRESS_LINK_SEPARATOR." ";
|
127 |
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in new window\" onclick=\"return bpPlayer.PlayNewWindow(this.href);\">Play in new window</a>".PHP_EOL;
|
128 |
}; break;
|
129 |
case 2: { // Play in page only
|
130 |
-
//$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in page\" onclick=\"return bpPlayer.PlayInPage(this.href, 'powerpress_player_{$post->ID}');\">Play in page</a>".PHP_EOL;
|
131 |
}; break;
|
132 |
case 3: { //Play in new window only
|
133 |
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in new window\" onclick=\"return bpPlayer.PlayNewWindow(this.href);\">Play in new window</a>".PHP_EOL;
|
134 |
}; break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
}//end switch
|
136 |
|
137 |
if( $Powerpress['podcast_link'] == 1 )
|
@@ -146,9 +157,13 @@ function powerpress_content($content)
|
|
146 |
{
|
147 |
$new_content .= '<div class="powerpress_player" id="powerpress_player_'. $post->ID .'"></div>'.PHP_EOL;
|
148 |
$new_content .= '<script type="text/javascript">'.PHP_EOL;
|
149 |
-
$new_content .= "bpPlayer.PlayInPage('$EnclosureURL', 'powerpress_player_{$post->ID}');\n";
|
150 |
$new_content .= '</script>'.PHP_EOL;
|
151 |
}
|
|
|
|
|
|
|
|
|
152 |
if( $player_links )
|
153 |
$new_content .= '<p class="powerpress_links">Podcast: ' . $player_links . '</p>'.PHP_EOL;
|
154 |
|
@@ -170,11 +185,25 @@ add_action('the_content', 'powerpress_content');
|
|
170 |
|
171 |
function powerpress_header()
|
172 |
{
|
|
|
|
|
|
|
173 |
$PowerpressPluginURL = powerpress_get_root_url();
|
174 |
?>
|
175 |
<script type="text/javascript" src="<?php echo $PowerpressPluginURL; ?>player.js"></script>
|
176 |
<script type="text/javascript">
|
177 |
var bpPlayer = new jsMediaPlayer('<?php echo $PowerpressPluginURL; ?>FlowPlayerClassic.swf');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
</script>
|
179 |
<style type="text/css">
|
180 |
.powerpress_player_old {
|
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 and iTunes integration.
|
6 |
+
Version: 0.4.0
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
10 |
+
2008-10-21 - v0.4.0: Added two new play options adding 'play on page' links with and without play in new window links and now use a customizable play image for quicktime media.
|
11 |
2008-10-05 - v0.3.2: Added alternative logic for those who host their blogs on servers with allow_url_fopen turned off.
|
12 |
2008-10-02 - v0.3.1: iTunes subtitle, keywords and summary values now properly escape html special characters such as added define for adding itunes:new-feed-url tag, added define to display player for legacy Podpress episodes only.
|
13 |
2008-09-24 - v0.3.0: Added important feeds list in feed settings, logic to prevent stats redirect duplication and added podcast only feed.
|
51 |
// Display Powerpress player only for previously created Podpress episodes.
|
52 |
// define('POWERPRESS_USE_PLAYER_FOR_PODPRESS_EPISODES', true);
|
53 |
|
54 |
+
// Display custom play image for quicktime media. Applies to on page player only.
|
55 |
+
// define('POWERPRESS_PLAY_IMAGE', 'http://www.blubrry.com/themes/blubrry/images/player/PlayerBadge150x50NoBorder.jpg');
|
56 |
+
|
57 |
// Define variables, advanced users could define these in their own wp-config.php so lets not try to re-define
|
58 |
if( !defined('POWERPRESS_PLUGIN_PATH') )
|
59 |
define('POWERPRESS_PLUGIN_PATH', '/wp-content/plugins/powerpress/');
|
60 |
if( !defined('POWERPRESS_LINK_SEPARATOR') )
|
61 |
define('POWERPRESS_LINK_SEPARATOR', '|');
|
62 |
+
if( !defined('POWERPRESS_PLAY_IMAGE') )
|
63 |
+
define('POWERPRESS_PLAY_IMAGE', 'play_default.jpg');
|
64 |
if( !defined('PHP_EOL') )
|
65 |
define('PHP_EOL', "\n"); // We need this variable defined for new lines.
|
66 |
|
128 |
switch( $Powerpress['player_function'] )
|
129 |
{
|
130 |
case 1: { // On page and new window
|
|
|
|
|
131 |
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in new window\" onclick=\"return bpPlayer.PlayNewWindow(this.href);\">Play in new window</a>".PHP_EOL;
|
132 |
}; break;
|
133 |
case 2: { // Play in page only
|
|
|
134 |
}; break;
|
135 |
case 3: { //Play in new window only
|
136 |
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in new window\" onclick=\"return bpPlayer.PlayNewWindow(this.href);\">Play in new window</a>".PHP_EOL;
|
137 |
}; break;
|
138 |
+
case 4: { // Play on page link only
|
139 |
+
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play on page\" onclick=\"return bpPlayer.PlayInPage(this.href, 'powerpress_player_{$post->ID}');\">Play on page</a>".PHP_EOL;
|
140 |
+
}; break;
|
141 |
+
case 5: { //Play on page link and new window
|
142 |
+
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play on page\" onclick=\"return bpPlayer.PlayInPage(this.href, 'powerpress_player_{$post->ID}');\">Play on page</a>".PHP_EOL;
|
143 |
+
$player_links .= ' '. POWERPRESS_LINK_SEPARATOR .' ';
|
144 |
+
$player_links .= "<a href=\"$EnclosureURL\" title=\"Play in new window\" onclick=\"return bpPlayer.PlayNewWindow(this.href);\">Play in new window</a>".PHP_EOL;
|
145 |
+
}; break;
|
146 |
}//end switch
|
147 |
|
148 |
if( $Powerpress['podcast_link'] == 1 )
|
157 |
{
|
158 |
$new_content .= '<div class="powerpress_player" id="powerpress_player_'. $post->ID .'"></div>'.PHP_EOL;
|
159 |
$new_content .= '<script type="text/javascript">'.PHP_EOL;
|
160 |
+
$new_content .= "bpPlayer.PlayInPage('$EnclosureURL', 'powerpress_player_{$post->ID}', 'bpPlayer');\n";
|
161 |
$new_content .= '</script>'.PHP_EOL;
|
162 |
}
|
163 |
+
else if( $Powerpress['player_function'] == 4 || $Powerpress['player_function'] == 5 )
|
164 |
+
{
|
165 |
+
$new_content .= '<div class="powerpress_player" id="powerpress_player_'. $post->ID .'"></div>'.PHP_EOL;
|
166 |
+
}
|
167 |
if( $player_links )
|
168 |
$new_content .= '<p class="powerpress_links">Podcast: ' . $player_links . '</p>'.PHP_EOL;
|
169 |
|
185 |
|
186 |
function powerpress_header()
|
187 |
{
|
188 |
+
// Powerpress settings:
|
189 |
+
$Powerpress = get_option('powerpress_general');
|
190 |
+
|
191 |
$PowerpressPluginURL = powerpress_get_root_url();
|
192 |
?>
|
193 |
<script type="text/javascript" src="<?php echo $PowerpressPluginURL; ?>player.js"></script>
|
194 |
<script type="text/javascript">
|
195 |
var bpPlayer = new jsMediaPlayer('<?php echo $PowerpressPluginURL; ?>FlowPlayerClassic.swf');
|
196 |
+
<?php
|
197 |
+
if( $Powerpress['player_function'] == 4 || $Powerpress['player_function'] == 5 )
|
198 |
+
{
|
199 |
+
echo 'bpPlayer.OnePlayerOnly(true);'.PHP_EOL;
|
200 |
+
echo 'bpPlayer.AutoPlay(true);'.PHP_EOL;
|
201 |
+
}
|
202 |
+
$player_image_url = POWERPRESS_PLAY_IMAGE;
|
203 |
+
if( strstr($player_image_url, 'http://') !== $player_image_url )
|
204 |
+
$player_image_url = powerpress_get_root_url().$player_image_url;
|
205 |
+
echo 'bpPlayer.PlayImage(\''.$player_image_url.'\');'.PHP_EOL;
|
206 |
+
?>
|
207 |
</script>
|
208 |
<style type="text/css">
|
209 |
.powerpress_player_old {
|
powerpressadmin.php
CHANGED
@@ -646,13 +646,16 @@ while( list($value,$desc) = each($displayoptions) )
|
|
646 |
<?php _e("Player Function"); ?></th>
|
647 |
<td><select name="General[player_function]">
|
648 |
<?php
|
649 |
-
$playeroptions = array(1=>'On Page & New Window', 2=>'On Page Only', 3=>'New Window Only', 0=>'Disable');
|
650 |
|
651 |
while( list($value,$desc) = each($playeroptions) )
|
652 |
echo "\t<option value=\"$value\"". ($General['player_function']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
653 |
|
654 |
?>
|
655 |
</select>
|
|
|
|
|
|
|
656 |
</td>
|
657 |
</tr>
|
658 |
|
646 |
<?php _e("Player Function"); ?></th>
|
647 |
<td><select name="General[player_function]">
|
648 |
<?php
|
649 |
+
$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');
|
650 |
|
651 |
while( list($value,$desc) = each($playeroptions) )
|
652 |
echo "\t<option value=\"$value\"". ($General['player_function']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
|
653 |
|
654 |
?>
|
655 |
</select>
|
656 |
+
<p style="margin-top: 0;">
|
657 |
+
Note: "On Page Link" is a link to "play on page", the player is not displayed until link is clicked.
|
658 |
+
</p>
|
659 |
</td>
|
660 |
</tr>
|
661 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Angelo Mandato, Blubrry.com
|
|
3 |
Tags: podcast, podcasting, itunes, enclosure, zune, iphone, audio, video, rss2, feed, player, media, rss
|
4 |
Requires at least: 2.5.0
|
5 |
Tested up to: 2.6.2
|
6 |
-
Stable tag: 0.
|
7 |
|
8 |
Add podcasting support to your blog.
|
9 |
|
@@ -63,7 +63,10 @@ New features: Added important feeds list in feed settings, logic to prevent stat
|
|
63 |
Fixed bug and added enhancements: iTunes subtitle, keywords and summary values now properly escape html special characters such as added define for adding itunes:new-feed-url tag, added define to display player for legacy Podpress episodes only.
|
64 |
|
65 |
0.3.2 released on 10/05/2008
|
66 |
-
Added alternative logic for those who host their blogs on servers with
|
|
|
|
|
|
|
67 |
|
68 |
== Feedback ==
|
69 |
http://www.blubrry.com/powerpress/
|
3 |
Tags: podcast, podcasting, itunes, enclosure, zune, iphone, audio, video, rss2, feed, player, media, rss
|
4 |
Requires at least: 2.5.0
|
5 |
Tested up to: 2.6.2
|
6 |
+
Stable tag: 0.4.0
|
7 |
|
8 |
Add podcasting support to your blog.
|
9 |
|
63 |
Fixed bug and added enhancements: iTunes subtitle, keywords and summary values now properly escape html special characters such as added define for adding itunes:new-feed-url tag, added define to display player for legacy Podpress episodes only.
|
64 |
|
65 |
0.3.2 released on 10/05/2008
|
66 |
+
Added alternative logic for those who host their blogs on servers with allow _ url _ fopen turned off.
|
67 |
+
|
68 |
+
0.4.0 released on 10/21/2008
|
69 |
+
Added two new play options adding 'play on page' links with and without play in new window links and now use a customizable play image for quicktime formatted media. Image may be customized by adding a define('POWERPRESS _ PLAY _ IMAGE', 'URL to image') to wp config file.
|
70 |
|
71 |
== Feedback ==
|
72 |
http://www.blubrry.com/powerpress/
|