PowerPress Podcasting plugin by Blubrry - Version 4.0

Version Description

  • Released on 5/11/2012
  • New iTunes image requirements updated throughout plugin. RGB 1400x1400 jpg is recommended.
  • Feed Episode Maximizer feature added, only applies to podcast channel feeds.
  • Added VideoJS video player option, requires "VideoJS - HTML5 Video Player for WordPress" plugin to be installed and activated.
  • Enhanced support for uploading RSS/iTunes images, the iTunes image upload now checks for 1400x1400 or larger jpg/png image in RGB color space.
  • Notice message regarding new iTunes image requirements added to dashboard.
  • Added .epub to list of file content types supported.
  • iTunes image can now also be used as the RSS image.
  • Additional information added to powerpress shortcode documentation.
  • iTunes block episode feature added, requires following define in wp-config.php: define("POWERPRESS_NOT_SUPPORTED", true);
  • iTunes block feed feature added, requires following define in wp-config.php: define("POWERPRESS_NOT_SUPPORTED", true);
  • iTunes complete feed feature added, requires following define in wp-config.php: define("POWERPRESS_NOT_SUPPORTED", true);
  • iTunes order episode feature added.
  • Feature Episode in iTunes option added, allows you to put specific episode at the top of your iTunes podcast directory listing.
  • ref=Nofollow tags added to play in new window, download and embed links.
  • Fixed warning message when metamark's default row is removed and does not exist upon saving.
  • Increased the performance of the podcast only and podcast channel feeds.
  • Removed "new" from no longer new features.
  • iTunes default image updated to 1400 x 1400.
Download this release

Release Info

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

Code changes from version 3.0.1 to 4.0

css/admin.css CHANGED
@@ -19,7 +19,7 @@
19
  font-weight: bold;
20
  }
21
  #powerpress_settings {
22
- background-image:url(http://images.blubrry.com/powerpress/blubrry_logo2.png);
23
  background-repeat: no-repeat;
24
  background-position: bottom right;
25
  }
@@ -180,4 +180,5 @@ padding-bottom: 15px;
180
  }
181
  .powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
182
  padding: 0;
183
- }
 
19
  font-weight: bold;
20
  }
21
  #powerpress_settings {
22
+ background-image:url(http://images.blubrry.com/powerpress/blubrry_logo4.png);
23
  background-repeat: no-repeat;
24
  background-position: bottom right;
25
  }
180
  }
181
  .powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
182
  padding: 0;
183
+ }
184
+
css/dashboard.css ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* PowerPress Dashboard CSS */
2
+
3
+ /* Dashboard Notice, based on Dashboard Browser Nag */
4
+ #powerpress_dashboard_notice_1 a.update-browser-link {
5
+ font-size: 1.2em;
6
+ font-weight: bold;
7
+ }
8
+
9
+ #powerpress_dashboard_notice_1 a {
10
+ text-decoration: underline;
11
+ }
12
+
13
+ #powerpress_dashboard_notice_1.postbox {
14
+ background-color: #e29808;
15
+ background-image: none;
16
+ border-color: #edc048;
17
+ -moz-box-shadow: none;
18
+ -webkit-box-shadow: none;
19
+ box-shadow: none;
20
+ color: #fff;
21
+ }
22
+
23
+ #powerpress_dashboard_notice_1.postbox h3 {
24
+ border-bottom-color: #f6e2ac;
25
+ text-shadow: none;
26
+ -moz-box-shadow: none;
27
+ -webkit-box-shadow: none;
28
+ box-shadow: none;
29
+ background: transparent none;
30
+ color: #fff;
31
+ }
32
+
33
+ #powerpress_dashboard_notice_1 a {
34
+ color: #fff;
35
+ }
36
+
37
+ #powerpress_dashboard_notice_1.browser-insecure a.browse-happy-link,
38
+ #powerpress_dashboard_notice_1.browser-insecure a.update-browser-link {
39
+ text-shadow: #871b15 0 1px 0;
40
+ }
41
+
42
+ #powerpress_dashboard_notice_1 a.browse-happy-link,
43
+ #powerpress_dashboard_notice_1 a.update-browser-link {
44
+ text-shadow: #d29a04 0 1px 0;
45
+ }
feed-podcast.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * RSS2 Podcast Feed Template for displaying RSS2 Podcast Posts feed.
4
+ *
5
+ * @package WordPress
6
+ */
7
+
8
+ $FeaturedPodcastID = 0;
9
+ $iTunesFeatured = get_option('powerpress_itunes_featured');
10
+ $feed_slug = get_query_var('feed');
11
+ if( !empty($iTunesFeatured[ $feed_slug ]) )
12
+ {
13
+ $FeaturedPodcastID = $iTunesFeatured[ $feed_slug ];
14
+ $GLOBALS['powerpress_feed']['itunes_feature'] = true; // So any custom order value is not used when looping through the feeds.
15
+ }
16
+ $iTunesOrderNumber = 2; // One reserved for featured episode
17
+
18
+ header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
19
+ $more = 1;
20
+
21
+ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
22
+
23
+ <rss version="2.0"
24
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
25
+ xmlns:wfw="http://wellformedweb.org/CommentAPI/"
26
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
27
+ xmlns:atom="http://www.w3.org/2005/Atom"
28
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
29
+ xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
30
+ <?php do_action('rss2_ns'); ?>
31
+ >
32
+
33
+ <channel>
34
+ <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
35
+ <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
36
+ <link><?php bloginfo_rss('url') ?></link>
37
+ <description><?php bloginfo_rss("description") ?></description>
38
+ <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
39
+ <language><?php echo get_option('rss_language'); ?></language>
40
+ <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
41
+ <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
42
+ <?php do_action('rss2_head'); ?>
43
+ <?php
44
+
45
+ $ItemCount = 0;
46
+ ?>
47
+ <?php while( have_posts()) : the_post(); ?>
48
+ <item>
49
+ <title><?php the_title_rss() ?></title>
50
+ <link><?php the_permalink_rss() ?></link>
51
+ <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
52
+ <guid isPermaLink="false"><?php the_guid(); ?></guid>
53
+ <?php
54
+ if( empty($GLOBALS['powerpress_feed']['feed_maximizer_on']) ) // If feed maximizer off
55
+ {
56
+ ?>
57
+ <comments><?php comments_link_feed(); ?></comments>
58
+ <dc:creator><?php the_author() ?></dc:creator>
59
+ <?php the_category_rss('rss2') ?>
60
+ <?php if (get_option('rss_use_excerpt')) : ?>
61
+ <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
62
+ <?php else : ?>
63
+ <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
64
+ <?php if ( strlen( $post->post_content ) > 0 ) : ?>
65
+ <content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded>
66
+ <?php else : ?>
67
+ <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
68
+ <?php endif; ?>
69
+ <?php endif; ?>
70
+ <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
71
+ <slash:comments><?php echo get_comments_number(); ?></slash:comments>
72
+ <?php
73
+ }
74
+ else // If feed maximizer on
75
+ { // itunes does not like CDATA, so we're changing it to the other method...
76
+ ?>
77
+ <description><?php echo esc_html( get_the_excerpt() ); ?></description>
78
+ <?php
79
+ }
80
+ ?>
81
+ <?php rss_enclosure(); ?>
82
+ <?php do_action('rss2_item'); ?>
83
+ <?php
84
+ if( !empty($iTunesFeatured[ $feed_slug ]) )
85
+ {
86
+ echo "\t<itunes:order>";
87
+ if( $FeaturedPodcastID == get_the_ID() )
88
+ {
89
+ echo 1;
90
+ $FeaturedPodcastID = 0;
91
+ }
92
+ else
93
+ {
94
+ echo $iTunesOrderNumber;
95
+ $iTunesOrderNumber++;
96
+ }
97
+ echo "</itunes:order>\n";
98
+ }
99
+
100
+ // Decide based on count if we want to flip on the feed maximizer...
101
+ $ItemCount++;
102
+
103
+ if( empty($GLOBALS['powerpress_feed']['feed_maximizer_on']) && $ItemCount >= 10 && !empty($GLOBALS['powerpress_feed']['maximize_feed']) )
104
+ {
105
+ $GLOBALS['powerpress_feed']['feed_maximizer_on'] = true; // All future items will be minimized in order to maximize episode count
106
+ }
107
+
108
+ ?>
109
+ </item>
110
+ <?php endwhile; ?>
111
+ <?php
112
+
113
+ if( !empty($FeaturedPodcastID) )
114
+ {
115
+ query_posts( array('p'=>$FeaturedPodcastID) );
116
+ if( have_posts())
117
+ {
118
+ the_post();
119
+ // Featured podcast epiosde, give it the highest itunes:order value...
120
+ ?>
121
+ <item>
122
+ <title><?php the_title_rss() ?></title>
123
+ <link><?php the_permalink_rss() ?></link>
124
+ <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
125
+ <guid isPermaLink="false"><?php the_guid(); ?></guid>
126
+ <description><?php echo esc_html( get_the_excerpt() ); ?></description>
127
+ <?php rss_enclosure(); ?>
128
+ <?php do_action('rss2_item'); ?>
129
+ <?php
130
+ echo "\t<itunes:order>";
131
+ echo 1;
132
+ echo "</itunes:order>\n";
133
+ ?>
134
+ </item>
135
+ <?php
136
+ }
137
+ wp_reset_query();
138
+ }
139
+ ?>
140
+ </channel>
141
+ </rss>
itunes_default.jpg CHANGED
Binary file
powerpress-player.php CHANGED
@@ -678,9 +678,20 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
678
  // OGG Video / WebM
679
  case 'webm':
680
  case 'ogv': { // Use native player when possible
 
 
 
681
 
682
  // HTML5 Video as an embed
683
- $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
 
 
 
 
 
 
 
 
684
  }; break;
685
  // H.264
686
  case 'm4v':
@@ -699,6 +710,9 @@ function powerpressplayer_player_video($content, $media_url, $EpisodeData = arra
699
 
700
  $content .= powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData);
701
  }; break;
 
 
 
702
  case 'html5video': {
703
  // HTML5 Video as an embed
704
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
@@ -934,18 +948,18 @@ function powerpressplayer_link_download($content, $media_url, $ExtraData = array
934
  $player_links = '';
935
  if( $GeneralSettings['podcast_link'] == 1 )
936
  {
937
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a>".PHP_EOL;
938
  }
939
  else if( $GeneralSettings['podcast_link'] == 2 )
940
  {
941
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).") ".PHP_EOL;
942
  }
943
  else if( $GeneralSettings['podcast_link'] == 3 )
944
  {
945
  if( $ExtraData['duration'] && ltrim($ExtraData['duration'], '0:') != '' )
946
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (". htmlspecialchars(POWERPRESS_DURATION_TEXT) .": " . powerpress_readable_duration($ExtraData['duration']) ." &#8212; ".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
947
  else
948
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
949
  }
950
 
951
  if( $player_links && !empty($content) )
@@ -968,11 +982,11 @@ function powerpressplayer_link_pinw($content, $media_url, $ExtraData = array() )
968
  case 3: // Play in new window only
969
  case 5: { // Play in page and new window
970
  if( $is_pdf )
971
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". __('Open in New Window', 'powerpress') ."\">". __('Open in New Window', 'powerpress') ."</a>".PHP_EOL;
972
  else if( !empty($ExtraData['id']) && !empty($ExtraData['feed']) )
973
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" onclick=\"return powerpress_pinw('{$ExtraData['id']}-{$ExtraData['feed']}');\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
974
  else
975
- $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
976
  }; break;
977
  }//end switch
978
 
@@ -1031,7 +1045,7 @@ function powerpressplayer_link_embed($content, $media_url, $ExtraData = array()
1031
  $player = powerpressplayer_embedable($media_url, $ExtraData);
1032
  if( $player )
1033
  {
1034
- $player_links .= "<a href=\"#\" class=\"powerpress_link_e\" title=\"". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."\" onclick=\"return powerpress_show_embed('{$ExtraData['id']}-{$ExtraData['feed']}');\">". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."</a>";
1035
  }
1036
 
1037
  if( $player_links && !empty($content) )
@@ -1807,14 +1821,82 @@ function powerpressplayer_build_simpleflash($media_url, $EpisodeData = array())
1807
  }
1808
 
1809
  /*
1810
- VideoJS for PowerPress 3.0
1811
  */
1812
  function powerpressplayer_build_videojs($media_url, $EpisodeData = array())
1813
  {
1814
-
1815
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1816
  return $content;
1817
  }
1818
 
1819
 
 
1820
  ?>
678
  // OGG Video / WebM
679
  case 'webm':
680
  case 'ogv': { // Use native player when possible
681
+ $Settings = get_option('powerpress_general');
682
+ if( !isset($Settings['video_player']) )
683
+ $Settings['video_player'] = 'html5video';
684
 
685
  // HTML5 Video as an embed
686
+ switch( $Settings['video_player'] )
687
+ {
688
+ case 'videojs-html5-video-player-for-wordpress': {
689
+ $content .= powerpressplayer_build_videojs($media_url, $EpisodeData);
690
+ }; break;
691
+ default: {
692
+ $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
693
+ }; break;
694
+ }
695
  }; break;
696
  // H.264
697
  case 'm4v':
710
 
711
  $content .= powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData);
