PowerPress Podcasting plugin by Blubrry - Version 0.5.1

Version Description

Download this release

Release Info

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

Code changes from version 0.5.0 to 0.5.1

Files changed (3) hide show
  1. powerpress.php +10 -7
  2. powerpressadmin.php +3 -1
  3. readme.txt +7 -4
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.5.0
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
 
10
  2008-11-26 - v0.5.0: Added options to report media duration and file size next to download links, new Media URL check performed when adding episode to new post and fixed a number of bugs including the player auto play bug caused by version v0.4.2.
11
  2008-10-24 - v0.4.2: Fixed quicktime in-page player bug, fixed bug which caused itunes keywords and subtitle to be blank and incremented version number.
12
  2008-10-24 - v0.4.1: Fixed auto-play bug found in last update, only affected quicktime files with the play on page option.
@@ -39,7 +40,7 @@ License: Apache License version 2.0 (http://www.apache.org/licenses/)
39
  is interpreted as GPL version 3.0 for compatibility with Apache 2.0 license.
40
  */
41
 
42
- define('POWERPRESS_VERSION', '0.5.0' );
43
 
44
  // include <itunes:new-feed-url> tag in Main RSS feed:
45
  //define('POWERPRESS_NEW_FEED_URL', 'http://www.your-site.com/path/to/feed/');
@@ -296,9 +297,9 @@ function powerpress_rss2_head()
296
  echo "\t<itunes:new-feed-url>". constant( 'POWERPRESS_NEW_FEED_URL_'.strtoupper($feed) ) .'</itunes:new-feed-url>'.PHP_EOL;
297
 
298
  if( $Feed['itunes_summary'] )
299
- echo "\t".'<itunes:summary>'. htmlentities( $Feed['itunes_summary'], ENT_NOQUOTES, 'UTF-8') .'</itunes:summary>'.PHP_EOL;
300
  else
301
- echo "\t".'<itunes:summary>'. htmlentities( get_bloginfo('description'), ENT_NOQUOTES, 'UTF-8') .'</itunes:summary>'.PHP_EOL;
302
 
303
  // explicit options:
304
  $explicit = array("no", "yes", "clean");
@@ -503,7 +504,7 @@ function powerpress_rss2_item()
503
  {
504
  $tags = array();
505
  for($c = 0; $c < count($tagobject) && $c < 12; $c++) // iTunes only accepts up to 12 keywords
506
- $tags[] = htmlentities($tagobject[$c]->name, ENT_NOQUOTES, 'UTF-8');
507
 
508
  echo "\t\t<itunes:keywords>" . powerpress_format_itunes_value(implode(",", $tags)) . '</itunes:keywords>'.PHP_EOL;
509
  }
@@ -522,7 +523,7 @@ function powerpress_rss2_item()
522
  else
523
  echo "\t\t<itunes:subtitle>". powerpress_format_itunes_value(powerpress_smart_trim($content_no_html, 250, true)) .'</itunes:subtitle>'.PHP_EOL;
524
 
525
- echo "\t\t<itunes:summary>". powerpress_format_itunes_value(powerpress_smart_trim($content_no_html, 4000)) .'</itunes:summary>'.PHP_EOL;
526
 
527
  if( $powerpress_itunes_talent_name )
528
  echo "\t\t<itunes:author>" . $powerpress_itunes_talent_name . '</itunes:author>'.PHP_EOL;
@@ -719,7 +720,7 @@ function powerpress_get_root_url()
719
  return WP_PLUGIN_URL . '/'. $powerpress_dirname .'/';
720
  }
721
 
722
- function powerpress_format_itunes_value($value)
723
  {
724
  $value = htmlentities($value, ENT_NOQUOTES, 'UTF-8');
725
  //$value = str_replace('&quot;', '', $value);
@@ -728,6 +729,8 @@ function powerpress_format_itunes_value($value)
728
  $value = str_replace('&gt;', '', $value);
729
  //$value = str_replace('&nbsp;', '', $value);
730
  $value = str_replace('&', '', $value); // Last attempt to fix, just remove the &
 
 
731
  return $value;
732
  }
