PowerPress Podcasting plugin by Blubrry - Version 0.9.9

Version Description

  • Released on 9/12/2009
  • No longer checking content type returned from servers, check effected video podcasters who have no control of their servers.
  • Added Media URL redirect warning when redirects exceed 5, previously this was an error.
  • Better detection used when server does not support HTTP URL connections, we now display a message when allow_url_fopen setting is disabled and cURL library not available.
  • Blubrry Services Integration, added message when authentication failed and display error when web server does not support Blubrry services.
  • Added new background color option for podcast episode box, configurable in the Custom Podcast Feed > Edit Feed screen.
  • Made Category Feed Settings, Custom Feed Settings, Movabyle Type and PodPress import screens WordPress 2.6 compatible.
  • Added wmode: 'transparent' setting to Flash player so pop-up HTML divs can display over top of the flash player.
  • Added extra check to prevent page errors when displaying old PodPress data in blog pages.
  • Added note in PodPress Import screen: If you are unsure about importing your PodPress data, try the option under Basic Settings titled 'PodPress Episodes' and set to 'Include in posts and feeds'.
Download this release

Release Info

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

Code changes from version 0.9.8 to 0.9.9

css/jquery.css CHANGED
@@ -65,10 +65,10 @@ ul.media li a {
65
  font-weight: bold;
66
  }
67
  #accountinfo input[type=text], #accountinfo input[type=password] {
68
- width: 240px;
69
  }
70
  #accountinfo select {
71
- width: 242px;
72
  }
73
  .powerpress-notice {
74
  border: 1px solid #FFCC00;
65
  font-weight: bold;
66
  }
67
  #accountinfo input[type=text], #accountinfo input[type=password] {
68
+ width: 220px;
69
  }
70
  #accountinfo select {
71
+ width: 222px;
72
  }
