Ticket #1089: 1089_new_xspf_player_with_skin_files_v2.patch
| File 1089_new_xspf_player_with_skin_files_v2.patch, 50.5 KB (added by ntm, 2 years ago) |
|---|
-
players/xspf_jukebox/dynamic/skin.xml
1 <?xml version="1.0" encoding="UTF-8"?> 2 <skin version="0" xmlns="http://xsml.org/ns/0/"> 3 <width>170</width> 4 <height>210</height> 5 <name>SlimOriginal</name> 6 <author>Lacy Morrow</author> 7 <email>gojukebox@gmail.com</email> 8 <website>http://www.lacymorrow.com</website> 9 <comment>DYNAMIC SlimOriginal Skin for XSPF Jukebox (This is a derivate of the SlimOriginal skin.) - THIS FILE WILL BE OVERWRITTEN BY THE PODPRESS XSPF WIDGET! You can prevent this by defining the constant PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE in the podpress.php file.</comment> 10 <objects> 11 <background color="CCCCCC" /> 12 <playlist x="3" y="21" width="154" height="173" size="10" font="Arial" color="333333" selectedColor="aa3333" /> 13 <shape shape="rectangle" x="0" y="0" width="170" height="18" color="EAEAEA" /> 14 <shape shape="rectangle" x="160" y="18" width="10" height="173" color="EAEAEA" /> 15 <shape shape="rectangle" x="0" y="191" width="170" height="19" color="EAEAEA" /> 16 <text x="137" y="191" size="10" text="About" font="Arial" bold="0" color="333333" hoverMessage="About XSPF Jukebox player" url="http://blog.lacymorrow.com" /> 17 <object label="prevButton" x="2" y="3" width="11" height="10" color="999999" /> 18 <object label="playButton" x="19" y="3" width="10" height="10" color="999999" /> 19 <object label="startButton" x="19" y="3" width="10" height="10" alpha="0" /> 20 <object label="stopButton" x="32" y="3" width="9" height="10" color="999999" /> 21 <object label="fwdButton" x="46" y="3" width="11" height="10" color="999999" /> 22 <object label="trackDisplay" x="59" y="0" width="67" size="10" font="Arial" color="000000" align="left" /> 23 <object label="timeBar" x="59" y="1" width="93" height="13" alpha="60" color="cc9999" /> 24 <object label="loadBar" x="59" y="14" width="93" height="3" alpha="60" color="BBdddd" /> 25 <object label="timeDisplay" x="127" y="0" width="26" size="10" font="Arial" color="000000" /> 26 <object label="volumeDisplay" x="154" y="3" width="14" height="10" color="444444" /> 27 <object label="scrollupButton" x="161" y="20" width="6" height="6" color="999999" /> 28 <object label="scrolldownButton" x="161" y="31" width="6" height="6" color="999999" /> 29 <object label="scrollButton" x="161" y="43" width="6" height="148" color="999999" bgAlpha="0" /> 30 <object label="shuffleButton" x="4" y="194" width="20.7" height="11.7" color="333333" hoverMessage="Shuffle" /> 31 <object label="repeatButton" x="27" y="194" width="15.7" height="11.7" color="333333" hoverMessage="Repeat" /> 32 </objects> 33 </skin> -
players/xspf_jukebox/dynamic/variables.txt
1 &autoload=true&autoplay=false&loaded=true 2 No newline at end of file -
players/xspf_jukebox/dynamic_slim/skin.xml
1 <?xml version="1.0" encoding="UTF-8"?> 2 <skin version="0" xmlns="http://xsml.org/ns/0/"> 3 <width>170</width> 4 <height>30</height> 5 <name>SlimOriginal</name> 6 <author>Lacy Morrow</author> 7 <email>gojukebox@gmail.com</email> 8 <website>http://www.lacymorrow.com</website> 9 <comment>DYNAMIC SlimOriginal Skin for XSPF Jukebox (This is a derivate of the SlimOriginal skin for the slim player.) - THIS FILE WILL BE OVERWRITTEN BY THE PODPRESS XSPF WIDGET! You can prevent this by defining the constant PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE in the podpress.php file.</comment> 10 <objects> 11 <background color="CCCCCC" /> 12 <shape shape="rectangle" x="0" y="0" width="170" height="18" color="EAEAEA" /> 13 <shape shape="rectangle" x="0" y="18" width="170" height="12" color="EAEAEA" /> 14 <text x="137" y="15" size="10" text="About" font="Arial" bold="0" color="333333" hoverMessage="About XSPF Jukebox player" url="http://blog.lacymorrow.com" /> 15 <object label="prevButton" x="2" y="3" width="11" height="10" color="999999" /> 16 <object label="playButton" x="19" y="3" width="10" height="10" color="999999" /> 17 <object label="startButton" x="19" y="3" width="10" height="10" alpha="0" /> 18 <object label="stopButton" x="32" y="3" width="9" height="10" color="999999" /> 19 <object label="fwdButton" x="46" y="3" width="11" height="10" color="999999" /> 20 <object label="trackDisplay" x="59" y="0" width="67" size="10" font="Arial" color="000000" align="left" /> 21 <object label="timeBar" x="59" y="1" width="93" height="13" alpha="60" color="cc9999" /> 22 <object label="loadBar" x="59" y="14" width="93" height="3" alpha="60" color="BBdddd" /> 23 <object label="timeDisplay" x="127" y="0" width="26" size="10" font="Arial" color="000000" /> 24 <object label="volumeDisplay" x="154" y="3" width="14" height="10" color="444444" /> 25 <object label="shuffleButton" x="4" y="18" width="17.1" height="10" color="333333" hoverMessage="Shuffle" /> 26 <object label="repeatButton" x="27" y="18" width="12.1" height="10" color="333333" hoverMessage="Repeat" /> 27 </objects> 28 </skin> -
players/xspf_jukebox/dynamic_slim/variables.txt
1 &autoload=true&autoplay=false&loaded=true 2 No newline at end of file -
players/xspf_jukebox/license.txt
1 XSPF JUKEBOX 2 Copyright (c) 2009, Lacy Morrow 3 All rights reserved. 4 5 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 7 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 Neither the name of the owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11 No newline at end of file -
podpress.php
1 1 <?php 2 2 define('PODPRESS_VERSION', '8.8'); 3 define('PODPRESS_MAINTENANCE_VERSION', '8.8.5 beta 2');3 define('PODPRESS_MAINTENANCE_VERSION', '8.8.5 beta 3'); 4 4 /* 5 5 Info for WordPress: 6 6 ============================================================================== 7 7 Plugin Name: podPress 8 Version: 8.8.5-beta_ 28 Version: 8.8.5-beta_3 9 9 Plugin URI: http://www.mightyseek.com/podpress/ 10 10 Description: The podPress pluggin gives you everything you need in one easy plugin to use WordPress for Podcasting. Set it up in <a href="admin.php?page=podpress/podpress_feed.php">'podPress'->Feed/iTunes Settings</a>. If you this plugin works for you, send us a comment. 11 11 Author: Dan Kuykendall (Seek3r) … … 37 37 38 38 Contributors: 39 39 ============================================================================== 40 Developer Dan Kuykendallhttp://www.mightyseek.com/41 Developer David Maciejewskihttp://www.macx.de/42 Forum Support/BugBoy Jeff Norrishttp://www.iscifi.tv/40 Developer Dan Kuykendall http://www.mightyseek.com/ 41 Developer David Maciejewski http://www.macx.de/ 42 Forum Support/BugBoy Jeff Norris http://www.iscifi.tv/ 43 43 44 Audio player Martin Lainehttp://www.1pixelout.net45 WP-iPodCatter Garrick Van Burenhttp://garrickvanburen.com/44 Audio player Martin Laine http://www.1pixelout.net 45 WP-iPodCatter Garrick Van Buren http://garrickvanburen.com/ 46 46 47 47 Thanks to all contributors and bug reporters! :) 48 48 … … 91 91 if (!defined('PLUGINDIR')) { define('PLUGINDIR', 'wp-content/plugins'); } 92 92 if (!defined('PODPRESSPLUGINDIR')) { define('PODPRESSPLUGINDIR', ABSPATH.PLUGINDIR); } 93 93 94 // Begin - XSPF Jukebox player configuration: 95 // Background-color of the player <object> 96 if ( ! defined( 'PODPRESS_XSPF_BACKGROUND_COLOR' ) ) { define( 'PODPRESS_XSPF_BACKGROUND_COLOR', 'FFFFFF' ); } 97 98 // Before you use these options please read the player documentation http://lacymorrow.com/projects/jukebox/xspfdoc.html and the skin documentation http://lacymorrow.com/projects/jukebox/skindoc.html 99 // If you want to use a custom skin file for the XSPF player then uncomment this line and replace or edit the skin files in the folders /podpress/players/xspf_jukebox/dynamic/ or /podpress/players/xspf_jukebox/dynamic_slim/ 100 // if ( ! defined('PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE') ) { define('PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE', TRUE); } 101 102 // the minimum width of the XSPF player (default: 170) in pixels (Choose the actual width in the widgets settings! Change this value only if you want to use a smaller skin.) 103 if ( ! defined( 'PODPRESS_XSPF_MIN_PLAYER_WIDTH' ) ) { define( 'PODPRESS_XSPF_MIN_PLAYER_WIDTH', 170 ); } 104 105 // podPress uses a derivate of the SlimOriginal skin. If you want to use a different skin with different heights then (uncomment these lines and) change the height values appropriately. 106 if ( ! defined( 'PODPRESS_XSPF_PLAYER_HEIGHT' ) ) { define( 'PODPRESS_XSPF_PLAYER_HEIGHT', 210 ); } 107 if ( ! defined( 'PODPRESS_XSPF_SLIM_PLAYER_HEIGHT' ) ) { define( 'PODPRESS_XSPF_SLIM_PLAYER_HEIGHT', 30 ); } 108 109 // If you want to let the player show the episode preview images then uncomment the following line (is only necessary if you are using the default player skin of podPress): 110 // if ( ! defined('PODPRESS_XSPF_SHOW_PREVIEW_IMAGE') ) { define('PODPRESS_XSPF_SHOW_PREVIEW_IMAGE', TRUE); } 111 112 // podPress uses the parameters: &autoload=true&autoplay=false&loaded=true to load the XSPF player 113 // If you want to use custom parameters then uncomment the following lines and edit or replace the variables.txt files in the folders /podpress/players/xspf_jukebox/dynamic/ and /podpress/players/xspf_jukebox/dynamic_slim/. 114 // if ( ! defined('PODPRESS_XSPF_USE_CUSTOM_VARIABLES') ) { define('PODPRESS_XSPF_USE_CUSTOM_VARIABLES', TRUE); } 115 // if ( ! defined('PODPRESS_XSPF_SLIM_USE_CUSTOM_VARIABLES') ) { define('PODPRESS_XSPF_SLIM_USE_CUSTOM_VARIABLES', TRUE); } 116 // End - XSPF Jukebox player configuration 117 118 94 119 if(!function_exists('memory_get_usage')) { 95 120 unset($_GET['podpress_showmem']); 96 121 function memory_get_usage() { return 0; } … … 154 179 podPress_checkmem('podPress base class included'); 155 180 require_once(ABSPATH.PLUGINDIR.'/podpress/podpress_functions.php'); 156 181 podPress_checkmem('podPress functions loaded'); 157 182 158 183 if($podPress_x = @parse_url($_SERVER['REQUEST_URI'])) { 159 184 $podPress_x = $podPress_x['path']; 160 185 if (strpos($podPress_x, 'crossdomain.xml')) { … … 781 806 $podPress->post_form_wp25plus('page'); 782 807 echo "\n<!-- podPress dbx for modern WP versions - page -->\n"; 783 808 } 809 ?> -
podpress_functions.php
82 82 } 83 83 return PODPRESSURL; 84 84 } else { 85 $result = get_settings('siteurl'); 86 if(substr($result, -1, 1) != '/') { 87 $result .= '/'; 88 } 89 return $result.'wp-content/plugins/podpress/'; 85 //~ $result = get_settings('siteurl'); 86 //~ if(substr($result, -1, 1) != '/') { 87 //~ $result .= '/'; 88 //~ } 89 //~ return $result.'wp-content/plugins/podpress/'; 90 return PODPRESS_URL.'/'; 90 91 } 91 92 } 92 93 … … 296 297 /* Functions for supporting the widgets */ 297 298 /**************************************************************/ 298 299 function podPress_loadWidgets () { 300 global $wp_version; 301 299 302 if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') ) { 300 303 return; 301 304 } 302 // Tell Dynamic Sidebar about our new widget and its control 303 register_sidebar_widget(array('Feed Buttons', 'widgets'), 'podPress_feedButtons'); 304 register_widget_control(array('Feed Buttons', 'widgets'), 'podPress_feedButtons_control', 300, 200); 305 306 if (TRUE == version_compare($wp_version, '2.2', '>=')) { 307 // Feed Buttons widget 308 $widget_ops = array( 309 'classname' => 'podpress_feedbuttons', 310 'description' => __('Shows buttons for the podcast feeds in the sidebar', 'podpress') 311 ); 312 $control_ops = array('width' => 300, 'height' => 300, 'id_base' => 'podpressfeedbuttons'); 313 $id = $control_ops['id_base']; 314 wp_register_sidebar_widget($id, __('podPress - Feed Buttons','podpress'), 'podPress_feedButtons', $widget_ops); 315 wp_register_widget_control($id, __('podPress - Feed Buttons','podpress'), 'podPress_feedButtons_control', $control_ops); 316 317 // XSPF Player widget 318 $widget_ops = array( 319 'classname' => 'podpress_xspfplayer', 320 'description' => __('Shows a flash player in the sidebar which uses the XSPF playlist of your podcast episodes', 'podpress') 321 ); 322 $control_ops = array('width' => 300, 'height' => 300, 'id_base' => 'podpressxspfPlayer'); 323 $id = $control_ops['id_base']; 324 wp_register_sidebar_widget($id, __('podPress - XSPF Player','podpress'), 'podPress_xspfPlayer', $widget_ops); 325 wp_register_widget_control($id, __('podPress - XSPF Player','podpress'), 'podPress_xspfPlayer_control', $control_ops); 326 } else { 327 // Feed Buttons widget 328 register_sidebar_widget(array('podPress - Feed Buttons', 'widgets'), 'podPress_feedButtons', $widget_ops); 329 register_widget_control(array('podPress - Feed Buttons', 'widgets'), 'podPress_feedButtons_control', 300, 200); 330 331 // XSPF Player widget 332 register_sidebar_widget(array('podPress - XSPF Player', 'widgets'), 'podPress_xspfPlayer'); 333 register_widget_control(array('podPress - XSPF Player', 'widgets'), 'podPress_xspfPlayer_control', 300, 200); 334 } 305 335 306 // Tell Dynamic Sidebar about our new widget and its control307 register_sidebar_widget(array('XSPF Player', 'widgets'), 'podPress_xspfPlayer');308 register_widget_control(array('XSPF Player', 'widgets'), 'podPress_xspfPlayer_control', 300, 200);309 336 } 310 337 311 338 function podPress_feedButtons_control() { 312 339 GLOBAL $podPress; 313 340 $options = $newoptions = get_option('widget_podPressFeedButtons'); 314 if ( $_POST[ "podPressFeedButtons-submit"] ) {341 if ( $_POST['podPressFeedButtons-submit'] ) { 315 342 $newoptions['blog'] = isset($_POST['podPressFeedButtons-blog']); 316 343 $newoptions['podcast'] = isset($_POST['podPressFeedButtons-podcast']); 317 344 $newoptions['itunes'] = isset($_POST['podPressFeedButtons-itunes']); 318 345 // iscifi new option for itunes protocol 319 346 $newoptions['iprot'] = isset ($_POST['podPressItunesProtocol-iprot']); 320 $newoptions['title'] = strip_tags(stripslashes($_POST[ "podPressFeedButtons-title"]));347 $newoptions['title'] = strip_tags(stripslashes($_POST['podPressFeedButtons-title'])); 321 348 } 322 349 if ( $options != $newoptions ) { 323 350 $options = $newoptions; … … 329 356 if (!isset($options['iprot'])) { 330 357 $options['iprot'] = false; 331 358 } 332 333 359 if(!isset($options['podcast'])) { 334 360 $options['podcast'] = true; 335 361 } … … 347 373 } 348 374 $title = htmlspecialchars($options['title'], ENT_QUOTES); 349 375 ?> 350 <p style="text-align: right; "><b><?php _e('A podPress Widget', 'podpress'); ?></b></p>351 <p><label for="podPressFeedButtons-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="podPressFeedButtons-title" name="podPressFeedButtons-title" type="text" value="<?php echo $title; ?>" /></label></p>376 <p style="text-align: right; font-weight:bold;"><?php _e('A podPress Widget', 'podpress'); ?></p> 377 <p><label for="podPressFeedButtons-title"><?php _e('Title:'); ?></label> <input style="width: 250px;" id="podPressFeedButtons-title" name="podPressFeedButtons-title" type="text" value="<?php echo $title; ?>" /></p> 352 378 <?php 353 if ($podPress->settings['podcastFeedURL'] != get_settings('rss2_url')) {354 ?>355 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-blog"><?php _e('Site Blog Feed', 'podpress'); ?> <input class="checkbox" type="checkbox" <?php echo $blog; ?> id="podPressFeedButtons-blog" name="podPressFeedButtons-blog" /></label></p>356 <?php379 if ($podPress->settings['podcastFeedURL'] != get_settings('rss2_url')) { 380 ?> 381 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-blog"><?php _e('Site Blog Feed', 'podpress'); ?></label> <input class="checkbox" type="checkbox" <?php echo $blog; ?> id="podPressFeedButtons-blog" name="podPressFeedButtons-blog" /></p> 382 <?php 357 383 } 358 384 ?> 359 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-podcast"><?php _e('Show Podcast Feed', 'podpress'); ?> <input class="checkbox" type="checkbox" <?php echo $podcast; ?> id="podPressFeedButtons-podcast" name="podPressFeedButtons-podcast" /></label></p> 360 361 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-itunes"><?php _e('Show iTunes Music Store', 'podpress'); ?> <input class="checkbox" type="checkbox" <?php echo $itunes; ?> id="podPressFeedButtons-itunes" name="podPressFeedButtons-itunes" /></label></p> 362 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-iprot"><?php _e('Use Itunes protcol for URL', 'podpress'); ?> <input class="checkbox" type="checkbox" <?php echo $iprot; ?> id="podPressItunesProtocol-iprot" name="podPressItunesProtocol-iprot" /></label></p> 385 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-podcast"><?php _e('Show Podcast Feed', 'podpress'); ?></label> <input class="checkbox" type="checkbox" <?php echo $podcast; ?> id="podPressFeedButtons-podcast" name="podPressFeedButtons-podcast" /></p> 386 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-itunes"><?php _e('Show iTunes Music Store', 'podpress'); ?></label> <input class="checkbox" type="checkbox" <?php echo $itunes; ?> id="podPressFeedButtons-itunes" name="podPressFeedButtons-itunes" /></p> 387 <p style="text-align:right;margin-right:40px;"><label for="podPressFeedButtons-iprot"><?php _e('Use Itunes protcol for URL', 'podpress'); ?></label> <input class="checkbox" type="checkbox" <?php echo $iprot; ?> id="podPressFeedButtons-iprot" name="podPressItunesProtocol-iprot" /></p> 363 388 <input type="hidden" id="podPressFeedButtons-submit" name="podPressFeedButtons-submit" value="1" /> 364 389 <?php 365 390 } … … 408 433 } 409 434 410 435 function podPress_xspfPlayer_control() { 411 $options = $newoptions = get_option('widget_podPressXspfPlayer'); 412 if ( $_POST["podPressXspfPlayer-submit"] ) { 413 $newoptions['useSlimPlayer'] = isset($_POST['podPressXspfPlayer-useSlimPlayer']); 414 $newoptions['title'] = strip_tags(stripslashes($_POST["podPressXspfPlayer-title"])); 415 } 416 if ( $options != $newoptions ) { 417 $options = $newoptions; 436 static $updated = false; // Whether or not we have already updated the data after a POST submit 437 $options = get_option('widget_podPressXspfPlayer'); 438 439 // We need to update the data 440 if ( !$updated && !empty($_POST['podPressXspfPlayer-submit']) ) { 441 $options['title'] = strip_tags(stripslashes($_POST['podPressXspfPlayer-title'])); 442 $options['useSlimPlayer'] = isset($_POST['podPressXspfPlayer-useSlimPlayer']); 443 $options['PlayerWidth'] = intval(preg_replace('/[^0-9]/', '',$_POST['podPressXspfPlayer-width'])); // only numeric values are allowed 444 // the player width should not be bigger than 600px and not be smaller than 170px 445 if (600 < $options['PlayerWidth']) { 446 $options['PlayerWidth'] = 600; 447 } elseif (PODPRESS_XSPF_MIN_PLAYER_WIDTH > $options['PlayerWidth']) { 448 $options['PlayerWidth'] = PODPRESS_XSPF_MIN_PLAYER_WIDTH; 449 } 450 if ( FALSE === defined( 'PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE' ) OR FALSE === PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE ) { 451 if (TRUE === $options['useSlimPlayer']) { 452 $options['PlayerHeight'] = PODPRESS_XSPF_SLIM_PLAYER_HEIGHT; 453 podpress_xspf_jukebox_slim_skin_xml($options['PlayerWidth'], $options['PlayerHeight']); 454 } else { 455 $options['PlayerHeight'] = PODPRESS_XSPF_PLAYER_HEIGHT; 456 podpress_xspf_jukebox_skin_xml($options['PlayerWidth'], $options['PlayerHeight']); 457 } 458 } 418 459 update_option('widget_podPressXspfPlayer', $options); 460 $updated = true; // So that we don't go through this more than once 419 461 } 420 $useSlimPlayer = $options['useSlimPlayer'] ? ' checked="checked"' : '';462 $useSlimPlayer = $options['useSlimPlayer'] ? ' checked="checked"' : ''; 421 463 if(!isset($options['title'])) { 422 464 $options['title'] = __('Podcast Player'); 423 465 } 466 if ( TRUE === $options['useSlimPlayer'] AND FALSE == isset($options['PlayerHeight']) ) { 467 $options['PlayerHeight'] = PODPRESS_XSPF_SLIM_PLAYER_HEIGHT; 468 } 469 if ( FALSE == isset($options['PlayerHeight']) ) { 470 $options['PlayerHeight'] = PODPRESS_XSPF_PLAYER_HEIGHT; 471 } 424 472 $title = htmlspecialchars($options['title'], ENT_QUOTES); 425 473 ?> 426 <p style="text-align: right;"><b><?php _e('A podPress Widget', 'podpress'); ?></b></p> 427 <p><label for="podPressXspfPlayer-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="podPressXspfPlayer-title" name="podPressXspfPlayer-title" type="text" value="<?php echo $title; ?>" /></label></p> 428 <p style="text-align:right;margin-right:40px;"><label for="podPressXspfPlayer-useSlimPlayer"><?php _e('Use Slim Player', 'podpress'); ?> <input class="checkbox" type="checkbox" <?php echo $useSlimPlayer; ?> id="podPressXspfPlayer-useSlimPlayer" name="podPressXspfPlayer-useSlimPlayer" /></label></p> 474 <p style="text-align: right; font-weight:bold;"><?php _e('A podPress Widget', 'podpress'); ?></p> 475 <p><label for="podPressXspfPlayer-title"><?php _e('Title:'); ?></label> <input type="text" id="podPressXspfPlayer-title" name="podPressXspfPlayer-title" value="<?php echo $title; ?>" style="width: 250px;" /></p> 476 <p><label for="podPressXspfPlayer-useSlimPlayer"><?php _e('Use Slim Player', 'podpress'); ?></label> <input type="checkbox" class="checkbox"<?php echo $useSlimPlayer; ?> id="podPressXspfPlayer-useSlimPlayer" name="podPressXspfPlayer-useSlimPlayer" /></p> 477 <p><label for="podPressXspfPlayer-width"><?php _e('player width:', 'podpress'); ?></label> <input type="text" id="podPressXspfPlayer-width" name="podPressXspfPlayer-width" maxlength="3" value="<?php echo $options['PlayerWidth']; ?>" style="width:3em;" /> <?php _e('px', 'podpress'); ?></p> 429 478 <input type="hidden" id="podPressXspfPlayer-submit" name="podPressXspfPlayer-submit" value="1" /> 430 479 <?php 431 480 } … … 441 490 if(!isset($options['useSlimPlayer'])) { 442 491 $options['useSlimPlayer'] = false; 443 492 } 444 445 echo $before_widget; 446 echo $before_title . $options['title'] . $after_title; 493 if ( TRUE === $options['useSlimPlayer'] AND FALSE == isset($options['PlayerHeight']) ) { 494 $options['PlayerHeight'] = PODPRESS_XSPF_SLIM_PLAYER_HEIGHT; 495 } 496 if ( FALSE == isset($options['PlayerHeight']) ) { 497 $options['PlayerHeight'] = PODPRESS_XSPF_PLAYER_HEIGHT; 498 } 499 if ( FALSE == isset($options['PlayerWidth']) ) { $options['PlayerWidth'] = PODPRESS_XSPF_MIN_PLAYER_WIDTH; } 447 500 448 if($options['useSlimPlayer']) { 449 echo '<object type="application/x-shockwave-flash" width="150" height="170" '; 450 //echo 'data="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf">'."\n"; 451 echo 'data="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'">'."\n"; 452 //echo ' <param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf" />'."\n"; 453 echo ' <param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n"; 454 echo '</object>'."\n"; 501 echo $before_widget."\n"; 502 echo $before_title . $options['title'] . $after_title."\n"; 503 if ($options['useSlimPlayer']) { 504 if ( TRUE === defined( 'PODPRESS_XSPF_SLIM_USE_CUSTOM_VARIABLES' ) AND TRUE === PODPRESS_XSPF_SLIM_USE_CUSTOM_VARIABLES AND TRUE == is_readable(PODPRESS_DIR.'/players/xspf_jukebox/dynamic_slim/variables.txt')) { 505 $variables = '&skin_url='.PODPRESS_URL.'/players/xspf_jukebox/dynamic_slim/skin.xml&loadurl='.PODPRESS_URL.'/players/xspf_jukebox/dynamic_slim/variables.txt'; 506 } else { 507 $variables = '&skin_url='.PODPRESS_URL.'/players/xspf_jukebox/dynamic_slim/skin.xml&autoload=true&autoplay=false&loaded=true'; 508 } 509 $data_string = PODPRESS_URL.'/players/xspf_jukebox/xspf_jukebox.swf?playlist_url='.get_feed_link('playlist.xspf').$variables; 510 echo '<object type="application/x-shockwave-flash" width="'.$options['PlayerWidth'].'" height="'.$options['PlayerHeight'].'" id="podpress_xspf_player_slim" data="'.$data_string.'">'."\n"; 455 511 } else { 456 echo '<object type="application/x-shockwave-flash" width="150" height="170" '; 457 //echo 'data="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf">'."\n"; 458 echo 'data="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'">'."\n"; 459 //echo ' <param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf" />'."\n"; 460 echo ' <param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n"; 461 echo '</object>'."\n"; 512 if ( TRUE === defined( 'PODPRESS_XSPF_USE_CUSTOM_VARIABLES' ) AND TRUE === PODPRESS_XSPF_USE_CUSTOM_VARIABLES AND TRUE == is_readable(PODPRESS_DIR.'/players/xspf_jukebox/dynamic/variables.txt')) { 513 $variables = '&skin_url='.PODPRESS_URL.'/players/xspf_jukebox/dynamic/skin.xml&loadurl='.PODPRESS_URL.'/players/xspf_jukebox/dynamic/variables.txt'; 514 } else { 515 $variables = '&skin_url='.PODPRESS_URL.'/players/xspf_jukebox/dynamic/skin.xml&autoload=true&autoplay=false&loaded=true'; 516 } 517 $data_string = PODPRESS_URL.'/players/xspf_jukebox/xspf_jukebox.swf?playlist_url='.get_feed_link('playlist.xspf').$variables; 518 echo '<object type="application/x-shockwave-flash" width="'.$options['PlayerWidth'].'" height="'.$options['PlayerHeight'].'" id="podpress_xspf_player" data="'.$data_string.'">'."\n"; 462 519 } 520 echo ' <param name="movie" value="'.$data_string.'" />'."\n"; 521 echo ' <param name="bgcolor" value="#'.PODPRESS_XSPF_BACKGROUND_COLOR.'" />'."\n"; 522 echo '</object>'."\n"; 463 523 echo $after_widget; 464 524 } 465 525 526 //~ add_action('init', 'podpress_enqueue_xspf_script'); 527 //~ function podpress_enqueue_xspf_script() { 528 //~ wp_enqueue_script('swfobject'); 529 //~ } 530 531 function podpress_xspf_jukebox_skin_xml($width = 230, $height = 210) { 532 if (600 < $width) { 533 $width = 600; 534 } elseif (170 > $width) { 535 $width = 170; 536 } 537 if (1000 < $height) { 538 $height = 1000; 539 } elseif (210 > $height) { 540 $height = 210; 541 } 542 $top_row_h = 18; 543 $bottom_row_w = $width; 544 $bottom_row_h = 19; 545 $scrollbar_w = 10; 546 $middle_row_h = ($height - ($top_row_h+$bottom_row_h)); 547 $volume_display_w=14; 548 $td_lb_tb_x = 59; 549 $timedisplay_w = 26; 550 $space_w = 3; 551 $space_h = 3; 552 $timebar_h = 13; 553 $loadBar_h = 3; 554 555 $player_buttons_h = $top_row_h-$space_h-1-$space_h-1; 556 557 // colors 558 $bgcolor = 'CCCCCC'; 559 $rowsandbars_bgcolor = 'EAEAEA'; 560 $buttons_color = '999999'; 561 $playlist_text_color = $button_text_color = '333333'; 562 $playlist_selectedtext_color = 'aa3333'; 563 $infodisplay_text_color = '000000'; 564 565 // misc. 566 if ( TRUE === defined( 'PODPRESS_XSPF_SHOW_PREVIEW_IMAGE' ) AND TRUE === PODPRESS_XSPF_SHOW_PREVIEW_IMAGE ) { 567 $show_episode_image = TRUE; 568 } else { 569 $show_episode_image = FALSE; 570 } 571 572 $output = '<?xml version="1.0" encoding="UTF-8"?>'."\n"; 573 $output .= '<skin version="0" xmlns="http://xsml.org/ns/0/">'."\n"; 574 $output .= ' <width>'.$width.'</width>'."\n"; 575 $output .= ' <height>'.$height.'</height>'."\n"; 576 $output .= ' <name>SlimOriginal</name>'."\n"; 577 $output .= ' <author>Lacy Morrow</author>'."\n"; 578 $output .= ' <email>gojukebox@gmail.com</email>'."\n"; 579 $output .= ' <website>http://www.lacymorrow.com</website>'."\n"; 580 $output .= ' <comment>DYNAMIC SlimOriginal Skin for XSPF Jukebox (This is a derivate of the SlimOriginal skin.) - THIS FILE WILL BE OVERWRITTEN BY THE PODPRESS XSPF WIDGET! You can prevent this by defining the constant PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE in the podpress.php file.</comment>'."\n"; 581 $output .= ' <objects>'."\n"; 582 $output .= ' <background color="'.$bgcolor.'" />'."\n"; 583 584 // playlist 585 $output .= ' <playlist x="'.$space_w.'" y="'.($top_row_h+$space_h).'" width="'.($width-$space_w-$scrollbar_w-$space_w).'" height="'.$middle_row_h.'" size="10" font="Arial" color="'.$playlist_text_color.'" selectedColor="'.$playlist_selectedtext_color.'" />'."\n"; 586 // top row background 587 $output .= ' <shape shape="rectangle" x="0" y="0" width="'.$width.'" height="'.$top_row_h.'" color="'.$rowsandbars_bgcolor.'" />'."\n"; 588 // scroll bar background 589 $output .= ' <shape shape="rectangle" x="'.($width-$scrollbar_w).'" y="'.$top_row_h.'" width="'.$scrollbar_w.'" height="'.$middle_row_h.'" color="'.$rowsandbars_bgcolor.'" />'."\n"; 590 // bottom row background 591 $output .= ' <shape shape="rectangle" x="0" y="'.($height-($bottom_row_h)).'" width="'.$bottom_row_w.'" height="'.$bottom_row_h.'" color="'.$rowsandbars_bgcolor.'" />'."\n"; 592 // "About" - button element 593 $output .= ' <text x="'.($width-33).'" y="'.($height-$bottom_row_h).'" size="10" text="'.__('About', 'podpress').'" font="Arial" bold="0" color="'.$button_text_color.'" hoverMessage="'.__('About XSPF Jukebox player', 'podpress').'" url="http://blog.lacymorrow.com" />'."\n"; 594 // player as Popup player - button element 595 // $output .= ' <text x="'.($width-85).'" y="'.($height-$bottom_row_h+2).'" size="10" text="'.__('Popup', 'podpress').'" font="Arial" bold="0" color="'.$button_text_color.'" hoverMessage="'.__('Popup', 'podpress').'" url="../static/object-flash-xspf-popup.php" />'."\n"; 596 597 $output .= ' <object label="prevButton" x="2" y="'.$space_h.'" width="11" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 598 $output .= ' <object label="playButton" x="19" y="'.$space_h.'" width="10" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 599 $output .= ' <object label="startButton" x="19" y="'.$space_h.'" width="10" height="'.$player_buttons_h.'" alpha="0" />'."\n"; 600 $output .= ' <object label="stopButton" x="32" y="'.$space_h.'" width="9" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 601 $output .= ' <object label="fwdButton" x="46" y="'.$space_h.'" width="11" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 602 603 $output .= ' <object label="trackDisplay" x="'.$td_lb_tb_x.'" y="0" width="'.($width-$td_lb_tb_x-$volume_display_w-4-26).'" size="10" font="Arial" color="'.$infodisplay_text_color.'" align="left" />'."\n"; 604 $output .= ' <object label="timeBar" x="'.$td_lb_tb_x.'" y="1" width="'.($width-$td_lb_tb_x-$volume_display_w-4).'" height="'.$timebar_h.'" alpha="60" color="cc9999" />'."\n"; 605 $output .= ' <object label="loadBar" x="'.$td_lb_tb_x.'" y="'.(1+$timebar_h).'" width="'.($width-$td_lb_tb_x-$volume_display_w-4).'" height="'.$loadBar_h.'" alpha="60" color="BBdddd" />'."\n"; 606 $output .= ' <object label="timeDisplay" x="'.($width-$volume_display_w-3-26).'" y="0" width="26" size="10" font="Arial" color="'.$infodisplay_text_color.'" />'."\n"; 607 $output .= ' <object label="volumeDisplay" x="'.($width-$volume_display_w-2).'" y="'.$space_h.'" width="'.$volume_display_w.'" height="'.$player_buttons_h.'" color="444444" />'."\n"; 608 609 if (TRUE == $show_episode_image) { 610 $output .= ' <object label="imageDisplay" x="20" y="'.($height-$bottom_row_h-110).'" width="130" height="100" />'."\n"; 611 } 612 //~ $output .= ' <object label="videoDisplay" x="20" y="20" width="130" height="100" />'."\n"; 613 614 $output .= ' <object label="scrollupButton" x="'.($width-6-$space_w).'" y="'.($top_row_h+2).'" width="6" height="6" color="'.$buttons_color.'" />'."\n"; 615 $output .= ' <object label="scrolldownButton" x="'.($width-6-$space_w).'" y="'.($top_row_h+13).'" width="6" height="6" color="'.$buttons_color.'" />'."\n"; 616 $output .= ' <object label="scrollButton" x="'.($width-6-$space_w).'" y="'.($top_row_h+25).'" width="6" height="'.($middle_row_h-25).'" color="'.$buttons_color.'" bgAlpha="0" />'."\n"; 617 618 $output .= ' <object label="shuffleButton" x="4" y="'.($height-$bottom_row_h+$space_h).'" width="20.7" height="11.7" color="'.$button_text_color.'" hoverMessage="'.__('Shuffle', 'podpress').'" />'."\n"; 619 $output .= ' <object label="repeatButton" x="27" y="'.($height-$bottom_row_h+$space_h).'" width="15.7" height="11.7" color="'.$button_text_color.'" hoverMessage="'.__('Repeat', 'podpress').'" />'."\n"; 620 621 //~ $output .= ' <object label="infoButton" x="79" y="'.($height-$bottom_row_h-20).'" size="+10" color="'.$button_text_color.'" text="'.__('Info', 'podpress').'" font="Arial" hoverMessage="'.__('Track Info', 'podpress').'" />'."\n"; 622 //~ $output .= ' <object label="purchaseButton" x="52" y="'.($height-($bottom_row_h)).'" size="+10" color="'.$button_text_color.'" text="'.__('purchase', 'podpress').'" font="Arial" hoverMessage="'.__('Purchase', 'podpress').'" />'."\n"; 623 //~ $output .= ' <object label="downloadButton" x="101" y="'.($height-($bottom_row_h)).'" size="+10" color="'.$button_text_color.'" text="'.__('Save', 'podpress').'" font="Arial" bold="0" hoverMessage="'.__('Download Track', 'podpress').'" />'."\n"; 624 625 $output .= ' </objects>'."\n"; 626 $output .= '</skin>'."\n"; 627 628 // write the out put to the skin file 629 podPress_write_XSPF_skin_file(PODPRESS_DIR.'/players/xspf_jukebox/dynamic/skin.xml', $output); 630 } 631 632 function podpress_xspf_jukebox_slim_skin_xml($width = 170, $height = 30) { 633 if (600 < $width) { 634 $width = 600; 635 } elseif (170 > $width) { 636 $width = 170; 637 } 638 if (100 < $height) { 639 $height = 100; 640 } elseif (30 > $height) { 641 $height = 30; 642 } 643 $top_row_h = 18; 644 $bottom_row_w = $width; 645 $bottom_row_h = 12; 646 $middle_row_h = ($height - ($top_row_h+$bottom_row_h)); 647 $volume_display_w=14; 648 $td_lb_tb_x = 59; 649 $timedisplay_w = 26; 650 $space_w = 3; 651 $space_h = 3; 652 $timebar_h = 13; 653 $loadBar_h = 3; 654 655 $player_buttons_h = $top_row_h-$space_h-1-$space_h-1; 656 657 // colors 658 $bgcolor = 'CCCCCC'; 659 $rowsandbars_bgcolor = 'EAEAEA'; 660 $buttons_color = '999999'; 661 $playlist_text_color = $button_text_color = '333333'; 662 $playlist_selectedtext_color = 'aa3333'; 663 $infodisplay_text_color = '000000'; 664 665 // misc. 666 $show_episode_image = TRUE; 667 668 $output = '<?xml version="1.0" encoding="UTF-8"?>'."\n"; 669 $output .= '<skin version="0" xmlns="http://xsml.org/ns/0/">'."\n"; 670 $output .= ' <width>'.$width.'</width>'."\n"; 671 $output .= ' <height>'.$height.'</height>'."\n"; 672 $output .= ' <name>SlimOriginal</name>'."\n"; 673 $output .= ' <author>Lacy Morrow</author>'."\n"; 674 $output .= ' <email>gojukebox@gmail.com</email>'."\n"; 675 $output .= ' <website>http://www.lacymorrow.com</website>'."\n"; 676 $output .= ' <comment>DYNAMIC SlimOriginal Skin for XSPF Jukebox (This is a derivate of the SlimOriginal skin for the slim player.) - THIS FILE WILL BE OVERWRITTEN BY THE PODPRESS XSPF WIDGET! You can prevent this by defining the constant PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE in the podpress.php file.</comment>'."\n"; 677 $output .= ' <objects>'."\n"; 678 $output .= ' <background color="'.$bgcolor.'" />'."\n"; 679 680 // top row background 681 $output .= ' <shape shape="rectangle" x="0" y="0" width="'.$width.'" height="'.$top_row_h.'" color="'.$rowsandbars_bgcolor.'" />'."\n"; 682 // bottom row background 683 $output .= ' <shape shape="rectangle" x="0" y="'.($height-($bottom_row_h)).'" width="'.$bottom_row_w.'" height="'.$bottom_row_h.'" color="'.$rowsandbars_bgcolor.'" />'."\n"; 684 // "About" - button element 685 $output .= ' <text x="'.($width-33).'" y="'.($height-$bottom_row_h-$space_h).'" size="10" text="'.__('About', 'podpress').'" font="Arial" bold="0" color="'.$button_text_color.'" hoverMessage="'.__('About XSPF Jukebox player', 'podpress').'" url="http://blog.lacymorrow.com" />'."\n"; 686 // player as Popup player - button element 687 // $output .= ' <text x="'.($width-85).'" y="'.($height-$bottom_row_h+2).'" size="10" text="'.__('Popup', 'podpress').'" font="Arial" bold="0" color="'.$button_text_color.'" hoverMessage="'.__('Popup', 'podpress').'" url="../static/object-flash-xspf-popup.php" />'."\n"; 688 689 $output .= ' <object label="prevButton" x="2" y="'.$space_h.'" width="11" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 690 $output .= ' <object label="playButton" x="19" y="'.$space_h.'" width="10" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 691 $output .= ' <object label="startButton" x="19" y="'.$space_h.'" width="10" height="'.$player_buttons_h.'" alpha="0" />'."\n"; 692 $output .= ' <object label="stopButton" x="32" y="'.$space_h.'" width="9" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 693 $output .= ' <object label="fwdButton" x="46" y="'.$space_h.'" width="11" height="'.$player_buttons_h.'" color="'.$buttons_color.'" />'."\n"; 694 695 $output .= ' <object label="trackDisplay" x="'.$td_lb_tb_x.'" y="0" width="'.($width-$td_lb_tb_x-$volume_display_w-4-26).'" size="10" font="Arial" color="'.$infodisplay_text_color.'" align="left" />'."\n"; 696 $output .= ' <object label="timeBar" x="'.$td_lb_tb_x.'" y="1" width="'.($width-$td_lb_tb_x-$volume_display_w-4).'" height="'.$timebar_h.'" alpha="60" color="cc9999" />'."\n"; 697 $output .= ' <object label="loadBar" x="'.$td_lb_tb_x.'" y="'.(1+$timebar_h).'" width="'.($width-$td_lb_tb_x-$volume_display_w-4).'" height="'.$loadBar_h.'" alpha="60" color="BBdddd" />'."\n"; 698 $output .= ' <object label="timeDisplay" x="'.($width-$volume_display_w-3-26).'" y="0" width="26" size="10" font="Arial" color="'.$infodisplay_text_color.'" />'."\n"; 699 $output .= ' <object label="volumeDisplay" x="'.($width-$volume_display_w-2).'" y="'.$space_h.'" width="'.$volume_display_w.'" height="'.$player_buttons_h.'" color="444444" />'."\n"; 700 701 $output .= ' <object label="shuffleButton" x="4" y="'.($height-$bottom_row_h).'" width="17.1" height="10" color="'.$button_text_color.'" hoverMessage="'.__('Shuffle', 'podpress').'" />'."\n"; 702 $output .= ' <object label="repeatButton" x="27" y="'.($height-$bottom_row_h).'" width="12.1" height="10" color="'.$button_text_color.'" hoverMessage="'.__('Repeat', 'podpress').'" />'."\n"; 703 // $output .= ' <object label="infoButton" x="79" y="'.($height-$bottom_row_h+2).'" size="+10" color="'.$button_text_color.'" text="'.__('Info', 'podpress').'" font="Arial" hoverMessage="'.__('Track Info', 'podpress').'" />'."\n"; 704 705 $output .= ' </objects>'."\n"; 706 $output .= '</skin>'."\n"; 707 708 // write the out put to the skin file 709 podPress_write_XSPF_skin_file(PODPRESS_DIR.'/players/xspf_jukebox/dynamic_slim/skin.xml', $output); 710 } 711 712 function podPress_write_XSPF_skin_file($filename='', $output='') { 713 if (FALSE == is_dir(dirname($filename))) { 714 echo '<p class="error" style="padding:2px;">'.sprintf(__('The folder %1$s does not exists. Unable to write the skin file.', 'podpress'), dirname($filename)).'</p>'; 715 return; 716 } 717 if (is_file($filename) AND FALSE == is_writable($filename)) { 718 chmod ($filename, 0777); 719 } 720 $handle = fopen($filename, "w"); 721 fputs($handle, $output); 722 $status = fclose($handle); 723 if (is_file($filename)) {chmod ($filename, 0644);} 724 } 725 466 726 /**************************************************************/ 467 727 /* Functions for supporting the downloader */ 468 728 /**************************************************************/ … … 474 734 case 'feed': 475 735 case 'web': 476 736 case 'play': 477 $sqlI = "INSERT INTO ".$wpdb->prefix."podpress_statcounts (postID, media, $method) VALUES ($postID, '$media', 1)"; 478 $sqlU = "UPDATE ".$wpdb->prefix."podpress_statcounts SET $method = $method+1, total = total+1 WHERE postID = '$postID' AND media = '$media'"; 479 $wpdb->hide_errors(); 480 $result = $wpdb->query($sqlI); 481 if(!$result) { 482 $wpdb->query($sqlU); 483 } 484 $wpdb->show_errors(); 737 $sqlIoU = "INSERT INTO ".$wpdb->prefix."podpress_statcounts (postID, media, $method) VALUES ($postID, '$media', 1) ON DUPLICATE KEY UPDATE $method = $method+1, total = total+1"; 738 $result = $wpdb->query($sqlIoU); 485 739 break; 486 740 default: 487 741 return; … … 980 1234 podPress_add_option($option_name, $option_value); 981 1235 return true; 982 1236 } 983 1237 ?> -
readme.txt
1 1 === podPress === 2 Tags: post, podcast, audio, video, admin, feed, widget, stats, statistics2 Tags: post, podcast, podcasting, audio, video, admin, feed, widget, stats, statistics 3 3 Contributors: seek3r, macx, iscifi 4 4 Donate link: http://www.mightyseek.com/podpress_donate.php 5 5 Requires at least: 1.5 6 Tested up to: 2.9. 16 Tested up to: 2.9.2 7 7 Stable Tag: 8.8.4 8 8 9 A dream plugin for Podcasters using WordPress..9 A plugin for Podcasters using WordPress. 10 10 11 11 == Description == 12 12 … … 17 17 18 18 Features: 19 19 20 * Full featured and automatic feed generation (RSS2, iTunes and ATOM and BitTorrent RSS) 21 * Preview of what your Podcast will look like on iTunes 20 * Full featured and automatic feed generation (RSS2, iTunes and ATOM and XSPF playlist) 22 21 * Podcast Download stats, with cool graphs. See below. 23 * Support for Premium Content (Pay Only)24 22 * Makes adding a Podcast to a Post very simple 25 23 * View MP3 Files ID3 tags when your Posting 26 24 * Control over where the player will display within your post and what it will look like. … … 29 27 * Automatic Media player for MP3, RM, OGG, MP4, MOV, QT, FLV, ASF, WMV, AVI, and more, with inline and Popup Window support. 30 28 * Preview image for videos 31 29 * Support for seperate Category podcasts 30 * Support for Premium Content (Pay Only) 31 * Preview of what your Podcast will look like on iTunes 32 32 * Audio Comments 33 33 34 34 For the more information visit the website … … 36 36 37 37 == Changelog == 38 38 39 = v0.8.5 beta 3 = 40 * [Ticket #1089](http://plugins.trac.wordpress.org/ticket/1089) - props: a new customizable XSPF player 41 * [Ticket #1085](http://plugins.trac.wordpress.org/ticket/1085) - enhancement for loading time of the podpress pages 42 * [Ticket #1083](http://plugins.trac.wordpress.org/ticket/1083) - a reworked player preview 43 * [Ticket #1080](http://plugins.trac.wordpress.org/ticket/1080) - fix for podPress_downloadlinks container 44 * [Ticket #1079](http://plugins.trac.wordpress.org/ticket/1079) - fix for the "Before <!- More -> tag:"-functionality 45 * [Ticket #1074](http://plugins.trac.wordpress.org/ticket/1074) - better handling of invalid input data in the feed generating functions 46 * [Ticket #1073](http://plugins.trac.wordpress.org/ticket/1073) - additional descriptions for the feed settings pages of podPress 47 * [Ticket #1068](http://plugins.trac.wordpress.org/ticket/1068) - patch for an error free stats counter (Thanks to [avatarworf](http://wordpress.org/support/profile/17483)) 48 * [Ticket #1066](http://plugins.trac.wordpress.org/ticket/1066) - Podango message at the general settings page of podPress 49 * [Ticket #1061](http://plugins.trac.wordpress.org/ticket/1061) - update to 1PixelOut player a.k.a Audio Player 2.0 50 39 51 = v0.8.5 beta 2 = 40 52 * [Ticket #1064](http://plugins.trac.wordpress.org/ticket/1064) - multiple fixes on the feed feed/iTunes settings page and feed functions 41 53 * [Ticket #1062](http://plugins.trac.wordpress.org/ticket/1062) - Fix for the Video Player Preview and the Listen Wrapper (contains the [Ticket #1060](http://plugins.trac.wordpress.org/ticket/1060) - little enhancement for the variables tempFileSystemPath and tempFileURLPath) 42 * [Ticket #1061](http://plugins.trac.wordpress.org/ticket/1061) - update to 1PixelOut player a.k.a Audio Player 2.043 54 44 55 = v0.8.5 beta = 45 56 * [Ticket #1059](http://plugins.trac.wordpress.org/ticket/1059) - fixed color picker (on the player settings page) … … 70 81 1. To add a link to itunes on your website, set the FeedID in the PodPress options page, and then add this code in your template `<?php podPress_iTunesLink(); ?>` 71 82 72 83 Details about all the optional_files are in optional_files/details.txt 73 Details about premium podcasting support is in optional_files/premiumcasting.txt74 84 85 = included software = 86 podPress v8.8.5 includes: 75 87 88 * 1PixelOut Audio Player v2.0 - http://www.1pixelout.net/code/audio-player-wordpress-plugin/ 89 * Podango player - http://sites.google.com/site/podangohibernate/ 90 * XSPF Jukebox v5.9.5 - http://lacymorrow.com/projects/jukebox/ 91 * getID3 v1.7.8b2 - http://www.getid3.org 92 93 76 94 == Upgrade Notice == 77 95 78 VERY IMPORTANT 96 Upgrading to 8.8.5: 97 If you have used the widgets of podPress then it will be necessary to reactivate these widgets manually after the upgrade to v8.8.5. 98 79 99 Upgrading to 4.0: 80 100 The plugins/podpress.php file is no longer needed and MUST be deleted. The podpress.php file now lives in `plugins/podpress/` 81 101 … … 88 108 89 109 == Configuration == 90 110 91 Go to the new podPress menu and start configuring podPress and your Feedsettings.111 Go to the new podPress menu and start configuring your Feed settings, player appearance, statistics and more general settings. 92 112 113 = How-To use a different skin for the XSPF player: = 114 Since v8.8.5 podPress uses the [XSPF player created by Lacy Morrow](http://blog.lacymorrow.com/projects/xspf-jukebox/) which has the possibility to use customized player skins. These skin files are XML files and situated in sub folders of podPress (/podpress/players/xspf_jukebox/dynamic/skin.xml and ... /dynamic_slim/skin.xml). podPress overwrites these files to updated the width (and height) of the widget every time the widgets settings are saved. Later versions of podPress might have more customization options for the player. 115 But if you want to use you own skin files then you can prevent the overwriting of the skin files by defining the constant PODPRESS_XSPF_PLAYER_USE_CUSTOM_SKINFILE (to do that uncomment the line at the beginning of the podpress.php file). 116 The "[XSPF Jukebox skin.xml Specification](http://lacymorrow.com/projects/jukebox/skindoc.html)" documents how-to make such a file. Or you can eventually use one of the [existing skins](http://blog.lacymorrow.com/projects/xspf-jukebox/). podPress uses a derivate of the SlimOriginal skin by default. If you are using a different skin it might be necessary to adjust the height of the player-<object> too. In order to do that define the constants: PODPRESS_XSPF_PLAYER_HEIGHT and PODPRESS_XSPF_SLIM_PLAYER_HEIGHT. (There are prepared lines in the podpress.php file.) 93 117 118 94 119 == Frequently Asked Questions == 95 120 96 121 For more FAQs see the official [podPress FAQ](http://podcasterswiki.com/index.php?title=PodPress_FAQ "Official podPress FAQ") (This Domain name of this FAQs page is currently (01/2010) unavailable resp. parked. Please, use the WP.org [Plugins and Hacks forum](http://wordpress.org/support/forum/10) to ask your questions or for bug reports.) 97 122 123 = How can I add podcast episodes with podPress? = 124 125 You can get probably a good impression how it works from [this WP.org forum thread](http://wordpress.org/support/topic/356947) although the original question is a little bit different. 126 127 = How can I submit podcast episodes to iTunes? = 128 129 podPress creates a RSS feed with additional information for iTunes. You can use the "Feed/iTunes settings"-page of podPress to determine what the content of these [iTunes RSS tags](http://www.apple.com/uk/itunes/podcasts/specs.html#rss) should be. It is possible to subscribe to this feed directly with the iTunes client program. 130 But you can add your podcast to the iTunes Store. For more information go to the [iTunes Podcast Resources / Making a Podcast / Submitting Your Podcast to the iTunes Store](http://www.apple.com/itunes/podcasts/specs.html#submitting). 131 132 = What is this iTunes:FeedID? = 133 134 If you submit your podcast to the iTunes Store then your podcast will get an ID. Insert this ID on the "Feed/iTunes settings"-page of podPress e.g. if you want to use the Feed Buttons widget of podPress. podPress creates the link to your podcast in the iTunes Store with this ID. 135 136 = How can I change the my podcast feed-URL in the iTunes Store? = 137 138 Apple describes [how it works](http://www.apple.com/itunes/podcasts/specs.html#changing) basically in there [iTunes Podcasting Resources](http://www.apple.com/itunes/podcasts/specs.html) and how you do this with podPress is dicussed in this WP.org [forum thread](http://wordpress.org/support/topic/249345). 139 98 140 = Blank screen after activating podPress = 99 141 100 142 Some PHP5 users end up with a blank screen after activating the podPress plugin. For reasons yet fully understood some PHP5 installations consume double the memory compared to a PHP4 install when dealing with WordPress. Some notes I have seen blame it on a bug with caching objects in session data, but I have not debugged it to that level yet. … … 104 146 105 147 In general this just requires that you replace the existing files with the new ones. Sometimes its a good idea to delete all the files in wp-content/plugins/podpress/ and re-upload them fresh. 106 148 149 107 150 == Screenshots == 108 151 109 152 1. Write a page and at the end of your Post add your mp3 filename or full URL.
