PowerPress Podcasting plugin by Blubrry - Version 1.0.7

Version Description

  • Released on 3/29/2010
  • NOTE: There is no need to update to this version unless you can benefit from the minor fixes listed below.
  • Removed code to maintain currently selected tab due to conflict with mod_security. (Thanks Glark and matt1027 for your assistance with this issue!)
  • Fixed ampersand (&) to & in podcast channel descriptions (Thanks David for bringing to our attention!)
  • Fixed bug where duration would only properly set using the Verify button, now works without the Verify button (Thanks Fr. Shawn for bringing to our attention!)
  • Updated the the_powerpress_content() and get_the_powerpress_content() theme functions to work even if the 'Media Presentation' setting is set to 'None'.
  • Removed OpenSSL not enabled warning when saving settings if cURL supports SSL. (Thanks TonyF)
Download this release

Release Info

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

Code changes from version 1.0.6 to 1.0.7

3rdparty/jquery.c.js DELETED
@@ -1,97 +0,0 @@
1
- /**
2
- * Cookie plugin
3
- *
4
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
5
- * Dual licensed under the MIT and GPL licenses:
6
- * http://www.opensource.org/licenses/mit-license.php
7
- * http://www.gnu.org/licenses/gpl.html
8
- *
9
- */
10
-
11
- /**
12
- * Create a cookie with the given name and value and other optional parameters.
13
- *
14
- * @example $.cookie('the_cookie', 'the_value');
15
- * @desc Set the value of a cookie.
16
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
17
- * @desc Create a cookie with all available options.
18
- * @example $.cookie('the_cookie', 'the_value');
19
- * @desc Create a session cookie.
20
- * @example $.cookie('the_cookie', null);
21
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
22
- * used when the cookie was set.
23
- *
24
- * @param String name The name of the cookie.
25
- * @param String value The value of the cookie.
26
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
27
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
28
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
29
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
30
- * when the the browser exits.
31
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
32
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
33
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
34
- * require a secure protocol (like HTTPS).
35
- * @type undefined
36
- *
37
- * @name $.cookie
38
- * @cat Plugins/Cookie
39
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
40
- */
41
-
42
- /**
43
- * Get the value of a cookie with the given name.
44
- *
45
- * @example $.cookie('the_cookie');
46
- * @desc Get the value of a cookie.
47
- *
48
- * @param String name The name of the cookie.
49
- * @return The value of the cookie.
50
- * @type String
51
- *
52
- * @name $.cookie
53
- * @cat Plugins/Cookie
54
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
55
- */
56
- jQuery.cookie = function(name, value, options) {
57
-
58
- if (typeof value != 'undefined') { // name and value given, set cookie
59
- options = options || {};
60
- if (value === null) {
61
- value = '';
62
- options.expires = -1;
63
- }
64
- var expires = '';
65
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
66
- var date;
67
- if (typeof options.expires == 'number') {
68
- date = new Date();
69
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
70
- } else {
71
- date = options.expires;
72
- }
73
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
74
- }
75
- // CAUTION: Needed to parenthesize options.path and options.domain
76
- // in the following expressions, otherwise they evaluate to undefined
77
- // in the packed version for some reason...
78
- var path = options.path ? '; path=' + (options.path) : '';
79
- var domain = options.domain ? '; domain=' + (options.domain) : '';
80
- var secure = options.secure ? '; secure' : '';
81
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
82
- } else { // only name given, get cookie
83
- var cookieValue = null;
84
- if (document.cookie && document.cookie != '') {
85
- var cookies = document.cookie.split(';');
86
- for (var i = 0; i < cookies.length; i++) {
87
- var cookie = jQuery.trim(cookies[i]);
88
- // Does this cookie string begin with the name we want?
89
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
90
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
91
- break;
92
- }
93
- }
94
- }
95
- return cookieValue;
96
- }
97
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
powerpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://www.blubrry.com/powerpress/
5
  Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
6
- Version: 1.0.6
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
@@ -33,7 +33,7 @@ if( !function_exists('add_action') )
33
  die("access denied.");
34
 
35
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
36
- define('POWERPRESS_VERSION', '1.0.6' );
37
 
38
  /////////////////////////////////////////////////////
39
  // The following define options should be placed in your
@@ -1622,7 +1622,101 @@ function the_powerpress_content()
1622
 
1623
  function get_the_powerpress_content()
1624
  {
1625
- return powerpress_content('');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1626
  }
