Version Description
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 0.8.3 |
Comparing to | |
See all releases |
Code changes from version 0.8.2 to 0.8.3
- powerpress.php +4 -2
- powerpressadmin-basic.php +13 -0
- powerpressadmin-dashboard.php +6 -0
- powerpressadmin.php +40 -14
- readme.txt +5 -2
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 and iTunes integration.
|
6 |
-
Version: 0.8.
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
@@ -29,7 +29,7 @@ License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
|
|
29 |
*/
|
30 |
|
31 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
32 |
-
define('POWERPRESS_VERSION', '0.8.
|
33 |
|
34 |
/////////////////////////////////////////////////////
|
35 |
// The following define options should be placed in your
|
@@ -976,6 +976,8 @@ function powerpress_load_general_feed_settings()
|
|
976 |
else
|
977 |
$powerpress_feed['enhance_itunes_summary'] = @$Feed['enhance_itunes_summary'];
|
978 |
$powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
|
|
|
|
|
979 |
}
|
980 |
else
|
981 |
{
|
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 and iTunes integration.
|
6 |
+
Version: 0.8.3
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
29 |
*/
|
30 |
|
31 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
32 |
+
define('POWERPRESS_VERSION', '0.8.3' );
|
33 |
|
34 |
/////////////////////////////////////////////////////
|
35 |
// The following define options should be placed in your
|
976 |
else
|
977 |
$powerpress_feed['enhance_itunes_summary'] = @$Feed['enhance_itunes_summary'];
|
978 |
$powerpress_feed['posts_per_rss'] = $Feed['posts_per_rss'];
|
979 |
+
if( $Feed['feed_redirect_url'] != '' )
|
980 |
+
$powerpress_feed['feed_redirect_url'] = $Feed['feed_redirect_url'];
|
981 |
}
|
982 |
else
|
983 |
{
|
powerpressadmin-basic.php
CHANGED
@@ -221,6 +221,9 @@ while( list($value,$desc) = each($options) )
|
|
221 |
$ModeDesc = 'Media Statistics Only';
|
222 |
if( $General['blubrry_hosting'] )
|
223 |
$ModeDesc = 'Media Statistics and Hosting';
|
|
|
|
|
|
|
224 |
|
225 |
?>
|
226 |
<h2><?php _e("Blubrry Services Integration"); ?></h2>
|
@@ -237,6 +240,16 @@ while( list($value,$desc) = each($options) )
|
|
237 |
<p style="margin-top: 5px;"><span id="service_mode"><?php echo $ModeDesc; ?></span> (<strong><a href="<?php echo admin_url(); ?>?action=powerpress-jquery-account&KeepThis=true&TB_iframe=true&width=500&height=400&modal=true" target="_blank" class="thickbox" style="color: #3D517E;" title="Blubrry Services Integration">Click here to configure Blubrry Services</a></strong>)</p>
|
238 |
</td>
|
239 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
</table>
|
241 |
|
242 |
<h2><?php _e("Media Statistics"); ?></h2>
|
221 |
$ModeDesc = 'Media Statistics Only';
|
222 |
if( $General['blubrry_hosting'] )
|
223 |
$ModeDesc = 'Media Statistics and Hosting';
|
224 |
+
$StatsInDashboard = true;
|
225 |
+
if( isset($General['disable_dashboard_widget']) && $General['disable_dashboard_widget'] == 1 )
|
226 |
+
$StatsInDashboard = false;
|
227 |
|
228 |
?>
|
229 |
<h2><?php _e("Blubrry Services Integration"); ?></h2>
|
240 |
<p style="margin-top: 5px;"><span id="service_mode"><?php echo $ModeDesc; ?></span> (<strong><a href="<?php echo admin_url(); ?>?action=powerpress-jquery-account&KeepThis=true&TB_iframe=true&width=500&height=400&modal=true" target="_blank" class="thickbox" style="color: #3D517E;" title="Blubrry Services Integration">Click here to configure Blubrry Services</a></strong>)</p>
|
241 |
</td>
|
242 |
</tr>
|
243 |
+
|
244 |
+
<tr valign="top">
|
245 |
+
<th scope="row">
|
246 |
+
<?php _e("Dashboard Integration"); ?>
|
247 |
+
</th>
|
248 |
+
<td>
|
249 |
+
<p style="margin-top: 5px;"><input name="StatsInDashboard" type="checkbox" value="1"<?php if( $StatsInDashboard == true ) echo ' checked'; ?> /> Display Statistics in WordPress Dashboard</p>
|
250 |
+
</td>
|
251 |
+
</tr>
|
252 |
+
|
253 |
</table>
|
254 |
|
255 |
<h2><?php _e("Media Statistics"); ?></h2>
|
powerpressadmin-dashboard.php
CHANGED
@@ -51,6 +51,9 @@ function powerpress_dashboard_stats_content()
|
|
51 |
{
|
52 |
$Settings = get_option('powerpress_general');
|
53 |
|
|
|
|
|
|
|
54 |
// If using user capabilities...
|
55 |
if( @$Settings['use_caps'] && !current_user_can('view_podcast_stats') )
|
56 |
return;
|
@@ -107,6 +110,9 @@ function powerpress_dashboard_setup()
|
|
107 |
{
|
108 |
$Settings = get_option('powerpress_general');
|
109 |
|
|
|
|
|
|
|
110 |
if( @$Settings['use_caps'] && !current_user_can('view_podcast_stats') )
|
111 |
return;
|
112 |
|
51 |
{
|
52 |
$Settings = get_option('powerpress_general');
|
53 |
|
54 |
+
if( isset($Settings['disable_dashboard_widget']) && $Settings['disable_dashboard_widget'] == 1 )
|
55 |
+
return; // Lets not do anythign to the dashboard for PowerPress Statistics
|
56 |
+
|
57 |
// If using user capabilities...
|
58 |
if( @$Settings['use_caps'] && !current_user_can('view_podcast_stats') )
|
59 |
return;
|
110 |
{
|
111 |
$Settings = get_option('powerpress_general');
|
112 |
|
113 |
+
if( isset($Settings['disable_dashboard_widget']) && $Settings['disable_dashboard_widget'] == 1 )
|
114 |
+
return; // Lets not do anythign to the dashboard for PowerPress Statistics
|
115 |
+
|
116 |
if( @$Settings['use_caps'] && !current_user_can('view_podcast_stats') )
|
117 |
return;
|
118 |
|
powerpressadmin.php
CHANGED
@@ -169,6 +169,13 @@ function powerpress_admin_init()
|
|
169 |
$General['display_player_excerpt'] = 0; // Set it to zero.
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
if( $_POST['action'] == 'powerpress-save-tags' )
|
173 |
{
|
174 |
if( !isset($General['write_tags']) ) // If we are modifying appearance settings but this option was not checked...
|
@@ -797,12 +804,6 @@ function powerpress_edit_post($post_ID, $post)
|
|
797 |
}
|
798 |
}
|
799 |
|
800 |
-
if( $ContentType == 'audio/mpg' )
|
801 |
-
{
|
802 |
-
$Results = powerpress_write_tags($MediaURL, $post->post_title);
|
803 |
-
|
804 |
-
}
|
805 |
-
|
806 |
$EnclosureData = $MediaURL . "\n" . $FileSize . "\n". $ContentType;
|
807 |
$ToSerialize = array();
|
808 |
// iTunes duration
|
@@ -884,14 +885,14 @@ function powerpress_edit_post($post_ID, $post)
|
|
884 |
}
|
885 |
|
886 |
if( $Settings['blubrry_hosting'] )
|
887 |
-
|
888 |
}
|
889 |
else if( $_POST['post_status'] == 'publish' )
|
890 |
{
|
891 |
$Settings = get_option('powerpress_general');
|
892 |
|
893 |
if( $Settings['blubrry_hosting'] )
|
894 |
-
powerpress_process_hosting($post_ID); // Call anytime blog post is in the published state
|
895 |
}
|
896 |
|
897 |
// And we're done!
|
@@ -1398,7 +1399,7 @@ function powerpress_remote_fopen($url, $basic_auth = false, $post_args = array()
|
|
1398 |
}
|
1399 |
|
1400 |
// Process any episodes for the specified post that have been marked for hosting and that do not have full URLs...
|
1401 |
-
function powerpress_process_hosting($post_ID)
|
1402 |
{
|
1403 |
$errors = array();
|
1404 |
$Settings = get_option('powerpress_general');
|
@@ -1424,10 +1425,17 @@ function powerpress_process_hosting($post_ID)
|
|
1424 |
{
|
1425 |
$error = false;
|
1426 |
// First we need to get media information...
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1431 |
if( is_array($results) && !isset($results['error']) )
|
1432 |
{
|
1433 |
if( isset($results['duration']) && $results['duration'] )
|
@@ -1458,6 +1466,7 @@ function powerpress_process_hosting($post_ID)
|
|
1458 |
if( is_array($results) && !isset($results['error']) )
|
1459 |
{
|
1460 |
$EnclosureURL = $results['media_url'];
|
|
|
1461 |
$EnclosureData = $EnclosureURL . "\n" . $EnclosureSize . "\n". $EnclosureType . "\n" . serialize($EpisodeData);
|
1462 |
update_post_meta($post_ID, $field, $EnclosureData);
|
1463 |
}
|
@@ -1714,7 +1723,8 @@ function powerpress_write_tags($file, $post_title)
|
|
1714 |
}
|
1715 |
|
1716 |
// Get meta info via API
|
1717 |
-
$api_url = sprintf('%s/media/%s/%s?format=json&id3=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), $Settings['blubrry_program_keyword'], $file );
|
|
|
1718 |
$content = powerpress_remote_fopen($api_url, $Settings['blubrry_auth'], $PostArgs );
|
1719 |
if( $content )
|
1720 |
{
|
@@ -1726,6 +1736,22 @@ function powerpress_write_tags($file, $post_title)
|
|
1726 |
return array('error'=>'Error occurred writing MP3 ID3 Tags.');
|
1727 |
}
|
1728 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1729 |
require_once('powerpressadmin-jquery.php');
|
1730 |
// Only include the dashboard when appropriate.
|
1731 |
require_once('powerpressadmin-dashboard.php');
|
169 |
$General['display_player_excerpt'] = 0; // Set it to zero.
|
170 |
}
|
171 |
|
172 |
+
if( $_POST['action'] == 'powerpress-save-basic' )
|
173 |
+
{
|
174 |
+
$General['disable_dashboard_widget'] = 0;
|
175 |
+
if( !isset($_POST['StatsInDashboard'] ) )
|
176 |
+
$General['disable_dashboard_widget'] = 1;
|
177 |
+
}
|
178 |
+
|
179 |
if( $_POST['action'] == 'powerpress-save-tags' )
|
180 |
{
|
181 |
if( !isset($General['write_tags']) ) // If we are modifying appearance settings but this option was not checked...
|
804 |
}
|
805 |
}
|
806 |
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
$EnclosureData = $MediaURL . "\n" . $FileSize . "\n". $ContentType;
|
808 |
$ToSerialize = array();
|
809 |
// iTunes duration
|
885 |
}
|
886 |
|
887 |
if( $Settings['blubrry_hosting'] )
|
888 |
+
powerpress_process_hosting($post_ID, $post->post_title); // Call anytime blog post is in the published state
|
889 |
}
|
890 |
else if( $_POST['post_status'] == 'publish' )
|
891 |
{
|
892 |
$Settings = get_option('powerpress_general');
|
893 |
|
894 |
if( $Settings['blubrry_hosting'] )
|
895 |
+
powerpress_process_hosting($post_ID, $post->post_title); // Call anytime blog post is in the published state
|
896 |
}
|
897 |
|
898 |
// And we're done!
|
1399 |
}
|
1400 |
|
1401 |
// Process any episodes for the specified post that have been marked for hosting and that do not have full URLs...
|
1402 |
+
function powerpress_process_hosting($post_ID, $post_title)
|
1403 |
{
|
1404 |
$errors = array();
|
1405 |
$Settings = get_option('powerpress_general');
|
1425 |
{
|
1426 |
$error = false;
|
1427 |
// First we need to get media information...
|
1428 |
+
|
1429 |
+
// If we are working with an Mp3, we can write id3 tags and get the info returned...
|
1430 |
+
if( ($EnclosureType == 'audio/mpg' || $EnclosureType == 'audio/mpeg') && @$Settings['write_tags'] )
|
1431 |
+
{
|
1432 |
+
$results = powerpress_write_tags($EnclosureURL, $post_title);
|
1433 |
+
}
|
1434 |
+
else
|
1435 |
+
{
|
1436 |
+
$results = powerpress_get_media_info($EnclosureURL);
|
1437 |
+
}
|
1438 |
+
|
1439 |
if( is_array($results) && !isset($results['error']) )
|
1440 |
{
|
1441 |
if( isset($results['duration']) && $results['duration'] )
|
1466 |
if( is_array($results) && !isset($results['error']) )
|
1467 |
{
|
1468 |
$EnclosureURL = $results['media_url'];
|
1469 |
+
unset($EpisodeData['hosting']); // we need to remove the flag since we're now using the correct FULL url
|
1470 |
$EnclosureData = $EnclosureURL . "\n" . $EnclosureSize . "\n". $EnclosureType . "\n" . serialize($EpisodeData);
|
1471 |
update_post_meta($post_ID, $field, $EnclosureData);
|
1472 |
}
|
1723 |
}
|
1724 |
|
1725 |
// Get meta info via API
|
1726 |
+
$api_url = sprintf('%s/media/%s/%s?format=json&id3=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), urlencode($Settings['blubrry_program_keyword']), urlencode($file) );
|
1727 |
+
|
1728 |
$content = powerpress_remote_fopen($api_url, $Settings['blubrry_auth'], $PostArgs );
|
1729 |
if( $content )
|
1730 |
{
|
1736 |
return array('error'=>'Error occurred writing MP3 ID3 Tags.');
|
1737 |
}
|
1738 |
|
1739 |
+
function powerpress_get_media_info($file)
|
1740 |
+
{
|
1741 |
+
$Settings = get_option('powerpress_general');
|
1742 |
+
|
1743 |
+
$api_url = sprintf('%s/media/%s/%s?format=json&info=true', rtrim(POWERPRESS_BLUBRRY_API_URL, '/'), urlencode($Settings['blubrry_program_keyword']), urlencode($file) );
|
1744 |
+
$content = powerpress_remote_fopen($api_url, $Settings['blubrry_auth']);
|
1745 |
+
if( $content )
|
1746 |
+
{
|
1747 |
+
$Results = powerpress_json_decode($content);
|
1748 |
+
if( $Results && is_array($Results) )
|
1749 |
+
return $Results;
|
1750 |
+
}
|
1751 |
+
|
1752 |
+
return array('error'=>'Error occurred obtaining media information.');
|
1753 |
+
}
|
1754 |
+
|
1755 |
require_once('powerpressadmin-jquery.php');
|
1756 |
// Only include the dashboard when appropriate.
|
1757 |
require_once('powerpressadmin-dashboard.php');
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: Angelo Mandato, Blubrry.com
|
3 |
Tags: podcast, podcasting, itunes, enclosure, zune, iphone, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats
|
4 |
Requires at least: 2.6.0
|
5 |
-
Tested up to: 2.
|
6 |
-
Stable tag: 0.8.
|
7 |
|
8 |
Add podcasting support to your blog.
|
9 |
|
@@ -72,6 +72,9 @@ As a alternative, PowerPress allows you to create additional Custom Podcast Feed
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
0.8.2 released on 5/31/2009
|
76 |
Fixed conflict with Twitter Updater bug when user is using PHP4 (Not a bug for PHP5 users) and fixed error on line 310 in the edit Feed settings page. Option added under tools to clear the Update Plugins Cache in WordPress. Added new user capabilities for viewing podcast statistics, for blog users who may have dashboard access but shouldn't have access to the podcast statistics.
|
77 |
|
2 |
Contributors: Angelo Mandato, Blubrry.com
|
3 |
Tags: podcast, podcasting, itunes, enclosure, zune, iphone, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats
|
4 |
Requires at least: 2.6.0
|
5 |
+
Tested up to: 2.8.1
|
6 |
+
Stable tag: 0.8.3
|
7 |
|
8 |
Add podcasting support to your blog.
|
9 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
0.8.3 released on 6/27/2009
|
76 |
+
Fixed bug with feed redirect URL setting for custom feeds, added option to disable the dashboard statistics widget, fixed 2 bugs with Blubrry hosting integration: media URL field no longer read-only after publishing and ID3 write tags bug fixed.
|
77 |
+
|
78 |
0.8.2 released on 5/31/2009
|
79 |
Fixed conflict with Twitter Updater bug when user is using PHP4 (Not a bug for PHP5 users) and fixed error on line 310 in the edit Feed settings page. Option added under tools to clear the Update Plugins Cache in WordPress. Added new user capabilities for viewing podcast statistics, for blog users who may have dashboard access but shouldn't have access to the podcast statistics.
|
80 |
|