712
  }; break;
713
+ case 'videojs-html5-video-player-for-wordpress': {
714
+ $content .= powerpressplayer_build_videojs($media_url, $EpisodeData);
715
+ }; break;
716
  case 'html5video': {
717
  // HTML5 Video as an embed
718
  $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
948
  $player_links = '';
949
  if( $GeneralSettings['podcast_link'] == 1 )
950
  {
951
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a>".PHP_EOL;
952
  }
953
  else if( $GeneralSettings['podcast_link'] == 2 )
954
  {
955
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).") ".PHP_EOL;
956
  }
957
  else if( $GeneralSettings['podcast_link'] == 3 )
958
  {
959
  if( $ExtraData['duration'] && ltrim($ExtraData['duration'], '0:') != '' )
960
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (". htmlspecialchars(POWERPRESS_DURATION_TEXT) .": " . powerpress_readable_duration($ExtraData['duration']) ." &#8212; ".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
961
  else
962
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_d\" title=\"". POWERPRESS_DOWNLOAD_TEXT ."\" rel=\"nofollow\">". POWERPRESS_DOWNLOAD_TEXT ."</a> (".powerpress_byte_size($ExtraData['size']).")".PHP_EOL;
963
  }
964
 
965
  if( $player_links && !empty($content) )
982
  case 3: // Play in new window only
983
  case 5: { // Play in page and new window
984
  if( $is_pdf )
985
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". __('Open in New Window', 'powerpress') ."\" rel=\"nofollow\">". __('Open in New Window', 'powerpress') ."</a>".PHP_EOL;
986
  else if( !empty($ExtraData['id']) && !empty($ExtraData['feed']) )
987
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" onclick=\"return powerpress_pinw('{$ExtraData['id']}-{$ExtraData['feed']}');\" rel=\"nofollow\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
988
  else
989
+ $player_links .= "<a href=\"{$media_url}\" class=\"powerpress_link_pinw\" target=\"_blank\" title=\"". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."\" rel=\"nofollow\">". POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT ."</a>".PHP_EOL;
990
  }; break;
991
  }//end switch
992
 
1045
  $player = powerpressplayer_embedable($media_url, $ExtraData);
1046
  if( $player )
1047
  {
1048
+ $player_links .= "<a href=\"#\" class=\"powerpress_link_e\" title=\"". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."\" onclick=\"return powerpress_show_embed('{$ExtraData['id']}-{$ExtraData['feed']}');\" rel=\"nofollow\">". htmlspecialchars(POWERPRESS_EMBED_TEXT) ."</a>";
1049
  }
1050
 
1051
  if( $player_links && !empty($content) )
1821
  }
1822
 
1823
  /*
1824
+ VideoJS for PowerPress 4.0
1825
  */
1826
  function powerpressplayer_build_videojs($media_url, $EpisodeData = array())
1827
  {
1828
+ $content = '';
1829
+ if( function_exists('add_videojs_header') )
1830
+ {
1831
+ // Global Settings
1832
+ $Settings = get_option('powerpress_general');
1833
+
1834
+ $player_id = powerpressplayer_get_next_id();
1835
+ $cover_image = '';
1836
+ $player_width = 400;
1837
+ $player_height = 225;
1838
+ $autoplay = false;
1839
+
1840
+ if( !empty($Settings['player_width']) )
1841
+ $player_width = $Settings['player_width'];
1842
+ if( !empty($Settings['player_height']) )
1843
+ $player_height = $Settings['player_height'];
1844
+ if( !empty($Settings['poster_image']) )
1845
+ $cover_image = $Settings['poster_image'];
1846
+
1847
+ // Episode Settings
1848
+ if( !empty($EpisodeData['image']) )
1849
+ $cover_image = $EpisodeData['image'];
1850
+ if( !empty($EpisodeData['width']) )
1851
+ $player_width = $EpisodeData['width'];
1852
+ if( !empty($EpisodeData['height']) )
1853
+ $player_height = $EpisodeData['height'];
1854
+ if( !empty($EpisodeData['autoplay']) )
1855
+ $autoplay = true;
1856
+
1857
+ // Poster image supplied
1858
+ $poster_attribute = '';
1859
+ if ($cover_image)
1860
+ $poster_attribute = ' poster="'.$cover_image.'"';
1861
+
1862
+ // Autoplay the video?
1863
+ $autoplay_attribute = '';
1864
+ if ( $autoplay )
1865
+ $autoplay_attribute = ' autoplay';
1866
+
1867
+ // We never do pre-poading for podcasting as it inflates statistics
1868
+
1869
+ // Is there a custom class?
1870
+ $class = '';
1871
+ if ( !empty($Settings['videojs_css_class']) )
1872
+ $class = ' '. $Settings['videojs_css_class'];
1873
+
1874
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. $player_id .'">';
1875
+
1876
+ $content .= '<video id="videojs_player_'. $player_id .'" class="video-js vjs-default-skin'. $class .'" width="'. $player_width .'" height="'. $player_height .'"'. $poster_attribute .' controls '. $autoplay_attribute .' data-setup="{}">';
1877
+
1878
+ $content_type = powerpress_get_contenttype($media_url);
1879
+ if( $content_type == 'video/x-m4v' )
1880
+ $content_type = 'video/mp4'; // Mp4
1881
+ $content .='<source src="'. $media_url .'" type="'. $content_type .'" />';
1882
+
1883
+ if( !empty($EpisodeData['webm_src']) )
1884
+ {
1885
+ $EpisodeData['webm_src'] = powerpress_add_flag_to_redirect_url($EpisodeData['webm_src'], 'p');
1886
+ $content .='<source src="'. $EpisodeData['webm_src'] .'" type="video/webm; codecs="vp8, vorbis" />';
1887
+ }
1888
+
1889
+ $content .= '</video>';
1890
+ $content .= "</div>\n";
1891
+ }
1892
+ else
1893
+ {
1894
+ $content .= powerpressplayer_build_html5video($media_url, $EpisodeData);
1895
+ }
1896
+
1897
  return $content;
1898
  }
1899
 
1900
 
1901
+
1902
  ?>
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: 3.0.1
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', '3.0.1' );
37
 
38
  // Translation support:
39
  if ( !defined('POWERPRESS_ABSPATH') )
@@ -401,7 +401,10 @@ function powerpress_rss2_head()
401
  echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
402
 
403
  if( !empty($Feed['itunes_block']) )
404
- echo "\t\t<itunes:block>yes</itunes:block>\n";
 
 
 
405
 
406
  if( !empty($Feed['itunes_image']) )
407
  {
@@ -621,6 +624,7 @@ function powerpress_rss2_item()
621
  $subtitle = false;
622
  $keywords = false;
623
  $block = false;
 
624
 
625
  if( isset( $EpisodeData['summary'] ) && strlen($EpisodeData['summary']) > 1 )
626
  $summary = $EpisodeData['summary'];
@@ -639,11 +643,13 @@ function powerpress_rss2_item()
639
  $author = $EpisodeData['author'];
640
  if( !empty( $EpisodeData['block'] ) )
641
  $block = 'yes';
 
 
642
 
643
  if( $custom_enclosure ) // We need to add the enclosure tag here...
644
  {
645
- if( !$EnclosureData['size'] )
646
- $EnclosureData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
647
 
648
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
649
  trim($EpisodeData['url']),
@@ -668,7 +674,7 @@ function powerpress_rss2_item()
668
  }
669
  }
670
 
671
- if( $keywords )
672
  echo "\t\t<itunes:keywords>" . powerpress_format_itunes_value($keywords, 'keywords') . '</itunes:keywords>'.PHP_EOL;
673
 
674
  $excerpt_no_html = '';
@@ -685,25 +691,28 @@ function powerpress_rss2_item()
685
  }
686
 
687
  if( $subtitle )
688
- echo "\t\t<itunes:subtitle>". powerpress_format_itunes_value($subtitle, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
689
  else if( $excerpt_no_html )
690
- echo "\t\t<itunes:subtitle>". powerpress_format_itunes_value($excerpt_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
691
  else
692
- echo "\t\t<itunes:subtitle>". powerpress_format_itunes_value($content_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
693
-
694
- if( $summary )
695
- echo "\t\t<itunes:summary>". powerpress_format_itunes_value($summary, 'summary') .'</itunes:summary>'.PHP_EOL;
696
- else if( $powerpress_feed['enhance_itunes_summary'] )
697
- echo "\t\t<itunes:summary>". powerpress_itunes_summary($post->post_content) .'</itunes:summary>'.PHP_EOL;
698
- else if( $excerpt_no_html )
699
- echo "\t\t<itunes:summary>". powerpress_format_itunes_value($excerpt_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
700
- else
701
- echo "\t\t<itunes:summary>". powerpress_format_itunes_value($content_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
702
 
703
- if( $author )
704
- echo "\t\t<itunes:author>" . esc_html($author) . '</itunes:author>'.PHP_EOL;
705
- else
706
- echo "\t\t<itunes:author>".'NO AUTHOR</itunes:author>'.PHP_EOL;
 
 
 
 
 
 
 
 
 
 
 
 
707
 
708
  if( $explicit )
709
  echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
@@ -712,42 +721,58 @@ function powerpress_rss2_item()
712
  echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
713
 
714
  if( $block && $block == 'yes' )
715
- echo "\t\t<itunes:block>yes</itunes:block>".PHP_EOL;;
 
 
 
 
 
 
 
 
 
 
 
 
 
716
 
717
  // RawVoice RSS Tags
718
- if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
719
  {
720
- if( !empty($EpisodeData['ishd']) )
721
- echo "\t\t<rawvoice:isHD>yes</rawvoice:isHD>".PHP_EOL;;
722
- if( !empty($EpisodeData['image']) )
723
- echo "\t\t<rawvoice:poster url=\"". $EpisodeData['image'] ."\" />".PHP_EOL;
724
- if( !empty($EpisodeData['embed']) )
725
- echo "\t\t<rawvoice:embed>". htmlspecialchars($EpisodeData['embed']) ."</rawvoice:embed>".PHP_EOL;
726
- else if( !empty($powerpress_feed['podcast_embed_in_feed']) && function_exists('powerpress_generate_embed') )
727
  {
728
- $player = powerpressplayer_embedable($EpisodeData['url'], $EpisodeData);
729
- $embed_content = '';
730
- // TODO:
731
- if( $player )
732
- $embed_content = powerpress_generate_embed($player, $EpisodeData);
733
- if( $embed_content )
734
- echo "\t\t<rawvoice:embed>". htmlspecialchars( $embed_content ) ."</rawvoice:embed>".PHP_EOL;
735
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
736
 
737
- if( !empty($EpisodeData['webm_src']) )
738
- {
739
- echo "\t\t<rawvoice:webm src=\"". $EpisodeData['webm_src'] ."\"";
740
- if( $EpisodeData['webm_length'] )
741
- echo " length=\"". $EpisodeData['webm_length'] ."\"";
742
- echo " type=\"video/webm\" />".PHP_EOL;
743
- }
744
-
745
- $GeneralSettings = get_option('powerpress_general');
746
-
747
- if( !empty($GeneralSettings) && !empty($GeneralSettings['metamarks']) )
748
- {
749
- require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
750
- powerpress_metamarks_print_rss2($EpisodeData);
751
  }
752
  }
753
  }
@@ -907,8 +932,17 @@ function powerpress_do_podcast_feed($for_comments=false)
907
  }
908
  }
909
 
910
- $wp_query->get_posts();
911
- do_feed_rss2($for_comments);
 
 
 
 
 
 
 
 
 
912
  }
913
 
914
  function powerpress_template_redirect()
@@ -1152,6 +1186,8 @@ function powerpress_load_general_feed_settings()
1152
  $powerpress_feed['rss_language'] = $Feed['rss_language'];
1153
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1154
  $powerpress_feed['podcast_embed_in_feed'] = true;
 
 
1155
  return;
1156
  }
1157
 
@@ -1564,6 +1600,11 @@ function powerpress_get_contenttype($file, $use_wp_check_filetype = true)
1564
  return 'application/x-shockwave-flash';
1565
  case 'ogx':
1566
  return 'application/ogg';
 
 
 
 
 
1567
  default: // Let it fall through
1568
  }
