PowerPress Podcasting plugin by Blubrry - Version 1.0.4

Version Description

  • Released on 12/19/2009
  • Fixed compatibility bug introduced in WordPress 2.9 when using Blubrry Services on web servers with versions of PHP older than 5.2 (json_decode function compatibility)
  • Added new "Display Player and Links Options" under Podcast Entry Box settings. You can now control displaying the default Player and/or Links on a per episode basis.
  • Added new "Replace Player with Embed" option under Podcast Entry Box settings. When set, PowerPress will not display the default player if an embed code is set for the episode. Default behavior is to display both the native player and embed code.
  • Added new "Find and Replace for Episode URLs" feature found under tools section. Perfect for users moving their media hosting to a new web site or service (Like Blubrry!).
  • Plugin "Podcasting" support: Now including iTunes duration (audio length) previously saved using plugin "Podcasting".
  • Plugin "Podcasting" support: Import plugin "Podcasting" settings option added to Tools page.
  • Converted all function calls from split() to explode for PHP 6 compatibility.
  • Using a default value for length (file size) to prevent feeds from becoming invalid.
  • Fixed PodPress import bug where extra space characters from PodPress were not trimmed.
  • 1 Pixel Out player: Width setting is now applied (up until now player was always 290 pixels wide)
  • 1 Pixel Out player: Added option to display track information from mp3 by entering "TRACK" in the "Text In Player" field.
  • Added translation support (translation support for PowerPress coming soon). Pages include tools, basic settings, category feeds, podcast channel feeds, dashboard page and diagnostics page.
  • Added code to prevent other plugins from wiping out the custom podcast feed permalinks. Plugin identified that this code fixes so far include the pagebar plugin.
  • Diagnostic results email can now optionally include the list of active plugins which helps when resolving conflicts between plugins.
  • Diagnostic results email is now in HTML form which makes it easier to read.
  • Removed most 'Notice' messages when WP_DEBUG define set in WordPress.
  • Updated Blubrry Services Integration to support listing the past 30 days of published media.
  • Support for WordPress 2.6 will be dropped in the next release of PowerPress.
Download this release

Release Info

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

Code changes from version 1.0.3 to 1.0.4

css/jquery.css CHANGED
@@ -92,6 +92,14 @@ ul.media li a {
92
  padding-top: 0px;
93
  margin-top: 0px;
94
  }
 
 
 
 
 
 
 
 
95
  .media-item {
96
 
97
  border-top-color: #dfdfdf;
@@ -111,6 +119,9 @@ ul.media li a {
111
  padding-top: 5px;
112
 
113
  }
 
 
 
114
  .media-item .media-name {
115
  margin-left: 10px;
116
  }
@@ -120,6 +131,10 @@ ul.media li a {
120
  right: 10px;
121
  text-align: right;
122
  }
 
 
 
 
123
  #media-header {
124
  position: relative;
125
  margin: 0 0 5px 0;
92
  padding-top: 0px;
93
  margin-top: 0px;
94
  }
95
+
96
+ #media-published-title {
97
+ border-top-color: #dfdfdf;
98
+ border-top-width: 1px;
99
+ border-top-style: solid;
100
+ padding-top: 20px;
101
+ padding-bottom: 2px;
102
+ }
103
  .media-item {
104
 
105
  border-top-color: #dfdfdf;
119
  padding-top: 5px;
120
 
121
  }
122
+ .media-item:hover {
123
+ background-color: #FFFFCC;
124
+ }
125
  .media-item .media-name {
126
  margin-left: 10px;
127
  }
131
  right: 10px;
132
  text-align: right;
133
  }
134
+ .media-published-date {
135
+ margin-left: 20px;
136
+ font-size: 80%;
137
+ }
138
  #media-header {
139
  position: relative;
140
  margin: 0 0 5px 0;
powerpress-player.php CHANGED
@@ -76,6 +76,8 @@ function powerpressplayer_build($media_url, $Settings, $ExtraData = array())
76
  //$PlayerSettings['noinfo'] = 'yes';
77
  if( $PlayerSettings['titles'] == '' )
78
  $PlayerSettings['titles'] = 'Blubrry PowerPress';
 
 
79
 
80
  $keys = array_keys($PlayerSettings);
81
  $flashvars ='';
@@ -90,7 +92,10 @@ function powerpressplayer_build($media_url, $Settings, $ExtraData = array())
90
  $flashvars .= '&autostart=yes';
91
  }
92
 
93
- if($PlayerSettings['pagebg'] != ""){
 
 
 
94
  $transparency = '<param name="bgcolor" value="'.$PlayerSettings['pagebg'].'" />';
95
  $PlayerSettings['transparentpagebg'] = "no";
96
  $flashvars .= '&amp;transparentpagebg=no';
@@ -104,7 +109,7 @@ function powerpressplayer_build($media_url, $Settings, $ExtraData = array())
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.'&amp;soundFile='.$media_url.$flashvars.'" />'.PHP_EOL;
110
  $content .= '<param name="quality" value="high" />'.PHP_EOL;
76
  //$PlayerSettings['noinfo'] = 'yes';
77
  if( $PlayerSettings['titles'] == '' )
78
  $PlayerSettings['titles'] = 'Blubrry PowerPress';
79
+ else if( strtoupper($PlayerSettings['titles']) == 'TRACK' )
80
+ unset( $PlayerSettings['titles'] );
81
 
82
  $keys = array_keys($PlayerSettings);
83
  $flashvars ='';
92
  $flashvars .= '&amp;autostart=yes';
93
  }
94
 
95
+ if( !isset($PlayerSettings['width']) )
96
+ $PlayerSettings['width'] = 290;
97
+
98
+ if($PlayerSettings['pagebg'] != ""){
99
  $transparency = '<param name="bgcolor" value="'.$PlayerSettings['pagebg'].'" />';
100
  $PlayerSettings['transparentpagebg'] = "no";
101
  $flashvars .= '&amp;transparentpagebg=no';
109
  // TODO: Add audio-player player here
110
  $content .= '<div class="powerpress_player" id="powerpress_player_'. $g_powerpress_player_id .'">';
111
  //$content .= '<script language="JavaScript" src="'.powerpressplayer_get_root_url().'audio-player.js"></script>'.PHP_EOL;
112
+ $content .= '<object type="application/x-shockwave-flash" data="'.powerpressplayer_get_root_url().'audio-player.swf" id="'.$g_powerpress_player_id.'" height="24" width="'. $PlayerSettings['width'] .'">'.PHP_EOL;
113
  $content .= '<param name="movie" value="'.powerpressplayer_get_root_url().'/audio-player.swf" />'.PHP_EOL;
114
  $content .= '<param name="FlashVars" value="playerID='.$g_powerpress_player_id.'&amp;soundFile='.$media_url.$flashvars.'" />'.PHP_EOL;
115
  $content .= '<param name="quality" value="high" />'.PHP_EOL;
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: 1.0.3
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', '1.0.3' );
37
 
38
  /////////////////////////////////////////////////////
39
  // The following define options should be placed in your
@@ -74,6 +74,11 @@ if( !defined('PHP_EOL') )
74
 
75
  $powerpress_feed = NULL; // DO NOT CHANGE
76
 
 
 
 
 
 
77
  function powerpress_content($content)
78
  {
79
  global $post, $g_powerpress_excerpt_post_id;
@@ -186,7 +191,7 @@ function powerpress_content($content)
186
  // Get the enclosure data
187
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
188
 
189
- if( !$EpisodeData && $GeneralSettings['process_podpress'] && $feed_slug == 'podcast' )
190
  $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
191
 
192
  if( !$EpisodeData || !$EpisodeData['url'] )
@@ -208,9 +213,16 @@ function powerpress_content($content)
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
  {
215
  $image = '';
216
  if( isset($EpisodeData['image']) && $EpisodeData['image'] != '' )
@@ -220,7 +232,8 @@ function powerpress_content($content)
220
  }
221
  }
222
 
223
- $new_content .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData);
 
224
  }
225
  }
226
  }
@@ -335,29 +348,29 @@ function powerpress_rss2_head()
335
  // add the itunes:new-feed-url tag to feed
336
  if( powerpress_is_custom_podcast_feed() )
337
  {
338
- if( trim($Feed['itunes_new_feed_url']) )
339
  echo "\t<itunes:new-feed-url>". trim($Feed['itunes_new_feed_url']) .'</itunes:new-feed-url>'.PHP_EOL;
340
  }
341
- else if( trim($Feed['itunes_new_feed_url']) && ($feed_slug == 'feed' || $feed_slug == 'rss2') ) // If it is the default feed (We don't wnat to apply this to category or tag feeds
342
  {
343
  echo "\t<itunes:new-feed-url>". $Feed['itunes_new_feed_url'] .'</itunes:new-feed-url>'.PHP_EOL;
344
  }
345
 
346
- if( $Feed['itunes_summary'] )
347
  echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( $Feed['itunes_summary'], 'summary' ) .'</itunes:summary>'.PHP_EOL;
348
  else
349
  echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( get_bloginfo('description'), 'summary' ) .'</itunes:summary>'.PHP_EOL;
350
 
351
- if( $powerpress_feed['itunes_talent_name'] )
352
  echo "\t<itunes:author>" . wp_specialchars($powerpress_feed['itunes_talent_name']) . '</itunes:author>'.PHP_EOL;
353
 
354
- if( $powerpress_feed['explicit'] )
355
  echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
356
 
357
- if( $powerpress_feed['block'] && $powerpress_feed['block'] == 'yes' )
358
  echo "\t\t<itunes:block>yes</itunes:block>\n";
359
 
360
- if( $Feed['itunes_image'] )
361
  {
362
  echo "\t".'<itunes:image href="' . wp_specialchars($Feed['itunes_image'], 'double') . '" />'.PHP_EOL;
363
  }
@@ -366,7 +379,7 @@ function powerpress_rss2_head()
366
  echo "\t".'<itunes:image href="' . powerpress_get_root_url() . 'itunes_default.jpg" />'.PHP_EOL;
367
  }
368
 
369
- if( $Feed['email'] )
370
  {
371
  echo "\t".'<itunes:owner>'.PHP_EOL;
372
  echo "\t\t".'<itunes:name>' . wp_specialchars($powerpress_feed['itunes_talent_name']) . '</itunes:name>'.PHP_EOL;
@@ -375,22 +388,22 @@ function powerpress_rss2_head()
375
  echo "\t".'<managingEditor>'. wp_specialchars($Feed['email'] .' ('. $powerpress_feed['itunes_talent_name'] .')') .'</managingEditor>'.PHP_EOL;
376
  }
377
 
378
- if( $Feed['copyright'] )
379
  {
380
  // In case the user entered the copyright html version or the copyright UTF-8 or ASCII symbol or just (c)
381
  $Feed['copyright'] = str_replace(array('&copy;', '(c)', '(C)', chr(194) . chr(169), chr(169) ), '&#xA9;', $Feed['copyright']);
382
  echo "\t".'<copyright>'. wp_specialchars($Feed['copyright']) . '</copyright>'.PHP_EOL;
383
  }
384
 
385
- if( trim($Feed['itunes_subtitle']) )
386
  echo "\t".'<itunes:subtitle>' . powerpress_format_itunes_value($Feed['itunes_subtitle'], 'subtitle', true) . '</itunes:subtitle>'.PHP_EOL;
387
  else
388
  echo "\t".'<itunes:subtitle>'. powerpress_format_itunes_value( get_bloginfo('description'), 'subtitle', true) .'</itunes:subtitle>'.PHP_EOL;
389
 
390
- if( trim($Feed['itunes_keywords']) )
391
  echo "\t".'<itunes:keywords>' . powerpress_format_itunes_value($Feed['itunes_keywords'], 'keywords') . '</itunes:keywords>'.PHP_EOL;
392
 