73
  .powerpress-notice {
74
  border: 1px solid #FFCC00;
mp3info.class.php CHANGED
@@ -9,7 +9,7 @@
9
  //var $m_DownloadBytesLimit = 1638400; // 200K (200*1024*8) bytes file
10
  //var $m_DownloadBytesLimit = 204800; // 25K (25*1024*8) bytes file
11
  var $m_DownloadBytesLimit = 327680; // 40K (40*1024*8) bytes file
12
- var $m_RedirectLimit = 5; // Number of times to do the 302 redirect
13
  var $m_UserAgent = 'Blubrry PowerPress/1.0';
14
  var $m_error = '';
15
  var $m_ContentLength = false;
@@ -84,7 +84,7 @@
84
  {
85
  if( !ini_get( 'allow_url_fopen' ) && !function_exists( 'curl_init' ) )
86
  {
87
- $this->SetError('Server must either have php.ini allow_url_fopen enabled or PHP CURL library loaded in order to continue.');
88
  return false;
89
  }
90
 
@@ -235,6 +235,7 @@
235
  $HttpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
236
  $ContentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
237
  $ErrorMsg = curl_error($curl);
 
238
 
239
  if( $HttpCode < 200 || $HttpCode > 250 )
240
  {
9
  //var $m_DownloadBytesLimit = 1638400; // 200K (200*1024*8) bytes file
10
  //var $m_DownloadBytesLimit = 204800; // 25K (25*1024*8) bytes file
11
  var $m_DownloadBytesLimit = 327680; // 40K (40*1024*8) bytes file
12
+ var $m_RedirectLimit = 12; // Number of times to do the 302 redirect
13
  var $m_UserAgent = 'Blubrry PowerPress/1.0';
14
  var $m_error = '';
15
  var $m_ContentLength = false;
84
  {
85
  if( !ini_get( 'allow_url_fopen' ) && !function_exists( 'curl_init' ) )
86
  {
87
+ $this->SetError( __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to continue.') );
88
  return false;
89
  }
90
 
235
  $HttpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
236
  $ContentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
237
  $ErrorMsg = curl_error($curl);
238
+ $this->m_RedirectCount = curl_getinfo($curl, CURLINFO_REDIRECT_COUNT);
239
 
240
  if( $HttpCode < 200 || $HttpCode > 250 )
241
  {
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.8
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.9.8' );
37
 
38
  /////////////////////////////////////////////////////
39
  // The following define options should be placed in your
@@ -191,10 +191,11 @@ function powerpress_content($content)
191
  $podPressMedia = @unserialize($podPressMedia);
192
  }
193
 
194
- if( is_array($podPressMedia) )
195
  {
196
  $EnclosureURL = $podPressMedia[0]['URI'];
197
- $EnclosureSize = $podPressMedia[0]['size'];
 
198
  $EnclosureType = '';
199
  }
200
  }
@@ -615,13 +616,15 @@ function powerpress_rss2_item()
615
  $podPressMedia = @unserialize($podPressMedia);
616
  }
617
 
618
- if( $podPressMedia )
619
  {
620
  $EnclosureURL = $podPressMedia[0]['URI'];
621
  if( strpos($EnclosureURL, 'http://' ) !== 0 && strpos($EnclosureURL, 'https://' ) !== 0 )
622
  $EnclosureURL = $powerpress_feed['default_url'] . $EnclosureURL;
623
- $EnclosureSize = $podPressMedia[0]['size'];
624
- $duration = $podPressMedia[0]['duration'];
 
 
625
  $EnclosureType = false;
626
  $UrlParts = parse_url($EnclosureURL);
627
  if( $UrlParts['path'] )
@@ -1269,7 +1272,7 @@ function powerpress_player_filter($content, $media_url, $ExtraData = array() )
1269
  $content .= '<script type="text/javascript">'.PHP_EOL;
1270
  $content .= "pp_flashembed(\n";
1271
  $content .= " 'powerpress_player_{$g_powerpress_player_id}',\n";
1272
- $content .= " {src: '". powerpress_get_root_url() ."FlowPlayerClassic.swf', width: {$player_width}, height: {$player_height} },\n";
1273
  if( $cover_image ) //
1274
  $content .= " {config: { autoPlay: ". ($autoplay?'true':'false') .", autoBuffering: false, initialScale: 'scale', showFullScreenButton: false, showMenu: false, videoFile: '{$media_url}', splashImageFile: '{$cover_image}', scaleSplash: true, loop: false, autoRewind: true } }\n";
1275
  else
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.9
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', '0.9.9' );
37
 
38
  /////////////////////////////////////////////////////
39
  // The following define options should be placed in your
191
  $podPressMedia = @unserialize($podPressMedia);
192
  }
193
 
194
+ if( is_array($podPressMedia) && isset($podPressMedia[0]) && isset($podPressMedia[0]['URI']) )
195
  {
196
  $EnclosureURL = $podPressMedia[0]['URI'];
197
+ if( isset($podPressMedia[0]['size']) )
198
+ $EnclosureSize = $podPressMedia[0]['size'];
199
  $EnclosureType = '';
200
  }
201
  }
616
  $podPressMedia = @unserialize($podPressMedia);
617
  }
618
 
619
+ if( $podPressMedia && isset($podPressMedia[0]) && isset($podPressMedia[0]['URI']) )
620
  {
621
  $EnclosureURL = $podPressMedia[0]['URI'];
622
  if( strpos($EnclosureURL, 'http://' ) !== 0 && strpos($EnclosureURL, 'https://' ) !== 0 )
623
  $EnclosureURL = $powerpress_feed['default_url'] . $EnclosureURL;
624
+ if( isset($podPressMedia[0]['size']) )
625
+ $EnclosureSize = $podPressMedia[0]['size'];
626
+ if( isset($podPressMedia[0]['duration']) )
627
+ $duration = $podPressMedia[0]['duration'];
628
  $EnclosureType = false;
629
  $UrlParts = parse_url($EnclosureURL);
630
  if( $UrlParts['path'] )
1272
  $content .= '<script type="text/javascript">'.PHP_EOL;
1273
  $content .= "pp_flashembed(\n";
1274
  $content .= " 'powerpress_player_{$g_powerpress_player_id}',\n";
1275
+ $content .= " {src: '". powerpress_get_root_url() ."FlowPlayerClassic.swf', width: {$player_width}, height: {$player_height}, wmode: 'transparent' },\n";
1276
  if( $cover_image ) //
1277
  $content .= " {config: { autoPlay: ". ($autoplay?'true':'false') .", autoBuffering: false, initialScale: 'scale', showFullScreenButton: false, showMenu: false, videoFile: '{$media_url}', splashImageFile: '{$cover_image}', scaleSplash: true, loop: false, autoRewind: true } }\n";
1278
  else
powerpressadmin-categoryfeeds.php CHANGED
@@ -50,13 +50,39 @@ function powerpress_admin_categoryfeeds()
50
  <table class="widefat fixed" cellspacing="0">
51
  <thead>
52
  <tr>
53
- <?php print_column_headers('powerpressadmin_categoryfeeds'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  </tr>
55
  </thead>
56
 
57
  <tfoot>
58
  <tr>
59
- <?php print_column_headers('powerpressadmin_categoryfeeds', false); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  </tr>
61
  </tfoot>
62
  <tbody>
50
  <table class="widefat fixed" cellspacing="0">
51
  <thead>
52
  <tr>
53
+ <?php
54
+ if( function_exists('') )
55
+ {
56
+ print_column_headers('powerpressadmin_categoryfeeds');
57
+ }
58
+ else
59
+ {
60
+ ?>
61
+ <th scope="col" id="name" class="manage-column column-name" style="">Category Name</th>
62
+ <th scope="col" id="feed-slug" class="manage-column column-feed-slug" style="">Slug</th>
63
+ <th scope="col" id="url" class="manage-column column-url" style="">Feed URL</th>
64
+ <?php
65
+ }
66
+ ?>
67
  </tr>
68
  </thead>
69
 
70
  <tfoot>
71
  <tr>
72
+ <?php
73
+ if( function_exists('print_column_headers') )
74
+ {
75
+ print_column_headers('powerpressadmin_categoryfeeds', false);
76
+ }
77
+ else // WordPress 2.6 or older
78
+ {
79
+ ?>
80
+ <th scope="col" class="manage-column column-name" style="">Category Name</th>
81
+ <th scope="col" class="manage-column column-feed-slug" style="">Slug</th>
82
+ <th scope="col" class="manage-column column-url" style="">Feed URL</th>
83
+ <?php
84
+ }
85
+ ?>
86
  </tr>
87
  </tfoot>
88
  <tbody>
powerpressadmin-customfeeds.php CHANGED
@@ -49,13 +49,41 @@ function powerpress_admin_customfeeds()
49
  <table class="widefat fixed" cellspacing="0">
50
  <thead>
51
  <tr>
52
- <?php print_column_headers('powerpressadmin_customfeeds'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  </tr>
54
  </thead>
55
 
56
  <tfoot>
57
  <tr>
58
- <?php print_column_headers('powerpressadmin_customfeeds', false); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  </tr>
60
  </tfoot>
61
  <tbody>
49
  <table class="widefat fixed" cellspacing="0">
50
  <thead>
51
  <tr>
52
+ <?php
53
+ if( function_exists('print_column_headers') )
54
+ {
55
+ print_column_headers('powerpressadmin_customfeeds');
56
+ }
57
+ else // WordPress 2.6 or older
58
+ {
59
+ ?>
60
+ <th scope="col" id="name" class="manage-column column-name" style="">Name</th>
61
+ <th scope="col" id="feed-slug" class="manage-column column-feed-slug" style="">Slug</th>
62
+ <th scope="col" id="episode-count" class="manage-column column-episode-count" style="">Episodes</th>
63
+ <th scope="col" id="url" class="manage-column column-url" style="">URL</th>
64
+ <?php
65
+ }
66
+ ?>
67
  </tr>
68
  </thead>
69
 
70
  <tfoot>
71
  <tr>
72
+ <?php
73
+ if( function_exists('print_column_headers') )
74
+ {
75
+ print_column_headers('powerpressadmin_customfeeds', false);
76
+ }
77
+ else // WordPress 2.6 or older
78
+ {
79
+ ?>
80
+ <th scope="col" class="manage-column column-name" style="">Name</th>
81
+ <th scope="col" class="manage-column column-feed-slug" style="">Slug</th>
82
+ <th scope="col" class="manage-column column-episode-count" style="">Episodes</th>
83
+ <th scope="col" class="manage-column column-url" style="">URL</th>
84
+ <?php
85
+ }
86
+ ?>
87
  </tr>
88
  </tfoot>
89
  <tbody>
powerpressadmin-editfeed.php CHANGED
@@ -468,8 +468,8 @@ else
468
  <textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo $FeedSettings['itunes_summary']; ?></textarea>
469
  <?php if ( version_compare( '5', phpversion(), '>=' ) ) { ?>
470
  <div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo ($FeedSettings['enhance_itunes_summary']?'checked ':''); ?>/> Enhance iTunes Summary from Blog Posts (<a href="http://help.blubrry.com/blubrry-powerpress/settings/enhanced-itunes-summary/" target="_blank">What's this</a>)
471
- <?php } ?>
472
  </div>
 
473
  </td>
474
  </tr>
475
 
@@ -653,7 +653,7 @@ if( isset($Languages[ $rss_language ]) )
653
  </th>
654
  <td>
655
  <input type="text" name="Feed[itunes_talent_name]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
656
- <div><input type="checkbox" name="Feed[itunes_author_post]" value="1" <?php echo ($FeedSettings['itunes_author_post']?'checked ':''); ?>/> Use blog post author's name for individual episodes.
657
 
658
  </td>
659
  </tr>
@@ -681,6 +681,27 @@ if( isset($Languages[ $rss_language ]) )
681
  </td>
682
  </tr>
683
  <?php } // End AdvancedMode ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684
  </table>
685
  <?php
686
  }
468
  <textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo $FeedSettings['itunes_summary']; ?></textarea>
469
  <?php if ( version_compare( '5', phpversion(), '>=' ) ) { ?>
470
  <div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo ($FeedSettings['enhance_itunes_summary']?'checked ':''); ?>/> Enhance iTunes Summary from Blog Posts (<a href="http://help.blubrry.com/blubrry-powerpress/settings/enhanced-itunes-summary/" target="_blank">What's this</a>)
 
471
  </div>
472
+ <?php } ?>
473
  </td>
474
  </tr>
475
 
653
  </th>
654
  <td>
655
  <input type="text" name="Feed[itunes_talent_name]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
656
+ <div><input type="checkbox" name="Feed[itunes_author_post]" value="1" <?php echo ($FeedSettings['itunes_author_post']?'checked ':''); ?>/> Use blog post author's name for individual episodes.</div>
657
 
658
  </td>
659
  </tr>
681
  </td>
682
  </tr>
683
  <?php } // End AdvancedMode ?>
684
+ <?php if( $feed_slug ) { ?>
685
+ <tr valign="top">
686
+ <th scope="row">
687
+ <?php _e("Episode Box Background Color"); ?>
688
+ </th>
689
+ <td>
690
+ <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 });" />
691
+ <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>
692
+ <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>
693
+ <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>
694
+ <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>
695
+
696
+ <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>
697
+ <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>
698
+ <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>
699
+ &nbsp; (leave blank for default)
700
+
701
+ <div class="clear"></div>
702
+ </td>
703
+ </tr>
704
+ <?php } // end customm feeds ?>
705
  </table>
706
  <?php
707
  }
