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