733
 
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.5.1
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
10
+ 2008-12-10 - v0.5.1: Added podcast to pages option (Thanks @Frumph), added code to make sure the itunes:subtitle, keywords and summary feed tags never exceed their size limits.
11
  2008-11-26 - v0.5.0: Added options to report media duration and file size next to download links, new Media URL check performed when adding episode to new post and fixed a number of bugs including the player auto play bug caused by version v0.4.2.
12
  2008-10-24 - v0.4.2: Fixed quicktime in-page player bug, fixed bug which caused itunes keywords and subtitle to be blank and incremented version number.
13
  2008-10-24 - v0.4.1: Fixed auto-play bug found in last update, only affected quicktime files with the play on page option.
40
  is interpreted as GPL version 3.0 for compatibility with Apache 2.0 license.
41
  */
42
 
43
+ define('POWERPRESS_VERSION', '0.5.1' );
44
 
45
  // include <itunes:new-feed-url> tag in Main RSS feed:
46
  //define('POWERPRESS_NEW_FEED_URL', 'http://www.your-site.com/path/to/feed/');
297
  echo "\t<itunes:new-feed-url>". constant( 'POWERPRESS_NEW_FEED_URL_'.strtoupper($feed) ) .'</itunes:new-feed-url>'.PHP_EOL;
298
 
299
  if( $Feed['itunes_summary'] )
300
+ echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( $Feed['itunes_summary'] ) .'</itunes:summary>'.PHP_EOL;
301
  else
302
+ echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( get_bloginfo('description') ) .'</itunes:summary>'.PHP_EOL;
303
 
304
  // explicit options:
305
  $explicit = array("no", "yes", "clean");
504
  {
505
  $tags = array();
506
  for($c = 0; $c < count($tagobject) && $c < 12; $c++) // iTunes only accepts up to 12 keywords
507
+ $tags[] = $tagobject[$c]->name;
508
 
509
  echo "\t\t<itunes:keywords>" . powerpress_format_itunes_value(implode(",", $tags)) . '</itunes:keywords>'.PHP_EOL;
510
  }
523
  else
524
  echo "\t\t<itunes:subtitle>". powerpress_format_itunes_value(powerpress_smart_trim($content_no_html, 250, true)) .'</itunes:subtitle>'.PHP_EOL;
525
 
526
+ echo "\t\t<itunes:summary>". powerpress_format_itunes_value(powerpress_smart_trim($content_no_html, 4000), 4000) .'</itunes:summary>'.PHP_EOL;
527
 
528
  if( $powerpress_itunes_talent_name )
529
  echo "\t\t<itunes:author>" . $powerpress_itunes_talent_name . '</itunes:author>'.PHP_EOL;
720
  return WP_PLUGIN_URL . '/'. $powerpress_dirname .'/';
721
  }
722
 
723
+ function powerpress_format_itunes_value($value, $char_limit = 255)
724
  {
725
  $value = htmlentities($value, ENT_NOQUOTES, 'UTF-8');
726
  //$value = str_replace('&quot;', '', $value);
729
  $value = str_replace('&gt;', '', $value);
730
  //$value = str_replace('&nbsp;', '', $value);
731
  $value = str_replace('&', '', $value); // Last attempt to fix, just remove the &
732
+ if( strlen($value) > $char_limit )
733
+ return substr($value, 0, $char_limit);
734
  return $value;
735
  }
736
 
powerpressadmin.php CHANGED
@@ -1,8 +1,10 @@
1
  <?php
2
 
