PowerPress Podcasting plugin by Blubrry - Version 0.9.3

Version Description

  • Released on 7/31/2009
  • Added option for wp-config.php define('POWERPRESS_ENABLE_HTTPS_MEDIA', 'warning'); to allow https:// links but still display a warning message.
  • Finalized code for new powerpress_player filter. Filter will be used in the up coming 1.0 release of Blubrry PowerPress.
  • Fixed bug with setting specific language in a custom podcast feed.
Download this release

Release Info

Developer amandato
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 0.9.3
Comparing to
See all releases

Code changes from version 0.9.2 to 0.9.3

Files changed (3) hide show
  1. powerpress.php +14 -8
  2. powerpressadmin.php +17 -8
  3. readme.txt +35 -29
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.9.2
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
@@ -29,7 +29,7 @@ License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
29
  */
30
 
31
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
32
- define('POWERPRESS_VERSION', '0.9.2' );
33
 
34
  /////////////////////////////////////////////////////
35
  // The following define options should be placed in your
@@ -212,7 +212,7 @@ function powerpress_content($content)
212
  if( $EpisodeData && isset($EpisodeData['embed']) )
213
  $new_content .= $EpisodeData['embed'];
214
  if( !isset($EpisodeData['no_player']) )
215
- $new_content .= apply_filters('powerpress_player', '', $EnclosureURL, array('feed'=>$feed_slug) );
216
  }
217
  }
218
 
@@ -850,7 +850,7 @@ function powerpress_rss_language($value)
850
 
851
  if( $cat_ID )
852
  $Feed = get_option('powerpress_cat_feed_'. $cat_ID);
853
- else if( $feed_slug != 'podcast' )
854
  $Feed = get_option('powerpress_feed');
855
  else
856
  $Feed = get_option('powerpress_feed_'. $feed_slug);
@@ -1213,6 +1213,11 @@ function powerpress_player_filter($content, $media_url, $ExtraData = array() )
1213
  //$content_type = powerpress_get_contenttype($media_url);
1214
 
1215
  $parts = pathinfo($media_url);
 
 
 
 
 
1216
  switch( strtolower($parts['extension']) )
1217
  {
1218
  // Flash Player:
@@ -1386,8 +1391,9 @@ function powerpress_shortcode_handler( $attributes, $content = null )
1386
  if( $url )
1387
  {
1388
  $url = powerpress_add_redirect_url($url);
 
1389
  // Handle the URL differently...
1390
- $return = apply_filters('powerpress_player', '', $url, array('image'=>$image) );
1391
  }
1392
  else if( $feed )
1393
  {
@@ -1395,7 +1401,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
1395
  if( isset($EpisdoeData['embed']) && $EpisdoeData['embed'] )
1396
  $return = $EpisdoeData['embed'];
1397
  if( !isset($EpisdoeData['no_player']) )
1398
- $return = apply_filters('powerpress_player', '', $EpisdoeData['url'], array('feed'=>$feed, 'image'=>$image) );
1399
  }
1400
  else
1401
  {
@@ -1410,7 +1416,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
1410
  $return .= $EpisdoeData['embed'];
1411
 
1412
  if( !isset($EpisdoeData['no_player']) )
1413
- $return .= apply_filters('powerpress_player', '', $EpisdoeData['url'], array('feed'=>$feed_slug, 'image'=>$image) );
1414
  }
1415
  }
1416
 
@@ -1460,7 +1466,7 @@ function powerpress_do_pinw($pinw)
1460
  }
1461
  else // if( !isset($EpisdoeData['no_player']) ) // Even if there is no player set, if the play in new window option is enabled then it should play here...
1462
  {
1463
- echo apply_filters('powerpress_player', '', $EpisdoeData['url'], array('feed'=>$feed_slug, 'autoplay'=>true) );
1464
  }
1465
 
1466
  ?>
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.9.3
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
29
  */
30
 
31
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
32
+ define('POWERPRESS_VERSION', '0.9.3' );
33
 
34
  /////////////////////////////////////////////////////
35
  // The following define options should be placed in your
212
  if( $EpisodeData && isset($EpisodeData['embed']) )
213
  $new_content .= $EpisodeData['embed'];
