Permalink
Browse files

add 4.0.8 from http://plugins.svn.wordpress.org/powerpress/tags/4.0.8/

  • Loading branch information...
1 parent 77f422d commit 48753ca2e3611e286b5374969a01fc5907120dc7 @mospaw mospaw committed Apr 30, 2013
View
Binary file not shown.
View
@@ -79,6 +79,7 @@ color:#999999;
.powerpress_tabbed_content ul a:hover {
}
+.powerpress_tabbed_content ul .ui-tabs-active a,
.powerpress_tabbed_content ul .ui-tabs-selected a {
background-color:#FFFFFF;
border-bottom:0 none;
@@ -87,6 +88,8 @@ color:#999999;
padding-bottom:3px;
}
+
+
.powerpress_tabbed_content > div {
padding: 0px 10px 10px 10px;
*padding-top:3px;
View
@@ -1,16 +1,16 @@
/* PowerPress Dashboard CSS */
/* Dashboard Notice, based on Dashboard Browser Nag */
-#powerpress_dashboard_notice_2 a.update-browser-link {
+#powerpress_dashboard_notice_3 a.update-browser-link {
font-size: 1.2em;
font-weight: bold;
}
-#powerpress_dashboard_notice_2 a {
+#powerpress_dashboard_notice_3 a {
text-decoration: underline;
}
-#powerpress_dashboard_notice_2.postbox {
+#powerpress_dashboard_notice_3.postbox {
background-color: #e29808;
background-image: none;
border-color: #edc048;
@@ -20,7 +20,7 @@
color: #fff;
}
-#powerpress_dashboard_notice_2.postbox h3 {
+#powerpress_dashboard_notice_3.postbox h3 {
border-bottom-color: #f6e2ac;
text-shadow: none;
-moz-box-shadow: none;
@@ -30,16 +30,16 @@
color: #fff;
}
-#powerpress_dashboard_notice_2 a {
+#powerpress_dashboard_notice_3 a {
color: #fff;
}
-#powerpress_dashboard_notice_2.browser-insecure a.browse-happy-link,
-#powerpress_dashboard_notice_2.browser-insecure a.update-browser-link {
+#powerpress_dashboard_notice_3.browser-insecure a.browse-happy-link,
+#powerpress_dashboard_notice_3.browser-insecure a.update-browser-link {
text-shadow: #871b15 0 1px 0;
}
-#powerpress_dashboard_notice_2 a.browse-happy-link,
-#powerpress_dashboard_notice_2 a.update-browser-link {
+#powerpress_dashboard_notice_3 a.browse-happy-link,
+#powerpress_dashboard_notice_3 a.update-browser-link {
text-shadow: #d29a04 0 1px 0;
}
View
@@ -9,6 +9,14 @@
// ///
/////////////////////////////////////////////////////////////////
+// START Added for PowerPress
+if( function_exists('get_temp_dir') ) // If wordpress function is available, lets use it
+{
+ $temp_dir = get_temp_dir(); // WordPress temp folder
+}
+else
+{ // END Added for PowerPress
+
// attempt to define temp dir as something flexible but reliable
$temp_dir = ini_get('upload_tmp_dir');
if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
@@ -47,6 +55,10 @@
if (!$temp_dir) {
$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
}
+
+} // Added for PowerPress
+
+
// $temp_dir = '/something/else/'; // feel free to override temp dir here if it works better for your system
define('GETID3_TEMP_DIR', $temp_dir);
unset($open_basedir, $temp_dir);
File renamed without changes.
File renamed without changes.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -75,6 +75,7 @@ function powerpress_shortcode_handler( $attributes, $content = null )
$return = '';
$feed = '';
+ $channel = '';
$url = '';
$image = '';
$width = '';
@@ -83,10 +84,14 @@ function powerpress_shortcode_handler( $attributes, $content = null )
extract( shortcode_atts( array(
'url' => '',
'feed' => '',
+ 'channel' => '',
'image' => '',
'width' => '',
'height' => ''
), $attributes ) );
+
+ if( empty($channel) && !empty($feed) ) // Feed for backward compat.
+ $channel = $feed;
if( !$url && $content )
{
@@ -102,9 +107,9 @@ function powerpress_shortcode_handler( $attributes, $content = null )
// Handle the URL differently...
$return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($url, 'p'), array('image'=>$image, 'type'=>$content_type,'width'=>$width, 'height'=>$height) );
}
- else if( $feed )
+ else if( $channel )
{
- $EpisodeData = powerpress_get_enclosure_data($post->ID, $feed);
+ $EpisodeData = powerpress_get_enclosure_data($post->ID, $channel);
if( !empty($EpisodeData['embed']) )
$return = $EpisodeData['embed'];
@@ -116,19 +121,18 @@ function powerpress_shortcode_handler( $attributes, $content = null )
if( !empty($height) )
$EpisodeData['height'] = $height;
- if( !isset($EpisodeData['no_player']) )
+
+ if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($channel) )
{
- if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] && !powerpress_premium_content_authorized($feed) )
- {
- $return .= powerpress_premium_content_message($post->ID, $feed, $EpisodeData);
- continue;
- }
-
- if( !isset($EpisodeData['no_player']) )
- $return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('id'=>$post->ID,'feed'=>$feed, 'image'=>$image, 'type'=>$EpisodeData['type'],'width'=>$width, 'height'=>$height) );
- if( empty($EpisodeData['no_links']) )
- $return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
+ $return .= powerpress_premium_content_message($post->ID, $channel, $EpisodeData);
+ continue;
}
+
+ // If the shortcode speciies a channel, than we definnitely wnat to include the player even if $EpisodeData['no_player'] is true...
+ if( !isset($EpisodeData['no_player']) )
+ $return = apply_filters('powerpress_player', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), array('id'=>$post->ID,'feed'=>$channel, 'channel'=>$channel, 'image'=>$image, 'type'=>$EpisodeData['type'],'width'=>$width, 'height'=>$height) );
+ if( empty($EpisodeData['no_links']) )
+ $return .= apply_filters('powerpress_player_links', '', powerpress_add_flag_to_redirect_url($EpisodeData['url'], 'p'), $EpisodeData );
}
else
{
@@ -930,6 +934,13 @@ function powerpressplayer_player_other($content, $media_url, $EpisodeData = arra
}
}; break;
+
+ case 'pdf': {
+ $content .= powerpressplayer_build_playimagepdf($media_url, true);
+ }; break;
+ case 'epub': {
+ $content .= powerpressplayer_build_playimageepub($media_url, true);
+ }; break;
// Default, just display the play image.
default: {
@@ -1430,6 +1441,8 @@ function powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData = arr
$cover_image = ''; // Audio should not have a cover image
$player_height = 24;
+ if(stristr($_SERVER['HTTP_USER_AGENT'], 'firefox') !== false )
+ $player_height = 22; // Firefox only
}
// Build player...
@@ -1545,14 +1558,47 @@ function powerpressplayer_build_playimageaudio($media_url, $include_div = false)
return $content;
}
+function powerpressplayer_build_playimagepdf($media_url, $include_div = false)
+{
+ $content = '';
+ $cover_image = powerpress_get_root_url() . 'play_pdf.png';
+ $GeneralSettings = get_option('powerpress_general');
+ if( !empty($GeneralSettings['pdf_custom_play_button']) )
+ $cover_image = $GeneralSettings['pdf_custom_play_button'];
+
+ if( $include_div )
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. powerpressplayer_get_next_id() .'">';
+ $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" target="_blank">';
+ $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" style="border:0;" />';
+ $content .= '</a>';
+ if( $include_div )
+ $content .= "</div>\n";
+ return $content;
+}
+
+function powerpressplayer_build_playimageepub($media_url, $include_div = false)
+{
+ $content = '';
+ $cover_image = powerpress_get_root_url() . 'play_epub.png';
+ $GeneralSettings = get_option('powerpress_general');
+ if( !empty($GeneralSettings['epub_custom_play_button']) )
+ $cover_image = $GeneralSettings['epub_custom_play_button'];
+
+ if( $include_div )
+ $content .= '<div class="powerpress_player" id="powerpress_player_'. powerpressplayer_get_next_id() .'">';
+ $content .= '<a href="'. $media_url .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" target="_blank">';
+ $content .= '<img src="'. $cover_image .'" title="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" alt="'. htmlspecialchars(POWERPRESS_READ_TEXT) .'" style="border:0;" />';
+ $content .= '</a>';
+ if( $include_div )
+ $content .= "</div>\n";
+ return $content;
+}
+
/*
1 pixel out player
*/
function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
{
- return powerpressplayer_build_flowplayerclassic($media_url, $EpisodeData); // Replaces 1 pixel out player for now
- /*
-
$content = '';
$autoplay = false;
if( isset($EpisodeData['autoplay']) && $EpisodeData['autoplay'] )
@@ -1631,7 +1677,6 @@ function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
$content .= '</div>'.PHP_EOL;
return $content;
- */
}
/*
View
@@ -1,9 +1,9 @@
<?php
/*
Plugin Name: Blubrry PowerPress
-Plugin URI: http://www.blubrry.com/powerpress/
-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.
-Version: 4.0.6
+Plugin URI: http://create.blubrry.com/resources/powerpress/
+Description: <a href="http://create.blubrry.com/resources/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.
+Version: 4.0.8
Author: Blubrry
Author URI: http://www.blubrry.com/
Change Log:
@@ -21,7 +21,7 @@
flashembed(), License: MIT by Tero Piirainen (tipiirai [at] gmail.com)
Note: code found at bottom of player.js
-Copyright 2008-2011 RawVoice Inc. (http://www.rawvoice.com)
+Copyright 2008-2013 RawVoice Inc. (http://www.rawvoice.com)
License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
@@ -33,7 +33,7 @@
die("access denied.");
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
-define('POWERPRESS_VERSION', '4.0.6' );
+define('POWERPRESS_VERSION', '4.0.8' );
// Translation support:
if ( !defined('POWERPRESS_ABSPATH') )
@@ -63,7 +63,9 @@
define('POWERPRESS_PLAY_TEXT', __('Play', 'powerpress') );
if( !defined('POWERPRESS_EMBED_TEXT') )
define('POWERPRESS_EMBED_TEXT', __('Embed', 'powerpress') );
-
+if( !defined('POWERPRESS_READ_TEXT') )
+ define('POWERPRESS_READ_TEXT', __('Read', 'powerpress') );
+
if( !defined('POWERPRESS_BLUBRRY_API_URL') )
define('POWERPRESS_BLUBRRY_API_URL', 'http://api.blubrry.com/');
@@ -95,7 +97,7 @@
// Set regular expression values for determining mobile devices
if( !defined('POWERPRESS_MOBILE_REGEX') )
- define('POWERPRESS_MOBILE_REGEX', 'iphone|ipod|ipad|aspen|android|blackberry|opera mini|webos|incognito|webmate');
+ define('POWERPRESS_MOBILE_REGEX', 'iphone|ipod|ipad|aspen|android|blackberry|opera mini|webos|incognito|webmate|silk');
$powerpress_feed = NULL; // DO NOT CHANGE
@@ -293,36 +295,63 @@ function powerpress_content($content)
add_filter('the_content', 'powerpress_content', POWERPRESS_CONTENT_ACTION_PRIORITY);
add_filter('the_excerpt', 'powerpress_content', POWERPRESS_CONTENT_ACTION_PRIORITY);
+
+/* Specail case fix Yoast bug which messes up the HTML */
+function powerpress_yoast_gawp_fix($content)
+{
+ $content= preg_replace(
+ array('/return powerpress\_pinw\(\"/', '/return powerpress\_embed\_quicktime\(\"/', '/return powerpress\_embed\_winplayer\(\"/', '/return powerpress\_embed\_swf\(\"/', '/return powerpress\_show\_embed\(\"/', '/return powerpress\_embed\_html5v\(\"/', '/return powerpress\_embed\_html5a\(\"/', ),
+ array('return powerpress_pinw(\'', 'return powerpress_embed_quicktime(\'', 'return powerpress_embed_winplayer(\'', 'return powerpress_embed_swf(\'', 'return powerpress_show_embed(\'', 'return powerpress_embed_html5v(\'', 'return powerpress_embed_html5a(\'' ),
+ $content);
+
+ return $content;
+}
+
function powerpress_header()
{
// PowerPress settings:
$Powerpress = get_option('powerpress_general');
if( !isset($Powerpress['custom_feeds']) )
$Powerpress['custom_feeds'] = array('podcast'=>'Default Podcast Feed');
-
- if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
+
+ if( empty($Powerpress['disable_appearance']) || $Powerpress['disable_appearance'] == false )
{
- $PowerpressPluginURL = powerpress_get_root_url();
- if( !defined('POWERPRESS_ENQUEUE_SCRIPTS') )
+ if( !isset($Powerpress['player_function']) || $Powerpress['player_function'] > 0 ) // Don't include the player in the header if it is not needed...
{
- echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.js\"></script>\n";
- }
+ $PowerpressPluginURL = powerpress_get_root_url();
+ if( !defined('POWERPRESS_ENQUEUE_SCRIPTS') )
+ {
+ echo "<script type=\"text/javascript\" src=\"". powerpress_get_root_url() ."player.js\"></script>\n";
+ }
?>
<script type="text/javascript"><!--
<?php
$new_window_width = 420;
$new_window_height = 240;
- if( isset($Powerpress['new_window_width']) && $Powerpress['new_window_width'] > 100 )
+ if( isset($Powerpress['new_window_width']) && $Powerpress['new_window_width'] > 0 )
$new_window_width = $Powerpress['new_window_width'];
- if( isset($Powerpress['new_window_height']) && $Powerpress['new_window_height'] > 40 )
+ else if( isset($Powerpress['new_window_width']) )
+ $new_window_width = 50;
+
+ if( isset($Powerpress['new_window_height']) && $Powerpress['new_window_height'] > 0 )
$new_window_height = $Powerpress['new_window_height'];
+ else if( isset($Powerpress['new_window_height']) )
+ $new_window_height = 20;
+
+ if( empty($Powerpress['new_window_nofactor']) )
+ {
+ $new_window_width += 40;
+ $new_window_height += 80;
+ }
+
?>
-function powerpress_pinw(pinw){window.open('<?php echo get_bloginfo('url'); ?>/?powerpress_pinw='+pinw, 'PowerPressPlayer','toolbar=0,status=0,resizable=1,width=<?php echo ($new_window_width + 40); ?>,height=<?php echo ($new_window_height + 80); ?>'); return false;}
+function powerpress_pinw(pinw){window.open('<?php echo get_bloginfo('url'); ?>/?powerpress_pinw='+pinw, 'PowerPressPlayer','toolbar=0,status=0,resizable=1,width=<?php echo ($new_window_width); ?>,height=<?php echo ($new_window_height); ?>'); return false;}
powerpress_url = '<?php echo powerpress_get_root_url(); ?>';
//-->
</script>
<?php
+ }
}
if( !empty($Powerpress['feed_links']) )
@@ -1120,6 +1149,10 @@ function powerpress_init()
}
+ if( defined('GAWP_VERSION') )
+ {
+ add_filter('the_content', 'powerpress_yoast_gawp_fix', 120 );
+ }
}
add_action('init', 'powerpress_init', -100); // We need to add the feeds before other plugins start screwing with them
@@ -1961,8 +1994,19 @@ function powerpress_add_redirect_url($MediaURL, $GeneralSettings = false)
if( !empty($GeneralSettings[ $key ]) )
{
$RedirectClean = str_replace('http://', '', trim($GeneralSettings[ $key ]) );
- if( !strstr($NewURL, $RedirectClean) )
- $NewURL = 'http://'. $RedirectClean . str_replace('http://', '', $NewURL);
+ if( !empty($RedirectClean) )
+ {
+ if( strpos($RedirectClean, '/') == 0 ) // Not a valid redirect URL
+ continue;
+ // Check that redirect is either media..blubrry.com, media.techpodcasts.com, media.rawvoice.com, or www.podtrac.com
+ $ValidRedirectDomains = array('media.blubrry.com', 'media.rawvoice.com', 'media.techpodcasts.com', 'www.podtrac.com', 'podtrac.com');
+ $RedirectDomain = strtolower(substr($RedirectClean, 0, strpos($RedirectClean, '/') ));
+ if( !in_array($RedirectDomain, $ValidRedirectDomains) )
+ continue; // Not a valid domain so lets not add it
+
+ if( !strstr($NewURL, $RedirectClean) )
+ $NewURL = 'http://'. $RedirectClean . str_replace('http://', '', $NewURL);
+ }
}
}
Oops, something went wrong.

0 comments on commit 48753ca

Please sign in to comment.