3
  function powerpress_admin_menu() {
4
- if( function_exists('add_meta_box') ) // Otherwise we're using a version of wordpress that is not supported.
5
  add_meta_box('id', 'Podcast Episode', 'powerpress_meta_box', 'post', 'normal');
 
 
6
  add_options_page('Blubrry Powerpress Settings', 'Blubrry Powerpress', 8, 'powerpress/powerpress.php', 'powerpress_admin_page');
7
  }
8
 
1
  <?php
2
 
3
  function powerpress_admin_menu() {
4
+ if( function_exists('add_meta_box') ) { // Otherwise we're using a version of wordpress that is not supported.
5
  add_meta_box('id', 'Podcast Episode', 'powerpress_meta_box', 'post', 'normal');
6
+ add_meta_box('id', 'Podcast Episode', 'powerpress_meta_box', 'page', 'normal');
7
+ }
8
  add_options_page('Blubrry Powerpress Settings', 'Blubrry Powerpress', 8, 'powerpress/powerpress.php', 'powerpress_admin_page');
9
  }
10
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  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.5
6
- Stable tag: 0.5.0
7
 
8
  Add podcasting support to your blog.
9
 
@@ -14,11 +14,11 @@ The Blubrry Powerpress interface allows you to easily add/modify/remove podcast
14
 
15
  Features:
16
 
17
- * Easily add/modify/remove podcast episodes from blog posts
18
  * Integrated media player
19
  * iTunes RSS tags
20
  * iTunes album/cover art
21
- * upload new iTunes/RSS cover art
22
  * Ping iTunes
23
  * Media size detection
24
  * Duration detection (mp3 only)
@@ -81,6 +81,9 @@ Fixed quicktime in-page player bug, fixed bug which caused itunes keywords and s
81
  0.5.0 released on 11/26/2008
82
  Added options to report media duration and file size next to download links. Removed optional defines POWERPRESS _ PLUGIN _ PATH and POWERPRESS _ ITEM _ SUMMARY, defines no longer necessary. Added itunes:author and itunes:subtitle to header portion of podcast feeds and itunes:summary to post items. No longer removing quotes or extra spaces from itunes summary. Player auto-play bug fixed when quicktime files mixed with mp3s. Added new option to ping iTunes in a new browser window. Verify flash player check added, Wordpress auto plugin update will corrupt the flash player. This bug is fixed in Wordpress 2.7 beta 2 and newer. Media URL now displays a warning if the value contains characters which may cause problems.
83
 
 
 
 
84
  == Feedback ==
85
  http://www.blubrry.com/powerpress/
86
 
2
  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.7
6
+ Stable tag: 0.5.1
7
 
8
  Add podcasting support to your blog.
9
 
14
 
15
  Features:
16
 
17
+ * Easily add/modify/remove podcast episodes from blog posts and pages
18
  * Integrated media player
19
  * iTunes RSS tags
20
  * iTunes album/cover art
21
+ * Upload new iTunes/RSS cover art
22
  * Ping iTunes
23
  * Media size detection
24
  * Duration detection (mp3 only)
81
  0.5.0 released on 11/26/2008
82
  Added options to report media duration and file size next to download links. Removed optional defines POWERPRESS _ PLUGIN _ PATH and POWERPRESS _ ITEM _ SUMMARY, defines no longer necessary. Added itunes:author and itunes:subtitle to header portion of podcast feeds and itunes:summary to post items. No longer removing quotes or extra spaces from itunes summary. Player auto-play bug fixed when quicktime files mixed with mp3s. Added new option to ping iTunes in a new browser window. Verify flash player check added, Wordpress auto plugin update will corrupt the flash player. This bug is fixed in Wordpress 2.7 beta 2 and newer. Media URL now displays a warning if the value contains characters which may cause problems.
83
 
84
+ 0.5.1 released on 12/10/2008
85
+ Added podcast to pages option (Thanks @Frumph), added code to make sure the itunes:subtitle, keywords and summary feed tags never exceed their size limits.
86
+
87
  == Feedback ==
88
  http://www.blubrry.com/powerpress/
89