214
  if( !isset($EpisodeData['no_player']) )
215
+ $new_content .= apply_filters('powerpress_player', '', $EnclosureURL, array('feed'=>$feed_slug, 'type'=>$EpisdoeData['type']) );
216
  }
217
  }
218
 
850
 
851
  if( $cat_ID )
852
  $Feed = get_option('powerpress_cat_feed_'. $cat_ID);
853
+ else if( $feed_slug == 'podcast' )
854
  $Feed = get_option('powerpress_feed');
855
  else
856
  $Feed = get_option('powerpress_feed_'. $feed_slug);
1213
  //$content_type = powerpress_get_contenttype($media_url);
1214
 
1215
  $parts = pathinfo($media_url);
1216
+ // Hack to use the audio/mp3 content type to set extension to mp3, some folks use tinyurl.com to mp3 files which remove the file extension...
1217
+ // This hack only covers mp3s.
1218
+ if( isset($EpisdoeData['type']) && $EpisdoeData['type'] == 'audio/mpeg' && $parts['extension'] != 'mp3' )
1219
+ $parts['extension'] = 'mp3';
1220
+
1221
  switch( strtolower($parts['extension']) )
1222
  {
1223
  // Flash Player:
1391
  if( $url )
1392
  {
1393
  $url = powerpress_add_redirect_url($url);
1394
+ $content_type = '';
1395
  // Handle the URL differently...
1396
+ $return = apply_filters('powerpress_player', '', $url, array('image'=>$image, 'type'=>$content_type) );
1397
  }
1398
  else if( $feed )
1399
  {
1401
  if( isset($EpisdoeData['embed']) && $EpisdoeData['embed'] )
1402
  $return = $EpisdoeData['embed'];
1403
  if( !isset($EpisdoeData['no_player']) )
1404
+ $return = apply_filters('powerpress_player', '', $EpisdoeData['url'], array('feed'=>$feed, 'image'=>$image, 'type'=>$EpisdoeData['type']) );
1405
  }
1406
  else
1407
  {
1416
  $return .= $EpisdoeData['embed'];
1417
 
1418
  if( !isset($EpisdoeData['no_player']) )
1419
+ $return .= apply_filters('powerpress_player', '', $EpisdoeData['url'], array('feed'=>$feed_slug, 'image'=>$image, 'type'=>$EpisdoeData['type']) );
1420
  }
1421
  }
1422
 
1466
  }
1467
  else // if( !isset($EpisdoeData['no_player']) ) // Even if there is no player set, if the play in new window option is enabled then it should play here...
1468
  {
1469
+ echo apply_filters('powerpress_player', '', $EpisdoeData['url'], array('feed'=>$feed_slug, 'autoplay'=>true, 'type'=>$EpisdoeData['type']) );
1470
  }
1471
 
1472
  ?>
powerpressadmin.php CHANGED
@@ -1043,12 +1043,21 @@ function powerpress_check_url(url)
1043
  if( !defined('POWERPRESS_ENABLE_HTTPS_MEDIA') )
1044
  {
1045
  ?>
1046
- if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1047
- {
1048
- document.getElementById(DestDiv).innerHTML = '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.';
1049
- document.getElementById(DestDiv).style.display = 'block';
1050
- return;
1051
- }
 
 
 
 
 
 
 
 
 
1052
  <?php
1053
  }
1054
  ?>
@@ -1109,8 +1118,8 @@ function powerpress_admin_page_basic()
1109
  // Admin page, advanced mode: basic settings
1110
  function powerpress_admin_page_players()
1111
  {
1112
- powerpress_admin_page_header();
1113
- require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
1114
  powerpress_admin_players();
1115
  powerpress_admin_page_footer(true);
1116
  }
1043
  if( !defined('POWERPRESS_ENABLE_HTTPS_MEDIA') )
1044
  {
1045
  ?>
1046
+ if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1047
+ {
1048
+ document.getElementById(DestDiv).innerHTML = '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://.';
1049
+ document.getElementById(DestDiv).style.display = 'block';
1050
+ return;
1051
+ }
1052
+ <?php
1053
+ } else if( POWERPRESS_ENABLE_HTTPS_MEDIA === 'warning' ) {
1054
+ ?>
1055
+ if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1056
+ {
1057
+ document.getElementById(DestDiv).innerHTML = '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.';
1058
+ document.getElementById(DestDiv).style.display = 'block';
1059
+ return;
1060
+ }
1061
  <?php
1062
  }