powerpressadmin-jquery.php CHANGED
@@ -164,7 +164,6 @@ function DeleteMedia(File)
164
  return confirm('Delete '+File+', are you sure?');
165
  }
166
  </script>
167
- <p style="text-align: right; position: absolute; top: 5px; right: 5px; margin: 0; padding:0;"><a href="#" onclick="self.parent.tb_remove();" title="Cancel"><img src="<?php echo admin_url(); ?>/images/no.png" /></a></p>
168
  <div id="media-header">
169
  <h2><?php echo __('Select Media'); ?></h2>
170
  <?php
@@ -214,9 +213,9 @@ function DeleteMedia(File)
214
  if( $QuotaData ) {
215
  $NextDate = strtotime( $QuotaData['published']['next_date']);
216
  ?>
217
- <p>You have uploaded <em><?php echo powerpress_byte_size($QuotaData['unpublished']['available']); ?></em> of your <em><?php echo powerpress_byte_size($QuotaData['unpublished']['total']); ?></em> limit</p>
218
- <p>You are hosting <em><?php echo powerpress_byte_size($QuotaData['published']['available']); ?></em> of your <em><?php echo powerpress_byte_size($QuotaData['published']['total']); ?></em>/month limit.</p>
219
- <p>Your limit will adjust on <?php echo date('m/d/Y', $NextDate); ?> to <em><?php echo powerpress_byte_size($QuotaData['published']['next_available']); ?></em>.</p>
220
  <?php } ?>
