echo '<b>Warning:</b> failed to open ' . $backupabsolutepath . $tempbackupfilename . ' for writing!<br><br>'; if (is_dir($backupabsolutepath)) { echo '<i>CHMOD 777</i> on the directory (' . htmlentities($backupabsolutepath) . ') should fix that.'; } else { echo 'The specified directory does not exist: "' . htmlentities($backupabsolutepath) . '"'; } } } if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { touch($newfullfilename); if (!chmod($newfullfilename, 0777)) { mail(ADMIN_EMAIL, 'backupDB: Failed to chmod()', 'Failed to chmod(' . $newfullfilename . ', 0777)'); } } if (@$_REQUEST['mailto']) { if (version_compare_replacement(phpversion(), '4.3.2', '>=') && !defined('memory_get_usage') && !@ini_get('memory_limit')) { // no actual memory limit $maxfilesize = 10 * 1048576; // 10MB arbitary limit } else { // set maxfilesize to 25% of memory limit to allow for script overhead $maxfilesize = round(max(intval(ini_get('memory_limit')), intval(get_cfg_var('memory_limit'))) * 1048576 * 0.25); } if (filesize($newfullfilename) <= $maxfilesize) { if ($fp = @fopen($newfullfilename, 'rb')) { $emailattachmentfiledata = fread($fp, filesize($newfullfilename)); fclose($fp); if (!EmailAttachment(ADMIN_EMAIL, ADMIN_EMAIL, 'backupDB: ' . basename($newfullfilename), 'backupDB: ' . basename($newfullfilename), $emailattachmentfiledata, basename($newfullfilename))) { mail(ADMIN_EMAIL, 'backupDB: Failed to email attachment [' . basename($newfullfilename) . ']', 'Failed to email attachment [' . basename($newfullfilename) . ']'); } unset($emailattachmentfiledata);
function ImageColorAllocateAlphaSafe(&$gdimg_hexcolorallocate, $R, $G, $B, $alpha = false) { if (version_compare_replacement(phpversion(), '4.3.2', '>=') && $alpha !== false) { return ImageColorAllocateAlpha($gdimg_hexcolorallocate, $R, $G, $B, intval($alpha)); } else { return ImageColorAllocate($gdimg_hexcolorallocate, $R, $G, $B); } }
function MenuOptions() { global $wpdb; // Init parameters $count_posts = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->posts . " WHERE post_type <> 'attachment'"); if ($this->settings['updslice'] <= 0) { $this->settings['updslice'] = 20; } if ($count_posts < $this->settings['updslice']) { $post_slice = $this->settings['updslice']; } else { $post_slice = $this->settings['updslice']; } $max_count = ceil($count_posts / $post_slice); $pa = parse_url(SITEURL); $dn = str_replace($pa['path'], "", SITEURL); $bp = str_replace($pa['path'], "", str_replace("\\", "/", ABSPATH)); $bp = substr($bp, 0, strlen($bp) - 1); $pa['path'] = substr($pa['path'], 1, strlen($pa['path']) - 1); // Detects wordTube $se = get_wordTubePath(); if ($se == '') { $re = ''; $wdet = ''; } else { $re = "MEDIA="; $wdet = 'Wordtube detected. Path: '; } if (isset($_POST['info_update'])) { $this->RetrievePostOptions(); // Update pt_posts table if some checked for ($i = 1; $i <= $max_count; $i++) { $_POST['db_refresh' . $i] = pt_GetBooleanOption($_POST['db_refresh' . $i]); $llimit = ($i - 1) * $post_slice; if ($i == $max_count) { $hlimit = $count_posts; } else { $hlimit = $i * $post_slice; } if ($_POST['db_refresh' . $i] == 'true') { $lines = $hlimit - $llimit; $array_posts = $wpdb->get_col(" SELECT ID FROM " . $wpdb->posts . " WHERE post_type <> 'attachment' LIMIT " . $llimit . "," . $lines); $array_posts = '( ' . implode(',', $array_posts) . ' )'; $wpdb->query(" DELETE FROM " . $this->table_pt_post . " WHERE post_id IN " . $array_posts); $this->UpdatePostDB($llimit, $hlimit); } } if (get_magic_quotes_gpc()) { $_POST['video_regex'] = stripslashes($_POST['video_regex']); } } // Validates options & displays error message $this->ValidateOptions(); if ($this->update_error || isset($_POST['info_update'])) { ?> <div class="updated"> <?php if ($this->update_error) { ?> <strong><?php _e('Update error:', 'post-thumb-admin'); ?> </strong> <?php echo $this->error_msg; ?> <?php } else { ?> <?php if (isset($_POST['info_update'])) { ?> <strong><?php _e('Settings saved', 'post-thumb-admin'); ?> </strong> <?php } ?> <?php } ?> </div> <?php } // Init parameters $count_posts = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->posts . " WHERE post_type <> 'attachment'"); if ($this->settings['updslice'] <= 0) { $this->settings['updslice'] = 20; } if ($count_posts < $this->settings['updslice']) { $post_slice = $this->settings['updslice']; } else { $post_slice = $this->settings['updslice']; } $max_count = ceil($count_posts / $post_slice); // script for sliders ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#jpg_rate").attr("value", <?php echo $this->settings['jpg_rate']; ?> ); jQuery("#png_rate").attr("value", <?php echo $this->settings['png_rate']; ?> ); jQuery("#slider1").slider({ minValue: 0, maxValue: 100, steps: 20, startValue: <?php echo $this->settings['jpg_rate']; ?> , slide: function(e,ui) { jQuery("#jpg_rate").attr("value", ui.value ); } }); jQuery("#slider2").slider({ minValue: 0, maxValue: 9, startValue: <?php echo $this->settings['png_rate']; ?> , slide: function(e,ui) { jQuery("#png_rate").attr("value", ui.value ); } }); }); </script> <?php $count_pt = $wpdb->get_var("SELECT COUNT(*) FROM " . $this->table_pt_post); $post_thumbnail_settings = pt_get_default_options(); update_option('post_thumbnail_settings', $post_thumbnail_settings); ?> <div class="wrap"> <form method="post"> <h2><?php _e('Post Thumb Revisited Options', 'post-thumb-admin'); ?> </h2> <fieldset name="options"> <?php if ($this->version_check()) { ?> <p class="info"><?php _e('New Version available: ', 'post-thumb-admin'); ?> <?php _e('The server reports that a new Post-Thumb Revisited Version is now available. Please visit the plugin homepage for more information.', 'post-thumb-admin'); ?> </p> <?php } else { } _e('Version number: ', 'post-thumb-admin'); echo $this->PTRVERSION; ?> <br /><br /> </fieldset> <ul id="submenu"> <li><a href="#" id="aptover" onclick="showmenu('ptover'); return false;"><?php _e('Overview', 'post-thumb-admin'); ?> </a></li> <li><a href="#" id="aptbasic" onclick="showmenu('ptbasic'); return false;"><?php _e('Basic options', 'post-thumb-admin'); ?> </a></li> <li><a href="#" id="aptthumbnail" onclick="showmenu('ptthumbnail'); return false;"><?php _e('Thumbnail options', 'post-thumb-admin'); ?> </a></li> <li><a href="#" id="aptadditional" onclick="showmenu('ptadditional'); return false;"><?php _e('Additional options', 'post-thumb-admin'); ?> </a></li> <li><a href="#" id="aptjavascript" onclick="showmenu('ptjavascript'); return false;"><?php _e('Javascript options', 'post-thumb-admin'); ?> </a></li> <li><a href="#" id="aptpost" onclick="showmenu('ptpost'); return false;"><?php _e('Post options', 'post-thumb-admin'); ?> </a></li> <li><a href="#" id="apthelp" onclick="showmenu('pthelp'); return false;"><?php _e('Help', 'post-thumb-admin'); ?> </a></li> </ul> <div id="ptover"> <input type="hidden" name="screen" value="over"> <h3><?php _e('Overview', 'post-thumb-admin'); ?> </h3> <p class="title showhide"><?php _e('Post Table settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Posts viewed by Post-Thumb: ', 'post-thumb-admin'); echo $count_pt; ?> </p><br /> <p class="tabs"><?php _e('Posts in database: ', 'post-thumb-admin'); echo $count_posts; ?> </p> <?php for ($i = 1; $i <= $max_count; $i++) { $llimit = ($i - 1) * $post_slice; if ($i == $max_count) { $hlimit = $count_posts; } else { $hlimit = $i * $post_slice; } echo '<input type="checkbox" name="db_refresh' . $i . '" /> ' . $llimit . '-' . $hlimit . ' '; } ?> <br /> <p class="tabs"><?php _e('Posts per update batch: ', 'post-thumb-admin'); ?> </p> <input type="text" name="updslice" value="<?php echo $post_thumbnail_settings['updslice']; ?> " size="3" /><br /> <br /> <p class="info"><?php _e('Check this to refresh Post database. Cases when you need to refresh it: ', 'post-thumb-admin'); ?> <ul> <li><?php _e("You've changed one of the following options: 'Use metadata', 'Detect wordTube media', 'Detect Youtube'.", 'post-thumb-admin'); ?> </li> <li><?php _e("You've deleted a category.", 'post-thumb-admin'); ?> </li> <li><?php _e("You have a large post base and activation process was not completed.", 'post-thumb-admin'); ?> </li> <li><?php _e("You've changed the permalinks.", 'post-thumb-admin'); ?> </li> <li><?php _e("You have the feeling that recent_thumbs and random_thumb do not work properly.", 'post-thumb-admin'); ?> </li> </ul> </p> </fieldset> <p class="title showhide"><?php _e('System check', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('PHP version', 'post-thumb-admin'); ?> </p> <?php echo $post_thumbnail_settings['phpversion']; ?> <br /> <p class="tabs"><?php _e('Remote files', 'post-thumb-admin'); ?> </p> <?php if (ini_get('allow_url_fopen')) { _e('Retrieve remote file is OK', 'post-thumb-admin'); } elseif (function_exists('curl_init')) { _e('Retrieve remote file is OK using cURL', 'post-thumb-admin'); } else { _e('Retrieve remote file not allowed on this server.', 'post-thumb-admin'); } ?> <br /> <p class="info"><?php _e('Dealing with remote file also requires php 4.3.0 or later', 'post-thumb-admin'); ?> </p><br /> <p class="tabs"><?php _e('GD version', 'post-thumb-admin'); ?> </p> <?php echo $post_thumbnail_settings['gdversion']; ?> <br /> <p class="tabs"><?php _e('Safe mode', 'post-thumb-admin'); ?> </p> <?php if ($post_thumbnail_settings['safe_mode'] == 'true') { _e('Safe mode on', 'post-thumb-admin'); } else { _e('Safe mode off', 'post-thumb-admin'); } ?> <br /> <p class="tabs"><?php _e('Memory limit', 'post-thumb-admin'); ?> </p> <?php if ($ml = ini_get('memory_limit')) { echo $ml; } else { _e('Cannot Retrieve memory limit', 'post-thumb-admin'); } ?> <br /> <p class="tabs"><?php _e('Memory usage', 'post-thumb-admin'); ?> </p> <?php if (function_exists('memory_get_usage')) { _e('Function memory_get_usage available', 'post-thumb-admin'); } else { _e('Function memory_get_usage not available', 'post-thumb-admin'); } ?> <br /> <p class="tabs"><?php _e('Set Memory limit', 'post-thumb-admin'); ?> </p> <?php $ms = ini_set('memory_limit', $ml); if (empty($ms)) { _e('Memory cannot be set', 'post-thumb-admin'); } else { _e('Memory can be set', 'post-thumb-admin'); } ?> <br /> <p class="tabs"><?php _e('wordTube', 'post-thumb-admin'); ?> </p> <?php _e($wdet, 'post-thumb-admin'); echo $se; ?> <br /> </fieldset> <div class="submit"><input type="submit" name="info_update" value="<?php _e('Update', 'post-thumb-admin'); ?> " /></div> </div> <div id="ptbasic"> <input type="hidden" name="screen" value="base"> <h3><?php _e('Basic options', 'post-thumb-admin'); ?> </h3> <p class="info"><?php _e("Leave default settings if you're unsure of what to set.", 'post-thumb-admin'); ?> </p> <br /> <p class="title showhide"><?php _e('Location settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Base path', 'post-thumb-admin'); ?> </p> <input type="text" name="base_path" value="<?php echo $post_thumbnail_settings['base_path']; ?> " size="60" /><br /> <p class="tabsi"><?php _e('Initial default value: ', 'post-thumb-admin'); ?> </p><?php echo $bp; ?> <br /> <p class="info"><?php _e("Absolute path to website. For example, /httpdocs or /yourdomain.com. Used to find location of thumbnails on server. http://yourdomain.com/images/pth/thumb_picture.jpg would actually be /httpdocs/images/pth/thumb_picture.jpg.", 'post-thumb-admin'); echo ' '; _e("No trailing '/'", 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Full domain name', 'post-thumb-admin'); ?> </p> <input type="text" name="full_domain_name" value="<?php echo $post_thumbnail_settings['full_domain_name']; ?> " size="60" /><br /> <p class="tabsi"><?php _e('Initial default value: ', 'post-thumb-admin'); ?> </p><?php echo str_replace("\\", "/", $dn); ?> <br /> <p class="info"><?php _e("Full domain name. Includes the http://.", 'post-thumb-admin'); echo ' '; _e("No trailing '/'", 'post-thumb-admin'); ?> <br /> <br /> <p class="tabs"><?php _e('Folder name', 'post-thumb-admin'); ?> </p> <input type="text" name="folder_name" value="<?php echo $post_thumbnail_settings['folder_name']; ?> " size="60" /><br /> <p class="info"><?php _e('Set the relative path to thumbs. Make sure directory exists and is writable.', 'post-thumb-admin'); echo ' '; _e("No trailing '/'", 'post-thumb-admin'); ?> <br /> <br /> <p class="tabs"><?php _e('Default image', 'post-thumb-admin'); ?> </p> <input type="text" name="default_image" value="<?php echo $post_thumbnail_settings['default_image']; ?> " size="60" /><br /> <p class="info"><?php _e('The location of the default image to use if no picture can be found. Enter in the relative url, eg. images/default.jpg', 'post-thumb-admin'); ?> <br /> <p class="info"><?php _e('If category names are used, this will override Default Image and Default Image for Videos', 'post-thumb-admin'); ?> <br /> <br /> <p class="tabs"><?php _e('Use meta data', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="use_meta" <?php if ($post_thumbnail_settings['use_meta'] == 'true') { echo 'checked'; } ?> /><br /> <p class="tabs"><?php _e('Use Category Names', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="use_catname" <?php if ($post_thumbnail_settings['use_catname'] == 'true') { echo 'checked'; } ?> /><br /> </fieldset> <p class="title showhide"><?php _e('Filename settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Append / Prepend text', 'post-thumb-admin'); ?> </p> <input type="text" name="append_text" value="<?php echo $post_thumbnail_settings['append_text']; ?> " size="60" /><br /> <p class="info"><?php _e('Choose text to append or prepend image with.', 'post-thumb-admin'); ?> <p class="tabs"><?php _e('Append', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="append" <?php if ($post_thumbnail_settings['append'] == 'true') { echo 'checked'; } ?> /><br /> <p class="info"><?php _e('Choose to put text before image name or after. Uncheck will put text before.', 'post-thumb-admin'); ?> </p> <?php _e(' Example: ', 'post-thumb-admin'); if ($post_thumbnail_settings['append'] == 'true') { echo 'yourimage' . $post_thumbnail_settings['append_text'] . '.jpg'; } else { echo $post_thumbnail_settings['append_text'] . 'yourimage' . '.jpg'; } ?> </p> </fieldset> <p class="title showhide"><?php _e('Video image settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Video regex:', 'post-thumb-admin'); ?> </p> <input type="text" name="video_regex" value="<?php echo htmlentities($post_thumbnail_settings['video_regex']); ?> " size="60" /><br /> <p class="info"><?php _e('If you want to scan a post for a video and use a default image. Uses regex to scan for video.', 'post-thumb-admin'); ?> </p> <p class="tabs"><?php _e('Video default image:', 'post-thumb-admin'); ?> </p> <input type="text" name="video_default" value="<?php echo $post_thumbnail_settings['video_default']; ?> " size="60" /><br /> </fieldset> <p class="title showhide"><?php _e('Stream Video image settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Stream Check:', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="stream_check" <?php if ($post_thumbnail_settings['stream_check'] == 'true') { echo 'checked'; } ?> /><br /> <p class="info"><?php _e('If you want to scan a post for a stream video. Supports Youtube, Gvideo and Dailymotion. Will display a thumb for each specific source.', 'post-thumb-admin'); ?> </p> </fieldset> <div class="submit"><input type="submit" name="info_update" value="<?php _e('Update', 'post-thumb-admin'); ?> " /></div> </div> <div id="ptthumbnail"> <input type="hidden" name="screen" value="base"> <h3><?php _e('Thumbnail options', 'post-thumb-admin'); ?> </h3> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Resize width x height', 'post-thumb-admin'); ?> </p> <input type="text" name="resize_width" value="<?php echo $post_thumbnail_settings['resize_width']; ?> " size="10" /> x <input type="text" name="resize_height" value="<?php echo $post_thumbnail_settings['resize_height']; ?> " size="10" /><br /> <p class="tabs"><?php _e('Quality for jpeg', 'post-thumb-admin'); ?> </p> <input type="text" name="jpg_rate" id="jpg_rate" value="<?php echo $post_thumbnail_settings['jpg_rate']; ?> " size="3" /> <?php _e('From 0 to 100 (best quality, highest size). Default: 75', 'post-thumb-admin'); ?> <div id='slider1' class='ui-slider-1' style="margin:10px;"> <div class='ui-slider-handle'></div> </div> <br /> <?php if (version_compare_replacement(phpversion(), '5.1.2', '>=')) { ?> <p class="tabs"><?php _e('Compression for png', 'post-thumb-admin'); ?> </p> <input type="text" name="png_rate" id="png_rate" value="<?php echo $post_thumbnail_settings['png_rate']; ?> " size="3" /> <?php _e('From 0 (no compression, best quality) to 9. Default: 6', 'post-thumb-admin'); ?> <div id='slider2' class='ui-slider-1' style="margin:10px;"> <div class='ui-slider-handle'></div> </div> <?php } ?> <p class="tabs"><?php _e('Keep ratio', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="keep_ratio" <?php if ($post_thumbnail_settings['keep_ratio'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to apply original picture ratio to thumbnails.', 'post-thumb-admin'); ?> <br /> <p class="info"><?php _e('Choose your resize width and height. Will resize in proportion to original width and height. If you do not care about proportions, uncheck keep ratio.', 'post-thumb-admin'); ?> </p> <br /> <p class="tabs"><?php _e('Max size', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="max" <?php if ($post_thumbnail_settings['max'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want resize to apply only if original image is smaller than target size.', 'post-thumb-admin'); ?> <br /> <br /> <p class="tabs"><?php echo __('Use rounded corner', 'post-thumb-admin') . ' '; ?> </p> <input type="checkbox" name="rounded" <?php if ($post_thumbnail_settings['rounded'] == 'true') { echo 'checked'; } ?> /> <?php _e('Corner ratio', 'post-thumb-admin'); ?> <input type="text" name="corner_ratio" value="<?php echo $post_thumbnail_settings['corner_ratio']; ?> " size="10" /> <?php _e('From 0 to 1. Typical: 0.15', 'post-thumb-admin'); ?> <br /> <p class="info"><?php _e('Check this option will apply rounded corner to thumbnail. It will also force use of png format for thumbnails.', 'post-thumb-admin'); ?> </p> <br /> <p class="tabs"><?php _e('Use png', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="use_png" <?php if ($post_thumbnail_settings['use_png'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to save thumbnails in .png format.', 'post-thumb-admin'); ?> <br /> <p class="info"><?php _e('Check this option will increase thumbnail size (used with rounded corner checked).', 'post-thumb-admin'); ?> </p> <br /> <p class="tabs"><?php _e('Use unsharp mask', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="unsharp" <?php if ($post_thumbnail_settings['unsharp'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to apply a sharpness mask to thumbnails.', 'post-thumb-admin'); ?> <br /> <p class="info"><?php _e('WARNING: check this option slows down the thumbnail creation.', 'post-thumb-admin'); ?> </p> <br /> <p class="tabs"><?php _e('Unsharp amount', 'post-thumb-admin'); ?> </p> <input type="text" name="unsharp_amount" value="<?php echo $post_thumbnail_settings['unsharp_amount']; ?> " size="3" /> <?php _e('From 0 to 100. Typical: 80', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Unsharp radius', 'post-thumb-admin'); ?> </p> <input type="text" name="unsharp_radius" value="<?php echo $post_thumbnail_settings['unsharp_radius']; ?> " size="3" /> <?php _e('From 0 to 1. Typical: 0.5', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Unsharp threshold', 'post-thumb-admin'); ?> </p> <input type="text" name="unsharp_threshold" value="<?php echo $post_thumbnail_settings['unsharp_threshold']; ?> " size="3" /> <?php _e('From 0 to 5. Typical: 3', 'post-thumb-admin'); ?> <br /> </fieldset> <div class="submit"><input type="submit" name="info_update" value="<?php _e('Update', 'post-thumb-admin'); ?> " /></div> </div> <div id="ptadditional"> <input type="hidden" name="screen" value="add"> <h3><?php _e('Additional options', 'post-thumb-admin'); ?> </h3> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Detect wordTube medias', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="hs_wordtube" <?php if ($post_thumbnail_settings['hs_wordtube'] == 'true') { echo 'checked'; } ?> /> <?php _e('Scan post content for wordTube media and use them to generate thumbnails.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Detect Youtube video', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="hs_youtube" <?php if ($post_thumbnail_settings['hs_youtube'] == 'true') { echo 'checked'; } ?> /> <?php _e('Scan post content for Youtube video and use them to generate thumbnails.', 'post-thumb-admin'); ?> <br /> </fieldset> <p class="title showhide"><?php _e('WordTube settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('wordTube display size', 'post-thumb-admin'); ?> </p> <input type="text" name="wordtube_width" value="<?php echo $post_thumbnail_settings['wordtube_width']; ?> " size="10" /> x <input type="text" name="wordtube_height" value="<?php echo $post_thumbnail_settings['wordtube_height']; ?> " size="10" /> <?php _e('Wordtube thumbnail size.', 'post-thumb-admin'); ?> <?php _e(' (width x height)', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('wordTube play size', 'post-thumb-admin'); ?> </p> <input type="text" name="wordtube_pwidth" value="<?php echo $post_thumbnail_settings['wordtube_pwidth']; ?> " size="10" /> x <input type="text" name="wordtube_pheight" value="<?php echo $post_thumbnail_settings['wordtube_pheight']; ?> " size="10" /> <?php _e('Size of the frame to play wordTube video.', 'post-thumb-admin'); ?> <?php _e(' (width x height)', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('video display text', 'post-thumb-admin'); ?> </p> <input type="text" name="wordtube_vtext" value="<?php echo $post_thumbnail_settings['wordtube_vtext']; ?> " size="20" /> <?php _e('Text shown in wordTube video thumbnails.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('mp3 display text', 'post-thumb-admin'); ?> </p> <input type="text" name="wordtube_mtext" value="<?php echo $post_thumbnail_settings['wordtube_mtext']; ?> " size="20" /> <?php _e('Text shown in wordTube mp3 thumbnails.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('wordTube thumbnail text', 'post-thumb-admin'); ?> </p> <input type="text" name="wordtube_text" value="<?php echo $post_thumbnail_settings['wordtube_text']; ?> " size="20" /> <?php _e('Text to append/prepend to wordtube thumbnail name.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Append', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="wt_append" <?php if ($post_thumbnail_settings['wt_append'] == 'true') { echo 'checked'; } ?> /><br /> <p class="info"><?php _e('Choose to put text before image name or after. Uncheck will put text before.', 'post-thumb-admin'); ?> </p> </fieldset> <p class="title showhide"><?php _e('Youtube settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Youtube display size', 'post-thumb-admin'); ?> </p> <input type="text" name="youtube_width" value="<?php echo $post_thumbnail_settings['youtube_width']; ?> " size="10" /> x <input type="text" name="youtube_height" value="<?php echo $post_thumbnail_settings['youtube_height']; ?> " size="10" /> <?php _e('Youtube thumbnail size.', 'post-thumb-admin'); ?> <?php _e(' (width x height)', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Youtube play size', 'post-thumb-admin'); ?> </p> <input type="text" name="youtube_pwidth" value="<?php echo $post_thumbnail_settings['youtube_pwidth']; ?> " size="10" /> x <input type="text" name="youtube_pheight" value="<?php echo $post_thumbnail_settings['youtube_pheight']; ?> " size="10" /> <?php _e('Size of the frame to play Youtube video.', 'post-thumb-admin'); ?> <?php _e(' (width x height)', 'post-thumb-admin'); ?> <br /> </fieldset> <div class="submit"><input type="submit" name="info_update" value="<?php _e('Update', 'post-thumb-admin'); ?> " /></div> </div> <div id="ptjavascript"> <input type="hidden" name="screen" value="JS"> <h3><?php _e('Javascript options', 'post-thumb-admin'); ?> </h3> <p class="title showhide"><?php _e('Library settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Use Highslide', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="hs_use" <?php if ($post_thumbnail_settings['hs_use'] == 'true') { echo 'checked'; } ?> /> <?php _e('Uncheck this will disable all Highslide effects', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Use Thickbox', 'post-thumb-admin'); ?> </p> <?php if (false) { ?> <input type="checkbox" name="tb_use" <?php if ($post_thumbnail_settings['tb_use'] == 'true') { echo 'checked'; } ?> /> <?php } ?> <?php _e('Uncheck this will disable all Thickbox effects', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Use Smoothbox', 'post-thumb-admin'); ?> </p> <?php if (false) { ?> <input type="checkbox" name="sb_use" <?php if ($post_thumbnail_settings['sb_use'] == 'true') { echo 'checked'; } ?> /> <?php } ?> <?php _e('Uncheck this will disable all Smoothbox effects', 'post-thumb-admin'); ?> <br /> </fieldset> <p class="title showhide"><?php _e('Highslide settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Add caption to images', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="caption" <?php if ($post_thumbnail_settings['caption'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to add a caption to each image (available with Highslide).', 'post-thumb-admin'); ?> <br /> <br /> <p class="info"><?php _e('WARNING: it is not recommanded to use more than one library at a time.', 'post-thumb-admin'); ?> </p> <p class="tabs"><?php _e('Picture frame border style', 'post-thumb-admin'); ?> </p> <select size="1" name="ovframe" style="width:140px"> <option value="rounded-black" <?php if ($post_thumbnail_settings['ovframe'] == 'rounded-black') { echo 'selected="selected"'; } ?> >rounded-black</option> <option value="rounded-white" <?php if ($post_thumbnail_settings['ovframe'] == 'rounded-white') { echo 'selected="selected"'; } ?> >rounded-white</option> <option value="outer-glow" <?php if ($post_thumbnail_settings['ovframe'] == 'outer-glow') { echo 'selected="selected"'; } ?> >outer-glow</option> <option value="drop-shadow" <?php if ($post_thumbnail_settings['ovframe'] == 'drop-shadow') { echo 'selected="selected"'; } ?> >drop-shadow</option> <option value="beveled" <?php if ($post_thumbnail_settings['ovframe'] == 'beveled') { echo 'selected="selected"'; } ?> >beveled</option> <option value="windows" <?php if ($post_thumbnail_settings['ovframe'] == 'windows') { echo 'selected="selected"'; } ?> >windows</option> <option value="none" <?php if ($post_thumbnail_settings['ovframe'] == 'none') { echo 'selected="selected"'; } ?> >none</option> </select> <br /> <p class="tabs"><?php _e('Other frame border style', 'post-thumb-admin'); ?> </p> <select size="1" name="hsframe" style="width:140px"> <option value="rounded-black" <?php if ($post_thumbnail_settings['ovframe'] == 'rounded-black') { echo 'selected="selected"'; } ?> >rounded-black</option> <option value="rounded-white" <?php if ($post_thumbnail_settings['hsframe'] == 'rounded-white') { echo 'selected="selected"'; } ?> >rounded-white</option> <option value="outer-glow" <?php if ($post_thumbnail_settings['hsframe'] == 'outer-glow') { echo 'selected="selected"'; } ?> >outer-glow</option> <option value="drop-shadow" <?php if ($post_thumbnail_settings['hsframe'] == 'drop-shadow') { echo 'selected="selected"'; } ?> >drop-shadow</option> <option value="beveled" <?php if ($post_thumbnail_settings['hsframe'] == 'beveled') { echo 'selected="selected"'; } ?> >beveled</option> <option value="windows" <?php if ($post_thumbnail_settings['hsframe'] == 'windows') { echo 'selected="selected"'; } ?> >windows</option> <option value="none" <?php if ($post_thumbnail_settings['hsframe'] == 'none') { echo 'selected="selected"'; } ?> >none</option> </select> <br /> <p class="tabs"><?php _e('Frame top style', 'post-thumb-admin'); ?> </p> <select size="1" name="ovtopframe" style="width:140px"> <option value="default" <?php if ($post_thumbnail_settings['ovtopframe'] == 'default') { echo 'selected="selected"'; } ?> >default</option> <option value="windows" <?php if ($post_thumbnail_settings['ovtopframe'] == 'windows') { echo 'selected="selected"'; } ?> >windows</option> </select> <br /> <p class="tabs"><?php _e('Frames width x height', 'post-thumb-admin'); ?> </p> <input type="text" name="hs_width" value="<?php echo $post_thumbnail_settings['hs_width']; ?> " size="10" /> x <input type="text" name="hs_height" value="<?php echo $post_thumbnail_settings['hs_height']; ?> " size="10" /><br /> <p class="tabs"><?php _e('Inside margin', 'post-thumb-admin'); ?> </p> <input type="text" name="hsmargin" value="<?php echo $post_thumbnail_settings['hsmargin']; ?> " size="5" /> <?php _e('Inside margin for frames (in pixels).', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Frame content color', 'post-thumb-admin'); ?> </p> <input type="text" name="bgcolor" value="<?php echo $post_thumbnail_settings['bgcolor']; ?> " size="10" /> <?php _e('Use html hex color numbers, or transparent, or none (no style).', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Frame top color', 'post-thumb-admin'); ?> </p> <input type="text" name="hdcolor" value="<?php echo $post_thumbnail_settings['hdcolor']; ?> " size="10" /> <?php _e('Use html hex color numbers, or transparent, or none (no style).', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Frame footer color', 'post-thumb-admin'); ?> </p> <input type="text" name="ftcolor" value="<?php echo $post_thumbnail_settings['ftcolor']; ?> " size="10" /> <?php _e('Use html hex color numbers, or transparent, or none (no style).', 'post-thumb-admin'); ?> <br /> </fieldset> <div class="submit"><input type="submit" name="info_update" value="<?php _e('Update', 'post-thumb-admin'); ?> " /></div> </div> <div id="ptpost"> <input type="hidden" name="screen" value="post"> <h3><?php _e('Post options', 'post-thumb-admin'); ?> </h3> <fieldset name="options"> <p class="tabs"><?php _e('Activate formatting inside posts', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="hs_post" <?php if ($post_thumbnail_settings['hs_post'] == 'true') { echo 'checked'; } ?> /> <?php _e('If checked, Post-Thumb will thumbnail images inside posts.', 'post-thumb-admin'); ?> <br /> </fieldset> <p class="title showhide"><?php _e('Thumbnail settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"> <?php _e('Resize width x height', 'post-thumb-admin'); ?> </p> <input type="text" name="p_width" value="<?php echo $post_thumbnail_settings['p_resize_width']; ?> " size="10" /> x <input type="text" name="p_height" value="<?php echo $post_thumbnail_settings['p_resize_height']; ?> " size="10" /> <br /> <p class="tabs"> <?php _e('Append / Prepend text', 'post-thumb-admin'); ?> </p> <input type="text" name="p_append_text" value="<?php echo $post_thumbnail_settings['p_append_text']; ?> " size="60" /> <br /> <p class="info"> <?php _e('Choose text to append or prepend image with.', 'post-thumb-admin'); ?> <?php _e(' Example: ', 'post-thumb-admin'); if ($post_thumbnail_settings['p_append'] == 'true') { echo 'yourimage' . $post_thumbnail_settings['p_append_text'] . '.jpg'; } else { echo $post_thumbnail_settings['p_append_text'] . 'yourimage' . '.jpg'; } ?> </p> <br /> <p class="tabs"> <?php _e('Save sub-directory', 'post-thumb-admin'); ?> </p> <input type="text" name="p_subfolder" value="<?php echo $post_thumbnail_settings['p_subfolder']; ?> " size="60" /> <br /> <p class="info"> <?php _e('Choose sub-directory to save generated thumbnails to.', 'post-thumb-admin'); ?> <br /> <p class="tabs"> <?php _e('Level of directory to include in names', 'post-thumb-admin'); ?> </p> <input type="text" name="p_dirname" value="<?php echo $post_thumbnail_settings['p_dirname']; ?> " size="5" /> <br /> <p class="tabs"> <?php _e('Keep ratio', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="p_keep_ratio" <?php if ($post_thumbnail_settings['p_keep_ratio'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to apply original picture ratio to thumbnails.', 'post-thumb-admin'); ?> <br /> <p class="tabs"> <?php _e('Max size', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="p_max" <?php if ($post_thumbnail_settings['p_max'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want resize to apply only if original image is larger than target size.', 'post-thumb-admin'); ?> <br /> <br /> <p class="tabs"> <?php echo __('Use rounded corner', 'post-thumb-admin') . ' '; ?> </p> <input type="checkbox" name="p_rounded" <?php if ($post_thumbnail_settings['p_rounded'] == 'true') { echo 'checked'; } ?> /> <br /> <p class="tabs"> <?php _e('Use png', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="p_use_png" <?php if ($post_thumbnail_settings['p_use_png'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to save thumbnails in .png format.', 'post-thumb-admin'); ?> <br /> <p class="tabs"> <?php _e('Auto replace', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="p_rel" <?php if ($post_thumbnail_settings['p_rel'] == 'true') { echo 'checked'; } ?> /> <?php _e('If option is checked, use rel="nothumb" to not thumbnail an image. If it is not checked, use rel="thumb" to thumbnail images.', 'post-thumb-admin'); ?> <br /> </fieldset> <p class="title showhide"><?php _e('Javascript settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Lightbox compatibility', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="p_lightbox" <?php if ($post_thumbnail_settings['p_lightbox'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want Post-Thumb to add rel="lightbox" to every generated thumbnail.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Add Highslide effect to existing thumbnails in posts', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="pt_replace" <?php if ($post_thumbnail_settings['pt_replace'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want Post-Thumb to add Highslide expand effect to existing thumbnails in posts.', 'post-thumb-admin'); ?> <br /> </fieldset> <p class="title showhide"><?php _e('Highslide settings', 'post-thumb-admin'); ?> </p> <fieldset class="options ptswitch"> <p class="tabs"><?php _e('Add caption to images', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="p_caption" <?php if ($post_thumbnail_settings['p_caption'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to add a caption to each image.', 'post-thumb-admin'); ?> <br /> <br /> <p class="tabs"><?php _e('Replace wordTube media in posts', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="wt_media" <?php if ($post_thumbnail_settings['wt_media'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to replace wordTube media by thumbnail and popup frame.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Use PTPLAYLIST', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="wt_playlist" <?php if ($post_thumbnail_settings['wt_playlist'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to use PTPLAYLIST tag.', 'post-thumb-admin'); ?> <br /> <p class="tabs"><?php _e('Replace Youtube in posts', 'post-thumb-admin'); ?> </p> <input type="checkbox" name="ytb_media" <?php if ($post_thumbnail_settings['ytb_media'] == 'true') { echo 'checked'; } ?> /> <?php _e('Check this option if you want to replace Youtube by thumbnail and popup frame.', 'post-thumb-admin'); ?> <br /> </fieldset> <div class="submit"><input type="submit" name="info_update" value="<?php _e('Update', 'post-thumb-admin'); ?> " /></div> </div> <div id="pthelp"> <?php $this->Help(); ?> </div> </form> </div> <?php }