podPress_class(); return; } /*************************************************************/ /* Functions for editing and saving posts */ /*************************************************************/ function settings_general_edit() { GLOBAL $wpdb, $wp_rewrite; podPress_isAuthorized(); if (isset($_GET['updated']) && $_GET['updated'] == 'true') { echo '

'. __('Settings Saved', 'podpress').'

'; } if(!$this->settings['compatibilityChecks']['wp_head'] || !$this->settings['compatibilityChecks']['wp_footer']) { echo '
'."\n"; if($this->settings['compatibilityChecks']['themeTested']) { echo '

'.__('Theme Compatibility Problem', 'podpress').'

'."\n"; } else { echo '

'.__('Theme Compatibility Check Required', 'podpress').'

'."\n"; } echo '
'."\n"; if($this->settings['compatibilityChecks']['themeTested']) { echo ' '.__('Current Theme is not compliant', 'podpress').''."\n"; } else { echo ' '.__('Current Theme needs to be tested', 'podpress').''."\n"; } echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; if($this->settings['compatibilityChecks']['themeTested']) { echo ' podPress has found the "'.get_current_theme().'" theme fails to meet important requirements.

'."\n"; } else { echo ' podPress has not yet detected the "'.get_current_theme().'" theme to be compliant. Please visit your main blog page for podPress to re-check.

'."\n"; } if(!$this->settings['compatibilityChecks']['wp_head']) { echo ' The header.php in your theme needs to be calling wp_head(); before the closing head tag.
'."\n"; echo ' Change this:
'."\n"; echo ' <head>
'."\n"; echo ' To this:
'."\n"; echo ' <?php wp_head(); ?>'."
\n".'<head>

'."\n"; echo '
'."\n"; } if(!$this->settings['compatibilityChecks']['wp_footer']) { echo ' The footer.php in your theme needs to be calling wp_footer(); before the closing body tag.
'."\n"; echo ' Change this:
'."\n"; echo ' </body>
'."\n"; echo ' To this:
'."\n"; echo ' <?php wp_footer(); ?>'."
\n".'</body>

'."\n"; } echo ' Look at the default theme files for example.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo '
'."\n"; } echo '
'."\n"; echo '

'.__('General Options', 'podpress').'      '.__('Checking for updates... Failed.', 'podpress').'

'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Media File Locations', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
(?):'."\n"; echo '
'."\n"; if(!isset($this->settings['mediaWebPath']) || empty($this->settings['mediaWebPath'])){ echo "
\n"; echo __('Suggested', 'podpress').': wp-content/files'."\n"; } echo '
(?):'."\n"; echo '
'."\n"; if(!empty($this->settings['autoDetectedMediaFilePath'])){ echo "
\n"; echo __('Directory Not Valid or Not Accessible', 'podpress').'
'.__('Suggested', 'podpress').': '.$this->settings['autoDetectedMediaFilePath'].''."\n"; } echo '
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Download Statistics', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; if(!$this->settings['enableStats']){ $showStatsOptions = 'style="display: none;"'; } $home_path = get_home_path(); $hasHtaccess = false; if (file_exists($home_path.'.htaccess')) { $htaccessContents = file_get_contents($home_path.'.htaccess'); if($pos = strpos($htaccessContents, 'RewriteCond')) { $hasHtaccess = true; }elseif($pos = strpos($htaccessContents, 'RewriteRule')) { $hasHtaccess = true; } } if(is_writable($home_path) || is_writable($home_path.'.htaccess')) { $writable = true; } else { $writable = false; } if (!$wp_rewrite->using_index_permalinks()) { $usingpi = false; if(!$hasHtaccess && $writable) { $wp_rewrite->set_permalink_structure('/archives/%post_id%'); $wp_rewrite->set_permalink_structure(''); $usingpi = true; } $wp_rewrite->permalink_structure = '/archives/%post_id%'; } else { $usingpi = true; } if (!$usingpi && !$hasHtaccess && $this->settings['statMethod'] == 'permalinks') { $showPermalinksWarning = 'style="display: block;"'; } else { $showPermalinksWarning = 'style="display: none;"'; } $permalink_structure = get_settings('permalink_structure'); echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' settings['enableStats']) { echo 'checked="checked"'; } echo " onclick=\"javascript: podPressShowHideRow('statWarning'); podPressShowHideRow('statMethodWrapper'); podPressShowHideRow('statLoggingWrapper'); \"/>\n"; echo ' This will use the included stats support in podPress.
'."\n"; echo '
'."\n"; echo '

'.__('Warning: It appears you are not using WordPress permalinks or 404 handling. Due to this enabling podPress stats may cause media file downloads to fail.', 'podpress').'

'."\n"; echo '

'._e('According to WordPress, if your .htaccess file in your main WordPress directory were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.').'

'."\n"; echo ' \n"; echo '
'."\n"; echo '
  '; echo ' (?):'; echo ' '."\n"; echo '
  '; echo ' (?):'; echo ' '."\n"; echo '
'."\n"; echo '
'."\n"; echo ' settings['enablePodTracStats']) { echo 'checked="checked"'; } echo "/>\n"; echo ' This will use the new PodTrac service. More info...
'."\n"; echo ' '.__('Note: The two stats services can be used together', 'podpress')."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Post Editing', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' \n"; echo '
The higher the number, the bigger the performance impact when editing Posts.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Premium Content', 'podpress').' (?)'."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; if(podPress_WPVersionCheck('2.0.0')) { echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; } else { echo ' '."\n"; } echo ' '."\n"; if(podPress_WPVersionCheck('2.0.0')) { echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; } if(podPress_WPVersionCheck('2.0.0')) { echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; } echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' settings['enablePremiumContent']) { echo 'checked="checked"'; } echo "/>\n"; echo '
It helps to copy the premiumcast.php file from wp-content/plugins/podpress/optional_files/ into the main wordpress dir, where wp-rss2.php resides.Only available in WordPress 2.0.0 or greater
'."\n"; echo ' '."\n"; echo '
Digest auth is MUCH better than Basic, which is easily unencrypted.
'."\n"; echo ' settings['premiumContentFakeEnclosure']) { echo 'checked="checked"'; } echo "/>\n"; echo '
If you want the enclosure to always exist (so feed will show up in iTunes), then check this.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Post Content', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' '."\n"; echo ' Part of the Post where the podPress content (Player, and links) will go. Default is at the end.
'."\n"; echo ' '."\n"; echo ' The image that shows up before links for the media file.
'."\n"; echo ' '."\n"; echo ' Allow users to make use of the web players for your content
'."\n"; echo ' '."\n"; echo ' Allow users to download the MP3 directly from the website.
'."\n"; echo ' '."\n"; echo ' If disabled, users can still download using the icon link.
'."\n"; echo ' '."\n"; echo ' Display download stats on each post for everyone to see. This will cause a performance hit of 2 extra SQL queries per post being displayed. Disable this feature if your site is slowing down when podpress is enabled.
'."\n"; echo ' '."\n"; echo ' Display the duration for each media file.
'."\n"; echo ' '."\n"; echo ' This defines that the Podcast player and download links will always be visible on the short version of the Post
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Audio Comments', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' settings['enableMobatalkAudioComments']) { echo 'checked="checked"'; } echo "/>\n"; echo '
This allows users to leave audio comments, which also includes support for the comments feed to have enclosures for them.
Visit http://www.mobatalk.com for more details.
'."\n"; echo ' '; echo '
The "Free PodPress Special" only supports 30 seconds of recording time per message. Get a free account that supports 2 minutes by signing up at http://www.mobatalk.com.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('TorrentCasting', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' settings['enableTorrentCasting']) { echo 'checked="checked"'; } echo "/>\n"; echo '
This just allows for you to define a location to the .torrent file for you content. If you enable this you should copy the torrentcast.php file from plugins/podpress/optional_files and into your main wordpress directory.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Feed Caching', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' Feedcache files will be stored in the follow directory: '.get_option('upload_path').'/podpress_temp'.''."\n"; $this->checkWritableTempFileDir(); echo '
If you are using the index.php from optional_files in your main wordpress directory then you should set this value to match the $podPressFeedCacheDir value.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '.__('Credit', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' settings['enableFooter']) { echo 'checked="checked"'; } echo '/>'."\n"; echo '
Enabling this allows you to give us credit for making your podcasting easier, '."\n"; echo ' and lets other podcasters find out what your using to have such cool features on your podcasting blog ;)
'."\n"; echo ' If this feature makes your site look bad, please add in podpress with all the other credits, such as the ones in place for WordPress.
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '."\n"; echo '