221
  <p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();" title="<?php echo __('Close'); ?>"><?php echo __('Close'); ?></a></p>
222
  </div>
@@ -270,58 +269,65 @@ function DeleteMedia(File)
270
  else
271
  $api_url = sprintf('%s/media/index.json', rtrim(POWERPRESS_BLUBRRY_API_URL, '/') );
272
  $json_data = powerpress_remote_fopen($api_url, $auth);
273
- $results = powerpress_json_decode($json_data);
274
-
275
- if( isset($results['error']) )
276
- {
277
- $Error = $results['error'];
278
- if( strstr($Error, 'currently not available') )
279
- $Error = 'Unable to find podcasts for this account.';
280
- }
281
- else if( !is_array($results) )
282
- {
283
- $Error = $json_data;
284
- }
285
- else
286
  {
287
- // Get all the programs for this user...
288
- while( list($null,$row) = each($results) )
289
- $Programs[ $row['program_keyword'] ] = $row['program_title'];
290
 
291
- if( count($Programs) > 0 )
292
  {
293
- $SaveSettings['blubrry_auth'] = $auth;
 
 
 
 
 
 
 
 
 
 
 
 
294
 
295
- if( $SaveSettings['blubrry_program_keyword'] != '' )
296
- {
297
- powerpress_add_blubrry_redirect($SaveSettings['blubrry_program_keyword']);
298
- $Save = true;
299
- $Close = true;
300
- }
301
- else if( isset($SaveSettings['blubrry_program_keyword']) )
302
  {
303
- $Error = 'You must select a program to continue.';
304
- }
305
- else if( count($Programs) == 1 )
306
- {
307
- list($keyword, $title) = each($Programs);
308
- $SaveSettings['blubrry_program_keyword'] = $keyword;
309
- powerpress_add_blubrry_redirect($keyword);
310
- $Close = true;
311
- $Save = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  }
313
  else
314
  {
315
- $Error = 'Please select your podcast program to continue.';
316
- $Step = 2;
317
- $Settings['blubrry_username'] = $SaveSettings['blubrry_username'];
318
- $Settings['blubrry_hosting'] = $SaveSettings['blubrry_hosting'];
319
  }
320
  }
321
- else
322
- {
323
- $Error = 'No podcasts for this account are listed on blubrry.com.';
324
- }
325
  }
326
  }
327
 
@@ -363,6 +369,15 @@ function DeleteMedia(File)
363
  exit;
364
  }
365
 
 
 
 
 
 
 
 
 
 
366
  check_admin_referer('powerpress-jquery-account');
367
 
368
  if( !$Settings )
@@ -378,7 +393,6 @@ function DeleteMedia(File)
378
  powerpress_admin_jquery_header('Blubrry Services Integration');
379
  powerpress_page_message_print();
380
  ?>
381
- <p style="text-align: right; position: absolute; top: 5px; right: 5px; margin: 0; padding: 0;"><a href="#" onclick="self.parent.tb_remove();" title="Cancel"><img src="<?php echo admin_url(); ?>/images/no.png" /></a></p>
382
  <form action="<?php echo admin_url(); ?>" enctype="multipart/form-data" method="post">
383
  <?php wp_nonce_field('powerpress-jquery-account'); ?>
384
  <input type="hidden" name="action" value="powerpress-jquery-account-save" />