393
- if( $Feed['rss2_image'] )
394
  {
395
  echo"\t". '<image>' .PHP_EOL;
396
  if( is_category() )
@@ -416,12 +429,12 @@ function powerpress_rss2_head()
416
  // Handle iTunes categories
417
  $Categories = powerpress_itunes_categories();
418
  $Cat1 = false; $Cat2 = false; $Cat3 = false;
419
- if( $Feed['itunes_cat_1'] != '' )
420
- list($Cat1, $SubCat1) = split('-', $Feed['itunes_cat_1']);
421
- if( $Feed['itunes_cat_2'] != '' )
422
- list($Cat2, $SubCat2) = split('-', $Feed['itunes_cat_2']);
423
- if( $Feed['itunes_cat_3'] != '' )
424
- list($Cat3, $SubCat3) = split('-', $Feed['itunes_cat_3']);
425
 
426
  if( $Cat1 )
427
  {
@@ -536,7 +549,7 @@ function powerpress_rss2_item()
536
  else
537
  {
538
  $EpisodeData = powerpress_get_enclosure_data($post->ID, 'podcast');
539
- if( !$EpisodeData && isset($powerpress_feed['process_podpress']) && $powerpress_feed['process_podpress'] )
540
  {
541
  $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
542
  $custom_enclosure = true;
@@ -554,7 +567,7 @@ function powerpress_rss2_item()
554
  $summary = false;
555
  $subtitle = false;
556
  $keywords = false;
557
- $block = $powerpress_feed['block'];
558
 
559
  if( $powerpress_feed['itunes_custom'] )
560
  {
@@ -571,18 +584,21 @@ function powerpress_rss2_item()
571
  }
572
 
573
  // Code for future use:
574
- if( isset( $EpisodeData['author'] ) && strlen($EpisodeData['author']) > 1 )
575
  $author = $EpisodeData['author'];
576
- if( isset( $EpisodeData['block'] ) )
577
- $block = $EpisodeData['block'];
578
  }
579
 
580
  if( $custom_enclosure ) // We need to add the enclosure tag here...
581
  {
 
 
 
582
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
583
- $EpisodeData['url'],
584
- $EpisodeData['size'],
585
- $EpisodeData['type'],
586
  PHP_EOL);
587
  }
588
 
@@ -686,6 +702,13 @@ function powerpress_filter_rss_enclosure($content)
686
  $content = str_replace("type=\"{$matches[1]}\"", "type=\"$ContentType\"", $content);
687
  }
688
 
 
 
 
 
 
 
 
689
  // Replace the original url with the modified one...
690
  if( $OrigURL != $ModifiedURL )
691
  return str_replace($OrigURL, $ModifiedURL, $content);
@@ -818,24 +841,42 @@ function powerpress_template_redirect()
818
 
819
  add_action('template_redirect', 'powerpress_template_redirect', 0);
820
 
821
- function powerpress_init()
822
  {
 
823
  $GeneralSettings = get_option('powerpress_general');
 
 
824
 
825
- // Translation support loaded:
826
- // load_plugin_textdomain('powerpress', false, dirname(plugin_basename(__FILE__)));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
 
828
  if( isset($_GET['powerpress_pinw']) )
829
- powerpress_do_pinw($_GET['powerpress_pinw'], @$GeneralSettings['process_podpress']);
830
 
831
- if( @$GeneralSettings['player_options'] )
832
  require_once( dirname(__FILE__).'/powerpress-player.php');
833
 
834
  if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
835
  return false; // Another podcasting plugin is enabled...
836
 
837
  // If we are to process podpress data..
838
- if( isset($GeneralSettings['process_podpress']) && $GeneralSettings['process_podpress'] )
839
  {
840
  powerpress_podpress_redirect_check();
841
  add_shortcode('display_podcast', 'powerpress_shortcode_handler');
@@ -903,7 +944,7 @@ function powerpress_load_general_feed_settings()
903
  $powerpress_feed['is_custom'] = true;
904
  $powerpress_feed['itunes_custom'] = ($GeneralSettings['episode_box_mode'] == 2);
905
  $powerpress_feed['category'] = $cat_ID;
906
- $powerpress_feed['process_podpress'] = $GeneralSettings['process_podpress']; // Category feeds could originate from Podpress
907
  $powerpress_feed['rss_language'] = ''; // default, let WordPress set the language
908
  $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
909
  $explicit_array = array("no", "yes", "clean");
@@ -913,7 +954,9 @@ function powerpress_load_general_feed_settings()
913
  else
914
  $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
915
  $powerpress_feed['enhance_itunes_summary'] = @$Feed['enhance_itunes_summary'];
916
- $powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
 
 
917
  if( $Feed['feed_redirect_url'] != '' )
918
  $powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
919
  if( $Feed['itunes_author_post'] == true )
@@ -932,27 +975,36 @@ function powerpress_load_general_feed_settings()
932
 
933
  $powerpress_feed = array();
934
  $powerpress_feed['is_custom'] = true;
935
- $powerpress_feed['itunes_custom'] = ($GeneralSettings['episode_box_mode'] == 2);
 
 
936
  $powerpress_feed['feed-slug'] = $feed_slug;
937
- $powerpress_feed['process_podpress'] = ($feed_slug=='podcast'? $GeneralSettings['process_podpress']: false); // We don't touch podpress data for custom feeds
938
  $powerpress_feed['rss_language'] = ''; // RSS language should be set by WordPress by default
939
- $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
 
 
940
  $explicit = array("no", "yes", "clean");
941
- $powerpress_feed['explicit'] = $explicit[$Feed['itunes_explicit']];
942
- if( $Feed['itunes_talent_name'] )
 
 
943
  $powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
944
  else
945
  $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
 
946
  if( version_compare( '5', phpversion(), '>=' ) )
947
  $powerpress_feed['enhance_itunes_summary'] = 0;
948
- else
949
- $powerpress_feed['enhance_itunes_summary'] = @$Feed['enhance_itunes_summary'];
950
- $powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
951
- if( $Feed['feed_redirect_url'] != '' )
 
 
952
  $powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
953
- if( $Feed['itunes_author_post'] == true )
954
  $powerpress_feed['itunes_author_post'] = true;
955
- if( $Feed['rss_language'] != '' )
956
  $powerpress_feed['rss_language'] = $Feed['rss_language'];
957
  return;
958
  }
@@ -983,22 +1035,31 @@ function powerpress_load_general_feed_settings()
983
  {
984
  $powerpress_feed = array(); // Only store what's needed for each feed item
985
  $powerpress_feed['is_custom'] = false; // ($feed_slug == 'podcast'?true:false);
986
- $powerpress_feed['itunes_custom'] = ($GeneralSettings['episode_box_mode'] == 2);
 
 
987
  $powerpress_feed['feed-slug'] = $feed_slug;
988
- $powerpress_feed['process_podpress'] = $GeneralSettings['process_podpress']; // We don't touch podpress data for custom feeds
989
- $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
 
 
990
  $explicit = array("no", "yes", "clean");
991
- $powerpress_feed['explicit'] = $explicit[$FeedSettingsBasic['itunes_explicit']];
992
- if( $FeedSettingsBasic['itunes_talent_name'] )
 
 
993
  $powerpress_feed['itunes_talent_name'] = $FeedSettingsBasic['itunes_talent_name'];
994
  else
995
  $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
 
996
  if( version_compare( '5', phpversion(), '>=' ) )
997
  $powerpress_feed['enhance_itunes_summary'] = 0;
998
- else
999
- $powerpress_feed['enhance_itunes_summary'] = @$FeedSettingsBasic['enhance_itunes_summary'];
1000
- $powerpress_feed['posts_per_rss'] = $FeedSettingsBasic['posts_per_rss'];
1001
- if( $FeedSettingsBasic['itunes_author_post'] == true )
 
 
1002
  $powerpress_feed['itunes_author_post'] = true;
1003
  $powerpress_feed['rss_language'] = ''; // Cannot set the language setting in simple mode
1004
  }; break;
@@ -1068,7 +1129,7 @@ function powerpress_posts_where($where)
1068
  $where .= " {$wpdb->postmeta}.meta_key = 'enclosure' ";
1069
 
1070
  // Include Podpress data if exists...
1071
- if( $powerpress_feed['process_podpress'] && get_query_var('feed') == 'podcast' )
1072
  $where .= " OR {$wpdb->postmeta}.meta_key = 'podPressMedia' ";
1073
 
1074
  $where .= ") ";
@@ -1373,7 +1434,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
1373
  else if( $feed )
1374
  {
1375
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed);
1376
- if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
1377
  $return = $EpisodeData['embed'];
1378
 
1379
  if( $image == '' && isset($EpisodeData['image']) && $EpisodeData['image'] )
@@ -1403,13 +1464,13 @@ function powerpress_shortcode_handler( $attributes, $content = null )
1403
  continue;
1404
 
1405
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
1406
- if( !$EpisodeData && $GeneralSettings['process_podpress'] && $feed_slug == 'podcast' )
1407
  $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
1408
 
1409
  if( !$EpisodeData )
1410
  continue;
1411
 
1412
- if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
1413
  $return .= $EpisodeData['embed'];
1414
 
1415
  $image_current = $image;
@@ -1482,7 +1543,7 @@ function get_the_powerpress_content()
1482
 
1483
  function powerpress_do_pinw($pinw, $process_podpress)
1484
  {
1485
- list($post_id, $feed_slug) = split('-', $pinw, 2);
1486
  $EpisodeData = powerpress_get_enclosure_data($post_id, $feed_slug);
1487
 
1488
  if( $EpisodeData == false && $process_podpress && $feed_slug == 'podcast' )
@@ -1509,11 +1570,11 @@ body { font-size: 13px; font-family: Arial, Helvetica, sans-serif; }
1509
  {
1510
  echo '<p>Unable to retrieve media information.</p>';
1511
  }
1512
- else if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
1513
  {
1514
  echo powerpress_premium_content_message($post_id, $feed_slug, $EpisodeData);
1515
  }
1516
- else if( isset($EpisodeData['embed']) && $EpisodeData['embed'] )
1517
  {
1518
  echo $EpisodeData['embed'];
1519
  }
@@ -1757,7 +1818,7 @@ function powerpress_itunes_categories($PrefixSubCategories = false)
1757
  {
1758
  while( list($key,$val) = each($temp) )
1759
  {
1760
- $parts = split('-', $key);
1761
  $cat = $parts[0];
1762
  $subcat = $parts[1];
1763
 
@@ -1778,7 +1839,7 @@ function powerpress_get_root_url()
1778
 
1779
  function powerpress_format_itunes_value($value, $tag = 255, $remove_new_lines = false)
1780
  {
1781
- if( DB_CHARSET != 'utf8' ) // Check if the string is UTF-8
1782
  $value = utf8_encode($value); // If it is not, convert to UTF-8 then decode it...
1783
 
1784
  // Code added to solve issue with KimiliFlashEmbed plugin and also remove the shortcode for the WP Audio Player
@@ -1964,7 +2025,7 @@ function powerpress_merge_empty_feed_settings($CustomFeedSettings, $FeedSettings
1964
  function powerpress_readable_duration($duration, $include_hour=false)
1965
  {
1966
  $seconds = 0;
1967
- $parts = split(':', $duration);
1968
  if( count($parts) == 3 )
1969
  $seconds = $parts[2] + ($parts[1]*60) + ($parts[0]*60*60);
1970
  else if ( count($parts) == 2 )
@@ -2064,13 +2125,19 @@ function powerpress_get_enclosure_data($post_id, $feed_slug = 'podcast')
2064
 
2065
  $Data = array();
2066
  $Data['duration'] = 0;
2067
- list($Data['url'], $Data['size'], $Data['type'], $Serialized) = explode("\n", $MetaData, 4);
2068
- $Data['url'] = powerpress_add_redirect_url( trim($Data['url']) );
 
 
 
2069
  if( $Serialized )
2070
  {
2071
  $ExtraData = unserialize($Serialized);
2072
  while( list($key,$value) = each($ExtraData) )
2073
  $Data[ $key ] = $value;
 
 
 
2074
  }
2075
 
2076
  // Check that the content type is a valid one...
@@ -2243,6 +2310,9 @@ End Helper Functions
2243
 
2244
  // Are we in the admin?
2245
  if( is_admin() )
 
2246
  require_once(dirname(__FILE__).'/powerpressadmin.php');
2247
-
 
 
2248
  ?>
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.4
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.4' );
37
 
38
  /////////////////////////////////////////////////////
39
  // The following define options should be placed in your
74
 
75
  $powerpress_feed = NULL; // DO NOT CHANGE
76
 
77
+ // Translation support loaded:
78
+ load_plugin_textdomain('powerpress', // domain / keyword name of plugin
79
+ PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/languages', // Absolute path
80
+ dirname(plugin_basename(__FILE__)).'/languages' ); // relative path in plugins folder
81
+
82
  function powerpress_content($content)
83
  {
84
  global $post, $g_powerpress_excerpt_post_id;
191
  // Get the enclosure data
192
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
193
 
194
+ if( !$EpisodeData && !empty($GeneralSettings['process_podpress']) && $feed_slug == 'podcast' )
195
  $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
196
 
197
  if( !$EpisodeData || !$EpisodeData['url'] )
213
  {
214
  if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
215
  {
216
+ $AddDefaultPlayer = empty($EpisodeData['no_player']);
217
+
218
+ if( $EpisodeData && !empty($EpisodeData['embed']) )
219
+ {
220
+ $new_content .= trim($EpisodeData['embed']);
221
+ if( !empty($GeneralSettings['embed_replace_player']) )
222
+ $AddDefaultPlayer = false;
223
+ }
224
+
225
+ if( $AddDefaultPlayer )
226
  {
227
  $image = '';
228
  if( isset($EpisodeData['image']) && $EpisodeData['image'] != '' )
232
  }
233
  }
234
 
235
+ if( !isset($EpisodeData['no_links']) )
236
+ $new_content .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData);
237
  }
238
  }
239
  }
348
  // add the itunes:new-feed-url tag to feed
349
  if( powerpress_is_custom_podcast_feed() )
350
  {
351
+ if( !empty($Feed['itunes_new_feed_url']) )
352
  echo "\t<itunes:new-feed-url>". trim($Feed['itunes_new_feed_url']) .'</itunes:new-feed-url>'.PHP_EOL;
353
  }
354
+ else if( !empty($Feed['itunes_new_feed_url']) && ($feed_slug == 'feed' || $feed_slug == 'rss2') ) // If it is the default feed (We don't wnat to apply this to category or tag feeds
355
  {
356
  echo "\t<itunes:new-feed-url>". $Feed['itunes_new_feed_url'] .'</itunes:new-feed-url>'.PHP_EOL;
357
  }
358
 
359
+ if( !empty($Feed['itunes_summary']) )
360
  echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( $Feed['itunes_summary'], 'summary' ) .'</itunes:summary>'.PHP_EOL;
361
  else
362
  echo "\t".'<itunes:summary>'. powerpress_format_itunes_value( get_bloginfo('description'), 'summary' ) .'</itunes:summary>'.PHP_EOL;
363
 
364
+ if( !empty($powerpress_feed['itunes_talent_name']) )
365
  echo "\t<itunes:author>" . wp_specialchars($powerpress_feed['itunes_talent_name']) . '</itunes:author>'.PHP_EOL;
366
 
367
+ if( !empty($powerpress_feed['explicit']) )
368
  echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
369
 
370
+ if( !empty($Feed['itunes_block']) )
371
  echo "\t\t<itunes:block>yes</itunes:block>\n";
372
 
373
+ if( !empty($Feed['itunes_image']) )
374
  {
375
  echo "\t".'<itunes:image href="' . wp_specialchars($Feed['itunes_image'], 'double') . '" />'.PHP_EOL;
376
  }
379
  echo "\t".'<itunes:image href="' . powerpress_get_root_url() . 'itunes_default.jpg" />'.PHP_EOL;
380
  }
381
 
382
+ if( !empty($Feed['email']) )
383
  {
384
  echo "\t".'<itunes:owner>'.PHP_EOL;
385
  echo "\t\t".'<itunes:name>' . wp_specialchars($powerpress_feed['itunes_talent_name']) . '</itunes:name>'.PHP_EOL;
388
  echo "\t".'<managingEditor>'. wp_specialchars($Feed['email'] .' ('. $powerpress_feed['itunes_talent_name'] .')') .'</managingEditor>'.PHP_EOL;
389
  }
390
 
391
+ if( !empty($Feed['copyright']) )
392
  {
393
  // In case the user entered the copyright html version or the copyright UTF-8 or ASCII symbol or just (c)
394
  $Feed['copyright'] = str_replace(array('&copy;', '(c)', '(C)', chr(194) . chr(169), chr(169) ), '&#xA9;', $Feed['copyright']);
395
  echo "\t".'<copyright>'. wp_specialchars($Feed['copyright']) . '</copyright>'.PHP_EOL;
396
  }
397
 
398
+ if( !empty($Feed['itunes_subtitle']) )
399
  echo "\t".'<itunes:subtitle>' . powerpress_format_itunes_value($Feed['itunes_subtitle'], 'subtitle', true) . '</itunes:subtitle>'.PHP_EOL;
400
  else
401
  echo "\t".'<itunes:subtitle>'. powerpress_format_itunes_value( get_bloginfo('description'), 'subtitle', true) .'</itunes:subtitle>'.PHP_EOL;
402
 
403
+ if( !empty($Feed['itunes_keywords']) )
404
  echo "\t".'<itunes:keywords>' . powerpress_format_itunes_value($Feed['itunes_keywords'], 'keywords') . '</itunes:keywords>'.PHP_EOL;
405
 
406
+ if( !empty($Feed['rss2_image']) )
407
  {
408
  echo"\t". '<image>' .PHP_EOL;
409
  if( is_category() )
429
  // Handle iTunes categories
430
  $Categories = powerpress_itunes_categories();
431
  $Cat1 = false; $Cat2 = false; $Cat3 = false;
432
+ if( !empty($Feed['itunes_cat_1']) )
433
+ list($Cat1, $SubCat1) = explode('-', $Feed['itunes_cat_1']);
434
+ if( !empty($Feed['itunes_cat_2']) )
435
+ list($Cat2, $SubCat2) = explode('-', $Feed['itunes_cat_2']);
436
+ if( !empty($Feed['itunes_cat_3']) )
437
+ list($Cat3, $SubCat3) = explode('-', $Feed['itunes_cat_3']);
438
 
439
  if( $Cat1 )
440
  {
549
  else
550
  {
551
  $EpisodeData = powerpress_get_enclosure_data($post->ID, 'podcast');
552
+ if( !$EpisodeData && !empty($powerpress_feed['process_podpress']) )
553
  {
554
  $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
555
  $custom_enclosure = true;
567
  $summary = false;
568
  $subtitle = false;
569
  $keywords = false;
570
+ $block = false;
571
 
572
  if( $powerpress_feed['itunes_custom'] )
573
  {
584
  }
585
 
586
  // Code for future use:
587
+ if( !empty( $EpisodeData['author'] ) )
588
  $author = $EpisodeData['author'];
589
+ if( !empty( $EpisodeData['block'] ) )
590
+ $block = 'yes';
591
  }
592
 
593
  if( $custom_enclosure ) // We need to add the enclosure tag here...
594
  {
595
+ if( !$EnclosureData['size'] )
596
+ $EnclosureData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
597
+
598
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
599
+ trim($EpisodeData['url']),
600
+ trim($EpisodeData['size']),
601
+ trim($EpisodeData['type']),
602
  PHP_EOL);
603
  }
604
 
702
  $content = str_replace("type=\"{$matches[1]}\"", "type=\"$ContentType\"", $content);
703
  }
704
 
705
+ // Check that the content length is a digit greater that zero
706
+ $match_count = preg_match('/\slength="([^"]*)"/', $content, $matches);
707
+ if( count($matches) > 1 && empty($matches[1]) )
708
+ {
709
+ $content = str_replace("length=\"{$matches[1]}\"", "length=\"5242880\"", $content);
710
+ }
711
+
712
  // Replace the original url with the modified one...
713
  if( $OrigURL != $ModifiedURL )
714
  return str_replace($OrigURL, $ModifiedURL, $content);
841
 
842
  add_action('template_redirect', 'powerpress_template_redirect', 0);
843
 
844
+ function powerpress_pre_transient_rewrite_rules($return_rules)
845
  {
846
+ global $wp_rewrite;
847
  $GeneralSettings = get_option('powerpress_general');
848
+ if( !in_array('podcast', $wp_rewrite->feeds) )
849
+ $wp_rewrite->feeds[] = 'podcast';
850
 
851
+ if( $GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds']) )
852
+ {
853
+ while( list($feedname,$null) = each($GeneralSettings['custom_feeds']) )
854
+ {
855
+ if( !in_array($feedname, $wp_rewrite->feeds) )
856
+ $wp_rewrite->feeds[] = $feedname;
857
+ }
858
+ }
859
+
860
+ return $return_rules;
861
+ }
862
+
863
+ add_filter('pre_transient_rewrite_rules', 'powerpress_pre_transient_rewrite_rules');
864
+
865
+ function powerpress_init()
866
+ {
867
+ $GeneralSettings = get_option('powerpress_general');
868
 
869
  if( isset($_GET['powerpress_pinw']) )
870
+ powerpress_do_pinw($_GET['powerpress_pinw'], !empty($GeneralSettings['process_podpress']) );
871
 
872
+ if( !empty($GeneralSettings['player_options']) )
873
  require_once( dirname(__FILE__).'/powerpress-player.php');
874
 
875
  if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
876
  return false; // Another podcasting plugin is enabled...
877
 
878
  // If we are to process podpress data..
879
+ if( !empty($GeneralSettings['process_podpress']) )
880
  {
881
  powerpress_podpress_redirect_check();
882
  add_shortcode('display_podcast', 'powerpress_shortcode_handler');
944
  $powerpress_feed['is_custom'] = true;
945
  $powerpress_feed['itunes_custom'] = ($GeneralSettings['episode_box_mode'] == 2);
946
  $powerpress_feed['category'] = $cat_ID;
947
+ $powerpress_feed['process_podpress'] = !empty($GeneralSettings['process_podpress']); // Category feeds could originate from Podpress
948
  $powerpress_feed['rss_language'] = ''; // default, let WordPress set the language
949
  $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
950
  $explicit_array = array("no", "yes", "clean");
954
  else
955
  $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
956
  $powerpress_feed['enhance_itunes_summary'] = @$Feed['enhance_itunes_summary'];
957
+ $powerpress_feed['posts_per_rss'] = false;
958
+ if( !empty($Feed['posts_per_rss']) && is_int($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
959
+ $powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
960
  if( $Feed['feed_redirect_url'] != '' )
961
  $powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
962
  if( $Feed['itunes_author_post'] == true )
975
 
976
  $powerpress_feed = array();
977
  $powerpress_feed['is_custom'] = true;
978
+ $powerpress_feed['itunes_custom'] = false;
979
+ if( isset($GeneralSettings['episode_box_mode']) && $GeneralSettings['episode_box_mode'] == 2 )
980
+ $powerpress_feed['itunes_custom'] = (@$GeneralSettings['episode_box_mode'] == 2);
981
  $powerpress_feed['feed-slug'] = $feed_slug;
982
+ $powerpress_feed['process_podpress'] = ($feed_slug=='podcast'? !empty($GeneralSettings['process_podpress']): false); // We don't touch podpress data for custom feeds
983
  $powerpress_feed['rss_language'] = ''; // RSS language should be set by WordPress by default
984
+ $powerpress_feed['default_url'] = '';
985
+ if( !empty($powerpress_feed['default_url']) )
986
+ $powerpress_feed['default_url'] = rtrim(@$GeneralSettings['default_url'], '/') .'/';
987
  $explicit = array("no", "yes", "clean");
988
+ $powerpress_feed['explicit'] ='no';
989
+ if( !empty($Feed['itunes_explicit']) )
990
+ $powerpress_feed['explicit'] = $explicit[ $Feed['itunes_explicit'] ];
991
+ if( !empty($Feed['itunes_talent_name']) )
992
  $powerpress_feed['itunes_talent_name'] = $Feed['itunes_talent_name'];
993
  else
994
  $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
995
+ $powerpress_feed['enhance_itunes_summary'] = 1;
996
  if( version_compare( '5', phpversion(), '>=' ) )
997
  $powerpress_feed['enhance_itunes_summary'] = 0;
998
+ else if( !empty($Feed['enhance_itunes_summary']) )
999
+ $powerpress_feed['enhance_itunes_summary'] = $Feed['enhance_itunes_summary'];
1000
+ $powerpress_feed['posts_per_rss'] = false;
1001
+ if( !empty($Feed['posts_per_rss']) && is_int($Feed['posts_per_rss']) && $Feed['posts_per_rss'] > 0 )
1002
+ $powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
1003
+ if( !empty($Feed['feed_redirect_url']) )
1004
  $powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
1005
+ if( !empty($Feed['itunes_author_post'] ) )
1006
  $powerpress_feed['itunes_author_post'] = true;
1007
+ if( !empty($Feed['rss_language']) )
1008
  $powerpress_feed['rss_language'] = $Feed['rss_language'];
1009
  return;
1010
  }
1035
  {
1036
  $powerpress_feed = array(); // Only store what's needed for each feed item
1037
  $powerpress_feed['is_custom'] = false; // ($feed_slug == 'podcast'?true:false);
1038
+ $powerpress_feed['itunes_custom'] = false;
1039
+ if( isset($GeneralSettings['episode_box_mode']) && $GeneralSettings['episode_box_mode'] == 2)
1040
+ $powerpress_feed['itunes_custom'] = true;
1041
  $powerpress_feed['feed-slug'] = $feed_slug;
1042
+ $powerpress_feed['process_podpress'] = !empty($GeneralSettings['process_podpress']); // We don't touch podpress data for custom feeds
1043
+ $powerpress_feed['default_url'] = '';
1044
+ if( !empty($GeneralSettings['default_url']) )
1045
+ $powerpress_feed['default_url'] = rtrim($GeneralSettings['default_url'], '/') .'/';
1046
  $explicit = array("no", "yes", "clean");
1047
+ $powerpress_feed['explicit'] = 'no';
1048
+ if( !empty($FeedSettingsBasic['itunes_explicit']) )
1049
+ $powerpress_feed['explicit'] = $explicit[$FeedSettingsBasic['itunes_explicit']];
1050
+ if( !empty($FeedSettingsBasic['itunes_talent_name']) )
1051
  $powerpress_feed['itunes_talent_name'] = $FeedSettingsBasic['itunes_talent_name'];
1052
  else
1053
  $powerpress_feed['itunes_talent_name'] = get_bloginfo_rss('name');
1054
+ $powerpress_feed['enhance_itunes_summary'] = 1;
1055
  if( version_compare( '5', phpversion(), '>=' ) )
1056
  $powerpress_feed['enhance_itunes_summary'] = 0;
1057
+ else if( !empty($FeedSettingsBasic['enhance_itunes_summary']) )
1058
+ $powerpress_feed['enhance_itunes_summary'] = $FeedSettingsBasic['enhance_itunes_summary'];
1059
+ $powerpress_feed['posts_per_rss'] = false;
1060
+ if( !empty($FeedSettingsBasic['posts_per_rss']) && is_int($FeedSettingsBasic['posts_per_rss']) && $FeedSettingsBasic['posts_per_rss'] > 0 )
1061
+ $powerpress_feed['posts_per_rss'] = $FeedSettingsBasic['posts_per_rss'];
1062
+ if( !empty($FeedSettingsBasic['itunes_author_post']) )
1063
  $powerpress_feed['itunes_author_post'] = true;
1064
  $powerpress_feed['rss_language'] = ''; // Cannot set the language setting in simple mode
1065
  }; break;
1129
  $where .= " {$wpdb->postmeta}.meta_key = 'enclosure' ";
1130
 
1131
  // Include Podpress data if exists...
1132
+ if( !empty($powerpress_feed['process_podpress']) && get_query_var('feed') == 'podcast' )
1133
  $where .= " OR {$wpdb->postmeta}.meta_key = 'podPressMedia' ";
1134
 
1135
  $where .= ") ";
1434
  else if( $feed )
1435
  {
1436
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed);
1437
+ if( !empty($EpisodeData['embed']) )
1438
  $return = $EpisodeData['embed'];
1439
 
1440
  if( $image == '' && isset($EpisodeData['image']) && $EpisodeData['image'] )
1464
  continue;
1465
 
1466
  $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
1467
+ if( !$EpisodeData && !empty($GeneralSettings['process_podpress']) && $feed_slug == 'podcast' )
1468
  $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
1469
 
1470
  if( !$EpisodeData )
1471
  continue;
1472
 
1473
+ if( !empty($EpisodeData['embed']) )
1474
  $return .= $EpisodeData['embed'];
1475
 
1476
  $image_current = $image;
1543
 
1544
  function powerpress_do_pinw($pinw, $process_podpress)
1545
  {
1546
+ list($post_id, $feed_slug) = explode('-', $pinw, 2);
1547
  $EpisodeData = powerpress_get_enclosure_data($post_id, $feed_slug);
1548
 
1549
  if( $EpisodeData == false && $process_podpress && $feed_slug == 'podcast' )
1570
  {
1571
  echo '<p>Unable to retrieve media information.</p>';
1572
  }
1573
+ else if( !empty($GeneralSettings['premium_caps']) && !powerpress_premium_content_authorized($feed_slug) )
1574
  {
1575
  echo powerpress_premium_content_message($post_id, $feed_slug, $EpisodeData);
1576
  }
1577
+ else if( !empty($EpisodeData['embed']) )
1578
  {
1579
  echo $EpisodeData['embed'];
1580
  }
1818
  {
1819
  while( list($key,$val) = each($temp) )
1820
  {
1821
+ $parts = explode('-', $key);
1822
  $cat = $parts[0];
1823
  $subcat = $parts[1];
1824
 
1839
 
1840
  function powerpress_format_itunes_value($value, $tag = 255, $remove_new_lines = false)
1841
  {
1842
+ if( !defined('DB_CHARSET') || DB_CHARSET != 'utf8' ) // Check if the string is UTF-8
1843
  $value = utf8_encode($value); // If it is not, convert to UTF-8 then decode it...
1844
 
1845
  // Code added to solve issue with KimiliFlashEmbed plugin and also remove the shortcode for the WP Audio Player
2025
  function powerpress_readable_duration($duration, $include_hour=false)
2026
  {
2027
  $seconds = 0;
2028
+ $parts = explode(':', $duration);
2029
  if( count($parts) == 3 )
2030
  $seconds = $parts[2] + ($parts[1]*60) + ($parts[0]*60*60);
2031
  else if ( count($parts) == 2 )
2125
 
2126
  $Data = array();
2127
  $Data['duration'] = 0;
2128
+ list($url, $size, $type, $Serialized) = explode("\n", $MetaData, 4);
2129
+ $Data['url'] = powerpress_add_redirect_url( trim($url) );
2130
+ $Data['size'] = trim($size);
2131
+ $Data['type'] = trim($type);
2132
+
2133
  if( $Serialized )
2134
  {
2135
  $ExtraData = unserialize($Serialized);
2136
  while( list($key,$value) = each($ExtraData) )
2137
  $Data[ $key ] = $value;
2138
+
2139
+ if( isset($Data['length']) ) // Setting from the "Podcasting" plugin...
2140
+ $Data['duration'] = powerpress_readable_duration($Data['length'], true);
2141
  }
2142
 
2143
  // Check that the content type is a valid one...
2310
 
2311
  // Are we in the admin?
2312
  if( is_admin() )
2313
+ {
2314
  require_once(dirname(__FILE__).'/powerpressadmin.php');
2315
+ register_activation_hook( __FILE__, 'powerpress_admin_activate' );
2316
+ }
2317
+
2318
  ?>
powerpressadmin-appearance.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- // powerpressadmin-appearance.php
3
-
4
-
5
- ?>
 
 
 
 
 
powerpressadmin-basic.php CHANGED
@@ -6,7 +6,7 @@ function powerpress_admin_basic()
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;
@@ -30,7 +30,7 @@ function CheckRedirect(obj)
30
  if( obj.value.indexOf('rawvoice') == -1 && obj.value.indexOf('techpodcasts') == -1 &&
31
  obj.value.indexOf('blubrry') == -1 && obj.value.indexOf('podtrac') == -1 )
32
  {
33
- if( !confirm('The redirect entered is not recongized as a supported statistics redirect service.\n\nAre you sure you wish to continue with this redirect url?') )
34
  {
35
  obj.value = '';
36
  return false;
@@ -47,22 +47,55 @@ function SelectEntryBox(mode)
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 &amp; 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">
@@ -106,20 +139,27 @@ function SelectEntryBox(mode)
106
  <h3>Advanced Options</h3>
107
  <div style="margin-left: 50px;">
108
  <div>
109
- <input type="checkbox" name="General[advanced_mode]" value="1" <?php echo ($General['advanced_mode']==1?' checked':''); ?>/> <strong>Advanced Mode</strong> -
110
- Uncheck to display only the essential settings for podcasting.
 
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 Podcasting</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>
@@ -129,18 +169,18 @@ function SelectEntryBox(mode)
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
@@ -150,21 +190,34 @@ function SelectEntryBox(mode)
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>
@@ -174,49 +227,65 @@ function powerpressadmin_edit_entry_options($General)
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_cover_image" class="episode_box_option" name="General[episode_box_cover_image]" type="checkbox" value="1"<?php if( $General['episode_box_cover_image'] ) echo ' checked'; ?> /> Video Cover Image
206
- (specify URL to image to display in place of QuickTime video)</p>
 
 
 
 
 
 
 
 
 
 
207
 
208
- <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
209
- (Leave unchecked to use your blog post tags)</p>
210
- <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
211
- (Leave unchecked to use the first 250 characters of your blog post)</p>
212
- <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
213
- (Leave unchecked to use your blog post)</p>
214
- <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
215
- (Leave unchecked to use your feed's explicit setting)</p>
216
 
217
- <em>NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing.
218
- It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.</em><br />
219
- <em><strong>USE THE ITUNES FIELDS ABOVE AT YOUR OWN RISK.</strong></em>
220
  </div>
221
  </li>
222
  </ul>
@@ -228,10 +297,11 @@ function powerpressadmin_edit_entry_options($General)
228
  </table>
229
  <script language="javascript">
230
  SelectEntryBox(<?php echo $General['episode_box_mode']; ?>);
 
231
  </script>
232
 
233
  <?php
234
- if( @$General['advanced_mode'] )
235
  {
236
  ?>
237
  <div id="episode_entry_settings" style="<?php if( $General['episode_box_mode'] == 1 ) echo 'display:none;'; ?>">
@@ -239,33 +309,33 @@ SelectEntryBox(<?php echo $General['episode_box_mode']; ?>);
239
  <tr valign="top">
240
  <th scope="row">
241
 
242
- <?php _e("File Size Default"); ?></th>
243
  <td>
244
  <select name="General[set_size]" class="bpp_input_med">
245
  <?php
246
- $options = array(0=>'Auto detect file size', 1=>'User specify');
247
-
248
  while( list($value,$desc) = each($options) )
249
  echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
250
 
251
  ?>
252
- </select> (specify default file size option when creating a new episode)
253
  </td>
254
  </tr>
255
 
256
  <tr valign="top">
257
  <th scope="row">
258
- <?php _e("Duration Default"); ?></th>
259
  <td>
260
  <select name="General[set_duration]" class="bpp_input_med">
261
  <?php
262
- $options = array(0=>'Auto detect duration (mp3\'s only)', 1=>'User specify', -1=>'Not specified (not recommended)');
263
-
264
  while( list($value,$desc) = each($options) )
265
  echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
266
 
267
  ?>
268
- </select> (specify default duration option when creating a new episode)
269
  </td>
270
  </tr>
271
  </table>
@@ -274,19 +344,19 @@ while( list($value,$desc) = each($options) )
274
  <table class="form-table">
275
  <tr valign="top">
276
  <th scope="row">
277
- <?php _e("Auto Add Media"); ?></th>
278
  <td>
279
  <select name="General[auto_enclose]" class="bpp_input_med">
280
  <?php
281
- $options = array(0=>'Disabled (default)', 1=>'First media link found in post content', 2=>'Last media link found in post content');
282
-
283
  while( list($value,$desc) = each($options) )
284
  echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
285
 
286
  ?>
287
  </select>
288
- <p>When enabled, the first or last media link found in the post content is automatically added as your podcast episode.</p>
289
- <p style="margin-bottom: 0;"><em>NOTE: Use this feature with caution. Links to media files could unintentionally become podcast episodes.</em></p>
290
  </td>
291
  </tr>
292
 
@@ -297,43 +367,47 @@ while( list($value,$desc) = each($options) )
297
 
298
  function powerpressadmin_edit_podpress_options($General)
299
  {
300
- if( $General['process_podpress'] || powerpress_podpress_episodes_exist() )
301
  {
 
 
 
 
302
  ?>
303
 
304
- <h3>PodPress Options</h3>
305
  <table class="form-table">
306
  <tr valign="top">
307
  <th scope="row">
308
 
309
- <?php _e("PodPress Episodes"); ?></th>
310
  <td>
311
  <select name="General[process_podpress]" class="bpp_input_med">
312
  <?php
313
- $options = array(0=>'Ignore', 1=>'Include in Posts and Feeds');
314
 
315
  while( list($value,$desc) = each($options) )
316
  echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
317
 
318
  ?>
319
- </select> (includes podcast episodes previously created in PodPress)
320
  </td>
321
  </tr>
322
  <?php if( @$General['podpress_stats'] || powerpress_podpress_stats_exist() ) { ?>
323
  <tr valign="top">
324
  <th scope="row">
325
 
326
- <?php _e("PodPress Stats Archive"); ?></th>
327
  <td>
328
  <select name="General[podpress_stats]" class="bpp_input_sm">
329
  <?php
330
- $options = array(0=>'Hide', 1=>'Display');
331
 
332
  while( list($value,$desc) = each($options) )
333
  echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
334
 
335
  ?>
336
- </select> (display archive of old PodPress statistics)
337
  </td>
338
  </tr>
339
  <?php } ?>
@@ -345,17 +419,31 @@ while( list($value,$desc) = each($options) )
345
 
346
  function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
347
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  $OpenSSLSupport = extension_loaded('openssl');
349
  if( $OpenSSLSupport == false )
350
  {
351
  ?>
352
- <div class="error powerpress-error">Ping iTunes requires OpenSSL in PHP. Please refer to your php.ini to enable the php_openssl module.</div>
353
  <?php } // End if !$OpenSSLSupport ?>
354
 
355
- <h3>iTunes Listing Information</h3>
356
  <table class="form-table">
357
  <tr valign="top">
358
- <th scope="row"><?php _e("iTunes Subscription URL"); ?></th>
359
  <td>
360
  <?php
361
  if( $FeedSettings ) {
@@ -366,11 +454,11 @@ function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $f
366
  <?php } ?>
367
  <p>e.g. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=000000000</p>
368
 
369
- <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>.
370
- iTunes will send an email to your <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.
371
  </p>
372
  <p>
373
- Recommended feed to submit to iTunes:
374
  <?php
375
  if( $cat_ID )
376
  {
@@ -393,7 +481,7 @@ Recommended feed to submit to iTunes:
393
  <tr valign="top">
394
  <th scope="row">
395
 
396
- <?php _e("Update iTunes Listing"); ?></th>
397
  <td>
398
  <?php
399
  if( $FeedSettings )
@@ -404,7 +492,7 @@ Recommended feed to submit to iTunes:
404
  <select name="General[ping_itunes]"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> class="bpp_input_sm">
405
  <?php
406
  }
407
- $options = array(0=>'No ', 1=>'Yes ');
408
 
409
  $ping_itunes = ($FeedSettings?$FeedSettings['ping_itunes']:$General['ping_itunes']);
410
  if( $OpenSSLSupport == false )
@@ -414,8 +502,8 @@ while( list($value,$desc) = each($options) )
414
  echo "\t<option value=\"$value\"". ($ping_itunes==$value?' selected':''). ">$desc</option>\n";
415
 
416
  ?>
417
- </select> Notify (ping) iTunes when you publish a new episode.
418
- <p><input name="TestiTunesPing" type="checkbox" value="1"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> /> Test Update iTunes Listing (recommended)</p>
419
  <?php if( $General['itunes_url'] ) {
420
 
421
  $ping_url = str_replace(
@@ -427,7 +515,7 @@ while( list($value,$desc) = each($options) )
427
  'http://www.itunes.com/podcast?id='),
428
  'https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast?id=', $General['itunes_url']);
429
  ?>
430
- <p>You may also update your iTunes listing by using the following link: <a href="#" onclick="javascript: window.open('<?php echo $ping_url; ?>'); return false;" title="Ping iTunes in New Window">Ping iTunes in New Window</a></p>
431
 
432
  <?php
433
  if( preg_match('/id=(\d+)/', $General['itunes_url'], $matches) )
@@ -439,7 +527,7 @@ while( list($value,$desc) = each($options) )
439
  {
440
  $PingLog = $Logging['itunes_ping_'. $FEEDID ];
441
  ?>
442
- <h3>Latest Update iTunes Listing Status: <?php if( $PingLog['success'] ) echo '<span style="color: #006505;">Successful</span>'; else echo '<span style="color: #f00;">Error</span>'; ?></h3>
443
  <div style="font-size: 85%; margin-left: 20px;">
444
  <p>
445
  <?php echo sprintf( __('iTunes notified on %s at %s'), date(get_option('date_format'), $PingLog['timestamp']), date(get_option('time_format'), $PingLog['timestamp'])); ?>
@@ -448,18 +536,18 @@ while( list($value,$desc) = each($options) )
448
  {
449
  $post = get_post($PingLog['post_id']);
450
  if( $post )
451
- echo __(' for post: ') . htmlspecialchars($post->post_title);
452
  }
453
  ?>
454
  </p>
455
  <?php if( $PingLog['success'] ) { ?>
456
- <p>Feed pulled by iTunes: <?php echo $PingLog['feed_url']; ?>
457
  </p>
458
  <?php
459
 
460
  ?>
461
  <?php } else { ?>
462
- <p>Error: <?php echo htmlspecialchars($PingLog['content']); ?></p>
463
  <?php } ?>
464
  </div>
465
  <?php
@@ -483,19 +571,19 @@ function powerpressadmin_edit_blubrry_services($General)
483
  {
484
 
485
  $ModeDesc = 'None';
486
- if( $General['blubrry_auth'] )
487
  $ModeDesc = 'Media Statistics Only';
488
- if( $General['blubrry_hosting'] )
489
  $ModeDesc = 'Media Statistics and Hosting';
490
  $StatsInDashboard = true;
491
- if( isset($General['disable_dashboard_widget']) && $General['disable_dashboard_widget'] == 1 )
492
  $StatsInDashboard = false;
493
 
494
  ?>
495
- <h3><?php _e("Blubrry Services Integration"); ?></h3>
496
  <p>
497
  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
498
- 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.
499
  </p>
500
  <p>
501
  <em>Note: <strong>No membership or service is required</strong> to use this free open source podcasting plugin.</em>
@@ -503,7 +591,7 @@ function powerpressadmin_edit_blubrry_services($General)
503
  <table class="form-table">
504
  <tr valign="top">
505
  <th scope="row">
506
- <?php _e("Blubrry Services"); ?>*
507
  </th>
508
  <td>
509
  <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'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=500&amp;height=400&amp;modal=true" target="_blank" class="thickbox" style="color: #3D517E;" title="Blubrry Services Integration">Click here to configure Blubrry Services</a></strong>)</p>
@@ -512,10 +600,11 @@ function powerpressadmin_edit_blubrry_services($General)
512
 
513
  <tr valign="top">
514
  <th scope="row">
515
- <?php _e("Dashboard Integration"); ?>
516
  </th>
517
  <td>
518
- <p style="margin-top: 5px;"><input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> /> Display Statistics in WordPress Dashboard</p>
 
519
  </td>
520
  </tr>
521
  </table>
@@ -531,35 +620,44 @@ packages start at $12.</em>
531
 
532
  function powerpressadmin_edit_media_statistics($General)
533
  {
 
 
 
 
 
 
 
 
 
534
  ?>
535
- <h3><?php _e("Media Statistics"); ?></h3>
536
  <p>
537
- Enter your Redirect URL issued by your media statistics service provider below.
538
  </p>
539
 
540
  <div style="position: relative;">
541
  <table class="form-table">
542
  <tr valign="top">
543
  <th scope="row">
544
- <?php _e("Redirect URL 1"); ?>
545
  </th>
546
  <td>
547
  <input type="text" style="width: 60%;" name="General[redirect1]" value="<?php echo $General['redirect1']; ?>" onChange="return CheckRedirect(this);" maxlength="250" />
548
  </td>
549
  </tr>
550
  </table>
551
- <?php if( $General['redirect2'] == '' && $General['redirect3'] == '' ) { ?>
552
  <div style="position: absolute;bottom: 0px;right: 10px;font-size: 85%;" id="powerpress_redirect2_showlink">
553
- <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect2_table').style.display='block';document.getElementById('powerpress_redirect2_showlink').style.display='none';return false;">Add Another Redirect</a>
554
  </div>
555
  <?php } ?>
556
  </div>
557
 
558
- <div id="powerpress_redirect2_table" style="position: relative;<?php if( $General['redirect2'] == '' && $General['redirect3'] == '' ) echo 'display:none;'; ?>">
559
  <table class="form-table">
560
  <tr valign="top">
561
  <th scope="row">
562
- <?php _e("Redirect URL 2"); ?>
563
  </th>
564
  <td>
565
  <input type="text" style="width: 60%;" name="General[redirect2]" value="<?php echo $General['redirect2']; ?>" onblur="return CheckRedirect(this);" maxlength="250" />
@@ -568,16 +666,16 @@ Enter your Redirect URL issued by your media statistics service provider below.
568
  </table>
569
  <?php if( $General['redirect3'] == '' ) { ?>
570
  <div style="position: absolute;bottom: 0px;right: 10px;font-size: 85%;" id="powerpress_redirect3_showlink">
571
- <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect3_table').style.display='block';document.getElementById('powerpress_redirect3_showlink').style.display='none';return false;">Add Another Redirect</a>
572
  </div>
573
  <?php } ?>
574
  </div>
575
 
576
- <div id="powerpress_redirect3_table" style="<?php if( $General['redirect3'] == '' ) echo 'display:none;'; ?>">
577
  <table class="form-table">
578
  <tr valign="top">
579
  <th scope="row">
580
- <?php _e("Redirect URL 3"); ?>
581
  </th>
582
  <td>
583
  <input type="text" style="width: 60%;" name="General[redirect3]" value="<?php echo $General['redirect3']; ?>" onblur="return CheckRedirect(this);" maxlength="250" />
@@ -590,9 +688,9 @@ Enter your Redirect URL issued by your media statistics service provider below.
590
  border: solid 1px #3D517E;
591
  }
592
  </style>
593
- <input type="hidden" id="hide_free_stats" name="General[hide_free_stats]" value="<?php echo $General['hide_free_stats']; ?>" />
594
 
595
- <div id="blubrry_stats_box" style="<?php if( $General['hide_free_stats'] == 1 ) echo 'display:none;'; ?>">
596
  <div style="font-family: Arial, Helvetica, sans-serif; border: solid 1px #3D517E; background-color:#D2E9FF;padding:10px; margin-left:10px;margin-right:10px;margin-top:10px;">
597
  <div style="color: #3D517E; font-weight: bold; font-size: 18px;">Free Access to the Best Media Statistics!</div>
598
  <div style="font-size: 14px;margin-top: 10px; margin-bottom: 10px;">
@@ -602,7 +700,7 @@ Enter your Redirect URL issued by your media statistics service provider below.
602
  <div style="text-align: center; font-size: 16px; font-weight: bold;"><a href="http://www.blubrry.com/addpodcast.php?feed=<?php echo urlencode(get_feed_link('podcast')); ?>" target="_blank" style="color: #3D517E;">Sign Up For Free Media Statistics Now</a></div>
603
  </div>
604
  <div style="font-size: 10px;margin-left: 10px;">
605
- <a href="javascript:void();" onclick="javascript:document.getElementById('blubrry_stats_box').style.display='none';document.getElementById('hide_free_stats').value=1;document.getElementById('show_free_stats').style.display='block';return false;">hide</a>
606
  </div>
607
  </div>
608
 
@@ -613,7 +711,7 @@ Enter your Redirect URL issued by your media statistics service provider below.
613
  &nbsp;
614
  </th>
615
  <td>
616
- <p style="margin: 0;"><a href="javascript:void();" onclick="javascript:document.getElementById('blubrry_stats_box').style.display='block';document.getElementById('hide_free_stats').value=0;document.getElementById('show_free_stats').style.display='none';return false;">Learn About Free Blubrry Statistics</a></p>
617
  </td>
618
  </tr>
619
  </table>
@@ -626,8 +724,23 @@ function powerpressadmin_appearance($General=false)
626
  if( $General === false )
627
  $General = powerpress_get_settings('powerpress_general');
628
  $General = powerpress_default_settings($General, 'appearance');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
629
 
630
- $Players = array('podcast'=>'Default Podcast (podcast)');
631
  if( isset($General['custom_feeds']) )
632
  {
633
  while( list($podcast_slug, $podcast_title) = each($General['custom_feeds']) )
@@ -641,7 +754,7 @@ function powerpressadmin_appearance($General=false)
641
  // <input type="hidden" name="action" value="powerpress-save-appearance" />
642
  ?>
643
 
644
- <h3><?php echo __("Appearance Settings"); ?></h3>
645
 
646
  <table class="form-table">
647
 
@@ -650,27 +763,27 @@ function powerpressadmin_appearance($General=false)
650
  {
651
  ?>
652
  <tr valign="top">
653
- <th scope="row"><?php echo __("Media Presentation"); ?></th>
654
  <td><select name="General[display_player]" class="bpp_input_sm">
655
  <?php
656
- $displayoptions = array(1=>"Below Post", 2=>"Above Post", 0=>"None");
657
 
658
  while( list($value,$desc) = each($displayoptions) )
659
  echo "\t<option value=\"$value\"". ($General['display_player']==$value?' selected':''). ">$desc</option>\n";
660
 
661
  ?>
662
- </select> (where player and/or links will be displayed)
663
- <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>
664
  </td>
665
  </tr>
666
 
667
  <tr valign="top">
668
  <th scope="row">
669
- <?php _e("Display Media Player"); ?></th>
670
  <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') );">
671
  <?php
672
- $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');
673
-
674
  while( list($value,$desc) = each($playeroptions) )
675
  echo "\t<option value=\"$value\"". ($General['player_function']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
676
 
@@ -688,11 +801,11 @@ while( list($value,$desc) = each($playeroptions) )
688
  <tr valign="top">
689
  <th scope="row">
690
 
691
- <?php _e("Download Link"); ?></th>
692
  <td>
693
  <select name="General[podcast_link]" class="bpp_input_med">
694
  <?php
695
- $linkoptions = array(1=>"Display", 2=>"Display with file size", 3=>"Display with file size and duration", 0=>"Disable");
696
 
697
  while( list($value,$desc) = each($linkoptions) )
698
  echo "\t<option value=\"$value\"". ($General['podcast_link']==$value?' selected':''). ">$desc</option>\n";
@@ -710,49 +823,49 @@ while( list($value,$desc) = each($linkoptions) )
710
  <tr valign="top">
711
  <th scope="row" style="background-image: url(../wp-includes/images/smilies/icon_exclaim.gif); background-position: 10px 10px; background-repeat: no-repeat; ">
712
 
713
- <div style="margin-left: 24px;"><?php _e("Having Theme Issues?"); ?></div></th>
714
  <td>
715
  <select name="General[player_aggressive]" class="bpp_input_med">
716
  <?php
717
- $linkoptions = array(0=>"No, everything is working great", 1=>"Yes, please try to fix");
718
-
719
  while( list($value,$desc) = each($linkoptions) )
720
  echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
721
 
722
  ?>
723
  </select>
724
  <p style="margin-top: 5px; margin-bottom:0;">
725
- Use this option if you are having problems with the players not appearing in your pages.
726
  </p>
727
  </td>
728
  </tr>
729
  </table>
730
 
731
  <?php
732
- if( @$General['advanced_mode'] )
733
  {
734
  ?>
735
  <div id="new_window_settings" style="display: <?php echo ( $General['player_function']==1 || $General['player_function']==3 ?'block':'none'); ?>">
736
- <h3>Play in New Window Settings</h3>
737
  <table class="form-table">
738
 
739
  <tr valign="top">
740
  <th scope="row">
741
- <?php echo __("New Window Width"); ?>
742
  </th>
743
  <td>
744
  <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" />
745
- Width of new window (leave blank for 320 default)
746
  </td>
747
  </tr>
748
 
749
  <tr valign="top">
750
  <th scope="row">
751
- <?php echo __("New Window Height"); ?>
752
  </th>
753
  <td>
754
  <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" />
755
- Height of new window (leave blank for 240 default)
756
  </td>
757
  </tr>
758
  </table>
@@ -761,43 +874,43 @@ Height of new window (leave blank for 240 default)
761
  }
762
  ?>
763
 
764
- <h3><?php echo __("Video Player Settings"); ?></h3>
765
 
766
  <table class="form-table">
767
  <tr valign="top">
768
  <th scope="row">
769
- <?php echo __("Player Width"); ?>
770
  </th>
771
  <td>
772
  <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" />
773
- Width of player (leave blank for 320 default)
774
  </td>
775
  </tr>
776
 
777
  <tr valign="top">
778
  <th scope="row">
779
- <?php echo __("Player Height"); ?>
780
  </th>
781
  <td>
782
  <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" />
783
- Height of player (leave blank for 240 default)
784
  </td>
785
  </tr>
786
 
787
  <tr valign="top">
788
  <th scope="row">
789
- <?php _e("QuickTime Scale"); ?></th>
790
  <td>
791
  <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' ))">
792
  <?php
793
- $scale_options = array('tofit'=>"ToFit (default)", 'aspect'=>"Aspect" );
794
  if( !isset($General['player_scale']) )
795
  $General['player_scale'] = 'tofit'; // Tofit works in almost all cases
796
 
797
  if( is_numeric($General['player_scale']) )
798
- $scale_options[ $General['player_scale'] ]='Custom';
799
  else
800
- $scale_options['custom']='Custom';
801
 
802
 
803
 
@@ -807,25 +920,25 @@ while( list($value,$desc) = each($scale_options) )
807
  ?>
808
  </select>
809
  <span id="player_scale_custom" style="display: <?php echo (is_numeric($General['player_scale'])?'inline':'none'); ?>">
810
- 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
811
  </span>
812
  <p style="margin-top: 5px; margin-bottom: 0;">
813
- If you do not see video, adjust the width, height and scale settings above.
814
  </p>
815
  </td>
816
  </tr>
817
 
818
  </table>
819
 
820
- <h3>Audio Player Settings</h3>
821
  <table class="form-table">
822
  <tr valign="top">
823
  <th scope="row">
824
- <?php echo __("Default Player Width"); ?>
825
  </th>
826
  <td>
827
  <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" />
828
- Width of Audio mp3 player (leave blank for 320 default)
829
  </td>
830
  </tr>
831
  </table>
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;
30
  if( obj.value.indexOf('rawvoice') == -1 && obj.value.indexOf('techpodcasts') == -1 &&
31
  obj.value.indexOf('blubrry') == -1 && obj.value.indexOf('podtrac') == -1 )
32
  {
33
+ if( !confirm('<?php echo __('The redirect entered is not recongized as a supported statistics redirect service.'); ?>\n\n<?php echo __('Are you sure you wish to continue with this redirect url?'); ?>') )
34
  {
35
  obj.value = '';
36
  return false;
47
  jQuery('.episode_box_option').attr("disabled","disabled");
48
  }
49
 
50
+ function SelectEmbedField(checked)
51
+ {
52
+ if( checked )
53
+ jQuery('#embed_replace_player').removeAttr("disabled");
54
+ else
55
+ jQuery('#embed_replace_player').attr("disabled","disabled");
56
+ }
57
 
58
+ jQuery(document).ready(function($) {
59
+
60
+ jQuery('#episode_box_player_links_options').change(function () {
61
+
62
+ if( jQuery(this).attr("checked") == true ) {
63
+ jQuery('#episode_box_player_links_options_div').css("display", 'block' );
64
+ }
65
+ else {
66
+ jQuery('#episode_box_player_links_options_div').css("display", 'none' );
67
+ jQuery('.episode_box_no_player_or_links').attr("checked", false );
68
+ jQuery('#episode_box_no_player_and_links').attr("checked", false );
69
+ }
70
+ } );
71
 
72
+ jQuery('#episode_box_no_player_and_links').change(function () {
73
+
74
+ if( jQuery(this).attr("checked") == true ) {
75
+ jQuery('.episode_box_no_player_or_links').attr("checked", false );
76
+ }
77
+ } );
78
+
79
+ jQuery('.episode_box_no_player_or_links').change(function () {
80
+ if( jQuery(this).attr("checked") == true) {
81
+ jQuery('#episode_box_no_player_and_links').attr("checked", false );
82
+ }
83
+ } );
84
+ } );
85
 
86
  </script>
87
 
88
  <input type="hidden" name="action" value="powerpress-save-settings" />
89
 
90
+ <h2><?php echo __('Blubrry PowerPress Settings'); ?></h2>
91
 
92
  <div id="powerpress_settings_page" class="powerpress_tabbed_content">
93
  <ul class="powerpress_settings_tabs">
94
+ <li><a href="#tab1"><span><?php echo __('Basic Settings'); ?></span></a></li>
95
+ <li><a href="#tab2"><span><?php echo htmlspecialchars(__('Services & Statistics')); ?></span></a></li>
96
+ <li><a href="#tab3"><span><?php echo __('Appearance'); ?></span></a></li>
97
+ <li><a href="#tab4"><span><?php echo __('Feeds'); ?></span></a></li>
98
+ <li><a href="#tab5"><span><?php echo __('iTunes'); ?></span></a></li>
99
  </ul>
100
 
101
  <div id="tab1" class="powerpress_tab">
139
  <h3>Advanced Options</h3>
140
  <div style="margin-left: 50px;">
141
  <div>
142
+ <input type="checkbox" name="General[advanced_mode]" value="1" <?php echo ($General['advanced_mode']==1?' checked':''); ?>/>
143
+ <strong><?php echo __('Advanced Mode'); ?></strong> -
144
+ <?php echo __('Uncheck to display only the essential settings for podcasting.'); ?>
145
  </div>
146
  <div>
147
+ <input type="checkbox" name="General[player_options]" value="1" <?php echo ($General['player_options']?' checked':''); ?>/>
148
+ <strong><?php echo __('Audio Player Options'); ?></strong> -
149
+ <?php echo __('Select from 5 different web based audio flash players.'); ?>
150
+ <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled'); ?>)</span>
151
  </div>
152
  <div>
153
+ <input type="checkbox" name="General[channels]" value="1" <?php echo ($General['channels']?' checked':''); ?>/>
154
+ <strong><?php echo __('Custom Podcast Channels'); ?></strong> -
155
+ <?php echo __('Manage multiple media files and/or formats to one blog post.'); ?>
156
+ <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled'); ?>)</span>
157
  </div>
158
  <div>
159
+ <input type="checkbox" name="General[cat_casting]" value="1" <?php echo ($General['cat_casting']?' checked':''); ?>/>
160
+ <strong><?php echo __('Category Podcasting'); ?></strong> -
161
+ <?php echo __('Manage category podcast feeds.'); ?>
162
+ <span style="font-size: 85%;">(<?php echo __('feature will appear in left menu when enabled'); ?>)</span>
163
  </div>
164
  </div>
165
  </div>
169
  {
170
  ?>
171
  <div style="margin-left: 10px;">
172
+ <h3 style="margin-bottom: 5px;"><?php echo __('Like The Plugin?'); ?></h3>
173
  <p style="margin-top: 0;">
174
+ <?php echo __('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:'); ?>
175
  </p>
176
  <ul id="powerpress_support">
177
+ <li><?php echo __('Rate this plugin 5 stars in the'); ?> <a href="http://wordpress.org/extend/plugins/powerpress/" title="<?php echo __('Rate this plugin 5 stars in the'); ?> <?php echo __('WordPress Plugins Directory'); ?>" target="_blank"><?php echo __('WordPress Plugins Directory'); ?></a>.</li>
178
+ <li><?php echo __('Tell the world about PowerPress by writing about it on your blog'); ?>,
179
+ <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="<?php echo __('Tweet about Blubrry PowerPress'); ?>">Twitter</a>,
180
+ <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="<?php echo __('Share Blubrry PowerPress on Facebook'); ?>">Facebook</a>,
181
+ <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="<?php echo __('Digg about Blubrry PowerPress'); ?>">Digg</a>,
182
  etc...</li>
183
+ <li><a href="http://www.blubrry.com/contact.php" target="_blank" title="<?php echo __('Send us feedback'); ?>"><?php echo __('Send us feedback'); ?></a> (<?php echo __('we love getting suggestions for new features!'); ?>)</li>
184
  </ul>
185
  </div>
186
  <?php
190
  function powerpressadmin_edit_entry_options($General)
191
  {
192
  $OpenSSLSupport = extension_loaded('openssl');
193
+ if( !isset($General['advanced_mode']) )
194
+ $General['advanced_mode'] = 0;
195
+ if( !isset($General['default_url']) )
196
+ $General['default_url'] = '';
197
+ if( !isset($General['episode_box_mode']) )
198
+ $General['episode_box_mode'] = 0;
199
+ if( !isset($General['episode_box_embed']) )
200
+ $General['episode_box_embed'] = 0;
201
+ if( !isset($General['set_duration']) )
202
+ $General['set_duration'] = 0;
203
+ if( !isset($General['set_size']) )
204
+ $General['set_size'] = 0;
205
+ if( !isset($General['auto_enclose']) )
206
+ $General['auto_enclose'] = 0;
207
  ?>
208
  <h3><?php echo __("Episode Entry Options"); ?></h3>
209
 
210
  <table class="form-table">
211
  <?php
212
+ if( $General['advanced_mode'] )
213
  {
214
  ?>
215
  <tr valign="top">
216
+ <th scope="row"><?php echo __('Default Media URL'); ?></th>
217
  <td>
218
  <input type="text" style="width: 80%;" name="General[default_url]" value="<?php echo $General['default_url']; ?>" maxlength="250" />
219
+ <p><?php echo __('e.g. http://example.com/mediafolder/'); ?></p>
220
+ <p><?php echo __('URL above will prefix entered file names that do not start with \'http://\'. URL above must end with a trailing slash. You may leave blank if you always enter the complete URL to your media when creating podcast episodes.'); ?>
 
221
  </p>
222
  </td>
223
  </tr>
227
  <tr valign="top">
228
  <th scope="row">
229
 
230
+ <?php echo __('Podcast Entry Box'); ?></th>
231
  <td>
232
 
233
  <ul>
234
+ <li><label><input type="radio" name="General[episode_box_mode]" value="1" <?php if( $General['episode_box_mode'] == 1 ) echo 'checked'; ?> onclick="SelectEntryBox(1);" /> <?php echo __('Simple'); ?></label></li>
235
  <li>
236
  <ul>
237
+ <li><?php echo __('Episode entry box includes Media URL field only. File Size and Duration will be auto detected upon saving the post.'); ?></li>
238
  </ul>
239
  </li>
240
 
241
+ <li><label><input type="radio" name="General[episode_box_mode]" value="0" <?php if( $General['episode_box_mode'] == 0 ) echo 'checked'; ?> onclick="SelectEntryBox(0);" /> <?php echo __('Normal'); ?></label> (<?php echo __('default'); ?>)</li>
242
  <li>
243
  <ul>
244
+ <li><?php echo __('Episode entry box includes Media URL, File Size and Duration fields.'); ?></li>
245
  </ul>
246
  </li>
247
 
248
+ <li><label><input type="radio" name="General[episode_box_mode]" value="2" <?php if( $General['episode_box_mode'] == 2 ) echo 'checked'; ?> onclick="SelectEntryBox(2);" /> <?php echo __('Custom'); ?></label></li>
249
  <li>
250
  <ul>
251
+ <li><?php echo __('Episode entry box includes Media URL, File Size and Duration fields, plus:'); ?>
252
  <div id="episode_box_mode_adv">
253
+ <p style="margin-top: 15px; margin-bottom: 0;"><input id="episode_box_embed" class="episode_box_option" name="General[episode_box_embed]" type="checkbox" value="1"<?php if( !empty($General['episode_box_embed']) ) echo ' checked'; ?> onclick="SelectEmbedField(this.checked);" /> <?php echo __('Embed Field'); ?>
254
+ (<?php echo __('Enter embed code from sites such as YouTube, Viddler and Blip.tv'); ?>)</p>
255
+ <p style="margin-top: 5px; margin-left: 20px; font-size: 90%;"><input id="embed_replace_player" class="episode_box_option" name="General[embed_replace_player]" type="checkbox" value="1"<?php if( !empty($General['embed_replace_player']) ) echo ' checked'; ?> /> <?php echo __('Replace Player with Embed'); ?>
256
+ (<?php echo __('Do not display default player if embed present for episode.'); ?>)</p>
257
+
258
+ <p style="margin-top: 15px;"><input id="episode_box_player_links_options" class="episode_box_option" name="episode_box_player_links_options" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player_and_links']) || !empty($General['episode_box_no_player']) || !empty($General['episode_box_no_links']) ) echo ' checked'; ?> /> <?php echo __('Display Player and Links Options'); ?>
259
+ </p>
260
+ <div id="episode_box_player_links_options_div" style="margin-left: 20px;<?php if( empty($General['episode_box_no_player_and_links']) && empty($General['episode_box_no_player']) && empty($General['episode_box_no_links']) ) echo 'display:none;'; ?>">
261
+
262
+ <p style="margin-top: 0px; margin-bottom: 5px;"><input id="episode_box_no_player_and_links" class="episode_box_option" name="General[episode_box_no_player_and_links]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player_and_links']) ) echo ' checked'; ?> /> <?php echo htmlspecialchars(__('No Player & Links Option')); ?>
263
+ (<?php echo __('Disable media player and links on a per episode basis'); ?>)</p>
264
 
265
+ <p style="margin-top: 0; margin-bottom: 0; margin-left: 20px;"><?php echo ('- or -'); ?></p>
266
+
267
+ <p style="margin-top: 5px; margin-bottom: 10px;"><input id="episode_box_no_player" class="episode_box_option episode_box_no_player_or_links" name="General[episode_box_no_player]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_player']) ) echo ' checked'; ?> /> <?php echo __('No Player Option'); ?>
268
+ (<?php echo __('Disable media player on a per episode basis'); ?>)</p>
269
+
270
+ <p style="margin-top: 5px; margin-bottom: 20px;"><input id="episode_box_no_links" class="episode_box_option episode_box_no_player_or_links" name="General[episode_box_no_links]" type="checkbox" value="1"<?php if( !empty($General['episode_box_no_links']) ) echo ' checked'; ?> /> <?php echo __('No Links Option'); ?>
271
+ (<?php echo __('Disable media links on a per episode basis'); ?>)</p>
272
+
273
+ </div>
274
+
275
+ <p style="margin-top: 15px;"><input id="episode_box_cover_image" class="episode_box_option" name="General[episode_box_cover_image]" type="checkbox" value="1"<?php if( @$General['episode_box_cover_image'] ) echo ' checked'; ?> /> <?php echo __('Video Cover Image'); ?>
276
+ (<?php echo __('specify URL to image to display in place of QuickTime video'); ?>)</p>
277
 
278
+ <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( !empty($General['episode_box_keywords']) ) echo ' checked'; ?> /> <?php echo __('iTunes Keywords Field'); ?>
279
+ (<?php echo __('Leave unchecked to use your blog post tags'); ?>)</p>
280
+ <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( !empty($General['episode_box_subtitle']) ) echo ' checked'; ?> /> <?php echo __('iTunes Subtitle Field'); ?>
281
+ (<?php echo __('Leave unchecked to use the first 250 characters of your blog post'); ?>)</p>
282
+ <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( !empty($General['episode_box_summary']) ) echo ' checked'; ?> /> <?php echo __('iTunes Summary Field'); ?>
283
+ (<?php echo __('Leave unchecked to use your blog post'); ?>)</p>
284
+ <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( !empty($General['episode_box_explicit']) ) echo ' checked'; ?> /> <?php echo __('iTunes Explicit Field'); ?>
285
+ (<?php echo __('Leave unchecked to use your feed\'s explicit setting'); ?>)</p>
286
 
287
+ <em><?php echo __('NOTE: An invalid entry into any of the iTunes fields may cause problems with your iTunes listing. It is highly recommended that you validate your feed using feedvalidator.org everytime you modify any of the iTunes fields listed above.'); ?></em><br />
288
+ <em><strong><?php echo __('USE THE ITUNES FIELDS ABOVE AT YOUR OWN RISK.'); ?></strong></em>
 
289
  </div>
290
  </li>
291
  </ul>
297
  </table>
298
  <script language="javascript">
299
  SelectEntryBox(<?php echo $General['episode_box_mode']; ?>);
300
+ SelectEmbedField(<?php echo $General['episode_box_embed']; ?>);
301
  </script>
302
 
303
  <?php
304
+ if( $General['advanced_mode'] )
305
  {
306
  ?>
307
  <div id="episode_entry_settings" style="<?php if( $General['episode_box_mode'] == 1 ) echo 'display:none;'; ?>">
309
  <tr valign="top">
310
  <th scope="row">
311
 
312
+ <?php echo __('File Size Default'); ?></th>
313
  <td>
314
  <select name="General[set_size]" class="bpp_input_med">
315
  <?php
316
+ $options = array(0=>__('Auto detect file size'), 1=>__('User specify') );
317
+
318
  while( list($value,$desc) = each($options) )
319
  echo "\t<option value=\"$value\"". ($General['set_size']==$value?' selected':''). ">$desc</option>\n";
320
 
321
  ?>
322
+ </select> (<?php echo __('specify default file size option when creating a new episode'); ?>)
323
  </td>
324
  </tr>
325
 
326
  <tr valign="top">
327
  <th scope="row">
328
+ <?php echo __('Duration Default'); ?></th>
329
  <td>
330
  <select name="General[set_duration]" class="bpp_input_med">
331
  <?php
332
+ $options = array(0=>__('Auto detect duration (mp3\'s only)'), 1=>__('User specify'), -1=>__('Not specified (not recommended)') );
333
+
334
  while( list($value,$desc) = each($options) )
335
  echo "\t<option value=\"$value\"". ($General['set_duration']==$value?' selected':''). ">$desc</option>\n";
336
 
337
  ?>
338
+ </select> (<?php echo __('specify default duration option when creating a new episode'); ?>)
339
  </td>
340
  </tr>
341
  </table>
344
  <table class="form-table">
345
  <tr valign="top">
346
  <th scope="row">
347
+ <?php echo __("Auto Add Media"); ?></th>
348
  <td>
349
  <select name="General[auto_enclose]" class="bpp_input_med">
350
  <?php
351
+ $options = array(0=>__('Disabled (default)'), 1=>__('First media link found in post content'), 2=>__('Last media link found in post content') );
352
+
353
  while( list($value,$desc) = each($options) )
354
  echo "\t<option value=\"$value\"". ($General['auto_enclose']==$value?' selected':''). ">$desc</option>\n";
355
 
356
  ?>
357
  </select>
358
+ <p><?php echo __('When enabled, the first or last media link found in the post content is automatically added as your podcast episode.'); ?></p>
359
+ <p style="margin-bottom: 0;"><em><?php echo __('NOTE: Use this feature with caution. Links to media files could unintentionally become podcast episodes.'); ?></em></p>
360
  </td>
361
  </tr>
362
 
367
 
368
  function powerpressadmin_edit_podpress_options($General)
369
  {
370
+ if( !empty($General['process_podpress']) || powerpress_podpress_episodes_exist() )
371
  {
372
+ if( !isset($General['process_podpress']) )
373
+ $General['process_podpress'] = 0;
374
+ if( !isset($General['podpress_stats']) )
375
+ $General['podpress_stats'] = 0;
376
  ?>
377
 
378
+ <h3><?php echo __('PodPress Options'); ?></h3>
379
  <table class="form-table">
380
  <tr valign="top">
381
  <th scope="row">
382
 
383
+ <?php echo __('PodPress Episodes'); ?></th>
384
  <td>
385
  <select name="General[process_podpress]" class="bpp_input_med">
386
  <?php
387
+ $options = array(0=>__('Ignore'), 1=>__('Include in Posts and Feeds') );
388
 
389
  while( list($value,$desc) = each($options) )
390
  echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
391
 
392
  ?>
393
+ </select> (<?php echo __('includes podcast episodes previously created in PodPress'); ?>)
394
  </td>
395
  </tr>
396
  <?php if( @$General['podpress_stats'] || powerpress_podpress_stats_exist() ) { ?>
397
  <tr valign="top">
398
  <th scope="row">
399
 
400
+ <?php echo __('PodPress Stats Archive'); ?></th>
401
  <td>
402
  <select name="General[podpress_stats]" class="bpp_input_sm">
403
  <?php
404
+ $options = array(0=>__('Hide'), 1=>__('Display') );
405
 
406
  while( list($value,$desc) = each($options) )
407
  echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
408
 
409
  ?>
410
+ </select> (<?php echo __('display archive of old PodPress statistics'); ?>)
411
  </td>
412
  </tr>
413
  <?php } ?>
419
 
420
  function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
421
  {
422
+ // Set default settings (if not set)
423
+ if( $FeedSettings )
424
+ {
425
+ if( !isset($FeedSettings['ping_itunes']) )
426
+ $FeedSettings['ping_itunes'] = 0;
427
+ if( !isset($FeedSettings['itunes_url']) )
428
+ $FeedSettings['itunes_url'] = '';
429
+ }
430
+ if( !isset($General['itunes_url']) )
431
+ $General['itunes_url'] = '';
432
+ if( !isset($General['ping_itunes']) )
433
+ $General['ping_itunes'] = 0;
434
+
435
+
436
  $OpenSSLSupport = extension_loaded('openssl');
437
  if( $OpenSSLSupport == false )
438
  {
439
  ?>
440
+ <div class="error powerpress-error"><?php echo __('Ping iTunes requires OpenSSL in PHP. Please refer to your php.ini to enable the php_openssl module.'); ?></div>
441
  <?php } // End if !$OpenSSLSupport ?>
442
 
443
+ <h3><?php echo __('iTunes Listing Information'); ?></h3>
444
  <table class="form-table">
445
  <tr valign="top">
446
+ <th scope="row"><?php echo __('iTunes Subscription URL'); ?></th>
447
  <td>
448
  <?php
449
  if( $FeedSettings ) {
454
  <?php } ?>
455
  <p>e.g. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=000000000</p>
456
 
457
+ <p><?php echo __('Click the following link to'); ?> <a href="https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast" target="_blank" title="<?php echo __('Publish a Podcast on iTunes'); ?>"><?php echo __('Publish a Podcast on iTunes'); ?></a>.
458
+ <?php echo __('iTunes will send an email to your <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.'); ?>
459
  </p>
460
  <p>
461
+ <?php echo __('Recommended feed to submit to iTunes: '); ?>
462
  <?php
463
  if( $cat_ID )
464
  {
481
  <tr valign="top">
482
  <th scope="row">
483
 
484
+ <?php echo __('Update iTunes Listing'); ?></th>
485
  <td>
486
  <?php
487
  if( $FeedSettings )
492
  <select name="General[ping_itunes]"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> class="bpp_input_sm">
493
  <?php
494
  }
495
+ $options = array(0=>__('No'), 1=>__('Yes') );
496
 
497
  $ping_itunes = ($FeedSettings?$FeedSettings['ping_itunes']:$General['ping_itunes']);
498
  if( $OpenSSLSupport == false )
502
  echo "\t<option value=\"$value\"". ($ping_itunes==$value?' selected':''). ">$desc</option>\n";
503
 
504
  ?>
505
+ </select> <?php echo __('Notify (ping) iTunes when you publish a new episode.'); ?>
506
+ <p><input name="TestiTunesPing" type="checkbox" value="1"<?php if( $OpenSSLSupport == false ) echo ' disabled'; ?> /> <?php echo __('Test Update iTunes Listing (recommended)'); ?></p>
507
  <?php if( $General['itunes_url'] ) {
508
 
509
  $ping_url = str_replace(
515
  'http://www.itunes.com/podcast?id='),
516
  'https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast?id=', $General['itunes_url']);
517
  ?>
518
+ <p><?php echo __('You may also update your iTunes listing by using the following link:'); ?> <a href="#" onclick="javascript: window.open('<?php echo $ping_url; ?>'); return false;" title="<?php echo __('Ping iTunes in New Window'); ?>"><?php echo __('Ping iTunes in New Window'); ?></a></p>
519
 
520
  <?php
521
  if( preg_match('/id=(\d+)/', $General['itunes_url'], $matches) )
527
  {
528
  $PingLog = $Logging['itunes_ping_'. $FEEDID ];
529
  ?>
530
+ <h3><?php echo __('Latest Update iTunes Listing Status:'); ?> <?php if( $PingLog['success'] ) echo '<span style="color: #006505;">'. __('Successful') .'</span>'; else echo '<span style="color: #f00;">'. __('Error') .'</span>'; ?></h3>
531
  <div style="font-size: 85%; margin-left: 20px;">
532
  <p>
533
  <?php echo sprintf( __('iTunes notified on %s at %s'), date(get_option('date_format'), $PingLog['timestamp']), date(get_option('time_format'), $PingLog['timestamp'])); ?>
536
  {
537
  $post = get_post($PingLog['post_id']);
538
  if( $post )
539
+ echo ' '. __('for post:') .' '. htmlspecialchars($post->post_title);
540
  }
541
  ?>
542
  </p>
543
  <?php if( $PingLog['success'] ) { ?>
544
+ <p><?php echo __('Feed pulled by iTunes:'); ?> <?php echo $PingLog['feed_url']; ?>
545
  </p>
546
  <?php
547
 
548
  ?>
549
  <?php } else { ?>
550
+ <p><?php echo __('Error:'); ?> <?php echo htmlspecialchars($PingLog['content']); ?></p>
551
  <?php } ?>
552
  </div>
553
  <?php
571
  {
572
 
573
  $ModeDesc = 'None';
574
+ if( !empty($General['blubrry_auth']) )
575
  $ModeDesc = 'Media Statistics Only';
576
+ if( !empty($General['blubrry_hosting']) )
577
  $ModeDesc = 'Media Statistics and Hosting';
578
  $StatsInDashboard = true;
579
+ if( !empty($General['disable_dashboard_widget']) )
580
  $StatsInDashboard = false;
581
 
582
  ?>
583
+ <h3><?php echo __('Blubrry Services Integration'); ?></h3>
584
  <p>
585
  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
586
+ 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 upload and publish media.
587
  </p>
588
  <p>
589
  <em>Note: <strong>No membership or service is required</strong> to use this free open source podcasting plugin.</em>
591
  <table class="form-table">
592
  <tr valign="top">
593
  <th scope="row">
594
+ <?php echo __('Blubrry Services'); ?>*
595
  </th>
596
  <td>
597
  <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'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=500&amp;height=400&amp;modal=true" target="_blank" class="thickbox" style="color: #3D517E;" title="Blubrry Services Integration">Click here to configure Blubrry Services</a></strong>)</p>
600
 
601
  <tr valign="top">
602
  <th scope="row">
603
+ <?php echo __('Dashboard Integration'); ?>
604
  </th>
605
  <td>
606
+ <p style="margin-top: 5px;"><input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> />
607
+ <?php echo __('Display Statistics in WordPress Dashboard'); ?></p>
608
  </td>
609
  </tr>
610
  </table>
620
 
621
  function powerpressadmin_edit_media_statistics($General)
622
  {
623
+ if( !isset($General['redirect1']) )
624
+ $General['redirect1'] = '';
625
+ if( !isset($General['redirect2']) )
626
+ $General['redirect2'] = '';
627
+ if( !isset($General['redirect3']) )
628
+ $General['redirect3'] = '';
629
+ if( !isset($General['hide_free_stats']) )
630
+ $General['hide_free_stats'] = 0;
631
+
632
  ?>
633
+ <h3><?php echo __('Media Statistics'); ?></h3>
634
  <p>
635
+ <?php echo __('Enter your Redirect URL issued by your media statistics service provider below.'); ?>
636
  </p>
637
 
638
  <div style="position: relative;">
639
  <table class="form-table">
640
  <tr valign="top">
641
  <th scope="row">
642
+ <?php echo __('Redirect URL 1'); ?>
643
  </th>
644
  <td>
645
  <input type="text" style="width: 60%;" name="General[redirect1]" value="<?php echo $General['redirect1']; ?>" onChange="return CheckRedirect(this);" maxlength="250" />
646
  </td>
647
  </tr>
648
  </table>
649
+ <?php if( empty($General['redirect2']) && empty($General['redirect3']) ) { ?>
650
  <div style="position: absolute;bottom: 0px;right: 10px;font-size: 85%;" id="powerpress_redirect2_showlink">
651
+ <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect2_table').style.display='block';document.getElementById('powerpress_redirect2_showlink').style.display='none';return false;"><?php echo __('Add Another Redirect'); ?></a>
652
  </div>
653
  <?php } ?>
654
  </div>
655
 
656
+ <div id="powerpress_redirect2_table" style="position: relative;<?php if( empty($General['redirect2']) && empty($General['redirect3']) ) echo 'display:none;'; ?>">
657
  <table class="form-table">
658
  <tr valign="top">
659
  <th scope="row">
660
+ <?php echo __('Redirect URL 2'); ?>
661
  </th>
662
  <td>
663
  <input type="text" style="width: 60%;" name="General[redirect2]" value="<?php echo $General['redirect2']; ?>" onblur="return CheckRedirect(this);" maxlength="250" />
666
  </table>
667
  <?php if( $General['redirect3'] == '' ) { ?>
668
  <div style="position: absolute;bottom: 0px;right: 10px;font-size: 85%;" id="powerpress_redirect3_showlink">
669
+ <a href="javascript:void();" onclick="javascript:document.getElementById('powerpress_redirect3_table').style.display='block';document.getElementById('powerpress_redirect3_showlink').style.display='none';return false;"><?php echo __('Add Another Redirect'); ?></a>
670
  </div>
671
  <?php } ?>
672
  </div>
673
 
674
+ <div id="powerpress_redirect3_table" style="<?php if( empty($General['redirect3']) ) echo 'display:none;'; ?>">
675
  <table class="form-table">
676
  <tr valign="top">
677
  <th scope="row">
678
+ <?php echo __('Redirect URL 3'); ?>
679
  </th>
680
  <td>
681
  <input type="text" style="width: 60%;" name="General[redirect3]" value="<?php echo $General['redirect3']; ?>" onblur="return CheckRedirect(this);" maxlength="250" />
688
  border: solid 1px #3D517E;
689
  }
690
  </style>
691
+ <input type="hidden" id="hide_free_stats" name="General[hide_free_stats]" value="<?php echo (empty($General['hide_free_stats'])?0:1); ?>" />
692
 
693
+ <div id="blubrry_stats_box" style="<?php if( !empty($General['hide_free_stats']) ) echo 'display:none;'; ?>">
694
  <div style="font-family: Arial, Helvetica, sans-serif; border: solid 1px #3D517E; background-color:#D2E9FF;padding:10px; margin-left:10px;margin-right:10px;margin-top:10px;">
695
  <div style="color: #3D517E; font-weight: bold; font-size: 18px;">Free Access to the Best Media Statistics!</div>
696
  <div style="font-size: 14px;margin-top: 10px; margin-bottom: 10px;">
700
  <div style="text-align: center; font-size: 16px; font-weight: bold;"><a href="http://www.blubrry.com/addpodcast.php?feed=<?php echo urlencode(get_feed_link('podcast')); ?>" target="_blank" style="color: #3D517E;">Sign Up For Free Media Statistics Now</a></div>
701
  </div>
702
  <div style="font-size: 10px;margin-left: 10px;">
703
+ <a href="javascript:void();" onclick="javascript:document.getElementById('blubrry_stats_box').style.display='none';document.getElementById('hide_free_stats').value=1;document.getElementById('show_free_stats').style.display='block';return false;"><?php echo __('hide'); ?></a>
704
  </div>
705
  </div>
706
 
711
  &nbsp;
712
  </th>
713
  <td>
714
+ <p style="margin: 0;"><a href="javascript:void();" onclick="javascript:document.getElementById('blubrry_stats_box').style.display='block';document.getElementById('hide_free_stats').value=0;document.getElementById('show_free_stats').style.display='none';return false;"><?php echo __('Learn About Free Blubrry Statistics'); ?></a></p>
715
  </td>
716
  </tr>
717
  </table>
724
  if( $General === false )
725
  $General = powerpress_get_settings('powerpress_general');
726
  $General = powerpress_default_settings($General, 'appearance');
727
+ if( !isset($General['player_function']) )
728
+ $General['player_function'] = 1;
729
+ if( !isset($General['player_aggressive']) )
730
+ $General['player_aggressive'] = 0;
731
+ if( !isset($General['new_window_width']) )
732
+ $General['new_window_width'] = '';
733
+ if( !isset($General['new_window_height']) )
734
+ $General['new_window_height'] = '';
735
+ if( !isset($General['player_width']) )
736
+ $General['player_width'] = '';
737
+ if( !isset($General['player_height']) )
738
+ $General['player_height'] = '';
739
+ if( !isset($General['player_width_audio']) )
740
+ $General['player_width_audio'] = '';
741
+
742
 
743
+ $Players = array('podcast'=>__('Default Podcast (podcast)') );
744
  if( isset($General['custom_feeds']) )
745
  {
746
  while( list($podcast_slug, $podcast_title) = each($General['custom_feeds']) )
754
  // <input type="hidden" name="action" value="powerpress-save-appearance" />
755
  ?>
756
 
757
+ <h3><?php echo __('Appearance Settings'); ?></h3>
758
 
759
  <table class="form-table">
760
 
763
  {
764
  ?>
765
  <tr valign="top">
766
+ <th scope="row"><?php echo __('Media Presentation'); ?></th>
767
  <td><select name="General[display_player]" class="bpp_input_sm">
768
  <?php
769
+ $displayoptions = array(1=>__('Below Post'), 2=>__('Above Post'), 0=>__('None') );
770
 
771
  while( list($value,$desc) = each($displayoptions) )
772
  echo "\t<option value=\"$value\"". ($General['display_player']==$value?' selected':''). ">$desc</option>\n";
773
 
774
  ?>
775
+ </select> (<?php echo __('where player and/or links will be displayed'); ?>)
776
+ <p><input name="General[display_player_excerpt]" type="checkbox" value="1" <?php if($General['display_player_excerpt']) echo 'checked '; ?>/> <?php echo __('Display player / links in:'); ?> <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" title="<?php echo __('WordPress Excerpts'); ?>" target="_blank"><?php echo __('WordPress Excerpts'); ?></a> (<?php echo __('e.g. search results'); ?>)</p>
777
  </td>
778
  </tr>
779
 
780
  <tr valign="top">
781
  <th scope="row">
782
+ <?php echo __('Display Media Player'); ?></th>
783
  <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') );">
784
  <?php
785
+ $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') );
786
+
787
  while( list($value,$desc) = each($playeroptions) )
788
  echo "\t<option value=\"$value\"". ($General['player_function']==$value?' selected':''). ">".htmlspecialchars($desc)."</option>\n";
789
 
801
  <tr valign="top">
802
  <th scope="row">
803
 
804
+ <?php echo __('Download Link'); ?></th>
805
  <td>
806
  <select name="General[podcast_link]" class="bpp_input_med">
807
  <?php
808
+ $linkoptions = array(1=>__('Display'), 2=>__('Display with file size'), 3=>__('Display with file size and duration'), 0=>__('Disable') );
809
 
810
  while( list($value,$desc) = each($linkoptions) )
811
  echo "\t<option value=\"$value\"". ($General['podcast_link']==$value?' selected':''). ">$desc</option>\n";
823
  <tr valign="top">
824
  <th scope="row" style="background-image: url(../wp-includes/images/smilies/icon_exclaim.gif); background-position: 10px 10px; background-repeat: no-repeat; ">
825
 
826
+ <div style="margin-left: 24px;"><?php echo __('Having Theme Issues?'); ?></div></th>
827
  <td>
828
  <select name="General[player_aggressive]" class="bpp_input_med">
829
  <?php
830
+ $linkoptions = array(0=>__('No, everything is working'), 1=>__('Yes, please try to fix') );
831
+
832
  while( list($value,$desc) = each($linkoptions) )
833
  echo "\t<option value=\"$value\"". ($General['player_aggressive']==$value?' selected':''). ">$desc</option>\n";
834
 
835
  ?>
836
  </select>
837
  <p style="margin-top: 5px; margin-bottom:0;">
838
+ <?php echo __('Use this option if you are having problems with the players not appearing in your pages.'); ?>
839
  </p>
840
  </td>
841
  </tr>
842
  </table>
843
 
844
  <?php
845
+ if( !empty($General['advanced_mode']) )
846
  {
847
  ?>
848
  <div id="new_window_settings" style="display: <?php echo ( $General['player_function']==1 || $General['player_function']==3 ?'block':'none'); ?>">
849
+ <h3><?php echo __('Play in New Window Settings'); ?></h3>
850
  <table class="form-table">
851
 
852
  <tr valign="top">
853
  <th scope="row">
854
+ <?php echo __('New Window Width'); ?>
855
  </th>
856
  <td>
857
  <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" />
858
+ <?php echo __('Width of new window (leave blank for 320 default)'); ?>
859
  </td>
860
  </tr>
861
 
862
  <tr valign="top">
863
  <th scope="row">
864
+ <?php echo __('New Window Height'); ?>
865
  </th>
866
  <td>
867
  <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" />
868
+ <?php echo __('Height of new window (leave blank for 240 default)'); ?>
869
  </td>
870
  </tr>
871
  </table>
874
  }
875
  ?>
876
 
877
+ <h3><?php echo __('Video Player Settings'); ?></h3>
878
 
879
  <table class="form-table">
880
  <tr valign="top">
881
  <th scope="row">
882
+ <?php echo __('Player Width'); ?>
883
  </th>
884
  <td>
885
  <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" />
886
+ <?php echo __('Width of player (leave blank for 320 default)'); ?>
887
  </td>
888
  </tr>
889
 
890
  <tr valign="top">
891
  <th scope="row">
892
+ <?php echo __('Player Height'); ?>
893
  </th>
894
  <td>
895
  <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" />
896
+ <?php echo __('Height of player (leave blank for 240 default)'); ?>
897
  </td>
898
  </tr>
899
 
900
  <tr valign="top">
901
  <th scope="row">
902
+ <?php echo __('QuickTime Scale'); ?></th>
903
  <td>
904
  <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' ))">
905
  <?php
906
+ $scale_options = array('tofit'=>__('ToFit (default)'), 'aspect'=>__('Aspect') );
907
  if( !isset($General['player_scale']) )
908
  $General['player_scale'] = 'tofit'; // Tofit works in almost all cases
909
 
910
  if( is_numeric($General['player_scale']) )
911
+ $scale_options[ $General['player_scale'] ]= __('Custom');
912
  else
913
+ $scale_options['custom']= __('Custom');
914
 
915
 
916
 
920
  ?>
921
  </select>
922
  <span id="player_scale_custom" style="display: <?php echo (is_numeric($General['player_scale'])?'inline':'none'); ?>">
923
+ <?php echo __('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" /> <?php echo __('e.g.'); ?> 1.5
924
  </span>
925
  <p style="margin-top: 5px; margin-bottom: 0;">
926
+ <?php echo __('If you do not see video, adjust the width, height and scale settings above.'); ?>
927
  </p>
928
  </td>
929
  </tr>
930
 
931
  </table>
932
 
933
+ <h3><?php echo __('Audio Player Settings'); ?></h3>
934
  <table class="form-table">
935
  <tr valign="top">
936
  <th scope="row">
937
+ <?php echo __('Default Player Width'); ?>
938
  </th>
939
  <td>
940
  <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" />
941
+ <?php echo __('Width of Audio mp3 player (leave blank for 320 default)'); ?>
942
  </td>
943
  </tr>
944
  </table>
powerpressadmin-categoryfeeds.php CHANGED
@@ -5,10 +5,9 @@ if( !function_exists('add_action') )
5
 
6
  function powerpress_admin_customfeeds_columns($data=array())
7
  {
8
- $data['name'] = 'Category Name';
9
- $data['feed-slug'] = 'Slug';
10
- //$data['episode-count'] = 'Episodes';
11
- $data['url'] = 'Feed URL';
12
  return $data;
13
  }
14
 
@@ -17,20 +16,16 @@ add_filter('manage_powerpressadmin_categoryfeeds_columns', 'powerpress_admin_cus
17
  function powerpress_admin_categoryfeeds()
18
  {
19
  $General = powerpress_get_settings('powerpress_general');
20
-
21
-
22
  ?>
23
- <h2><?php echo __("Category Podcasting"); ?></h2>
24
  <p>
25
- Category Podcasting adds custom podcast settings to specific blog category feeds.
26
- Category Podcasting allows you to organize episodes by topic.
27
  </p>
28
  <p>
29
- If you are looking to organize episodes by file or format, please use <a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php'); ?>" title="Custom Podcast Feeds">Custom Podcast Feeds</a>.
30
- </p>
31
-
32
- <style type="text/css">
33
-
34
  .column-url {
35
  width: 40%;
36
  }
@@ -51,16 +46,16 @@ function powerpress_admin_categoryfeeds()
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
  ?>
@@ -77,9 +72,9 @@ function powerpress_admin_categoryfeeds()
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
  ?>
@@ -101,9 +96,7 @@ function powerpress_admin_categoryfeeds()
101
 
102
  $columns = powerpress_admin_customfeeds_columns();
103
  $hidden = array();
104
- if( $feed_slug == 'podcast' )
105
- $feed_title = 'Podcast Feed (default)';
106
- $feed_title = wp_specialchars($feed_title);
107
  if( $count % 2 == 0 )
108
  echo '<tr valign="middle" class="alternate">';
109
  else
@@ -183,7 +176,7 @@ function powerpress_admin_categoryfeeds()
183
  <div id="col-left">
184
  <div class="col-wrap">
185
  <div class="form-wrap">
186
- <h3><?php _e('Add Podcast Settings to existing Category Feed'); ?></h3>
187
  <input type="hidden" name="action" value="powerpress-addcategoryfeed" />
188
  <?php
189
  //wp_original_referer_field(true, 'previous');
@@ -191,9 +184,9 @@ function powerpress_admin_categoryfeeds()
191
  ?>
192
 
193
  <div class="form-field form-required">
194
- <label for="feed_name"><?php _e('Category') ?></label>
195
  <select name="cat" id="cat_id" style="width: 100%;">
196
- <option value="">Select Category</option>
197
  <?php
198
  wp_dropdown_cats();
199
  ?>
@@ -201,7 +194,7 @@ function powerpress_admin_categoryfeeds()
201
 
202
  </div>
203
 
204
- <p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Podcast Settings to Category Feed'); ?>" /></p>
205
 
206
  </div>
207
  </div>
@@ -210,14 +203,12 @@ function powerpress_admin_categoryfeeds()
210
 
211
  </div> <!-- col-container -->
212
 
213
- <h3>Example Usage</h3>
214
  <p>
215
- Example 1: You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics
216
- and use category feeds to distribute topic specific episodes.
217
  </p>
218
  <p>
219
- Example 2: You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed
220
- combining all categories to provide a network feed.
221
  </p>
222
 
223
  <?php
5
 
6
  function powerpress_admin_customfeeds_columns($data=array())
7
  {
8
+ $data['name'] = __('Category Name');
9
+ $data['feed-slug'] = __('Slug');
10
+ $data['url'] = __('Feed URL');
 
11
  return $data;
12
  }
13
 
16
  function powerpress_admin_categoryfeeds()
17
  {
18
  $General = powerpress_get_settings('powerpress_general');
19
+
 
20
  ?>
21
+ <h2><?php echo __('Category Podcasting'); ?></h2>
22
  <p>
23
+ <?php echo __('Category Podcasting adds custom podcast settings to specific blog category feeds, allowing you to organize episodes by topic.'); ?>
 
24
  </p>
25
  <p>
26
+ <?php echo sprintf( __('If you are looking to organize episodes by file or format, please use %s.'),
27
+ '<a href="'. admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php') .'" title="'. __('Custom Podcast Channels') .'">'. __('Custom Podcast Channels') .'</a>'); ?>
28
+ </p>'<style type="text/css">
 
 
29
  .column-url {
30
  width: 40%;
31
  }
46
  <thead>
47
  <tr>
48
  <?php
49
+ if( function_exists('print_column_headers') )
50
  {
51
  print_column_headers('powerpressadmin_categoryfeeds');
52
  }
53
  else
54
  {
55
  ?>
56
+ <th scope="col" id="name" class="manage-column column-name"><?php echo __('Category Name'); ?></th>
57
+ <th scope="col" id="feed-slug" class="manage-column column-feed-slug"><?php echo __('Slug'); ?></th>
58
+ <th scope="col" id="url" class="manage-column column-url"><?php echo __('Feed URL'); ?></th>
59
  <?php
60
  }
61
  ?>
72
  else // WordPress 2.6 or older
73
  {
74
  ?>
75
+ <th scope="col" class="manage-column column-name"><?php echo __('Category Name'); ?></th>
76
+ <th scope="col" class="manage-column column-feed-slug"><?php echo __('Slug'); ?></th>
77
+ <th scope="col" class="manage-column column-url"><?php echo __('Feed URL'); ?></th>
78
  <?php
79
  }
80
  ?>
96
 
97
  $columns = powerpress_admin_customfeeds_columns();
98
  $hidden = array();
99
+
 
 
100
  if( $count % 2 == 0 )
101
  echo '<tr valign="middle" class="alternate">';
102
  else
176
  <div id="col-left">
177
  <div class="col-wrap">
178
  <div class="form-wrap">
179
+ <h3><?php echo __('Add Podcast Settings to existing Category Feed'); ?></h3>
180
  <input type="hidden" name="action" value="powerpress-addcategoryfeed" />
181
  <?php
182
  //wp_original_referer_field(true, 'previous');
184
  ?>
185
 
186
  <div class="form-field form-required">
187
+ <label for="feed_name"><?php echo __('Category') ?></label>
188
  <select name="cat" id="cat_id" style="width: 100%;">
189
+ <option value=""><?php echo __('Select Category'); ?></option>
190
  <?php
191
  wp_dropdown_cats();
192
  ?>
194
 
195
  </div>
196
 
197
+ <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo __('Add Podcast Settings to Category Feed'); ?>" /></p>
198
 
199
  </div>
200
  </div>
203
 
204
  </div> <!-- col-container -->
205
 
206
+ <h3><?php echo __('Example Usage'); ?></h3>
207
  <p>
208
+ <?php echo __('Example 1: You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics and use category feeds to distribute topic specific episodes.'); ?>
 
209
  </p>
210
  <p>
211
+ <?php echo __('Example 2: You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed combining all categories to provide a network feed.'); ?>
 
212
  </p>
213
 
214
  <?php
powerpressadmin-customfeeds.php CHANGED
@@ -5,10 +5,10 @@ if( !function_exists('add_action') )
5
 
6
  function powerpress_admin_customfeeds_columns($data=array())
7
  {
8
- $data['name'] = 'Name';
9
- $data['feed-slug'] = 'Slug';
10
- $data['episode-count'] = 'Episodes';
11
- $data['url'] = 'URL';
12
  return $data;
13
  }
14
 
@@ -20,12 +20,13 @@ function powerpress_admin_customfeeds()
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>.
 
29
  </p>
30
 
31
  <style type="text/css">
@@ -57,10 +58,10 @@ function powerpress_admin_customfeeds()
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
  ?>
@@ -77,10 +78,10 @@ function powerpress_admin_customfeeds()
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
  ?>
@@ -90,7 +91,7 @@ function powerpress_admin_customfeeds()
90
  <?php
91
 
92
 
93
- $Feeds = array('podcast'=>'Podcast Feed');
94
  if( isset($General['custom_feeds']['podcast']) )
95
  $Feeds = $General['custom_feeds'];
96
  else if( is_array($General['custom_feeds']) )
@@ -105,7 +106,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 +137,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>'. ( $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&amp;action=powerpress-delete-feed&amp;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 +186,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 Channel'); ?></h3>
189
  <div id="ajax-response"></div>
190
  <input type="hidden" name="action" value="powerpress-addfeed" />
191
  <?php
@@ -194,18 +195,18 @@ function powerpress_admin_customfeeds()
194
  ?>
195
 
196
  <div class="form-field form-required">
197
- <label for="feed_name"><?php _e('Feed Name') ?></label>
198
  <input name="feed_name" id="feed_name" type="text" value="" size="40" />
199
  <p><?php _e('The name is used for use within the administration area only.'); ?></p>
200
  </div>
201
 
202
  <div class="form-field">
203
- <label for="feed_slug"><?php _e('Feed Slug') ?></label>
204
  <input name="feed_slug" id="feed_slug" type="text" value="" size="40" />
205
- <p><?php _e('The &#8220;slug&#8221; 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>
@@ -214,18 +215,15 @@ function powerpress_admin_customfeeds()
214
 
215
  </div> <!-- col-container -->
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
5
 
6
  function powerpress_admin_customfeeds_columns($data=array())
7
  {
8
+ $data['name'] = __('Name');
9
+ $data['feed-slug'] = __('Slug');
10
+ $data['episode-count'] = __('Episodes');
11
+ $data['url'] = __('URL');
12
  return $data;
13
  }
14
 
20
 
21
 
22
  ?>
23
+ <h2><?php echo __('Custom Podcast Channels'); ?></h2>
24
  <p>
25
+ <?php echo __('Custom podcast Channels allow you to associate multiple media files and/or formats to one blog post.'); ?>
26
  </p>
27
  <p>
28
+ <?php echo sprintf( __('If you are looking to organize episodes by topic, please use %s.'),
29
+ '<a href="'. admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php') .'" title="'. __('Category Podcast Feeds') .'">'. __('Category Podcast Feeds') .'</a>'); ?>
30
  </p>
31
 
32
  <style type="text/css">
58
  else // WordPress 2.6 or older
59
  {
60
  ?>
61
+ <th scope="col" id="name" class="manage-column column-name"><?php echo __('Name'); ?></th>
62
+ <th scope="col" id="feed-slug" class="manage-column column-feed-slug"><?php echo __('Slug'); ?></th>
63
+ <th scope="col" id="episode-count" class="manage-column column-episode-count"><?php echo __('Episodes'); ?></th>
64
+ <th scope="col" id="url" class="manage-column column-url"><?php echo __('URL'); ?></th>
65
  <?php
66
  }
67
  ?>
78
  else // WordPress 2.6 or older
79
  {
80
  ?>
81
+ <th scope="col" class="manage-column column-name"><?php echo __('Name'); ?></th>
82
+ <th scope="col" class="manage-column column-feed-slug"><?php echo __('Slug'); ?></th>
83
+ <th scope="col" class="manage-column column-episode-count"><?php echo __('Episodes'); ?></th>
84
+ <th scope="col" class="manage-column column-url"><?php echo __('URL'); ?></th>
85
  <?php
86
  }
87
  ?>
91
  <?php
92
 
93
 
94
+ $Feeds = array('podcast'=>__('Podcast Feed') );
95
  if( isset($General['custom_feeds']['podcast']) )
96
  $Feeds = $General['custom_feeds'];
97
  else if( is_array($General['custom_feeds']) )
106
  $columns = powerpress_admin_customfeeds_columns();
107
  $hidden = array();
108
  if( $feed_slug == 'podcast' )
109
+ $feed_title = __('Podcast Feed');
110
  $feed_title = wp_specialchars($feed_title);
111
  if( $count % 2 == 0 )
112
  echo '<tr valign="middle" class="alternate">';
137
  }; break;
138
  case 'name': {
139
 
140
+ 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 />';
141
  $actions = array();
142
  $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
143
  $actions['delete'] = "<a class='submitdelete' href='". admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_customfeeds.php&amp;action=powerpress-delete-feed&amp;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>";
186
  <div id="col-left">
187
  <div class="col-wrap">
188
  <div class="form-wrap">
189
+ <h3><?php echo __('Add Podcast Channel'); ?></h3>
190
  <div id="ajax-response"></div>
191
  <input type="hidden" name="action" value="powerpress-addfeed" />
192
  <?php
195
  ?>
196
 
197
  <div class="form-field form-required">
198
+ <label for="feed_name"><?php echo __('Feed Name') ?></label>
199
  <input name="feed_name" id="feed_name" type="text" value="" size="40" />
200
  <p><?php _e('The name is used for use within the administration area only.'); ?></p>
201
  </div>
202
 
203
  <div class="form-field">
204
+ <label for="feed_slug"><?php echo __('Feed Slug') ?></label>
205
  <input name="feed_slug" id="feed_slug" type="text" value="" size="40" />
206
+ <p><?php echo __('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
207
  </div>
208
 
209
+ <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo __('Add Podcast Channel'); ?>" /></p>
210
 
211
  </div>
212
  </div>
215
 
216
  </div> <!-- col-container -->
217
 
218
+ <h3><?php echo __('Example Usage'); ?></h3>
219
  <p>
220
+ <?php echo __('Example 1: You want to distribute both an mp3 and an ogg version of your podcast. Use the default podcast channel for your mp3 media and create a custom channel for your ogg media.'); ?>
 
221
  </p>
222
  <p>
223
+ <?php echo __('Example 2: You have a video podcast with multiple file formats. Use the default podcast channel for the main media that you want to appear on your blog (e.g. m4v). Create additional channels for the remaining formats (e.g. wmv, mov, mpeg).'); ?>
 
224
  </p>
225
  <p>
226
+ <?php echo __('Example 3: You create two versions of your podcast, a 20 minute summary and a full 2 hour episode. Use the default channel for your 20 minute summary episodes and create a new custom channels for your full length episodes.'); ?>
 
227
  </p>
228
 
229
  <?php
powerpressadmin-dashboard.php CHANGED
@@ -72,8 +72,12 @@ function powerpress_dashboard_stats_content()
72
  {
73
  if( !$UserPass )
74
  {
75
- $content = '<p>Wait a sec! This feature is only available to Blubrry Podcast Community members. Join our community to get free podcast statistics and access to other valuable <a href="http://www.blubrry.com/powerpress_services/" target="_blank">services</a>.</p>
76
- <p>Our <a href="http://www.blubrry.com/powerpress_services/" target="_blank">podcast-hosting</a> integrated PowerPress makes podcast publishing simple. Check out the <a href="http://www.blubrry.com/powerpress_services/" target="_blank">video</a> on our exciting three-step publishing system!</p>';
 
 
 
 
77
  }
78
  else
79
  {
@@ -83,24 +87,19 @@ function powerpress_dashboard_stats_content()
83
  if( $content )
84
  update_option('powerpress_stats', array('updated'=>time(), 'content'=>$content) );
85
  else
86
- $content = 'Error: An error occurred authenticating user.';
87
  }
88
  }
89
  ?>
90
  <div>
91
  <?php
92
- //$content = http_get('http://api.blubrry.local/stats/compiled_weekly2/summary.html?year=2008&month=7', 'amandato@gmail.com', 'testit');
93
-
94
- //$decoded = my_json_decode($content['data'], true);
95
- //print_r( $content );
96
  echo $content;
97
- //echo 'Podcast Statistics go here.';
98
 
99
  if( $UserPass )
100
  {
101
  ?>
102
  <div id="blubrry_stats_media_show">
103
- <a href="<?php echo admin_url(); ?>?action=powerpress-jquery-stats&amp;KeepThis=true&amp;TB_iframe=true&amp;modal=true" title="Blubrry Media statistics" class="thickbox">more</a>
104
  </div>
105
  <?php } ?>
106
  </div>
72
  {
73
  if( !$UserPass )
74
  {
75
+ $content = sprintf('<p>'. __('Wait a sec! This feature is only available to Blubrry Podcast Community members. Join our community to get free podcast statistics and access to other valuable %s.') .'</p>',
76
+ '<a href="http://www.blubrry.com/powerpress_services/" target="_blank">'. __('Services') . '</a>' );
77
+ $content .= ' ';
78
+ $content .= sprintf('<p>'. __('Our %s integrated PowerPress makes podcast publishing simple. Check out the %s on our exciting three-step publishing system!') .'</p>',
79
+ '<a href="http://www.blubrry.com/powerpress_services/" target="_blank">'. __('Podcast Hosting') .'</a>',
80
+ '<a href="http://www.blubrry.com/powerpress_services/" target="_blank">'. __('Video') .'</a>' );
81
  }
82
  else
83
  {
87
  if( $content )
88
  update_option('powerpress_stats', array('updated'=>time(), 'content'=>$content) );
89
  else
90
+ $content = __('Error: An error occurred authenticating user.');
91
  }
92
  }
93
  ?>
94
  <div>
95
  <?php
 
 
 
 
96
  echo $content;
 
97
 
98
  if( $UserPass )
99
  {
100
  ?>
101
  <div id="blubrry_stats_media_show">
102
+ <a href="<?php echo admin_url(); ?>?action=powerpress-jquery-stats&amp;KeepThis=true&amp;TB_iframe=true&amp;modal=true" title="<?php echo __('Blubrry Media statistics'); ?>" class="thickbox"><?php echo __('more'); ?></a>
103
  </div>
104
  <?php } ?>
105
  </div>
powerpressadmin-diagnostics.php CHANGED
@@ -20,9 +20,9 @@
20
 
21
  if( $powerpress_diags['detecting_media']['curl'] )
22
  {
23
- $powerpress_diags['detecting_media']['message'] = 'Your web server supports the PHP cURL library.';
24
  if( $powerpress_diags['detecting_media']['allow_url_fopen'] )
25
- $powerpress_diags['detecting_media']['message'] .= ' '. 'Your web server is also configured with the php.ini setting \'allow_url_fopen\' enabled, but the cURL library takes precedence.';
26
 
27
  if( ini_get('safe_mode') && ini_get('open_basedir') )
28
  {
@@ -42,7 +42,7 @@
42
  }
43
  else if( $powerpress_diags['detecting_media']['allow_url_fopen'] )
44
  {
45
- $powerpress_diags['detecting_media']['message'] = 'Your web server is configured with the php.ini setting \'allow_url_fopen\' enabled.';
46
  }
47
  else
48
  {
@@ -205,7 +205,7 @@
205
  if( $total > 0 && ($used + 4) > $total )
206
  {
207
  $powerpress_diags['system_info']['warning'] = true;
208
- $powerpress_diags['system_info']['message2'] = __('Warning: ') . $powerpress_diags['system_info']['message2'];
209
  $powerpress_diags['system_info']['message2'] .= ' ';
210
  $powerpress_diags['system_info']['message2'] .= sprintf(__('We recommend that you have at least %dM (4M more that what is currently used) or more memory to accomodate all of your installed plugins.'), ceil($used)+4 );
211
  }
@@ -225,59 +225,81 @@
225
  $SettingsGeneral = get_option('powerpress_general');
226
 
227
  // First we need some basic information about the blog...
228
- $message = 'Blog Title: ' . get_bloginfo('name') . "\n";
229
- $message .= 'Blog URL: ' . get_bloginfo('home') . "\n";
230
- $message .= 'WordPress Version: ' . $wp_version . "\n";
231
  if( !empty($wpmu_version) )
232
- $message .= 'WordPress MU Version: ' . $wpmu_version . "\n";
233
- $message .= 'System: '. $_SERVER['SERVER_SOFTWARE'] . "\n";
234
- $message .= 'Safe node: '. ( ini_get('safe_mode')?'true':'false') ."\n";
235
- $message .= 'Open basedir: '. ini_get('open_basedir') ."\n";
236
 
237
  // Crutial PowerPress Settings
238
- $message .= "\n";
239
- $message .= "Important PowerPress Settings...\n";
240
- $message .= "\tpowerpress version: ". POWERPRESS_VERSION ."\n";
241
- $message .= "\tadvanced mode: ". ($SettingsGeneral['advanced_mode']?'true':'false') ."\n";
242
- $message .= "\tepisode box mode: ". ($SettingsGeneral['episode_box_mode']==0?'normal': ($SettingsGeneral['episode_box_mode']==1?'simple':'advanced') ) ."\n";
243
 
244
  // Detecting Media Information
245
- $message .= "\n";
246
- $message .= "Detecting Media Information...\n";
247
- $message .= "\tsuccess: ". ($powerpress_diags['detecting_media']['success']?'true':'false') ."\n";
248
- $message .= "\twarning: ". ($powerpress_diags['detecting_media']['warning']?'true':'false') ."\n";
249
- $message .= "\tallow_url_fopen: ". ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false') ."\n";
250
- $message .= "\tcurl: ". ($powerpress_diags['detecting_media']['curl']?'true':'false') ."\n";
251
- $message .= "\tmessage: ". $powerpress_diags['detecting_media']['message'] ."\n";
252
- $message .= "\tmessage 2: ". $powerpress_diags['detecting_media']['message2'] ."\n";
253
 
254
  // Pinging iTunes
255
- $message .= "\n";
256
- $message .= "Pinging iTunes...\n";
257
- $message .= "\tsuccess: ". ($powerpress_diags['pinging_itunes']['success']?'true':'false') ."\n";
258
- $message .= "\tcurl_ssl: ". ($powerpress_diags['pinging_itunes']['curl_ssl']?'true':'false') ."\n";
259
- $message .= "\topenssl: ". ($powerpress_diags['pinging_itunes']['openssl']?'true':'false') ."\n";
260
- $message .= "\tmessage: ". $powerpress_diags['pinging_itunes']['message'] ."\n";
261
 
262
  // Uploading Artwork
263
- $message .= "\n";
264
- $message .= "Uploading Artwork...\n";
265
- $message .= "\tsuccess: ". ($powerpress_diags['uploading_artwork']['success']?'true':'false') ."\n";
266
- $message .= "\tfile_uploads: ". ($powerpress_diags['uploading_artwork']['file_uploads']?'true':'false') ."\n";
267
- $message .= "\twritable: ". ($powerpress_diags['uploading_artwork']['writable']?'true':'false') ."\n";
268
- $message .= "\tupload_path: ". $powerpress_diags['uploading_artwork']['upload_path'] ."\n";
269
- $message .= "\tmessage: ". $powerpress_diags['uploading_artwork']['message'] ."\n";
270
 
271
  // System Information
272
- $message .= "\n";
273
- $message .= "System Information...\n";
274
- $message .= "\tsuccess: ". ($powerpress_diags['system_info']['success']?'true':'false') ."\n";
275
- $message .= "\twarning: ". ($powerpress_diags['system_info']['warning']?'yes':'no') ."\n";
276
- $message .= "\tphp_version: ". $powerpress_diags['system_info']['php_version'] ."\n";
277
- $message .= "\tmemory_limit: ". $powerpress_diags['system_info']['memory_limit'] ."M\n";
278
- $message .= "\tmemory_used: ". sprintf('%.01fM',$powerpress_diags['system_info']['memory_used']) ."\n";
279
- $message .= "\tmessage: ". $powerpress_diags['system_info']['message'] ."\n";
280
- $message .= "\tmessage 2: ". $powerpress_diags['system_info']['message2'] ."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
 
282
  // Now lets loop through each section of diagnostics
283
  $user_info = wp_get_current_user();
@@ -288,8 +310,9 @@
288
  .'Return-Path: "'.$from_name.'" <'.$from_email.'>'."\n";
289
  if( isset($_GET['CC']) )
290
  $headers .= 'CC: "'.$from_name.'" <'.$from_email.'>'."\n";
 
291
 
292
- @wp_mail($email, __('Blubrry PowerPress diagnostic results for '). get_bloginfo('name'), $message, $headers);
293
  }
294
 
295
  function powerpressadmin_diagnostics_is_writable($dir)
@@ -337,14 +360,14 @@
337
  }
338
  ?>
339
 
340
- <h2><?php echo __("Blubrry PowerPress Diagnostics"); ?></h2>
341
  <p>
342
  <?php echo __('The Diagnostics page checks to see if your server is configured to support all of the available features in Blubrry PowerPress.'); ?>
343
  </p>
344
 
345
- <h3 style="margin-bottom: 0;">Detecting Media Information</h3>
346
- <p style="margin: 0;">The following test checks to see if your web server can make connections with other web servers to obtain file size and media duration information.
347
- The test checks to see if either the PHP cURL library is installed or the php.ini setting 'allow_url_fopen' enabled.
348
  </p>
349
  <table class="form-table">
350
  <tr valign="top">
@@ -364,8 +387,8 @@
364
  </tr>
365
  </table>
366
 
367
- <h3 style="margin-bottom: 0;"><?php echo __("Pinging iTunes"); ?></h3>
368
- <p style="margin: 0;">The following test checks to see that your web server can make connections with Apple's secure ping server.</p>
369
  <table class="form-table">
370
  <tr valign="top">
371
  <th scope="row">
@@ -381,7 +404,7 @@
381
  </table>
382
 
383
  <h3 style="margin-bottom: 0;"><?php echo __("Uploading Artwork"); ?></h3>
384
- <p style="margin: 0;">The following test checks to see that you can upload and store files on your web server.</p>
385
  <table class="form-table">
386
  <tr valign="top">
387
  <th scope="row">
@@ -393,8 +416,8 @@
393
  </tr>
394
  </table>
395
 
396
- <h3 style="margin-bottom: 0;"><?php echo __("System Information"); ?></h3>
397
- <p style="margin: 0;">The following test checks your version of PHP and memory usage.</p>
398
  <table class="form-table">
399
  <tr valign="top">
400
  <th scope="row">
@@ -418,12 +441,12 @@
418
  wp_nonce_field('powerpress-diagnostics');
419
  ?>
420
 
421
- <h3 style="margin-bottom: 0;"><?php echo __("Email Results"); ?></h3>
422
- <p style="margin: 0;">Send the results above to the specified Email address.</p>
423
  <table class="form-table">
424
  <tr valign="top">
425
  <th scope="row">
426
- Email
427
  </th>
428
  <td>
429
  <div style="margin-top: 5px;">
@@ -433,6 +456,9 @@
433
  <div>
434
  <input type="checkbox" name="CC" value="1" style="vertical-align: text-top;" checked /> CC: <?php $user_info = wp_get_current_user(); echo "&quot;{$user_info->user_nicename}&quot; &lt;{$user_info->user_email}&gt;"; ?>
435
  </div>
 
 
 
436
  </td>
437
  </tr>
438
  </table>
20
 
21
  if( $powerpress_diags['detecting_media']['curl'] )
22
  {
23
+ $powerpress_diags['detecting_media']['message'] = __('Your web server supports the PHP cURL library.');
24
  if( $powerpress_diags['detecting_media']['allow_url_fopen'] )
25
+ $powerpress_diags['detecting_media']['message'] .= ' '. __('Your web server is also configured with the php.ini setting \'allow_url_fopen\' enabled, but the cURL library takes precedence.');
26
 
27
  if( ini_get('safe_mode') && ini_get('open_basedir') )
28
  {
42
  }
43
  else if( $powerpress_diags['detecting_media']['allow_url_fopen'] )
44
  {
45
+ $powerpress_diags['detecting_media']['message'] = __('Your web server is configured with the php.ini setting \'allow_url_fopen\' enabled.');
46
  }
47
  else
48
  {
205
  if( $total > 0 && ($used + 4) > $total )
206
  {
207
  $powerpress_diags['system_info']['warning'] = true;
208
+ $powerpress_diags['system_info']['message2'] = __('Warning:') .' '. $powerpress_diags['system_info']['message2'];
209
  $powerpress_diags['system_info']['message2'] .= ' ';
210
  $powerpress_diags['system_info']['message2'] .= sprintf(__('We recommend that you have at least %dM (4M more that what is currently used) or more memory to accomodate all of your installed plugins.'), ceil($used)+4 );
211
  }
225
  $SettingsGeneral = get_option('powerpress_general');
226
 
227
  // First we need some basic information about the blog...
228
+ $message = __('Blog Title:') .' '. get_bloginfo('name') . "<br />\n";
229
+ $message .= __('Blog URL:') .' '. get_bloginfo('home') . "<br />\n";
230
+ $message .= __('WordPress Version:') .' '. $wp_version . "<br />\n";
231
  if( !empty($wpmu_version) )
232
+ $message .= __('WordPress MU Version:') .' '. $wpmu_version . "<br />\n";
233
+ $message .= __('System:') .' '. $_SERVER['SERVER_SOFTWARE'] . "<br />\n";
234
+ $message .= __('Safe node:') .' '. ( ini_get('safe_mode')?'true':'false') ."<br />\n";
235
+ $message .= __('Open basedir:') .' '. ini_get('open_basedir') ."<br />\n";
236
 
237
  // Crutial PowerPress Settings
238
+ $message .= "<br />\n";
239
+ $message .= '<strong>'. __('Important PowerPress Settings') ."</strong><br />\n";
240
+ $message .= " &nbsp; \t &nbsp; ". __('PowerPress version:') .' '. POWERPRESS_VERSION ."<br />\n";
241
+ $message .= " &nbsp; \t &nbsp; ". __('advanced mode:') .' '. ($SettingsGeneral['advanced_mode']?'true':'false') ."<br />\n";
242
+ $message .= " &nbsp; \t &nbsp; ". __('episode box mode:') .' '. ($SettingsGeneral['episode_box_mode']==0?__('normal'): ($SettingsGeneral['episode_box_mode']==1?__('simple'):__('advanced')) ) ."<br />\n";
243
 
244
  // Detecting Media Information
245
+ $message .= "<br />\n";
246
+ $message .= '<strong>'.__('Detecting Media Information') ."</strong><br />\n";
247
+ $message .= " &nbsp; \t &nbsp; ". __('success:') .' '. ($powerpress_diags['detecting_media']['success']?'true':'false') ."<br />\n";
248
+ $message .= " &nbsp; \t &nbsp; ". __('warning:') .' '. ($powerpress_diags['detecting_media']['warning']?'true':'false') ."<br />\n";
249
+ $message .= " &nbsp; \t &nbsp; ". __('allow_url_fopen:') .' '. ($powerpress_diags['detecting_media']['allow_url_fopen']?'true':'false') ."<br />\n";
250
+ $message .= " &nbsp; \t &nbsp; ". __('curl:') .' '. ($powerpress_diags['detecting_media']['curl']?'true':'false') ."<br />\n";
251
+ $message .= " &nbsp; \t &nbsp; ". __('message:') .' '. $powerpress_diags['detecting_media']['message'] ."<br />\n";
252
+ $message .= " &nbsp; \t &nbsp; ". __('message 2:') .' '. $powerpress_diags['detecting_media']['message2'] ."<br />\n";
253
 
254
  // Pinging iTunes
255
+ $message .= "<br />\n";
256
+ $message .= '<strong>'.__('Pinging iTunes') ."</strong><br />\n";
257
+ $message .= " &nbsp; \t &nbsp; ". __('success:') .' '. ($powerpress_diags['pinging_itunes']['success']?'true':'false') ."<br />\n";
258
+ $message .= " &nbsp; \t &nbsp; ". __('curl_ssl:') .' '. ($powerpress_diags['pinging_itunes']['curl_ssl']?'true':'false') ."<br />\n";
259
+ $message .= " &nbsp; \t &nbsp; ". __('openssl:') .' '. ($powerpress_diags['pinging_itunes']['openssl']?'true':'false') ."<br />\n";
260
+ $message .= " &nbsp; \t &nbsp; ". __('message:') .' '. $powerpress_diags['pinging_itunes']['message'] ."<br />\n";
261
 
262
  // Uploading Artwork
263
+ $message .= "<br />\n";
264
+ $message .= '<strong>'.__('Uploading Artwork') ."</strong><br />\n";
265
+ $message .= " &nbsp; \t &nbsp; ". __('success:') .' '. ($powerpress_diags['uploading_artwork']['success']?'true':'false') ."<br />\n";
266
+ $message .= " &nbsp; \t &nbsp; ". __('file_uploads:') .' '. ($powerpress_diags['uploading_artwork']['file_uploads']?'true':'false') ."<br />\n";
267
+ $message .= " &nbsp; \t &nbsp; ". __('writable:') .' '. ($powerpress_diags['uploading_artwork']['writable']?'true':'false') ."<br />\n";
268
+ $message .= " &nbsp; \t &nbsp; ". __('upload_path:') .' '. $powerpress_diags['uploading_artwork']['upload_path'] ."<br />\n";
269
+ $message .= " &nbsp; \t &nbsp; ". __('message:') .' '. $powerpress_diags['uploading_artwork']['message'] ."<br />\n";
270
 
271
  // System Information
272
+ $message .= "<br />\n";
273
+ $message .= '<strong>'.__('System Information') ."</strong><br />\n";
274
+ $message .= " &nbsp; \t &nbsp; ". __('success:') .' '. ($powerpress_diags['system_info']['success']?'true':'false') ."<br />\n";
275
+ $message .= " &nbsp; \t &nbsp; ". __('warning:') .' '. ($powerpress_diags['system_info']['warning']?'yes':'no') ."<br />\n";
276
+ $message .= " &nbsp; \t &nbsp; ". __('php_version:') .' '. $powerpress_diags['system_info']['php_version'] ."<br />\n";
277
+ $message .= " &nbsp; \t &nbsp; ". __('memory_limit:') .' '. $powerpress_diags['system_info']['memory_limit'] ."M\n";
278
+ $message .= " &nbsp; \t &nbsp; ". __('memory_used:') .' '. sprintf('%.01fM',$powerpress_diags['system_info']['memory_used']) ."<br />\n";
279
+ $message .= " &nbsp; \t &nbsp; ". __('message:') .' '. $powerpress_diags['system_info']['message'] ."<br />\n";
280
+ $message .= " &nbsp; \t &nbsp; ". __('message 2:') .' '. $powerpress_diags['system_info']['message2'] ."<br />\n";
281
+
282
+ if( isset($_GET['ap']) && $_GET['ap'] )
283
+ {
284
+ $current_plugins = get_option('active_plugins');
285
+ $message .= "<br />\n";
286
+ $message .= '<strong>'.__('Active Plugins') ."</strong><br />\n";
287
+ while( list($null,$plugin_path) = each($current_plugins) )
288
+ {
289
+ $plugin_data = get_plugin_data( rtrim(WP_PLUGIN_DIR, '/'). '\\/'. rtrim($plugin_path, '\\/'), false, false ); //Do not apply markup/translate as it'll be cached.
290
+
291
+ $message .= " &nbsp; \t &nbsp; " . __('Title:') .' '. $plugin_data['Title']. "<br />\n";
292
+ $message .= " &nbsp; \t &nbsp; " . __('Relative Path:') .' '. $plugin_path. "<br />\n";
293
+ $message .= " &nbsp; \t &nbsp; " . __('Version:') .' '. $plugin_data['Version']. "<br />\n";
294
+ $message .= " &nbsp; \t &nbsp; " . __('Web Site:') .' '. $plugin_data['PluginURI']. "<br />\n";
295
+ //$message .= " &nbsp; \t &nbsp; " . __('Description:') .' '. $plugin_data['Description']. "<br />\n";
296
+ //$message .= " &nbsp; \t &nbsp; " . __('Author Name:') .' '. $plugin_data['Author']. "<br />\n";
297
+ //$message .= " &nbsp; \t &nbsp; " . __('Author Web Site:') .' '. $plugin_data['AuthorURI']. "<br />\n";
298
+ //print_r($plugin_data);
299
+ $message .= "<br />\n";
300
+ }
301
+ }
302
+ //$message .= " &nbsp; \t &nbsp; ". __('success:') .' '. ($powerpress_diags['system_info']['success']?'true':'false') ."<br />\n";
303
 
304
  // Now lets loop through each section of diagnostics
305
  $user_info = wp_get_current_user();
310
  .'Return-Path: "'.$from_name.'" <'.$from_email.'>'."\n";
311
  if( isset($_GET['CC']) )
312
  $headers .= 'CC: "'.$from_name.'" <'.$from_email.'>'."\n";
313
+ $headers .= "Content-Type: text/html\n";
314
 
315
+ @wp_mail($email, sprintf(__('Blubrry PowerPress diagnostic results for %s'), get_bloginfo('name')), $message, $headers);
316
  }
317
 
318
  function powerpressadmin_diagnostics_is_writable($dir)
360
  }
361
  ?>
362
 
363
+ <h2><?php echo __('Blubrry PowerPress Diagnostics'); ?></h2>
364
  <p>
365
  <?php echo __('The Diagnostics page checks to see if your server is configured to support all of the available features in Blubrry PowerPress.'); ?>
366
  </p>
367
 
368
+ <h3 style="margin-bottom: 0;"><?php echo __('Detecting Media Information'); ?></h3>
369
+ <p style="margin: 0;">
370
+ <?php echo __('The following test checks to see if your web server can make connections with other web servers to obtain file size and media duration information. The test checks to see if either the PHP cURL library is installed or the php.ini setting \'allow_url_fopen\' enabled.'); ?>
371
  </p>
372
  <table class="form-table">
373
  <tr valign="top">
387
  </tr>
388
  </table>
389
 
390
+ <h3 style="margin-bottom: 0;"><?php echo __('Pinging iTunes'); ?></h3>
391
+ <p style="margin: 0;"><?php echo __('The following test checks to see that your web server can make connections with Apple\'s secure ping server.'); ?></p>
392
  <table class="form-table">
393
  <tr valign="top">
394
  <th scope="row">
404
  </table>
405
 
406
  <h3 style="margin-bottom: 0;"><?php echo __("Uploading Artwork"); ?></h3>
407
+ <p style="margin: 0;"><?php echo __('The following test checks to see that you can upload and store files on your web server.'); ?></p>
408
  <table class="form-table">
409
  <tr valign="top">
410
  <th scope="row">
416
  </tr>
417
  </table>
418
 
419
+ <h3 style="margin-bottom: 0;"><?php echo __('System Information'); ?></h3>
420
+ <p style="margin: 0;"><?php echo __('The following test checks your version of PHP and memory usage.'); ?></p>
421
  <table class="form-table">
422
  <tr valign="top">
423
  <th scope="row">
441
  wp_nonce_field('powerpress-diagnostics');
442
  ?>
443
 
444
+ <h3 style="margin-bottom: 0;"><?php echo __('Email Results'); ?></h3>
445
+ <p style="margin: 0;"><?php echo __('Send the results above to the specified Email address.'); ?></p>
446
  <table class="form-table">
447
  <tr valign="top">
448
  <th scope="row">
449
+ <?php echo __('Email'); ?>
450
  </th>
451
  <td>
452
  <div style="margin-top: 5px;">
456
  <div>
457
  <input type="checkbox" name="CC" value="1" style="vertical-align: text-top;" checked /> CC: <?php $user_info = wp_get_current_user(); echo "&quot;{$user_info->user_nicename}&quot; &lt;{$user_info->user_email}&gt;"; ?>
458
  </div>
459
+ <div>
460
+ <input type="checkbox" name="ap" value="1" style="vertical-align: text-top;" checked /> Include list of active plugins in diagnostics results.
461
+ </div>
462
  </td>
463
  </tr>
464
  </table>
powerpressadmin-editfeed.php CHANGED
@@ -340,7 +340,7 @@ function powerpressadmin_edit_feed_general($FeedSettings, $General)
340
  $Feeds = array('podcast'=>'Special Podcast only Feed');
341
  if( isset($General['custom_feeds']['podcast']) )
342
  $Feeds = $General['custom_feeds'];
343
- else if( is_array($General['custom_feeds']) )
344
  $Feeds += $General['custom_feeds'];
345
 
346
  while( list($feed_slug, $feed_title) = each($Feeds) )
@@ -363,6 +363,13 @@ function powerpressadmin_edit_feed_general($FeedSettings, $General)
363
  function powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID = false, $feed_slug = false)
364
  {
365
  $SupportUploads = powerpressadmin_support_uploads();
 
 
 
 
 
 
 
366
  if( $cat_ID || $feed_slug )
367
  {
368
  ?>
@@ -754,12 +761,35 @@ function powerpressadmin_edit_appearance_feed($General, $FeedSettings, $feed_sl
754
  function powerpressadmin_edit_itunes_feed($FeedSettings, $General)
755
  {
756
  $SupportUploads = powerpressadmin_support_uploads();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
757
  ?>
758
  <h3>iTunes Feed Settings</h3>
759
  <table class="form-table">
760
 
761
  <?php
762
- if( @$General['advanced_mode'] )
763
  {
764
  ?>
765
  <tr valign="top">
@@ -789,7 +819,7 @@ function powerpressadmin_edit_itunes_feed($FeedSettings, $General)
789
  <td>
790
 
791
  <?php if ( version_compare( '5', phpversion(), '<=' ) ) { ?>
792
- <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>)
793
  </div>
794
  <p>
795
  Creates a friendlier view of your post/episode content by converting web links and images to clickable links in iTunes.
@@ -935,7 +965,7 @@ while( list($value,$desc) = each($explicit) )
935
  </th>
936
  <td>
937
  <input type="text" name="Feed[itunes_talent_name]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
938
- <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>
939
 
940
  </td>
941
  </tr>
@@ -962,17 +992,17 @@ while( list($value,$desc) = each($explicit) )
962
 
963
  <?php _e("iTunes New Feed URL"); ?></th>
964
  <td>
965
- <div id="new_feed_url_step_1" style="display: <?php echo ($FeedSettings['itunes_new_feed_url'] || $FeedSettings['itunes_new_feed_url_podcast'] ?'none':'block'); ?>;">
966
  <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>
967
  </div>
968
- <div id="new_feed_url_step_2" style="display: <?php echo ($FeedSettings['itunes_new_feed_url'] || $FeedSettings['itunes_new_feed_url_podcast'] ?'block':'none'); ?>;">
969
  <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>
970
  <p><strong>DO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.</strong></p>
971
  <p>
972
  Apple recommends you maintain the &lt;itunes:new-feed-url&gt; tag in your feed for at least two weeks to ensure that most subscribers will receive the new New Feed URL.
973
  </p>
974
  <p>
975
- Example URL: <?php echo get_feed_link( ($feed_slug?$feed_slug:'podcast') ); ?>
976
  </p>
977
  <p style="margin-bottom: 0;">
978
  <label style="width: 25%; float:left; display:block; font-weight: bold;">New Feed URL</label>
340
  $Feeds = array('podcast'=>'Special Podcast only Feed');
341
  if( isset($General['custom_feeds']['podcast']) )
342
  $Feeds = $General['custom_feeds'];
343
+ else if( isset($General['custom_feeds'])&& is_array($General['custom_feeds']) )
344
  $Feeds += $General['custom_feeds'];
345
 
346
  while( list($feed_slug, $feed_title) = each($Feeds) )
363
  function powerpressadmin_edit_feed_settings($FeedSettings, $General, $cat_ID = false, $feed_slug = false)
364
  {
365
  $SupportUploads = powerpressadmin_support_uploads();
366
+ if( !isset($FeedSettings['posts_per_rss']) )
367
+ $FeedSettings['posts_per_rss'] = '';
368
+ if( !isset($FeedSettings['rss2_image']) )
369
+ $FeedSettings['rss2_image'] = '';
370
+ if( !isset($FeedSettings['copyright']) )
371
+ $FeedSettings['copyright'] = '';
372
+
373
  if( $cat_ID || $feed_slug )
374
  {
375
  ?>
761
  function powerpressadmin_edit_itunes_feed($FeedSettings, $General)
762
  {
763
  $SupportUploads = powerpressadmin_support_uploads();
764
+ if( !isset($FeedSettings['itunes_subtitle']) )
765
+ $FeedSettings['itunes_subtitle'] = '';
766
+ if( !isset($FeedSettings['itunes_summary']) )
767
+ $FeedSettings['itunes_summary'] = '';
768
+ if( !isset($FeedSettings['itunes_keywords']) )
769
+ $FeedSettings['itunes_keywords'] = '';
770
+ if( !isset($FeedSettings['itunes_cat_1']) )
771
+ $FeedSettings['itunes_cat_1'] = '';
772
+ if( !isset($FeedSettings['itunes_cat_2']) )
773
+ $FeedSettings['itunes_cat_2'] = '';
774
+ if( !isset($FeedSettings['itunes_cat_3']) )
775
+ $FeedSettings['itunes_cat_3'] = '';
776
+ if( !isset($FeedSettings['itunes_explicit']) )
777
+ $FeedSettings['itunes_explicit'] = 0;
778
+ if( !isset($FeedSettings['itunes_talent_name']) )
779
+ $FeedSettings['itunes_talent_name'] = '';
780
+ if( !isset($FeedSettings['email']) )
781
+ $FeedSettings['email'] = '';
782
+ if( !isset($FeedSettings['itunes_new_feed_url_podcast']) )
783
+ $FeedSettings['itunes_new_feed_url_podcast'] = '';
784
+ if( !isset($FeedSettings['itunes_new_feed_url']) )
785
+ $FeedSettings['itunes_new_feed_url'] = '';
786
+
787
  ?>
788
  <h3>iTunes Feed Settings</h3>
789
  <table class="form-table">
790
 
791
  <?php
792
+ if( !empty($General['advanced_mode']) )
793
  {
794
  ?>
795
  <tr valign="top">
819
  <td>
820
 
821
  <?php if ( version_compare( '5', phpversion(), '<=' ) ) { ?>
822
+ <div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo ( !empty($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>)
823
  </div>
824
  <p>
825
  Creates a friendlier view of your post/episode content by converting web links and images to clickable links in iTunes.
965
  </th>
966
  <td>
967
  <input type="text" name="Feed[itunes_talent_name]"style="width: 60%;" value="<?php echo $FeedSettings['itunes_talent_name']; ?>" maxlength="250" /><br />
968
+ <div><input type="checkbox" name="Feed[itunes_author_post]" value="1" <?php echo ( !empty($FeedSettings['itunes_author_post'])?'checked ':''); ?>/> Use blog post author's name for individual episodes.</div>
969
 
970
  </td>
971
  </tr>
992
 
993
  <?php _e("iTunes New Feed URL"); ?></th>
994
  <td>
995
+ <div id="new_feed_url_step_1" style="display: <?php echo ( !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ?'none':'block'); ?>;">
996
  <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>
997
  </div>
998
+ <div id="new_feed_url_step_2" style="display: <?php echo ( !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ?'block':'none'); ?>;">
999
  <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>
1000
  <p><strong>DO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.</strong></p>
1001
  <p>
1002
  Apple recommends you maintain the &lt;itunes:new-feed-url&gt; tag in your feed for at least two weeks to ensure that most subscribers will receive the new New Feed URL.
1003
  </p>
1004
  <p>
1005
+ Example URL: <?php echo get_feed_link( ( empty($feed_slug)?'podcast':$feed_slug) ); ?>
1006
  </p>
1007
  <p style="margin-bottom: 0;">
1008
  <label style="width: 25%; float:left; display:block; font-weight: bold;">New Feed URL</label>
powerpressadmin-find-replace.php ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // powerpressadmin-find-replace.php
3
+ $g_FindReplaceResults = array();
4
+
5
+ // Returns an array of enclosures with key of array = meta_id
6
+ function powerpressadmin_find_replace_get_enclosures($find_string)
7
+ {
8
+ $Episodes = array();
9
+ global $wpdb;
10
+
11
+ $query = "SELECT meta_id, post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE \"%enclosure\"";
12
+ $results = mysql_query($query);
13
+ while( $row = mysql_fetch_assoc($results) )
14
+ {
15
+ list($url) = @explode("\n", $row['meta_value'], 2 );
16
+ $url = trim($url);
17
+ if( $find_string == '' || strstr($url, $find_string) )
18
+ $Episodes[ $row['meta_id'] ] = $row;
19
+ }
20
+ mysql_free_result($results);
21
+ return $Episodes;
22
+ }
23
+
24
+ function powerpressadmin_find_replace_update_meta($meta_id, $meta_value)
25
+ {
26
+ global $wpdb;
27
+ return $wpdb->update( $wpdb->postmeta, array('meta_value'=>$meta_value), array('meta_id'=>$meta_id) );
28
+ }
29
+
30
+ function powerpressadmin_find_replace_process()
31
+ {
32
+ global $g_FindReplaceResults;
33
+ if( isset($_POST['FindReplace']) )
34
+ {
35
+ $FindReplace = $_POST['FindReplace'];
36
+ if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
37
+ {
38
+ $success_count = 0;
39
+ $failed_count = 0;
40
+
41
+ $FoundArray = powerpressadmin_find_replace_get_enclosures($FindReplace['find_string']);
42
+
43
+ while( list($meta_id, $row) = each($FoundArray) )
44
+ {
45
+ // powerpress_get_post_meta
46
+ $meta_value = get_post_meta($row['post_id'], $row['meta_key'], true);
47
+ $parts = explode("\n", $meta_value, 2);
48
+ $other_meta_data = false;
49
+ if( count($parts) == 2 )
50
+ list($old_url, $other_meta_data) = $parts;
51
+ else
52
+ $old_url = trim($meta_value);
53
+
54
+ $old_url = trim($old_url);
55
+ //echo $old_url;
56
+ $g_FindReplaceResults[ $meta_id ] = $row;
57
+ $g_FindReplaceResults[ $meta_id ]['old_url'] = $old_url;
58
+ $g_FindReplaceResults[ $meta_id ]['find_readable'] = str_replace($FindReplace['find_string'],
59
+ sprintf('<span class="find_string strong">%s</span>', $FindReplace['find_string']), $old_url);
60
+ $g_FindReplaceResults[ $meta_id ]['replace_readable'] = str_replace($FindReplace['find_string'],
61
+ sprintf('<span class="replace_string strong">%s</span>', $FindReplace['replace_string']), $old_url);
62
+ $new_url = str_replace($FindReplace['find_string'],$FindReplace['replace_string'], $old_url);
63
+ $g_FindReplaceResults[ $meta_id ]['new_url'] = $new_url;
64
+
65
+ if( $FindReplace['step'] == 3 && $FindReplace['find_string'] != '' )
66
+ {
67
+ $good = true;
68
+ if( @$FindReplace['verify'] )
69
+ {
70
+ $response = @wp_remote_head( $new_url );
71
+ if ( is_wp_error( $response ) )
72
+ {
73
+ $g_FindReplaceResults[ $meta_id ]['error'] = $response->get_error_message();
74
+ $good = false;
75
+ }
76
+
77
+ if( $good && isset($response['response']['code']) && ($response['response']['code'] < 200 || $response['response']['code'] > 203) )
78
+ {
79
+ $g_FindReplaceResults[ $meta_id ]['error'] = 'Error, HTTP '.$response['response']['code'];
80
+ $good = false;
81
+ }
82
+ }
83
+
84
+ if( $good )
85
+ {
86
+ $DataUpdated = $new_url;
87
+ if( $other_meta_data )
88
+ $DataUpdated .= "\n". $other_meta_data;
89
+ if( update_post_meta( $row['post_id'], $row['meta_key'], $DataUpdated) )
90
+ $success_count++;
91
+ else
92
+ $good = false;
93
+ }
94
+
95
+ if( !$good )
96
+ {
97
+ $failed_count++;
98
+ }
99
+ $g_FindReplaceResults[ $meta_id ]['success'] = $good;
100
+ }
101
+
102
+ }
103
+
104
+ if( $FindReplace['step'] == 3 )
105
+ {
106
+ if( $success_count > 0 )
107
+ powerpress_page_message_add_notice( sprintf(__('%d URLs updated successfully.'), $success_count) );
108
+ if( $failed_count > 0 )
109
+ powerpress_page_message_add_error( sprintf(__('%d URLs were not updated.'), $failed_count) );
110
+ else if( $FindReplace['find_string'] == '' )
111
+ powerpress_page_message_add_notice( __('Nothing specified to find.') );
112
+ }
113
+ }
114
+
115
+
116
+ }
117
+
118
+ powerpress_page_message_add_notice( __('WARNING: Please backup your database before proceeding. Blubrry PowerPress is not responsibile for any lost or damaged data resulting from this Find and Replace tool.') );
119
+ }
120
+
121
+ function powerpress_admin_find_replace()
122
+ {
123
+ $FindReplaceResults = array();
124
+
125
+ if( isset($_POST['FindReplace']) )
126
+ {
127
+ $FindReplace = $_POST['FindReplace'];
128
+ }
129
+ else
130
+ {
131
+ $FindReplace = array();
132
+ $FindReplace['find_string'] = '';
133
+ $FindReplace['replace_string'] = '';
134
+ $FindReplace['step'] = 1;
135
+ }
136
+
137
+ if( $FindReplace['step'] == 2 )
138
+ {
139
+ $FindReplace['verify'] = true;
140
+ }
141
+ if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
142
+ {
143
+ $FindReplaceResults = powerpressadmin_find_replace_get_results();
144
+ }
145
+ ?>
146
+
147
+ <script type="text/javascript">
148
+ function VerifyCheck(obj)
149
+ {
150
+ if( !obj.checked && !confirm('<?php echo __('WARNING: Verification prevents changes if the URL entered is invalid.\n\nAre you sure you do not want to verify the URLs?'); ?>') )
151
+ obj.checked = true;
152
+ }
153
+
154
+ function ConfirmReplace()
155
+ {
156
+ if( confirm('<?php echo __('WARNING: You are about to make permanent changes to your database.\n\nAre you sure you wish to continue?'); ?>') )
157
+ {
158
+ jQuery('#replace_step').val('3');
159
+ return true;
160
+ }
161
+ return false;
162
+ }
163
+ </script>
164
+ <style type="text/css">
165
+ .find_string {
166
+ background-color: #CFE2F3; /* lt blue */
167
+ padding: 1px;
168
+ }
169
+ .replace_string {
170
+ background-color: #FCE5CD; /* orange */
171
+ padding: 1px;
172
+ }
173
+ .strong {
174
+ font-style:italic;
175
+ }
176
+
177
+ dd {
178
+ margin: 2px 2px 2px 10px;
179
+ }
180
+ dt {
181
+ margin: 2px 2px 2px 10px;
182
+ }
183
+ </style>
184
+
185
+ <input type="hidden" name="action" value="powerpress-find-replace" />
186
+ <input type="hidden" name="FindReplace[step]" value="<?php echo $FindReplace['step']; ?>" id="replace_step" />
187
+
188
+ <h2><?php echo __("Find and Replace Episode URLs"); ?></h2>
189
+
190
+ <p style="margin-bottom: 0;"><?php echo __('Find and replace complete or partial segments of media URLs. Useful if you move your media to a new web site or service.'); ?></p>
191
+
192
+ <table class="form-table">
193
+ <tr valign="top">
194
+ <th scope="row"><?php echo __("Find in URL"); ?></th>
195
+ <td>
196
+ <input type="text" id="find_string" name="FindReplace[find_string]" style="width: 50%;" value="<?php echo $FindReplace['find_string']; ?>" maxlength="250" <?php if( $FindReplace['step'] != 1 ) { echo ' readOnly'; } ?> />
197
+ <?php if( $FindReplace['step'] != 1 ) { ?><a href="#" onclick="jQuery('#replace_step').val('1');document.forms[0].submit();" title="<?php echo __('Modify'); ?>"><?php echo __('Modify'); ?></a><?php } ?>
198
+ <p style="margin: 0; font-size: 90%;"><?php echo __('Example'); ?>: http://www.oldsite.com/</p>
199
+ </td>
200
+ </tr>
201
+ <tr valign="top">
202
+ <th scope="row"><?php echo __("Replace with"); ?></th>
203
+ <td>
204
+ <input type="text" id="replace_string" name="FindReplace[replace_string]" style="width: 50%;" value="<?php echo $FindReplace['replace_string']; ?>" maxlength="250" <?php if( $FindReplace['step'] != 1 ) { echo ' readOnly'; } ?> />
205
+ <?php if( $FindReplace['step'] != 1 ) { ?><a href="#" onclick="jQuery('#replace_step').val('1');document.forms[0].submit();" title="<?php echo __('Modify'); ?>"><?php echo __('Modify'); ?></a><?php } ?>
206
+ <p style="margin: 0; font-size: 90%;"><?php echo __('Example'); ?>: http://www.newsite.com/</p>
207
+ </td>
208
+ </tr>
209
+ </table>
210
+
211
+
212
+
213
+
214
+ <?php
215
+ if( $FindReplace['step'] == 2 || $FindReplace['step'] == 3 )
216
+ {
217
+ ?>
218
+ <h2><?php echo ($FindReplace['step'] == 2 ? __('Preview Changes') : __('Change Results') ); ?></h2>
219
+
220
+ <p><?php echo sprintf( __('Found %d results with "%s"'), count($FindReplaceResults), "<span class=\"find_string strong\">{$FindReplace['find_string']}</span>" ); ?></p>
221
+
222
+ <ol>
223
+ <?php
224
+ while( list($meta_id, $row) = each($FindReplaceResults) )
225
+ {
226
+ $post_view_link = '<a href="' . get_permalink($row['post_id']) . '" target="_blank">' . get_the_title($row['post_id']) . '</a>';
227
+ $post_edit_link = '<a href="' . get_edit_post_link($row['post_id']) . '" target="_blank">' . __('Edit Post') . '</a>';
228
+ ?>
229
+ <li>
230
+ <?php
231
+ if( $FindReplace['step'] == 3 )
232
+ {
233
+ echo '<div>';
234
+ powerpressadmin_find_replace_status($row['success']);
235
+ echo ' &nbsp; ';
236
+ if( @$row['error'] )
237
+ echo $row['error'];
238
+ echo '</div>';
239
+ }
240
+ ?>
241
+ Post: <strong><?php echo $post_view_link; ?></strong>
242
+ <span style="font-size: 90%;">(<?php echo $post_edit_link; ?>)</span>
243
+ <dl>
244
+ <dt>
245
+ <?php echo __('Found') .': '. $row['find_readable']; ?>
246
+ </dt>
247
+ <dd>
248
+ <?php echo __('Replace') .': '. $row['replace_readable']; ?>
249
+ (<a href="<?php echo $row['new_url']; ?>" target="_blank"><?php echo __('test link'); ?></a>)
250
+ </dd>
251
+ </dl>
252
+ </li>
253
+ <?php
254
+ }
255
+ ?>
256
+ </ol>
257
+ <?php } ?>
258
+
259
+ <?php if( $FindReplace['step'] == 1 ) { ?>
260
+ <p class="submit">
261
+ <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary" value="Find and Preview Changes" onclick="jQuery('#replace_step').val('2');" />
262
+ </p>
263
+ <?php } else if( $FindReplace['step'] == 2 && count($FindReplaceResults) > 0 ) { ?>
264
+ <p class="submit">
265
+ <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary" value="Commit Changes" onclick="return ConfirmReplace()" />
266
+ &nbsp;
267
+ <input type="checkbox" name="FindReplace[verify]" value="1" <?php if( @$FindReplace['verify'] ) echo 'checked'; ?> onchange="return VerifyCheck(this)" />
268
+ <strong><?php echo __("Verify modified URLs"); ?></strong>
269
+ (<?php echo __('Does not change media URL if link is not found or invalid'); ?>)</p>
270
+ </p>
271
+ <?php } else if ( $FindReplace['step'] == 3 || ($FindReplace['step'] == 2 && count($FindReplaceResults) == 0) ) { ?>
272
+ <p class="submit">
273
+ <strong><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_tools.php'); ?>"><?php echo __('PowerPress Tools'); ?></a></strong>
274
+ </p>
275
+ <?php } ?>
276
+
277
+ <p style="margin-bottom: 40px; margin-top:0;"><?php echo sprintf( __('We recommend using the %s plugin to backup your database before using this Find and Replace tool.'), '<a href="http://wordpress.org/extend/plugins/wp-db-backup/" target="_blank">'. __('WP-DB-Backup') .'</a>' ); ?></p>
278
+ <!-- start footer -->
279
+ <?php
280
+ }
281
+
282
+ function powerpressadmin_find_replace_status($success=true)
283
+ {
284
+ $img = 'yes.png';
285
+ $color = '#458045';
286
+ $text = __('Success');
287
+ if( $success == false ) // Failed takes precedence over warning
288
+ {
289
+ $img = 'no.png';
290
+ $color = '#CC0000';
291
+ $text = __('Failed');
292
+ }
293
+ ?>
294
+ <img src="<?php echo admin_url(); ?>/images/<?php echo $img; ?>" style="vertical-align:text-top;" />
295
+ <strong style="color:<?php echo $color; ?>;"><?php echo $text; ?></strong>
296
+ <?php
297
+ }
298
+
299
+ function powerpressadmin_find_replace_get_results()
300
+ {
301
+ global $g_FindReplaceResults;
302
+ if( !is_array($g_FindReplaceResults) )
303
+ return array();
304
+ return $g_FindReplaceResults;
305
+ }
306
+ ?>
powerpressadmin-jquery.php CHANGED
@@ -32,6 +32,24 @@ function powerpress_add_blubrry_redirect($program_keyword)
32
  powerpress_save_settings($NewSettings);
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  function powerpress_admin_jquery_init()
36
  {
37
  $Settings = false; // Important, never remove this
@@ -143,7 +161,7 @@ if( !isset($Settings['blubrry_auth']) || $Settings['blubrry_auth'] == '' )
143
  $Msg = __('An unknown error occurred deleting media file.');
144
  }
145
 
146
- $api_url = sprintf('%s/media/%s/index.json?quota=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), $Settings['blubrry_program_keyword'] );
147
  $json_data = powerpress_remote_fopen($api_url, $Settings['blubrry_auth']);
148
  $results = powerpress_json_decode($json_data);
149
 
@@ -156,13 +174,21 @@ function SelectMedia(File)
156
  {
157
  self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').value=File;
158
  self.parent.document.getElementById('powerpress_hosting_<?php echo $FeedSlug; ?>').value='1';
159
- self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').readOnly='true';
160
  self.parent.document.getElementById('powerpress_hosting_note_<?php echo $FeedSlug; ?>').style.display='block';
161
  self.parent.tb_remove();
162
  }
 
 
 
 
 
 
 
 
163
  function DeleteMedia(File)
164
  {
165
- return confirm('Delete '+File+', are you sure?');
166
  }
167
  </script>
168
  <div id="media-header">
@@ -171,8 +197,8 @@ function DeleteMedia(File)
171
  if( $Msg )
172
  echo '<p>'. $Msg . '</p>';
173
  ?>
174
- <div class="media-upload-link"><a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-upload", 'powerpress-jquery-upload'); ?>&podcast-feed=<?php echo $FeedSlug; ?>&keepThis=true&TB_iframe=true&height=350&width=530&modal=true" class="thickbox" title="Upload Media File">Upload Media File</a></div>
175
- <p>Select from media files uploaded to blubrry.com:</p>
176
  </div>
177
  <div id="media-items-container">
178
  <div id="media-items">
@@ -184,6 +210,7 @@ function DeleteMedia(File)
184
  }
185
  else
186
  {
 
187
  while( list($index,$data) = each($results) )
188
  {
189
  if( $index === 'quota' )
@@ -191,15 +218,33 @@ function DeleteMedia(File)
191
  $QuotaData = $data;
192
  continue;
193
  }
 
 
 
 
 
 
 
 
 
 
194
 
195
  ?>
196
- <div class="media-item">
197
- <strong class="media-name"><?php echo $data['name']; ?></strong>
198
  <cite><?php echo powerpress_byte_size($data['length']); ?></cite>
 
 
 
199
  <div class="media-item-links">
200
- <?php if (function_exists('curl_init')) { ?>
201
- <a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-media-delete", 'powerpress-jquery-media-delete'); ?>&amp;podcast-feed=<?php echo $FeedSlug; ?>&amp;delete=<?php echo urlencode($data['name']); ?>" onclick="return DeleteMedia('<?php echo $data['name']; ?>');">Delete</a> | <?php } ?>
202
- <a href="#" onclick="SelectMedia('<?php echo $data['name']; ?>'); return false;">Select</a>
 
 
 
 
 
203
  </div>
204
  </div>
205
  <?php
@@ -401,7 +446,7 @@ function DeleteMedia(File)
401
  <h2>Blubrry Services Integration</h2>
402
  <?php if( $Step == 1 ) { ?>
403
  <p>
404
- <label for="blubrry_username">Blubrry User Name</label>
405
  <input type="text" id="blubrry_username" name="Settings[blubrry_username]" value="<?php echo $Settings['blubrry_username']; ?>" />
406
  </p>
407
  <p id="password_row">
@@ -524,8 +569,8 @@ while( list($value,$desc) = each($Programs) )
524
  exit;
525
  }
526
 
527
- $File = $_GET['File'];
528
- $Message = $_GET['Message'];
529
 
530
  powerpress_admin_jquery_header('Upload Complete');
531
  echo '<h2>'. __('Uploader') .'</h2>';
@@ -561,6 +606,7 @@ self.parent.tb_remove();
561
 
562
  function powerpress_admin_jquery_header($title, $jquery = false)
563
  {
 
564
  if( $jquery )
565
  add_thickbox(); // we use the thckbox for some settings
566
  ?>
32
  powerpress_save_settings($NewSettings);
33
  }
34
 
35
+ function powerpress_strip_redirect_urls($url)
36
+ {
37
+ $Settings = powerpress_get_settings('powerpress_general');
38
+ for( $x = 1; $x <= 3; $x++ )
39
+ {
40
+ $field = sprintf('redirect%d', $x);
41
+ if( !empty($Settings[$field]) )
42
+ {
43
+ $redirect_no_http = str_replace('http://', '', $Settings[$field]);
44
+ if( substr($redirect_no_http, -1, 1) != '/' )
45
+ $redirect_no_http .= '/';
46
+ $url = str_replace($redirect_no_http, '', $url);
47
+ }
48
+ }
49
+
50
+ return $url;
51
+ }
52
+
53
  function powerpress_admin_jquery_init()
54
  {
55
  $Settings = false; // Important, never remove this
161
  $Msg = __('An unknown error occurred deleting media file.');
162
  }
163
 
164
+ $api_url = sprintf('%s/media/%s/index.json?quota=true&published=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), $Settings['blubrry_program_keyword'] );
165
  $json_data = powerpress_remote_fopen($api_url, $Settings['blubrry_auth']);
166
  $results = powerpress_json_decode($json_data);
167
 
174
  {
175
  self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').value=File;
176
  self.parent.document.getElementById('powerpress_hosting_<?php echo $FeedSlug; ?>').value='1';
177
+ self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').readOnly=true;
178
  self.parent.document.getElementById('powerpress_hosting_note_<?php echo $FeedSlug; ?>').style.display='block';
179
  self.parent.tb_remove();
180
  }
181
+ function SelectURL(url)
182
+ {
183
+ self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').value=url;
184
+ self.parent.document.getElementById('powerpress_hosting_<?php echo $FeedSlug; ?>').value='0';
185
+ self.parent.document.getElementById('powerpress_url_<?php echo $FeedSlug; ?>').readOnly=false;
186
+ self.parent.document.getElementById('powerpress_hosting_note_<?php echo $FeedSlug; ?>').style.display='none';
187
+ self.parent.tb_remove();
188
+ }
189
  function DeleteMedia(File)
190
  {
191
+ return confirm('<?php echo __('Delete'); ?>: '+File+'\n\n<?php echo __('Are you sure you want to delete this media file?'); ?>');
192
  }
193
  </script>
194
  <div id="media-header">
197
  if( $Msg )
198
  echo '<p>'. $Msg . '</p>';
199
  ?>
200
+ <div class="media-upload-link"><a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-upload", 'powerpress-jquery-upload'); ?>&podcast-feed=<?php echo $FeedSlug; ?>&keepThis=true&TB_iframe=true&height=350&width=530&modal=true" class="thickbox" title="<?php echo __('Upload Media File'); ?>"><?php echo __('Upload Media File'); ?></a></div>
201
+ <p><?php echo __('Select from media files uploaded to blubrry.com'); ?>:</p>
202
  </div>
203
  <div id="media-items-container">
204
  <div id="media-items">
210
  }
211
  else
212
  {
213
+ $PublishedList = false;
214
  while( list($index,$data) = each($results) )
215
  {
216
  if( $index === 'quota' )
218
  $QuotaData = $data;
219
  continue;
220
  }
221
+
222
+ if( $PublishedList == false && !empty($data['published']) )
223
+ {
224
+ ?>
225
+ <div id="media-published-title">
226
+ <?php echo __('Media Published within the past 30 days'); ?>:
227
+ </div>
228
+ <?php
229
+ $PublishedList = true;
230
+ }
231
 
232
  ?>
233
+ <div class="media-item <?php echo (empty($data['published'])?'media-unpublished':'media-published'); ?>">
234
+ <strong class="media-name"><?php echo htmlspecialchars($data['name']); ?></strong>
235
  <cite><?php echo powerpress_byte_size($data['length']); ?></cite>
236
+ <?php if( !empty($data['published']) ) { ?>
237
+ <div class="media-published-date">&middot; <?php echo __('Published on'); ?> <?php echo date(get_option('date_format'), $data['last_modified']); ?></div>
238
+ <?php } ?>
239
  <div class="media-item-links">
240
+ <?php if( !empty($data['published']) && !empty($data['url']) ) { ?>
241
+ <a href="#" onclick="SelectURL('<?php echo $data['url']; ?>'); return false;"><?php echo __('Select'); ?></a>
242
+ <?php } else { ?>
243
+ <?php if (function_exists('curl_init')) { ?>
244
+ <a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-media-delete", 'powerpress-jquery-media-delete'); ?>&amp;podcast-feed=<?php echo $FeedSlug; ?>&amp;delete=<?php echo urlencode($data['name']); ?>" onclick="return DeleteMedia('<?php echo $data['name']; ?>');">Delete</a> |
245
+ <?php } ?>
246
+ <a href="#" onclick="SelectMedia('<?php echo $data['name']; ?>'); return false;"><?php echo __('Select'); ?></a>
247
+ <?php } ?>
248
  </div>
249
  </div>
250
  <?php
446
  <h2>Blubrry Services Integration</h2>
447
  <?php if( $Step == 1 ) { ?>
448
  <p>
449
+ <label for="blubrry_username">Blubrry User Name (Email)</label>
450
  <input type="text" id="blubrry_username" name="Settings[blubrry_username]" value="<?php echo $Settings['blubrry_username']; ?>" />
451
  </p>
452
  <p id="password_row">
569
  exit;
570
  }
571
 
572
+ $File = (isset($_GET['File'])?$_GET['File']:false);
573
+ $Message = (isset($_GET['Message'])?$_GET['Message']:false);
574
 
575
  powerpress_admin_jquery_header('Upload Complete');
576
  echo '<h2>'. __('Uploader') .'</h2>';
606
 
607
  function powerpress_admin_jquery_header($title, $jquery = false)
608
  {
609
+ $other = false;
610
  if( $jquery )
611
  add_thickbox(); // we use the thckbox for some settings
612
  ?>
powerpressadmin-metabox.php CHANGED
@@ -18,6 +18,7 @@ function powerpress_meta_box($object, $box)
18
  $iTunesSummary = '';
19
  $iTunesExplicit = '';
20
  $NoPlayer = false;
 
21
  $GeneralSettings = get_option('powerpress_general');
22
  if( !isset($GeneralSettings['set_size']) )
23
  $GeneralSettings['set_size'] = 0;
@@ -35,29 +36,45 @@ function powerpress_meta_box($object, $box)
35
  else
36
  $enclosureArray = get_post_meta($object->ID, '_'.$FeedSlug.':enclosure', true);
37
 
38
- list($EnclosureURL, $EnclosureLength, $EnclosureType, $EnclosureSerialized) = explode("\n", $enclosureArray, 4);
 
 
 
 
 
 
 
 
 
39
  if( $EnclosureSerialized )
40
  {
41
  $ExtraData = @unserialize($EnclosureSerialized);
42
- if( $ExtraData && isset($ExtraData['duration']) )
43
- $iTunesDuration = $ExtraData['duration'];
44
- if( $ExtraData && isset($ExtraData['embed']) )
45
- $Embed = $ExtraData['embed'];
46
- if( $ExtraData && isset($ExtraData['keywords']) )
47
- $iTunesKeywords = $ExtraData['keywords'];
48
- if( $ExtraData && isset($ExtraData['subtitle']) )
49
- $iTunesSubtitle = $ExtraData['subtitle'];
50
- if( $ExtraData && isset($ExtraData['summary']) )
51
- $iTunesSummary = $ExtraData['summary'];
52
- if( $ExtraData && isset($ExtraData['no_player']) )
53
- $NoPlayer = $ExtraData['no_player'];
54
- if( $ExtraData && isset($ExtraData['explicit']) )
55
- $iTunesExplicit = $ExtraData['explicit'];
56
- if( $ExtraData && isset($ExtraData['image']) )
57
- $CoverImage = $ExtraData['image'];
 
 
 
 
 
 
 
58
  }
59
 
60
-
61
  if( $FeedSlug == 'podcast' && !$iTunesDuration )
62
  $iTunesDuration = get_post_meta($object->ID, 'itunes:duration', true);
63
 
@@ -97,7 +114,7 @@ function powerpress_meta_box($object, $box)
97
  <label>Remove</label>
98
  <div class="powerpress_row_content">
99
  <input type="checkbox" name="Powerpress[<?php echo $FeedSlug; ?>][remove_podcast]" id="powerpress_remove" value="1" onchange="javascript:document.getElementById('powerpress_podcast_edit_<?php echo $FeedSlug; ?>').style.display=(this.checked?'none':'block');" />
100
- Podcast episode will be removed from this post upon save
101
  </div>
102
  </div>
103
  <?php
@@ -107,25 +124,46 @@ function powerpress_meta_box($object, $box)
107
  <div class="error below-h2" id="powerpress_warning_<?php echo $FeedSlug; ?>" style="display:none;"></div>
108
  <div class="success below-h2" id="powerpress_success_<?php echo $FeedSlug; ?>" style="display:none;"></div>
109
  <div class="powerpress_row">
110
- <label for="Powerpress[<?php echo $FeedSlug; ?>][url]">Media URL</label>
111
  <div class="powerpress_row_content">
112
  <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; ?>')" <?php echo (@$ExtraData['hosting']==1?'readOnly':''); ?> style="width: 70%; font-size: 90%;" />
113
  <?php if( @$GeneralSettings['blubrry_hosting'] == 1 ) { ?>
114
- <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>
115
  <?php } ?>
116
- <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" />
117
- <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" />
118
 
119
  <input type="hidden" id="powerpress_hosting_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][hosting]" value="<?php echo (@$ExtraData['hosting']==1?'1':'0'); ?>" />
120
- <div id="powerpress_hosting_note_<?php echo $FeedSlug; ?>" style="margin-left: 2px; padding-bottom: 2px; padding-top: 2px; display: <?php echo (@$ExtraData['hosting']==1?'block':'none'); ?>"><em>Media file hosted by blubrry.com.
121
- (<a href="javascript:void();" title="Remove blubrry hosted media file" onclick="powerpress_remove_hosting('<?php echo $FeedSlug; ?>');return false;">remove</a>)
122
  </em></div>
123
  <?php
124
 
125
- if( $GeneralSettings['episode_box_mode'] == 2 && $GeneralSettings['episode_box_no_player'] )
126
  {
127
  ?>
128
- <div style="margin-left: 2px; padding-bottom: 2px; padding-top: 2px;"><input id="powerpress_no_player_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][no_player]" value="1" type="checkbox" <?php echo ($NoPlayer==1?'checked':''); ?> /> Do not display player for media above</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  <?php
130
  }
131
  ?>
@@ -136,7 +174,7 @@ function powerpress_meta_box($object, $box)
136
  {
137
  ?>
138
  <div class="powerpress_row">
139
- <label for "size">File Size</label>
140
  <div class="powerpress_row_content">
141
  <div style="margin-bottom: 4px;">
142
  <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
@@ -148,7 +186,7 @@ function powerpress_meta_box($object, $box)
148
  </div>
149
  </div>
150
  <div class="powerpress_row">
151
- <label for "size">Duration</label>
152
  <div class="powerpress_row_content">
153
  <div style="margin-bottom: 4px;">
154
  <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)
@@ -182,7 +220,7 @@ function powerpress_meta_box($object, $box)
182
  {
183
  ?>
184
  <div class="powerpress_row">
185
- <label for "Powerpress[<?php echo $FeedSlug; ?>][embed]">Media Embed</label>
186
  <div class="powerpress_row_content">
187
  <textarea id="powerpress_embed_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][embed]" style="width: 90%; height: 80px; font-size: 90%;" onfocus="this.select();"><?php echo htmlspecialchars($Embed); ?></textarea>
188
  </div>
@@ -194,12 +232,12 @@ function powerpress_meta_box($object, $box)
194
  {
195
  ?>
196
  <div class="powerpress_row">
197
- <label for "Powerpress[<?php echo $FeedSlug; ?>][image]">Cover Image</label>
198
  <div class="powerpress_row_content">
199
  <input id="powerpress_image_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][image]" value="<?php echo htmlspecialchars($CoverImage); ?>" style="width: 90%; font-size: 90%;" size="250" />
200
  </div>
201
  <div class="powerpress_row_content">
202
- <em>Cover image for Quicktime (m4v, mov, etc..) video only. e.g. http://example.com/path/to/image.jpg</em>
203
  </div>
204
  </div>
205
  <?php
@@ -209,12 +247,12 @@ function powerpress_meta_box($object, $box)
209
  {
210
  ?>
211
  <div class="powerpress_row">
212
- <label for "Powerpress[<?php echo $FeedSlug; ?>][keywords]">iTunes Keywords</label>
213
  <div class="powerpress_row_content">
214
  <input id="powerpress_keywords_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][keywords]" value="<?php echo htmlspecialchars($iTunesKeywords); ?>" style="width: 90%; font-size: 90%;" size="250" />
215
  </div>
216
  <div class="powerpress_row_content">
217
- <em>Enter up to 12 keywords separated by commas. Leave blank to use your blog post tags.</em>
218
  </div>
219
  </div>
220
  <?php
@@ -224,13 +262,12 @@ function powerpress_meta_box($object, $box)
224
  {
225
  ?>
226
  <div class="powerpress_row">
227
- <label for "Powerpress[<?php echo $FeedSlug; ?>][subtitle]">iTunes Subtitle</label>
228
  <div class="powerpress_row_content">
229
  <input id="powerpress_subtitle_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][subtitle]" value="<?php echo htmlspecialchars($iTunesSubtitle); ?>" style="width: 90%; font-size: 90%;" size="250" />
230
  </div>
231
  <div class="powerpress_row_content">
232
- <em>Your subtitle may not contain HTML and cannot exceed 250 characters in length.
233
- Leave blank to use the first 250 characters of your blog post.</em>
234
  </div>
235
  </div>
236
  <?php
@@ -240,13 +277,12 @@ function powerpress_meta_box($object, $box)
240
  {
241
  ?>
242
  <div class="powerpress_row">
243
- <label for "Powerpress[<?php echo $FeedSlug; ?>][summary]">iTunes Summary</label>
244
  <div class="powerpress_row_content">
245
  <textarea id="powerpress_summary_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][summary]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo htmlspecialchars($iTunesSummary); ?></textarea>
246
  </div>
247
  <div class="powerpress_row_content">
248
- <em>Your summary may not contain HTML and cannot exceed 4,000 characters in length.
249
- Leave blank to use your blog post.</em>
250
  </div>
251
  </div>
252
  <?php
@@ -256,11 +292,11 @@ function powerpress_meta_box($object, $box)
256
  {
257
  ?>
258
  <div class="powerpress_row">
259
- <label for "Powerpress[<?php echo $FeedSlug; ?>][summary]">iTunes Explicit</label>
260
  <div class="powerpress_row_content">
261
  <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 200px;">
262
  <?php
263
- $explicit_array = array(''=>'Use feed\'s explicit setting', 0=>"no - display nothing", 1=>"yes - explicit content", 2=>"clean - no explicit content");
264
 
265
  while( list($value,$desc) = each($explicit_array) )
266
  echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
18
  $iTunesSummary = '';
19
  $iTunesExplicit = '';
20
  $NoPlayer = false;
21
+ $NoLinks = false;
22
  $GeneralSettings = get_option('powerpress_general');
23
  if( !isset($GeneralSettings['set_size']) )
24
  $GeneralSettings['set_size'] = 0;
36
  else
37
  $enclosureArray = get_post_meta($object->ID, '_'.$FeedSlug.':enclosure', true);
38
 
39
+ $EnclosureURL = '';
40
+ $EnclosureLength = '';
41
+ $EnclosureType = '';
42
+ $EnclosureSerialized = false;
43
+ if( $enclosureArray )
44
+ list($EnclosureURL, $EnclosureLength, $EnclosureType, $EnclosureSerialized) = explode("\n", $enclosureArray, 4);
45
+ $EnclosureURL = trim($EnclosureURL);
46
+ $EnclosureLength = trim($EnclosureLength);
47
+ $EnclosureType = trim($EnclosureType);
48
+
49
  if( $EnclosureSerialized )
50
  {
51
  $ExtraData = @unserialize($EnclosureSerialized);
52
+ if( $ExtraData )
53
+ {
54
+ if( isset($ExtraData['duration']) )
55
+ $iTunesDuration = $ExtraData['duration'];
56
+ else if( isset($ExtraData['length']) ) // Podcasting plugin support
57
+ $iTunesDuration = $ExtraData['length'];
58
+ if( isset($ExtraData['embed']) )
59
+ $Embed = $ExtraData['embed'];
60
+ if( isset($ExtraData['keywords']) )
61
+ $iTunesKeywords = $ExtraData['keywords'];
62
+ if( isset($ExtraData['subtitle']) )
63
+ $iTunesSubtitle = $ExtraData['subtitle'];
64
+ if( isset($ExtraData['summary']) )
65
+ $iTunesSummary = $ExtraData['summary'];
66
+ if( isset($ExtraData['no_player']) )
67
+ $NoPlayer = $ExtraData['no_player'];
68
+ if( isset($ExtraData['no_links']) )
69
+ $NoLinks = $ExtraData['no_links'];
70
+ if( isset($ExtraData['explicit']) )
71
+ $iTunesExplicit = $ExtraData['explicit'];
72
+ if( isset($ExtraData['image']) )
73
+ $CoverImage = $ExtraData['image'];
74
+ }
75
  }
76
 
77
+ $iTunesDuration = false;
78
  if( $FeedSlug == 'podcast' && !$iTunesDuration )
79
  $iTunesDuration = get_post_meta($object->ID, 'itunes:duration', true);
80
 
114
  <label>Remove</label>
115
  <div class="powerpress_row_content">
116
  <input type="checkbox" name="Powerpress[<?php echo $FeedSlug; ?>][remove_podcast]" id="powerpress_remove" value="1" onchange="javascript:document.getElementById('powerpress_podcast_edit_<?php echo $FeedSlug; ?>').style.display=(this.checked?'none':'block');" />
117
+ <?php echo __('Podcast episode will be removed from this post upon save'); ?>
118
  </div>
119
  </div>
120
  <?php
124
  <div class="error below-h2" id="powerpress_warning_<?php echo $FeedSlug; ?>" style="display:none;"></div>
125
  <div class="success below-h2" id="powerpress_success_<?php echo $FeedSlug; ?>" style="display:none;"></div>
126
  <div class="powerpress_row">
127
+ <label for="Powerpress[<?php echo $FeedSlug; ?>][url]"><?php echo __('Media URL'); ?></label>
128
  <div class="powerpress_row_content">
129
  <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; ?>')" <?php echo (@$ExtraData['hosting']==1?'readOnly':''); ?> style="width: 70%; font-size: 90%;" />
130
  <?php if( @$GeneralSettings['blubrry_hosting'] == 1 ) { ?>
131
+ <a href="<?php echo admin_url(); ?>?action=powerpress-jquery-media&podcast-feed=<?php echo $FeedSlug; ?>&KeepThis=true&TB_iframe=true&modal=true" title="<?php echo __('Browse Media File'); ?>" class="thickbox"><img src="<?php echo powerpress_get_root_url(); ?>/images/blubrry_folder.png" alt="<?php echo __('Browse Media Files'); ?>" /></a>
132
  <?php } ?>
133
+ <input type="button" id="powerpress_check_<?php echo $FeedSlug; ?>_button" name="powerpress_check_<?php echo $FeedSlug; ?>_button" value="<?php echo __('Verify'); ?>" onclick="powerpress_get_media_info('<?php echo $FeedSlug; ?>');" alt="<?php echo __('Verify Media'); ?>" />
134
+ <img id="powerpress_check_<?php echo $FeedSlug; ?>" src="<?php echo admin_url(); ?>images/loading.gif" style="vertical-align:text-top; display: none;" alt="<?php echo __('Checking Media'); ?>" />
135
 
136
  <input type="hidden" id="powerpress_hosting_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][hosting]" value="<?php echo (@$ExtraData['hosting']==1?'1':'0'); ?>" />
137
+ <div id="powerpress_hosting_note_<?php echo $FeedSlug; ?>" style="margin-left: 2px; padding-bottom: 2px; padding-top: 2px; display: <?php echo (@$ExtraData['hosting']==1?'block':'none'); ?>"><em><?php echo __('Media file hosted by blubrry.com.'); ?>
138
+ (<a href="javascript:void();" title="Remove blubrry hosted media file" onclick="powerpress_remove_hosting('<?php echo $FeedSlug; ?>');return false;"><?php echo __('remove'); ?></a>)
139
  </em></div>
140
  <?php
141
 
142
+ if( $GeneralSettings['episode_box_mode'] == 2 && ( !empty($GeneralSettings['episode_box_no_player']) || !empty($GeneralSettings['episode_box_no_links']) || !empty($GeneralSettings['episode_box_no_player_and_links']) ) )
143
  {
144
  ?>
145
+ <div style="margin-left: 2px; padding-bottom: 2px; padding-top: 2px;">
146
+ <?php
147
+ if( $GeneralSettings['episode_box_no_player_and_links'] )
148
+ {
149
+ ?>
150
+ <span><input id="powerpress_no_player_and_links_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][no_player_and_links]" value="1" type="checkbox" <?php echo ($NoPlayer==1&&$NoLinks==1?'checked':''); ?> /> <?php echo __('Do not display player and media links'); ?></span>
151
+ <?php
152
+ }
153
+ if( $GeneralSettings['episode_box_no_player'] )
154
+ {
155
+ ?>
156
+ <span style="margin-right: 20px;"><input id="powerpress_no_player_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][no_player]" value="1" type="checkbox" <?php echo ($NoPlayer==1?'checked':''); ?> /> <?php echo __('Do not display player'); ?></span>
157
+ <?php
158
+ }
159
+ if( @$GeneralSettings['episode_box_no_links'] )
160
+ {
161
+ ?>
162
+ <span><input id="powerpress_no_links_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][no_links]" value="1" type="checkbox" <?php echo ($NoLinks==1?'checked':''); ?> /> <?php echo __('Do not display media links'); ?></span>
163
+ <?php
164
+ }
165
+ ?>
166
+ </div>
167
  <?php
168
  }
169
  ?>
174
  {
175
  ?>
176
  <div class="powerpress_row">
177
+ <label><?php echo __('File Size'); ?></label>
178
  <div class="powerpress_row_content">
179
  <div style="margin-bottom: 4px;">
180
  <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
186
  </div>
187
  </div>
188
  <div class="powerpress_row">
189
+ <label><?php echo __('Duration'); ?></label>
190
  <div class="powerpress_row_content">
191
  <div style="margin-bottom: 4px;">
192
  <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)
220
  {
221
  ?>
222
  <div class="powerpress_row">
223
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][embed]"><?php echo __('Media Embed'); ?></label>
224
  <div class="powerpress_row_content">
225
  <textarea id="powerpress_embed_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][embed]" style="width: 90%; height: 80px; font-size: 90%;" onfocus="this.select();"><?php echo htmlspecialchars($Embed); ?></textarea>
226
  </div>
232
  {
233
  ?>
234
  <div class="powerpress_row">
235
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][image]"><?php echo __('Cover Image'); ?></label>
236
  <div class="powerpress_row_content">
237
  <input id="powerpress_image_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][image]" value="<?php echo htmlspecialchars($CoverImage); ?>" style="width: 90%; font-size: 90%;" size="250" />
238
  </div>
239
  <div class="powerpress_row_content">
240
+ <em><?php echo __('Cover image for Quicktime (m4v, mov, etc..) video only. e.g. http://example.com/path/to/image.jpg'); ?></em>
241
  </div>
242
  </div>
243
  <?php
247
  {
248
  ?>
249
  <div class="powerpress_row">
250
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][keywords]"><?php echo __('iTunes Keywords'); ?></label>
251
  <div class="powerpress_row_content">
252
  <input id="powerpress_keywords_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][keywords]" value="<?php echo htmlspecialchars($iTunesKeywords); ?>" style="width: 90%; font-size: 90%;" size="250" />
253
  </div>
254
  <div class="powerpress_row_content">
255
+ <em><?php echo __('Enter up to 12 keywords separated by commas. Leave blank to use your blog post tags.'); ?></em>
256
  </div>
257
  </div>
258
  <?php
262
  {
263
  ?>
264
  <div class="powerpress_row">
265
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][subtitle]"><?php echo __('iTunes Subtitle'); ?></label>
266
  <div class="powerpress_row_content">
267
  <input id="powerpress_subtitle_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][subtitle]" value="<?php echo htmlspecialchars($iTunesSubtitle); ?>" style="width: 90%; font-size: 90%;" size="250" />
268
  </div>
269
  <div class="powerpress_row_content">
270
+ <em><?php echo __('Your subtitle may not contain HTML and cannot exceed 250 characters in length. Leave blank to use the first 250 characters of your blog post.'); ?></em>
 
271
  </div>
272
  </div>
273
  <?php
277
  {
278
  ?>
279
  <div class="powerpress_row">
280
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][summary]"><?php echo __('iTunes Summary'); ?></label>
281
  <div class="powerpress_row_content">
282
  <textarea id="powerpress_summary_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][summary]" style="width: 90%; height: 80px; font-size: 90%;"><?php echo htmlspecialchars($iTunesSummary); ?></textarea>
283
  </div>
284
  <div class="powerpress_row_content">
285
+ <em><?php echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length. Leave blank to use your blog post.'); ?></em>
 
286
  </div>
287
  </div>
288
  <?php
292
  {
293
  ?>
294
  <div class="powerpress_row">
295
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][summary]"><?php echo __('iTunes Explicit'); ?></label>
296
  <div class="powerpress_row_content">
297
  <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 200px;">
298
  <?php
299
+ $explicit_array = array(''=>__('Use feed\'s explicit setting'), 0=>__('no - display nothing'), 1=>__('yes - explicit content'), 2=>__('clean - no explicit content') );
300
 
301
  while( list($value,$desc) = each($explicit_array) )
302
  echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
powerpressadmin-mt.php CHANGED
@@ -51,7 +51,7 @@ if( !function_exists('add_action') )
51
  if( isset($_GET['include_only_ext']) && trim($_GET['include_only_ext']) != '' )
52
  {
53
  $extensions = strtolower(preg_replace("/\s/", '', $_GET['include_only_ext']));
54
- $ext_array = split(',', trim($extensions, ',') );
55
  if( in_array( strtolower($partsFile['extension']), $ext_array ) )
56
  {
57
  if( !isset($g_import_mt_extensions[ strtolower($partsFile['extension']) ]) )
@@ -462,7 +462,7 @@ else
462
  if( !$enclosure_data )
463
  continue;
464
 
465
- list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = split("\n", $enclosure_data);
466
  if( $EnclosureURL )
467
  {
468
  $CurrentEnclosures[ $feed_slug ] = array();
51
  if( isset($_GET['include_only_ext']) && trim($_GET['include_only_ext']) != '' )
52
  {
53
  $extensions = strtolower(preg_replace("/\s/", '', $_GET['include_only_ext']));
54
+ $ext_array = explode(',', trim($extensions, ',') );
55
  if( in_array( strtolower($partsFile['extension']), $ext_array ) )
56
  {
57
  if( !isset($g_import_mt_extensions[ strtolower($partsFile['extension']) ]) )
462
  if( !$enclosure_data )
463
  continue;
464
 
465
+ list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = explode("\n", $enclosure_data);
466
  if( $EnclosureURL )
467
  {
468
  $CurrentEnclosures[ $feed_slug ] = array();
powerpressadmin-player-page.php CHANGED
@@ -567,7 +567,8 @@ function audio_player_defaults()
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
 
567
  <?php _e("Text In Player"); ?>
568
  </th>
569
  <td>
570
+ <div><input type="text" style="width: 60%;" id="titles" name="Player[titles]" class="other_field" value="<?php echo $PlayerSettings['titles']; ?>" maxlength="100" /></div>
571
+ <small><?php _e('Enter \'TRACK\' to display track name from mp3. Only works if media is hosted on same server as blog.'); ?></small>
572
  </td>
573
  </tr>
574
 
powerpressadmin-podpress.php CHANGED
@@ -77,7 +77,7 @@ if( !function_exists('add_action') )
77
  $clean_data[ $episode_index ]['duration'] = powerpress_readable_duration($episode_data['duration'], true);
78
  $ContentType = powerpress_get_contenttype( $episode_data['URI'] );
79
  if( $ContentType )
80
- $clean_data[ $episode_index ]['type'] = $ContentType;
81
  }
82
  }
83
 
@@ -99,7 +99,7 @@ if( !function_exists('add_action') )
99
  if( $enclosure_data )
100
  {
101
  $Included = false;
102
- list($EnclosureURL,$null) = split("\n", $enclosure_data);
103
  $return[ $row['ID'] ]['enclosure'] = $enclosure_data;
104
 
105
  while( list($episode_index_temp,$episode_data_temp) = each($clean_data) )
@@ -187,7 +187,7 @@ if( !function_exists('add_action') )
187
  if( $headers && $headers['content-length'] )
188
  $EpisodeData['size'] = (int) $headers['content-length'];
189
  }
190
- $EnclosureData = $EpisodeData['url'] . "\n" . $EpisodeData['size'] . "\n". $EpisodeData['type'];
191
  if( $EpisodeData['duration'] )
192
  $EnclosureData .= "\n".serialize( array('duration'=>$EpisodeData['duration']) );
193
 
@@ -422,7 +422,7 @@ function check_radio_selection(obj, PostID, FileIndex)
422
  if( !$enclosure_data )
423
  continue;
424
 
425
- list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = split("\n", $enclosure_data);
426
  if( $EnclosureURL )
427
  {
428
  $CurrentEnclosures[ $feed_slug ] = array();
77
  $clean_data[ $episode_index ]['duration'] = powerpress_readable_duration($episode_data['duration'], true);
78
  $ContentType = powerpress_get_contenttype( $episode_data['URI'] );
79
  if( $ContentType )
80
+ $clean_data[ $episode_index ]['type'] = trim($ContentType);
81
  }
82
  }
83
 
99
  if( $enclosure_data )
100
  {
101
  $Included = false;
102
+ list($EnclosureURL,$null) = explode("\n", $enclosure_data);
103
  $return[ $row['ID'] ]['enclosure'] = $enclosure_data;
104
 
105
  while( list($episode_index_temp,$episode_data_temp) = each($clean_data) )
187
  if( $headers && $headers['content-length'] )
188
  $EpisodeData['size'] = (int) $headers['content-length'];
189
  }
190
+ $EnclosureData = trim($EpisodeData['url']) . "\n" . trim($EpisodeData['size']) . "\n". trim($EpisodeData['type']);
191
  if( $EpisodeData['duration'] )
192
  $EnclosureData .= "\n".serialize( array('duration'=>$EpisodeData['duration']) );
193
 
422
  if( !$enclosure_data )
423
  continue;
424
 
425
+ list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = explode("\n", $enclosure_data);
426
  if( $EnclosureURL )
427
  {
428
  $CurrentEnclosures[ $feed_slug ] = array();
powerpressadmin-tools.php CHANGED
@@ -7,14 +7,23 @@
7
  ?>
8
  <h2><?php echo __("PowerPress Tools"); ?></h2>
9
 
10
- <p style="margin-bottom: 0;">Useful utilities and tools for PowerPress.</p>
11
 
12
 
13
  <table class="form-table">
14
  <tr valign="top">
15
  <th scope="row"><?php echo __("Import Settings"); ?></th>
16
  <td>
17
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podpress-settings", 'powerpress-podpress-settings'); ?>" onclick="return confirm('Import PodPress settings, are you sure?\n\nExisting settings will be overwritten.');">Import PodPress Settings</a></strong></p>
 
 
 
 
 
 
 
 
 
18
  </td>
19
  </tr>
20
 
@@ -22,11 +31,11 @@
22
  <th scope="row"><?php echo __("Import Episodes"); ?></th>
23
  <td>
24
 
25
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podpress-epiosdes"); ?>">Import PodPress Episodes</a></strong> </p>
26
- <p>Import PodPress created episodes to PowerPress specific podcast feed(s).</p>
27
 
28
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-mt-epiosdes"); ?>">Import Movable Type/Blogger Episodes</a></strong> (media linked in blog posts)</p>
29
- <p>Import Movable Type/Blogger podcast episodes to PowerPress specific podcast feed(s).</p>
30
 
31
  </td>
32
  </tr>
@@ -36,27 +45,39 @@
36
  <th scope="row"><?php echo __("Add Update Services"); ?></th>
37
  <td>
38
 
39
- <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-ping-sites"); ?>">Add Update Services / Ping Sites</a></strong> (notify podcast directories when you publish new episodes)</p>
40
- <p>Add Update Services / Ping Sites geared towards podcasting.</p>
41
 
42
  </td>
43
  </tr>
44
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  <!-- use_caps -->
47
  <tr valign="top">
48
  <th scope="row"><?php echo __("User Capabilities"); ?></th>
49
  <td>
50
  <?php
51
- if( $General['use_caps'] )
52
  {
53
  ?>
54
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;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
@@ -67,10 +88,10 @@
67
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;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
  }
@@ -80,14 +101,16 @@
80
  ?>
81
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;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
  }
@@ -96,24 +119,27 @@
96
  ?>
97
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;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>
@@ -125,7 +151,19 @@
125
  <td>
126
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-clear-update_plugins", 'powerpress-clear-update_plugins'); ?>"><?php _e('Clear Plugins Update Cache'); ?></a></strong></p>
127
  <p>
128
- The list of plugins on the plugins page will cache the plugin version numbers for up to 24 hours. Click the link above to clear the cache to get the latest versions of plugins listed on your <a href="<?php echo admin_url(). 'plugins.php'; ?>" title="Plugins">plugins</a> page.
 
 
 
 
 
 
 
 
 
 
 
 
129
  </p>
130
  </td>
131
  </tr>
@@ -136,7 +174,7 @@
136
  <td>
137
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-diagnostics"); ?>"><?php _e('Diagnose Your PowerPress Installation'); ?></a></strong></p>
138
  <p>
139
- The Diagnostics page checks to see if your server is configured to support all of the available features in Blubrry PowerPress.
140
  </p>
141
  </td>
142
  </tr>
7
  ?>
8
  <h2><?php echo __("PowerPress Tools"); ?></h2>
9
 
10
+ <p style="margin-bottom: 0;"><?php echo __('Useful utilities and tools for PowerPress.'); ?></p>
11
 
12
 
13
  <table class="form-table">
14
  <tr valign="top">
15
  <th scope="row"><?php echo __("Import Settings"); ?></th>
16
  <td>
17
+ <p style="margin-top: 5px;"><strong>
18
+ <a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podpress-settings", 'powerpress-podpress-settings'); ?>"
19
+ onclick="return confirm('<?php echo __('Import PodPress settings, are you sure?\n\nExisting PowerPress settings will be overwritten.'); ?>');"><?php echo __('Import PodPress Settings'); ?></a></strong></p>
20
+ <p><?php echo __('Import settings from PodPress into PowerPress.'); ?></p>
21
+
22
+ <p style="margin-top: 5px;"><strong>
23
+ <a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podcasting-settings", 'powerpress-podcasting-settings'); ?>"
24
+ onclick="return confirm('<?php echo __('Import Podcasting plugin settings, are you sure?\n\nExisting PowerPress settings will be overwritten.'); ?>');"><?php echo htmlspecialchars(__('Import plugin "Podcasting" Settings')); ?></a></strong></p>
25
+ <p><?php echo htmlspecialchars(__('Import settings from the plugin "Podcasting" into PowerPress.')); ?></p>
26
+ <p><?php echo htmlspecialchars(__('Note: Episodes created using the plugin "Podcasting" do not require importing.')); ?></p>
27
  </td>
28
  </tr>
29
 
31
  <th scope="row"><?php echo __("Import Episodes"); ?></th>
32
  <td>
33
 
34
+ <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-podpress-epiosdes"); ?>"><?php echo __('Import PodPress Episodes'); ?></a></strong> </p>
35
+ <p><?php echo __('Import PodPress created episodes to PowerPress specific podcast feed(s).'); ?></p>
36
 
37
+ <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-mt-epiosdes"); ?>"><?php echo __('Import Movable Type/Blogger/Joomla/TypePad Episodes'); ?></a></strong> <?php echo __('(media linked in blog posts)'); ?></p>
38
+ <p><?php echo __('Import Movable Type/Blogger/Joomla/TypePad (and most other blogging systems) podcast episodes to PowerPress specific podcast feed(s).'); ?></p>
39
 
40
  </td>
41
  </tr>
45
  <th scope="row"><?php echo __("Add Update Services"); ?></th>
46
  <td>
47
 
48
+ <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-ping-sites"); ?>"><?php echo __('Add Update Services / Ping Sites'); ?></a></strong> <?php echo __('(notify podcast directories when you publish new episodes)'); ?></p>
49
+ <p><?php echo __('Add Update Services / Ping Sites geared towards podcasting.</p>'); ?>
50
 
51
  </td>
52
  </tr>
53
 
54
+ <!-- find_replace -->
55
+ <tr valign="top">
56
+ <th scope="row"><?php echo __("Find and Replace Media"); ?></th>
57
+ <td>
58
+
59
+ <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-find-replace"); ?>"><?php echo __('Find and Replace for Episode URLs'); ?></a></strong></p>
60
+ <p>
61
+ <?php echo __('Find and replace complete or partial segments of media URLs. Useful if you move your media to a new web site or service.'); ?>
62
+ </p>
63
+
64
+ </td>
65
+ </tr>
66
 
67
  <!-- use_caps -->
68
  <tr valign="top">
69
  <th scope="row"><?php echo __("User Capabilities"); ?></th>
70
  <td>
71
  <?php
72
+ if( !empty($General['use_caps']) )
73
  {
74
  ?>
75
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-remove-caps", 'powerpress-remove-caps'); ?>"><?php _e('Remove PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
76
  <p>
77
+ <?php echo __('Podcasting capability allows administrators, editors and authors access to create and configure podcast episodes.
78
  Only administrators will be able to view media statistics from the WordPress Dashboard. Contributors, subscribers and other
79
+ custom users will not have access to create podcast episodes or view statistics from the dashboard. Due to this feature\'s
80
+ complexity, it is not supported by Blubrry.com.'); ?>
81
  </p>
82
 
83
  <?php
88
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-add-caps", 'powerpress-add-caps'); ?>">
89
  <?php _e('Add PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
90
  <p>
91
+ <?php echo __('Adding podcasting capability will allow administrators, editors and authors access to create and configure podcast episodes.
92
  Only administrators will be able to view media statistics from the WordPress Dashboard. Contributors, subscribers and other
93
+ custom users will not have access to create podcast episodes or view statistics from the dashboard. Due to this feature\'s
94
+ complexity, it is not supported by Blubrry.com.'); ?>
95
  </p>
96
  <?php
97
  }
101
  ?>
102
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;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>
103
  <p>
104
+ <?php
105
+ echo sprintf( __("To use this feature, go to %s 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'."),
106
+ '<a href="'. admin_url("admin.php?page=powerpressadmin_customfeeds.php") .'" title="'. __('Podcast Channels') .'">'. __('Podcast Channels') .'</a>' );
107
+ ?>
108
  </p>
109
  <p>
110
+ <?php echo __('Password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
111
  podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
112
  Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
113
+ channels. Due to this feature\'s complexity, it is not supported by Blubrry.com.'); ?>
114
  </p>
115
  <?php
116
  }
119
  ?>
120
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;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>
121
  <p>
122
+ <?php echo __('Adding password protection capabilities for custom podcast channel feeds lets you control who can listen and view your
123
  podcast. This feature allows you to password-protect custom podcast channels by adding a new role called "Premium
124
  Subscriber." Only users with the "Premium Subscriber" role have access to your password protected custom podcast
125
+ channels. Due to this feature\'s complexity, it is not supported by Blubrry.com.'); ?>
126
  </p>
127
  <?php
128
  }
129
  ?>
130
 
131
+ <p><strong><?php echo __('What are Roles and Capabilities?'); ?></strong></p>
132
  <p>
133
+ <?php
134
+ echo sprintf( __("The WordPress %s feature gives the blog owner the ability to control what users can and
135
+ cannot do in the blog. You will most likely need a roles and capabilities plugin such as %s, %s, or %s
136
+ to take advantage of these features. Due to this feature's complexity, it is not supported by Blubrry.com."),
137
+ '<a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">'. __('Roles and Capabilities') .'</a>',
138
+ '<a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">'. __('Role Manager') .'</a>',
139
+ '<a href="http://alkivia.org/wordpress/capsman/" target="_blank">'. __('Capability Manager') .'</a>',
140
+ '<a href="http://agapetry.net/category/plugins/role-scoper/" target="_blank">'. __('Role Scoper') .'</a>'
141
+ );
142
+ ?>
143
  </p>
144
 
145
  </td>
151
  <td>
152
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-clear-update_plugins", 'powerpress-clear-update_plugins'); ?>"><?php _e('Clear Plugins Update Cache'); ?></a></strong></p>
153
  <p>
154
+ <?php
155
+ echo sprintf( __("The list of plugins on the plugins page will cache the plugin version numbers for up to 24 hours.
156
+ Click the link above to clear the cache to get the latest versions of plugins listed on your %s
157
+
158
+ "),
159
+ '<a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">'. __('Roles and Capabilities') .'</a>',
160
+ '<a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">'. __('Role Manager') .'</a>',
161
+ '<a href="http://alkivia.org/wordpress/capsman/" target="_blank">'. __('Capability Manager') .'</a>',
162
+ '<a href="http://agapetry.net/category/plugins/role-scoper/" target="_blank">'. __('Role Scoper') .'</a>'
163
+ );
164
+
165
+ ?>
166
+ <a href="<?php echo admin_url(). 'plugins.php'; ?>" title="Plugins">plugins</a> page.
167
  </p>
168
  </td>
169
  </tr>
174
  <td>
175
  <p style="margin-top: 5px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_tools.php&amp;action=powerpress-diagnostics"); ?>"><?php _e('Diagnose Your PowerPress Installation'); ?></a></strong></p>
176
  <p>
177
+ <?php echo __('The Diagnostics page checks to see if your server is configured to support all of the available features in Blubrry PowerPress.'); ?>
178
  </p>
179
  </td>
180
  </tr>
powerpressadmin.php CHANGED
@@ -25,6 +25,23 @@ function powerpress_page_message_print()
25
  $g_powerpress_page_message = '';
26
  }
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  function powerpress_admin_init()
29
  {
30
  global $wp_rewrite;
@@ -80,8 +97,8 @@ function powerpress_admin_init()
80
  }
81
 
82
  // Save the posted value in the database
83
- $Feed = $_POST['Feed'];
84
- $General = $_POST['General'];
85
  $FeedSlug = (isset($_POST['feed_slug'])?$_POST['feed_slug']:false);
86
  $Category = (isset($_POST['cat'])?$_POST['cat']:false);
87
 
@@ -135,7 +152,7 @@ function powerpress_admin_init()
135
  }
136
  else
137
  {
138
- powerpress_page_message_add_error( 'Invalid RSS image: ' . htmlspecialchars($_FILES['rss2_image_file']['name']) );
139
  }
140
  }
141
 
@@ -161,7 +178,7 @@ function powerpress_admin_init()
161
  }
162
  else
163
  {
164
- powerpress_page_message_add_error( 'Invalid Coverat image: ' . htmlspecialchars($_FILES['coverart_image_file']['name']) );
165
  }
166
  }
167
 
@@ -218,8 +235,14 @@ function powerpress_admin_init()
218
 
219
  if( !isset($General['episode_box_embed'] ) )
220
  $General['episode_box_embed'] = 0;
 
 
221
  if( !isset($General['episode_box_no_player'] ) )
222
  $General['episode_box_no_player'] = 0;
 
 
 
 
223
  if( !isset($General['episode_box_cover_image'] ) )
224
  $General['episode_box_cover_image'] = 0;
225
  if( !isset($General['episode_box_keywords'] ) )
@@ -276,17 +299,17 @@ function powerpress_admin_init()
276
  }
277
  else if( isset($results['error']) )
278
  {
279
- $error = 'Blubrry Hosting Error (updating coverart): '. $results['error'];
280
  }
281
  else
282
  {
283
- $error = 'An error occurred updating the coverart with your Blubrry Services Account.';
284
  }
285
 
286
  }
287
  else
288
  {
289
- powerpress_page_message_add_error( 'Coverart Image was not uploaded to your Blubrry Services Account. It will <u>NOT</u> be added to your mp3s.' );
290
  }
291
  }
292
  }
@@ -376,7 +399,7 @@ function powerpress_admin_init()
376
 
377
  if( @$PingResults['success'] )
378
  {
379
- powerpress_page_message_add_notice( 'iTunes Ping Successful. Podcast Feed URL: '. $PingResults['feed_url'] );
380
  }
381
  else
382
  {
@@ -470,6 +493,14 @@ function powerpress_admin_init()
470
 
471
  $_GET['action'] = 'powerpress-ping-sites';
472
  }; break;
 
 
 
 
 
 
 
 
473
  case 'powerpress-importpodpress': {
474
  check_admin_referer('powerpress-import-podpress');
475
 
@@ -580,7 +611,7 @@ function powerpress_admin_init()
580
  remove_action($hook, $hook, 10, 1); // This may not be necessary
581
  $wp_rewrite->flush_rules(); // This is definitely necessary
582
 
583
- powerpress_page_message_add_notice( 'Feed deleted successfully.' );
584
  }
585
  }; break;
586
  case 'powerpress-delete-category-feed': {
@@ -596,7 +627,7 @@ function powerpress_admin_init()
596
  }
597
  delete_option('powerpress_cat_feed_'.$cat_ID); // Delete the actual feed settings
598
 
599
- powerpress_page_message_add_notice( 'Removed podcast settings for category feed successfully.' );
600
  }; break;
601
  case 'powerpress-podpress-settings': {
602
  check_admin_referer('powerpress-podpress-settings');
@@ -607,6 +638,16 @@ function powerpress_admin_init()
607
  else
608
  powerpress_page_message_add_error( __('No Podpress settings found.') );
609
 
 
 
 
 
 
 
 
 
 
 
610
  }; break;
611
  case 'powerpress-add-caps': {
612
  check_admin_referer('powerpress-add-caps');
@@ -760,7 +801,7 @@ function powerpress_htmlspecialchars($data)
760
  {
761
  if( !$data )
762
  return $data;
763
- if( is_array($value) )
764
  {
765
  while( list($key,$value) = each($data) )
766
  {
@@ -805,31 +846,22 @@ function powerpress_admin_menu()
805
  { // Otherwise we're using a version of wordpress that is not supported.
806
 
807
  require_once( dirname(__FILE__).'/powerpressadmin-metabox.php');
808
- add_meta_box('powerpress-podcast', 'Podcast Episode', 'powerpress_meta_box', 'page', 'normal');
809
 
810
  if( isset($Powerpress['custom_feeds']) )
811
  {
812
- if( !isset($Powerpress['custom_feeds']['podcast'] ) )
813
- {
814
- add_meta_box('powerpress-podcast', 'Podcast Episode (default)', 'powerpress_meta_box', 'post', 'normal');
815
-
816
- }
817
- else
818
- {
819
- //add_meta_box('powerpress-podcast', 'Podcast Episode for: '.$Powerpress['custom_feeds']['podcast'].' (default)', 'powerpress_meta_box', 'post', 'normal');
820
- add_meta_box('powerpress-podcast', 'Podcast Episode (default)', 'powerpress_meta_box', 'post', 'normal');
821
- }
822
 
823
  while( list($feed_slug, $feed_title) = each($Powerpress['custom_feeds']) )
824
  {
825
  if( $feed_slug == 'podcast' )
826
  continue;
827
- add_meta_box('powerpress-'.$feed_slug, 'Podcast Episode for Custom Feed: '.$feed_title, 'powerpress_meta_box', 'post', 'normal');
828
  }
829
  }
830
  else
831
  {
832
- add_meta_box('powerpress-podcast', 'Podcast Episode', 'powerpress_meta_box', 'post', 'normal');
833
  }
834
  }
835
 
@@ -1032,6 +1064,13 @@ function powerpress_edit_post($post_ID, $post)
1032
  $ToSerialize['image'] = stripslashes($Powerpress['image']);
1033
  if( isset($Powerpress['no_player']) && $Powerpress['no_player'] )
1034
  $ToSerialize['no_player'] = 1;
 
 
 
 
 
 
 
1035
  if( $Powerpress['set_duration'] == -1 )
1036
  unset($ToSerialize['duration']);
1037
  if( count($ToSerialize) > 0 ) // Lets add the serialized data
@@ -1137,7 +1176,7 @@ function powerpress_admin_head()
1137
  $page_name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix);
1138
 
1139
  // Powerpress page
1140
- if( strstr($_GET['page'], 'powerpress' ) !== false )
1141
  {
1142
  ?>
1143
  <script type="text/javascript">
@@ -1148,7 +1187,7 @@ function powerpress_show_field(id, show) {
1148
  document.getElementById(id).style.display = (show?"block":"none");
1149
  }
1150
  function powerpress_new_feed_url_prompt() {
1151
- var Msg = '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.\n\nDO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.\n\nAre you sure you want to continue?';
1152
  if( confirm(Msg) ) {
1153
  powerpress_show_field('new_feed_url_step_1', false);
1154
  powerpress_show_field('new_feed_url_step_2', true);
@@ -1159,12 +1198,12 @@ function powerpress_changemode(Mode)
1159
  {
1160
  if( Mode )
1161
  {
1162
- if( !confirm("Are you sure you want to switch to Advanced Mode?\n\nAdvanced Mode provides:\n * Advanced Settings\n * Presentation Settings\n * Extensive Feed Settings \n * Custom Feeds \n * Useful Tools") )
1163
  return false;
1164
  }
1165
  else
1166
  {
1167
- if( !confirm("Are you sure you want to switch to Simple Mode?\n\nSimple Mode provides:\n * Only the bare essential settings\n * All settings on one page") )
1168
  return false;
1169
  }
1170
  document.getElementById('powerpress_advanced_mode').value = Mode;
@@ -1173,9 +1212,7 @@ function powerpress_changemode(Mode)
1173
  }
1174
 
1175
  jQuery(document).ready(function($) {
1176
-
1177
  jQuery("#powerpress_settings_page").tabs({ cookie: { expires: 30 } });
1178
-
1179
  });
1180
 
1181
  </script>
@@ -1276,7 +1313,7 @@ function powerpress_check_url(url)
1276
  {
1277
  if( validChars.indexOf( url.charAt(x) ) == -1 )
1278
  {
1279
- 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.');
1280
  jQuery( '#'+DestDiv ).css('display', 'block');
1281
  return false;
1282
  }
@@ -1291,7 +1328,7 @@ function powerpress_check_url(url)
1291
  ?>
1292
  if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1293
  {
1294
- 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://.');
1295
  jQuery( '#'+DestDiv ).css('display', 'block');
1296
  return false;
1297
  }
@@ -1300,7 +1337,7 @@ function powerpress_check_url(url)
1300
  ?>
1301
  if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1302
  {
1303
- 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.');
1304
  jQuery( '#'+DestDiv ).css('display', 'block');
1305
  return false;
1306
  }
@@ -1371,18 +1408,18 @@ function powerpress_get_media_info(FeedSlug)
1371
  }
1372
  else
1373
  {
1374
- 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>' );
1375
  jQuery( '#powerpress_success_'+FeedSlug ).css('display', 'block');
1376
  // setTimeout( function() { jQuery( '#powerpress_success_'+FeedSlug ).fadeOut(1000); }, 10000 );
1377
  }
1378
  }
1379
  else
1380
  {
1381
- var Parts = response.split("\n", 2);
1382
  if( Parts[1] )
1383
  jQuery( '#powerpress_warning_'+FeedSlug ).html( Parts[1] );
1384
  else
1385
- jQuery( '#powerpress_warning_'+FeedSlug ).text( 'Unknown error occurred while checking Media URL.' );
1386
  jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
1387
  }
1388
  },
@@ -1390,9 +1427,9 @@ function powerpress_get_media_info(FeedSlug)
1390
 
1391
  jQuery('#powerpress_check_'+FeedSlug).css("display", 'none');
1392
  if( strError == 'timeout' )
1393
- jQuery( '#powerpress_warning_'+FeedSlug ).text( 'Operation timed out.' );
1394
  else
1395
- jQuery( '#powerpress_warning_'+FeedSlug ).text( 'Unknown error occurred.' );
1396
  jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
1397
  }
1398
  });
@@ -1402,7 +1439,7 @@ function powerpress_get_media_info(FeedSlug)
1402
 
1403
  function powerpress_remove_hosting(FeedSlug)
1404
  {
1405
- if( confirm('Are you sure you want to remove this media file?') )
1406
  {
1407
  jQuery( '#powerpress_url_'+FeedSlug ).attr("readOnly", false);
1408
  jQuery( '#powerpress_url_'+FeedSlug ).val('');
@@ -1463,6 +1500,8 @@ function powerpress_media_info_ajax()
1463
  echo powerpress_readable_duration($MediaInfo['duration'], true) ."\n";
1464
  if( isset($MediaInfo['warnings']) )
1465
  echo $MediaInfo['warnings'];
 
 
1466
  exit;
1467
  }
1468
 
@@ -1470,7 +1509,8 @@ function powerpress_media_info_ajax()
1470
  if( $MediaInfo['error'] )
1471
  echo $MediaInfo['error'];
1472
  else
1473
- echo 'Unknown error occurred looking up media information.';
 
1474
  exit;
1475
  }
1476
 
@@ -1486,12 +1526,12 @@ function powerpress_cat_row_actions($actions, $category)
1486
  if( isset($General['custom_cat_feeds']) && is_array($General['custom_cat_feeds']) && in_array($category->cat_ID, $General['custom_cat_feeds']) )
1487
  {
1488
  $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;from_categories=1&amp;action=powerpress-editcategoryfeed&amp;cat=') . $category->cat_ID;
1489
- $actions['powerpress'] = '<a href="' . $edit_link . '" title="'. _('Edit Blubrry PowerPress Podcast Settings') .'">' . __('Podcast&nbsp;Settings') . '</a>';
1490
  }
1491
  else
1492
  {
1493
  $edit_link = admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;from_categories=1&amp;action=powerpress-addcategoryfeed&amp;cat=".$category->cat_ID, 'powerpress-add-category-feed');
1494
- $actions['powerpress'] = '<a href="' . $edit_link . '" title="'. _('Add Blubrry PowerPress Podcasting Settings') .'">' . __('Add&nbsp;Podcasting') . '</a>';
1495
  }
1496
  return $actions;
1497
  }
@@ -1525,15 +1565,15 @@ function powerpress_edit_category_form($cat)
1525
  {
1526
  $enable_link = admin_url() . wp_nonce_url('categories.php?action=powerpress-enable-categorypodcasting', 'powerpress-enable-categorypodcasting');
1527
  ?>
1528
- <h2>PowerPress Category Podcasting</h2>
1529
- <p><a href="<?php echo $enable_link; ?>" title="Enable Category Podcasting">Enable Category Podcasting</a> if you would like to add specific podcasting settings to your blog categories.</p>
1530
  <?php
1531
  }
1532
  else
1533
  {
1534
  ?>
1535
- <h2>PowerPress Category Podcasting</h2>
1536
- <p>PowerPress Category Podcasting is enabled. Select <u>Add Podcasting</u> to add podcasting settings. Select <u>Podcast Settings</u> to edit existing podcast settings.</p>
1537
  <?php
1538
  }
1539
  ?>
@@ -1567,14 +1607,14 @@ function powerpress_admin_page_footer($SaveButton=true, $form=true)
1567
  {
1568
  if( $SaveButton ) { ?>
1569
  <p class="submit">
1570
- <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary" value="<?php _e('Save Changes' ) ?>" />
1571
  </p>
1572
  <?php } ?>
1573
  <p style="font-size: 85%; text-align: center; padding-bottom: 25px;">
1574
- <a href="http://www.blubrry.com/powerpress/" title="Blubrry PowerPress" target="_blank">Blubrry PowerPress</a> <?php echo POWERPRESS_VERSION; ?>
1575
- &#8212; <a href="http://help.blubrry.com/blubrry-powerpress/" target="_blank" title="Blubrry PowerPress Documentation">Documentation</a> |
1576
- <a href="http://forum.blubrry.com/" target="_blank" title="Blubrry Forum">Forum</a> |
1577
- <a href="http://twitter.com/blubrry" target="_blank" title="Follow Blubrry on Twitter">Follow Blubrry on Twitter</a>
1578
  </p>
1579
  <?php if( $form ) { ?>
1580
  </form><?php } ?>
@@ -1598,7 +1638,6 @@ function powerpress_admin_page_basic()
1598
 
1599
  powerpress_admin_page_header();
1600
  require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
1601
- require_once( dirname(__FILE__).'/powerpressadmin-appearance.php');
1602
  require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
1603
  powerpress_admin_basic();
1604
  powerpress_admin_page_footer(true);
@@ -1696,6 +1735,12 @@ function powerpress_admin_page_tools()
1696
  powerpress_admin_ping_sites();
1697
  powerpress_admin_page_footer(false);
1698
  }; break;
 
 
 
 
 
 
1699
  case 'powerpress-diagnostics': {
1700
  powerpress_admin_page_header('powerpress/powerpressadmin_tools.php', false);
1701
  require_once( dirname(__FILE__).'/powerpressadmin-diagnostics.php');
@@ -1809,7 +1854,7 @@ function powerpress_ping_itunes($iTunes_url)
1809
  {
1810
  // Pull the iTunes FEEDID from the URL...
1811
  if( !preg_match('/id=(\d+)/', $iTunes_url, $matches) )
1812
- return array('error'=>true, 'content'=>'iTunes URL required to ping iTunes.', 'podcast_id'=>0 );
1813
 
1814
  $FEEDID = $matches[1];
1815
 
@@ -1826,15 +1871,15 @@ function powerpress_ping_itunes($iTunes_url)
1826
  sleep(1); // wait just a second :)
1827
  $tempdata = powerpress_remote_fopen($ping_url);
1828
  if( $tempdata == false )
1829
- return array('error'=>true, 'content'=>'Unable to connect to iTunes ping server.', 'podcast_id'=>trim($PodcastID));
1830
  }
1831
 
1832
  if( stristr($tempdata, 'No Podcast Found') )
1833
- return array('error'=>true, 'content'=>'No Podcast Found from iTunes ping request.', 'podcast_id'=>trim($PodcastID));
1834
 
1835
  // Parse the data into something readable
1836
  $results = trim( str_replace('Podcast Ping Received', '', strip_tags($tempdata) ) );
1837
- list($null, $FeedURL, $null, $null, $null, $PodcastID) = split("\n", $results );
1838
 
1839
  return array('success'=>true, 'content'=>$tempdata, 'feed_url'=>trim($FeedURL), 'podcast_id'=>trim($PodcastID) );
1840
  }
@@ -1996,7 +2041,7 @@ function powerpress_remote_fopen($url, $basic_auth = false, $post_args = array()
1996
  if( $basic_auth )
1997
  {
1998
  $UserPassDecoded = base64_decode($basic_auth);
1999
- list($User, $Pass) = split(':', $UserPassDecoded, 2);
2000
  $url_prefix = sprintf('http://%s:%s@', str_replace('@', '$', $User), $Pass);
2001
  $url = $url_prefix . substr($url, 7);
2002
  }
@@ -2025,7 +2070,7 @@ function powerpress_process_hosting($post_ID, $post_title)
2025
 
2026
  if( $EnclosureData )
2027
  {
2028
- list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = split("\n", $EnclosureData);
2029
  $EnclosureURL = trim($EnclosureURL);
2030
  $EnclosureType = trim($EnclosureType);
2031
  $EnclosureSize = trim($EnclosureSize);
@@ -2057,13 +2102,13 @@ function powerpress_process_hosting($post_ID, $post_title)
2057
  }
2058
  else if( isset($results['error']) )
2059
  {
2060
- $error = 'Blubrry Hosting Error (media info): '. $results['error'];
2061
  powerpress_add_error($error);
2062
  }
2063
  else
2064
  {
2065
- $error = 'Blubrry Hosting Error: An error occurred obtaining media information from <em>'. $EnclosureURL .'</em>. ';
2066
- $error = 'Blubrry Hosting Error (publish): An error occurred publishing media '. $EnclosureURL .'.';
2067
  $error .= '<a href="#" onclick="document.getElementById(\'powerpress_error_'. $rand_id .'\');this.style.display=\'none\';return false;">Display Error</a>';
2068
  $error .= '<div id="powerpress_error_'. $rand_id .'" style="display: none;">'. $json_data .'</div>';
2069
  powerpress_add_error($error);
@@ -2072,7 +2117,7 @@ function powerpress_process_hosting($post_ID, $post_title)
2072
  if( $error == false )
2073
  {
2074
  // Extend the max execution time here
2075
- set_time_limit(60*20); // give it 10 minutes just in case
2076
  $api_url = sprintf('%s/media/%s/%s?format=json&publish=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), urlencode($Settings['blubrry_program_keyword']), urlencode($EnclosureURL) );
2077
  $json_data = powerpress_remote_fopen($api_url, $Settings['blubrry_auth'], array(), 60*30); // give this up to 30 minutes, though 3 seocnds to 20 seconds is all one should need.
2078
  $results = powerpress_json_decode($json_data);
@@ -2105,8 +2150,11 @@ function powerpress_process_hosting($post_ID, $post_title)
2105
 
2106
  function powerpress_json_decode($value)
2107
  {
2108
- if( function_exists('json_decode') )
 
2109
  return json_decode($value, true);
 
 
2110
  if( !class_exists('Services_JSON') )
2111
  require_once( dirname(__FILE__).'/3rdparty/JSON.php');
2112
  $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
@@ -2222,6 +2270,150 @@ function powerpress_admin_import_podpress_settings()
2222
  return true;
2223
  }
2224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2225
 
2226
  function powerpress_admin_episodes_per_feed($feed_slug)
2227
  {
25
  $g_powerpress_page_message = '';
26
  }
27
 
28
+ function powerpress_admin_activate()
29
+ {
30
+ $Settings = get_option('powerpress_general');
31
+ if( $Settings == false )
32
+ {
33
+ // If no settings exist, see if either PodPress or Podcasting plugins are enabled and import those settings...
34
+ if( defined('PODPRESS_VERSION') )
35
+ {
36
+ powerpress_admin_import_podpress_settings();
37
+ }
38
+ else if( isset($GLOBALS['podcasting_player_id']) || defined('PODCASTING_VERSION') )
39
+ {
40
+ powerpress_admin_import_podcasting_settings();
41
+ }
42
+ }
43
+ }
44
+
45
  function powerpress_admin_init()
46
  {
47
  global $wp_rewrite;
97
  }
98
 
99
  // Save the posted value in the database
100
+ $Feed = (isset($_POST['Feed'])?$_POST['Feed']:false);
101
+ $General = (isset($_POST['General'])?$_POST['General']:false);
102
  $FeedSlug = (isset($_POST['feed_slug'])?$_POST['feed_slug']:false);
103
  $Category = (isset($_POST['cat'])?$_POST['cat']:false);
104
 
152
  }
153
  else
154
  {
155
+ powerpress_page_message_add_error( __('Invalid RSS image') .': '. htmlspecialchars($_FILES['rss2_image_file']['name']) );
156
  }
157
  }
158
 
178
  }
179
  else
180
  {
181
+ powerpress_page_message_add_error( __('Invalid Coverat image') .': ' . htmlspecialchars($_FILES['coverart_image_file']['name']) );
182
  }
183
  }
184
 
235
 
236
  if( !isset($General['episode_box_embed'] ) )
237
  $General['episode_box_embed'] = 0;
238
+ if( !isset($General['embed_replace_player'] ) )
239
+ $General['embed_replace_player'] = 0;
240
  if( !isset($General['episode_box_no_player'] ) )
241
  $General['episode_box_no_player'] = 0;
242
+ if( !isset($General['episode_box_no_links'] ) )
243
+ $General['episode_box_no_links'] = 0;
244
+ if( !isset($General['episode_box_no_player_and_links'] ) )
245
+ $General['episode_box_no_player_and_links'] = 0;
246
  if( !isset($General['episode_box_cover_image'] ) )
247
  $General['episode_box_cover_image'] = 0;
248
  if( !isset($General['episode_box_keywords'] ) )
299
  }
300
  else if( isset($results['error']) )
301
  {
302
+ $error = __('Blubrry Hosting Error (updating coverart)') .': '. $results['error'];
303
  }
304
  else
305
  {
306
+ $error = __('An error occurred updating the coverart with your Blubrry Services Account.');
307
  }
308
 
309
  }
310
  else
311
  {
312
+ powerpress_page_message_add_error( __('Coverart Image was not uploaded to your Blubrry Services Account. It will <u>NOT</u> be added to your mp3s.') );
313
  }
314
  }
315
  }
399
 
400
  if( @$PingResults['success'] )
401
  {
402
+ powerpress_page_message_add_notice( __('iTunes Ping Successful. Podcast Feed URL') .': '. $PingResults['feed_url'] );
403
  }
404
  else
405
  {
493
 
494
  $_GET['action'] = 'powerpress-ping-sites';
495
  }; break;
496
+ case 'powerpress-find-replace': {
497
+ check_admin_referer('powerpress-find-replace');
498
+
499
+ require_once( dirname(__FILE__) . '/powerpressadmin-find-replace.php');
500
+ powerpressadmin_find_replace_process();
501
+
502
+ $_GET['action'] = 'powerpress-find-replace';
503
+ }; break;
504
  case 'powerpress-importpodpress': {
505
  check_admin_referer('powerpress-import-podpress');
506
 
611
  remove_action($hook, $hook, 10, 1); // This may not be necessary
612
  $wp_rewrite->flush_rules(); // This is definitely necessary
613
 
614
+ powerpress_page_message_add_notice( __('Feed deleted successfully.') );
615
  }
616
  }; break;
617
  case 'powerpress-delete-category-feed': {
627
  }
628
  delete_option('powerpress_cat_feed_'.$cat_ID); // Delete the actual feed settings
629
 
630
+ powerpress_page_message_add_notice( __('Removed podcast settings for category feed successfully.') );
631
  }; break;
632
  case 'powerpress-podpress-settings': {
633
  check_admin_referer('powerpress-podpress-settings');
638
  else
639
  powerpress_page_message_add_error( __('No Podpress settings found.') );
640
 
641
+ }; break;
642
+ case 'powerpress-podcasting-settings': {
643
+ check_admin_referer('powerpress-podcasting-settings');
644
+
645
+ // Import settings here..
646
+ if( powerpress_admin_import_podcasting_settings() )
647
+ powerpress_page_message_add_notice( __('Settings imported from the plugin "Podcasting" successfully.') );
648
+ else
649
+ powerpress_page_message_add_error( __('No settings found for the plugin "Podcasting".') );
650
+
651
  }; break;
652
  case 'powerpress-add-caps': {
653
  check_admin_referer('powerpress-add-caps');
801
  {
802
  if( !$data )
803
  return $data;
804
+ if( is_array($data) )
805
  {
806
  while( list($key,$value) = each($data) )
807
  {
846
  { // Otherwise we're using a version of wordpress that is not supported.
847
 
848
  require_once( dirname(__FILE__).'/powerpressadmin-metabox.php');
849
+ add_meta_box('powerpress-podcast', __('Podcast Episode'), 'powerpress_meta_box', 'page', 'normal');
850
 
851
  if( isset($Powerpress['custom_feeds']) )
852
  {
853
+ add_meta_box('powerpress-podcast', __('Podcast Episode (default)'), 'powerpress_meta_box', 'post', 'normal');
 
 
 
 
 
 
 
 
 
854
 
855
  while( list($feed_slug, $feed_title) = each($Powerpress['custom_feeds']) )
856
  {
857
  if( $feed_slug == 'podcast' )
858
  continue;
859
+ add_meta_box('powerpress-'.$feed_slug, __('Podcast Episode for Custom Channel') .': '.$feed_title, 'powerpress_meta_box', 'post', 'normal');
860
  }
861
  }
862
  else
863
  {
864
+ add_meta_box('powerpress-podcast', __('Podcast Episode'), 'powerpress_meta_box', 'post', 'normal');
865
  }
866
  }
867
 
1064
  $ToSerialize['image'] = stripslashes($Powerpress['image']);
1065
  if( isset($Powerpress['no_player']) && $Powerpress['no_player'] )
1066
  $ToSerialize['no_player'] = 1;
1067
+ if( isset($Powerpress['no_links']) && $Powerpress['no_links'] )
1068
+ $ToSerialize['no_links'] = 1;
1069
+ if( isset($Powerpress['no_player_and_links']) && $Powerpress['no_player_and_links'] )
1070
+ {
1071
+ $ToSerialize['no_player'] = 1;
1072
+ $ToSerialize['no_links'] = 1;
1073
+ }
1074
  if( $Powerpress['set_duration'] == -1 )
1075
  unset($ToSerialize['duration']);
1076
  if( count($ToSerialize) > 0 ) // Lets add the serialized data
1176
  $page_name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix);
1177
 
1178
  // Powerpress page
1179
+ if( isset($_GET['page']) && strstr($_GET['page'], 'powerpress' ) !== false )
1180
  {
1181
  ?>
1182
  <script type="text/javascript">
1187
  document.getElementById(id).style.display = (show?"block":"none");
1188
  }
1189
  function powerpress_new_feed_url_prompt() {
1190
+ var Msg = '<?php echo __('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.\n\nDO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.\n\nAre you sure you want to continue?'); ?>';
1191
  if( confirm(Msg) ) {
1192
  powerpress_show_field('new_feed_url_step_1', false);
1193
  powerpress_show_field('new_feed_url_step_2', true);
1198
  {
1199
  if( Mode )
1200
  {
1201
+ if( !confirm("<?php echo __('Are you sure you want to switch to Advanced Mode?\n\nAdvanced Mode provides:\n * Advanced Settings\n * Presentation Settings\n * Extensive Feed Settings \n * Custom Feeds \n * Useful Tools'); ?>") )
1202
  return false;
1203
  }
1204
  else
1205
  {
1206
+ if( !confirm("<?php echo __('Are you sure you want to switch to Simple Mode?\n\nSimple Mode provides:\n * Only the bare essential settings\n * All settings on one page'); ?>") )
1207
  return false;
1208
  }
1209
  document.getElementById('powerpress_advanced_mode').value = Mode;
1212
  }
1213
 
1214
  jQuery(document).ready(function($) {
 
1215
  jQuery("#powerpress_settings_page").tabs({ cookie: { expires: 30 } });
 
1216
  });
1217
 
1218
  </script>
1313
  {
1314
  if( validChars.indexOf( url.charAt(x) ) == -1 )
1315
  {
1316
+ jQuery( '#'+DestDiv ).text('<?php echo __('Media URL contains characters that may cause problems for some clients. For maximum compatibility, only use letters, numbers, dash - and underscore _ characters only.'); ?>');
1317
  jQuery( '#'+DestDiv ).css('display', 'block');
1318
  return false;
1319
  }
1328
  ?>
1329
  if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1330
  {
1331
+ jQuery( '#'+DestDiv ).html('<?php echo __('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://.'); ?>');
1332
  jQuery( '#'+DestDiv ).css('display', 'block');
1333
  return false;
1334
  }
1337
  ?>
1338
  if( url.charAt(0) == 'h' && url.charAt(1) == 't' && url.charAt(2) == 't' && url.charAt(3) == 'p' && url.charAt(4) == 's' )
1339
  {
1340
+ jQuery( '#'+DestDiv ).html('<?php echo __('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.'); ?>');
1341
  jQuery( '#'+DestDiv ).css('display', 'block');
1342
  return false;
1343
  }
1408
  }
1409
  else
1410
  {
1411
+ jQuery( '#powerpress_success_'+FeedSlug ).html( '<?php echo __('Media verified successfully.'); ?> <a href="#" onclick="jQuery( \'#powerpress_success_'+ FeedSlug +'\' ).fadeOut(1000);return false;" title="Close" class="close">X<\/a>' );
1412
  jQuery( '#powerpress_success_'+FeedSlug ).css('display', 'block');
1413
  // setTimeout( function() { jQuery( '#powerpress_success_'+FeedSlug ).fadeOut(1000); }, 10000 );
1414
  }
1415
  }
1416
  else
1417
  {
1418
+ var Parts = response.split("\n", 3);
1419
  if( Parts[1] )
1420
  jQuery( '#powerpress_warning_'+FeedSlug ).html( Parts[1] );
1421
  else
1422
+ jQuery( '#powerpress_warning_'+FeedSlug ).text( '<?php echo __('Unknown error occurred while checking Media URL.'); ?>' );
1423
  jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
1424
  }
1425
  },
1427
 
1428
  jQuery('#powerpress_check_'+FeedSlug).css("display", 'none');
1429
  if( strError == 'timeout' )
1430
+ jQuery( '#powerpress_warning_'+FeedSlug ).text( '<?php echo __('Operation timed out.'); ?>' );
1431
  else
1432
+ jQuery( '#powerpress_warning_'+FeedSlug ).text( '<?php echo __('Unknown error occurred.'); ?>' );
1433
  jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
1434
  }
1435
  });
1439
 
1440
  function powerpress_remove_hosting(FeedSlug)
1441
  {
1442
+ if( confirm('<?php echo __('Are you sure you want to remove this media file?'); ?>') )
1443
  {
1444
  jQuery( '#powerpress_url_'+FeedSlug ).attr("readOnly", false);
1445
  jQuery( '#powerpress_url_'+FeedSlug ).val('');
1500
  echo powerpress_readable_duration($MediaInfo['duration'], true) ."\n";
1501
  if( isset($MediaInfo['warnings']) )
1502
  echo $MediaInfo['warnings'];
1503
+
1504
+ echo "\n"; // make sure this line is ended
1505
  exit;
1506
  }
1507
 
1509
  if( $MediaInfo['error'] )
1510
  echo $MediaInfo['error'];
1511
  else
1512
+ echo __('Unknown error occurred looking up media information.');
1513
+ echo "\n";
1514
  exit;
1515
  }
1516
 
1526
  if( isset($General['custom_cat_feeds']) && is_array($General['custom_cat_feeds']) && in_array($category->cat_ID, $General['custom_cat_feeds']) )
1527
  {
1528
  $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;from_categories=1&amp;action=powerpress-editcategoryfeed&amp;cat=') . $category->cat_ID;
1529
+ $actions['powerpress'] = '<a href="' . $edit_link . '" title="'. __('Edit Blubrry PowerPress Podcast Settings') .'">' . str_replace(' ', '&nbsp;', __('Podcast Settings')) . '</a>';
1530
  }
1531
  else
1532
  {
1533
  $edit_link = admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;from_categories=1&amp;action=powerpress-addcategoryfeed&amp;cat=".$category->cat_ID, 'powerpress-add-category-feed');
1534
+ $actions['powerpress'] = '<a href="' . $edit_link . '" title="'. __('Add Blubrry PowerPress Podcasting Settings') .'">' . str_replace(' ', '&nbsp;', __('Add Podcasting')) . '</a>';
1535
  }
1536
  return $actions;
1537
  }
1565
  {
1566
  $enable_link = admin_url() . wp_nonce_url('categories.php?action=powerpress-enable-categorypodcasting', 'powerpress-enable-categorypodcasting');
1567
  ?>
1568
+ <h2><?php echo __('PowerPress Category Podcasting'); ?></h2>
1569
+ <p><a href="<?php echo $enable_link; ?>" title="<?php echo __('Enable Category Podcasting'); ?>"><?php echo __('Enable Category Podcasting'); ?></a> <?php echo __('if you would like to add specific podcasting settings to your blog categories.'); ?></p>
1570
  <?php
1571
  }
1572
  else
1573
  {
1574
  ?>
1575
+ <h2><?php echo __('PowerPress Category Podcasting'); ?></h2>
1576
+ <p><?php echo __('PowerPress Category Podcasting is enabled. Select <u>Add Podcasting</u> to add podcasting settings. Select <u>Podcast Settings</u> to edit existing podcast settings.'); ?></p>
1577
  <?php
1578
  }
1579
  ?>
1607
  {
1608
  if( $SaveButton ) { ?>
1609
  <p class="submit">
1610
+ <input type="submit" name="Submit" id="powerpress_save_button" class="button-primary" value="<?php echo __('Save Changes' ) ?>" />
1611
  </p>
1612
  <?php } ?>
1613
  <p style="font-size: 85%; text-align: center; padding-bottom: 25px;">
1614
+ <a href="http://www.blubrry.com/powerpress/" title="Blubrry PowerPress" target="_blank"><?php echo __('Blubrry PowerPress'); ?></a> <?php echo POWERPRESS_VERSION; ?>
1615
+ &#8212; <a href="http://help.blubrry.com/blubrry-powerpress/" target="_blank" title="<?php echo __('Blubrry PowerPress Documentation'); ?>"><?php echo __('Documentation'); ?></a> |
1616
+ <a href="http://forum.blubrry.com/" target="_blank" title="<?php echo __('Blubrry Forum'); ?>"><?php echo __('Forum'); ?></a> |
1617
+ <a href="http://twitter.com/blubrry" target="_blank" title="<?php echo __('Follow Blubrry on Twitter'); ?>"><?php echo __('Follow Blubrry on Twitter'); ?></a>
1618
  </p>
1619
  <?php if( $form ) { ?>
1620
  </form><?php } ?>
1638
 
1639
  powerpress_admin_page_header();
1640
  require_once( dirname(__FILE__).'/powerpressadmin-basic.php');
 
1641
  require_once( dirname(__FILE__).'/powerpressadmin-editfeed.php');
1642
  powerpress_admin_basic();
1643
  powerpress_admin_page_footer(true);
1735
  powerpress_admin_ping_sites();
1736
  powerpress_admin_page_footer(false);
1737
  }; break;
1738
+ case 'powerpress-find-replace': {
1739
+ powerpress_admin_page_header('powerpress/powerpressadmin_tools.php', 'powerpress-find-replace');
1740
+ require_once( dirname(__FILE__).'/powerpressadmin-find-replace.php');
1741
+ powerpress_admin_find_replace();
1742
+ powerpress_admin_page_footer(false);
1743
+ }; break;
1744
  case 'powerpress-diagnostics': {
1745
  powerpress_admin_page_header('powerpress/powerpressadmin_tools.php', false);
1746
  require_once( dirname(__FILE__).'/powerpressadmin-diagnostics.php');
1854
  {
1855
  // Pull the iTunes FEEDID from the URL...
1856
  if( !preg_match('/id=(\d+)/', $iTunes_url, $matches) )
1857
+ return array('error'=>true, 'content'=>__('iTunes URL required to ping iTunes.'), 'podcast_id'=>0 );
1858
 
1859
  $FEEDID = $matches[1];
1860
 
1871
  sleep(1); // wait just a second :)
1872
  $tempdata = powerpress_remote_fopen($ping_url);
1873
  if( $tempdata == false )
1874
+ return array('error'=>true, 'content'=>__('Unable to connect to iTunes ping server.'), 'podcast_id'=>trim($PodcastID));
1875
  }
1876
 
1877
  if( stristr($tempdata, 'No Podcast Found') )
1878
+ return array('error'=>true, 'content'=>__('No Podcast Found from iTunes ping request.'), 'podcast_id'=>trim($PodcastID));
1879
 
1880
  // Parse the data into something readable
1881
  $results = trim( str_replace('Podcast Ping Received', '', strip_tags($tempdata) ) );
1882
+ list($null, $FeedURL, $null, $null, $null, $PodcastID) = explode("\n", $results );
1883
 
1884
  return array('success'=>true, 'content'=>$tempdata, 'feed_url'=>trim($FeedURL), 'podcast_id'=>trim($PodcastID) );
1885
  }
2041
  if( $basic_auth )
2042
  {
2043
  $UserPassDecoded = base64_decode($basic_auth);
2044
+ list($User, $Pass) = explode(':', $UserPassDecoded, 2);
2045
  $url_prefix = sprintf('http://%s:%s@', str_replace('@', '$', $User), $Pass);
2046
  $url = $url_prefix . substr($url, 7);
2047
  }
2070
 
2071
  if( $EnclosureData )
2072
  {
2073
+ list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = explode("\n", $EnclosureData, 4);
2074
  $EnclosureURL = trim($EnclosureURL);
2075
  $EnclosureType = trim($EnclosureType);
2076
  $EnclosureSize = trim($EnclosureSize);
2102
  }
2103
  else if( isset($results['error']) )
2104
  {
2105
+ $error = __('Blubrry Hosting Error (media info)') .': '. $results['error'];
2106
  powerpress_add_error($error);
2107
  }
2108
  else
2109
  {
2110
+ $error = sprintf( __('Blubrry Hosting Error (media info): An error occurred publishing media %s.'), $EnclosureURL);
2111
+ $error .= ' ';
2112
  $error .= '<a href="#" onclick="document.getElementById(\'powerpress_error_'. $rand_id .'\');this.style.display=\'none\';return false;">Display Error</a>';
2113
  $error .= '<div id="powerpress_error_'. $rand_id .'" style="display: none;">'. $json_data .'</div>';
2114
  powerpress_add_error($error);
2117
  if( $error == false )
2118
  {
2119
  // Extend the max execution time here
2120
+ set_time_limit(60*20); // give it 20 minutes just in case
2121
  $api_url = sprintf('%s/media/%s/%s?format=json&publish=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), urlencode($Settings['blubrry_program_keyword']), urlencode($EnclosureURL) );
2122
  $json_data = powerpress_remote_fopen($api_url, $Settings['blubrry_auth'], array(), 60*30); // give this up to 30 minutes, though 3 seocnds to 20 seconds is all one should need.
2123
  $results = powerpress_json_decode($json_data);
2150
 
2151
  function powerpress_json_decode($value)
2152
  {
2153
+ global $wp_version;
2154
+ if( function_exists('json_decode') && version_compare( phpversion(), '5.2', '>=' ) ) // Native PHP 5.2+ json_decode function
2155
  return json_decode($value, true);
2156
+ if( function_exists('json_decode') && version_compare($wp_version, '2.8.9', '>') ) // WordPress 2.9+ json_decode function
2157
+ $null = json_decode('{"a":1}'); // Hack, includes the class-json.php from within the wp-includes folder
2158
  if( !class_exists('Services_JSON') )
2159
  require_once( dirname(__FILE__).'/3rdparty/JSON.php');
2160
  $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
2270
  return true;
2271
  }
2272
 
2273
+ // Import plugin Podcasting settings
2274
+ function powerpress_admin_import_podcasting_settings()
2275
+ {
2276
+ $Changes = false;
2277
+
2278
+ $General = get_option('powerpress_general');
2279
+ if( !$General)
2280
+ {
2281
+ $General = array();
2282
+ $Changes = true;
2283
+ $General['process_podpress'] = 0;
2284
+ $General['display_player'] = 1;
2285
+ $General['player_function'] = 1;
2286
+ $General['podcast_link'] = 1;
2287
+ $General['ping_itunes'] = 1;
2288
+ }
2289
+
2290
+ $pod_player_location = get_option('pod_player_location');
2291
+ if( $pod_player_location == 'top' ) // display player below posts is default in PowerPress
2292
+ {
2293
+ $General['display_player'] = 2; // display above posts
2294
+ $Changes = true;
2295
+ }
2296
+
2297
+ $pod_audio_width = get_option('pod_audio_width');
2298
+ if( is_int( (int)$pod_audio_width) && $pod_audio_width > 100 ) // audio player width
2299
+ {
2300
+ $General['player_width_audio'] = $pod_audio_width;
2301
+ $Changes = true;
2302
+ }
2303
+
2304
+ $pod_player_width = get_option('pod_player_width');
2305
+ if( is_int( (int)$pod_player_width) && $pod_player_width > 100 ) // video player width
2306
+ {
2307
+ $General['player_width'] = $pod_player_width;
2308
+ $Changes = true;
2309
+ }
2310
+
2311
+ $pod_player_height = get_option('pod_player_height');
2312
+ if( is_int( (int)$pod_player_height) && $pod_player_height > 100 ) // video player width
2313
+ {
2314
+ $General['player_height'] = $pod_player_height;
2315
+ $Changes = true;
2316
+ }
2317
+
2318
+ if( $Changes == true )
2319
+ {
2320
+ // save these imported general settings
2321
+ powerpress_save_settings($General, 'powerpress_general');
2322
+ }
2323
+
2324
+ $FeedChanges = false;
2325
+ // Feed settings:
2326
+ $FeedSettings = get_option('powerpress_feed');
2327
+
2328
+ if( !$FeedSettings ) // If no feed settings, lets set defaults or copy from podpress.
2329
+ {
2330
+ $FeedSettings = array();
2331
+ $FeedChanges = true;
2332
+ }
2333
+
2334
+ $pod_itunes_summary = get_option('pod_itunes_summary');
2335
+ if( $pod_itunes_summary )
2336
+ {
2337
+ $FeedSettings['itunes_summary'] = stripslashes($pod_itunes_summary);
2338
+ $FeedChanges = true;
2339
+ }
2340
+
2341
+ $pod_itunes_image = get_option('pod_itunes_image');
2342
+ if( $pod_itunes_image )
2343
+ {
2344
+ $FeedSettings['itunes_image'] = $pod_itunes_image;
2345
+ $FeedChanges = true;
2346
+ }
2347
+
2348
+ $iTunesCategories = powerpress_itunes_categories(true);
2349
+ for( $x = 1; $x <= 3; $x++ )
2350
+ {
2351
+ $pod_itunes_cat = get_option('pod_itunes_cat'.$x);
2352
+ $find = str_replace('&amp;', '&', $pod_itunes_cat);
2353
+ $CatDesc = str_replace('||', ' > ', $find);
2354
+ $CatKey = array_search($CatDesc, $iTunesCategories);
2355
+ if( $CatKey )
2356
+ {
2357
+ $FeedSettings['itunes_cat_'.$x] = $CatKey;
2358
+ $FeedChanges = true;
2359
+ }
2360
+ }
2361
+
2362
+ $pod_itunes_keywords = get_option('pod_itunes_keywords');
2363
+ if( $pod_itunes_keywords )
2364
+ {
2365
+ $FeedSettings['itunes_keywords'] = stripslashes($pod_itunes_keywords);
2366
+ $FeedChanges = true;
2367
+ }
2368
+
2369
+ $pod_itunes_ownername = get_option('pod_itunes_ownername');
2370
+ if( $pod_itunes_ownername )
2371
+ {
2372
+ $FeedSettings['itunes_talent_name'] = stripslashes($pod_itunes_ownername);
2373
+ $FeedChanges = true;
2374
+ }
2375
+
2376
+ $pod_itunes_owneremail = get_option('pod_itunes_owneremail');
2377
+ if( $pod_itunes_owneremail )
2378
+ {
2379
+ $FeedSettings['email'] = $pod_itunes_owneremail;
2380
+ $FeedChanges = true;
2381
+ }
2382
+
2383
+ $rss_language = get_option('rss_language');
2384
+ if( $rss_language )
2385
+ {
2386
+ $FeedSettings['rss_language'] = $rss_language;
2387
+ $FeedChanges = true;
2388
+ }
2389
+
2390
+ $pod_tagline = get_option('pod_tagline');
2391
+ if( $pod_tagline )
2392
+ {
2393
+ $FeedSettings['itunes_subtitle'] = stripslashes($pod_tagline);
2394
+ $FeedChanges = true;
2395
+ }
2396
+
2397
+ $pod_itunes_explicit = get_option('pod_itunes_explicit');
2398
+ if( $pod_itunes_explicit == 'yes' )
2399
+ {
2400
+ $FeedSettings['itunes_explicit'] = 1;
2401
+ $FeedChanges = true;
2402
+ }
2403
+ else if( $pod_itunes_explicit == 'clean' )
2404
+ {
2405
+ $FeedSettings['itunes_explicit'] = 2;
2406
+ $FeedChanges = true;
2407
+ }
2408
+
2409
+ if( $FeedChanges )
2410
+ {
2411
+ // save these imported feed settings
2412
+ powerpress_save_settings($FeedSettings, 'powerpress_feed');
2413
+ }
2414
+
2415
+ return ($Changes||$FeedChanges);
2416
+ }
2417
 
2418
  function powerpress_admin_episodes_per_feed($feed_slug)
2419
  {
readme.txt CHANGED
@@ -2,8 +2,8 @@
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.5
6
- Stable tag: 1.0.3
7
 
8
  Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
 
@@ -70,12 +70,20 @@ Want more? Check out the advanced features.
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
 
@@ -126,8 +134,33 @@ To install Blubrry PowerPress manually, follow these steps:
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  = 1.0.3 =
130
- * Released on 10/28/2008
131
  * Added oga, spx, ogv and ogx (variations of ogg) to list of media file extensions detected.
132
  * Added note with remove option below Media URL when media file is hosted by blubrry.com.
133
  * Added Video Cover Image option for those who want to specify a URL to an image to display in place of the default play video box for QuickTime formatted video (m4v, mov, etc...).
@@ -137,10 +170,10 @@ To install Blubrry PowerPress manually, follow these steps:
137
  * Fixed bug where Media URL value starting with a slash '/' resulted in 2 slashes when the Default Media URL was added.
138
  * Fixed bug with Verify button setting minutes in hour field and seconds in minute field for media hosted by blubrry.com.
139
  * Fixed sufficient permissions to access this page bug when selecting players in Simple Mode. (Thanks Ben!)
140
- * Fixed bug with Mp3 flash maxi player where <div> container was not closed properly. (Thanks JWM!)
141
  * Fixed bug with PowerPress conflicting with the headspace2 plugin in the blog dashboard. (Thanks digigirl!)
142
  * Fixed Protected Content link by adding slash before wp-login.php. (Thanks Grant!)
143
- * Updated <param> tags for player embeds so they are XML complaint. (Thanks billhector!)
144
  * Removed unneeded javascript include to audio-player.js. (thanks Mark!)
145
  * Added alt tags to images to support XHTML.
146
 
@@ -391,6 +424,14 @@ Fixed bugs: itunes:subtitle bug, itunes:summary is now enabled by default, add e
391
  Initial release of Blubrry PowerPress
392
 
393
 
 
 
 
 
 
 
 
 
394
  == Contributors ==
395
  Angelo Mandato, CIO [RawVoice](http://www.rawvoice.com) - Plugin founder, architect and lead developer
396
 
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.9
6
+ Stable tag: 1.0.4
7
 
8
  Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
 
70
  = Migrating from PodPress =
71
  We made it easy to migrate from PodPress to PowerPress.
72
 
73
+ * Install and enable 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
+ = Migrating from plugin "Podcasting" =
80
+ We made it easy to migrate from plugin "Podcasting" to PowerPress.
81
+
82
+ * Install and enable PowerPress
83
+ * Disable plugin "Podcasting"
84
+
85
+ PowerPress will continue where plugin "Podcasting" left off by including your previously created episodes in your feeds and web pages.
86
+
87
  = Need Help? =
88
  . . . or have some ideas that could improve the plugin?
89
 
134
 
135
  == Changelog ==
136
 
137
+ = Announcement =
138
+ * We are about 90% done updating PowerPress for translation. If you would like to have PowerPress translated into other languages, please contact Angelo: cio [at] rawvoice.com.
139
+
140
+ = 1.0.4 =
141
+ * Released on 12/19/2009
142
+ * Fixed compatibility bug introduced in WordPress 2.9 when using Blubrry Services on web servers with versions of PHP older than 5.2 (json_decode function compatibility)
143
+ * Added new "Display Player and Links Options" under Podcast Entry Box settings. You can now control displaying the default Player and/or Links on a per episode basis.
144
+ * Added new "Replace Player with Embed" option under Podcast Entry Box settings. When set, PowerPress will not display the default player if an embed code is set for the episode. Default behavior is to display both the native player and embed code.
145
+ * Added new "Find and Replace for Episode URLs" feature found under tools section. Perfect for users moving their media hosting to a new web site or service (Like Blubrry!).
146
+ * Plugin "Podcasting" support: Now including iTunes duration (audio length) previously saved using plugin "Podcasting".
147
+ * Plugin "Podcasting" support: Import plugin "Podcasting" settings option added to Tools page.
148
+ * Converted all function calls from split() to explode for PHP 6 compatibility.
149
+ * Using a default value for length (file size) to prevent feeds from becoming invalid.
150
+ * Fixed PodPress import bug where extra space characters from PodPress were not trimmed.
151
+ * 1 Pixel Out player: Width setting is now applied (up until now player was always 290 pixels wide)
152
+ * 1 Pixel Out player: Added option to display track information from mp3 by entering "TRACK" in the "Text In Player" field.
153
+ * Added translation support (translation support for PowerPress coming soon). Pages include tools, basic settings, category feeds, podcast channel feeds, dashboard page and diagnostics page.
154
+ * Added code to prevent other plugins from wiping out the custom podcast feed permalinks. Plugin identified that this code fixes so far include the pagebar plugin.
155
+ * Diagnostic results email can now optionally include the list of active plugins which helps when resolving conflicts between plugins.
156
+ * Diagnostic results email is now in HTML form which makes it easier to read.
157
+ * Removed most 'Notice' messages when WP_DEBUG define set in WordPress.
158
+ * Updated Blubrry Services Integration to support listing the past 30 days of published media.
159
+ * Support for WordPress 2.6 will be dropped in the next release of PowerPress.
160
+
161
+
162
  = 1.0.3 =
163
+ * Released on 10/28/2009
164
  * Added oga, spx, ogv and ogx (variations of ogg) to list of media file extensions detected.
165
  * Added note with remove option below Media URL when media file is hosted by blubrry.com.
166
  * Added Video Cover Image option for those who want to specify a URL to an image to display in place of the default play video box for QuickTime formatted video (m4v, mov, etc...).
170
  * Fixed bug where Media URL value starting with a slash '/' resulted in 2 slashes when the Default Media URL was added.
171
  * Fixed bug with Verify button setting minutes in hour field and seconds in minute field for media hosted by blubrry.com.
172
  * Fixed sufficient permissions to access this page bug when selecting players in Simple Mode. (Thanks Ben!)
173
+ * Fixed bug with Mp3 flash maxi player where `<div>` container was not closed properly. (Thanks JWM!)
174
  * Fixed bug with PowerPress conflicting with the headspace2 plugin in the blog dashboard. (Thanks digigirl!)
175
  * Fixed Protected Content link by adding slash before wp-login.php. (Thanks Grant!)
176
+ * Updated `<param>` tags for player embeds so they are XML complaint. (Thanks billhector!)
177
  * Removed unneeded javascript include to audio-player.js. (thanks Mark!)
178
  * Added alt tags to images to support XHTML.
179
 
424
  Initial release of Blubrry PowerPress
425
 
426
 
427
+ == Upgrade Notice ==
428
+
429
+ = 1.0.4 =
430
+ Fixed compatibility bug introduced in WordPress 2.9 for web servers with versions of PHP older than 5.2. Users with older versions of PHP are strongly encouraged to upgrade.
431
+
432
+ = 1.0.2 =
433
+ First stable release of Blubrry PowerPress. Users are strongly encouraged to upgrade.
434
+
435
  == Contributors ==
436
  Angelo Mandato, CIO [RawVoice](http://www.rawvoice.com) - Plugin founder, architect and lead developer
437