1627
 
1628
  function powerpress_do_pinw($pinw, $process_podpress)
3
  Plugin Name: Blubrry PowerPress
4
  Plugin URI: http://www.blubrry.com/powerpress/
5
  Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics, iTunes integration, Blubrry Services (Media Statistics and Hosting) integration and a lot more.
6
+ Version: 1.0.7
7
  Author: Blubrry
8
  Author URI: http://www.blubrry.com/
9
  Change Log:
33
  die("access denied.");
34
 
35
  // WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
36
+ define('POWERPRESS_VERSION', '1.0.7' );
37
 
38
  /////////////////////////////////////////////////////
39
  // The following define options should be placed in your
1622
 
1623
  function get_the_powerpress_content()
1624
  {
1625
+ global $post;
1626
+
1627
+ if( defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION') )
1628
+ return '';
1629
+
1630
+ if( function_exists('post_password_required') )
1631
+ {
1632
+ if( post_password_required($post) )
1633
+ return '';
1634
+ }
1635
+
1636
+ // PowerPress settings:
1637
+ $GeneralSettings = get_option('powerpress_general');
1638
+
1639
+ if( !isset($GeneralSettings['custom_feeds']) )
1640
+ $GeneralSettings['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
1641
+
1642
+ // Re-order so the default podcast episode is the top most...
1643
+ $Temp = $GeneralSettings['custom_feeds'];
1644
+ $GeneralSettings['custom_feeds'] = array();
1645
+ $GeneralSettings['custom_feeds']['podcast'] = 'Default Podcast Feed';
1646
+ while( list($feed_slug, $feed_title) = each($Temp) )
1647
+ {
1648
+ if( $feed_slug == 'podcast' )
1649
+ continue;
1650
+ $GeneralSettings['custom_feeds'][ $feed_slug ] = $feed_title;
1651
+ }
1652
+
1653
+ if( !isset($GeneralSettings['display_player']) )
1654
+ $GeneralSettings['display_player'] = 1;
1655
+ if( !isset($GeneralSettings['player_function']) )
1656
+ $GeneralSettings['player_function'] = 1;
1657
+ if( !isset($GeneralSettings['podcast_link']) )
1658
+ $GeneralSettings['podcast_link'] = 1;
1659
+
1660
+ // Figure out which players are alerady in the body of the page...
1661
+ $ExcludePlayers = array();
1662
+ if( isset($GeneralSettings['disable_player']) )
1663
+ $ExcludePlayers = $GeneralSettings['disable_player']; // automatically disable the players configured
1664
+
1665
+ // LOOP HERE TO DISPLAY EACH MEDIA TYPE
1666
+ $new_content = '';
1667
+ while( list($feed_slug,$feed_title) = each($GeneralSettings['custom_feeds']) )
1668
+ {
1669
+ // Get the enclosure data
1670
+ $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed_slug);
1671
+
1672
+ if( !$EpisodeData && !empty($GeneralSettings['process_podpress']) && $feed_slug == 'podcast' )
1673
+ $EpisodeData = powerpress_get_enclosure_data_podpress($post->ID);
1674
+
1675
+ if( !$EpisodeData || !$EpisodeData['url'] )
1676
+ continue;
1677
+
1678
+ // Just in case, if there's no URL lets escape!
1679
+ if( !$EpisodeData['url'] )
1680
+ continue;
1681
+
1682
+ // If the player is not already inserted in the body of the post using the shortcode...
1683
+ //if( preg_match('/\[powerpress(.*)\]/is', $content) == 0 )
1684
+ if( !isset($ExcludePlayers[ $feed_slug ]) ) // If the player is not in our exclude list because it's already in the post body somewhere...
1685
+ {
1686
+ if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed_slug) )
1687
+ {
1688
+ $new_content .= powerpress_premium_content_message($post->ID, $feed_slug, $EpisodeData);
1689
+ }
1690
+ else
1691
+ {
1692
+ if( $GeneralSettings['player_function'] != 3 && $GeneralSettings['player_function'] != 0 ) // Play in new window only or disabled
1693
+ {
1694
+ $AddDefaultPlayer = empty($EpisodeData['no_player']);
1695
+
1696
+ if( $EpisodeData && !empty($EpisodeData['embed']) )
1697
+ {
1698
+ $new_content .= trim($EpisodeData['embed']);
1699
+ if( !empty($GeneralSettings['embed_replace_player']) )
1700
+ $AddDefaultPlayer = false;
1701
+ }
1702
+
1703
+ if( $AddDefaultPlayer )
1704
+ {
1705
+ $image = '';
1706
+ if( isset($EpisodeData['image']) && $EpisodeData['image'] != '' )
1707
+ $image = $EpisodeData['image'];
1708
+
1709
+ $new_content .= apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('feed'=>$feed_slug, 'image'=>$image, 'type'=>$EpisodeData['type']) );
1710
+ }
1711
+ }
1712
+
1713
+ if( !isset($EpisodeData['no_links']) )
1714
+ $new_content .= powerpress_get_player_links($post->ID, $feed_slug, $EpisodeData);
1715
+ }
1716
+ }
1717
+ }
1718
+
1719
+ return $new_content;
1720
  }