'."\n"; echo ' '."\n"; echo '

'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' Check out our Frappr!'."\n"; echo '
Let us know where you are!
'."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; //echo ' Paypal'."\n"; echo '
This project is a labor of love, feel no obligation what-so-ever to donate. For those that want to, here ya go.
'."\n"; echo '
'."\n"; $sql = "SELECT * FROM ".$wpdb->prefix."postmeta WHERE meta_key IN('podPress_podcastStandardAudio', 'podPress_podcastStandardAudioSize', 'podPress_podcastStandardAudioDuration', 'podPress_podcastEnhancedAudio', 'podPress_podcastEnhancedAudioSize', 'podPress_podcastEnhancedAudioDuration', 'podPress_podcastVideo', 'podPress_podcastVideoSize', 'podPress_podcastVideoDuration', 'podPress_podcastVideoDimension', 'podPress_webVideo', 'podPress_webVideoSize', 'podPress_webVideoDuration', 'podPress_webVideoDimension', 'podPress_podcastEbook', 'podPress_podcastEbookSize', 'itunes:duration', 'enclosure', 'enclosure_hold' )"; $stats = $wpdb->get_results($sql); if($stats) { echo '
'."\n"; echo '
'."\n"; echo ' '.__('Complete Upgrade Process', 'podpress').''."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo ' '."\n"; echo '
'."\n"; echo ' '."\n"; echo '
'."\n"; echo '
'."\n"; echo ' '."\n"; echo '

'."\n"; echo ' '."\n"; echo '