@@ -477,6 +491,8 @@ while( list($value,$desc) = each($Programs) )
477
 
478
  if( $Error == false && $RedirectURL )
479
  {
 
 
480
  header("Location: $RedirectURL");
481
  exit;
482
  }
@@ -572,6 +588,7 @@ echo '<!-- done adding extra stuff -->';
572
  </head>
573
  <body>
574
  <div id="container">
 
575
  <?php
576
  }
577
 
164
  return confirm('Delete '+File+', are you sure?');
165
  }
166
  </script>
 
167
  <div id="media-header">
168
  <h2><?php echo __('Select Media'); ?></h2>
169
  <?php
213
  if( $QuotaData ) {
214
  $NextDate = strtotime( $QuotaData['published']['next_date']);
215
  ?>
216
+ <p>You have uploaded <em><?php echo powerpress_byte_size($QuotaData['unpublished']['used']); ?></em> (<em><?php echo powerpress_byte_size($QuotaData['unpublished']['available']); ?></em> available) of your <em><?php echo powerpress_byte_size($QuotaData['unpublished']['total']); ?></em> limit</p>
217
+ <p>You are hosting <em><?php echo powerpress_byte_size($QuotaData['published']['total']-$QuotaData['published']['available']); ?></em> (<em><?php echo powerpress_byte_size($QuotaData['published']['available']); ?></em> available) of your <em><?php echo powerpress_byte_size($QuotaData['published']['total']); ?></em>/month limit.</p>
218
+ <p>Your limit will adjust on <?php echo date('m/d/Y', $NextDate); ?> to <em><?php echo powerpress_byte_size($QuotaData['published']['total']-$QuotaData['published']['next_available']); ?></em> (<em><?php echo powerpress_byte_size($QuotaData['published']['next_available']); ?></em> available).</p>
219
  <?php } ?>
220
  <p style="text-align: center;"><a href="#" onclick="self.parent.tb_remove();" title="<?php echo __('Close'); ?>"><?php echo __('Close'); ?></a></p>
221
  </div>
269
  else
270
  $api_url = sprintf('%s/media/index.json', rtrim(POWERPRESS_BLUBRRY_API_URL, '/') );
271
  $json_data = powerpress_remote_fopen($api_url, $auth);
272
+ if( $json_data )
 
 
 
 
 
 
 
 
 
 
 
 
273
  {
274
+ $results = powerpress_json_decode($json_data);
 
 
275
 
276
+ if( isset($results['error']) )
277
  {
278
+ $Error = $results['error'];
279
+ if( strstr($Error, 'currently not available') )
280
+ $Error = 'Unable to find podcasts for this account.';
281
+ }
282
+ else if( !is_array($results) )
283
+ {
284
+ $Error = $json_data;
285
+ }
286
+ else
287
+ {
288
+ // Get all the programs for this user...
289
+ while( list($null,$row) = each($results) )
290
+ $Programs[ $row['program_keyword'] ] = $row['program_title'];
291
 
292
+ if( count($Programs) > 0 )
 
 
 
 
 
 
293
  {
294
+ $SaveSettings['blubrry_auth'] = $auth;
295
+
296
+ if( $SaveSettings['blubrry_program_keyword'] != '' )
297
+ {
298
+ powerpress_add_blubrry_redirect($SaveSettings['blubrry_program_keyword']);
299
+ $Save = true;
300
+ $Close = true;
301
+ }
302
+ else if( isset($SaveSettings['blubrry_program_keyword']) )
303
+ {
304
+ $Error = 'You must select a program to continue.';
305
+ }
306
+ else if( count($Programs) == 1 )
307
+ {
308
+ list($keyword, $title) = each($Programs);
309
+ $SaveSettings['blubrry_program_keyword'] = $keyword;
310
+ powerpress_add_blubrry_redirect($keyword);
311
+ $Close = true;
312
+ $Save = true;
313
+ }
314
+ else
315
+ {
316
+ $Error = 'Please select your podcast program to continue.';
317
+ $Step = 2;
318
+ $Settings['blubrry_username'] = $SaveSettings['blubrry_username'];
319
+ $Settings['blubrry_hosting'] = $SaveSettings['blubrry_hosting'];
320
+ }
321
  }
322
  else
323
  {
324
+ $Error = 'No podcasts for this account are listed on blubrry.com.';
 
 
 
325
  }
326
  }
327
+ }
328
+ else
329
+ {
330
+ $Error = 'Authentication failed.';
331
  }
332
  }
333
 
369
  exit;
370
  }
371
 
372
+ if( !ini_get( 'allow_url_fopen' ) && !function_exists( 'curl_init' ) )
373
+ {
374
+ powerpress_admin_jquery_header('Blubrry Services Integration');
375
+ powerpress_page_message_add_notice( __('Your server must either have the php.ini setting \'allow_url_fopen\' enabled or have the PHP cURL library installed in order to continue.') );
376
+ powerpress_page_message_print();
377
+ powerpress_admin_jquery_footer();
378
+ exit;
379
+ }
380
+
381
  check_admin_referer('powerpress-jquery-account');
382
 
383
  if( !$Settings )