1063
  ?>
1118
  // Admin page, advanced mode: basic settings
1119
  function powerpress_admin_page_players()
1120
  {
1121
+ powerpress_admin_page_header('powerpress/powerpressadmin_player.php');
1122
+ require_once( dirname(__FILE__).'/powerpressadmin-player.php');
1123
  powerpress_admin_players();
1124
  powerpress_admin_page_footer(true);
1125
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Angelo Mandato, Blubrry.com
3
  Tags: podcast, podcasting, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, 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.2
6
- Stable tag: 0.9.2
7
 
8
  Add podcasting support to your blog.
9
 
@@ -59,7 +59,7 @@ Blubrry PowerPress does not allow you to include multiple media files for one fe
59
  As a alternative, PowerPress allows you to create additional Custom Podcast Feeds to associate additional media files in a blog post to specific feeds.
60
 
61
  = Why doesn't Blubrry PowerPress include media statistics built-in? =
62
- Blubrry PowerPress does not include media statistics built-in. This is not because Blubrry has its own statistics service, although that's a good reason by itself. Maintaining and calculating statistics is a resource and server intensive task that would add bloat to an otherwise lightweight Wordpress podcasting plugin. We recommend you use your media hosting's statistics and you're more than welcome to use the [Blubrry Statistics service](http://www.blubrry.com/podcast_statistics/) as well.
63
 
64
  As of Blubrry PowerPress version 0.8, you may now access your Blubrry Statistics from within your WordPress dashboard.
65
 
@@ -85,36 +85,42 @@ As a alternative, PowerPress allows you to create additional Custom Podcast Feed
85
 
86
  == Changelog ==
87
 
88
- = 0.9.2 =
89
- released on 07/23/2009
90
- * Fixed logic error for new window player, now only displays embed or player, not both.
91
- * Fixed content-type detection bug introduced in version 0.9.1.
92
- * Added code to auto-correct the content-type in the feeds if it is invalid.
93
- * Updated readme.txt to use the recommended Changelog format.
 
 
 
 
 
 
94
 
95
- = 0.9.1 =
96
- released on 7/22/2009
97
- * Added new define for wp-config.php `POWERPRESS_ENABLE_HTTPS_MEDIA` for allowing https:// media links.
98
- * iTunes ping logic updated to support scheduled posts as well as category and custom podcast feeds.
99
- * iTunes URL setting added to category and custom podcast feeds settings page.
100
- * Latest iTunes ping status now displayed below iTunes URL setting. `in_the_loop()` check added to 0.9.0 removed which broke some themes.
101
- * Screenshots updated.
102
 
103
  = 0.9.0 =
104
- released on 7/20/2009
105
- * Added `powerpress_get_enclosure_data()` and `powerpress_get_enclosure()` courtesy functions for theme developers to obtain enclosure data
106
- * changed the icon used for selecting blubrry hosted media
107
- * added m4b and m4r to list of detected audio formats
108
- * relabled Redirect Feed URL to FeedBurner Feed URL to clear up confusion.
109
- * Completely revamped the on page and new window players, removed the "play in page" options as they were a source of confusion for some users
110
- * Added code to support poorly written themes that capture post content incorrectly,
111
- * New powerpress shortcode added, enter [powerpress] within your post and the player will be inserted at that location, player.
112
- * New embed option added to episode entry box, displayed just above the built-in player.
113
- * New option to remove the player on a per episode basis.
114
- * New optional episode entry fields for iTunes Keywords, iTunes Subtitle and iTunes Summary.
115
- * Added courtesy functions `the_powerpress_content()` and `get_the_powerpress_content()` for theme developers to use for special themes. Example usage: `<?php if( function_exists('the_powerpress_content') ) the_powerpress_content(); ?>`
116
- * Fixed bug with `require_once()` calls on some servers displaying a fatal error.
117
- * Fixed scheduled posts bug with WordPress 2.8+.
118
 
119
  0.8.3 released on 6/27/2009
120
  Fixed bug with feed redirect URL setting for custom feeds, added option to disable the dashboard statistics widget, fixed 2 bugs with Blubrry hosting integration: media URL field no longer read-only after publishing and ID3 write tags bug fixed.
3
  Tags: podcast, podcasting, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, 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.2
6
+ Stable tag: 0.9.3
7
 
8
  Add podcasting support to your blog.
9
 
59
  As a alternative, PowerPress allows you to create additional Custom Podcast Feeds to associate additional media files in a blog post to specific feeds.
60
 
61
  = Why doesn't Blubrry PowerPress include media statistics built-in? =
62
+ Blubrry PowerPress does not include media statistics built-in. This is not because Blubrry has its own statistics service, although that's a good reason by itself. Maintaining and calculating statistics is a resource and server intensive task that would add bloat to an otherwise efficient Wordpress podcasting plugin. We recommend you use your media hosting's statistics and you're more than welcome to use the [Blubrry Statistics service](http://www.blubrry.com/podcast_statistics/) as well.
63
 
64
  As of Blubrry PowerPress version 0.8, you may now access your Blubrry Statistics from within your WordPress dashboard.
65
 
85
 
86
  == Changelog ==
87
 
88
+ = 0.9.3 =
89
+ * Released on 7/31/2009
90
+ * Added option for wp-config.php `define('POWERPRESS_ENABLE_HTTPS_MEDIA', 'warning');` to allow https:// links but still display a warning message.
91
+ * Finalized code for new powerpress_player filter. Filter will be used in the up coming 1.0 release of Blubrry PowerPress.
92
+ * Fixed bug with setting specific language in a custom podcast feed.
93
+
94
+ = 0.9.2 =
95
+ * Released on 07/23/2009
96
+ * Fixed logic error for new window player, now only displays embed or player, not both.
97
+ * Fixed content-type detection bug introduced in version 0.9.1.
98
+ * Added code to auto-correct the content-type in the feeds if it is invalid.
99
+ * Updated readme.txt to use the recommended Changelog format.
100
 
101
+ = 0.9.1 =
102
+ * Released on 7/22/2009
103
+ * Added new define for wp-config.php `define('POWERPRESS_ENABLE_HTTPS_MEDIA', true);` for allowing https:// media links.
104
+ * iTunes ping logic updated to support scheduled posts as well as category and custom podcast feeds.
105
+ * iTunes URL setting added to category and custom podcast feeds settings page.
106
+ * Latest iTunes ping status now displayed below iTunes URL setting. `in_the_loop()` check added to 0.9.0 removed which broke some themes.
107
+ * Screenshots updated.
108
 
109
  = 0.9.0 =
110
+ * Released on 7/20/2009
111
+ * Added `powerpress_get_enclosure_data()` and `powerpress_get_enclosure()` courtesy functions for theme developers to obtain enclosure data
112
+ * changed the icon used for selecting blubrry hosted media
113
+ * added m4b and m4r to list of detected audio formats
114
+ * relabled Redirect Feed URL to FeedBurner Feed URL to clear up confusion.
115
+ * Completely revamped the on page and new window players, removed the "play in page" options as they were a source of confusion for some users
116
+ * Added code to support poorly written themes that capture post content incorrectly,
117
+ * New powerpress shortcode added, enter [powerpress] within your post and the player will be inserted at that location, player.
118
+ * New embed option added to episode entry box, displayed just above the built-in player.
119
+ * New option to remove the player on a per episode basis.
120
+ * New optional episode entry fields for iTunes Keywords, iTunes Subtitle and iTunes Summary.
121
+ * Added courtesy functions `the_powerpress_content()` and `get_the_powerpress_content()` for theme developers to use for special themes. Example usage: `<?php if( function_exists('the_powerpress_content') ) the_powerpress_content(); ?>`
122
+ * Fixed bug with `require_once()` calls on some servers displaying a fatal error.
123
+ * Fixed scheduled posts bug with WordPress 2.8+.
124
 
125
  0.8.3 released on 6/27/2009
126
  Fixed bug with feed redirect URL setting for custom feeds, added option to disable the dashboard statistics widget, fixed 2 bugs with Blubrry hosting integration: media URL field no longer read-only after publishing and ID3 write tags bug fixed.