1569
  }
@@ -1885,6 +1926,9 @@ function powerpress_merge_empty_feed_settings($CustomFeedSettings, $FeedSettings
1885
  unset($FeedSettings['itunes_new_feed_url']);
1886
  unset($FeedSettings['apply_to']);
1887
  unset($FeedSettings['feed_redirect_url']);
 
 
 
1888
 
1889
  // If the setting is not already set, set the enhnaced itunes setting if they have PHP5+ on by default
1890
  if( !isset($FeedSettings['enhance_itunes_summary']) )
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: 4.0
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', '4.0' );
37
 
38
  // Translation support:
39
  if ( !defined('POWERPRESS_ABSPATH') )
401
  echo "\t".'<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>'.PHP_EOL;
402
 
403
  if( !empty($Feed['itunes_block']) )
404
+ echo "\t<itunes:block>yes</itunes:block>".PHP_EOL;
405
+
406
+ if( !empty($Feed['itunes_complete']) )
407
+ echo "\t<itunes:complete>yes</itunes:complete>".PHP_EOL;
408
 
409
  if( !empty($Feed['itunes_image']) )
410
  {
624
  $subtitle = false;
625
  $keywords = false;
626
  $block = false;
627
+ $cc = false;
628
 
629
  if( isset( $EpisodeData['summary'] ) && strlen($EpisodeData['summary']) > 1 )
630
  $summary = $EpisodeData['summary'];
643
  $author = $EpisodeData['author'];
644
  if( !empty( $EpisodeData['block'] ) )
645
  $block = 'yes';
646
+ if( !empty( $EpisodeData['cc'] ) )
647
+ $cc = 'yes';
648
 
649
  if( $custom_enclosure ) // We need to add the enclosure tag here...
650
  {
651
+ if( empty($EpisodeData['size']) )
652
+ $EpisodeData['size'] = 5242880; // Use the dummy 5MB size since we don't have a size to quote
653
 
654
  echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
655
  trim($EpisodeData['url']),
674
  }
675
  }
676
 
677
+ if( empty($powerpress_feed['feed_maximizer_on']) && $keywords )
678
  echo "\t\t<itunes:keywords>" . powerpress_format_itunes_value($keywords, 'keywords') . '</itunes:keywords>'.PHP_EOL;
679
 
680
  $excerpt_no_html = '';
691
  }
692
 
693
  if( $subtitle )
694
+ echo "\t<itunes:subtitle>". powerpress_format_itunes_value($subtitle, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
695
  else if( $excerpt_no_html )
696
+ echo "\t<itunes:subtitle>". powerpress_format_itunes_value($excerpt_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
697
  else
698
+ echo "\t<itunes:subtitle>". powerpress_format_itunes_value($content_no_html, 'subtitle') .'</itunes:subtitle>'.PHP_EOL;
 
 
 
 
 
 
 
 
 
699
 
700
+ if( empty($powerpress_feed['feed_maximizer_on']) )
701
+ {
702
+ if( $summary )
703
+ echo "\t\t<itunes:summary>". powerpress_format_itunes_value($summary, 'summary') .'</itunes:summary>'.PHP_EOL;
704
+ else if( $powerpress_feed['enhance_itunes_summary'] )
705
+ echo "\t\t<itunes:summary>". powerpress_itunes_summary($post->post_content) .'</itunes:summary>'.PHP_EOL;
706
+ else if( $excerpt_no_html )
707
+ echo "\t\t<itunes:summary>". powerpress_format_itunes_value($excerpt_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
708
+ else
709
+ echo "\t\t<itunes:summary>". powerpress_format_itunes_value($content_no_html, 'summary') .'</itunes:summary>'.PHP_EOL;
710
+
711
+ if( $author )
712
+ echo "\t\t<itunes:author>" . esc_html($author) . '</itunes:author>'.PHP_EOL;
713
+ else
714
+ echo "\t\t<itunes:author>".'NO AUTHOR</itunes:author>'.PHP_EOL;
715
+ }
716
 
717
  if( $explicit )
718
  echo "\t\t<itunes:explicit>" . $explicit . '</itunes:explicit>'.PHP_EOL;
721
  echo "\t\t<itunes:duration>" . ltrim($EpisodeData['duration'], '0:') . '</itunes:duration>'.PHP_EOL;
722
 
723
  if( $block && $block == 'yes' )
724
+ echo "\t\t<itunes:block>yes</itunes:block>".PHP_EOL;
725
+
726
+ if( $cc && $cc == 'yes' )
727
+ echo "\t\t<itunes:isClosedCaptioned>yes</itunes:isClosedCaptioned>".PHP_EOL;
728
+
729
+ if( !empty($powerpress_feed['itunes_feature']) ) // We are using the itunes:order option to feature a specific episode.
730
+ {
731
+ // Skip inserting the order tag
732
+ }
733
+ else
734
+ {
735
+ if( isset( $EpisodeData['order'] ) && is_numeric($EpisodeData['order']) )
736
+ echo "\t\t<itunes:order>". $EpisodeData['order'] ."</itunes:order>".PHP_EOL;
737
+ }
738
 
739
  // RawVoice RSS Tags
740
+ if( empty($powerpress_feed['feed_maximizer_on']) )
741
  {
742
+ if( !defined('POWERPRESS_RAWVOICE_RSS') || POWERPRESS_RAWVOICE_RSS != false )
 
 
 
 
 
 
743
  {
744
+ if( !empty($EpisodeData['ishd']) )
745
+ echo "\t\t<rawvoice:isHD>yes</rawvoice:isHD>".PHP_EOL;;
746
+ if( !empty($EpisodeData['image']) )
747
+ echo "\t\t<rawvoice:poster url=\"". $EpisodeData['image'] ."\" />".PHP_EOL;
748
+ if( !empty($EpisodeData['embed']) )
749
+ echo "\t\t<rawvoice:embed>". htmlspecialchars($EpisodeData['embed']) ."</rawvoice:embed>".PHP_EOL;
750
+ else if( !empty($powerpress_feed['podcast_embed_in_feed']) && function_exists('powerpress_generate_embed') )
751
+ {
752
+ $player = powerpressplayer_embedable($EpisodeData['url'], $EpisodeData);
753
+ $embed_content = '';
754
+ // TODO:
755
+ if( $player )
756
+ $embed_content = powerpress_generate_embed($player, $EpisodeData);
757
+ if( $embed_content )
758
+ echo "\t\t<rawvoice:embed>". htmlspecialchars( $embed_content ) ."</rawvoice:embed>".PHP_EOL;
759
+ }
760
+
761
+ if( !empty($EpisodeData['webm_src']) )
762
+ {
763
+ echo "\t\t<rawvoice:webm src=\"". $EpisodeData['webm_src'] ."\"";
764
+ if( $EpisodeData['webm_length'] )
765
+ echo " length=\"". $EpisodeData['webm_length'] ."\"";
766
+ echo " type=\"video/webm\" />".PHP_EOL;
767
+ }
768
 
769
+ $GeneralSettings = get_option('powerpress_general');
770
+
771
+ if( !empty($GeneralSettings) && !empty($GeneralSettings['metamarks']) )
772
+ {
773
+ require_once(POWERPRESS_ABSPATH .'/powerpressadmin-metamarks.php');
774
+ powerpress_metamarks_print_rss2($EpisodeData);
775
+ }
 
 
 
 
 
 
 
776
  }
777
  }
778
  }
932
  }
933
  }
934
 
935
+ //$wp_query->get_posts(); // No longer needed as it duplicates the existing get posts query already performed
936
+ if( !empty($GeneralSettings['episode_box_feature_in_itunes']) || !empty($GeneralSettings['feature_in_itunes']) )
937
+ {
938
+ // Use the template for the always featured option
939
+ load_template( POWERPRESS_ABSPATH . '/feed-podcast.php' );
940
+ }
941
+ else
942
+ {
943
+ do_feed_rss2($for_comments);
944
+ }
945
+
946
  }
947
 
948
  function powerpress_template_redirect()
1186
  $powerpress_feed['rss_language'] = $Feed['rss_language'];
1187
  if( !empty($GeneralSettings['podcast_embed_in_feed']) )
1188
  $powerpress_feed['podcast_embed_in_feed'] = true;
1189
+ if( !empty($Feed['maximize_feed']) )
1190
+ $powerpress_feed['maximize_feed'] = true;
1191
  return;
1192
  }
1193
 
1600
  return 'application/x-shockwave-flash';
1601
  case 'ogx':
1602
  return 'application/ogg';
1603
+
1604
+ // Most recently added by Apple:
1605
+ case 'epub':
1606
+ return 'document/x-epub';
1607
+
1608
  default: // Let it fall through
1609
  }
1610
  }
1926
  unset($FeedSettings['itunes_new_feed_url']);
1927
  unset($FeedSettings['apply_to']);
1928
  unset($FeedSettings['feed_redirect_url']);
1929
+ unset($FeedSettings['itunes_complete']);
1930
+ unset($FeedSettings['itunes_block']);
1931
+ unset($FeedSettings['maximize_feed']);
1932
 
1933
  // If the setting is not already set, set the enhnaced itunes setting if they have PHP5+ on by default
1934
  if( !isset($FeedSettings['enhance_itunes_summary']) )
powerpressadmin-basic.php CHANGED
@@ -85,6 +85,18 @@ jQuery(document).ready(function($) {
85
  }
86
  }
87
  } );
 
 
 
 
 
 
 
 
 
 
 
 
88
  } );
89
  //-->
90
  </script>