'."\n"; echo '
'."\n"; } echo '
'."\n"; } function settings_general_save() { GLOBAL $wpdb; if(function_exists('wp_cache_flush')) { wp_cache_flush(); } // settings for the player if(isset($_POST['mediaWebPath'])) { if(substr($_POST['podPress_mediaWebPath'], -1) == '/') { $_POST['mediaWebPath'] = substr($_POST['mediaWebPath'], 0, -1); } $this->settings['mediaWebPath'] = $_POST['mediaWebPath']; } if(isset($_POST['mediaFilePath'])) { //if(substr($_POST['mediaFilePath'], -1) == '/' || substr($_POST['mediaFilePath'], -1) == '\\') //{ // $_POST['mediaFilePath'] = substr($_POST['mediaFilePath'], 0, -1); //} $this->settings['mediaFilePath'] = $_POST['mediaFilePath']; } if(isset($_POST['enableStats'])) { $this->settings['enableStats'] = true; } else { $this->settings['enableStats'] = false; } if(isset($_POST['statMethod'])) { $this->settings['statMethod'] = $_POST['statMethod']; } if(isset($_POST['statLogging'])) { $this->settings['statLogging'] = $_POST['statLogging']; } if(isset($_POST['enablePodTracStats'])) { $this->settings['enablePodTracStats'] = true; } else { $this->settings['enablePodTracStats'] = false; } if(isset($_POST['enableMobatalkAudioComments'])) { $this->settings['enableMobatalkAudioComments'] = true; } else { $this->settings['enableMobatalkAudioComments'] = false; } if(isset($_POST['mobatalkID']) && $_POST['mobatalkID'] != 'Free PodPress Special' && is_numeric($_POST['mobatalkID'])) { $this->settings['mobatalkID'] = $_POST['mobatalkID']; } else { $this->settings['mobatalkID'] = '352'; } if(isset($_POST['maxMediaFiles'])) { $this->settings['maxMediaFiles'] = $_POST['maxMediaFiles']; } if(isset($_POST['enablePremiumContent'])) { $this->settings['enablePremiumContent'] = true; } else { $this->settings['enablePremiumContent'] = false; } if(isset($_POST['premiumMethod']) && $_POST['premiumMethod'] == 'Basic') { $this->settings['premiumMethod'] = 'Basic'; } else { $this->settings['premiumMethod'] = 'Digest'; } if(isset($_POST['premiumContentFakeEnclosure'])) { $this->settings['premiumContentFakeEnclosure'] = true; } else { $this->settings['premiumContentFakeEnclosure'] = false; } if(isset($_POST['enableTorrentCasting'])) { $this->settings['enableTorrentCasting'] = true; } else { $this->settings['enableTorrentCasting'] = false; } if(isset($_POST['feedCacheDir'])) { $this->settings['feedCacheDir'] = $_POST['feedCacheDir']; } if(isset($_POST['contentBeforeMore'])) { $this->settings['contentBeforeMore'] = $_POST['contentBeforeMore']; } if(isset($_POST['contentLocation'])) { $this->settings['contentLocation'] = $_POST['contentLocation']; } if(isset($_POST['contentImage'])) { $this->settings['contentImage'] = $_POST['contentImage']; } if(isset($_POST['contentPlayer'])) { $this->settings['contentPlayer'] = $_POST['contentPlayer']; } if(isset($_POST['contentDownload'])) { $this->settings['contentDownload'] = $_POST['contentDownload']; } if(isset($_POST['contentDownloadText'])) { $this->settings['contentDownloadText'] = $_POST['contentDownloadText']; } if(isset($_POST['contentDownloadStats'])) { $this->settings['contentDownloadStats'] = $_POST['contentDownloadStats']; } if(isset($_POST['contentDuration'])) { $this->settings['contentDuration'] = $_POST['contentDuration']; } if(isset($_POST['enableFooter'])) { $this->settings['enableFooter'] = true; } else { $this->settings['enableFooter'] = false; } delete_option('podPress_config'); podPress_add_option('podPress_config', $this->settings); if(isset($_POST['cleanupOldMetaKeys'])) { $sql = "DELETE FROM ".$wpdb->prefix."postmeta WHERE meta_key IN('podPress_podcastStandardAudio', 'podPress_podcastStandardAudioSize', 'podPress_podcastStandardAudioDuration', 'podPress_podcastEnhancedAudio', 'podPress_podcastEnhancedAudioSize', 'podPress_podcastEnhancedAudioDuration', 'podPress_podcastVideo', 'podPress_podcastVideoSize', 'podPress_podcastVideoDuration', 'podPress_podcastVideoDimension', 'podPress_webVideo', 'podPress_webVideoSize', 'podPress_webVideoDuration', 'podPress_webVideoDimension', 'podPress_podcastEbook', 'podPress_podcastEbookSize', 'itunes:duration', 'enclosure', 'enclosure_hold' )"; $wpdb->query($sql); } $location = get_option('siteurl') . '/wp-admin/admin.php?page=podpress/podpress_general.php&updated=true'; header('Location: '.$location); exit; } }