1721
 
1722
  function powerpress_do_pinw($pinw, $process_podpress)
powerpressadmin-basic.php CHANGED
@@ -197,7 +197,6 @@ jQuery(document).ready(function($) {
197
 
198
  function powerpressadmin_edit_entry_options($General)
199
  {
200
- $OpenSSLSupport = extension_loaded('openssl');
201
  if( !isset($General['advanced_mode']) )
202
  $General['advanced_mode'] = 0;
203
  if( !isset($General['default_url']) )
@@ -469,6 +468,12 @@ function powerpressadmin_edit_itunes_general($General, $FeedSettings = false, $f
469
 
470
 
471
  $OpenSSLSupport = extension_loaded('openssl');
 
 
 
 
 
 
472
  if( $OpenSSLSupport == false )
473
  {
474
  ?>
197
 
198
  function powerpressadmin_edit_entry_options($General)
199
  {
 
200
  if( !isset($General['advanced_mode']) )
201
  $General['advanced_mode'] = 0;
202
  if( !isset($General['default_url']) )
468
 
469
 
470
  $OpenSSLSupport = extension_loaded('openssl');
471
+ if( !$OpenSSLSupport && function_exists('curl_version') )
472
+ {
473
+ $curl_info = curl_version();
474
+ $OpenSSLSupport = ($curl_info['features'] & CURL_VERSION_SSL );
475
+ }
476
+
477
  if( $OpenSSLSupport == false )
478
  {
479
  ?>
powerpressadmin.php CHANGED
@@ -48,20 +48,8 @@ function powerpress_admin_init()
48
 
49
  add_thickbox(); // we use the thckbox for some settings
50
  wp_enqueue_script('jquery');
51
- //wp_enqueue_script('jquery-ui-resizable');
52
  wp_enqueue_script('jquery-ui-core');
53
  wp_enqueue_script('jquery-ui-tabs');
54
- //wp_enqueue_script('jquery-ui-selectable');
55
- //wp_enqueue_script('interface');
56
-
57
- //wp_enqueue_script('jquery-ui-resizable');
58
- //wp_enqueue_script('jquery-ui-draggable');
59
- //wp_enqueue_script('jquery-ui-droppable');
60
- //wp_enqueue_script('jquery-ui-selectable');
61
- //wp_enqueue_script('jquery-ui-sortable');
62
-
63
- wp_enqueue_script( 'powerpress', powerpress_get_root_url().'3rdparty/jquery.c.js', array('jquery' ) );
64
-
65
 
66
  if( function_exists('powerpress_admin_jquery_init') )
67
  powerpress_admin_jquery_init();
@@ -995,7 +983,11 @@ function powerpress_edit_post($post_ID, $post)
995
  }
996
  else
997
  {
998
- $MediaInfo = powerpress_get_media_info_local($MediaURL, $ContentType, 0, $Duration);
 
 
 
 
999
  if( isset($MediaInfo['error']) )
1000
  {
1001
  $error = __('Error') ." ({$MediaURL}): {$MediaInfo['error']}";
@@ -1011,11 +1003,11 @@ function powerpress_edit_post($post_ID, $post)
1011
  else
1012
  {
1013
  // Detect the duration
1014
- if( $Powerpress['set_duration'] == 0 && !empty($MediaInfo['duration']) )
1015
  $Duration = powerpress_readable_duration($MediaInfo['duration'], true); // Fix so it looks better when viewed for editing
1016
 
1017
  // Detect the file size
1018
- if( $Powerpress['set_size'] == 0 && $MediaInfo['length'] > 0 )
1019
  $FileSize = $MediaInfo['length'];
1020
  }
1021
  }
@@ -1188,7 +1180,7 @@ function powerpress_new_feed_url_prompt() {
1188
  }
1189
 
1190
  jQuery(document).ready(function($) {
1191
- jQuery("#powerpress_settings_page").tabs({ cookie: { expires: 30 } });
1192
  });
1193
 
1194
  </script>
48
 
49
  add_thickbox(); // we use the thckbox for some settings
50
  wp_enqueue_script('jquery');
 
51
  wp_enqueue_script('jquery-ui-core');
52
  wp_enqueue_script('jquery-ui-tabs');
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  if( function_exists('powerpress_admin_jquery_init') )
55
  powerpress_admin_jquery_init();
983
  }
984
  else
985
  {
986
+ if( empty($Powerpress['set_duration']) )
987
+ $MediaInfo = powerpress_get_media_info_local($MediaURL, $ContentType, 0, '');
988
+ else
989
+ $MediaInfo = powerpress_get_media_info_local($MediaURL, $ContentType, 0, $Duration);
990
+
991
  if( isset($MediaInfo['error']) )
992
  {
993
  $error = __('Error') ." ({$MediaURL}): {$MediaInfo['error']}";
1003
  else
1004
  {
1005
  // Detect the duration
1006
+ if( empty($Powerpress['set_duration']) && !empty($MediaInfo['duration']) )
1007
  $Duration = powerpress_readable_duration($MediaInfo['duration'], true); // Fix so it looks better when viewed for editing
1008
 
1009
  // Detect the file size
1010
+ if( empty($Powerpress['set_size']) && $MediaInfo['length'] > 0 )
1011
  $FileSize = $MediaInfo['length'];
1012
  }
1013
  }
1180
  }
1181
 
1182
  jQuery(document).ready(function($) {
1183
+ jQuery("#powerpress_settings_page").tabs();
1184
  });
1185
 
1186
  </script>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Angelo Mandato, Blubrry.com
3
  Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, wordpressmu, mu, wordpress mu
4
  Requires at least: 2.6.0
5
  Tested up to: 2.9.2
6
- Stable tag: 1.0.6
7
 
8
  Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
 
@@ -140,6 +140,16 @@ To install Blubrry PowerPress manually, follow these steps:
140
  = Announcement =
141
  * We are about 90% done updating PowerPress for translation. If you would like to have PowerPress translated into other languages, please contact Angelo: cio [at] rawvoice.com.
142
 
 
 
 
 
 
 
 
 
 
 
143
  = 1.0.6 =
144
  * Released on 3/6/2010
145
  * Fixed warning message from appearing in other Blogging System import screen.
3
  Tags: podcasting, podcast, podcaster, itunes, enclosure, zune, iphone, youtube, viddler, blip.tv, ustream, podcasting, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats, flv, flash, id3, episodes, blubrry, wordpressmu, mu, wordpress mu
4
  Requires at least: 2.6.0
5
  Tested up to: 2.9.2
6
+ Stable tag: 1.0.7
7
 
8
  Blubrry PowerPress brings the essential features for podcasting to WordPress including full iTunes support, web audio/video media players and more.
9
 
140
  = Announcement =
141
  * We are about 90% done updating PowerPress for translation. If you would like to have PowerPress translated into other languages, please contact Angelo: cio [at] rawvoice.com.
142
 
143
+ = 1.0.7 =
144
+ * Released on 3/29/2010
145
+ * NOTE: There is no need to update to this version unless you can benefit from the minor fixes listed below.
146
+ * Removed code to maintain currently selected tab due to conflict with mod_security. (Thanks Glark and matt1027 for your assistance with this issue!)
147
+ * Fixed ampersand (&) to &amp; in podcast channel descriptions (Thanks David for bringing to our attention!)
148
+ * Fixed bug where duration would only properly set using the Verify button, now works without the Verify button (Thanks Fr. Shawn for bringing to our attention!)
149
+ * Updated the `the_powerpress_content()` and `get_the_powerpress_content()` theme functions to work even if the 'Media Presentation' setting is set to 'None'.
150
+ * Removed OpenSSL not enabled warning when saving settings if cURL supports SSL. (Thanks TonyF)
151
+
152
+
153
  = 1.0.6 =
154
  * Released on 3/6/2010
155
  * Fixed warning message from appearing in other Blogging System import screen.