393
  powerpress_admin_jquery_header('Blubrry Services Integration');
394
  powerpress_page_message_print();
395
  ?>
 
396
  <form action="<?php echo admin_url(); ?>" enctype="multipart/form-data" method="post">
397
  <?php wp_nonce_field('powerpress-jquery-account'); ?>
398
  <input type="hidden" name="action" value="powerpress-jquery-account-save" />
491
 
492
  if( $Error == false && $RedirectURL )
493
  {
494
+ $RedirectURL .= '&ReturnURL=';
495
+ $RedirectURL .= urlencode( admin_url("admin.php?action=powerpress-jquery-upload-complete") );
496
  header("Location: $RedirectURL");
497
  exit;
498
  }
588
  </head>
589
  <body>
590
  <div id="container">
591
+ <p style="text-align: right; position: absolute; top: 5px; right: 5px; margin: 0; padding: 0;"><a href="#" onclick="self.parent.tb_remove();" title="Cancel"><img src="<?php echo admin_url(); ?>/images/no.png" /></a></p>
592
  <?php
593
  }
594
 
powerpressadmin-metabox.php CHANGED
@@ -247,6 +247,10 @@ while( list($value,$desc) = each($explicit_array) )
247
  ?>
248
  </div>
249
  </div>
 
 
 
 
250
  <?php
251
  }
252
 
247
  ?>
248
  </div>
249
  </div>
250
+ <?php if( !empty($GeneralSettings['episode_box_background_color'][$FeedSlug]) ) { ?>
251
+ <script type="text/javascript">
252
+ jQuery('#powerpress-<?php echo $FeedSlug; ?>').css( {'background-color' : '<?php echo $GeneralSettings['episode_box_background_color'][$FeedSlug]; ?>' });
253
+ </script><?php } ?>
254
  <?php
255
  }
256
 
powerpressadmin-mt.php CHANGED
@@ -282,6 +282,18 @@ if( !function_exists('add_action') )
282
 
283
  add_filter('manage_powerpressadmin_importmt_columns', 'powerpressadmin_importmt_columns');
