function powerpressadmin_edit_artwork($FeedSettings, $General) { $SupportUploads = powerpressadmin_support_uploads(); ?> <h3><?php echo __('Artwork and Images', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Image', 'powerpress'); ?> <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?> </span> </th> <td> <input type="text" id="itunes_image" name="Feed[itunes_image]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['itunes_image']) ? $FeedSettings['itunes_image'] : ''); ?> " maxlength="250" /> <a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?> </a> <p><?php echo __('iTunes image must be at least 1400 x 1400 pixels in .jpg or .png format. iTunes image must not exceed 3000 x 3000 pixels and must use RGB color space.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> : http://example.com/images/itunes.jpg </p> <p><strong><?php echo __('A square 1400 x 1400 pixel image in .jpg format is recommended.', 'powerpress'); ?> </strong></p> <p> <?php echo __('This image is for your listing on the iTunes podcast directory and may also be used by other directories like Blubrry. It is not the artwork that is displayed during episode playback. That artwork needs to be saved into the media file in the form of tags (ID3 tags for mp3) following the production of the media file.', 'powerpress'); ?> </p> <p class="description"><?php echo __('Note: If you change the iTunes image without changing the file name it may take some time (days or even months) for iTunes to update the image in the iTunes Podcast Directory.', 'powerpress'); ?> <?php echo sprintf(__('Please contact %s if you are having issues with your image changes not appearing in iTunes.', 'powerpress'), '<a href="http://www.apple.com/support/itunes/contact/">' . __('iTunes Support', 'powerpress') . '</a>'); ?> </p> <?php if ($SupportUploads) { ?> <p><label class="powerpress-normal-font"><input name="itunes_image_checkbox" type="checkbox" onchange="powerpress_show_field('itunes_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> </label> <span style="font-size:85%;">(<?php echo __('Using this option should update your image on iTunes within 24 hours', 'powerpress'); ?> )</span> </p> <div style="display:none" id="itunes_image_upload"> <label for="itunes_image_file"><?php echo __('Choose file', 'powerpress'); ?> :</label><input type="file" id="itunes_image_file" name="itunes_image_file" /><br /> <?php if (!empty($General['advanced_mode_2'])) { ?> <div style="margin-left: 85px;"><label class="powerpress-normal-font"><input name="itunes_image_checkbox_as_rss" type="checkbox" value="1" onchange="powerpress_show_field('rss_image_upload_container', !this.checked)" /> <?php echo __('Also use as RSS image', 'powerpress'); ?> </label></div> <?php } else { ?> <input type="hidden" name="itunes_image_checkbox_as_rss" value="1" /> <?php } ?> </div> <?php } ?> </td> </tr> </table> <?php if (!empty($General['advanced_mode_2'])) { ?> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Episode Image', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?> </th> <td> <p><label><input type="checkbox" name="Feed[episode_itunes_image]" value="1" <?php if (!empty($FeedSettings['episode_itunes_image'])) { echo 'checked '; } ?> /> <?php echo __('Use iTunes image above', 'powerpress'); ?> </label></p> <p><?php echo __('Use the program iTunes image above as your iTunes episode image.', 'powerpress'); ?> </p> <p class="description"><?php echo __('NOTE: You must still save artwork into your media files to guarantee your artwork is displayed during playback.', 'powerpress'); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('RSS2 Image', 'powerpress'); ?> <br /> <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: Use iTunes image', 'powerpress'); ?> </span> </th> <td> <input type="text" id="rss2_image" name="Feed[rss2_image]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['rss2_image']) ? $FeedSettings['rss2_image'] : ''); ?> " maxlength="250" /> <a href="#" onclick="javascript: window.open( document.getElementById('rss2_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?> </a> <p><?php echo __('Place the URL to the RSS image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> http://mysite.com/images/rss.jpg</p> <!-- <p><?php echo __('RSS image should be at least 88 pixels wide and at least 31 pixels high in either .gif, .jpg and .png format.', 'powerpress'); ?> </p> <p><strong><?php echo __('A square image that is 300 x 300 pixel or larger in .jpg format is recommended.', 'powerpress'); ?> </strong></p> --> <?php if ($SupportUploads) { ?> <div id="rss_image_upload_container"> <p><input name="rss2_image_checkbox" type="checkbox" onchange="powerpress_show_field('rss_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> </p> <div style="display:none" id="rss_image_upload"> <label for="rss2_image"><?php echo __('Choose file', 'powerpress'); ?> :</label><input type="file" name="rss2_image_file" /> </div> </div> <?php } ?> </td> </tr> </table> <?php } }
function powerpress_admin_players($type = 'audio') { $General = powerpress_get_settings('powerpress_general'); if (version_compare($GLOBALS['wp_version'], '3.6-beta', '<') && empty($General['player'])) { $General['player'] = 'default'; } else { if (empty($General['player'])) { $General['player'] = 'mediaelement-audio'; } } if (version_compare($GLOBALS['wp_version'], '3.6-beta', '<') && empty($General['player'])) { $General['video_player'] = ''; } else { if (empty($General['video_player'])) { $General['video_player'] = 'mediaelement-video'; } } if (empty($General['audio_custom_play_button'])) { $General['audio_custom_play_button'] = ''; } $select_player = false; if (isset($_GET['sp'])) { $select_player = true; } if ($type == 'video') { if (!isset($General['video_player'])) { $select_player = true; } } else { if (!isset($General['player'])) { $select_player = true; } } $Audio = array(); $Audio['default'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlowPlayerClassic.mp3'; $Audio['audio-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/1_Pixel_Out_Flash_Player.mp3'; $Audio['flashmp3-maxi'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Flash_Maxi_Player.mp3'; $Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3'; $Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3'; $Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp3'; $Audio['mediaelement-audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_audio.mp3'; $Video = array(); $Video['flare-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlarePlayer.mp4'; $Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/flow.mp4'; $Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp4'; $Video['videojs-html5-video-player-for-wordpress'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4'; $Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_video.mp4'; //$Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4'; /* <div>< object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30"> <PARAM NAME=movie VALUE="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><embed src="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div><!-- End of generated code --> */ if ($type == 'video' && function_exists('add_videojs_header')) { add_videojs_header(); } ?> <link rel="stylesheet" href="<?php echo powerpress_get_root_url(); ?> 3rdparty/colorpicker/css/colorpicker.css" type="text/css" /> <script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?> 3rdparty/colorpicker/js/colorpicker.js"></script> <script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?> player.min.js"></script> <script type="text/javascript"><!-- powerpress_url = '<?php echo powerpress_get_root_url(); ?> '; function rgb2hex(rgb) { rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); function hex(x) { hexDigits = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"); return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16]; } if( rgb ) return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); return ''; } function UpdatePlayerPreview(name, value) { if( typeof(generator) != "undefined" ) // Update the Maxi player... { generator.updateParam(name, value); generator.updatePlayer(); } if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player... update_audio_player(); } jQuery(document).ready(function($) { jQuery('.color_preview').ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { jQuery(el).css({ 'background-color' : '#' + hex }); jQuery(el).ColorPickerHide(); var Id = jQuery(el).attr('id'); Id = Id.replace(/_prev/, ''); jQuery('#'+ Id ).val( '#' + hex ); UpdatePlayerPreview(Id, '#'+hex ); }, onBeforeShow: function () { jQuery(this).ColorPickerSetColor( rgb2hex( jQuery(this).css("background-color") ) ); } }) .bind('keyup', function(){ jQuery(this).ColorPickerSetColor( rgb2hex( jQuery(this).css("background-color") ) ); }); jQuery('.color_field').bind('change', function () { var Id = jQuery(this).attr('id'); jQuery('#'+ Id + '_prev' ).css( { 'background-color' : jQuery(this).val() } ); if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player... update_audio_player(); }); jQuery('.other_field').bind('change', function () { if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player... update_audio_player(); }); }); //--> </script> <!-- special page styling goes here --> <style type="text/css"> div.color_control { display: block; float:left; width: 100%; padding: 0; } div.color_control input { display: inline; float: left; } div.color_control div.color_picker { display: inline; float: left; margin-top: 3px; } #player_preview { margin-bottom: 0px; height: 50px; margin-top: 8px;} input#colorpicker-value-input { width: 60px; height: 16px; padding: 0; margin: 0; font-size: 12px; border-spacing: 0; border-width: 0; } table.html5formats { width: 600px; margin: 0; padding: 0; } table.html5formats tr { margin: 0; padding: 0; } table.html5formats tr th { font-weight: bold; border-bottom: 1px solid #000000; margin: 0; padding: 0 5px; width: 25%; } table.html5formats tr td { border-right: 1px solid #000000; border-bottom: 1px solid #000000; margin: 0; padding: 0 10px; } table.html5formats tr > td:first-child { border-left: 1px solid #000000; } </style> <?php // mainly 2 pages, first page selects a player, second configures the player, if there are optiosn to configure for that player. If the user is on the second page, // a link should be provided to select a different player. if ($select_player) { ?> <input type="hidden" name="action" value="powerpress-select-player" /> <h2><?php echo __('Blubrry PowerPress Player Options', 'powerpress'); ?> </h2> <p style="margin-bottom: 0;"><?php echo __('Select the media player you would like to use.', 'powerpress'); ?> </p> <?php if ($type == 'video') { ?> <table class="form-table"> <tr valign="top"> <th scope="row"> </th> <td> <ul> <?php if (version_compare($GLOBALS['wp_version'], '3.6-alpha', '>')) { ?> <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_mediaelement_video" value="mediaelement-video" <?php if ($General['video_player'] == 'mediaelement-video') { echo 'checked'; } ?> /> <?php echo __('MediaElement.js Media Player (default)', 'powerpress'); ?> </label> <?php echo powerpressadmin_new(); ?> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_mediaelement_video" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_mediaelementvideo($Video['mediaelement-video']); ?> </p> <?php powerpressplayer_mediaelement_info(); ?> </li> <?php } ?> <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_flow_player_classic_player" value="flow-player-classic" <?php if ($General['video_player'] == 'flow-player-classic') { echo 'checked'; } ?> /> <?php echo __('Flow Player Classic', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_flow_player_classic_player" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_flowplayerclassic($Video['flow-player-classic']); ?> </p> <?php powerpressplayer_flowplayer_info(); ?> </li> <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_html5video" value="html5video" <?php if ($General['video_player'] == 'html5video') { echo 'checked'; } ?> /> <?php echo __('HTML5 Video Player', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5video" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_html5video($Video['html5video']); ?> </p> <p> <?php echo __('HTML5 Video is an element introduced in the latest HTML specification (HTML5) for the purpose of playing videos.', 'powerpress'); ?> </p> <p> <?php echo __('HTML5 Video Player is not format specific. See table below for a list of browsers and supported formats.', 'powerpress'); ?> </p> <table class="html5formats" border="0" cellpadding="0" cellspacing="0"> <tr> <th><?php echo __('Browser', 'powerpress'); ?> </th> <th>H.264 (.mp4/.m4v)</th> <th>WebM (.webm)</th> <th>Theora (.ogg/.ogv)</th> </tr> <tr> <td><i><?php echo __('Internet Explorer', 'powerpress'); ?> </i></td> <td><strong>9.0+</strong></td> <td>-</td> <td>-</td> </tr> <tr> <td><i><?php echo __('Firefox', 'powerpress'); ?> </i></td> <td><strong>22.0+</strong></td> <td><strong>4.0+</strong></td> <td><strong>3.5+</strong></td> </tr> <tr> <td><i><?php echo __('Chrome', 'powerpress'); ?> <sup>1</sup></i></td> <td>-</td> <td><strong>6.0+</strong></td> <td><strong>5.0+</strong></td> </tr> <tr> <td><i><?php echo __('Opera', 'powerpress'); ?> </i></td> <td>-</td> <td><strong>10.6+</strong></td> <td><strong>10.5+</strong></td> </tr> <tr> <td><i><?php echo __('Safari', 'powerpress'); ?> <sup>2</sup></i></td> <td><strong>3.0+</strong></td> <td>-</td> <td>-</td> </tr> </table> <div><sup>1</sup> <?php echo __('Chrome supported H.264 in previous versions, but no longer supports the format.', 'powerpress'); ?> </div> <div><sup>2</sup> <?php echo __('Safari requires QuickTime installed for HTML5 playback.', 'powerpress'); ?> </div> <p> <?php echo __('Flow Player Classic is used when HTML5 support is not available.', 'powerpress'); ?> </p> </li> <!-- videojs-html5-video-player-for-wordpress --> <li><label><input type="radio" name="VideoPlayer[video_player]" id="player_videojs_html5_video_player_for_wordpress" value="videojs-html5-video-player-for-wordpress" <?php if ($General['video_player'] == 'videojs-html5-video-player-for-wordpress') { echo 'checked'; } ?> <?php echo function_exists('add_videojs_header') ? '' : 'disabled'; ?> /> <?php echo __('VideoJS', 'powerpress'); ?> </label> <?php echo powerpressadmin_new(); ?> <?php if (function_exists('add_videojs_header')) { ?> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_videojs_html5_video_player_for_wordpress" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> <?php } ?> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php if (function_exists('add_videojs_header')) { echo powerpressplayer_build_videojs($Video['videojs-html5-video-player-for-wordpress']); } ?> </p> <?php powerpressplayer_videojs_info(); ?> </li> </ul> </td> </tr> </table> <?php } else { ?> <table class="form-table"> <tr valign="top"> <th scope="row"> </th> <td> <ul> <?php if (version_compare($GLOBALS['wp_version'], '3.6-alpha', '>')) { ?> <li><label><input type="radio" name="Player[player]" id="player_mediaelement_audio" value="mediaelement-audio" <?php if ($General['player'] == 'mediaelement-audio') { echo 'checked'; } ?> /> <?php echo __('MediaElement.js Media Player (default)', 'powerpress'); ?> </label> <?php echo powerpressadmin_new(); ?> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_mediaelement_audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_mediaelementaudio($Audio['mediaelement-audio']); ?> </p> <?php powerpressplayer_mediaelement_info(); ?> </li> <?php } ?> <li><label><input type="radio" name="Player[player]" id="player_default" value="default" <?php if ($General['player'] == 'default') { echo 'checked'; } ?> /> <?php echo __('Flow Player Classic', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_default" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_flowplayerclassic($Audio['default']); ?> </p> <?php powerpressplayer_flowplayer_info(); ?> </li> <li><label><input type="radio" name="Player[player]" id="player_audio_player" value="audio-player" <?php if ($General['player'] == 'audio-player') { echo 'checked'; } ?> /> <?php echo __('1 Pixel Out Audio Player', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audio_player" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_1pxoutplayer($Audio['audio-player']); ?> </p> <p> <?php echo __('1 Pixel Out Audio Player is a popular customizable audio (mp3 only) flash player. Features include an animated play/pause button, scroll-able position bar, elapsed/remaining time, volume control and color styling options.', 'powerpress'); ?> </p> </li> <li><label><input type="radio" name="Player[player]" id="player_html5audio" value="html5audio" <?php if ($General['player'] == 'html5audio') { echo 'checked'; } ?> /> <?php echo __('HTML5 Audio Player', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_html5audio" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_html5audio($Audio['html5audio']); ?> </p> <p> <?php echo __('HTML5 audio is an element introduced in the latest HTML specification (HTML5) for the purpose of playing audio.', 'powerpress'); ?> </p> <p> <?php echo __('HTML5 Audio Player is not format specific. See table below for a list of browsers and supported formats.', 'powerpress'); ?> </p> <table class="html5formats" border="0" cellpadding="0" cellspacing="0"> <tr> <th><?php echo __('Browser', 'powerpress'); ?> </th> <th>Mpeg3 (.mp3)</th> <th>AAC (.m4a)</th> <th>Vorbis (.ogg/.oga)</th> </tr> <tr> <td><i><?php echo __('Internet Explorer', 'powerpress'); ?> </i></td> <td><strong>9.0+</strong></td> <td><strong>9.0+</strong></td> <td>-</td> </tr> <tr> <td><i><?php echo __('Firefox', 'powerpress'); ?> </i></td> <td><strong>26.0+</strong></td> <td>-</td> <td><strong>3.5+</strong></td> </tr> <tr> <td><i><?php echo __('Chrome', 'powerpress'); ?> <sup>1</sup></i></td> <td><strong>5.0+</strong></td> <td>-</td> <td><strong>5.0+</strong></td> </tr> <tr> <td><i><?php echo __('Opera', 'powerpress'); ?> </i></td> <td>-</td> <td>-</td> <td><strong>10.5+</strong></td> </tr> <tr> <td><i><?php echo __('Safari', 'powerpress'); ?> <sup>2</sup></i></td> <td><strong>3.0+</strong></td> <td><strong>3.0+</strong></td> <td>-</td> </tr> </table> <div><sup>1</sup> <?php echo __('Chrome supported AAC in previous versions, but no longer supports the format.', 'powerpress'); ?> </div> <div><sup>2</sup> <?php echo __('Safari requires QuickTime installed for HTML5 playback.', 'powerpress'); ?> </div> <p> <?php echo __('Flow Player Classic is used when HTML5 support is not available.', 'powerpress'); ?> </p> </li> <li> <div class="updated fade powerpress-notice inline"> <?php echo __('NOTICE: Due to limited use, the players below (Mp3 Player Maxi, Simple Flash MP3 Player, and AudioPlay) will be moved to a separate plugin starting with PowerPress version 6.0.', 'powerpress'); ?> </div> </li> <li><label><input type="radio" name="Player[player]" id="player_flashmp3_maxi" value="flashmp3-maxi" <?php if ($General['player'] == 'flashmp3-maxi') { echo 'checked'; } ?> /> <?php echo __('Mp3 Player Maxi', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_flashmp3_maxi" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_flashmp3maxi($Audio['flashmp3-maxi']); ?> </p> <p> <?php echo __('Flash Mp3 Maxi Player is a customizable open source audio (mp3 only) flash player. Features include pause/play/stop/file info buttons, scroll-able position bar, volume control and color styling options.', 'powerpress'); ?> </p> </li> <li><label><input type="radio" name="Player[player]" id="player_simple_flash" value="simple_flash" <?php if ($General['player'] == 'simple_flash') { echo 'checked'; } ?> /> <?php echo __('Simple Flash MP3 Player', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_simple_flash" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_simpleflash($Audio['simple_flash']); ?> </p> <p> <?php echo __('Simple Flash MP3 Player is a free and simple audio (mp3 only) flash player. Features include play/pause and stop buttons.', 'powerpress'); ?> </p> </li> <li><label><input type="radio" name="Player[player]" id="player_audioplay" value="audioplay" <?php if ($General['player'] == 'audioplay') { echo 'checked'; } ?> /> <?php echo __('AudioPlay', 'powerpress'); ?> </label> <strong style="padding-top: 8px; margin-left: 20px;"><a href="#" id="activate_audioplay" class="activate-player"><?php echo __('Activate and Configure Now', 'powerpress'); ?> </a></strong> </li> <li style="margin-left: 30px; margin-bottom:16px;"> <p> <?php echo powerpressplayer_build_audioplay($Audio['audioplay']); ?> </p> <p> <?php echo __('AudioPlay is one button freeware audio (mp3 only) flash player. Features include a play/stop or play/pause button available in two sizes in either black or white.', 'powerpress'); ?> </p> </li> </ul> </td> </tr> </table> <?php } ?> <h4 style="margin-bottom: 0;"><?php echo __('Click \'Save Changes\' to activate and configure selected player.', 'powerpress'); ?> </h4> <?php } else { ?> <h2><?php echo __('Configure Player', 'powerpress'); ?> </h2> <?php if ($type == 'audio') { ?> <p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_player.php&sp=1"); ?> "><?php echo __('Select a different audio player', 'powerpress'); ?> </a></strong></p> <?php } else { ?> <p style="margin-bottom: 20px;"><strong><a href="<?php echo admin_url("admin.php?page=powerpress/powerpressadmin_videoplayer.php&sp=1"); ?> "><?php echo __('Select a different video player', 'powerpress'); ?> </a></strong></p> <?php } // Start adding logic here to display options based on the player selected... if ($type == 'audio') { switch ($General['player']) { case 'audio-player': $PlayerSettings = powerpress_get_settings('powerpress_audio-player'); if ($PlayerSettings == "") { $PlayerSettings = array('width' => '290', 'transparentpagebg' => 'yes', 'lefticon' => '#333333', 'leftbg' => '#CCCCCC', 'bg' => '#E5E5E5', 'voltrack' => '#F2F2F2', 'volslider' => '#666666', 'rightbg' => '#B4B4B4', 'rightbghover' => '#999999', 'righticon' => '#333333', 'righticonhover' => '#FFFFFF', 'loader' => '#009900', 'track' => '#FFFFFF', 'tracker' => '#DDDDDD', 'border' => '#CCCCCC', 'skip' => '#666666', 'text' => '#333333', 'pagebg' => '', 'rtl' => 'no', 'initialvolume' => '60', 'animation' => 'yes', 'remaining' => 'no'); } if (empty($PlayerSettings['remaining'])) { $PlayerSettings['remaining'] = 'no'; } // New default setting if (!isset($PlayerSettings['buffer'])) { $PlayerSettings['buffer'] = ''; } // New default setting if (!isset($PlayerSettings['titles'])) { $PlayerSettings['titles'] = ''; } ?> <script type="text/javascript"><!-- function update_audio_player() { var myParams = new Array("lefticon","leftbg", "bg", "voltrack", "rightbg", "rightbghover", "righticon", "righticonhover", "loader", "track", "tracker", "border", "skip", "text", "pagebg", "rtl", "animation", "titles", "initialvolume"); var myWidth = document.getElementById('player_width').value; var myBackground = ''; if( myWidth < 10 || myWidth > 900 ) myWidth = 290; var out = '<object type="application/x-shockwave-flash" data="<?php echo powerpress_get_root_url(); ?> /audio-player.swf" width="'+myWidth+'" height="24">'+"\n"; out += ' <param name="movie" value="<?php echo powerpress_get_root_url(); ?> /audio-player.swf" />'+"\n"; out += ' <param name="FlashVars" value="playerID=1&soundFile=<?php echo $Audio['audio-player']; ?> '; var x = 0; for( x = 0; x < myParams.length; x++ ) { if( myParams[ x ] == 'border' ) var Element = document.getElementById( 'player_border' ); else var Element = document.getElementById( myParams[ x ] ); if( Element ) { if( Element.value != '' ) { out += '&'; out += myParams[ x ]; out += '='; out += Element.value.replace(/^#/, ''); if( myParams[ x ] == 'pagebg' ) { myBackground = '<param name="bgcolor" value="'+ Element.value +'" />'; out += '&transparentpagebg=no'; } } else { if( myParams[ x ] == 'pagebg' ) { out += '&transparentpagebg=yes'; myBackground = '<param name="wmode" value="transparent" />'; } } } } out += '" />'+"\n"; out += '<param name="quality" value="high" />'; out += '<param name="menu" value="false" />'; out += myBackground; out += '</object>'; var player = document.getElementById("player_preview"); player.innerHTML = out; } function audio_player_defaults() { if( confirm('<?php echo __("Set defaults, are you sure?\\n\\nAll of the current settings will be overwritten!", 'powerpress'); ?> ') ) { jQuery('#player_width').val('290'); UpdatePlayerPreview('player_width',jQuery('#player_width').val() ); jQuery('#transparentpagebg').val( 'yes'); UpdatePlayerPreview('transparentpagebg',jQuery('#transparentpagebg').val() ); jQuery('#lefticon').val( '#333333'); UpdatePlayerPreview('lefticon',jQuery('#lefticon').val() ); jQuery('#lefticon_prev' ).css( { 'background-color' : '#333333' } ); jQuery('#leftbg').val( '#CCCCCC'); UpdatePlayerPreview('leftbg',jQuery('#leftbg').val() ); jQuery('#leftbg_prev' ).css( { 'background-color' : '#CCCCCC' } ); jQuery('#bg').val( '#E5E5E5'); UpdatePlayerPreview('bg',jQuery('#bg').val() ); jQuery('#bg_prev' ).css( { 'background-color' : '#E5E5E5' } ); jQuery('#voltrack').val( '#F2F2F2'); UpdatePlayerPreview('voltrack',jQuery('#voltrack').val() ); jQuery('#voltrack_prev' ).css( { 'background-color' : '#F2F2F2' } ); jQuery('#volslider').val( '#666666'); UpdatePlayerPreview('volslider',jQuery('#volslider').val() ); jQuery('#volslider_prev' ).css( { 'background-color' : '#666666' } ); jQuery('#rightbg').val( '#B4B4B4'); UpdatePlayerPreview('rightbg',jQuery('#rightbg').val() ); jQuery('#rightbg_prev' ).css( { 'background-color' : '#B4B4B4' } ); jQuery('#rightbghover').val( '#999999'); UpdatePlayerPreview('rightbghover',jQuery('#rightbghover').val() ); jQuery('#rightbghover_prev' ).css( { 'background-color' : '#999999' } ); jQuery('#righticon').val( '#333333'); UpdatePlayerPreview('righticon',jQuery('#righticon').val() ); jQuery('#righticon_prev' ).css( { 'background-color' : '#333333' } ); jQuery('#righticonhover').val( '#FFFFFF'); UpdatePlayerPreview('righticonhover',jQuery('#righticonhover').val() ); jQuery('#righticonhover_prev' ).css( { 'background-color' : '#FFFFFF' } ); jQuery('#loader').val( '#009900'); UpdatePlayerPreview('loader',jQuery('#loader').val() ); jQuery('#loader_prev' ).css( { 'background-color' : '#009900' } ); jQuery('#track').val( '#FFFFFF'); UpdatePlayerPreview('track',jQuery('#track').val() ); jQuery('#track_prev' ).css( { 'background-color' : '#FFFFFF' } ); jQuery('#tracker').val( '#DDDDDD'); UpdatePlayerPreview('tracker',jQuery('#tracker').val() ); jQuery('#tracker_prev' ).css( { 'background-color' : '#DDDDDD' } ); jQuery('#player_border').val( '#CCCCCC'); UpdatePlayerPreview('player_border',jQuery('#player_border').val() ); jQuery('#player_border_prev' ).css( { 'background-color' : '#CCCCCC' } ); jQuery('#skip').val( '#666666'); UpdatePlayerPreview('skip',jQuery('#skip').val() ); jQuery('#skip_prev' ).css( { 'background-color' : '#666666' } ); jQuery('#text').val( '#333333'); UpdatePlayerPreview('text',jQuery('#text').val() ); jQuery('#text_prev' ).css( { 'background-color' : '#333333' } ); jQuery('#pagebg').val( ''); UpdatePlayerPreview('pagebg',jQuery('#pagebg').val() ); jQuery('#animation').val( 'yes'); UpdatePlayerPreview('animation',jQuery('#animation').val() ); jQuery('#remaining').val( 'no'); UpdatePlayerPreview('remaining',jQuery('#remaining').val() ); jQuery('#buffer').val( ''); UpdatePlayerPreview('buffer',jQuery('#buffer').val() ); jQuery('#rtl' ).val( 'no' ); UpdatePlayerPreview('rtl',jQuery('#rtl').val() ); jQuery('#initialvolume').val('60'); UpdatePlayerPreview('initialvolume',jQuery('#initialvolume').val() ); update_audio_player(); } } //--> </script> <input type="hidden" name="action" value="powerpress-audio-player" /> <?php echo __('Configure the 1 pixel out Audio Player', 'powerpress'); ?> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td><div id="player_preview"> <?php echo powerpressplayer_build_1pxoutplayer($Audio['audio-player'], array('nodiv' => true)); ?> </div> </td> </tr> </table> <div id="powerpress_settings_page" class="powerpress_tabbed_content" style="position: relative;"> <div style="position: absolute; top: 6px; right:0px;"> <a href="#" onclick="audio_player_defaults();return false;"><?php echo __('Set Defaults', 'powerpress'); ?> </a> </div> <ul class="powerpress_settings_tabs"> <li><a href="#tab_general"><span><?php echo __('Basic Settings', 'powerpress'); ?> </span></a></li> <li><a href="#tab_progress"><span><?php echo __('Progress Bar', 'powerpress'); ?> </span></a></li> <li><a href="#tab_volume"><span><?php echo __('Volume Button', 'powerpress'); ?> </span></a></li> <li><a href="#tab_play"><span><?php echo __('Play / Pause Button', 'powerpress'); ?> </span></a></li> </ul> <div id="tab_general" class="powerpress_tab"> <h3><?php echo __('General Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Page Background Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="pagebg" name="Player[pagebg]" class="color_field" value="<?php echo $PlayerSettings['pagebg']; ?> " maxlength="20" /> <img id="pagebg_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['pagebg']; ?> ;" class="color_preview" /> </div> <small>(<?php echo __('leave blank for transparent', 'powerpress'); ?> )</small> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Background Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="bg" name="Player[bg]" class="color_field" value="<?php echo $PlayerSettings['bg']; ?> " maxlength="20" /> <img id="bg_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bg']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Width (in pixels)', 'powerpress'); ?> </th> <td> <input type="text" style="width: 50px;" id="player_width" name="Player[width]" class="other_field" value="<?php echo $PlayerSettings['width']; ?> " maxlength="20" /> <?php echo __('width of the player. e.g. 290 (290 pixels) or 100%', 'powerpress'); ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Right-to-Left', 'powerpress'); ?> </th> <td> <select style="width: 102px;" id="rtl" name="Player[rtl]" class="other_field"> <?php $options = array('yes' => __('Yes', 'powerpress'), 'no' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['rtl']); ?> </select> <?php echo __('switches the layout to animate from the right to the left', 'powerpress'); ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Loading Bar Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="loader" name="Player[loader]" class="color_field" value="<?php echo $PlayerSettings['loader']; ?> " maxlength="20" /> <img id="loader_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['loader']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Text Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="text" name="Player[text]" class="color_field" value="<?php echo $PlayerSettings['text']; ?> " maxlength="20" /> <img id="text_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['text']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Text In Player', 'powerpress'); ?> </th> <td> <div><input type="text" style="width: 60%;" id="titles" name="Player[titles]" class="other_field" value="<?php echo $PlayerSettings['titles']; ?> " maxlength="100" /></div> <small><?php echo sprintf(__('Enter \'%s\' to display track name from mp3. Only works if media is hosted on same server as blog.', 'powerpress'), __('TRACK', 'powerpress')); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Play Animation', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 102px;" id="animation" name="Player[animation]" class="other_field"> <?php $options = array('yes' => __('Yes', 'powerpress'), 'no' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['animation']); ?> </select> <?php echo __('if no, player is always open', 'powerpress'); ?> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Display Remaining Time', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 102px;" id="remaining" name="Player[remaining]" class="other_field"> <?php $options = array('yes' => __('Yes', 'powerpress'), 'no' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['remaining']); ?> </select> <?php echo __('if yes, shows remaining track time rather than elapsed time (default: no)', 'powerpress'); ?> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Buffering Time', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 200px;" id="buffer" name="Player[buffer]" class="other_field"> <?php $options = array('0' => __('No buffering', 'powerpress'), '' => __('Default (5 seconds)', 'powerpress'), '10' => __('10 seconds', 'powerpress'), '15' => __('15 seconds', 'powerpress'), '20' => __('20 seconds', 'powerpress'), '30' => __('30 seconds', 'powerpress'), '60' => __('60 seconds', 'powerpress')); powerpress_print_options($options, $PlayerSettings['buffer']); ?> </select> <?php echo __('buffering time in seconds', 'powerpress'); ?> </div> </td> </tr> </table> </div> <div id="tab_progress" class="powerpress_tab"> <h3><?php echo __('Progress Bar', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Progress Bar Background', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="track" name="Player[track]" class="color_field" value="<?php echo $PlayerSettings['track']; ?> " maxlength="20" /> <img id="track_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['track']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Progress Bar Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="tracker" name="Player[tracker]" class="color_field" value="<?php echo $PlayerSettings['tracker']; ?> " maxlength="20" /> <img id="tracker_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['tracker']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Progress Bar Border', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="player_border" name="Player[border]" class="color_field" value="<?php echo $PlayerSettings['border']; ?> " maxlength="20" /> <img id="player_border_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['border']; ?> ;" class="color_preview" /> </div> </td> </tr> </table> </div> <div id="tab_volume" class="powerpress_tab"> <h3><?php echo __('Volume Button Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Initial Volume', 'powerpress'); ?> </th> <td> <select style="width: 100px;" id="initialvolume" name="Player[initialvolume]" class="other_field"> <?php for ($x = 0; $x <= 100; $x += 5) { echo '<option value="' . $x . '"' . ($PlayerSettings['initialvolume'] == $x ? ' selected' : '') . '>' . $x . '%</option>'; } ?> </select> <?php echo __('initial volume level (default: 60)', 'powerpress'); ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Volumn Background Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="leftbg" name="Player[leftbg]" class="color_field" value="<?php echo $PlayerSettings['leftbg']; ?> " maxlength="20" /> <img id="leftbg_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['leftbg']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Speaker Icon Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="lefticon" name="Player[lefticon]" class="color_field" value="<?php echo $PlayerSettings['lefticon']; ?> " maxlength="20" /> <img id="lefticon_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['lefticon']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Volume Icon Background', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="voltrack" name="Player[voltrack]" class="color_field" value="<?php echo $PlayerSettings['voltrack']; ?> " maxlength="20" /> <img id="voltrack_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['voltrack']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Volume Slider Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="volslider" name="Player[volslider]" class="color_field" value="<?php echo $PlayerSettings['volslider']; ?> " maxlength="20" /> <img id="volslider_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['volslider']; ?> ;" class="color_preview" /> </div> </td> </tr> </table> </div> <div id="tab_play" class="powerpress_tab"> <h3><?php echo __('Play / Pause Button Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Play/Pause Background Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="rightbg" name="Player[rightbg]" class="color_field" value="<?php echo $PlayerSettings['rightbg']; ?> " maxlength="20" /> <img id="rightbg_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['rightbg']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Play/Pause Hover Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="rightbghover" name="Player[rightbghover]" class="color_field" value="<?php echo $PlayerSettings['rightbghover']; ?> " maxlength="20" /> <img id="rightbghover_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['rightbghover']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Play/Pause Icon Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="righticon" name="Player[righticon]" class="color_field" value="<?php echo $PlayerSettings['righticon']; ?> " maxlength="20" /> <img id="righticon_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['righticon']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Play/Pause Icon Hover Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="righticonhover" name="Player[righticonhover]" class="color_field" value="<?php echo $PlayerSettings['righticonhover']; ?> " maxlength="20" /> <img id="righticonhover_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['righticonhover']; ?> ;" class="color_preview" /> </div> </td> </tr> </table> </div> <!-- end tab --> </div> <!-- end tab wrapper --> <?php break; case 'simple_flash': ?> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td><p> <?php // TODO echo powerpressplayer_build_simpleflash($Audio['simple_flash']); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"> </th> <td> <p><?php echo __('Simple Flash Player has no additional settings.', 'powerpress'); ?> </p> </td> </tr> </table> <?php break; case 'flashmp3-maxi': //get settings for Flash MP3 Maxi player $PlayerSettings = powerpress_get_settings('powerpress_flashmp3-maxi'); //set array values for dropdown lists $autoload = array('always' => 'Always', 'never' => 'Never', 'autohide' => 'Auto Hide'); $volume = array('0' => '0', '25' => '25', '50' => '50', '75' => '75', '100' => '100', '125' => '125', '150' => '150', '175' => '175', '200' => '200'); //set PlayerSettings as blank array for initial setup //This keeps the foreach loop from returning an error if (empty($PlayerSettings)) { $PlayerSettings = array('bgcolor1' => '#7c7c7c', 'bgcolor2' => '#333333', 'bgcolor' => '', 'textcolor' => '#FFFFFF', 'buttoncolor' => '#FFFFFF', 'buttonovercolor' => '#FFFF00', 'showstop' => '0', 'showinfo' => '0', 'showvolume' => '1', 'height' => '20', 'width' => '200', 'showloading' => 'autohide', 'buttonwidth' => '26', 'volume' => '100', 'showslider' => '1', 'slidercolor1' => '#cccccc', 'slidercolor2' => '#888888', 'sliderheight' => '10', 'sliderwidth' => '20', 'loadingcolor' => '#FFFF00', 'volumeheight' => '6', 'volumewidth' => '30', 'sliderovercolor' => '#eeee00'); } ?> <script type="text/javascript"><!-- function audio_player_defaults() { if( confirm('<?php echo __("Set defaults, are you sure?\\n\\nAll of the current settings will be overwritten!'", 'powerpress'); ?> ) ) { jQuery('#bgcolor1').val('#7c7c7c'); UpdatePlayerPreview('bgcolor1',jQuery('#bgcolor1').val() ); jQuery('#bgcolor1_prev' ).css( { 'background-color' : '#7c7c7c' } ); jQuery('#bgcolor2').val('#333333' ); UpdatePlayerPreview('bgcolor2',jQuery('#bgcolor2').val() ); jQuery('#bgcolor2_prev' ).css( { 'background-color' : '#333333' } ); jQuery('#textcolor' ).val( '#FFFFFF' ); UpdatePlayerPreview('textcolor',jQuery('#textcolor').val() ); jQuery('#textcolor_prev' ).css( { 'background-color' : '#FFFFFF' } ); jQuery('#buttoncolor' ).val( '#FFFFFF' ); UpdatePlayerPreview('buttoncolor',jQuery('#buttoncolor').val() ); jQuery('#buttoncolor_prev' ).css( { 'background-color' : '#FFFFFF' } ); jQuery('#buttonovercolor' ).val( '#FFFF00' ); UpdatePlayerPreview('buttonovercolor',jQuery('#buttonovercolor').val() ); jQuery('#buttonovercolor_prev' ).css( { 'background-color' : '#FFFF00' } ); jQuery('#showstop' ).val( '0' ); UpdatePlayerPreview('showstop',jQuery('#showstop').val() ); jQuery('#showinfo' ).val( '0' ); UpdatePlayerPreview('showinfo',jQuery('#showinfo').val() ); jQuery('#showvolume' ).val( '1' ); UpdatePlayerPreview('showvolume',jQuery('#showvolume').val() ); jQuery('#player_height' ).val( '20' ); UpdatePlayerPreview('height',jQuery('#player_height').val() ); jQuery('#player_width' ).val( '200' ); UpdatePlayerPreview('width',jQuery('#player_width').val() ); jQuery('#showloading' ).val( 'autohide' ); UpdatePlayerPreview('showloading',jQuery('#showloading').val() ); jQuery('#slidercolor1').val('#cccccc' ); UpdatePlayerPreview('slidercolor1',jQuery('#slidercolor1').val() ); jQuery('#slidercolor1_prev' ).css( { 'background-color' : '#cccccc' } ); jQuery('#slidercolor2').val('#888888' ); UpdatePlayerPreview('slidercolor2',jQuery('#slidercolor2').val() ); jQuery('#slidercolor2_prev' ).css( { 'background-color' : '#888888' } ); jQuery('#sliderheight' ).val( '10' ); UpdatePlayerPreview('sliderheight',jQuery('#sliderheight').val() ); jQuery('#sliderwidth' ).val( '20' ); UpdatePlayerPreview('sliderwidth',jQuery('#sliderwidth').val() ); jQuery('#loadingcolor' ).val( '#FFFF00' ); UpdatePlayerPreview('loadingcolor',jQuery('#loadingcolor').val() ); jQuery('#loadingcolor_prev' ).css( { 'background-color' : '#FFFF00' } ); jQuery('#bgcolor').val(''); UpdatePlayerPreview('bgcolor',jQuery('#bgcolor').val() ); jQuery('#bgcolor_prev' ).css( { 'background-color' : '' } ); jQuery('#volumeheight' ).val( '6' ); UpdatePlayerPreview('volumeheight',jQuery('#volumeheight').val() ); jQuery('#volumewidth' ).val( '30' ); UpdatePlayerPreview('volumewidth',jQuery('#volumewidth').val() ); jQuery('#sliderovercolor' ).val( '#eeee00' ); UpdatePlayerPreview('sliderovercolor',jQuery('#sliderovercolor').val() ); jQuery('#sliderovercolor_prev' ).css( { 'background-color' : '#eeee00' } ); jQuery('#volume' ).val( '100' ); UpdatePlayerPreview('volume',jQuery('#volume').val() ); jQuery('#showslider' ).val( '1' ); UpdatePlayerPreview('showslider',jQuery('#showslider').val() ); jQuery('#buttonwidth' ).val( '26' ); UpdatePlayerPreview('buttonwidth',jQuery('#buttonwidth').val() ); //update_audio_player(); generator.updatePlayer(); } } //--> </script> <input type="hidden" name="action" value="powerpress-flashmp3-maxi" /> <p><?php echo __('Configure Flash Mp3 Maxi Player', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <div id="player_preview"></div> <script type="text/javascript" src="<?php echo powerpress_get_root_url(); ?> 3rdparty/maxi_player/generator.js"></script> <input type="hidden" id="gen_mp3" name="gen_mp3" value="<?php echo $Audio['flashmp3-maxi']; ?> " /> </td> </tr> </table> <div id="powerpress_settings_page" class="powerpress_tabbed_content" style="position: relative;"> <div style="position: absolute; top: 6px; right:0px;"> <a href="#" onclick="audio_player_defaults();return false;"><?php echo __('Set Defaults', 'powerpress'); ?> </a> </div> <ul class="powerpress_settings_tabs"> <li><a href="#tab_general"><span><?php echo __('Basic Settings', 'powerpress'); ?> </span></a></li> <li><a href="#tab_buttons"><span><?php echo __('Button Settings', 'powerpress'); ?> </span></a></li> <li><a href="#tab_volume"><span><?php echo __('Volume Settings', 'powerpress'); ?> </span></a></li> <li><a href="#tab_slider"><span><?php echo __('Slider Settings', 'powerpress'); ?> </span></a></li> </ul> <div id="tab_general" class="powerpress_tab"> <h3><?php echo __('General Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <td colspan="2"> <?php echo __('leave blank for default values', 'powerpress'); ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Gradient Color Top', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="bgcolor1" name="Player[bgcolor1]" class="color_field" value="<?php echo $PlayerSettings['bgcolor1']; ?> " maxlength="20" /> <img id="bgcolor1_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor1']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Gradient Color Bottom', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="bgcolor2" name="Player[bgcolor2]" class="color_field" value="<?php echo $PlayerSettings['bgcolor2']; ?> " maxlength="20" /> <img id="bgcolor2_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor2']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Background Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="bgcolor" name="Player[bgcolor]" class="color_field" value="<?php echo $PlayerSettings['bgcolor']; ?> " maxlength="20" /> <img id="bgcolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor']; ?> ;" class="color_preview" /> </div> <small><?php echo __('leave blank for transparent', 'powerpress'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Text Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="textcolor" name="Player[textcolor]" class="color_field" value="<?php echo $PlayerSettings['textcolor']; ?> " maxlength="20" /> <img id="textcolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['textcolor']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Height (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="player_height" name="Player[height]" value="<?php echo $PlayerSettings['height']; ?> " maxlength="20" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Width (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="player_width" name="Player[width]" value="<?php echo $PlayerSettings['width']; ?> " maxlength="20" /> </div> </td> </tr> </table> </div> <div id="tab_buttons" class="powerpress_tab"> <h3><?php echo __('Button Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Button Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="buttoncolor" name="Player[buttoncolor]" class="color_field" value="<?php echo $PlayerSettings['buttoncolor']; ?> " maxlength="20" /> <img id="buttoncolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['buttoncolor']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Button Hover Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="buttonovercolor" name="Player[buttonovercolor]" class="color_field" value="<?php echo $PlayerSettings['buttonovercolor']; ?> " maxlength="20" /> <img id="buttonovercolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['buttonovercolor']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Button Width (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="buttonwidth" name="Player[buttonwidth]" value="<?php echo $PlayerSettings['buttonwidth']; ?> " maxlength="20" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Show Stop Button', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 100px;" id="showstop" name="Player[showstop]"> <?php $options = array('1' => __('Yes', 'powerpress'), '0' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['showstop']); ?> </select> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Show Info', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 100px;" id="showinfo" name="Player[showinfo]"> <?php $options = array('1' => __('Yes', 'powerpress'), '0' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['showinfo']); ?> </select> </div> </td> </tr> </table> </div> <div id="tab_volume" class="powerpress_tab"> <h3><?php echo __('Volume Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Show Volume', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 100px;" id="showvolume" name="Player[showvolume]"> <?php $options = array('1' => __('Yes', 'powerpress'), '0' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['showvolume']); ?> </select> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Volume', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 100px;" id="volume" name="Player[volume]"> <?php powerpress_print_options($volume, $PlayerSettings['volume']); ?> </select> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Volume Height (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="volumeheight" name="Player[volumeheight]" value="<?php echo $PlayerSettings['volumeheight']; ?> " maxlength="20" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Volume Width (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="volumewidth" name="Player[volumewidth]" value="<?php echo $PlayerSettings['volumewidth']; ?> " maxlength="20" /> </div> </td> </tr> </table> </div> <div id="tab_slider" class="powerpress_tab"> <h3><?php echo __('Slider Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Show Slider', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 100px;" id="showslider" name="Player[showslider]"> <?php $options = array('1' => __('Yes', 'powerpress'), '0' => __('No', 'powerpress')); powerpress_print_options($options, $PlayerSettings['showslider']); ?> </select> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Slider Color Top', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="slidercolor1" name="Player[slidercolor1]" class="color_field" value="<?php echo $PlayerSettings['slidercolor1']; ?> " maxlength="20" /> <img id="slidercolor1_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['slidercolor1']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Slider Color Bottom', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="slidercolor2" name="Player[slidercolor2]" class="color_field" value="<?php echo $PlayerSettings['slidercolor2']; ?> " maxlength="20" /> <img id="slidercolor2_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['slidercolor2']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Slider Hover Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="sliderovercolor" name="Player[sliderovercolor]" class="color_field" value="<?php echo $PlayerSettings['sliderovercolor']; ?> " maxlength="20" /> <img id="sliderovercolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['sliderovercolor']; ?> ;" class="color_preview" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Slider Height (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="sliderheight" name="Player[sliderheight]" value="<?php echo $PlayerSettings['sliderheight']; ?> " maxlength="20" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Slider Width (in pixels)', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 50px;" id="sliderwidth" name="Player[sliderwidth]" value="<?php echo $PlayerSettings['sliderwidth']; ?> " maxlength="20" /> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Show Loading Buffer', 'powerpress'); ?> </th> <td> <div class="color_control"> <select style="width: 100px;" id="showloading" name="Player[showloading]"> <?php powerpress_print_options($autoload, $PlayerSettings['showloading']); ?> </select> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Loading Buffer Color', 'powerpress'); ?> </th> <td> <div class="color_control"> <input type="text" style="width: 100px;" id="loadingcolor" name="Player[loadingcolor]" class="color_field" value="<?php echo $PlayerSettings['loadingcolor']; ?> " maxlength="20" /> <img id="loadingcolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['loadingcolor']; ?> ;" class="color_preview" /> </div> </td> </tr> </table> </div> <!-- end tab --> </div><!-- end tab container --> <script type="text/javascript"><!-- generator.player = '<?php echo powerpress_get_root_url(); ?> player_mp3_maxi.swf'; generator.addParam("gen_mp3", "mp3", "url", ''); generator.addParam("player_height", "height", "int", "20"); generator.addParam("player_width", "width", "int", "200"); generator.addParam("bgcolor1", "bgcolor1", "color", "#7c7c7c"); generator.addParam("bgcolor2", "bgcolor2", "color", "#333333"); generator.addParam("bgcolor", "bgcolor", "color", ""); generator.addParam("textcolor", "textcolor", "color", "#FFFFFF"); generator.addParam("loadingcolor", "loadingcolor", "color", "#FFFF00"); generator.addParam("buttoncolor", "buttoncolor", "color", "#FFFFFF"); generator.addParam("buttonovercolor", "buttonovercolor", "color", "#FFFF00"); generator.addParam("showloading", "showloading", "text", "autohide"); generator.addParam("showinfo", "showinfo", "bool", "0"); generator.addParam("showstop", "showstop", "int", "0"); generator.addParam("showvolume", "showvolume", "int", "0"); generator.addParam("buttonwidth", "buttonwidth", "int", "26"); generator.addParam("volume", "volume", "int", "100"); generator.addParam("volumeheight", "volumeheight", "int", "6"); generator.addParam("volumewidth", "volumewidth", "int", "30"); generator.addParam("sliderovercolor", "sliderovercolor", "color", "#eeee00"); generator.addParam("showslider", "showslider", "bool", "1"); generator.addParam("slidercolor1", "slidercolor1", "color", "#cccccc"); generator.addParam("slidercolor2", "slidercolor2", "color", "#888888"); generator.addParam("sliderheight", "sliderheight", "int", "10"); generator.addParam("sliderwidth", "sliderwidth", "int", "20"); generator.updatePlayer(); //--> </script> <?php break; case 'audioplay': $PlayerSettings = powerpress_get_settings('powerpress_audioplay'); if (empty($PlayerSettings)) { $PlayerSettings = array('bgcolor' => '', 'buttondir' => 'negative', 'mode' => 'playpause'); } ?> <input type="hidden" name="action" value="powerpress-audioplay" /> <?php echo __('Configure the AudioPlay Player', 'powerpress'); ?> <br clear="all" /> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td colspan="2"> <div id="player_preview"> <?php echo powerpressplayer_build_audioplay($Audio['audioplay']); ?> </div> </td> </tr> </table> <h2><?php echo __('General Settings', 'powerpress'); ?> </h2> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Background Color', 'powerpress'); ?> </th> <td valign="top"> <div class="color_control"> <input type="text" style="width: 100px;" id="bgcolor" name="Player[bgcolor]" class="color_field" value="<?php echo $PlayerSettings['bgcolor']; ?> " maxlength="20" /> <img id="bgcolor_prev" src="<?php echo powerpress_get_root_url(); ?> images/color_preview.gif" width="14" height="14" style="background-color: <?php echo $PlayerSettings['bgcolor']; ?> ;" class="color_preview" /> </div> <small><?php echo __('leave blank for transparent', 'powerpress'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Mode', 'powerpress'); ?> </th> <td valign="top"> <div class="color_control"> <select name="Player[mode]" id="mode"> <?php $options = array('playpause' => __('Play/Pause', 'powerpress'), 'playstop' => __('Play/Stop', 'powerpress')); powerpress_print_options($options, $PlayerSettings['mode']); ?> </select> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Button', 'powerpress'); ?> </th> <td valign="top"> <div class="color_control"> <table cellpadding="0" cellspacing="0"> <?php $options = array('classic', 'classic_small', 'negative', 'negative_small'); foreach ($options as $option) { if ($PlayerSettings['buttondir'] == $option) { $selected = " CHECKED"; } else { $selected = ""; } if ($option == "classic" || $option == "classic_small") { $td = '<td style="background: #999;" align="center">'; $warning = "(ideal for dark backgrounds)"; if ($option == "classic_small") { $name = __('Small White', 'powerpress'); } else { $name = __('Large White', 'powerpress'); } } else { $td = '<td align="center">'; $warning = ""; if ($option == "negative_small") { $name = __('Small Black', 'powerpress'); } else { $name = __('Large Black', 'powerpress'); } } echo '<tr><td><input type="radio" name="Player[buttondir]" value="' . $option . '"' . $selected . ' /></td>' . $td . '<img src="' . powerpress_get_root_url() . 'buttons/' . $option . '/playup.png" /></td><td>' . $name . ' Button ' . $warning . '</td></tr>'; } ?> </table> </div> </td> </tr> </table> <?php break; case 'html5audio': $SupportUploads = powerpressadmin_support_uploads(); ?> <p><?php echo __('Configure HTML5 Audio Player', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <p> <?php echo powerpressplayer_build_html5audio($Audio['default']); ?> </p> </td> </tr> <tr> <th scope="row"> <?php echo __('Play Icon', 'powerpress'); ?> </th> <td> <input type="text" id="audio_custom_play_button" name="General[audio_custom_play_button]" style="width: 60%;" value="<?php echo $General['audio_custom_play_button']; ?> " maxlength="250" /> <a href="#" onclick="javascript: window.open( document.getElementById('audio_custom_play_button').value ); return false;"><?php echo __('preview', 'powerpress'); ?> </a> <p><?php echo __('Place the URL to the play icon above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> : http://example.com/images/audio_play_icon.jpg<br /><br /> <?php echo __('Leave blank to use default play icon image.', 'powerpress'); ?> </p> <?php if ($SupportUploads) { ?> <p><input name="audio_custom_play_button_checkbox" type="checkbox" onchange="powerpress_show_field('audio_custom_play_button_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> </p> <div style="display:none" id="audio_custom_play_button_upload"> <label for="audio_custom_play_button_file"><?php echo __('Choose file', 'powerpress'); ?> :</label><input type="file" name="audio_custom_play_button_file" /> </div> <?php } ?> </td> </tr> </table> <?php break; case 'mediaelement-audio': $SupportUploads = powerpressadmin_support_uploads(); // TODO! ?> <p><?php echo __('Configure MediaElement.js Audio Player', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td><p> <?php // TODO echo powerpressplayer_build_mediaelementaudio($Audio['mediaelement-audio']); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"> </th> <td> <p><?php echo __('MediaElement.js Player has no additional settings at this time.', 'powerpress'); ?> </p> </td> </tr> </table> <?php break; default: if (empty($General['player_width_audio'])) { $General['player_width_audio'] = ''; } ?> <p><?php echo __('Configure Flow Player Classic', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <p> <?php echo powerpressplayer_build_flowplayerclassic($Audio['default']); ?> </p> </td> </tr> </table> <h2><?php echo __('General Settings', 'powerpress'); ?> </h2> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Width', 'powerpress'); ?> </th> <td valign="top"> <input type="text" style="width: 50px;" id="player_width" name="General[player_width_audio]" class="player-width" value="<?php echo $General['player_width_audio']; ?> " maxlength="4" /> <?php echo __('Width of Audio mp3 player (leave blank for 320 default)', 'powerpress'); ?> </td> </tr> </table> <?php break; } } else { switch ($General['video_player']) { case 'flow-player-classic': ?> <p><?php echo __('Configure Flow Player Classic', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <p> <?php echo powerpressplayer_build_flowplayerclassic($Video['flow-player-classic']); ?> </p> </td> </tr> </table> <?php break; case 'html5video': ?> <p><?php echo __('Configure HTML5 Video Player', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <p> <?php echo powerpressplayer_build_html5video($Video['html5video']); ?> </p> </td> </tr> </table> <?php break; case 'videojs-html5-video-player-for-wordpress': ?> <p><?php echo __('Configure VideoJS', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <p> <?php echo powerpressplayer_build_videojs($Video['videojs-html5-video-player-for-wordpress']); ?> </p> </td> </tr> </table> <h3><?php echo __('VideoJS Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('VideoJS CSS Class', 'powerpress'); ?> </th> <td> <p> <input type="text" name="General[videojs_css_class]" style="width: 150px;" value="<?php echo empty($General['videojs_css_class']) ? '' : htmlspecialchars($General['videojs_css_class']); ?> " /> <?php echo __('Apply specific CSS styling to your Video JS player.', 'powerpress'); ?> </p> </td> </tr> </table> <?php break; case 'mediaelement-video': ?> <p><?php echo __('Configure MediaElement.js Video Player', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Preview of Player', 'powerpress'); ?> </th> <td> <p> <?php echo powerpressplayer_build_mediaelementvideo($Video['mediaelement-video']); ?> </p> </td> </tr> </table> <?php break; } if (!isset($General['poster_play_image'])) { $General['poster_play_image'] = 1; } if (!isset($General['poster_image_audio'])) { $General['poster_image_audio'] = 0; } if (!isset($General['player_width'])) { $General['player_width'] = ''; } if (!isset($General['player_height'])) { $General['player_height'] = ''; } if (!isset($General['poster_image'])) { $General['poster_image'] = ''; } if (!isset($General['video_custom_play_button'])) { $General['video_custom_play_button'] = ''; } ?> <!-- Global Video Player settings (Appy to all video players --> <input type="hidden" name="action" value="powerpress-save-videocommon" /> <h3><?php echo __('Common Settings', 'powerpress'); ?> </h3> <p><?php echo __('The following video settings apply to the video player above as well as to classic video <embed> formats such as Microsoft Windows Media (.wmv), QuickTime (.mov) and RealPlayer.', 'powerpress'); ?> </p> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Player Width', 'powerpress'); ?> </th> <td> <input type="text" name="General[player_width]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9%]/g, '');" value="<?php echo $General['player_width']; ?> " maxlength="4" /> <?php echo __('Width of player (leave blank for 400 default)', 'powerpress'); ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Player Height', 'powerpress'); ?> </th> <td> <input type="text" name="General[player_height]" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9%]/g, '');" value="<?php echo $General['player_height']; ?> " maxlength="4" /> <?php echo __('Height of player (leave blank for 225 default)', 'powerpress'); ?> </td> </tr> <?php $SupportUploads = powerpressadmin_support_uploads(); // Play icon, only applicable to HTML5/FlowPlayerClassic if (in_array($General['video_player'], array('flow-player-classic', 'html5video'))) { ?> <tr valign="top"> <th scope="row"> <?php echo __('QuickTime Scale', 'powerpress'); ?> </th> <td> <select name="General[player_scale]" class="bpp_input_sm" onchange="javascript:jQuery('#player_scale_custom').css('display', (this.value=='tofit'||this.value=='aspect'? 'none':'inline' ))"> <?php $scale_options = array('tofit' => __('ToFit (default)', 'powerpress'), 'aspect' => __('Aspect', 'powerpress')); if (!isset($General['player_scale'])) { $General['player_scale'] = 'tofit'; } // Tofit works in almost all cases if (is_numeric($General['player_scale'])) { $scale_options[$General['player_scale']] = __('Custom', 'powerpress'); } else { $scale_options['custom'] = __('Custom', 'powerpress'); } while (list($value, $desc) = each($scale_options)) { echo "\t<option value=\"{$value}\"" . ($General['player_scale'] == $value ? ' selected' : '') . ">{$desc}</option>\n"; } ?> </select> <span id="player_scale_custom" style="display: <?php echo is_numeric($General['player_scale']) ? 'inline' : 'none'; ?> "> <?php echo __('Scale:', 'powerpress'); ?> <input type="text" name="PlayerScaleCustom" style="width: 50px;" onkeyup="javascript:this.value=this.value.replace(/[^0-9.]/g, '');" value="<?php echo is_numeric($General['player_scale']) ? $General['player_scale'] : ''; ?> " maxlength="4" /> <?php echo __('e.g.', 'powerpress'); ?> 1.5 </span> <p style="margin-top: 5px; margin-bottom: 0;"> <?php echo __('If you do not see video, adjust the width, height and scale settings above.', 'powerpress'); ?> </p> </td> </tr> <?php } ?> <tr> <th scope="row"> <?php echo __('Default Poster Image', 'powerpress'); ?> </th> <td> <input type="text" id="poster_image" name="General[poster_image]" style="width: 60%;" value="<?php echo $General['poster_image']; ?> " maxlength="250" /> <a href="#" onclick="javascript: window.open( document.getElementById('poster_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?> </a> <p><?php echo __('Place the URL to the poster image above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> : http://example.com/images/poster.jpg<br /><br /> <?php echo __('Image should be at minimum the same width/height as the player above. Leave blank to use default black background image.', 'powerpress'); ?> </p> <?php if ($SupportUploads) { ?> <p><input name="poster_image_checkbox" type="checkbox" onchange="powerpress_show_field('poster_image_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> </p> <div style="display:none" id="poster_image_upload"> <label for="poster_image_file"><?php echo __('Choose file', 'powerpress'); ?> :</label><input type="file" name="poster_image_file" /> </div> <?php } if (in_array($General['video_player'], array('flow-player-classic', 'html5video'))) { ?> <p><input name="General[poster_play_image]" type="checkbox" value="1" <?php echo $General['poster_play_image'] ? 'checked' : ''; ?> /> <?php echo __('Include play icon over poster image when applicable', 'powerpress'); ?> </p> <p><input name="General[poster_image_audio]" type="checkbox" value="1" <?php echo $General['poster_image_audio'] ? 'checked' : ''; ?> /> <?php echo __('Use poster image, player width and height above for audio (Flow Player only)', 'powerpress'); ?> </p> <?php } ?> </td> </tr> <?php // Play icon, only applicable to HTML5/FlowPlayerClassic if (in_array($General['video_player'], array('flow-player-classic', 'html5video'))) { ?> <tr> <th scope="row"> <?php echo __('Play Icon', 'powerpress'); ?> </th> <td> <input type="text" id="video_custom_play_button" name="General[video_custom_play_button]" style="width: 60%;" value="<?php echo $General['video_custom_play_button']; ?> " maxlength="250" /> <a href="#" onclick="javascript: window.open( document.getElementById('video_custom_play_button').value ); return false;"><?php echo __('preview', 'powerpress'); ?> </a> <p><?php echo __('Place the URL to the play icon above.', 'powerpress'); ?> <?php echo __('Example', 'powerpress'); ?> : http://example.com/images/video_play_icon.jpg<br /><br /> <?php echo __('Image should 60 pixels by 60 pixels. Leave blank to use default play icon image.', 'powerpress'); ?> </p> <?php if ($SupportUploads) { ?> <p><input name="video_custom_play_button_checkbox" type="checkbox" onchange="powerpress_show_field('video_custom_play_button_upload', this.checked)" value="1" /> <?php echo __('Upload new image', 'powerpress'); ?> </p> <div style="display:none" id="video_custom_play_button_upload"> <label for="video_custom_play_button_file"><?php echo __('Choose file', 'powerpress'); ?> :</label><input type="file" name="video_custom_play_button_file" /> </div> <?php } ?> </td> </tr> <?php } ?> </table> <?php } ?> <?php } }
function powerpress_admin_menu() { $Powerpress = get_option('powerpress_general'); if (defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION')) { // CRAP } else { if (empty($Powerpress['use_caps']) || current_user_can('edit_podcast')) { // Otherwise we're using a version of wordpress that is not supported. require_once POWERPRESS_ABSPATH . '/powerpressadmin-metabox.php'; $FeedSlugPostTypesArray = array(); if (!empty($Powerpress['posttype_podcasting'])) { $FeedSlugPostTypesArray = get_option('powerpress_posttype-podcasting'); if (empty($FeedSlugPostTypesArray)) { $FeedSlugPostTypesArray = array(); } } if (!defined('POWERPRESS_POST_TYPES')) { $page_types = array('page'); // Only apply to default pages if (empty($Powerpress['posttype_podcasting'])) { $page_types = powerpress_admin_get_post_types('page'); } // Get pages by capability type while (list($null, $page_type) = each($page_types)) { if (empty($FeedSlugPostTypesArray['podcast'][$page_type])) { add_meta_box('powerpress-podcast', __('Podcast Episode', 'powerpress'), 'powerpress_meta_box', $page_type, 'normal'); } } $post_types = array('post'); // Only apply to default posts if (empty($Powerpress['posttype_podcasting'])) { $post_types = powerpress_admin_get_post_types('post'); } // Get pages by capability type } else { $post_type_string = str_replace(' ', '', POWERPRESS_POST_TYPES); // Get all the spaces out $post_types = explode(',', $post_type_string); } if (!empty($Powerpress['posttype_podcasting'])) { add_meta_box('powerpress-podcast', __('Podcast Episode (default)', 'powerpress'), 'powerpress_meta_box', 'post', 'normal'); // Default podcast box for post type 'post' $FeedSlugPostTypesArray = get_option('powerpress_posttype-podcasting'); if (empty($FeedSlugPostTypesArray)) { $FeedSlugPostTypesArray = array(); } while (list($feed_slug, $FeedSlugPostTypes) = each($FeedSlugPostTypesArray)) { while (list($post_type, $type_title) = each($FeedSlugPostTypes)) { if ($feed_slug != 'podcast' || $post_type != 'post') { $feed_title = $type_title; if (empty($feed_title)) { $feed_title = $feed_slug; } //echo (" $feed_slug "); add_meta_box('powerpress-' . $feed_slug, __('Podcast Episode', 'powerpress') . ': ' . $feed_title, 'powerpress_meta_box', $post_type, 'normal'); } } } } if (isset($Powerpress['custom_feeds'])) { $FeedDefaultPodcast = get_option('powerpress_feed_podcast'); while (list($null, $post_type) = each($post_types)) { // Make sure this post type can edit the default podcast channel... if (!empty($FeedDefaultPodcast['custom_post_type']) && $FeedDefaultPodcast['custom_post_type'] != $post_type) { continue; } if (empty($FeedSlugPostTypesArray['podcast'][$post_type])) { add_meta_box('powerpress-podcast', __('Podcast Episode (default)', 'powerpress'), 'powerpress_meta_box', $post_type, 'normal'); } } while (list($feed_slug, $feed_title) = each($Powerpress['custom_feeds'])) { if ($feed_slug == 'podcast') { continue; } $FeedCustom = get_option('powerpress_feed_' . $feed_slug); $feed_slug = esc_attr($feed_slug); reset($post_types); while (list($null, $post_type) = each($post_types)) { // Make sure this post type can edit the default podcast channel... if (!empty($FeedCustom['custom_post_type']) && $FeedCustom['custom_post_type'] != $post_type) { continue; } if (empty($FeedSlugPostTypesArray[$feed_slug][$post_type])) { add_meta_box('powerpress-' . $feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') . ': ' . esc_attr($feed_title), 'powerpress_meta_box', $post_type, 'normal'); } } } reset($Powerpress['custom_feeds']); } else { reset($post_types); while (list($null, $post_type) = each($post_types)) { if (empty($FeedSlugPostTypesArray['podcast'][$post_type])) { add_meta_box('powerpress-podcast', __('Podcast Episode', 'powerpress'), 'powerpress_meta_box', $post_type, 'normal'); } } } // For custom compatibility type set: if (isset($Powerpress['custom_feeds']) && defined('POWERPRESS_CUSTOM_CAPABILITY_TYPE')) { $post_types = powerpress_admin_get_post_types(POWERPRESS_CUSTOM_CAPABILITY_TYPE); if (!empty($post_types)) { while (list($feed_slug, $feed_title) = each($Powerpress['custom_feeds'])) { if ($feed_slug == 'podcast') { continue; } $FeedCustom = get_option('powerpress_feed_' . $feed_slug); reset($post_types); while (list($null, $post_type) = each($post_types)) { if (!empty($FeedCustom['custom_post_type']) && $FeedCustom['custom_post_type'] != $post_type) { continue; } if (empty($FeedSlugPostTypesArray[$feed_slug][$post_type])) { add_meta_box('powerpress-' . $feed_slug, __('Podcast Episode for Custom Channel', 'powerpress') . ': ' . $feed_title, 'powerpress_meta_box', $post_type, 'normal'); } } } reset($Powerpress['custom_feeds']); } } } } if (current_user_can(POWERPRESS_CAPABILITY_MANAGE_OPTIONS)) { $Powerpress = powerpress_default_settings($Powerpress, 'basic'); if (isset($_GET['page']) && strstr($_GET['page'], 'powerpress') !== false && isset($_POST['General'])) { $ToBeSaved = $_POST['General']; if (isset($ToBeSaved['channels'])) { $Powerpress['channels'] = $ToBeSaved['channels']; } if (isset($ToBeSaved['cat_casting'])) { $Powerpress['cat_casting'] = $ToBeSaved['cat_casting']; } if (isset($ToBeSaved['taxonomy_podcasting'])) { $Powerpress['taxonomy_podcasting'] = $ToBeSaved['taxonomy_podcasting']; } if (isset($ToBeSaved['posttype_podcasting'])) { $Powerpress['posttype_podcasting'] = $ToBeSaved['posttype_podcasting']; } if (isset($ToBeSaved['podpress_stats'])) { $Powerpress['podpress_stats'] = $ToBeSaved['podpress_stats']; } if (isset($ToBeSaved['blubrry_hosting'])) { $Powerpress['blubrry_hosting'] = $ToBeSaved['blubrry_hosting']; } } add_menu_page(__('PowerPress', 'powerpress'), __('PowerPress', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_basic.php', 'powerpress_admin_page_basic', powerpress_get_root_url() . 'powerpress_ico.png'); add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Settings', 'powerpress'), __('Settings', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_basic.php', 'powerpress_admin_page_basic'); add_options_page(__('PowerPress', 'powerpress'), __('PowerPress', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_basic.php', 'powerpress_admin_page_basic'); add_submenu_page('powerpress/powerpressadmin_basic.php', __('Migrate to Blubrry Podcast Media Hosting', 'powerpress'), __('Migrate Media', 'powerpress') . ' ' . powerpressadmin_new('font-weight: bold; color: #ffffff;'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_migrate.php', 'powerpress_admin_page_migrate'); add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Podcasting SEO', 'powerpress'), '<span style="color:#f18500">' . __('Podcasting SEO', 'powerpress') . '</span> ' . powerpressadmin_new('font-weight: bold; color: #ffffff;') . '', POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_search.php', 'powerpress_admin_page_search'); add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Audio Player Options', 'powerpress'), __('Audio Player', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_player.php', 'powerpress_admin_page_players'); add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Video Player Options', 'powerpress'), __('Video Player', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_videoplayer.php', 'powerpress_admin_page_videoplayers'); // Coming soon, maybe PP 6.1 //add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Mobile Player Options', 'powerpress'), __('Mobile Player', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_mobileplayer.php', 'powerpress_admin_page_mobileplayers'); if (!empty($Powerpress['channels'])) { add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Custom Podcast Channels', 'powerpress'), __('Podcast Channels', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_customfeeds.php', 'powerpress_admin_page_customfeeds'); } if (!empty($Powerpress['cat_casting'])) { add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Category Podcasting', 'powerpress'), __('Category Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_categoryfeeds.php', 'powerpress_admin_page_categoryfeeds'); } if (defined('POWERPRESS_TAXONOMY_PODCASTING') || !empty($Powerpress['taxonomy_podcasting'])) { add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Taxonomy Podcasting', 'powerpress'), __('Taxonomy Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_taxonomyfeeds.php', 'powerpress_admin_page_taxonomyfeeds'); } if (defined('POWERPRESS_POSTTYPE_PODCASTING') || !empty($Powerpress['posttype_podcasting'])) { add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Post Type Podcasting', 'powerpress'), __('Post Type Podcasting', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_posttypefeeds.php', 'powerpress_admin_page_posttypefeeds'); } if (!empty($Powerpress['podpress_stats'])) { add_submenu_page('powerpress/powerpressadmin_basic.php', __('PodPress Stats', 'powerpress'), __('PodPress Stats', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_podpress-stats.php', 'powerpress_admin_page_podpress_stats'); } if (!empty($Powerpress['blubrry_hosting']) && $Powerpress['blubrry_hosting'] !== 'false') { add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress MP3 Tags', 'powerpress'), __('MP3 Tags', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_tags.php', 'powerpress_admin_page_tags'); } add_submenu_page('powerpress/powerpressadmin_basic.php', __('PowerPress Tools', 'powerpress'), __('Tools', 'powerpress'), POWERPRESS_CAPABILITY_EDIT_PAGES, 'powerpress/powerpressadmin_tools.php', 'powerpress_admin_page_tools'); } }
function powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs = array()) { $SupportUploads = powerpressadmin_support_uploads(); if (!isset($FeedSettings['posts_per_rss'])) { $FeedSettings['posts_per_rss'] = ''; } if (!isset($FeedSettings['rss2_image'])) { $FeedSettings['rss2_image'] = ''; } if (!isset($FeedSettings['copyright'])) { $FeedSettings['copyright'] = ''; } if (!isset($FeedSettings['title'])) { $FeedSettings['title'] = ''; } if (!isset($FeedSettings['rss_language'])) { $FeedSettings['rss_language'] = ''; } $feed_link = ''; switch ($FeedAttribs['type']) { case 'category': $feed_link = get_category_feed_link($FeedAttribs['category_id']); break; case 'ttid': $feed_link = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2'); break; case 'post_type': $feed_link = get_post_type_archive_feed_link($FeedAttribs['post_type'], $FeedAttribs['feed_slug']); break; case 'channel': $feed_link = get_feed_link($FeedAttribs['feed_slug']); break; default: $feed_link = get_feed_link('podcast'); break; } $cat_ID = $FeedAttribs['category_id']; if ($FeedAttribs['type'] == 'channel' && !empty($FeedAttribs['type'])) { ?> <h3><?php echo __('Feed Information', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Feed URL', 'powerpress'); ?> </th> <td> <p style="margin-top: 0;" class="description"><a href="<?php echo $feed_link; ?> " target="_blank"><?php echo $feed_link; ?> </a> | <a href="http://www.feedvalidator.org/check.cgi?url=<?php echo urlencode(str_replace('&', '&', $feed_link)); ?> " target="_blank"><?php echo __('validate', 'powerpress'); ?> </a></p> <?php if (!empty($FeedSettings['premium'])) { echo __('WARNING: This feed is password protected, it cannot be accessed by public services such as feedvalidator.org or the iTunes podcast directory.', 'powerpress'); } ?> </td> </tr> </table> <?php } ?> <h3><?php echo __('Feed Settings', 'powerpress'); ?> </h3> <?php if ($FeedAttribs['type'] == 'general') { ?> <p class="description"><?php echo __('Feed settings below only apply to the podcast only feed:', 'powerpress'); ?> <?php echo get_feed_link('podcast'); ?> </p> <?php } ?> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('Feed Title (Show Title)', 'powerpress'); ?> </th> <td> <input type="text" name="Feed[title]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['title']); ?> " maxlength="250" /> <?php if ($cat_ID) { ?> (<?php echo __('leave blank to use default category title', 'powerpress'); ?> ) <?php } else { ?> (<?php echo __('leave blank to use blog title', 'powerpress'); ?> ) <?php } if ($FeedAttribs['type'] == 'ttid') { } else { if ($cat_ID) { $category = get_category_to_edit($cat_ID); $CategoryName = htmlspecialchars($category->name); ?> <p class="description"><?php echo __('Default Category title:', 'powerpress') . ' ' . get_bloginfo_rss('name') . ' » ' . $CategoryName; ?> </p> <?php } else { ?> <p class="description"><?php echo __('Blog title:', 'powerpress') . ' ' . get_bloginfo_rss('name'); ?> </p> <?php } } if (!empty($General['seo_itunes'])) { ?> <p> <em><?php echo __('SEO Suggestion: The show title is very important.', 'powerpress'); ?> </em> </p> <?php } ?> </td> </tr> <?php if (!empty($General['advanced_mode_2'])) { ?> <!-- start advanced features --> <tr valign="top"> <th scope="row"> <?php echo __('Feed Description', 'powerpress'); ?> </th> <td> <input type="text" name="Feed[description]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['description']) ? $FeedSettings['description'] : ''); ?> " maxlength="1000" /> <?php if ($cat_ID) { ?> (<?php echo __('leave blank to use category description', 'powerpress'); ?> ) <?php } else { ?> (<?php echo __('leave blank to use blog description', 'powerpress'); ?> ) <?php } ?> </td> </tr> <?php if ($FeedAttribs['type'] != 'general') { ?> <tr valign="top"> <th scope="row"> <?php echo __('Feed Landing Page URL', 'powerpress'); ?> <br /> </th> <td> <input type="text" name="Feed[url]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['url']) ? $FeedSettings['url'] : ''); ?> " maxlength="250" /> <?php if ($cat_ID) { ?> (<?php echo __('leave blank to use category page', 'powerpress'); ?> ) <?php } else { ?> (<?php echo __('leave blank to use home page', 'powerpress'); ?> ) <?php } if ($cat_ID) { ?> <p class="description"><?php echo __('Category page URL', 'powerpress'); ?> : <?php echo get_category_link($cat_ID); ?> </p> <?php } else { ?> <p class="description">e.g. <?php echo get_bloginfo('url'); ?> /custom-page/</p> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('FeedBurner Feed URL', 'powerpress'); ?> <br /> <span style="font-size: 85%; margin-left: 5px;"><?php echo __('Recommendation: leave blank', 'powerpress'); ?> </span> </th> <td> <input type="text" name="Feed[feed_redirect_url]" style="width: 60%;" value="<?php echo esc_attr(!empty($FeedSettings['feed_redirect_url']) ? $FeedSettings['feed_redirect_url'] : ''); ?> " maxlength="100" /> (<?php echo __('leave blank to use built-in feed', 'powerpress'); ?> ) <p style="margin-top: 0px; margin-bottomd: 0;" class="description"><?php echo powerpressadmin_notice(__('NOTE: FeedBurner is not required for podcasting.', 'powerpress')); ?> <br /> <?php echo powerpressadmin_notice(__('No support is available from blubrry if you are using Feedburner or other feed hosted services.', 'powerpress')); ?> <br /> <a href="http://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/feedburner-for-podcasting/" target="_blank"><?php echo __('Learn more about FeedBurner and Podcasitng', 'powerpress'); ?> </a> </p> <p><?php echo __('Use this option to redirect this feed to a hosted feed service such as FeedBurner.', 'powerpress'); ?> </p> <p><?php echo __('We recommend that you disable FeedBurner SmartCast when using FeedBurner with PowerPress.', 'powerpress'); ?> </p> <?php $link = $feed_link; if (strstr($link, '?')) { $link .= "&redirect=no"; } else { $link .= "?redirect=no"; } ?> <p class="description"><?php echo __('Bypass Redirect URL', 'powerpress'); ?> : <a href="<?php echo $link; ?> " target="_blank"><?php echo $link; ?> </a></p> </td> </tr> <?php } // End not general settings ?> <tr valign="top"> <th scope="row"> <?php echo __('Show the most recent', 'powerpress'); ?> </th> <td> <input type="text" name="Feed[posts_per_rss]" style="width: 50px;" value="<?php echo !empty($FeedSettings['posts_per_rss']) ? $FeedSettings['posts_per_rss'] : ''; ?> " maxlength="5" /> <?php echo __('episodes / posts per feed (leave blank to use blog default', 'powerpress'); ?> : <?php form_option('posts_per_rss'); ?> ) <?php if (empty($FeedAttribs['type'])) { ?> <p style="margin-top: 5px; margin-bottomd: 0;" class="description"><?php echo __('Note: Setting above applies only to podcast channel feeds', 'powerpress'); ?> </p> <?php } ?> <p style="margin-top: 5px; margin-bottomd: 0;" class="description"><?php echo __('WARNING: Setting this value larger than 10 may cause feed timeout errors and delay podcast directory listings from updating.', 'powerpress'); ?> </p> </td> </tr> <?php if (in_array($FeedAttribs['type'], array('channel', 'general'))) { ?> <tr valign="top"> <th scope="row"> <?php echo __('Feed Episode Maximizer', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?> </th> <td> <input type="checkbox" name="Feed[maximize_feed]" value="1" <?php if (!empty($FeedSettings['maximize_feed'])) { echo 'checked'; } ?> /> <?php echo __('The latest 10 episodes in feed will remain as normal. The remaining 11+ older episodes in feed will have only the bare essential tags in order to maximize the number of episodes in the feed.', 'powerpress'); ?> <p style="margin-top: 0px; margin-bottomd: 0;" class="description"><?php echo __('NOTE: This feature may allow you to enter a larger value for the "Show the most recent" setting above. You must make sure that your feed does not exceed 512KB (1/2 MB) in size.', 'powerpress'); ?> </p> </td> </tr> <?php } ?> <tr valign="top"> <th scope="row"> <?php echo __('Feed Language', 'powerpress'); ?> </th> <td> <select name="Feed[rss_language]" class="bpp_input_med"> <?php $Languages = powerpress_languages(); echo '<option value="">' . __('Blog Default Language', 'powerpress') . '</option>'; while (list($value, $desc) = each($Languages)) { echo "\t<option value=\"{$value}\"" . ($FeedSettings['rss_language'] == $value ? ' selected' : '') . ">" . esc_attr($desc) . "</option>\n"; } ?> </select> <?php $rss_language = get_bloginfo_rss('language'); $rss_language = strtolower($rss_language); if (isset($Languages[$rss_language])) { ?> <?php echo __('Blog Default', 'powerpress'); ?> : <?php echo $Languages[$rss_language]; ?> <?php } else { echo __('Blog Default', 'powerpress'); ?> : <?php echo $rss_language; ?> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Copyright', 'powerpress'); ?> </th> <td> <input type="text" name="Feed[copyright]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['copyright']); ?> " maxlength="250" /> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('Caching Debug Comments', 'powerpress'); ?> </th> <td> <label><input type="checkbox" name="General[allow_feed_comments]" value="1" <?php if (!empty($General['allow_feed_comments'])) { echo 'checked'; } ?> /> <?php echo __('Allow WP Super Cache or W3 Total Cache to add HTML Comments to the bottom of your feeds', 'powerpress'); ?> </label> (<?php echo __('Recommended unchecked', 'powerpress'); ?> ) <p><?php echo __('iTunes is known to have issues with feeds that have HTML comments at the bottom.', 'powerpress'); ?> </p> <p style="margin-bottomd: 0;" class="description"><?php echo __('NOTE: This setting should only be enabled for debugging purposes.', 'powerpress'); ?> </p> </td> </tr> <!-- end advanced features --> <?php } ?> </table> <!-- Location and frequency information --> <?php if (!isset($FeedSettings['location'])) { $FeedSettings['location'] = ''; } if (!isset($FeedSettings['frequency'])) { $FeedSettings['frequency'] = ''; } if (!empty($General['advanced_mode_2'])) { ?> <!-- start advanced features --> <h3><?php echo __('Basic Show Information', 'powerpress'); ?> </h3> <div id="rawvoice_basic_options"> <table class="form-table"> <tr valign="top"> <th scope="row"><?php echo __('Location', 'powerpress'); ?> </th> <td> <input type="text" style="width: 300px;" name="Feed[location]" value="<?php echo esc_attr($FeedSettings['location']); ?> " maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?> ) <p><?php echo __('e.g. Cleveland, Ohio', 'powerpress'); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><?php echo __('Episode Frequency', 'powerpress'); ?> </th> <td> <input type="text" style="width: 300px;" name="Feed[frequency]" value="<?php echo esc_attr($FeedSettings['frequency']); ?> " maxlength="50" /> (<?php echo __('optional', 'powerpress'); ?> ) <p><?php echo __('e.g. Weekly', 'powerpress'); ?> </p> </td> </tr> </table> </div> <!-- end advanced features --> <?php } }
function powerpresspartner_clammr_info($Settings = true) { if (defined('POWERPRESS_DISABLE_PARTNERS') && POWERPRESS_DISABLE_PARTNERS == true) { return; } $ClammrPluginEnabled = false; if (!empty($GLOBALS['ClammrPlayer'])) { $ClammrPluginEnabled = is_object($GLOBALS['ClammrPlayer']); } ?> <h3 style="position: relative;margin-left: 30px; margin-bottom: 5px;"> <img src="<?php echo powerpress_get_root_url(); ?> images/clammr.png" style="width: 30px; height: 30px; position: absolute; top: 0; left: -34px;" /> <?php echo __('Clammr Player PowerPress Add-on', 'powerpress'); ?> <?php echo powerpressadmin_new(); ?> </h3> <p style="margin-left: 50px;"> <?php echo __('Blubrry has partnered with Clammr to enable a social-themed audio player for your site. As visitors listen to your podcast, they can tap the integrated Clammr Button to tag their favorite highlights and share them to Facebook and Twitter. The shared highlights contain links back to your full audio and site, driving additional audience and traffic to you.', 'powerpress'); ?> </p> <?php if ($Settings) { if ($ClammrPluginEnabled == false) { $plugin_link = '<a href="' . esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=' . 'audio-player-by-clammr' . '&TB_iframe=true&width=640&height=662')) . '" class="thickbox" title="' . esc_attr__('Install Plugin') . '">' . __('Install Clammr Audio Player add-on plugin', 'powerpress') . '</a>'; ?> <p style="margin-left: 50px;"><strong><?php echo $plugin_link; ?> </strong></p><?php } else { $PowerPressClammr = get_option('powerpress_clammr'); ?> <p style="margin-bottom: 20px; margin-left: 50px;"> <input type="hidden" name="PowerPressClammr" value="0" /> <input type="checkbox" name="PowerPressClammr" value="1" <?php if (!empty($PowerPressClammr)) { echo 'checked'; } ?> /> <strong><?php echo __('Enable Clammr Audio Player with PowerPress', 'powerpress'); ?> </strong> </p> <?php } } }