@@ -200,7 +212,7 @@ jQuery(document).ready(function($) {
200
  </div>
201
  <div>
202
  <input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
203
- <strong><?php echo __('Meta Marks', 'powerpress'); ?></strong><?php echo ' '. powerpressadmin_new(); ?> -
204
  <?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
205
  <?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
206
  <span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
@@ -252,6 +264,13 @@ function powerpressadmin_edit_entry_options($General)
252
  $General['auto_enclose'] = 0;
253
  if( !isset($General['episode_box_player_size']) )
254
  $General['episode_box_player_size'] = 0;
 
 
 
 
 
 
 
255
  ?>
256
  <h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
257
 
@@ -295,12 +314,13 @@ function powerpressadmin_edit_entry_options($General)
295
 
296
  </div>
297
 
298
- <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( !empty($General['episode_box_cover_image']) ) echo ' checked'; ?> /> <?php echo __('Video Poster Image', 'powerpress'); ?>
299
  (<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
300
 
301
- <p style="margin-top: 15px;"><input id="episode_box_player_size" class="episode_box_option" name="General[episode_box_player_size]" type="checkbox" value="1"<?php if( !empty($General['episode_box_player_size']) ) echo ' checked'; ?> /> <?php echo __('Player Width and Height', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
302
  (<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
303
 
 
304
  <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', 'powerpress'); ?>
305
  (<?php echo __('Leave unchecked to use your blog post tags', 'powerpress'); ?>)</p>
306
  <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', 'powerpress'); ?>
@@ -311,11 +331,34 @@ function powerpressadmin_edit_entry_options($General)
311
  (<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
312
  <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', 'powerpress'); ?>
313
  (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
 
 
 
 
 
 
 
 
314
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  <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.', 'powerpress'); ?></em><br />
316
- <em><strong><?php echo __('USE THE ITUNES FIELDS ABOVE AT YOUR OWN RISK.', 'powerpress'); ?></strong></em>
317
  </div>
318
-
319
 
320
  </td>
321
  </tr>
@@ -905,6 +948,9 @@ function powerpressadmin_appearance($General=false)
905
  <p>
906
  <?php echo sprintf(__('Please visit the %s page for additional options.', 'powerpress'), '<a href="http://help.blubrry.com/blubrry-powerpress/shortcode/" target="_blank">'. __('PowerPress Shortcode', 'powerpress') .'</a>' ); ?>
907
  </p>
 
 
 
908
  </td>
909
  </tr>
910
 
@@ -939,7 +985,7 @@ function powerpressadmin_appearance($General=false)
939
  <p style="margin-left: 35px;"><input type="checkbox" id="display_download_size" name="PlayerSettings[display_download_size]" value="1" <?php if( $General['podcast_link'] == 2 || $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( !this.checked ) { jQuery('#display_download_duration').removeAttr('checked'); }" /> <?php echo __('Include file size', 'powerpress'); ?>
940
  <input type="checkbox" style="margin-left: 30px;" id="display_download_duration" name="PlayerSettings[display_download_duration]" value="1" <?php if( $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( this.checked ) { jQuery('#display_download_size').attr('checked','checked'); }" /> <?php echo __('Include file size and duration', 'powerpress'); ?></p>
941
 
942
- <p><label><input type="checkbox" name="General[podcast_embed]" value="1" <?php if( !empty($General['podcast_embed']) ) echo 'checked '; ?>/> <?php echo __('Display Player Embed Link', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></label></p>
943
  <p style="margin-left: 35px;">
944
  <input type="checkbox" name="General[podcast_embed_in_feed]" value="1" <?php if( !empty($General['podcast_embed_in_feed']) ) echo 'checked'; ?> /> <?php echo __('Include embed in feeds', 'powerpress'); ?>
945
  </p>
@@ -1060,7 +1106,7 @@ function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $c
1060
  <table class="form-table">
1061
  <tr valign="top">
1062
  <th scope="row">
1063
- <?php echo __('Parental Rating', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
1064
  <td>
1065
  <p><?php echo sprintf(__('A parental rating is used to display your content on %s applications available on Internet connected TV\'s. The TV Parental Rating applies to both audio and video media.', 'powerpress'), '<strong><a href="http://www.blubrry.com/roku_blubrry/" target="_blank">Blubrry</a></strong>'); ?></p>
1066
  <?php
85
  }
86
  }
87
  } );
88
+
89
+ jQuery('#episode_box_feature_in_itunes').change( function() {
90
+ var objectChecked = jQuery('#episode_box_feature_in_itunes').attr('checked');
91
+ if(typeof jQuery.prop === 'function') {
92
+ objectChecked = jQuery('#episode_box_feature_in_itunes').prop('checked');
93
+ }
94
+ if( objectChecked ) {
95
+ $("#episode_box_order").attr("disabled", true);
96
+ } else {
97
+ $("#episode_box_order").removeAttr("disabled");
98
+ }
99
+ });
100
  } );
101
  //-->
102
  </script>
212
  </div>
213
  <div>
214
  <input type="checkbox" name="General[metamarks]" value="1" <?php echo ( !empty($General['metamarks']) ?' checked':''); ?> />
215
+ <strong><?php echo __('Meta Marks', 'powerpress'); ?></strong> -
216
  <?php echo __('Add additional meta information to your media for syndication.', 'powerpress'); ?>
217
  <?php echo powerpress_help_link('http://www.powerpresspodcast.com/metamarks/'); ?>
218
  <span style="font-size: 85%;">(<?php echo __('feature will appear in episode entry box', 'powerpress'); ?>)</span>
264
  $General['auto_enclose'] = 0;
265
  if( !isset($General['episode_box_player_size']) )
266
  $General['episode_box_player_size'] = 0;
267
+ if( !isset($General['episode_box_closed_captioned']) )
268
+ $General['episode_box_closed_captioned'] = 0;
269
+ if( !isset($General['episode_box_order']) )
270
+ $General['episode_box_order'] = 0;
271
+ if( !isset($General['episode_box_feature_in_itunes']) )
272
+ $General['episode_box_feature_in_itunes'] = 0;
273
+
274
  ?>
275
  <h3><?php echo __('Episode Entry Options', 'powerpress'); ?></h3>
276
 
314
 
315
  </div>
316
 
317
+ <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( !empty($General['episode_box_cover_image']) ) echo ' checked'; ?> /> <?php echo __('Poster Image', 'powerpress'); ?>
318
  (<?php echo __('Specify URL to poster artwork specific to each episode', 'powerpress'); ?>)</p>
319
 
320
+ <p style="margin-top: 15px;"><input id="episode_box_player_size" class="episode_box_option" name="General[episode_box_player_size]" type="checkbox" value="1"<?php if( !empty($General['episode_box_player_size']) ) echo ' checked'; ?> /> <?php echo __('Player Width and Height', 'powerpress'); ?>
321
  (<?php echo __('Customize player width and height on a per episode basis', 'powerpress'); ?>)</p>
322
 
323
+ <em><strong><?php echo __('USE THE ITUNES FIELDS BELOW AT YOUR OWN RISK.', 'powerpress'); ?></strong></em>
324
  <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', 'powerpress'); ?>
325
  (<?php echo __('Leave unchecked to use your blog post tags', 'powerpress'); ?>)</p>
326
  <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', 'powerpress'); ?>
331
  (<?php echo __('Leave unchecked to the post author name', 'powerpress'); ?>)</p>
332
  <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', 'powerpress'); ?>
333
  (<?php echo __('Leave unchecked to use your feed\'s explicit setting', 'powerpress'); ?>)</p>
334
+
335
+ <p style="margin-top: 15px;"><input id="episode_box_closed_captioned" class="episode_box_option" name="General[episode_box_closed_captioned]" type="checkbox" value="1"<?php if( !empty($General['episode_box_closed_captioned']) ) echo ' checked'; ?> /> <?php echo __('iTunes Closed Captioned', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
336
+ (<?php echo __('Leave unchecked if you do not distribute closed captioned media', 'powerpress'); ?>)</p>
337
+
338
+ <p style="margin-top: 15px;"><input id="episode_box_order" class="episode_box_option" name="General[episode_box_order]" type="checkbox" value="1"<?php if( !empty($General['episode_box_order']) ) echo ' checked'; ?> <?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' disabled'; ?> /> <?php echo __('iTunes Order', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
339
+ (<?php echo __('Override the default ordering of episodes on the iTunes podcast directory', 'powerpress'); ?>)</p>
340
+ <em><strong><?php echo __('If conflicting values are present the iTunes directory will use the default ordering.', 'powerpress'); ?></strong></em><br />
341
+ <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
342
 
343
+ <p style="margin-top: 15px;"><input id="episode_box_feature_in_itunes" class="episode_box_option" name="General[episode_box_feature_in_itunes]" type="checkbox" value="1"<?php if( !empty($General['episode_box_feature_in_itunes']) ) echo ' checked'; ?> /> <?php echo __('Feature Episode in iTunes', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
344
+ (<?php echo __('Display selected episode at top of your iTunes Directory listing', 'powerpress'); ?>)</p>
345
+ <em><strong><?php echo __('All other episodes will be listed following the featured episode.', 'powerpress'); ?></strong></em><br />
346
+ <em><strong><?php echo __('This feature only applies to the default podcast feed and Custom Podcast Channel feeds added by PowerPress.', 'powerpress'); ?></strong></em>
347
+
348
+ <?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { ?>
349
+ <fieldset style="border: 1px dashed #333333; margin: 10px 0 10px -20px;">
350
+ <legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
351
+ <p style="margin: 5px 10px 0 20px;">
352
+ <strong style="color: #CC0000;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
353
+ </p>
354
+ <p style="margin: 10px 10px 10px 20px;"><input id="episode_box_block" class="episode_box_option" name="General[episode_box_block]" type="checkbox" value="1"<?php if( !empty($General['episode_box_block']) ) echo ' checked'; ?> /> <?php echo __('iTunes Block', 'powerpress'); ?>
355
+ (<?php echo __('Prevent episodes from appearing in iTunes. Feature only applies to iTunes, episodes will still appear in other directories and applications', 'powerpress'); ?>)</p>
356
+
357
+
358
+ </fieldset>
359
+ <?php } ?>
360
  <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.', 'powerpress'); ?></em><br />
 
361
  </div>
 
362
 
363
  </td>
364
  </tr>
948
  <p>
949
  <?php echo sprintf(__('Please visit the %s page for additional options.', 'powerpress'), '<a href="http://help.blubrry.com/blubrry-powerpress/shortcode/" target="_blank">'. __('PowerPress Shortcode', 'powerpress') .'</a>' ); ?>
950
  </p>
951
+ <p>
952
+ <?php echo __('Note: When specifying a URL to media in the powerpress shortcode, only the player is included. The Media Links will <u>NOT</u> be included since there is not enough meta information to display them.', 'powerpress'); ?>
953
+ </p>
954
  </td>
955
  </tr>
956
 
985
  <p style="margin-left: 35px;"><input type="checkbox" id="display_download_size" name="PlayerSettings[display_download_size]" value="1" <?php if( $General['podcast_link'] == 2 || $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( !this.checked ) { jQuery('#display_download_duration').removeAttr('checked'); }" /> <?php echo __('Include file size', 'powerpress'); ?>
986
  <input type="checkbox" style="margin-left: 30px;" id="display_download_duration" name="PlayerSettings[display_download_duration]" value="1" <?php if( $General['podcast_link'] == 3 ) echo 'checked'; ?> onclick="if( this.checked ) { jQuery('#display_download_size').attr('checked','checked'); }" /> <?php echo __('Include file size and duration', 'powerpress'); ?></p>
987
 
988
+ <p><label><input type="checkbox" name="General[podcast_embed]" value="1" <?php if( !empty($General['podcast_embed']) ) echo 'checked '; ?>/> <?php echo __('Display Player Embed Link', 'powerpress'); ?> </label></p>
989
  <p style="margin-left: 35px;">
990
  <input type="checkbox" name="General[podcast_embed_in_feed]" value="1" <?php if( !empty($General['podcast_embed_in_feed']) ) echo 'checked'; ?> /> <?php echo __('Include embed in feeds', 'powerpress'); ?>
991
  </p>
1106
  <table class="form-table">
1107
  <tr valign="top">
1108
  <th scope="row">
1109
+ <?php echo __('Parental Rating', 'powerpress'); ?> </th>
1110
  <td>
1111
  <p><?php echo sprintf(__('A parental rating is used to display your content on %s applications available on Internet connected TV\'s. The TV Parental Rating applies to both audio and video media.', 'powerpress'), '<strong><a href="http://www.blubrry.com/roku_blubrry/" target="_blank">Blubrry</a></strong>'); ?></p>
1112
  <?php
powerpressadmin-dashboard.php CHANGED
@@ -84,6 +84,23 @@ function powerpress_dashboard_head()
84
  margin-top: 5px;
85
  }
86
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  <?php
88
  }
89
 
@@ -155,6 +172,27 @@ function powerpress_dashboard_news_content()
155
  powerpressadmin_community_news();
156
  }
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  function powerpress_feed_text_limit( $text, $limit, $finish = '&hellip;') {
160
  if( strlen( $text ) > $limit ) {
@@ -182,15 +220,31 @@ function powerpress_dashboard_setup()
182
 
183
  if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
184
  $StatsDashboard = false;
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
- //if( $Settings )
187
- //{
188
- if( $NewsDashboard )
189
- wp_add_dashboard_widget( 'powerpress_dashboard_news', __( 'Blubrry PowerPress & Community Podcast', 'powerpress'), 'powerpress_dashboard_news_content' );
190
-
191
- if( $StatsDashboard )
192
- wp_add_dashboard_widget( 'powerpress_dashboard_stats', __( 'Blubrry Podcast Statistics', 'powerpress'), 'powerpress_dashboard_stats_content' );
193
- //}
 
 
 
 
194
 
195
  $user_options = get_user_option('powerpress_user');
196
  if( empty($user_options) || empty($user_options['dashboard_installed']) || $user_options['dashboard_installed'] < 2 )
@@ -199,6 +253,8 @@ function powerpress_dashboard_setup()
199
  $user_options = array();
200
  $user = wp_get_current_user();
201
 
 
 
202
  // First time we've seen this setting, so must be first time we've added the widgets, lets stack them at the top for convenience.
203
  powerpressadmin_add_dashboard_widgets($user->ID);
204
  $user_options['dashboard_installed'] = 2; // version of PowerPress
@@ -210,6 +266,25 @@ function powerpress_dashboard_setup()
210
  }
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
214
  {
215
  // Only re-order the powerpress widgets if they aren't already on the dashboard:
@@ -246,6 +321,15 @@ function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
246
  $dashboard_current = $wp_meta_boxes['dashboard']['normal']['core'];
247
 
248
  $dashboard_powerpress = array();
 
 
 
 
 
 
 
 
 
249
  if( isset( $dashboard_current['powerpress_dashboard_news'] ) )
250
  {
251
  $dashboard_powerpress['powerpress_dashboard_news'] = $dashboard_current['powerpress_dashboard_news'];
@@ -267,4 +351,19 @@ function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
267
  add_action('admin_head-index.php', 'powerpress_dashboard_head');
268
  add_action('wp_dashboard_setup', 'powerpress_dashboard_setup');
269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  ?>
84
  margin-top: 5px;
85
  }
86
  </style>
87
+ <script type="text/javascript"><!--
88
+ jQuery(document).ready(function($) {
89
+ jQuery('.powerpress-dashboard-notice').click( function(e) {
90
+ e.preventDefault();
91
+ var dash_id = jQuery(this).parents('.postbox').attr('id');
92
+ jQuery( '#' + dash_id + '-hide' ).prop('checked', false).triggerHandler('click');
93
+
94
+ jQuery.ajax( {
95
+ type: 'POST',
96
+ url: '<?php echo admin_url(); ?>admin-ajax.php',
97
+ data: { action: 'powerpress_dashboard_dismiss', dismiss_dash_id : dash_id },
98
+ success: function(response) {
99
+ }
100
+ });
101
+ });
102
+ });
103
+ // --></script>
104
  <?php
105
  }
106
 
172
  powerpressadmin_community_news();
173
  }
174
 
175
+ function powerpress_dashboard_notice_1_content()
176
+ {
177
+ $DismissedNotices = get_option('powerpress_dismissed_notices');
178
+
179
+ if( !empty($DismissedNotices[1]) )
180
+ return; // Lets not do anything to the dashboard for PowerPress Notice
181
+
182
+ $message = '<p>'. __('Apple iTunes podcast specifications for show artwork have changed! Your iTunes image should now be 1400 x 1400 in jpg format.', 'powerpress') .'</p>';
183
+ $message .= '<p><a href="http://www.powerpresspodcast.com/2012/05/10/itunes-podcasting-specifications-changed-may-2012-what-that-means-for-podcasting/" target="_blank">'. __('Learn more about iTunes podcasting changes', 'powerpress') .'</a></p>';
184
+
185
+ powerpress_dashboard_notice_message(1, $message );
186
+ }
187
+
188
+
189
+ function powerpress_dashboard_notice_message($notice_id, $message)
190
+ {
191
+ echo $message;
192
+ // Add link to remove this notice.
193
+ echo '<p><a href="#" id="powerpress_dashboard_notice_'. $notice_id .'_dismiss" class="powerpress-dashboard-notice">'. __('Dismiss', 'powerpress') .'</a></p>';
194
+ }
195
+
196
 
197
  function powerpress_feed_text_limit( $text, $limit, $finish = '&hellip;') {
198
  if( strlen( $text ) > $limit ) {
220
 
221
  if( !empty($Settings['use_caps']) && !current_user_can('view_podcast_stats') )
222
  $StatsDashboard = false;
223
+
224
+ // PowerPress Dashboard Notice 1:
225
+ $Notice1Dashboard = false;
226
+ if( $Settings['timestamp'] < mktime(0, 0, 0, 5, 15, 2012) )
227
+ {
228
+ $Notice1Dashboard = true;
229
+ // Now check if they dismissed the notice...
230
+ $DismissedNotices = get_option('powerpress_dismissed_notices');
231
+ if( !empty($DismissedNotices[1]) )
232
+ $Notice1Dashboard = false;
233
+ }
234
+ //$Notice1Dashboard = false;// Temporary till release
235
 
236
+ if( $Notice1Dashboard )
237
+ {
238
+ $user = wp_get_current_user();
239
+ powerpressadmin_add_dashboard_notice_widget($user->ID, 1);
240
+ wp_add_dashboard_widget( 'powerpress_dashboard_notice_1', __( 'Blubrry PowerPress Notice - May 2012', 'powerpress'), 'powerpress_dashboard_notice_1_content' );
241
+ }
242
+
243
+ if( $NewsDashboard )
244
+ wp_add_dashboard_widget( 'powerpress_dashboard_news', __( 'Blubrry PowerPress & Community Podcast', 'powerpress'), 'powerpress_dashboard_news_content' );
245
+
246
+ if( $StatsDashboard )
247
+ wp_add_dashboard_widget( 'powerpress_dashboard_stats', __( 'Blubrry Podcast Statistics', 'powerpress'), 'powerpress_dashboard_stats_content' );
248
 
249
  $user_options = get_user_option('powerpress_user');
250
  if( empty($user_options) || empty($user_options['dashboard_installed']) || $user_options['dashboard_installed'] < 2 )
253
  $user_options = array();
254
  $user = wp_get_current_user();
255
 
256
+
257
+
258
  // First time we've seen this setting, so must be first time we've added the widgets, lets stack them at the top for convenience.
259
  powerpressadmin_add_dashboard_widgets($user->ID);
260
  $user_options['dashboard_installed'] = 2; // version of PowerPress
266
  }
267
  }
268
 
269
+ function powerpressadmin_add_dashboard_notice_widget($user_id, $notice_id)
270
+ {
271
+ $user_options = get_user_option('meta-box-order_dashboard', $user_id);
272
+ if( $user_options )
273
+ {
274
+ $save = false;
275
+ if( !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['normal']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['side']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['column3']) && !preg_match('/powerpress_dashboard_notice_'.$notice_id.'/', $user_options['column4']) )
276
+ {
277
+ $save = true;
278
+ $user_options['normal'] = 'powerpress_dashboard_notice_'.$notice_id.','.$user_options['normal'];
279
+ }
280
+
281
+ if( $save )
282
+ {
283
+ update_user_option($user_id, "meta-box-order_dashboard", $user_options, true);
284
+ }
285
+ }
286
+ }
287
+
288
  function powerpressadmin_add_dashboard_widgets( $check_user_id = false)
289
  {
290
  // Only re-order the powerpress widgets if they aren't already on the dashboard:
321
  $dashboard_current = $wp_meta_boxes['dashboard']['normal']['core'];
322
 
323
  $dashboard_powerpress = array();
324
+ for( $i = 0; $i < 20; $i++ )
325
+ {
326
+ if( isset( $dashboard_current['powerpress_dashboard_notice_' . $i] ) )
327
+ {
328
+ $dashboard_powerpress['powerpress_dashboard_notice_' . $i] = $dashboard_current['powerpress_dashboard_notice_' . $i];
329
+ unset($dashboard_current['powerpress_dashboard_notice_' . $i]);
330
+ }
331
+ }
332
+
333
  if( isset( $dashboard_current['powerpress_dashboard_news'] ) )
334
  {
335
  $dashboard_powerpress['powerpress_dashboard_news'] = $dashboard_current['powerpress_dashboard_news'];
351
  add_action('admin_head-index.php', 'powerpress_dashboard_head');
352
  add_action('wp_dashboard_setup', 'powerpress_dashboard_setup');
353
 
354
+ function powerpress_dashboard_dismiss() // Called by AJAX call
355
+ {
356
+ $dismiss_dash_id = $_POST['dismiss_dash_id'];
357
+ preg_match('/^powerpress_dashboard_notice_(.*)$/i', $dismiss_dash_id, $match );
358
+ if( empty($match[1]) )
359
+ exit;
360
+ $DismissedNotices = get_option('powerpress_dismissed_notices');
361
+ if( !is_array($DismissedNotices) )
362
+ $DismissedNotices = array();
363
+ $DismissedNotices[ $match[1] ] = 1;
364
+ update_option('powerpress_dismissed_notices', $DismissedNotices);
365
+ echo 'ok';
366
+ exit;
367
+ }
368
+
369
  ?>
powerpressadmin-editfeed.php CHANGED
@@ -518,9 +518,31 @@ else
518
  <?php if( !$feed_slug && !$cat_ID ) { ?>
519
  <p style="margin-top: 5px; margin-bottomd: 0;"><?php echo __('Note: Setting above applies only to podcast channel feeds', 'powerpress'); ?></p>
520
  <?php } ?>
 
521
  </td>
522
  </tr>
523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  <tr valign="top">
525
  <th scope="row">
526
  <?php echo __('RSS2 Image', 'powerpress'); ?> <br />
@@ -530,7 +552,9 @@ else
530
  <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
531
 
532
  <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
533
- <p><?php echo __('RSS image should be at least 88 and at most 144 pixels wide and at least 31 and at most 400 pixels high in either .gif, .jpg and .png format. A square 144 x 144 pixel image is recommended.', 'powerpress'); ?></p>
 
 
534
 
535
  <?php if( $SupportUploads ) { ?>
536
  <p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></p>
@@ -589,14 +613,14 @@ if( isset($Languages[ $rss_language ]) )
589
  <div id="rawvoice_basic_options">
590
  <table class="form-table">
591
  <tr valign="top">
592
- <th scope="row"><?php echo __('Location', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
593
  <td>
594
  <input type="text" style="width: 300px;" name="Feed[location]" value="<?php echo $FeedSettings['location']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
595
  <p><?php echo __('e.g. Cleveland, Ohio', 'powerpress'); ?></p>
596
  </td>
597
  </tr>
598
  <tr valign="top">
599
- <th scope="row"><?php echo __('Episode Frequency', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></th>
600
  <td>
601
  <input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php echo $FeedSettings['frequency']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
602
  <p><?php echo __('e.g. Weekly', 'powerpress'); ?></p>
@@ -1035,15 +1059,26 @@ while( list($value,$desc) = each($explicit) )
1035
  <input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%;" value="<?php echo ( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="250" />
1036
  <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1037
 
1038
- <p><?php echo __('Place the URL to the iTunes image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/itunes.jpg<br /><br />
1039
- <?php echo __('iTunes prefers square .jpg or .png images that are at 600 x 600 pixels (prevously 300 x 300), which is different than what is specified for the standard RSS image.', 'powerpress'); ?></p>
 
 
 
 
 
 
 
1040
 
1041
- <p><?php echo __('Note: It may take some time (days or even a month) for iTunes to cache modified or replaced iTunes images in the iTunes Podcast Directory.', 'powerpress'); ?>
1042
  <?php echo sprintf( __('Please contact %s if you are having issues with your image changes not appearing in iTunes.', 'powerpress'), '<a href="http://www.apple.com/support/itunes/">'. __('iTunes Support', 'powerpress') .'</a>'); ?></p>
1043
  <?php if( $SupportUploads ) { ?>
1044
- <p><input name="itunes_image_checkbox" type="checkbox" onchange="powerpress_show_field('itunes_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> </p>
 
 
 
1045
  <div style="display:none" id="itunes_image_upload">
1046
- <label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="itunes_image_file" />
 
1047
  </div>
1048
  <?php } ?>
1049
  </td>
@@ -1141,9 +1176,88 @@ while( list($value,$desc) = each($explicit) )
1141
  </div>
1142
  </td>
1143
  </tr>
 
1144
  <!-- end advanced features -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1146
  </table>
 
 
 
1147
  <?php
1148
  }
1149
 
518
  <?php if( !$feed_slug && !$cat_ID ) { ?>
519
  <p style="margin-top: 5px; margin-bottomd: 0;"><?php echo __('Note: Setting above applies only to podcast channel feeds', 'powerpress'); ?></p>
520
  <?php } ?>
521
+ <p style="margin-top: 5px; margin-bottomd: 0;"><?php echo __('WARNING: Setting this value larger than 10 may cause feed timeout errors and delay podcast directory listings from updating.', 'powerpress'); ?></p>
522
  </td>
523
  </tr>
524
 
525
+ <?php
526
+ if( $feed_slug )
527
+ {
528
+ ?>
529
+ <tr valign="top">
530
+ <th scope="row">
531
+ <?php echo __('Feed Episode Maximizer', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?>
532
+ </th>
533
+ <td>
534
+ <input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if( !empty($FeedSettings['maximize_feed']) ) echo 'checked'; ?> />
535
+ <?php echo __('The latest 10 episodes in feed will remain as normal. The remaining 11+ older episodes in feed will have only the bare essential tags in order to maximize the number of episodes in the feed.', 'powerpress'); ?>
536
+
537
+ <p style="margin-top: 0px; margin-bottomd: 0;"><?php echo powerpressadmin_notice( __('This feature is experimental, use at your own risk.', 'powerpress') ); ?></p>
538
+
539
+
540
+ <p style="margin-top: 0px; margin-bottomd: 0;"><?php echo __('NOTE: This feature may allow you to enter a larger value for the "Show the most recent" setting above. You must make sure that your feed does not exceed 512KB (1/2 MB) in size.', 'powerpress'); ?></p>
541
+ </td>
542
+ </tr>
543
+ <?php
544
+ }
545
+ ?>
546
  <tr valign="top">
547
  <th scope="row">
548
  <?php echo __('RSS2 Image', 'powerpress'); ?> <br />
552
  <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
553
 
554
  <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p>
555
+
556
+ <p><?php echo __('RSS image should be at least 88 pixels wide and at least 31 pixels high in either .gif, .jpg and .png format.', 'powerpress'); ?></p>
557
+ <p><strong><?php echo __('A square image that is 300 x 300 pixel or larger in .jpg format is recommended.', 'powerpress'); ?></strong></p>
558
 
559
  <?php if( $SupportUploads ) { ?>
560
  <p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?></p>
613
  <div id="rawvoice_basic_options">
614
  <table class="form-table">
615
  <tr valign="top">
616
+ <th scope="row"><?php echo __('Location', 'powerpress'); ?></th>
617
  <td>
618
  <input type="text" style="width: 300px;" name="Feed[location]" value="<?php echo $FeedSettings['location']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
619
  <p><?php echo __('e.g. Cleveland, Ohio', 'powerpress'); ?></p>
620
  </td>
621
  </tr>
622
  <tr valign="top">
623
+ <th scope="row"><?php echo __('Episode Frequency', 'powerpress'); ?></th>
624
  <td>
625
  <input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php echo $FeedSettings['frequency']; ?>" maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?>)
626
  <p><?php echo __('e.g. Weekly', 'powerpress'); ?></p>
1059
  <input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%;" value="<?php echo ( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="250" />
1060
  <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>
1061
 
1062
+ <p><?php echo powerpressadmin_notice( __('iTunes image specifications changed in May, 2012', 'powerpress') ); ?></p>
1063
+ <p><?php echo __('iTunes image should be at least 1400 x 1400 pixels in .jpg or .png format using RGB color space.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?>: http://example.com/images/itunes.jpg
1064
+ </p>
1065
+
1066
+ <p><strong><?php echo __('A square image that is 1400 x 1400 pixels in .jpg format is recommended.', 'powerpress'); ?></strong></p>
1067
+
1068
+ <p>
1069
+ <?php echo __('This image is for your listing on the iTunes podcast directory and may also be used by other directories such as Zune and Blubrry. It is not the artwork that is displayed during episode playback. That artwork needs to be saved into the media file in the form of tags (ID3 tags for mp3) following the production of the media file.', 'powerpress'); ?>
1070
+ </p>
1071
 
1072
+ <p><?php echo __('Note: If you change the iTunes image without changing the file name it may take some time (days or even months) for iTunes to update the image in the iTunes Podcast Directory.', 'powerpress'); ?>
1073
  <?php echo sprintf( __('Please contact %s if you are having issues with your image changes not appearing in iTunes.', 'powerpress'), '<a href="http://www.apple.com/support/itunes/">'. __('iTunes Support', 'powerpress') .'</a>'); ?></p>
1074
  <?php if( $SupportUploads ) { ?>
1075
+
1076
+ <p><input name="itunes_image_checkbox" type="checkbox" onchange="powerpress_show_field('itunes_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> &nbsp;
1077
+ <span style="font-size:85%;">(<?php echo __('Using this option should update your image on iTunes within 24 hours', 'powerpress'); ?>)</span>
1078
+ </p>
1079
  <div style="display:none" id="itunes_image_upload">
1080
+ <label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?>:</label><input type="file" name="itunes_image_file" /><br />
1081
+ <div style="margin-left: 85px;"><input name="itunes_image_checkbox_as_rss" type="checkbox" value="1" /> <?php echo __('Also use as RSS image', 'powerpress'); ?></div>
1082
  </div>
1083
  <?php } ?>
1084
  </td>
1176
  </div>
1177
  </td>
1178
  </tr>
1179
+ </table>
1180
  <!-- end advanced features -->
1181
+ <?php if( defined('POWERPRESS_NOT_SUPPORTED') ) { // start powerpress not supported features ?>
1182
+ <fieldset style="border: 1px dashed #333333;">
1183
+ <legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?></legend>
1184
+
1185
+ <div style="margin-left: 230px; margin-bottom: 10px;">
1186
+ <p>
1187
+ <strong style="color: #CC0000; font-weight: bold;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?></strong>
1188
+ </p>
1189
+ <p style="margin-bottom: 0;">
1190
+ <?php echo __('Feeds affected', 'powerpress'); ?>:
1191
+ </p>
1192
+ <div style="margin-left: 20px;">
1193
+ <?php
1194
+ // $General, $feed_slug=false, $cat_ID=false
1195
+
1196
+ if( $feed_slug )
1197
+ {
1198
+ echo '<a href="';
1199
+ echo get_feed_link($feed_slug);
1200
+ echo '" target="_blank">';
1201
+ echo get_feed_link($feed_slug);
1202
+ echo '</a>';
1203
+ }
1204
+ else if( $cat_ID )
1205
+ {
1206
+ echo '<a href="';
1207
+ echo get_category_feed_link( $cat_ID );
1208
+ echo '" target="_blank">';
1209
+ echo get_category_feed_link( $cat_ID );
1210
+ echo '</a>';
1211
+ }
1212
+ else
1213
+ {
1214
+ echo '<a href="';
1215
+ echo get_feed_link('feed');
1216
+ echo '" target="_blank">';
1217
+ echo get_feed_link('feed');
1218
+ echo '</a>';
1219
+
1220
+ if( empty($General['custom_feeds']['podcast']) )
1221
+ {
1222
+ echo '<br /><a href="';
1223
+ echo get_feed_link('podcast');
1224
+ echo '" target="_blank">';
1225
+ echo get_feed_link('podcast');
1226
+ echo '</a>';
1227
+ }
1228
+ }
1229
+
1230
+ ?>
1231
+ </div>
1232
+
1233
+ </div>
1234
+ <!-- start advanced features -->
1235
+ <div id="permanent_itunes_settings">
1236
+ <table class="form-table">
1237
+
1238
+ <tr valign="top">
1239
+ <th scope="row" >
1240
 
1241
+ <?php echo __('iTunes Block', 'powerpress'); ?></th>
1242
+ <td>
1243
+ <input type="checkbox" name="Feed[itunes_block]" value="1" <?php if( !empty($FeedSettings['itunes_block']) ) echo 'checked'; ?> />
1244
+ <?php echo __('Prevent the entire podcast from appearing in the iTunes Podcast directory.', 'powerpress'); ?>
1245
+ </td>
1246
+ </tr>
1247
+
1248
+ <tr valign="top">
1249
+ <th scope="row" >
1250
+
1251
+ <?php echo __('iTunes Complete', 'powerpress'); ?></th>
1252
+ <td>
1253
+ <input type="checkbox" name="Feed[itunes_complete]" value="1" <?php if( !empty($FeedSettings['itunes_complete']) ) echo 'checked'; ?> />
1254
+ <?php echo __('Indicate the completion of a podcast. iTunes will no longer update your listing in the iTunes Podcast directory.', 'powerpress'); ?>
1255
+ </td>
1256
+ </tr>
1257
  </table>
1258
+ </div>
1259
+ </fieldset>
1260
+ <?php } // End PowerPress not supported features ?>
1261
  <?php
1262
  }
1263
 
powerpressadmin-metabox.php CHANGED
@@ -21,6 +21,10 @@ function powerpress_meta_box($object, $box)
21
  $iTunesSummary = '';
22
  $iTunesAuthor = '';
23
  $iTunesExplicit = '';
 
 
 
 
24
  $NoPlayer = false;
25
  $NoLinks = false;
26
  $IsHD = false;
@@ -91,6 +95,14 @@ function powerpress_meta_box($object, $box)
91
  $NoLinks = $ExtraData['no_links'];
92
  if( isset($ExtraData['explicit']) )
93
  $iTunesExplicit = $ExtraData['explicit'];
 
 
 
 
 
 
 
 
94
  if( isset($ExtraData['image']) )
95
  $CoverImage = $ExtraData['image'];
96
  if( isset($ExtraData['ishd']) )
@@ -374,13 +386,82 @@ function powerpress_meta_box($object, $box)
374
  <div class="powerpress_row">
375
  <label for "Powerpress[<?php echo $FeedSlug; ?>][explicit]"><?php echo __('iTunes Explicit', 'powerpress'); ?></label>
376
  <div class="powerpress_row_content">
377
- <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 200px;">
378
  <?php
379
  $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress'), 2=>__('clean - no explicit content', 'powerpress') );
380
 
381
  while( list($value,$desc) = each($explicit_array) )
382
  echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
383
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  ?>
385
  </select>
386
  </div>
21
  $iTunesSummary = '';
22
  $iTunesAuthor = '';
23
  $iTunesExplicit = '';
24
+ $iTunesCC = false;
25
+ $iTunesOrder = false;
26
+ $FeedAlways = false;
27
+ $iTunesBlock = false;
28
  $NoPlayer = false;
29
  $NoLinks = false;
30
  $IsHD = false;
95
  $NoLinks = $ExtraData['no_links'];
96
  if( isset($ExtraData['explicit']) )
97
  $iTunesExplicit = $ExtraData['explicit'];
98
+ if( isset($ExtraData['cc']) )
99
+ $iTunesCC = $ExtraData['cc'];
100
+ if( isset($ExtraData['order']) )
101
+ $iTunesOrder = $ExtraData['order'];
102
+ if( isset($ExtraData['always']) )
103
+ $FeedAlways = $ExtraData['always'];
104
+ if( isset($ExtraData['block']) )
105
+ $iTunesBlock = $ExtraData['block'];
106
  if( isset($ExtraData['image']) )
107
  $CoverImage = $ExtraData['image'];
108
  if( isset($ExtraData['ishd']) )
386
  <div class="powerpress_row">
387
  <label for "Powerpress[<?php echo $FeedSlug; ?>][explicit]"><?php echo __('iTunes Explicit', 'powerpress'); ?></label>
388
  <div class="powerpress_row_content">
389
+ <select id="powerpress_explicit_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][explicit]" style="width: 220px;">
390
  <?php
391
  $explicit_array = array(''=>__('Use feed\'s explicit setting', 'powerpress'), 0=>__('no - display nothing', 'powerpress'), 1=>__('yes - explicit content', 'powerpress'), 2=>__('clean - no explicit content', 'powerpress') );
392
 
393
  while( list($value,$desc) = each($explicit_array) )
394
  echo "\t<option value=\"$value\"". ($iTunesExplicit==$value?' selected':''). ">$desc</option>\n";
395
 
396
+ ?>
397
+ </select>
398
+ </div>
399
+ </div>
400
+ <?php
401
+ }
402
+
403
+ if( !empty($GeneralSettings['episode_box_closed_captioned']) || $iTunesCC )
404
+ {
405
+ ?>
406
+ <div class="powerpress_row">
407
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][cc]"><?php echo __('iTunes CC', 'powerpress'); ?></label>
408
+ <div class="powerpress_row_content">
409
+ <select id="powerpress_cc_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][cc]" style="width: 220px;">
410
+ <?php
411
+ $cc_array = array(''=>__('No Closed Captioning', 'powerpress'), 1=>__('Yes, Closed Captioned media', 'powerpress') );
412
+
413
+ while( list($value,$desc) = each($cc_array) )
414
+ echo "\t<option value=\"$value\"". ($iTunesCC==$value?' selected':''). ">$desc</option>\n";
415
+ unset($cc_array);
416
+ ?>
417
+ </select>
418
+ </div>
419
+ </div>
420
+ <?php
421
+ }
422
+
423
+ if( !empty($GeneralSettings['episode_box_order']) || $iTunesOrder )
424
+ {
425
+ ?>
426
+ <div class="powerpress_row">
427
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][order]"><?php echo __('iTunes Order', 'powerpress'); ?></label>
428
+ <div class="powerpress_row_content">
429
+ <input id="powerpress_order_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][order]" value="<?php echo htmlspecialchars($iTunesOrder); ?>" style="width: 60px; font-size: 90%;" size="250" />
430
+ </div>
431
+ </div>
432
+ <?php
433
+ }
434
+
435
+ if( !empty($GeneralSettings['episode_box_feature_in_itunes']) )
436
+ {
437
+ $iTunesFeatured = get_option('powerpress_itunes_featured');
438
+ $FeaturedChecked = false;
439
+ if( !empty($object->ID) && !empty($iTunesFeatured[ $FeedSlug ]) && $iTunesFeatured[ $FeedSlug ] == $object->ID ) {
440
+ $FeaturedChecked = true; }
441
+ ?>
442
+ <div class="powerpress_row">
443
+ <label for "PowerpressFeature[<?php echo $FeedSlug; ?>]"><?php echo __('Feature Episode', 'powerpress'); ?></label>
444
+ <div class="powerpress_row_content">
445
+ <input type="checkbox" id="powerpress_feature_<?php echo $FeedSlug; ?>" name="PowerpressFeature[<?php echo $FeedSlug; ?>]" value="1" <?php echo ($FeaturedChecked?'checked':''); ?> />
446
+ <?php echo __('Episode will appear at the top of your episode list in the iTunes directory.', 'powerpress'); ?>
447
+ </div>
448
+ </div>
449
+ <?php
450
+ }
451
+
452
+ if( !empty($GeneralSettings['episode_box_block']) || $iTunesBlock )
453
+ {
454
+ ?>
455
+ <div class="powerpress_row">
456
+ <label for "Powerpress[<?php echo $FeedSlug; ?>][block]"><?php echo __('iTunes Block', 'powerpress'); ?></label>
457
+ <div class="powerpress_row_content">
458
+ <select id="powerpress_block_<?php echo $FeedSlug; ?>" name="Powerpress[<?php echo $FeedSlug; ?>][block]" style="width: 220px;">
459
+ <?php
460
+ $block_array = array(''=>__('No', 'powerpress'), 1=>__('Yes, Block episode from iTunes', 'powerpress') );
461
+
462
+ while( list($value,$desc) = each($block_array) )
463
+ echo "\t<option value=\"$value\"". ($iTunesBlock==$value?' selected':''). ">$desc</option>\n";
464
+ unset($block_array);
465
  ?>
466
  </select>
467
  </div>
powerpressadmin-metamarks.php CHANGED
@@ -21,23 +21,41 @@
21
  if( $Powerpress['url'] == '' )
22
  continue; // go to the next media file
23
 
24
- $MetaMarkData = $MetaMarks[ $feed_slug ];
25
- // Loop through, and convert position and duration to seconds, if specified with 00:00:00
26
- while( list($index,$row) = each($MetaMarkData) )
27
  {
28
- $MetaMarkData[ $index ]['position'] = powerpress_raw_duration( $row['position'] );
29
- $MetaMarkData[ $index ]['duration'] = powerpress_raw_duration( $row['duration'] );
30
- }
31
- reset($MetaMarkData);
32
-
33
-
34
- if( !empty($Powerpress['new_podcast']) )
35
- {
36
- add_post_meta($post_ID, $field, $MetaMarkData, true);
37
- }
38
- else
39
- {
40
- update_post_meta($post_ID, $field, $MetaMarkData);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
  }
43
  } // Loop through posted episodes...
21
  if( $Powerpress['url'] == '' )
22
  continue; // go to the next media file
23
 
24
+ if( !empty($MetaMarks[ $feed_slug ]) )
 
 
25
  {
26
+ $MetaMarkData = $MetaMarks[ $feed_slug ];
27
+ // Loop through, and convert position and duration to seconds, if specified with 00:00:00
28
+ while( list($index,$row) = each($MetaMarkData) )
29
+ {
30
+ $MetaMarkData[ $index ]['position'] = powerpress_raw_duration( $row['position'] );
31
+ $MetaMarkData[ $index ]['duration'] = powerpress_raw_duration( $row['duration'] );
32
+ }
33
+ reset($MetaMarkData);
34
+
35
+ while( list($index,$row) = each($MetaMarkData) )
36
+ {
37
+ if( empty($MetaMarkData[ $index ]['type']) && empty($MetaMarkData[ $index ]['position']) && empty($MetaMarkData[ $index ]['duration']) && empty($MetaMarkData[ $index ]['link']) && empty($MetaMarkData[ $index ]['value']) )
38
+ {
39
+ unset($MetaMarkData[ $index ]);
40
+ }
41
+ }
42
+ reset($MetaMarkData);
43
+
44
+ if( count($MetaMarkData) > 0 )
45
+ {
46
+ if( !empty($Powerpress['new_podcast']) )
47
+ {
48
+ add_post_meta($post_ID, $field, $MetaMarkData, true);
49
+ }
50
+ else
51
+ {
52
+ update_post_meta($post_ID, $field, $MetaMarkData);
53
+ }
54
+ }
55
+ else // Delete them from the database...
56
+ {
57
+ delete_post_meta($post_ID, $field );
58
+ }
59
  }
60
  }
61
  } // Loop through posted episodes...
powerpressadmin-player-page.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  // PowerPress Player settings page
3
 
4
  require_once( POWERPRESS_ABSPATH. '/powerpress-player.php'); // Include, if not included already
@@ -14,10 +14,39 @@ function powerpressplayer_flowplayer_info()
14
  <?php echo __('Flow Player Classic was chosen as the default player in Blubrry PowerPress because if its backwards compatibility with older versions of Flash and support for both audio and video.', 'powerpress'); ?>
15
  </p>
16
  <?php
17
- }
18
-
19
- function powerpress_admin_players($type='audio')
20
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  $General = powerpress_get_settings('powerpress_general');
22
 
23
  if( empty($General['player']) )
@@ -27,10 +56,10 @@ function powerpress_admin_players($type='audio')
27
  $General['video_player'] = '';
28
  if( empty($General['audio_custom_play_button']) )
29
  $General['audio_custom_play_button'] = '';
30
-
31
- $select_player = false;
32
- if( isset($_GET['sp']) )
33
- $select_player = true;
34
 
35
  if( $type == 'video' )
36
  {
@@ -50,20 +79,22 @@ function powerpress_admin_players($type='audio')
50
  $Audio['flashmp3-maxi'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Flash_Maxi_Player.mp3';
51
  $Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3';
52
  $Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3';
53
- $Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/HTML5Audio.mp3';
54
 
55
 
56
  $Video = array();
57
  $Video['flare-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlarePlayer.mp4';
58
  $Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlowPlayerClassic.flv';
59
  $Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/HTML5Video.mp4';
 
60
  /*
61
  <div><
62
  object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30">
63
  <PARAM NAME=movie VALUE="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><embed src="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div><!-- End of generated code -->
64
  */
65
 
66
-
 
67
  ?>
68
  <link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/css/colorpicker.css" type="text/css" />
69
  <script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/colorpicker/js/colorpicker.js"></script>
@@ -132,12 +163,12 @@ jQuery(document).ready(function($) {
132
  //-->
133
  </script>
134
 
135
-
136
- <!-- special page styling goes here -->
137
- <style type="text/css">
138
- div.color_control { display: block; float:left; width: 100%; padding: 0; }
139
- div.color_control input { display: inline; float: left; }
140
- div.color_control div.color_picker { display: inline; float: left; margin-top: 3px; }
141
  #player_preview { margin-bottom: 0px; height: 50px; margin-top: 8px;}
142
  input#colorpicker-value-input {
143
  width: 60px;
@@ -173,17 +204,17 @@ table.html5formats tr td {
173
  }
174
  table.html5formats tr > td:first-child {
175
  border-left: 1px solid #000000;
176
- }
177
- </style>
178
- <?php
179
-
180
- // mainly 2 pages, first page selects a player, second configures the player, if there are optiosn to configure for that player. If the user is on the second page,
181
- // a link should be provided to select a different player.
182
- if( $select_player )
183
- {
184
- ?>
185
- <input type="hidden" name="action" value="powerpress-select-player" />
186
- <h2><?php echo __('Blubrry PowerPress Player Options', 'powerpress'); ?></h2>
187
  <p style="margin-bottom: 0;"><?php echo __('Select the media player you would like to use.', 'powerpress'); ?></p>
188
 
189
  <?php
@@ -210,7 +241,7 @@ table.html5formats tr > td:first-child {
210
  ?>
211
  </li>
212
 
213
- <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_html5video" value="html5video" <?php if( $General['video_player'] == 'html5video' ) echo 'checked'; ?> /> <?php echo __('HTML5 Video Player', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></label>
214
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5video" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
215
  </li>
216
  <li style="margin-left: 30px; margin-bottom:16px;">
@@ -270,6 +301,27 @@ table.html5formats tr > td:first-child {
270
  </p>
271
  </li>
272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
 
274
  </ul>
275
 
@@ -280,24 +332,24 @@ table.html5formats tr > td:first-child {
280
  }
281
  else
282
  {
283
- ?>
284
- <table class="form-table">
285
- <tr valign="top">
286
- <th scope="row">&nbsp;</th>
287
- <td>
288
- <ul>
289
  <li><label><input type="radio" name="Player[player]" id="player_default" value="default" <?php if( $General['player'] == 'default' ) echo 'checked'; ?> />
290
  <?php echo __('Flow Player Classic (default)', 'powerpress'); ?></label>
291
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_default" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
292
- </li>
293
- <li style="margin-left: 30px; margin-bottom:16px;">
294
- <p>
295
  <?php
296
- echo powerpressplayer_build_flowplayerclassic( $Audio['default'] );
297
- ?>
298
  </p>
299
- <?php powerpressplayer_flowplayer_info(); ?>
300
- </li>
301
 
302
  <li><label><input type="radio" name="Player[player]" id="player_audio_player" value="audio-player" <?php if( $General['player'] == 'audio-player' ) echo 'checked'; ?> /> <?php echo __('1 Pixel Out Audio Player', 'powerpress'); ?></label>
303
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audio_player" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
@@ -322,21 +374,21 @@ table.html5formats tr > td:first-child {
322
  <?php echo __('Flash Mp3 Maxi Player is a customizable open source audio (mp3 only) flash player. Features include pause/play/stop/file info buttons, scrollable position bar, volume control and color styling options.', 'powerpress'); ?>
323
  </p>
324
  </li>
325
-
326
  <li><label><input type="radio" name="Player[player]" id="player_simple_flash" value="simple_flash" <?php if( $General['player'] == 'simple_flash' ) echo 'checked'; ?> /> <?php echo __('Simple Flash MP3 Player', 'powerpress'); ?></label>
327
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_simple_flash" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
328
- </li>
329
- <li style="margin-left: 30px; margin-bottom:16px;">
330
- <p>
331
  <?php
332
  echo powerpressplayer_build_simpleflash($Audio['simple_flash']);
333
- ?>
334
- </p>
335
- <p>
336
- <?php echo __('Simple Flash MP3 Player is a free and simple audio (mp3 only) flash player. Features include play/pause and stop buttons.', 'powerpress'); ?>
337
- </p>
338
- </li>
339
-
340
  <li><label><input type="radio" name="Player[player]" id="player_audioplay" value="audioplay" <?php if( $General['player'] == 'audioplay' ) echo 'checked'; ?> /> <?php echo __('AudioPlay', 'powerpress'); ?></label>
341
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audioplay" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
342
  </li>
@@ -351,7 +403,7 @@ table.html5formats tr > td:first-child {
351
  </p>
352
  </li>
353
 
354
- <li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if( $General['player'] == 'html5audio' ) echo 'checked'; ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?></label>
355
  <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?></a></strong>
356
  </li>
357
  <li style="margin-left: 30px; margin-bottom:16px;">
@@ -409,35 +461,35 @@ table.html5formats tr > td:first-child {
409
  <p>
410
  <?php echo __('Flow Player Classic is used when HTML5 support is not available.', 'powerpress'); ?>
411
  </p>
412
- </li>
413
-
414
- </ul>
415
-
416
- </td>
417
- </tr>
418
  </table>
419
  <?php
420
  }
421
- ?>
422
- <h4 style="margin-bottom: 0;"><?php echo __('Click \'Save Changes\' to activate and configure selected player.', 'powerpress'); ?></h4>
423
- <?php
424
- }
425
- else
426
- {
427
- ?>
428
  <h2><?php echo __('Configure Player', 'powerpress'); ?></h2>
429
  <?php if( $type == 'audio' ) { ?>
430
  <p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_player.php&amp;sp=1"); ?>"><?php echo __('Select a different audio player', 'powerpress'); ?></a></strong></p>
431
- <?php } else { ?>
432
- <p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_videoplayer.php&amp;sp=1"); ?>"><?php echo __('Select a different video player', 'powerpress'); ?></a></strong></p>
433
  <?php
434
  }
435
-
436
  // Start adding logic here to display options based on the player selected...
437
  if( $type == 'audio' )
438
- {
439
- switch( $General['player'] )
440
- {
441
  case 'audio-player': {
442
 
443
  $PlayerSettings = powerpress_get_settings('powerpress_audio-player');
@@ -624,23 +676,23 @@ function audio_player_defaults()
624
  }
625
  }
626
  //-->
627
- </script>
628
- <input type="hidden" name="action" value="powerpress-audio-player" />
629
- <?php echo __('Configure the 1 pixel out Audio Player', 'powerpress'); ?>
630
-
631
-
632
- <table class="form-table">
633
-
634
- <tr valign="top">
635
- <th scope="row">
636
- <?php echo __('Preview of Player', 'powerpress'); ?>
637
- </th>
638
  <td><div id="player_preview">
639
  <?php
640
  echo powerpressplayer_build_1pxoutplayer($Audio['audio-player'], array('nodiv'=>true) );
641
- ?>
642
- </div>
643
- </td>
644
  </tr>
645
  </table>
646
 
@@ -657,7 +709,7 @@ function audio_player_defaults()
657
 
658
  <div id="tab_general" class="powerpress_tab">
659
  <h3><?php echo __('General Settings', 'powerpress'); ?></h3>
660
- <table class="form-table">
661
  <tr valign="top">
662
  <th scope="row">
663
  <?php echo __('Page Background Color', 'powerpress'); ?>
@@ -670,17 +722,17 @@ function audio_player_defaults()
670
  </div>
671
  <small>(<?php echo __('leave blank for transparent', 'powerpress'); ?>)</small>
672
  </td>
673
- </tr> <tr valign="top">
674
- <th scope="row">
675
- <?php echo __('Player Background Color', 'powerpress'); ?>
676
- </th>
677
- <td>
678
- <div class="color_control">
679
  <input type="text" style="width: 100px;" id="bg" name="Player[bg]" class="color_field" value="<?php echo $PlayerSettings['bg']; ?>" maxlength="20" />
680
- <img id="bg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bg']; ?>;" class="color_preview" />
681
- </div>
682
- </td>
683
- </tr>
684
  <tr valign="top">
685
  <th scope="row">
686
  <?php echo __('Width (in pixels)', 'powerpress'); ?>
@@ -846,17 +898,17 @@ function audio_player_defaults()
846
  </select> <?php echo __('initial volume level (default: 60)', 'powerpress'); ?>
847
  </td>
848
  </tr>
849
-
850
- <tr valign="top">
851
- <th scope="row">
852
- <?php echo __('Volumn Background Color', 'powerpress'); ?>
853
- </th>
854
- <td>
855
- <div class="color_control">
856
  <input type="text" style="width: 100px;" id="leftbg" name="Player[leftbg]" class="color_field" value="<?php echo $PlayerSettings['leftbg']; ?>" maxlength="20" />
857
- <img id="leftbg_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['leftbg']; ?>;" class="color_preview" />
858
- </div>
859
- </td>
860
  </tr>
861
  <tr valign="top">
862
  <th scope="row">
@@ -942,11 +994,11 @@ function audio_player_defaults()
942
  </td>
943
  </tr>
944
 
945
- </table>
946
  </div> <!-- end tab -->
947
- </div> <!-- end tab wrapper -->
948
 
949
- <?php
950
  }; break;
951
  case 'simple_flash': { ?>
952
  <table class="form-table">
@@ -972,13 +1024,13 @@ function audio_player_defaults()
972
  </td>
973
  </tr>
974
  </table>
975
- <?php }; break;
976
-
977
  case 'flashmp3-maxi': {
978
- //get settings for Flash MP3 Maxi player
979
  $PlayerSettings = powerpress_get_settings('powerpress_flashmp3-maxi');
980
 
981
- //set array values for dropdown lists
982
  $autoload = array('always'=>'Always','never'=>'Never','autohide'=>'Auto Hide');
983
  $volume = array('0'=>'0','25'=>'25','50'=>'50','75'=>'75','100'=>'100','125'=>'125','150'=>'150','175'=>'175','200'=>'200');
984
 
@@ -1100,23 +1152,23 @@ function audio_player_defaults()
1100
  }
1101
  }
1102
  //-->
1103
- </script>
1104
  <input type="hidden" name="action" value="powerpress-flashmp3-maxi" />
1105
- <p><?php echo __('Configure Flash Mp3 Maxi Player', 'powerpress'); ?></p>
1106
- <table class="form-table">
1107
-
1108
- <tr valign="top">
1109
- <th scope="row">
1110
- <?php echo __('Preview of Player', 'powerpress'); ?>
1111
- </th>
1112
- <td>
1113
  <div id="player_preview"></div>
1114
 
1115
  <script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?>3rdparty/maxi_player/generator.js"></script>
1116
  <input type="hidden" id="gen_mp3" name="gen_mp3" value="<?php echo $Audio['flashmp3-maxi']; ?>" />
1117
 
1118
-
1119
- </td>
1120
  </tr>
1121
  </table>
1122
 
@@ -1133,35 +1185,35 @@ function audio_player_defaults()
1133
 
1134
  <div id="tab_general" class="powerpress_tab">
1135
  <h3><?php echo __('General Settings', 'powerpress'); ?></h3>
1136
- <table class="form-table">
1137
  <tr valign="top">
1138
  <td colspan="2">
1139
 
1140
  <?php echo __('leave blank for default values', 'powerpress'); ?>
1141
  </td>
1142
  </tr>
1143
- <tr valign="top">
1144
- <th scope="row">
1145
- <?php echo __('Player Gradient Color Top', 'powerpress'); ?>
1146
- </th>
1147
- <td>
1148
- <div class="color_control">
1149
  <input type="text" style="width: 100px;" id="bgcolor1" name="Player[bgcolor1]" class="color_field" value="<?php echo $PlayerSettings['bgcolor1']; ?>" maxlength="20" />
1150
- <img id="bgcolor1_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor1']; ?>;" class="color_preview" />
1151
- </div>
1152
- </td>
1153
- </tr>
1154
- <tr valign="top">
1155
- <th scope="row">
1156
- <?php echo __('Player Gradient Color Bottom', 'powerpress'); ?>
1157
- </th>
1158
- <td>
1159
- <div class="color_control">
1160
  <input type="text" style="width: 100px;" id="bgcolor2" name="Player[bgcolor2]" class="color_field" value="<?php echo $PlayerSettings['bgcolor2']; ?>" maxlength="20" />
1161
- <img id="bgcolor2_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor2']; ?>;" class="color_preview" />
1162
- </div>
1163
- </td>
1164
- </tr>
1165
  <tr valign="top">
1166
  <th scope="row">
1167
  <?php echo __('Background Color', 'powerpress'); ?>
@@ -1175,44 +1227,44 @@ function audio_player_defaults()
1175
  <small><?php echo __('leave blank for transparent', 'powerpress'); ?></small>
1176
  </td>
1177
  </tr>
1178
- <tr valign="top">
1179
- <th scope="row">
1180
- <?php echo __('Text Color', 'powerpress'); ?>
1181
- </th>
1182
- <td>
1183
- <div class="color_control">
1184
  <input type="text" style="width: 100px;" id="textcolor" name="Player[textcolor]" class="color_field" value="<?php echo $PlayerSettings['textcolor']; ?>" maxlength="20" />
1185
- <img id="textcolor_prev" src="<?php echo powerpress_get_root_url(); ?>images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['textcolor']; ?>;" class="color_preview" />
1186
- </div>
1187
- </td>
1188
- </tr>
1189
-