284
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  function powerpress_admin_mt()
286
  {
287
  $results = powerpress_get_mt_episodes();
@@ -395,13 +407,31 @@ else
395
  <table class="widefat fixed" cellspacing="0">
396
  <thead>
397
  <tr>
398
- <?php print_column_headers('powerpressadmin_importmt'); ?>
 
 
 
 
 
 
 
 
 
399
  </tr>
400
  </thead>
401
 
402
  <tfoot>
403
  <tr>
404
- <?php print_column_headers('powerpressadmin_importmt', false); ?>
 
 
 
 
 
 
 
 
 
405
  </tr>
406
  </tfoot>
407
  <tbody>
282
 
283
  add_filter('manage_powerpressadmin_importmt_columns', 'powerpressadmin_importmt_columns');
284
 
285
+ function powerpressadmin_importmt_columns_print($include_ids=true)
286
+ {
287
+ $Columns = powerpressadmin_importmt_columns();
288
+ while( list($key,$title) = each($Columns) )
289
+ {
290
+ if( $include_ids )
291
+ echo '<th scope="col" id="'. $key .'" class="manage-column column-'. $key .'" style="">'. $title .'</th>';
292
+ else
293
+ echo '<th scope="col" class="manage-column column-'. $key .'" style="">'. $title .'</th>';
294
+ }
295
+ }
296
+
297
  function powerpress_admin_mt()
298
  {
299
  $results = powerpress_get_mt_episodes();
407
  <table class="widefat fixed" cellspacing="0">
408
  <thead>
409
  <tr>
410
+ <?php
411
+ if( function_exists('print_column_headers') )
412
+ {
413
+ print_column_headers('powerpressadmin_importmt');
414
+ }
415
+ else // WordPress 2.6 or older
416
+ {
417
+ powerpressadmin_importmt_columns_print();
418
+ }
419
+ ?>
420
  </tr>
421
  </thead>
422
 
423
  <tfoot>
424
  <tr>
425
+ <?php
426
+ if( function_exists('print_column_headers') )
427
+ {
428
+ print_column_headers('powerpressadmin_importmt', false);
429
+ }
430
+ else // WordPress 2.6 or older
431
+ {
432
+ powerpressadmin_importmt_columns_print(false);
433
+ }
434
+ ?>
435
  </tr>
436
  </tfoot>
437
  <tbody>
powerpressadmin-podpress.php CHANGED
@@ -221,7 +221,13 @@ if( !function_exists('add_action') )
221
  {
222
  global $g_podpress_import_log, $g_podpress_import_count;
223
  if( !$g_podpress_import_log )
 
 
 
 
 
224
  return;
 
225
  echo '<div style="" class="updated powerpress-notice">';
226
  echo '<h3 style="margin-top: 2px; margin-bottom: 2px;">PodPress Import Log</h3>';
227
  echo $g_podpress_import_log;
@@ -253,6 +259,18 @@ if( !function_exists('add_action') )
253
 
254
  add_filter('manage_powerpressadmin_importpodpress_columns', 'powerpressadmin_importpodpress_columns');
255
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  function powerpress_admin_podpress()
257
  {
258
  $results = powerpress_get_podpress_episodes(false);
@@ -349,13 +367,31 @@ function check_radio_selection(obj, PostID, FileIndex)
349
  <table class="widefat fixed" cellspacing="0">
350
  <thead>
351
  <tr>
352
- <?php print_column_headers('powerpressadmin_importpodpress'); ?>
 
 
 
 
 
 
 
 
 
353
  </tr>
354
  </thead>
355
 
356
  <tfoot>
357
  <tr>
358
- <?php print_column_headers('powerpressadmin_importpodpress', false); ?>
 
 
 
 
 
 
 
 
 
359
  </tr>
360
  </tfoot>
361
  <tbody>
221
  {
222
  global $g_podpress_import_log, $g_podpress_import_count;
223
  if( !$g_podpress_import_log )
224
+ {
225
+ echo '<div style="" class="updated powerpress-notice">';
226
+ echo '<p>If you are unsure about importing your PodPress data, try the option under Basic Settings titled \'PodPress Episodes\' and set to \'Include in posts and feeds\'.</p>';
227
+ echo '<p>Once you feel comfortable with PowerPress, you can use this screen to import your PodPress data.</p>';
228
+ echo '</div>';
229
  return;
230
+ }
231
  echo '<div style="" class="updated powerpress-notice">';
232
  echo '<h3 style="margin-top: 2px; margin-bottom: 2px;">PodPress Import Log</h3>';
233
  echo $g_podpress_import_log;
259
 
260
  add_filter('manage_powerpressadmin_importpodpress_columns', 'powerpressadmin_importpodpress_columns');
261
 
262
+ function powerpressadmin_importpodpress_columns_print($include_ids=true)
263
+ {
264
+ $Columns = powerpressadmin_importpodpress_columns();
265
+ while( list($key,$title) = each($Columns) )
266
+ {
267
+ if( $include_ids )
268
+ echo '<th scope="col" id="'. $key .'" class="manage-column column-'. $key .'" style="">'. $title .'</th>';
269
+ else
270
+ echo '<th scope="col" class="manage-column column-'. $key .'" style="">'. $title .'</th>';
271
+ }
272
+ }
273
+
274
  function powerpress_admin_podpress()
275
  {
276
  $results = powerpress_get_podpress_episodes(false);
367
  <table class="widefat fixed" cellspacing="0">
368
  <thead>
369
  <tr>
370
+ <?php
371
+ if( function_exists('print_column_headers') )
372
+ {
373
+ print_column_headers('powerpressadmin_importpodpress');
374
+ }
375
+ else // WordPress 2.6 or older
376
+ {
377
+ powerpressadmin_importpodpress_columns_print();
378
+ }
379
+ ?>
380
  </tr>
381
  </thead>
382
 
383
  <tfoot>
384
  <tr>
385
+ <?php
386
+ if( function_exists('print_column_headers') )
387
+ {
388
+ print_column_headers('powerpressadmin_importpodpress', false);
389
+ }
390
+ else // WordPress 2.6 or older
391
+ {
392
+ powerpressadmin_importpodpress_columns_print(false);
393
+ }
394
+ ?>
395
  </tr>
396
  </tfoot>
397
  <tbody>
powerpressadmin.php CHANGED
@@ -271,6 +271,18 @@ function powerpress_admin_init()
271
  powerpress_save_settings($Feed, 'powerpress_feed'.($FeedSlug?'_'.$FeedSlug:'') );
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  // Anytime settings are saved lets flush the rewrite rules
275
  $wp_rewrite->flush_rules();
276
 
@@ -1013,6 +1025,15 @@ function powerpress_changemode(Mode)
1013
  .bpp_input_med {
1014
  width: 250px;
1015
  }
 
 
 
 
 
 
 
 
 
1016
  </style>
1017
  <?php
1018
  }
@@ -1492,6 +1513,10 @@ function powerpress_remote_fopen($url, $basic_auth = false, $post_args = array()
1492
 
1493
  return $response['body'];
1494
  }
 
 
 
 
1495
 
1496
  if( count($post_args) > 0 )
1497
  {
@@ -1961,6 +1986,14 @@ function powerpress_get_media_info_local($media_file, $content_type='', $file_si
1961
  $Mp3Data = $Mp3Info->GetMp3Info($media_file);
1962
  if( $Mp3Data )
1963
  {
 
 
 
 
 
 
 
 
1964
  if( $file_size == 0 )
1965
  $file_size = $Mp3Info->GetContentLength();
1966
 
@@ -1990,14 +2023,10 @@ function powerpress_get_media_info_local($media_file, $content_type='', $file_si
1990
 
1991
  $headers = wp_remote_retrieve_headers( $response );
1992
 
1993
- if( $headers && strstr($headers['content-type'], 'text') )
1994
- {
1995
- return array('error'=>'Invalid content type returned from server.' );
1996
- }
1997
-
1998
- //$headers = wp_get_http_headers($media_file);
1999
  if( $headers && $headers['content-length'] )
2000
  $file_size = (int) $headers['content-length'];
 
 
2001
  }
2002
 
2003
  if( $file_size == 0 )
271
  powerpress_save_settings($Feed, 'powerpress_feed'.($FeedSlug?'_'.$FeedSlug:'') );
272
  }
273
 
274
+ if( isset($_POST['EpisodeBoxBGColor']) )
275
+ {
276
+ $GeneralSettingsTemp = get_option('powerpress_general');
277
+ $SaveEpisdoeBoxBGColor['episode_box_background_color'] = array();
278
+ if( isset($GeneralSettingsTemp['episode_box_background_color']) )
279
+ $SaveEpisdoeBoxBGColor['episode_box_background_color'] = $GeneralSettingsTemp['episode_box_background_color']; // copy previous settings
280
+
281
+ list($feed_slug_temp, $background_color) = each($_POST['EpisodeBoxBGColor']);
282
+ $SaveEpisdoeBoxBGColor['episode_box_background_color'][ $feed_slug_temp ] = $background_color;
283
+ powerpress_save_settings($SaveEpisdoeBoxBGColor);
284
+ }
285
+
286
  // Anytime settings are saved lets flush the rewrite rules
287
  $wp_rewrite->flush_rules();
288
 
1025
  .bpp_input_med {
1026
  width: 250px;
1027
  }
1028
+ .powerpress_color_box {
1029
+ float: left;
1030
+ width: 16px;
1031
+ height: 16px;
1032
+ cursor: pointer;
1033
+ margin: 4px 1px;
1034
+ border: 1px solid #666666;
1035
+
1036
+ }
1037
  </style>
1038
  <?php
1039
  }
1513
 
1514
  return $response['body'];
1515
  }
1516
+
1517
+ // No sense going any further, we're not allowed to open remote URLs on this server
1518
+ if( !ini_get( 'allow_url_fopen' ) )
1519
+ return false;
1520
 
1521
  if( count($post_args) > 0 )
1522
  {
1986
  $Mp3Data = $Mp3Info->GetMp3Info($media_file);
1987
  if( $Mp3Data )
1988
  {
1989
+ if( $Mp3Info->GetRedirectCount() > 5 )
1990
+ {
1991
+ // Add a warning that the redirect count exceeded 5, which may prevent some podcatchers from downloading the media.
1992
+ powerpress_add_error( sprintf( __('Warning, the Media URL %s contains %d redirects.'), $media_file, $Mp3Info->GetRedirectCount() )
1993
+ .' [<a href="http://help.blubrry.com/frequently-asked-questions/media-url-faq/" title="'. __('Help') .'" target="_blank">'. __('Help') .'</a>]'
1994
+ );
1995
+ }
1996
+
1997
  if( $file_size == 0 )
1998
  $file_size = $Mp3Info->GetContentLength();
1999
 
2023
 
2024
  $headers = wp_remote_retrieve_headers( $response );
2025
 
 
 
 
 
 
 
2026
  if( $headers && $headers['content-length'] )
2027
  $file_size = (int) $headers['content-length'];
2028
+ else
2029
+ return array('error'=>'Unable to obtain file size of media file.' );
2030
  }
2031
 
2032
  if( $file_size == 0 )
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.4
6
- Stable tag: 0.9.8
7
 
8
  Add podcasting support to your blog.
9
 
@@ -85,6 +85,19 @@ As a alternative, PowerPress allows you to create additional Custom Podcast Feed
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  = 0.9.8 =
89
  * Released on 9/02/2009
90
  * When we release 1.0 of PowerPress, new features will be added separately so bugs introduced by new features do not effect the existing plugin.
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.4
6
+ Stable tag: 0.9.9
7
 
8
  Add podcasting support to your blog.
9
 
85
 
86
  == Changelog ==
87
 
88
+ = 0.9.9 =
89
+ * Released on 9/12/2009
90
+ * No longer checking content type returned from servers, check effected video podcasters who have no control of their servers.
91
+ * Added Media URL redirect warning when redirects exceed 5, previously this was an error.
92
+ * Better detection used when server does not support HTTP URL connections, we now display a message when `allow_url_fopen` setting is disabled and cURL library not available.
93
+ * Blubrry Services Integration, added message when authentication failed and display error when web server does not support Blubrry services.
94
+ * Added new background color option for podcast episode box, configurable in the Custom Podcast Feed > Edit Feed screen.
95
+ * Made Category Feed Settings, Custom Feed Settings, Movabyle Type and PodPress import screens WordPress 2.6 compatible.
96
+ * Added wmode: 'transparent' setting to Flash player so pop-up HTML divs can display over top of the flash player.
97
+ * Added extra check to prevent page errors when displaying old PodPress data in blog pages.
98
+ * Added note in PodPress Import screen: If you are unsure about importing your PodPress data, try the option under Basic Settings titled 'PodPress Episodes' and set to 'Include in posts and feeds'.
99
+
100
+
101
  = 0.9.8 =
102
  * Released on 9/02/2009
103
  * When we release 1.0 of PowerPress, new features will be added separately so bugs introduced by new features do not effect the existing plugin.