/**
  * Parse feeds into an array, ready to pass to the Javascript importer
  *
  * @param string $opml_url URL to parse feed data from, in the OPML standard.
  * @return array Associative array containing feed URL, title and category (if applicable)
  */
 protected function import_opml($opml_url)
 {
     if (empty($opml_url)) {
         MessageHandler::add_error(sprintf(_r('No OPML specified')));
         return false;
     }
     require_once LILINA_INCPATH . '/contrib/simplepie/simplepie.inc';
     $opml = new SimplePie_File($opml_url);
     $opml = new OPML($opml->body);
     if (!empty($opml->error) || empty($opml->data)) {
         MessageHandler::add_error(sprintf(_r('The OPML file could not be read. The parser said: %s'), $opml->error));
         return false;
     }
     $feeds_num = 0;
     foreach ($opml->data as $cat => $feed) {
         if (!isset($feed['xmlurl']) && isset($feed[0]['xmlurl'])) {
             foreach ($feed as $subfeed) {
                 $feeds[] = array('url' => $subfeed['xmlurl'], 'title' => $subfeed['title'], 'cat' => $cat);
                 ++$feeds_num;
             }
             continue;
         }
         $feeds[] = array('url' => $feed['xmlurl'], 'title' => $feed['title'], 'cat' => '');
         ++$feeds_num;
     }
     MessageHandler::add(sprintf(__ngettext('Adding %d feed', 'Adding %d feeds', $feeds_num), $feeds_num));
     return $feeds;
 }
Example #2
0
function wpmp_msma_overview($menu)
{
    $base = get_option('home');
    $post_count = wp_count_posts('post');
    $page_count = wp_count_posts('page');
    print "<p>";
    printf(__ngettext("You have one post", "You have %d posts", $c = 0 + $post_count->publish, 'wpmp'), $c);
    print ' ';
    printf(__ngettext("and one page", "and %d pages", $c = 0 + $page_count->publish, 'wpmp'), $c);
    print ' ' . __("contained within", 'wpmp') . ' ';
    printf(__ngettext("one category", "%d categories", $c = 0 + wp_count_terms('category'), 'wpmp'), $c);
    print ' ' . __("and", 'wpmp') . ' ';
    printf(__ngettext("one tag", "%d tags", $c = 0 + wp_count_terms('post_tag'), 'wpmp'), $c);
    print ".</p>";
    global $wpdb;
    $comments = $wpdb->get_results("SELECT count(*) as cnt FROM {$wpdb->comments} WHERE comment_approved='0'");
    $comment_count = $comments[0];
    printf("<p>" . __ngettext("You have one comment to moderate", "You have %d comments to moderate", $c = 0 + $comment_count->cnt, 'wpmp') . ".</p>", $c);
    print "<h3>" . __("Select an admin page:", 'wpmp') . "</h3>";
    print "<p><ul>";
    $not_first = false;
    foreach ($menu as $name => $link) {
        if ($name[0] != '_' && $not_first) {
            if (substr($link, 0, 7) != "http://" && substr($link, 0, 8) != "https://") {
                $link = $base . $link;
            }
            print "<li><a href='{$link}'>" . __("{$name}", 'wpmp') . "</a>";
        }
        $not_first = true;
    }
    print "</ul></p>";
    print "<p>" . sprintf(__("...or <a%s>return to the site</a>", 'wpmp'), " href='{$base}/'") . "</p>";
    print "<p>" . __("A subset of the full WordPress administration is available through this mobile interface.", 'wpmp') . "</p>";
}
function wpmp_theme_theme_admin()
{
    if (sizeof($_POST) > 0) {
        print '<div id="message" class="updated fade"><p><strong>' . wpmp_theme_options_write() . '</strong></p></div>';
        if (isset($_POST['wpmp_theme_transcoder_clear_cache_now']) && $_POST['wpmp_theme_transcoder_clear_cache_now'] == 'true') {
            if (function_exists('wpmp_transcoder_purge_cache') && ($count = wpmp_transcoder_purge_cache()) > 0) {
                print '<div id="message" class="updated fade"><p><strong>' . sprintf(__ngettext('One file cleared from image cache', '%d files cleared from image cache', $count, 'wpmp'), $count) . '</strong></p></div>';
            }
        }
    }
    include_once 'wpmp_theme_theme_admin.php';
}
Example #4
0
 /**
  * Outputs the name of Ads Place Size.
  *
  * Returns full Ads Place Size name.
  *
  * @since 0.1.1
  *
  * @param string $size Short name of Ads Place size
  * @return string value of Ads Place Size Name
  */
 private function getAdSize($value = '', $width = null, $height = null)
 {
     if ($value == '') {
         return null;
     }
     if ($value == 'custom') {
         return array('name' => __('Custom sizes', SAM_DOMAIN), 'width' => $width, 'height' => $height);
     }
     $aSizes = array('800x90' => sprintf('%1$s x %2$s %3$s', 800, 90, __('Large Leaderboard', SAM_DOMAIN)), '728x90' => sprintf('%1$s x %2$s %3$s', 728, 90, __('Leaderboard', SAM_DOMAIN)), '600x90' => sprintf('%1$s x %2$s %3$s', 600, 90, __('Small Leaderboard', SAM_DOMAIN)), '550x250' => sprintf('%1$s x %2$s %3$s', 550, 250, __('Mega Unit', SAM_DOMAIN)), '550x120' => sprintf('%1$s x %2$s %3$s', 550, 120, __('Small Leaderboard', SAM_DOMAIN)), '550x90' => sprintf('%1$s x %2$s %3$s', 550, 90, __('Small Leaderboard', SAM_DOMAIN)), '468x180' => sprintf('%1$s x %2$s %3$s', 468, 180, __('Tall Banner', SAM_DOMAIN)), '468x120' => sprintf('%1$s x %2$s %3$s', 468, 120, __('Tall Banner', SAM_DOMAIN)), '468x90' => sprintf('%1$s x %2$s %3$s', 468, 90, __('Tall Banner', SAM_DOMAIN)), '468x60' => sprintf('%1$s x %2$s %3$s', 468, 60, __('Banner', SAM_DOMAIN)), '450x90' => sprintf('%1$s x %2$s %3$s', 450, 90, __('Tall Banner', SAM_DOMAIN)), '430x90' => sprintf('%1$s x %2$s %3$s', 430, 90, __('Tall Banner', SAM_DOMAIN)), '400x90' => sprintf('%1$s x %2$s %3$s', 400, 90, __('Tall Banner', SAM_DOMAIN)), '234x60' => sprintf('%1$s x %2$s %3$s', 234, 60, __('Half Banner', SAM_DOMAIN)), '200x90' => sprintf('%1$s x %2$s %3$s', 200, 90, __('Tall Half Banner', SAM_DOMAIN)), '150x50' => sprintf('%1$s x %2$s %3$s', 150, 50, __('Half Banner', SAM_DOMAIN)), '120x90' => sprintf('%1$s x %2$s %3$s', 120, 90, __('Button', SAM_DOMAIN)), '120x60' => sprintf('%1$s x %2$s %3$s', 120, 60, __('Button', SAM_DOMAIN)), '83x31' => sprintf('%1$s x %2$s %3$s', 83, 31, __('Micro Bar', SAM_DOMAIN)), '728x15x4' => sprintf('%1$s x %2$s %3$s, %4$s', 728, 15, __('Thin Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 4, SAM_DOMAIN), 4)), '728x15x5' => sprintf('%1$s x %2$s %3$s, %4$s', 728, 15, __('Thin Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 5, SAM_DOMAIN), 5)), '468x15x4' => sprintf('%1$s x %2$s %3$s, %4$s', 468, 15, __('Thin Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 4, SAM_DOMAIN), 4)), '468x15x5' => sprintf('%1$s x %2$s %3$s, %4$s', 468, 15, __('Thin Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 5, SAM_DOMAIN), 5)), '160x600' => sprintf('%1$s x %2$s %3$s', 160, 600, __('Wide Skyscraper', SAM_DOMAIN)), '120x600' => sprintf('%1$s x %2$s %3$s', 120, 600, __('Skyscraper', SAM_DOMAIN)), '200x360' => sprintf('%1$s x %2$s %3$s', 200, 360, __('Wide Half Banner', SAM_DOMAIN)), '240x400' => sprintf('%1$s x %2$s %3$s', 240, 400, __('Vertical Rectangle', SAM_DOMAIN)), '180x300' => sprintf('%1$s x %2$s %3$s', 180, 300, __('Tall Rectangle', SAM_DOMAIN)), '200x270' => sprintf('%1$s x %2$s %3$s', 200, 270, __('Tall Rectangle', SAM_DOMAIN)), '120x240' => sprintf('%1$s x %2$s %3$s', 120, 240, __('Vertical Banner', SAM_DOMAIN)), '336x280' => sprintf('%1$s x %2$s %3$s', 336, 280, __('Large Rectangle', SAM_DOMAIN)), '336x160' => sprintf('%1$s x %2$s %3$s', 336, 160, __('Wide Rectangle', SAM_DOMAIN)), '334x100' => sprintf('%1$s x %2$s %3$s', 334, 100, __('Wide Rectangle', SAM_DOMAIN)), '300x250' => sprintf('%1$s x %2$s %3$s', 300, 250, __('Medium Rectangle', SAM_DOMAIN)), '300x150' => sprintf('%1$s x %2$s %3$s', 300, 150, __('Small Wide Rectangle', SAM_DOMAIN)), '300x125' => sprintf('%1$s x %2$s %3$s', 300, 125, __('Small Wide Rectangle', SAM_DOMAIN)), '300x70' => sprintf('%1$s x %2$s %3$s', 300, 70, __('Mini Wide Rectangle', SAM_DOMAIN)), '250x250' => sprintf('%1$s x %2$s %3$s', 250, 250, __('Square', SAM_DOMAIN)), '200x200' => sprintf('%1$s x %2$s %3$s', 200, 200, __('Small Square', SAM_DOMAIN)), '200x180' => sprintf('%1$s x %2$s %3$s', 200, 180, __('Small Rectangle', SAM_DOMAIN)), '180x150' => sprintf('%1$s x %2$s %3$s', 180, 150, __('Small Rectangle', SAM_DOMAIN)), '160x160' => sprintf('%1$s x %2$s %3$s', 160, 160, __('Small Square', SAM_DOMAIN)), '125x125' => sprintf('%1$s x %2$s %3$s', 125, 125, __('Button', SAM_DOMAIN)), '200x90x4' => sprintf('%1$s x %2$s %3$s, %4$s', 200, 90, __('Tall Half Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 4, SAM_DOMAIN), 4)), '200x90x5' => sprintf('%1$s x %2$s %3$s, %4$s', 200, 90, __('Tall Half Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 5, SAM_DOMAIN), 5)), '180x90x4' => sprintf('%1$s x %2$s %3$s, %4$s', 180, 90, __('Half Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 4, SAM_DOMAIN), 4)), '180x90x5' => sprintf('%1$s x %2$s %3$s, %4$s', 180, 90, __('Half Banner', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 5, SAM_DOMAIN), 5)), '160x90x4' => sprintf('%1$s x %2$s %3$s, %4$s', 160, 90, __('Tall Button', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 4, SAM_DOMAIN), 4)), '160x90x5' => sprintf('%1$s x %2$s %3$s, %4$s', 160, 90, __('Tall Button', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 5, SAM_DOMAIN), 5)), '120x90x4' => sprintf('%1$s x %2$s %3$s, %4$s', 120, 90, __('Button', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 4, SAM_DOMAIN), 4)), '120x90x5' => sprintf('%1$s x %2$s %3$s, %4$s', 120, 90, __('Button', SAM_DOMAIN), sprintf(__ngettext('%d Link', '%d Links', 5, SAM_DOMAIN), 5)));
     $aSize = explode("x", $value);
     //$aSize = preg_split("[x]", $value, null, PREG_SPLIT_NO_EMPTY);
     return array('name' => $aSizes[$value], 'width' => $aSize[0], 'height' => $aSize[1]);
 }
Example #5
0
 /**
  * Display widget
  */
 function widget($args, $instance)
 {
     global $wpdb, $current_user;
     if (!is_user_logged_in()) {
         return;
     }
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     // get number of PM
     $num_pm = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'pm WHERE `recipient` = "' . $current_user->user_login . '" AND `deleted` != "2"');
     $num_unread = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'pm WHERE `recipient` = "' . $current_user->user_login . '" AND `read` = 0 AND `deleted` != "2"');
     if (empty($num_pm)) {
         $num_pm = 0;
     }
     if (empty($num_unread)) {
         $num_unread = 0;
     }
     echo '<p><b>', sprintf(__ngettext('You have %d private message. %d unread.', 'You have %d private messages. %d unread.', $num_pm, 'pm4wp'), $num_pm, $num_unread), '</b></p>';
     if ($instance['num_pm']) {
         $msgs = $wpdb->get_results('SELECT `id`, `sender`, `subject`, `read`, `date` FROM ' . $wpdb->prefix . 'pm WHERE `recipient` = "' . $current_user->user_login . '" AND `deleted` != "2" ORDER BY `date` DESC LIMIT ' . $instance['num_pm']);
         if (count($msgs)) {
             echo '<ol>';
             foreach ($msgs as $msg) {
                 $msg->sender = $wpdb->get_var("SELECT display_name FROM {$wpdb->users} WHERE user_login = '******'");
                 echo '<li>';
                 if (!$msg->read) {
                     echo '<b>';
                 }
                 echo $msg->subject;
                 if (!$msg->read) {
                     echo '</b>';
                 }
                 printf(__('<br />by <b>%s</b><br />at %s', 'pm4wp'), $msg->sender, $msg->date);
                 echo '</li>';
             }
             echo '</ol>';
         }
     }
     echo '<p><a href="', get_bloginfo('wpurl'), '/wp-admin/admin.php?page=rwpm_inbox">', __('Click here to go to inbox', 'pm4wp'), ' &raquo;</a></p>';
     echo $after_widget;
 }
Example #6
0
 function wp_new_user_notification($user_id, $plaintext_pass = '')
 {
     global $wpdb, $mySabre;
     $user = new WP_User($user_id);
     $user_login = stripslashes($user->user_login);
     $user_email = stripslashes($user->user_email);
     $message = sprintf(__('New user registration on your site %s:', 'sabre'), get_option('blogname')) . "\r\n\r\n";
     $message .= sprintf(__('Username: %s', 'sabre'), $user_login) . "\r\n\r\n";
     $message .= sprintf(__('E-mail: %s', 'sabre'), $user_email) . "\r\n";
     $sabre_opt = $mySabre->get_option('sabre_opt');
     $mail_from = "From: ";
     $mail_from .= (!empty($sabre_opt['mail_from_name']) ? $sabre_opt['mail_from_name'] : get_option('blogname')) . " <";
     $mail_from .= (!empty($sabre_opt['mail_from_mail']) ? $sabre_opt['mail_from_mail'] : get_option('admin_email')) . ">";
     @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration', 'sabre'), get_option('blogname')), $message, $mail_from);
     if (empty($plaintext_pass)) {
         return;
     }
     if ($sabre_opt['user_pwd'] == 'true') {
         $plaintext_pass = $_POST['user_pwd1'];
         wp_set_password($plaintext_pass, $user_id);
         delete_user_setting('default_password_nag', $user_id);
         update_user_option($user_id, 'default_password_nag', false, true);
     }
     $message = sprintf(__('Thank you for registering on %s', 'sabre'), get_option('blogname')) . "\r\n\r\n";
     $message .= sprintf(__('Username: %s', 'sabre'), $user_login) . "\r\n";
     if ($sabre_opt['user_pwd'] == 'true') {
         $message .= __('Use the password defined during your registration', 'sabre') . "\r\n\r\n";
     } else {
         $message .= sprintf(__('Password: %s', 'sabre'), $plaintext_pass) . "\r\n\r\n";
     }
     if ($sabre_opt['enable_confirm'] == 'user') {
         $message .= sprintf(__ngettext('You must confirm your registration within %s day by following the link below', 'You must confirm your registration within %s days by following the link below', $sabre_opt['period'], 'sabre'), $sabre_opt['period']) . "\r\n\r\n";
         $message .= get_option('siteurl') . "/wp-login.php?sabre_confirm=" . md5($_POST['sabre_id']) . "\r\n";
     } elseif ($sabre_opt['enable_confirm'] == 'admin') {
         $message .= __('Your registration has to be validated by the administrator before you can sign on the site. You will be advised by e-mail upon completion.', 'sabre') . "\r\n\r\n";
         $message .= get_option('siteurl') . "/wp-login.php\r\n";
     } else {
         $message .= get_option('siteurl') . "/wp-login.php\r\n";
     }
     wp_mail($user_email, sprintf(__('[%s] - Your registration information', 'sabre'), get_option('blogname')), $message, $mail_from);
 }
Example #7
0
 function check_post_keyword($precheck = true)
 {
     global $wpdb;
     echo '<div class="narrow">';
     echo '<p><h3>' . __('Reading Bunny&#8217;s Technorati Tags&#8230;') . '</h3></p>';
     // import Bunny's Keywords tags
     $metakeys = $wpdb->get_results("SELECT post_id, meta_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE {$wpdb->postmeta}.meta_key = 'tags'");
     if (!is_array($metakeys)) {
         echo '<p>' . __('No Tags Found!') . '</p>';
         return false;
     } else {
         $count = count($metakeys);
         echo '<p>' . sprintf(__ngettext('Done! <strong>%s</strong> post with tags were read.', 'Done! <strong>%s</strong> posts with tags were read.', $count), $count) . '<br /></p>';
         echo '<ul>';
         foreach ($metakeys as $post_meta) {
             if ($post_meta->meta_value != '') {
                 $post_keys = explode(' ', $post_meta->meta_value);
                 foreach ($post_keys as $keyword) {
                     $keyword = addslashes(trim(str_replace('+', ' ', $keyword)));
                     if ('' != $keyword) {
                         echo '<li>' . $post_meta->post_id . '&nbsp;-&nbsp;' . $keyword . '</li>';
                         if (!$precheck) {
                             wp_add_post_tags($post_meta->post_id, $keyword);
                         }
                     }
                 }
             }
             if (!$precheck) {
                 delete_post_meta($post_meta->post_id, 'tags');
             }
         }
         echo '</ul>';
     }
     echo '<form action="admin.php?import=btt&amp;step=' . ($precheck ? 2 : 3) . '" method="post">';
     wp_nonce_field('import-btt');
     echo '<p class="submit"><input type="submit" name="submit" class="button" value="' . __('Next') . '" /></p>';
     echo '</form>';
     echo '</div>';
 }
Example #8
0
 function look_for_entities(&$cmt_object, $part)
 {
     $hit = $letter_entities = 0;
     if ($total = preg_match_all('|&#([0-9]{1,5});|', $cmt_object->{$part}, $matches)) {
         foreach ($matches[1] as $match) {
             if ($match >= 65 && $match <= 90 || $match >= 97 && $match <= 122) {
                 $letter_entities++;
             }
         }
     }
     if ($double_entities = preg_match_all('|&amp;#[0-9]{1,2};|', $cmt_object->{$part}, $matches)) {
         $log = sprintf(__ngettext("Comment %s contains %d <em>double</em> entity", "Comment %s contains %d <em>double</em> entities ", $double_entities, 'sk2'), $part, $double_entities) . " " . sprintf(__ngettext("and one regular entity coding for a letter (%d total).", " and %d regular entities coding for a letter (%d total).", $letter_entities, 'sk2'), $letter_entities, $total);
         $hit = $double_entities * 5 + $letter_entities * 2;
     } elseif ($letter_entities) {
         $log = sprintf(__ngettext("Comment %s contains %d entity coding for a letter (%d total).", "Comment one contains %d entities coding for a letter (%d total).", $letter_entities), $part, $letter_entities, $total, 'sk2');
         $hit = 1 + $letter_entities * 2;
     }
     if ($hit) {
         $this->log_msg($log, 2);
         $this->hit_karma($cmt_object, $hit, $log);
     }
 }
Example #9
0
 function add_menu()
 {
     add_menu_page(__ngettext('Gallery', 'Galleries', 1, 'nggallery'), __ngettext('Gallery', 'Galleries', 1, 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array(&$this, 'show_menu'), NGGALLERY_URLPATH . 'admin/images/nextgen.png');
     add_submenu_page(NGGFOLDER, __('Overview', 'nggallery'), __('Overview', 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Add Gallery / Images', 'nggallery'), __('Add Gallery / Images', 'nggallery'), 'NextGEN Upload images', 'nggallery-add-gallery', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __ngettext('Album', 'Albums', 1, 'nggallery'), __ngettext('Album', 'Albums', 1, 'nggallery'), 'NextGEN Edit album', 'nggallery-manage-album', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Tags', 'nggallery'), __('Tags', 'nggallery'), 'NextGEN Manage tags', 'nggallery-tags', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Options', 'nggallery'), __('Options', 'nggallery'), 'NextGEN Change options', 'nggallery-options', array(&$this, 'show_menu'));
     if (wpmu_enable_function('wpmuStyle')) {
         add_submenu_page(NGGFOLDER, __('Style', 'nggallery'), __('Style', 'nggallery'), 'NextGEN Change style', 'nggallery-style', array(&$this, 'show_menu'));
     }
     add_submenu_page(NGGFOLDER, __('Setup Gallery', 'nggallery'), __('Setup', 'nggallery'), 'activate_plugins', 'nggallery-setup', array(&$this, 'show_menu'));
     if (wpmu_enable_function('wpmuRoles')) {
         add_submenu_page(NGGFOLDER, __('Roles', 'nggallery'), __('Roles', 'nggallery'), 'activate_plugins', 'nggallery-roles', array(&$this, 'show_menu'));
     }
     add_submenu_page(NGGFOLDER, __('About this Gallery', 'nggallery'), __('About', 'nggallery'), 'NextGEN Gallery overview', 'nggallery-about', array(&$this, 'show_menu'));
     if (wpmu_site_admin()) {
         add_submenu_page('wpmu-admin.php', __('NextGEN Gallery', 'nggallery'), __('NextGEN Gallery', 'nggallery'), 'activate_plugins', 'nggallery-wpmu', array(&$this, 'show_menu'));
     }
     //register the column fields
     $this->register_columns();
 }
Example #10
0
/**
 * Show a summary of the used images
 * 
 * @return void
 */
function ngg_overview_right_now()
{
    global $wpdb;
    $images = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggpictures}"));
    $galleries = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggallery}"));
    $albums = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->nggalbum}"));
    ?>

<p class="sub"><?php 
    _e('At a Glance', 'nggallery');
    ?>
</p>
<div class="table">
	<table>
		<tbody>
			<tr class="first">
				<td class="first b"><a href="admin.php?page=nggallery-add-gallery"><?php 
    echo $images;
    ?>
</a></td>
				<td class="t"><?php 
    echo __ngettext('Image', 'Images', $images, 'nggallery');
    ?>
</td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
			<tr>
				<td class="first b"><a href="admin.php?page=nggallery-manage-gallery"><?php 
    echo $galleries;
    ?>
</a></td>
				<td class="t"><?php 
    echo __ngettext('Gallery', 'Galleries', $galleries, 'nggallery');
    ?>
</td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
			<tr>
				<td class="first b"><a href="admin.php?page=nggallery-manage-album"><?php 
    echo $albums;
    ?>
</a></td>
				<td class="t"><?php 
    echo __ngettext('Album', 'Albums', $albums, 'nggallery');
    ?>
</td>
				<td class="b"></td>
				<td class="last"></td>
			</tr>
		</tbody>
	</table>
</div>
<div class="versions">
    <p>
	<?php 
    if (current_user_can('NextGEN Upload images')) {
        ?>
<a class="button rbutton" href="admin.php?page=nggallery-add-gallery"><strong><?php 
        _e('Upload pictures', 'nggallery');
        ?>
</strong></a><?php 
    }
    ?>
	<?php 
    _e('Here you can control your images, galleries and albums.', 'nggallery');
    ?>
	</p>
	<span>
	<?php 
    $userlevel = '<span class="b">' . (current_user_can('manage_options') ? __('Gallery Administrator', 'nggallery') : __('Gallery Editor', 'nggallery')) . '</span>';
    printf(__('You currently have %s rights.', 'nggallery'), $userlevel);
    ?>
    </span>
</div>
<?php 
}
 function tags_tab()
 {
     $this->populate_tags();
     $tags_num = count($this->all_tags);
     echo '<br class="clear" />';
     if ($tags_num > 0) {
         screen_icon();
         echo '<h2>' . sprintf(__ngettext('Convert Tag to Category.', 'Convert Tags (%d) to Categories.', $tags_num), $tags_num) . '</h2>';
         echo '<div class="narrow">';
         echo '<p>' . __('Here you can selectively converts existing tags to categories. To get started, check the tags you wish to be converted, then click the Convert button.') . '</p>';
         echo '<p>' . __('The newly created categories will still be associated with the same posts.') . '</p></div>';
         $this->tags_form();
     } else {
         echo '<p>' . __('You have no tags to convert!') . '</p>';
     }
 }
			echo '<br />';
		}

		echo '</p></div>';
	}
}
?>
<div class="wrap">
<form id="posts-filter" action="" method="get">
<h2><?php _e('Manage Comments'); ?></h2>

<ul class="subsubsub">
<?php
$status_links = array();
$num_comments = wp_count_comments();
$stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 'approved' => _c('Approved|plural'));
$class = ( '' === $comment_status ) ? ' class="current"' : '';
$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
foreach ( $stati as $status => $label ) {
	$class = '';

	if ( $status == $comment_status )
		$class = ' class="current"';

	$status_links[] = "<li><a href=\"edit-comments.php?comment_status=$status\"$class>" . $label . '</a>';
}

$status_links = apply_filters( 'comment_status_links', $status_links );

echo implode(' | </li>', $status_links) . '</li>';
unset($status_links);
Example #13
0
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
    die(__('Please do not load this page directly. Thanks!', 'arras'));
}
if (post_password_required()) {
    _e('<p class="nocomments">This post is password protected. Enter the password to view comments.</p>', 'arras');
    return;
}
if (have_comments()) {
    ?>
	<?php 
    if (!empty($comments_by_type['comment'])) {
        ?>
  
	<h4 class="module-title"><?php 
        comments_number(__('No Comments', 'arras'), __('1 Comment', 'arras'), __ngettext('% Comment', '% Comments', get_comments_number(), 'arras'));
        ?>
</h4>
		<ol id="commentlist" class="clearfix">
			<?php 
        wp_list_comments('type=comment&callback=arras_list_comments');
        ?>
		</ol>
		<div class="comments-navigation clearfix">
			<div class="floatleft"><?php 
        previous_comments_link(__('&laquo; View Older', 'arras'));
        ?>
</div>
		    <div class="floatright"><?php 
        next_comments_link(__('View Newer &raquo;', 'arras'));
        ?>
Example #14
0
/** Only include this file if a database upgrade is called for.
 *  Otherwise it can be safely ignored. */
function ec3_upgrade_posts()
{
    if (!function_exists('__ngettext')) {
        function __ngettext($single, $plural, $number, $domain = 'default')
        {
            if ($number == 1) {
                return __($single, $domain);
            } else {
                return __($plural, $domain);
            }
        }
    }
    global $ec3, $post, $wpdb;
    $ec3->advanced = false;
    $changed = ec3_upgrade_posts_apply();
    $query =& new WP_Query();
    $query->query('nopaging=1&cat=' . $ec3->event_category);
    $format = 'Y-m-d H:i:s';
    $now = time();
    $rownum = 0;
    ?>

  <?php 
    if ($changed) {
        ?>

   <div id="message" class="updated fade"><p><strong>
   <?php 
        $msg = __ngettext('Post upgraded.', '%d posts upgraded.', $changed, 'ec3');
        echo sprintf($msg, $changed);
        ?>
   </strong></p></div>

  <?php 
    }
    ?>

  <div class="wrap">
  <form method="post">
  <h2><?php 
    _e('Upgrade Event Posts (from version 3.0)', 'ec3');
    ?>
</h2>

  <?php 
    if ($query->have_posts()) {
        ?>

  <input type="hidden" name="ec3_action" value="upgrade_posts" />
  <table class="widefat">

        <thead>
        <tr>
           <th scope="col">OK</th>
           <th scope="col">Title</th>
           <th scope="col">Post date</th>
           <th scope="col">Event date</th>
        </tr>
        </thead>

   <?php 
        while ($query->have_posts()) {
            $query->the_post();
            ?>

     <?php 
            if (empty($post->ec3_schedule)) {
                $post_date = get_post_time();
                $post_modified_date = get_post_modified_time();
                $rownum++;
                if ($rownum % 2) {
                    $rowclass = 'alternate ';
                } else {
                    $rowclass = '';
                }
                if ($post_modified_date >= $now) {
                    $errstyle = 'background-color:#fcc';
                } else {
                    $errstyle = '';
                }
                ?>

       <tr class="<?php 
                echo $rowclass;
                ?>
">
          <td>
           <input type="checkbox" name="ec3_upgrade_<?php 
                the_ID();
                ?>
"
            value="1" checked="checked" />
          </td>
          <td title="Post ID: <?php 
                the_ID();
                ?>
">
           <a target="_blank" href="<?php 
                the_permalink();
                ?>
">
            <?php 
                the_title();
                ?>
           </a>
          </td>
          <td>
           <input type="text" name="ec3_postdate_<?php 
                the_ID();
                ?>
"
            style="<?php 
                echo $errstyle;
                ?>
"
            value="<?php 
                echo date($format, $post_modified_date);
                ?>
" />
          </td>
          <td>
           <input type="text" name="ec3_eventdate_<?php 
                the_ID();
                ?>
"
            value="<?php 
                echo date($format, $post_date);
                ?>
" />
          </td>
       </tr>

     <?php 
            }
            ?>
   <?php 
        }
        ?>
   <?php 
        if ($rownum == 0) {
            ?>

       <tr><td>No posts to upgrade.</td></tr>

   <?php 
        }
        ?>

  </table>

  <p class="submit">

    <?php 
        if ($rownum > 0) {
            ?>

       <input type="submit" name="ec3_upgrade_posts"
        value="<?php 
            _e('Upgrade Event Posts', 'ec3');
            ?>
" />
       <input type="submit" name="ec3_cancel_upgrade"
        value="<?php 
            _e("Don't Upgrade Posts");
            ?>
" />

    <?php 
        } else {
            update_option('ec3_upgrade_posts', 0);
            ?>

       <input type="submit" name="ec3_cancel_upgrade"
        value="<?php 
            _e('OK');
            ?>
 &raquo;" />

    <?php 
        }
        ?>

  </p>

  <?php 
    }
    ?>

  </form>
  </div>

<?php 
}
Example #15
0
function WP_members_list_list()
{
    global $wp_roles, $getWP, $tern_wp_msg, $tern_wp_members_defaults, $current_user, $notice;
    get_currentuserinfo();
    $o = $getWP->getOption('tern_wp_members', $tern_wp_members_defaults);
    $wps = new WP_User_Search($_GET['query'], $_GET['userspage'], $_GET['role']);
    $paging_text = paginate_links(array('total' => ceil($wps->total_users_for_query / $wps->users_per_page), 'current' => $wps->page, 'base' => 'admin.php?page=members-list-edit-members-list&%_%', 'format' => 'userspage=%#%', 'add_args' => $args));
    if ($paging_text) {
        $paging_text = sprintf('<span class="displaying-num">' . __('Displaying %s&#8211;%s of %s') . '</span>%s', number_format_i18n(($wps->page - 1) * $wps->users_per_page + 1), number_format_i18n(min($wps->page * $wps->users_per_page, $wps->total_users_for_query)), number_format_i18n($wps->total_users_for_query), $paging_text);
    }
    ?>
	<div class="wrap">
		<div id="icon-users" class="icon32"><br /></div>
		<h2>Members List</h2>
		<?php 
    if (!empty($notice)) {
        ?>
<div id="notice" class="error"><p><?php 
        echo $notice;
        ?>
</p></div><?php 
    }
    ?>
		<p>Here you are able to select which of your members you'd like to show or hide in your members list. By default all members are showm.</p>
		<?php 
    if (!empty($tern_wp_msg)) {
        echo '<div id="message" class="updated fade"><p>' . $tern_wp_msg . '</p></div>';
    }
    ?>
		<div class="filter">
			<form id="list-filter" action="" method="get">
				<ul class="subsubsub">
					<?php 
    $l = array();
    $a = array();
    $u = get_users_of_blog();
    $t = count($u);
    foreach ((array) $u as $c) {
        $d = unserialize($c->meta_value);
        foreach ((array) $d as $e => $v) {
            if (!isset($a[$e])) {
                $a[$e] = 0;
            }
            $a[$e]++;
        }
    }
    unset($u);
    $current_role = false;
    $class = empty($role) ? ' class="current"' : '';
    $l[] = "<li><a href='admin.php?page=members-list-edit-members-list'{$class}>" . sprintf(__ngettext('All<span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $t), number_format_i18n($t)) . '</a>';
    foreach ($wp_roles->get_names() as $s => $name) {
        if (!isset($a[$s])) {
            continue;
        }
        $class = '';
        if ($s == $role) {
            $current_role = $role;
            $class = ' class="current"';
        }
        $name = translate_with_context($name);
        $name = sprintf(_c('%1$s <span class="count">(%2$s)</span>|user role with count'), $name, $a[$s]);
        $l[] = "<li><a href='admin.php?page=members-list-edit-members-list&role={$s}'{$class}>{$name}</a>";
    }
    echo implode(" |</li>\n", $l) . '</li>';
    unset($l);
    ?>
				</ul>
			</form>
		</div>
		<form class="search-form" action="" method="get">
			<p class="search-box">
				<label class="hidden" for="user-search-input">Search Users:</label>
				<input type="text" class="search-input" id="user-search-input" name="query" value="" />
				<input type="hidden" id="page" name="page" value="<?php 
    echo $_REQUEST['page'];
    ?>
" />
				<input type="submit" value="Search Users" class="button" />
			</p>
		</form>
		<form id="posts-filter" action="" method="get">
			<div class="tablenav">
				<?php 
    if ($wps->results_are_paged()) {
        ?>
					<div class="tablenav-pages"><?php 
        echo $paging_text;
        ?>
</div>
				<?php 
    }
    ?>
				<div class="alignleft actions">
					<select name="action">
						<option value="" selected="selected">Bulk Actions</option>
						<option value="show">Show</option>
						<option value="hide">Hide</option>
					</select>
					<input type="submit" value="Apply" name="doaction" id="doaction" class="button-secondary action" />
				</div>
				<br class="clear" />
			</div>
			<table class="widefat fixed" cellspacing="0">
				<thead>
				<tr class="thead">
					<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
					<th scope="col" id="username" class="manage-column column-username" style="">Username</th>
					<th scope="col" id="name" class="manage-column column-name" style="">Name</th>
					<th scope="col" id="email" class="manage-column column-email" style="">E-mail</th>
					<th scope="col" id="role" class="manage-column column-role" style="">Role</th>
					<th scope="col" id="displayed" class="manage-column column-displayed" style="">Displayed</th>
				</tr>
				</thead>
				<tfoot>
				<tr class="thead">
					<th scope="col"  class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
					<th scope="col"  class="manage-column column-username" style="">Username</th>
					<th scope="col"  class="manage-column column-name" style="">Name</th>
					<th scope="col"  class="manage-column column-email" style="">E-mail</th>
					<th scope="col"  class="manage-column column-role" style="">Role</th>
					<th scope="col" id="displayed" class="manage-column column-displayed" style="">Displayed</th>
				</tr>
				</tfoot>
				<tbody id="users" class="list:user user-list">
<?php 
    //
    $c = 0;
    //foreach($m as $u) {
    foreach ($wps->get_results() as $u) {
        $u = new WP_User($u);
        $r = $u->roles;
        $r = array_shift($r);
        if (!empty($_REQUEST['role']) and $_REQUEST['role'] != $r) {
            continue;
        }
        $d = is_float($c / 2) ? '' : ' class="alternate"';
        $nu = $current_user;
        $e = $u->ID == $nu->ID ? 'profile.php' : 'user-edit.php?user_id=' . $u->ID . '&#038;wp_http_referer=' . wp_get_referer();
        ?>
		<tr id='user-<?php 
        echo $u->ID;
        ?>
'<?php 
        echo $d;
        ?>
>
			<th scope='row' class='check-column'><input type='checkbox' name='users[]' id='user_<?php 
        echo $u->ID;
        ?>
' class='administrator' value='<?php 
        echo $u->ID;
        ?>
' /></th>
			<td class="username column-username">
				<?php 
        echo get_avatar($u->ID, 32);
        ?>
				<strong>
					<a href="<?php 
        echo $e;
        ?>
"><?php 
        echo $u->user_nicename;
        ?>
</a>
				</strong><br />
				<div class="row-actions">
					<span class='edit'><a href="admin.php?page=members-list-edit-members-list&users%5B%5D=<?php 
        echo $u->ID;
        ?>
&action=show&_wpnonce=<?php 
        echo wp_create_nonce('tern_wp_members_nonce');
        ?>
">Show</a> | </span>
					<span class='edit'><a href="admin.php?page=members-list-edit-members-list&users%5B%5D=<?php 
        echo $u->ID;
        ?>
&action=hide&_wpnonce=<?php 
        echo wp_create_nonce('tern_wp_members_nonce');
        ?>
">Hide</a></span>
				</div>
			</td>
			<td class="name column-name"><?php 
        echo $u->first_name . ' ' . $u->last_name;
        ?>
</td>
			<td class="email column-email"><a href='mailto:<?php 
        echo $u->user_email;
        ?>
' title='e-mail: <?php 
        echo $u->user_email;
        ?>
'><?php 
        echo $u->user_email;
        ?>
</a></td>
			<td class="role column-role"><?php 
        echo $r;
        ?>
</td>
			<td class="role column-displayed"><?php 
        if (!empty($o['hidden']) and in_array($u->ID, $o['hidden'])) {
            echo 'no';
        } else {
            echo 'yes';
        }
        ?>
</td>
		</tr>
<?php 
        $c++;
    }
    ?>
				</tbody>
			</table>
			<div class="tablenav">
				<div class="alignleft actions">
					<select name="action2">
						<option value="" selected="selected">Bulk Actions</option>
						<option value="show">Show</option>
						<option value="hide">Hide</option>
					</select>
					<input type="hidden" id="page" name="page" value="members-list-edit-members-list" />
					<input type="hidden" id="_wpnonce" name="_wpnonce" value="<?php 
    echo wp_create_nonce('tern_wp_members_nonce');
    ?>
" />
					<input type="submit" value="Apply" name="doaction2" id="doaction2" class="button-secondary action" />
				</div>
				<br class="clear" />
			</div>
		</form>
	</div>
<?php 
}
Example #16
0
    $num_posts = wp_count_posts('post', 'readable');
    $total_posts = array_sum((array) $num_posts);
    $class = empty($_GET['post_status']) ? ' class="current"' : '';
    $status_links[] = "<li><a href='edit.php' {$class}>" . sprintf(__ngettext('All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts), number_format_i18n($total_posts)) . '</a>';
    foreach ($post_stati as $status => $label) {
        $class = '';
        if (!in_array($status, $avail_post_stati)) {
            continue;
        }
        if (empty($num_posts->{$status})) {
            continue;
        }
        if (isset($_GET['post_status']) && $status == $_GET['post_status']) {
            $class = ' class="current"';
        }
        $status_links[] = "<li><a href='edit.php?post_status={$status}' {$class}>" . sprintf(__ngettext($label[2][0], $label[2][1], $num_posts->{$status}), number_format_i18n($num_posts->{$status})) . '</a>';
    }
    echo implode(" |</li>\n", $status_links) . '</li>';
    unset($status_links);
}
?>
</ul>

<p class="search-box">
	<label class="hidden" for="post-search-input"><?php 
_e('Search Posts');
?>
:</label>
	<input type="text" class="search-input" id="post-search-input" name="s" value="<?php 
the_search_query();
?>
Example #17
0
/**

based on: http://www.gyford.com/phil/writing/2006/12/02/quick_twitter.php

* Returns a relative date, eg "4 hrs ago".
*
* Assumes the passed-in can be parsed by strtotime.
* Precision could be one of:
* 	1	5 hours, 3 minutes, 2 seconds ago (not yet implemented).
* 	2	5 hours, 3 minutes
* 	3	5 hours
*
* This is all a little overkill, but copied from other places I've used it.
* Also superfluous, now I've noticed that the Twitter API includes something
* similar, but this version is more accurate and less verbose.
*
* @access private.
* @param string date In a format parseable by strtotime().
* @param integer precision
* @return string
*/
function aktt_relativeTime($date, $precision = 2)
{
    $now = time();
    $time = gmmktime(substr($date, 11, 2), substr($date, 14, 2), substr($date, 17, 2), substr($date, 5, 2), substr($date, 8, 2), substr($date, 0, 4));
    $time = strtotime(date('Y-m-d H:i:s', $time));
    $diff = $now - $time;
    $months = floor($diff / 2419200);
    $diff -= $months * 2419200;
    $weeks = floor($diff / 604800);
    $diff -= $weeks * 604800;
    $days = floor($diff / 86400);
    $diff -= $days * 86400;
    $hours = floor($diff / 3600);
    $diff -= $hours * 3600;
    $minutes = floor($diff / 60);
    $diff -= $minutes * 60;
    $seconds = $diff;
    if ($months > 0) {
        return date_i18n(__('Y-m-d', 'twitter-tools'), $time);
    } else {
        $relative_date = '';
        if ($weeks > 0) {
            // Weeks and days
            $relative_date .= ($relative_date ? ', ' : '') . $weeks . ' ' . __ngettext('week', 'weeks', $weeks, 'twitter-tools');
            if ($precision <= 2) {
                $relative_date .= $days > 0 ? ($relative_date ? ', ' : '') . $days . ' ' . __ngettext('day', 'days', $days, 'twitter-tools') : '';
                if ($precision == 1) {
                    $relative_date .= $hours > 0 ? ($relative_date ? ', ' : '') . $hours . ' ' . __ngettext('hr', 'hrs', $hours, 'twitter-tools') : '';
                }
            }
        } elseif ($days > 0) {
            // days and hours
            $relative_date .= ($relative_date ? ', ' : '') . $days . ' ' . __ngettext('day', 'days', $days, 'twitter-tools');
            if ($precision <= 2) {
                $relative_date .= $hours > 0 ? ($relative_date ? ', ' : '') . $hours . ' ' . __ngettext('hr', 'hrs', $hours, 'twitter-tools') : '';
                if ($precision == 1) {
                    $relative_date .= $minutes > 0 ? ($relative_date ? ', ' : '') . $minutes . ' ' . __ngettext('min', 'mins', $minutes, 'twitter-tools') : '';
                }
            }
        } elseif ($hours > 0) {
            // hours and minutes
            $relative_date .= ($relative_date ? ', ' : '') . $hours . ' ' . __ngettext('hr', 'hrs', $hours, 'twitter-tools');
            if ($precision <= 2) {
                $relative_date .= $minutes > 0 ? ($relative_date ? ', ' : '') . $minutes . ' ' . __ngettext('min', 'mins', $minutes, 'twitter-tools') : '';
                if ($precision == 1) {
                    $relative_date .= $seconds > 0 ? ($relative_date ? ', ' : '') . $seconds . ' ' . __ngettext('sec', 'secs', $seconds, 'twitter-tools') : '';
                }
            }
        } elseif ($minutes > 0) {
            // minutes only
            $relative_date .= ($relative_date ? ', ' : '') . $minutes . ' ' . __ngettext('min', 'mins', $minutes, 'twitter-tools');
            if ($precision == 1) {
                $relative_date .= $seconds > 0 ? ($relative_date ? ', ' : '') . $seconds . ' ' . __ngettext('sec', 'secs', $seconds, 'twitter-tools') : '';
            }
        } else {
            // seconds only
            $relative_date .= ($relative_date ? ', ' : '') . $seconds . ' ' . __ngettext('sec', 'secs', $seconds, 'twitter-tools');
        }
    }
    // Return relative date and add proper verbiage
    return sprintf(__('%s ago', 'twitter-tools'), $relative_date);
}
	/**
	 * Get and format tags from list ID (SQL Group Concat)
	 *
	 * @param array $terms
	 * @return string
	 */
	function getTagsFromID( $terms = '' ) {
		if ( empty($terms) ) {
			return '';
		}

		// Get tags since Term ID.
		$terms = (array) get_terms('post_tag', 'include='.$terms);
		if ( empty($terms) ) {
			return '';
		}

		// HTML Rel (tag/no-follow)
		$rel = $this->buildRel( $this->options['no_follow'] );

		$output = '';
		foreach ( $terms as $term ) {
			$output .= '<a href="'.get_tag_link($term->term_id).'" title="'.attribute_escape(sprintf( __ngettext('%d topic', '%d topics', $term->count, 'simpletags'), $term->count )).'" '.$rel.'>'.wp_specialchars($term->name).'</a>, ';
		}
		$output = substr($output, 0, strlen($output) - 2); // Remove latest ", "
		return $output;
	}
Example #19
0
 /**
  * Notifies the moderator of the blog about a new comment that is awaiting approval.
  *
  * @since 1.0
  * @uses $wpdb
  *
  * @param int $comment_id Comment ID
  * @return bool Always returns true
  */
 function wp_notify_moderator($comment_id)
 {
     global $wpdb;
     if (get_option("moderation_notify") == 0) {
         return true;
     }
     $comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->comments} WHERE comment_ID=%d LIMIT 1", $comment_id));
     $post = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->posts} WHERE ID=%d LIMIT 1", $comment->comment_post_ID));
     $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
     $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = '0'");
     switch ($comment->comment_type) {
         case 'trackback':
             $notify_message = sprintf(__('A new trackback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title) . "\r\n";
             $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
             $notify_message .= sprintf(__('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain) . "\r\n";
             $notify_message .= sprintf(__('URL    : %s'), $comment->comment_author_url) . "\r\n";
             $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
             break;
         case 'pingback':
             $notify_message = sprintf(__('A new pingback on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title) . "\r\n";
             $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
             $notify_message .= sprintf(__('Website : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain) . "\r\n";
             $notify_message .= sprintf(__('URL    : %s'), $comment->comment_author_url) . "\r\n";
             $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
             break;
         default:
             //Comments
             $notify_message = sprintf(__('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title) . "\r\n";
             $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
             $notify_message .= sprintf(__('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain) . "\r\n";
             $notify_message .= sprintf(__('E-mail : %s'), $comment->comment_author_email) . "\r\n";
             $notify_message .= sprintf(__('URL    : %s'), $comment->comment_author_url) . "\r\n";
             $notify_message .= sprintf(__('Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP) . "\r\n";
             $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
             break;
     }
     $notify_message .= sprintf(__('Approve it: %s'), admin_url("comment.php?action=mac&c={$comment_id}")) . "\r\n";
     $notify_message .= sprintf(__('Delete it: %s'), admin_url("comment.php?action=cdc&c={$comment_id}")) . "\r\n";
     $notify_message .= sprintf(__('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c={$comment_id}")) . "\r\n";
     $notify_message .= sprintf(__ngettext('Currently %s comment is waiting for approval. Please visit the moderation panel:', 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting)) . "\r\n";
     $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
     $subject = sprintf(__('[%1$s] Please moderate: "%2$s"'), get_option('blogname'), $post->post_title);
     $admin_email = get_option('admin_email');
     $notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id);
     $subject = apply_filters('comment_moderation_subject', $subject, $comment_id);
     @wp_mail($admin_email, $subject, $notify_message);
     return true;
 }
 function settings_general_edit()
 {
     global $wpdb, $wp_rewrite, $wp_version;
     podPress_isAuthorized();
     if (isset($_GET['updated']) && $_GET['updated'] == 'true') {
         echo '<div id="message" class="updated fade"><p>' . __('Settings Saved', 'podpress') . '</p></div>';
     } elseif (isset($_GET['updated']) && $_GET['updated'] != 'true') {
         echo '<div id="message" class="error fade"><p>' . __('<strong>Error:</strong> Unable to save the settings', 'podpress') . '</p></div>';
     }
     // ntm: where is the check? some times this message appears despite the fact that the theme has the necessary functions and hooks
     // Because it is not a hundred percent reliable I deactivate it for now
     //~ if(!$this->settings['compatibilityChecks']['wp_head'] || !$this->settings['compatibilityChecks']['wp_footer']) {
     //~ echo '<div class="wrap">'."\n";
     //~ if($this->settings['compatibilityChecks']['themeTested']) {
     //~ echo '	<h2>'.__('Theme Compatibility Problem', 'podpress').'</h2>'."\n";
     //~ } else {
     //~ echo '	<h2>'.__('Theme Compatibility Check Required', 'podpress').'</h2>'."\n";
     //~ }
     //~ echo '	<fieldset class="options">'."\n";
     //~ if($this->settings['compatibilityChecks']['themeTested']) {
     //~ echo '		<legend>'.__('Current Theme is not compliant', 'podpress').'</legend>'."\n";
     //~ } else {
     //~ echo '		<legend>'.__('Current Theme needs to be tested', 'podpress').'</legend>'."\n";
     //~ }
     //~ echo '		<table width="100%" cellspacing="2" cellpadding="5" class="editform">'."\n";
     //~ echo '			<tr>'."\n";
     //~ echo '				<td>'."\n";
     //~ if($this->settings['compatibilityChecks']['themeTested']) {
     //~ echo '				podPress has found the "'.get_current_theme().'" theme fails to meet important requirements.<br /><br />'."\n";
     //~ } else {
     //~ echo '				podPress has not yet detected the "'.get_current_theme().'" theme to be compliant. Please visit your <a href="'.podPress_siteurl().'">main blog page</a> for podPress to re-check.<br /><br />'."\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.<br />'."\n";
     //~ echo '				Change this:<br />'."\n";
     //~ echo '				<code>&lt;head&gt;</code><br />'."\n";
     //~ echo '				To this:<br />'."\n";
     //~ echo '				<code>&lt;?php wp_head(); ?&gt;'."<br />\n".'&lt;head&gt;</code><br />'."\n";
     //~ echo '				<br />'."\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.<br />'."\n";
     //~ echo '				Change this:<br />'."\n";
     //~ echo '				<code>&lt;/body&gt;</code><br />'."\n";
     //~ echo '				To this:<br />'."\n";
     //~ echo '				<code>&lt;?php wp_footer(); ?&gt;'."<br />\n".'&lt;/body&gt;</code><br />'."\n";
     //~ }
     //~ echo '				Look at the default theme files for example.<br />'."\n";
     //~ echo '				</td>'."\n";
     //~ echo '			</tr> '."\n";
     //~ echo '		</table>'."\n";
     //~ echo '	</fieldset>'."\n";
     //~ echo '</div>'."\n";
     //~ }
     echo '<div class="wrap">' . "\n";
     if (TRUE == version_compare($wp_version, '2.7', '>=')) {
         echo '<div id="podpress-icon" class="icon32"><br /></div>';
     }
     if (TRUE == version_compare($wp_version, '2.8', '>=')) {
         echo '	<h2>' . __('General Settings', 'podpress') . '</h2>' . "\n";
         // get the plugins version information via the WP plugins version check
         if (TRUE == version_compare($wp_version, '2.9', '>=')) {
             $versioninfo = get_site_transient('update_plugins');
         } else {
             $versioninfo = get_transient('update_plugins');
         }
         // If there is a new version then there is a 'response'. This is the method from the plugins page.
         if (FALSE !== isset($versioninfo->response[plugin_basename(dirname(__FILE__) . '/podpress.php')]->new_version)) {
             echo '<div class="podpress_notice"><p><a href="http://wordpress.org/extend/plugins/podpress/" target="_blank">' . __('a new podPress version is available', 'podpress') . '</a></p></div>';
         }
     } else {
         echo '	<h2>' . __('General Settings', 'podpress') . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.mightyseek.com/podpress/#download" target="_new"><img src="http://www.mightyseek.com/podpress_downloads/versioncheck.php?current=' . PODPRESS_VERSION . '" alt="' . __('Checking for updates... Failed.', 'podpress') . '" border="0" /></a></h2>' . "\n";
     }
     echo '	<form method="post">' . "\n";
     if (function_exists('wp_nonce_field')) {
         // since WP 2.0.4
         wp_nonce_field('podPress_general_options_nonce');
     }
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Location of the Media Files', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="mediaWebPath">' . __('URL of the media files directory', 'podpress') . '</label> <a href="javascript:void(null);" onclick="javascript: podPressShowHideRow(\'mediaWebPathHelp\');">(?)</a>:</th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="text" id="mediaWebPath" name="mediaWebPath" class="podpress_wide_text_field" size="40" value="' . attribute_escape(stripslashes($this->settings['mediaWebPath'])) . '" /><br />' . "\n";
     if (!isset($this->settings['mediaWebPath']) || empty($this->settings['mediaWebPath'])) {
         echo "<br />\n";
         echo __('Suggested', 'podpress') . ': <code>' . $this->uploadurl . '</code>' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr>' . "\n";
     echo '			<tr id="mediaWebPathHelp" style="display: none;">' . "\n";
     echo '				<th>&nbsp;</th>' . "\n";
     echo '				<td>';
     echo '					' . sprintf(__('Point this to the full URL where you put your media files. It can be an URL to a local or remote location. The default value is the URL of the upload folder of this blog for example: <code>%1$s</code>', 'podpress'), $this->uploadurl) . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="mediaFilePath">' . __('Absolute path of the media files directory (optional)', 'podpress') . '</label> <a href="javascript:void(null);" onclick="javascript: podPressShowHideRow(\'mediaFilePathHelp\');">(?)</a>:</th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="text" id="mediaFilePath" name="mediaFilePath" class="podpress_wide_text_field" size="40" value="' . attribute_escape(stripslashes($this->settings['mediaFilePath'])) . '" /><br />' . "\n";
     $this->checkLocalPathToMediaFiles();
     if (!empty($this->settings['autoDetectedMediaFilePath']) and !empty($this->settings['mediaFilePath'])) {
         echo __('This directory is not valid or not accessible.', 'podpress') . '<br /> ' . __('Suggested', 'podpress') . ': <code>' . $this->settings['autoDetectedMediaFilePath'] . '</code>' . "\n";
     } elseif (empty($this->settings['mediaFilePath'])) {
         echo __('e.g.', 'podpress') . ': <code>' . $this->settings['autoDetectedMediaFilePath'] . '</code>' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="mediaFilePathHelp" style="display: none;">' . "\n";
     echo '				<th>&nbsp;</th>' . "\n";
     echo '				<td>';
     echo '					' . sprintf(__('This is an optional feature which is used to speed up the time/duration detection process, and is only possible if you host the media files on the same server as your website. Instead of having to go download a file, it can read e.g. the ID3 information of a media file directly.<br />Insert the full path name of the folder which includes the media files. The URL and this path needs to point to the same directory. This path name could look like <code>/home/yoursite/http/wp-content/files/</code> or can be the path of the upload folder of this blog: <code>%1$s</code>.', 'podpress'), $this->uploadpath) . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     $home_path = get_home_path();
     $trac_folder_exists = is_dir(ABSPATH . 'podpress_trac');
     $trac_htaccess_exists = file_exists(ABSPATH . 'podpress_trac/.htaccess');
     $trac_index_exists = file_exists(ABSPATH . 'podpress_trac/index.php');
     if (TRUE == $trac_htaccess_exists and TRUE == $trac_htaccess_exists and TRUE == $trac_htaccess_exists) {
         $podpress_trac_in_place = TRUE;
         $podpress_trac_str = '<input type="hidden" id="podpress_trac_folder_in_place" value="true" />';
     } else {
         $podpress_trac_in_place = FALSE;
         $podpress_trac_str = '<input type="hidden" id="podpress_trac_folder_in_place" value="false" />' . "\n";
         $podpress_trac_str .= "\t\t\t\t\t" . '<input type="hidden" id="podpress_trac_folder_exists" value="' . var_export($trac_folder_exists, TRUE) . '" />' . "\n";
         $podpress_trac_str .= "\t\t\t\t\t" . '<input type="hidden" id="podpress_trac_index_exists" value="' . var_export($trac_index_exists, TRUE) . '" />' . "\n";
         $podpress_trac_str .= "\t\t\t\t\t" . '<input type="hidden" id="podpress_trac_htaccess_exists" value="' . var_export($trac_htaccess_exists, TRUE) . '" />';
     }
     if (FALSE === $podpress_trac_in_place and $this->settings['statMethod'] == 'podpress_trac_dir') {
         $showpodpress_tracWarning = 'style="display: block;"';
     } else {
         $showpodpress_tracWarning = 'style="display: none;"';
     }
     $permalink_structure = get_option('permalink_structure');
     if (FALSE === empty($permalink_structure)) {
         $usingpi = TRUE;
         $usingpi_str = '<input type="hidden" id="podpress_usingpermalinks" value="true" />';
     } else {
         $usingpi = FALSE;
         $usingpi_str = '<input type="hidden" id="podpress_usingpermalinks" value="false" />';
     }
     //if (!$usingpi && !$hasHtaccess && $this->settings['statMethod'] == 'permalinks') {
     if (!$usingpi && $this->settings['statMethod'] == 'permalinks') {
         $showPermalinksWarning = 'style="display: block;"';
     } else {
         $showPermalinksWarning = 'style="display: none;"';
     }
     if (function_exists('get_admin_url')) {
         $adminurl = get_admin_url();
         // since WP 3.0
     } elseif (function_exists('admin_url')) {
         $adminurl = admin_url();
         // since WP 2.6
     } else {
         $adminurl = get_option('siteurl') . '/wp-admin';
     }
     $permalinksettingsurl = trailingslashit($adminurl) . 'options-permalink.php';
     if (!$this->settings['enableStats']) {
         $showStatsOptions = 'style="display: none;"';
     }
     if (TRUE == defined('MULTISITE') and TRUE === constant('MULTISITE') and function_exists('get_blog_count')) {
         // get_blog_count exists only if it is a multi site installation
         $multisite_permalink_msg = '<p class="podpress_notice">' . sprintf(__('<strong>Notice:</strong> This blog is part of a multi site blog installation. It might be possible that the method "Use WP Permalinks" works without changing the permalink setting of this particular blog to something other than the default setting. Use the stats method test and control whether it is possible to download and play the media files in your posts. If those tests are not successful then adjust the <a href="%1$s">Permalink Settings of this blog</a>.', 'podpress'), $permalinksettingsurl) . '</p>';
         $podpress_trac_msg = '<p class="podpress_notice">' . __('<strong>Notice:</strong> This blog is part of a multi site blog installation. It might be possible that the method "Optional Files podpress_trac directory" works without copying the podpress_trac folder and its files. Use the stats method test and control whether it is possible to download and play the media files in your posts. If those tests are not successful then follow the explanation of this method (see below).', 'podpress') . '</p>';
     } else {
         $multisite_permalink_msg = '';
         $podpress_trac_msg = '';
     }
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Download Statistics', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enableStats">' . __('Enable Statistics', 'podpress') . ':</label></th>' . "\n";
     echo '				<td class="podpress_settings_narrow_col">' . "\n";
     echo '					<input type="checkbox" name="enableStats" id="enableStats" ';
     if ($this->settings['enableStats']) {
         echo 'checked="checked"';
     }
     echo " onclick=\"javascript: podPressShowHideRow('statWarning'); podPressShowHideRow('statMethodWrapper'); podPressShowHideRow('statMethodHelp'); podPressShowHideRow('statsmethodtest'); podPressShowHideRow('statsmethodtesthelp'); podPressShowHideRow('statLoggingWrapper'); podPressShowHideRow('statLoggingHelp'); podPressShowHideRow('3rdpartyinfo'); podPressShowHideRow('podtracrow'); podPressShowHideRow('blubrryrow'); podPressShowHideRow('statBluBrryWrapper'); podPressShowHideRow('3rdpartystatsrow'); podPressShowHideRow('3rdpartystatsnoticerow'); podPressShowHideRow('disabledashboardwidgetrow'); \"/>\n";
     echo '					' . $usingpi_str . "\n";
     echo '					' . $podpress_trac_str . "\n";
     echo '				</td>' . "\n";
     echo '				<td>' . __('This will enable the podPress statistics features.', 'podpress') . ' ' . $perm . '</td>' . "\n";
     //echo '				<td>'.__('This will enable the podPress statistics features and give possibility to use the statistics from <a href="http://www.blubrry.com/podpress/" target="_blank">blubrry</a> or <a href="http://www.podtrac.com/" target="_blank">Podtrac</a> the included stats support in podPress.', 'podpress').' '.$perm.'</td>'."\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statWarning" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2">' . "\n";
     echo '					<div id="permalinksWarning" ' . $showPermalinksWarning . '>' . "\n";
     echo '						<p class="podpress_error">' . sprintf(__('<strong>Warning:</strong> It appears you are not using WordPress permalinks or at least not a non-default permalink setting. If you want to use this statistic method, you need to choose a permalink structure which is different to the default setting. Go to the <a href="%1$s">Permalink Settings of your blog</a> and change that first. Otherwise enabling this statistics feature will most likely cause downloads of media files which were added with podPress to fail.', 'podpress'), $permalinksettingsurl) . '</p>' . "\n";
     echo '						' . $multisite_permalink_msg . "\n";
     echo '					</div>' . "\n";
     echo '					<div id="podpress_trac_dirWarning" ' . $showpodpress_tracWarning . '>' . "\n";
     echo '						<p class="podpress_error">' . __('<strong>Warning:</strong> The "Optional Files podpress_trac directory" statistic method will not work. Because the podpress_trac folder or the files are not in the right place:', 'podpress');
     echo '						<br />' . __('- podpress_trac folder exists at the right place:', 'podpress');
     if (TRUE === $trac_folder_exists) {
         echo ' ' . __('true', 'podpress') . "\n";
     } else {
         echo ' <strong>' . __('false', 'podpress') . '</strong>' . "\n";
     }
     echo '						<br />' . __('- the .htacces file in the podpress_trac folder exists:', 'podpress');
     if (TRUE === $trac_htaccess_exists) {
         echo ' ' . __('true', 'podpress') . "\n";
     } else {
         echo ' <strong>' . __('false', 'podpress') . '</strong>' . "\n";
     }
     echo '						<br />' . __('- the index.php file in the podpress_trac folder exists:', 'podpress');
     if (TRUE === $trac_index_exists) {
         echo ' ' . __('true', 'podpress') . "\n";
     } else {
         echo ' <strong>' . __('false', 'podpress') . '</strong>' . "\n";
     }
     echo '						</p>' . "\n";
     echo '						' . $podpress_trac_msg . "\n";
     echo '					</div>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statMethodWrapper" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="statMethod">' . __('Stat Method', 'podpress') . ':</label></th>' . "\n";
     echo '				<td colspan="2">';
     echo '					<select name="statMethod" id="statMethod" onchange="podpress_check_method_requirements(this.value);">' . "\n";
     echo '						<option value="permalinks" ';
     if ($this->settings['statMethod'] == 'permalinks') {
         echo 'selected="selected"';
     }
     echo '>' . __('Use WP Permalinks (recommended)', 'podpress') . '</option>' . "\n";
     echo '						<option value="podpress_trac_dir" ';
     if ($this->settings['statMethod'] == 'podpress_trac_dir') {
         echo 'selected="selected"';
     }
     echo '>' . __('Optional Files podpress_trac directory', 'podpress') . '</option>' . "\n";
     echo '						<option value="download.mp3" ';
     if ($this->settings['statMethod'] == 'download.mp3') {
         echo 'selected="selected"';
     }
     echo '>' . __('Use download.mp3', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statMethodHelp" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">';
     echo '				<ul>' . "\n";
     echo '				<li>' . sprintf(__('"Use WP Permalinks" (recommended) - Requires a non-default permalink structure (go to <a href="%1$s">Settings > Permalinks</a>). Activating any non-default permalink setting in Wordpress will create an <a href="http://en.wikipedia.org/wiki/.htaccess" target="_blank" title="en.Wikipedia: .htaccess">.htaccess</a> file (or <a href="http://en.wikipedia.org/wiki/Web.config" target="_blank" title="en.Wikipedia: Web.config">web.config</a> file on some web-servers) in the base directory of your blog which podpress needs to support tracking statistics. If enabling permalinks in Wordpress breaks your download links or results in a "File not found" error when using the media player, then you should look into using one of the other methods for tracking statistics.', 'podpress'), $permalinksettingsurl) . '</li>';
     echo '				<li>' . __('"Optional Files podpress_trac directory" - If you cannot use WP permalinks and you run <a href="http://en.wikipedia.org/wiki/Apache_HTTP_Server" target="_blank" title="en.Wikipedia: Apache HTTP Server">Apache</a>, this option may work (depending on the webserver configuration - see details below*). If you choose this option then you need to copy the folder podpress_trac/ including the two files (index.php and .htaccess) to the root folder of your blog. After copying these files the root folder should contain wp-config.php and four subdirectories; wp-admin, wp-content, wp-includes and podpress_trac. The podpress_trac folder contains an .htaccess file and an index.php file which enable podpress to resolve URLs of the media files which will be tracked by the statistics features in podPress. The copied folder and the files should be given the same filesystem permissions as the other folders and files in your WordPress install.<br />*If this method fails after copying the required files and setting the permissions it could be that your server is configured to ignore directory-level .htaccess files. Shared hosting users may need to contact their support to allow these files. If you are configuring your own Apache server the podpress_trac folder needs to have <code>AllowOverride FileInfo Options</code> or <code>AllowOverride All</code>. You can find the necessary configuration details here: <a href="http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride" target="_blank">http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride</a>.', 'podpress') . '</li>';
     echo '				<li>' . __('"Use download.mp3" - This is an alternative to using an .htaccess file. This is provided for sites which run webservers that do not use the .htaccess file for configuration, such as Microsoft Internet Information Server (IIS).<br />To use this option, you will need to configure your web server to process .mp3 files the same way it does .php files. This is only necessary for the podPress directory, so that the download.mp3 file will be processed as a .php file.<br />If you do not know the type or version of the webserver you are using you can retrieve the information by using WP plugins like <a href="http://wordpress.org/extend/plugins/wp-system-health/" target="_blank">WP System Health</a> or <a href="http://wordpress.org/extend/plugins/system-information/" target="_blank">System information</a>.', 'podpress') . '</li>';
     echo '				<ul>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statsmethodtest" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="statsmethodtest">' . __('Test the stat method', 'podpress') . ':</label></th>' . "\n";
     echo '				<td colspan="2">' . "\n";
     echo '					<input type="button" name="statTest" value="' . __('start the test', 'podpress') . '" onclick="podPressTestStats(\'' . get_bloginfo('home') . '/podpress_trac/web/0/0/podPressStatTest.txt\')"/>' . "\n";
     // WP 3.0 compatible
     echo '					<input type="text" name="statTestResult" id="statTestResult" size="30" value="" readonly="readonly" />' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statsmethodtesthelp" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">';
     echo '				' . __('This test can help you to determine whether your podPress statistics method setting will work under the current circumstances or not.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statLoggingWrapper" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="statLogging">' . __('Stat Logging', 'podpress') . ':</label></th>' . "\n";
     echo '				<td colspan="2">';
     echo '					<select name="statLogging" id="statLogging">' . "\n";
     echo '						<option value="Counts" ';
     if ($this->settings['statLogging'] == 'Counts') {
         echo 'selected="selected"';
     }
     echo '>' . __('Counts Only (recommended)', 'podpress') . '</option>' . "\n";
     echo '						<option value="Full" ';
     if ($this->settings['statLogging'] == 'Full') {
         echo 'selected="selected"';
     }
     echo '>' . __('Full', 'podpress') . '</option>' . "\n";
     echo '						<option value="FullPlus" ';
     if ($this->settings['statLogging'] == 'FullPlus') {
         echo 'selected="selected"';
     }
     echo '>' . __('Full+', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     unset($x);
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statLoggingHelp" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">';
     echo '				<ul>' . "\n";
     echo '				<li>' . __('"Counts Only" (recommended) - podPress counts only how many times a media was downloaded from the website, the feeds and how often the player of this file was started. Your media files should have unique file names. (The db table name is e.g. wp_podpress_statcounts.)', 'podpress') . '</li>';
     echo '				<li>' . __('"Full" - With this option podPress will log how many times a media was downloaded from the website, the feeds and how often the player of this file was started. It will also log on each download the ID of the post (or page), the IP address, the referrer, the browser type (User Agent) and the time of the download. Furthermore podPress parses the referer and user agent information and store the information in separate columns in the database.<br />Full includes also the posssibility to mark downloads on the basis of user agent names and IP addresses as downloads of <a href="http://en.wikipedia.org/wiki/Internet_bot" target="_blank" title="en.Wikipedia: Internet bot">Internets bots</a> and filter the statistic tables and graphs. (The db table name is e.g. wp_podpress_stats.) If you add more than one media file to a post (with podPress) then these files should have different file names.', 'podpress') . '</li>';
     echo '				<li>' . __('"Full+" (experimental) - If you would like to know all the information "Full" gives you and additionally whether a download has been completed or not. podPress can only try to find out whether a file transfer was complete, if the file is on the same server as your blog (if it is a local file for the script). If you add more than one media file to a post (with podPress) then these files should have different file names. In order to get the information whetehr a download was complete or not podPress (or at least a PHP script of podPress) needs to run during the whole download. But this may lead to problems if the file is relative big or the maximum execution time for PHP scripts is relative short on the server of your blog. If the time limit is reached the download stops. So if you are not allowed to change the max_execution_time setting of the PHP configuration on the server of your blog or if you are unsure what this all means then please use the "Full" method (as recommended).', 'podpress') . '</li>';
     echo '				<ul>' . "\n";
     echo '				' . __('Note that if you enable the statistics, the Counts Only counter counts always even if you choose Full or Full+ but not vice versa.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     if (TRUE == version_compare($wp_version, '2.5', '>=') and TRUE == version_compare($wp_version, '2.7', '<')) {
         $this->settings['disabledashboardwidget'] = TRUE;
         $descwidget_disabled = ' disabled = "disabled"';
         $descwidget_notice = __('podPress offers no Dashboard Widget for WP 2.5.x and WP 2.6.x.', 'podpress');
     } else {
         $descwidget_disabled = '';
         $descwidget_notice = '';
     }
     echo '			<tr id="disabledashboardwidgetrow" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="disabledashboardwidget">' . __('Disable the dashboard widget', 'podpress') . ':</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="disabledashboardwidget" id="disabledashboardwidget" value="yes"';
     if (isset($this->settings['disabledashboardwidget']) and TRUE === $this->settings['disabledashboardwidget']) {
         echo 'checked="checked"';
     }
     echo $descwidget_disabled . ' />' . "\n";
     echo '				</td>' . "\n";
     echo '				<td>' . $descwidget_notice . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_3RD_PARTY_STATS in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_3RD_PARTY_STATS') and TRUE === constant('PODPRESS_ACTIVATE_3RD_PARTY_STATS')) {
         switch ($this->settings['enable3rdPartyStats']) {
             case 'PodTrac':
                 $podtrac_checked = ' checked="checked"';
                 $blubrry_checked = '';
                 $disable3rdparty_checked = '';
                 break;
             case 'Blubrry':
                 $podtrac_checked = '';
                 $blubrry_checked = ' checked="checked"';
                 $disable3rdparty_checked = '';
                 break;
             default:
                 $podtrac_checked = '';
                 $blubrry_checked = '';
                 $disable3rdparty_checked = ' checked="checked"';
                 break;
         }
         $podtrac_disabled = '';
         $blubrry_disabled = '';
         $blubrry_readonly = '';
     } else {
         $podtrac_disabled = ' disabled = "disabled"';
         $blubrry_disabled = ' disabled = "disabled"';
         $blubrry_readonly = 'readonly = "readonly"';
         $podtrac_checked = '';
         $blubrry_checked = '';
         $disable3rdparty_checked = ' checked="checked"';
     }
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_3RD_PARTY_STATS in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_3RD_PARTY_STATS') and TRUE === constant('PODPRESS_ACTIVATE_3RD_PARTY_STATS')) {
         echo '			<tr id="3rdpartyinfo" class="podpress_settings_headerrow" ' . $showStatsOptions . '>' . "\n";
         echo '				<th colspan="3"' . $thirdpartystats_class . '>' . __('In addition to the podPress own counter mechanisms, you can use one from a company:', 'podpress') . '</th>' . "\n";
         echo '			</tr> ' . "\n";
         echo '			<tr id="podtracrow" ' . $showStatsOptions . '>' . "\n";
         echo '				<th><label for="enablePodTracStats">' . __('Enable Podtrac Statistics', 'podpress') . ':</label></th>' . "\n";
         echo '				<td>' . "\n";
         echo '					<input type="radio" name="enable3rdPartyStats" id="enablePodTracStats" value="PodTrac"' . $podtrac_checked . $podtrac_disabled . ' />' . "\n";
         echo '				</td>' . "\n";
         echo '				<td>' . __('This will use the Podtrac service. <a href="http://www.podtrac.com/" target="_new">More info ...</a>', 'podpress') . '</td>' . "\n";
         echo '			</tr> ' . "\n";
         echo '			<tr id="blubrryrow" ' . $showStatsOptions . '>' . "\n";
         echo '				<th><label for="enableBlubrryStats">' . __('Enable blubrry Statistics', 'podpress') . ':</label></th>' . "\n";
         echo '				<td>' . "\n";
         echo '					<input type="radio" name="enable3rdPartyStats" id="enableBlubrryStats" value="Blubrry"' . $blubrry_checked . $blubrry_disabled . ' />' . "\n";
         echo '				</td>' . "\n";
         echo '				<td>' . __('This will use the blubrry service. (You need use a non-default Permalink scheme.) <a href="http://www.blubrry.com/podpress/" target="_new">More info ...</a>', 'podpress') . '</td>' . "\n";
         echo '			</tr> ' . "\n";
         echo '			<tr id="statBluBrryWrapper" ' . $showStatsOptions . '>' . "\n";
         echo '				<th></th>' . "\n";
         echo '				<td></td>' . "\n";
         echo '				<td>';
         echo '					<label for="statBluBrryProgramKeyword">' . __('Program Keyword', 'podpress') . '</label>:';
         echo '					<input type="input" name="statBluBrryProgramKeyword" id="statBluBrryProgramKeyword" ' . $blubrry_readonly . ' value="' . $this->settings['statBluBrryProgramKeyword'] . '"/>';
         echo '				</td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     echo '			<tr id="3rdpartystatsrow" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="disable3rdPartyStats">' . __('Disable 3rd Party Statistics', 'podpress') . ':</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="radio" name="enable3rdPartyStats" id="disable3rdPartyStats" value="No"' . $disable3rdparty_checked . ' />' . "\n";
     echo '				</td>' . "\n";
     echo '				<td></td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="3rdpartystatsnoticerow" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2">' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_3RD_PARTY_STATS in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_3RD_PARTY_STATS') and TRUE === constant('PODPRESS_ACTIVATE_3RD_PARTY_STATS')) {
         echo '					' . __('You can use only one of these services together with the podPress statistics at the same time. If you want to have more or different statistics then you could use the service of e.g. Feedburner or eventually Libsyn.', 'podpress') . "\n";
     } else {
         echo '					<span class="nonessential">' . __('This feature is deactivated and will maybe be removed in one of a future versions. If you want to activate this feature then ask for help in <a href="http://wordpress.org/tags/podpress?forum_id=10" target="_blank">this WP.org Forum</a>.', 'podpress') . '</span>' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Post Editing', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="maxMediaFiles">' . __('max. number of media files', 'podpress') . ':</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="text" maxlength="3" size="3" name="maxMediaFiles" id="maxMediaFiles" value="' . $this->settings['maxMediaFiles'] . '"' . " />\n";
     echo '				</td>' . "\n";
     echo '				<td>' . __('which you want to add to single posts (or pages). The higher the number, the bigger the performance impact when loading the Posts editor. (default: 10)', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     if (TRUE == version_compare($wp_version, '2.9', '>=')) {
         $selected_types = $this->settings['metaboxforcustomposttypes'];
         if (FALSE === is_array($selected_types)) {
             $selected_types = array();
         }
         $args = array('public' => true, '_builtin' => false);
         $output = 'objects';
         // names or objects
         $post_types = get_post_types($args, $output);
         echo '			<tr>' . "\n";
         echo '				<th>' . "\n";
         echo ' 					' . __('podPress meta box for custom post types', 'podpress');
         echo '				</th>' . "\n";
         echo '				<td>' . "\n";
         if (TRUE == is_array($post_types) and FALSE == empty($post_types)) {
             echo '				<select name="metaboxforcustomposttypes[]" size="4" multiple="multiple" class="podpress_customposttype_select">' . "\n";
             echo '					<optgroup label="' . esc_attr(__('public custom post types:', 'podpress')) . '">' . "\n";
             foreach ($post_types as $post_type) {
                 if (TRUE == in_array($post_type->name, $selected_types)) {
                     $selected = ' selected="selected"';
                 } else {
                     $selected = '';
                 }
                 echo '				<option value="' . $post_type->name . '"' . $selected . '>' . $post_type->label . ' (' . $post_type->name . ')</option>';
             }
             echo '					</optgroup>' . "\n";
             echo '				</select>' . "\n";
         } else {
             echo '				<em class="nonessential">(' . __('Currently are no custom post types defined.', 'podpress') . ')</em>' . "\n";
         }
         echo '				</td>' . "\n";
         echo '				<td class="podpress_settings_description_cell">' . "\n";
         echo ' 					' . __('Show a podPress meta box below or at the side of the editor of post of a custom post type. This makes it possbile to add podcasts with podPress to posts of a custom post type.', 'podpress');
         echo '					<br /><span class="podpress_description">' . __('Hold the key [SHIFT] or [CTRL] and use the left mouse button to select more than one value.<br />Hold [CTRL] and use the left mouse button to deselect values.', 'podpress') . '</span>';
         echo '				</td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Blog Search', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="activate_podpressmedia_search">' . __('expand the search to podPress media files', 'podpress') . ':</label></th>' . "\n";
     echo '				<td class="podpress_settings_narrow_col">' . "\n";
     if (TRUE == isset($this->settings['activate_podpressmedia_search']) and TRUE === $this->settings['activate_podpressmedia_search']) {
         echo '					<input type="checkbox" name="activate_podpressmedia_search" id="activate_podpressmedia_search" value="true" checked="checked" />' . "\n";
     } else {
         echo '					<input type="checkbox" name="activate_podpressmedia_search" id="activate_podpressmedia_search" value="true" />' . "\n";
     }
     echo '				</td>' . "\n";
     echo '				<td>' . __('Expand the blog search (which searches by default only through titles and content of posts, pages and attachments) to the titles and URLs (location) of the media files which have been attached with podPress.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_PODANGO_INTEGRATION in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_PODANGO_INTEGRATION') and TRUE === constant('PODPRESS_ACTIVATE_PODANGO_INTEGRATION')) {
         echo '	<fieldset class="options">' . "\n";
     } else {
         echo '	<fieldset class="options nonessential">' . "\n";
     }
     echo '		<legend>' . __('Podango Integration', 'podpress') . '</legend>' . "\n";
     echo '          	<p class="podpress_error">' . __('Podango Integration does not work anymore and causes probably long page loading times e.g. on the post/page editor pages of this blog. Since 2008/2009 Podango <a href="http://sites.google.com/site/podangohibernate/">is currently on vacation</a> and the API which podPress tries to use is unavailable. That is why it is most likely that you will experience a lot of warning and error messages if you activate this feature.', 'podpress') . '</p>';
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enablePodangoIntegration">' . __('Enable Podango Integration', 'podpress') . ':</label></th>' . "\n";
     echo '				<td class="podpress_settings_narrow_col">' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_PODANGO_INTEGRATION in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_PODANGO_INTEGRATION') and TRUE === constant('PODPRESS_ACTIVATE_PODANGO_INTEGRATION')) {
         echo '					<input type="checkbox" name="enablePodangoIntegration" id="enablePodangoIntegration" ';
         if ($this->settings['enablePodangoIntegration']) {
             echo 'checked="checked"';
         }
         echo " />\n";
     } else {
         echo '					<input type="checkbox" name="enablePodangoIntegration" id="enablePodangoIntegration" disabled="disabled" />' . "\n";
     }
     echo '				</td>' . "\n";
     echo '				<td>';
     if (TRUE == defined('PODPRESS_ACTIVATE_PODANGO_INTEGRATION') and TRUE === constant('PODPRESS_ACTIVATE_PODANGO_INTEGRATION')) {
         echo '					' . __('podPress users can gain additional functionality when used in combination with Podango hosting.', 'podpress') . '<br />' . "\n";
     } else {
         echo '					<span class="nonessential">' . __('This feature is deactivated and will maybe be removed in one of a future versions. If you want to activate this feature despite the absence of the Podango platform then ask for help in <a href="http://wordpress.org/tags/podpress?forum_id=10" target="_blank">this WP.org Forum</a>.', 'podpress') . '</span><br />' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     if (FALSE == defined('PODPRESS_DEACTIVATE_PREMIUM') or FALSE === constant('PODPRESS_DEACTIVATE_PREMIUM')) {
         echo '	<fieldset class="options">' . "\n";
         echo '		<legend>' . __('Premium Content', 'podpress') . '</legend>' . "\n";
         if (!$this->settings['enablePremiumContent']) {
             $showPremiumOptions = 'style="display: none;"';
         }
         $premiumcontenthelp = '		<tr id="premiumPodcastingHelp" ' . $showPremiumOptions . '>' . "\n";
         $premiumcontenthelp .= '			<th>&nbsp;</th>' . "\n";
         $premiumcontenthelp .= '			<td colspan="2">';
         $premiumcontenthelp .= '				' . sprintf(__('<p>If you want use this part of the plugin then you should <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">read more about roles and capabilities</a> and you need to get and install a roles and capabilities management plugin like <a href="http://wordpress.org/extend/plugins/members/" target="_blank">Members</a> or <a href="http://wordpress.org/extend/plugins/capsman/" target="_blank">Capability Manager</a> (The former recommendation was the <a href="http://redalt.com/wiki/Role+Manager" target="_blank">Role Manager</a> plugin. But it is unclear whether it works with current WP version or not.)</p><p>Anyone that should have access to the premium podcasting files need to have the Premium Content role, which can be done by making them Premium Subscribers.<br />Then just in each post set the media file as premium content and normal visitors will not be able to see the content via the web or from the feed.</p><p>If you are using a WordPress version which is newer than v2.1, then users can just use <a href="%1$s">%1$s</a> for their premium content needs. User will be asked for their user/pass before giving the RSS feed. For instance Juice and iTunes support this fine.</p><p>Keep in mind, that this does NOT protect your content if someone discovers the URLs, it only hides the location from showing up on the site or in the feed. To fully protect your files you can use this feature in combination with an external service like the one from <a href="http://www.amember.com/" target="_blank">aMemberPro</a> which should work with podPress. aMemberPro will protect the files from being downloaded at all, unless authorized. It also handles monthly subscription issues through <a href="http://en.wikipedia.org/wiki/Paypal" target="_blank" title="en.Wikipedia: PayPal">PayPal</a> and such. If you combine such a service with WordPress and podPress you can have your own premium content podcasting service.</p>', 'podpress'), get_feed_link('premium')) . "\n";
         // ntm: Parts of this text are obviously aut dated and I took the chance to modify it
         //$premiumcontenthelp .= '				'.__('Full documentation is still under development on <a href="http://podcasterswiki.com/index.php?title=PodPress_Documentation#Premium_Podcasting">the wiki</a><br /><br />This is the short of it is that you need to get and install the <a href="http://redalt.com/wiki/Role+Manager">Role Manager plugin</a><br />Anyone that should have access to the premium podcasting files need to have the Premium Content role, which can be done by making them Premium Subscribers<br /><br />Then just in each post set the media file as premium content and normal visitors will not be able to see the content via the web or from the feed.<br />If your using Wordpress 2.1, then users can just use http://www.yoursite.com/?feed=premium for their premium content needs.<br />If your using WP 1.5 or 2.0.x, then you need to put premiumcast.php in your main wordpress dir and then have your subscribers use this file as their rss feed.<br />These will cause the site to ask for their user/pass before giving the RSS feed. Juice and iTunes supports this fine.<br /><br />Keep in mine, that this does NOT protect your content if someone discovers the URLS, it only hides the location from showing up on the site or in the feed. To fully protect your files I have also been able to get this working with <a href="http://www.amember.com/">aMemberPro</a><br />aMemberPro will protect the files from being downloaded at all, unless authorized. It also handles monthly subscription issues thru paypal and such. Its a great tool, and combines with WordPress and podPress you can have a full blown premium content podcasting service.', 'podpress')."\n";
         $premiumcontenthelp .= '			</td>' . "\n";
         $premiumcontenthelp .= '		</tr> ' . "\n";
         echo '		<table class="editform podpress_settings_table">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th><label for="enablePremiumContent">' . __('Enable Premium Content:', 'podpress') . '</label></th>' . "\n";
         if (!podPress_WPVersionCheck('2.0.0')) {
             echo '			<td>&nbsp;</td>' . "\n";
             echo '			<td>' . __('Only available in WordPress 2.0.0 or greater', 'podpress') . '</td>' . "\n";
             echo '		</tr> ' . "\n";
             echo $premiumcontenthelp;
         } else {
             echo '			<td colspan="2">' . "\n";
             echo '				<input type="checkbox" name="enablePremiumContent" id="enablePremiumContent" ';
             if ($this->settings['enablePremiumContent']) {
                 echo 'checked="checked"';
             }
             echo " onclick=\"javascript: podPressShowHideRow('premiumPodcastingHelp'); podPressShowHideRow('premiumMethodWrapper'); podPressShowHideRow('premiumContentFakeEnclosureWrapper');\" />\n";
             //ntm: with the podPressShowHideRow('protectedMediaFilePathWrapper'); podPressShowHideRow('protectedMediaFilePathHelp');
             //~ echo '				<input type="checkbox" name="enablePremiumContent" id="enablePremiumContent" '; if($this->settings['enablePremiumContent']) { echo 'checked="checked"'; } echo " onclick=\"javascript: podPressShowHideRow('premiumPodcastingHelp'); podPressShowHideRow('protectedMediaFilePathWrapper'); podPressShowHideRow('protectedMediaFilePathHelp'); podPressShowHideRow('premiumMethodWrapper'); podPressShowHideRow('premiumContentFakeEnclosureWrapper');\" />\n";
             echo '			</td>' . "\n";
             echo '		</tr> ' . "\n";
             echo $premiumcontenthelp;
             // ntm: there is nothing behind this input that is why is deactivated
             //~ echo '		<tr id="protectedMediaFilePathWrapper" '.$showPremiumOptions.'>'."\n";
             //~ echo '			<th><label for="protectedMediaFilePath">'.__('Absolute path to protected media', 'podpress').':</label></th>'."\n";
             //~ echo '			<td colspan="2">'."\n";
             //~ echo '				<input type="text" id="protectedMediaFilePath" name="protectedMediaFilePath" class="podpress_wide_text_field" size="40" value="'.attribute_escape($this->settings['protectedMediaFilePath']).'" />'."\n";
             //~ echo '			</td>'."\n";
             //~ echo '		</tr>'."\n";
             //~ echo '		<tr id="protectedMediaFilePathHelp" '.$showPremiumOptions.'>'."\n";
             //~ echo '			<th>&nbsp;</th>'."\n";
             //~ echo '			<td colspan="2">';
             //~ echo '				'.sprintf(__('Insert here the complete path name of the folder which contains the premium meda files. This folder needs to be on the same server as your blog. But it should NOT be in a dir under your web root. It should be a dir outside of the web root so that users cannot simply browse to the dir and get access to the files. For example this could be <code>%1$s/premium_mp3s/</code> or maybe with random number as folder name: <code>%1$s/%2$s/premium_mp3s/</code>. Create this folder before you start to use this feature.', 'podpress'), $this->uploadpath, rand(10000, 99999))."\n";
             //~ echo '			</td>'."\n";
             //~ echo '		</tr> '."\n";
             echo '		<tr id="premiumMethodWrapper" ' . $showPremiumOptions . '>' . "\n";
             echo '			<th><label for="premiumMethod">' . __('Method', 'podpress') . ':</label></th>' . "\n";
             echo '			<td>' . "\n";
             echo '				<select name="premiumMethod" id="premiumMethod">' . "\n";
             echo '					<option value="Digest" ';
             if ($this->settings['premiumMethod'] != 'Basic') {
                 echo 'selected="selected"';
             }
             echo '>' . __('Digest', 'podpress') . '</option>' . "\n";
             echo '					<option value="Basic" ';
             if ($this->settings['premiumMethod'] == 'Basic') {
                 echo 'selected="selected"';
             }
             echo '>' . __('Basic', 'podpress') . '</option>' . "\n";
             echo '				</select>' . "\n";
             echo '			</td>' . "\n";
             echo '			<td>' . __('Digest auth is MUCH better than Basic, which is easily unencrypted.', 'podpress') . '</td>' . "\n";
             echo '		</tr> ' . "\n";
             echo '		<tr id="premiumContentFakeEnclosureWrapper" ' . $showPremiumOptions . '>' . "\n";
             echo '			<th><label for="premiumContentFakeEnclosure">' . __('Use fake enclosure', 'podpress') . ':</label></th>' . "\n";
             echo '			<td>' . "\n";
             echo '				<input type="checkbox" name="premiumContentFakeEnclosure" id="premiumContentFakeEnclosure" ';
             if ($this->settings['premiumContentFakeEnclosure']) {
                 echo 'checked="checked"';
             }
             echo "/>\n";
             echo '			</td>' . "\n";
             echo '			<td>' . __('If you want the <a href="http://en.wikipedia.org/wiki/RSS_enclosure" target="_blank" title="en.Wikipedia: RSS enclosures">enclosures</a> (elements of the news feeds which contain usually links to the media files) to always exist (so the feed will show up in iTunes) then check this. A fake enclosure contains a place holder URL and not the real one.', 'podpress') . '</td>' . "\n";
             echo '		</tr> ' . "\n";
         }
         echo '		</table>' . "\n";
         echo '	</fieldset>' . "\n";
     }
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Post Content', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentLocation">' . __('Location:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentLocation" id="contentLocation">' . "\n";
     echo '						<option value="start" ';
     if ($this->settings['contentLocation'] == 'start') {
         echo 'selected="selected"';
     }
     echo '>' . __('Start', 'podpress') . '</option>' . "\n";
     echo '						<option value="end" ';
     if ($this->settings['contentLocation'] != 'start') {
         echo 'selected="selected"';
     }
     echo '>' . __('End', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Part of the Post where the podPress content (Player, and links) will go. Default is at the end.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentPlayer">' . __('Player:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentPlayer" id="contentPlayer">' . "\n";
     echo '						<option value="both" ';
     if ($this->settings['contentPlayer'] == 'both') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="inline" ';
     if ($this->settings['contentPlayer'] == 'inline') {
         echo 'selected="selected"';
     }
     echo '>' . __('Inline Only', 'podpress') . '</option>' . "\n";
     echo '						<option value="popup" ';
     if ($this->settings['contentPlayer'] == 'popup') {
         echo 'selected="selected"';
     }
     echo '>' . __('Popup Only', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentPlayer'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Allow users to make use of the web players for your content / Popup Only - Only the Popup Player is available and it is not possible to use the player in the posts. / Inline Only - The Popup player is not available and it is only possible to use the player in the posts.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentImage">' . __('Image:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentImage" id="contentImage">' . "\n";
     echo '						<option value="button" ';
     if ($this->settings['contentImage'] == 'button') {
         echo 'selected="selected"';
     }
     echo '>' . __('Button', 'podpress') . '</option>' . "\n";
     echo '						<option value="icon" ';
     if ($this->settings['contentImage'] == 'icon') {
         echo 'selected="selected"';
     }
     echo '>' . __('Icon', 'podpress') . '</option>' . "\n";
     echo '						<option value="none" ';
     if ($this->settings['contentImage'] == 'none') {
         echo 'selected="selected"';
     }
     echo '>' . __('None', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('The image that shows up before links for the media file.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentHidePlayerPlayNow">' . __('Hide Player/Play Now:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentHidePlayerPlayNow" id="contentHidePlayerPlayNow">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentHidePlayerPlayNow'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Show', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentHidePlayerPlayNow'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Hide', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Show the Hide Player/Play Now link', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDownload">' . __('Download:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentDownload" id="contentDownload">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentDownload'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentDownload'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Allow users to download the media files directly from the website.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDownloadText">' . __('Show Download Text:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentDownloadText" id="contentDownloadText">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentDownloadText'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentDownloadText'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('If disabled, users can still download using the icon link.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDownloadStats">' . __('Show Download Stats:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentDownloadStats" id="contentDownloadStats">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentDownloadStats'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentDownloadStats'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Display download stats for each media file for everyone to see at the end of the podPress line. 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.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDuration">' . __('Show Duration:', 'podpress') . '</label></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">' . "\n";
     echo '					<select name="contentDuration" id="contentDuration">' . "\n";
     if ($this->settings['contentDuration'] == 'enabled') {
         $this->settings['contentDuration'] = 'h:m:s';
     }
     $duration_schemes = array('h:m:s' => __('1:23:45 (h:m:s)', 'podpress'), 'm:s' => __('83:45 (m:s)', 'podpress'), 'h:m:s:ms' => __('1:23:45:30 (h:m:s:ms)', 'podpress'), 'm:s:ms' => __('83:45:30 (m:s:ms)', 'podpress'), 's:ms' => __('5025:30 (s:ms)', 'podpress'), 'h' => __('1.40 (h)', 'podpress'), 'm' => __('83.75 (m)', 'podpress'), 's' => __('5025.03 (s)', 'podpress'), 'ms' => __('5025030 (ms)', 'podpress'));
     foreach ($duration_schemes as $duration_scheme => $scheme_name) {
         if ($this->settings['contentDuration'] == $duration_scheme) {
             echo '						<option value="' . $duration_scheme . '" selected="selected">' . $scheme_name . '</option>' . "\n";
         } else {
             echo '						<option value="' . $duration_scheme . '">' . $scheme_name . '</option>' . "\n";
         }
     }
     echo '						<option value="disabled" ';
     if ($this->settings['contentDuration'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				' . __('Display the duration for each media file. (The milliseconds value will only be visible if it is bigger than zero.)', 'podpress');
     echo '					<br /><label for="contentDurationdivider">' . __('Choose a duration format:', 'podpress') . '</label> <select name="contentDurationdivider" id="contentDurationdivider">' . "\n";
     if (version_compare($wp_version, '2.8', '<')) {
         $duration_dividers = array('colon' => '1:23:45:30', 'hminsms' => '1 ' . __('h', 'podpress') . ' 23 ' . __('min', 'podpress') . ' 45 ' . __('s', 'podpress') . ' 30 ' . __('ms', 'podpress'), 'hrminsecmsec' => '1 ' . __('hr.', 'podpress') . ' 23 ' . __('min.', 'podpress') . ' 45 ' . __('sec.', 'podpress') . ' 30 ' . __('msec.', 'podpress'), 'hoursminutessecondsmilliseconds' => '1 ' . __ngettext('hour', 'hours', 1, 'podpress') . ' 23 ' . __ngettext('minute', 'minutes', 23, 'podpress') . ' 45 ' . __ngettext('second', 'seconds', 45, 'podpress') . ' 30 ' . __ngettext('millisecond', 'milliseconds', 30, 'podpress'));
     } else {
         $duration_dividers = array('colon' => '1:23:45:30', 'hminsms' => '1 ' . __('h', 'podpress') . ' 23 ' . __('min', 'podpress') . ' 45 ' . __('s', 'podpress') . ' 30 ' . __('ms', 'podpress'), 'hrminsecmsec' => '1 ' . __('hr.', 'podpress') . ' 23 ' . __('min.', 'podpress') . ' 45 ' . __('sec.', 'podpress') . ' 30 ' . __('msec.', 'podpress'), 'hoursminutessecondsmilliseconds' => '1 ' . _n('hour', 'hours', 1, 'podpress') . ' 23 ' . _n('minute', 'minutes', 23, 'podpress') . ' 45 ' . _n('second', 'seconds', 45, 'podpress') . ' 30 ' . _n('millisecond', 'milliseconds', 30, 'podpress'));
     }
     //			$duration_dividers = Array('colon' => '1:23:45:30', 'hminsms' => __('1 h 23 min 45 s 30 ms', 'podpress'), 'hrminsecmsec' => __('1 hr 23 min 45 sec 30 msec', 'podpress'), 'hoursminutessecondsmilliseconds' => __('1 hour 23 minutes 45 seconds 30 milliseconds', 'podpress'));
     if (FALSE == isset($this->settings['contentDurationdivider'])) {
         $this->settings['contentDurationdivider'] = 'colon';
     }
     foreach ($duration_dividers as $duration_divider => $divider_name) {
         if ($this->settings['contentDurationdivider'] == $duration_divider) {
             echo '						<option value="' . $duration_divider . '" selected="selected">' . $divider_name . '</option>' . "\n";
         } else {
             echo '						<option value="' . $duration_divider . '">' . $divider_name . '</option>' . "\n";
         }
     }
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentfilesize">' . __('Show File Size:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentfilesize" id="contentfilesize">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentfilesize'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if (FALSE == isset($this->settings['contentfilesize']) or $this->settings['contentfilesize'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Display the file size (in MB) for each media file.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentBeforeMore">' . __('Always before the &lt;!- More -&gt; tag:', 'podpress') . '</label></th>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . "\n";
     echo '					<select name="contentBeforeMore" id="contentBeforeMore">' . "\n";
     echo '						<option value="yes" ';
     if ($this->settings['contentBeforeMore'] == 'yes') {
         echo 'selected="selected"';
     }
     echo '>' . __('Yes', 'podpress') . '</option>' . "\n";
     echo '						<option value="no" ';
     if ($this->settings['contentBeforeMore'] != 'yes') {
         echo 'selected="selected"';
     }
     echo '>' . __('No', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('This defines that the player and the download links will always be visible on the short version of a post.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     $incontentandexcerpt_vals = array('in_content_and_excerpt' => __('in content sections and excerpts', 'podpress'), 'in_content_only' => __('in content sections only', 'podpress'), 'in_excerpt_only' => __('in excerpts only', 'podpress'));
     echo '			<tr>' . "\n";
     echo '				<th><label for="incontentandexcerpt">' . __('Show the podPress elements in the content sections and the excerpts?', 'podpress') . '</label></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">' . "\n";
     echo '					<select name="incontentandexcerpt" id="incontentandexcerpt">' . "\n";
     foreach ($incontentandexcerpt_vals as $value => $optiontext) {
         if ($this->settings['incontentandexcerpt'] == $value) {
             echo '						<option value="' . $value . '" selected="selected">' . $optiontext . '</option>' . "\n";
         } else {
             echo '						<option value="' . $value . '">' . $optiontext . '</option>' . "\n";
         }
     }
     echo '					</select>' . "\n";
     echo '				' . sprintf(__('Determine whether the podPress elements (player or player preview, download link, icon, etc.) should be visible in the content sections and the excerpts of posts and pages. (default: %1$s)', 'podpress'), __('in content sections and excerpts', 'podpress')) . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     if (TRUE == isset($this->settings['do_not_use_the_target_attribute']) and TRUE === $this->settings['do_not_use_the_target_attribute']) {
         $checked = ' checked="checked"';
     } else {
         $checked = '';
     }
     echo '			<tr>' . "\n";
     echo '				<th><label for="do_not_use_the_target_attribute">' . __('do not use the <code>target="new"</code> attribute in links of podPress', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="do_not_use_the_target_attribute" id="do_not_use_the_target_attribute" value="yes"' . $checked . ' />' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('If your theme uses a <a href="http://en.wikipedia.org/wiki/Document_Type_Declaration" target="_blank" title="en.Wikipedia: Document Type Declaration">DOCTYPE</a> which does not allow "target" attributes in hyper links (e.g. XHTML 1.0 Strict) then you can use this option to prompt podPress to create valid code for your theme. (default: not checked)', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     /*
     echo '	<fieldset class="options">'."\n";
     echo '		<legend>'.__('TorrentCasting', 'podpress').'</legend>'."\n";
     echo '		<table class="editform podpress_settings_table">'."\n";
     echo '			<tr>'."\n";
     echo '				<th><label for="enableTorrentCasting">'.__('Enable TorrentCasting', 'podpress').':</label></th>'."\n";
     echo '				<td>'."\n";
     echo '					<input type="checkbox" name="enableTorrentCasting" id="enableTorrentCasting" '; if($this->settings['enableTorrentCasting']) { echo 'checked="checked"'; } echo "/>\n";
     echo '				</td>'."\n";
     echo '			</tr> '."\n";
     echo '			<tr>'."\n";
     echo '				<td colspan="2">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.</td>'."\n";
     echo '			</tr> '."\n";
     echo '		</table>'."\n";
     echo '	</fieldset>'."\n";
     */
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('System Information', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th>' . "\n";
     echo ' 					' . __('Feed Caching', 'podpress');
     echo '				</th>' . "\n";
     echo '				<td>' . "\n";
     echo ' 					' . __('Feedcache files will be stored in the follow directory:', 'podpress') . '<br /><code>' . $this->tempfilesystempath . '</code> ' . $this->checkWritableTempFileDir(TRUE);
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td>' . __('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.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th>PODPRESS_DEBUG_LOG</th>' . "\n";
     if (defined('PODPRESS_DEBUG_LOG') and TRUE === constant('PODPRESS_DEBUG_LOG')) {
         $result = '';
         $result = podPress_var_dump('podPress - general settings - permissions test');
         if (!empty($result)) {
             $errormsg = '<p class="podpress_error">' . $result . '</p>';
         } else {
             $errormsg = '';
         }
         echo '				<td><p>' . sprintf(__('is defined and set to: %1$s.', 'podpress'), 'TRUE');
     } elseif (defined('PODPRESS_DEBUG_LOG') and FALSE === constant('PODPRESS_DEBUG_LOG')) {
         echo '				<td><p>' . sprintf(__('is defined and set to: %1$s.', 'podpress'), 'FALSE');
     } else {
         echo '				<td><p>' . sprintf(__('is not defined or set to something other than %1$s or %2$s.', 'podpress'), 'TRUE', 'FALSE');
     }
     echo ' ' . sprintf(__('By default this constant is set to %2$s and is defined in the podpress.php file. If it is defined as %1$s then podPress logs its activities during the process of the detection of the file size, duration and ID3 tag information to a file with the name podpress_log.dat in the podPress folder.', 'podpress'), 'TRUE', 'FALSE') . '</p>' . $errormsg . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     $version_from_db = get_option('podPress_version');
     if (TRUE == version_compare($version_from_db, constant('PODPRESS_VERSION'), '>')) {
         $set_version_back_to = '8.8.9';
         echo '			<tr>' . "\n";
         echo '				<th><span class="podpress_error">' . __('Version Conflict', 'podpress') . '</span></th>' . "\n";
         echo '				<td>' . sprintf(__('The current podPress version is smaller than the version number which has been stored previously in the db: %1$s &lt; %2$s. You have had probably installed a podPress version with a higher version number. (Maybe you have tested a Development Version.) The difference between these two version numbers indicates that maybe some db entries are not up to date or settings are not right because the update procedure has not been started. This may cause various problems with the Feeds and the appearance of the podcast episodes in the posts.', 'podpress'), constant('PODPRESS_VERSION'), $version_from_db) . '<br /><label for="version_set_back_to">' . sprintf(__('Set the version number in the db back to %1$s (to start possibly necessary upgrade actions):', 'podpress'), $set_version_back_to) . '</label> <input type="checkbox" id="version_set_back_to" name="podpress_version_set_back_to" value="' . $set_version_back_to . '" /></td>' . "\n";
         echo '			</tr> ' . "\n";
     } elseif (TRUE == version_compare($version_from_db, constant('PODPRESS_VERSION'), '<')) {
         echo '			<tr>' . "\n";
         echo '				<th><span class="podpress_error">' . __('Version Conflict', 'podpress') . '</span></th>' . "\n";
         echo '				<td>' . sprintf(__('The version number in the db is smaller than the current podPress version: %1$s &lt; %2$s. That means most likely that the upgrade process is uncomplete. Because of that, it is possible that you experience problems with the Feeds and the appearance of the podcast episode in the posts. You may ask in the <a href="http://wordpress.org/tags/podpress" target="_blank">WordPress.org Forum</a> for help (Please, use "podpress" as a tag).', 'podpress'), $version_from_db, constant('PODPRESS_VERSION')) . '</td>' . "\n";
         echo '			</tr> ' . "\n";
     } else {
         echo '			<tr>' . "\n";
         echo '				<th>' . __('current podPress version', 'podpress') . '</th>' . "\n";
         echo '				<td>' . constant('PODPRESS_VERSION') . '</td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     $all_plugins = get_plugins();
     $podpress_version = $all_plugins[plugin_basename(dirname(__FILE__) . '/podpress.php')]['Version'];
     if (TRUE == version_compare($podpress_version, '8.8.10', '>=')) {
         $nr_old_meta_keys_podPressMedia = intval($wpdb->get_var($wpdb->prepare("SELECT COUNT(*) as old_meta_keys FROM " . $wpdb->prefix . "postmeta WHERE meta_key = 'podPressMedia'")));
         $nr_old_meta_keys_podPressPostSpecific = intval($wpdb->get_var($wpdb->prepare("SELECT COUNT(*) as old_meta_keys FROM " . $wpdb->prefix . "postmeta WHERE meta_key = 'podPressPostSpecific'")));
         if ($nr_old_meta_keys_podPressMedia + $nr_old_meta_keys_podPressPostSpecific > 0) {
             echo '			<tr>' . "\n";
             echo '				<th><span class="podpress_error">' . __('old meta_key names detected', 'podpress') . '</span></th>' . "\n";
             echo '				<td><p>podPressMedia: ' . $nr_old_meta_keys_podPressMedia . '<br />podPressPostSpecific: ' . $nr_old_meta_keys_podPressPostSpecific . '</p><input type="checkbox" id="add_underscore_to_old_meta_keys" name="podpress_add_underscore_to_old_meta_keys" value="yes" /> <label for="add_underscore_to_old_meta_keys">' . sprintf(__('Rename all meta_keys with the values podPressMedia to _podPressMedia and podPressPostSpecific to _podPressPostSpecific', 'podpress'), $set_version_back_to) . '</label></td>' . "\n";
             echo '			</tr> ' . "\n";
         }
     }
     if (TRUE == version_compare($podpress_version, constant('PODPRESS_VERSION'), '!=')) {
         echo '			<tr>' . "\n";
         echo '				<th><span class="podpress_error">' . __('Version Conflict', 'podpress') . '</span></th>' . "\n";
         echo '				<td><p>' . sprintf(__('podPress version: %1$s', 'podpress'), $podpress_version) . '<br />PODPRESS_VERSION: ' . constant('PODPRESS_VERSION') . '<br />' . sprintf(__('version number from the db: %1$s', 'podpress'), $version_from_db) . '</p></td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     echo '	<input type="hidden" name="podPress_submitted" value="general" />' . "\n";
     echo '	<p class="submit"> ' . "\n";
     echo '		<input class="button-primary" type="submit" name="Submit" value="' . __('Update Options', 'podpress') . ' &raquo;" /> ' . "\n";
     echo '	</p> ' . "\n";
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Credit', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enableFooter">' . __('Show podPress footer:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="enableFooter" id="enableFooter" ';
     if ($this->settings['enableFooter']) {
         echo 'checked="checked"';
     }
     echo '/>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Enabling this allows you to give us credit for making this plugin, and lets other podcasters find out what your using to publish your podcasts. 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.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enableVersionInFeeds">' . __('Add podPress version information to the feeds:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="enableVersionInFeeds" id="enableVersionInFeeds" ';
     if ($this->settings['enableVersionInFeeds']) {
         echo 'checked="checked"';
     }
     echo '/>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Enabling this will add a comment with the name of this plugin and maybe the current version number to all Feeds of this blog. This comment is usually only visible if you look into the source code of the Feeds and may e.g. help to debug problems.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="disableVersionNumber">' . __('Do not show the version number:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="disableVersionNumber" id="disableVersionNumber" ';
     if ($this->settings['disableVersionNumber']) {
         echo 'checked="checked"';
     }
     echo '/>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Do not show the current version number in the footer nor in the Feeds of this blog.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="donation_button">' . __('Donations Appreciated:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<a id="donation_button" href="http://www.mightyseek.com/podpress_donate.php" title="' . __('Donation button of the original author of this project Dan Kuykendall (seek3r)', 'podpress') . '" target="_blank"><img alt="' . __('Donation button of the original author of this project Dan Kuykendall (seek3r)', 'podpress') . '" border="0" src="' . PODPRESS_URL . '/images/x-click-but04.gif" /></a>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('This project is a labor of love, feel no obligation what-so-ever to donate. For those that want to, here ya go.', 'podpress') . ' <span class="nonessential">(' . __('Donation button of the original author of this project Dan Kuykendall (seek3r)', 'podpress') . ')</span></td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     //~ ntm: Frappr.com seems to be down since 01/2010
     //~ echo '		<table class="editform podpress_settings_table">'."\n";
     //~ echo '			<tr>'."\n";
     //~ echo '				<th><label for="frapprmaplink">'.__('Frapper Map:', 'podpress').'</label></th>'."\n";
     //~ echo '				<td>'."\n";
     //~ echo '					<a id="frapprmaplink" href="http://www.frappr.com/mightyseek"><img src="http://www.frappr.com/i/frapper_sticker.gif" alt="Check out our Frappr!" title="Check out our Frappr!" border="0"></a>'."\n";
     //~ echo '				</td>'."\n";
     //~ echo '			</tr> '."\n";
     //~ echo '			<tr>'."\n";
     //~ echo '				<td colspan="2">Let us know where you are!</td>'."\n";
     //~ echo '			</tr> '."\n";
     //~ echo '		</table>'."\n";
     echo '	</fieldset>' . "\n";
     echo '	</form> ' . "\n";
     $sql = "SELECT * FROM " . $wpdb->prefix . "postmeta WHERE meta_key IN('podPress_podcastStandardAudio',\n\t\t\t                                                                 'podPress_podcastStandardAudioSize',\n\t\t\t                                                                 'podPress_podcastStandardAudioDuration',\n\t\t\t                                                                 'podPress_podcastEnhancedAudio',\n\t\t\t                                                                 'podPress_podcastEnhancedAudioSize',\n\t\t\t                                                                 'podPress_podcastEnhancedAudioDuration',\n\t\t\t                                                                 'podPress_podcastVideo',\n\t\t\t                                                                 'podPress_podcastVideoSize',\n\t\t\t                                                                 'podPress_podcastVideoDuration',\n\t\t\t                                                                 'podPress_podcastVideoDimension',\n\t\t\t                                                                 'podPress_webVideo',\n\t\t\t                                                                 'podPress_webVideoSize',\n\t\t\t                                                                 'podPress_webVideoDuration',\n\t\t\t                                                                 'podPress_webVideoDimension',\n\t\t\t                                                                 'podPress_podcastEbook',\n\t\t\t                                                                 'podPress_podcastEbookSize',\n\t\t\t                                                                 'itunes:duration')";
     $stats = $wpdb->get_results($sql);
     if ($stats) {
         echo '	<form method="post">' . "\n";
         echo '	<fieldset class="options">' . "\n";
         echo '		<legend>' . __('Complete Upgrade Process', 'podpress') . '</legend>' . "\n";
         echo '		<table width="100%" cellspacing="2" cellpadding="5" class="editform">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th><label for="cleanupOldMetaKeys">' . __('Remove Pre v.40 database clutter.', 'podpress') . ':</label></th>' . "\n";
         echo '				<td>' . "\n";
         echo '					<input type="checkbox" name="cleanupOldMetaKeys" id="cleanupOldMetaKeys" />' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr> ' . "\n";
         echo '		</table>' . "\n";
         echo '	</fieldset>' . "\n";
         echo '	<input type="hidden" name="podPress_submitted" value="general" />' . "\n";
         echo '	<p class="submit"> ' . "\n";
         echo '		<input class="button-primary" type="submit" name="Submit" value="' . __('Update Options', 'podpress') . ' &raquo;" /> ' . "\n";
         echo '	</p> ' . "\n";
         echo '	</form> ' . "\n";
     }
     echo '</div>' . "\n";
 }
</a></p></div>
<?php 
    $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
}
?>

<form id="posts-filter" action="" method="get">
<ul class="subsubsub">
<?php 
$avail_post_stati = get_available_post_statuses('page');
if (empty($locked_post_status)) {
    $status_links = array();
    $num_posts = wp_count_posts('page', 'readable');
    $total_posts = array_sum((array) $num_posts);
    $class = empty($_GET['post_status']) ? ' class="current"' : '';
    $status_links[] = "<li><a href='edit-pages.php'{$class}>" . sprintf(__ngettext('All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts), number_format_i18n($total_posts)) . '</a>';
    foreach ($post_stati as $status => $label) {
        $class = '';
        if (!in_array($status, $avail_post_stati)) {
            continue;
        }
        if (isset($_GET['post_status']) && $status == $_GET['post_status']) {
            $class = ' class="current"';
        }
        $status_links[] = "<li><a href='edit-pages.php?post_status={$status}'{$class}>" . sprintf(_nc($label[2][0], $label[2][1], $num_posts->{$status}), number_format_i18n($num_posts->{$status})) . '</a>';
    }
    echo implode(" |</li>\n", $status_links) . '</li>';
    unset($status_links);
}
?>
</ul>
	// Make the user objects
	foreach ( $wp_user_search->get_results() as $userid ) {
		$tmp_user = new WP_User($userid);
		$roles = $tmp_user->roles;
		$role = array_shift($roles);
		$roleclasses[$role][$tmp_user->user_login] = $tmp_user;
	}

	if ( isset($_GET['update']) ) :
		switch($_GET['update']) {
		case 'del':
		case 'del_many':
		?>
			<?php $delete_count = (int) $_GET['delete_count']; ?>
			<div id="message" class="updated fade"><p><?php printf(__ngettext('%s user deleted', '%s users deleted', $delete_count), $delete_count); ?></p></div>
		<?php
			break;
		case 'add':
		?>
			<div id="message" class="updated fade"><p><?php _e('New user created.'); ?></p></div>
		<?php
			break;
		case 'promote':
		?>
			<div id="message" class="updated fade"><p><?php _e('Changed roles.'); ?></p></div>
		<?php
			break;
		case 'err_admin_role':
		?>
			<div id="message" class="error"><p><?php _e("The current user's role must have user editing capabilities."); ?></p></div>
Example #23
0
		function displayStats($dashboard=false) {
			if ($dashboard) {echo "<p>";}

			if ($this->nospamnx_count <= 0)
				echo __("NoSpamNX has stopped no birdbrained Spambots yet.", 'nospamnx');
			else {
					printf(__ngettext(
						"Since its last activation on %s %s has stopped %s birdbrained Spambot (%s per Day).",
						"Since its last activation on %s %s has stopped %s birdbrained Spambots (%s per Day).",
						$this->nospamnx_count, 'nospamnx'),
						date_i18n($this->nospamnx_dateformat, $this->nospamnx_activated),
						'<a href="http://www.svenkubiak.de/nospamnx">NoSpamNX</a>',
						$this->nospamnx_count,
						$this->getStatsPerDay()
					);
			}
			
			if ($dashboard) {echo "</p>";}			
		}
Example #24
0
    wp_redirect(remove_query_arg($query_args));
    exit;
} elseif (isset($_GET['edit']) && $_GET['edit'] && isset($_GET['key']) && is_numeric($_GET['key'])) {
    // Edit widget of type $_GET['edit'] and position $_GET['key']
    $key = (int) $_GET['key'];
    if (-1 < $key && ($keys = array_keys($sidebars_widgets[$sidebar], $_GET['edit'])) && in_array($key, $keys)) {
        $edit_widget = $key;
    }
}
// Total number of registered sidebars
$sidebar_widget_count = count($sidebars_widgets[$sidebar]);
// This is sort of lame since "widget" won't be converted to "widgets" in the JS
if (1 < ($sidebars_count = count($wp_registered_sidebars))) {
    $sidebar_info_text = __ngettext('You are using %1$s widget in the "%2$s" sidebar.', 'You are using %1$s widgets in the "%2$s" sidebar.', $sidebar_widget_count);
} else {
    $sidebar_info_text = __ngettext('You are using %1$s widget in the sidebar.', 'You are using %1$s widgets in the sidebar.', $sidebar_widget_count);
}
$sidebar_info_text = sprintf(wp_specialchars($sidebar_info_text), "<span id='widget-count'>{$sidebar_widget_count}</span>", $wp_registered_sidebars[$sidebar]['name']);
$page = isset($_GET['apage']) ? abs((int) $_GET['apage']) : 1;
/* TODO: Paginate widgets list
$page_links = paginate_links( array(
	'base'    => add_query_arg( 'apage', '%#%' ),
	'format'  => '',
	'total'   => ceil(($total = 105 )/ 10),
	'current' => $page
));
*/
$page_links = '&nbsp;';
// Unsanitized!
$widget_search = isset($_GET['s']) ? $_GET['s'] : false;
// Not entirely sure what all should be here
function media_upload_library_form($errors)
{
    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
    media_upload_header();
    $post_id = intval($_REQUEST['post_id']);
    $form_action_url = get_option('siteurl') . "/wp-admin/media-upload.php?type={$GLOBALS['type']}&tab=library&post_id={$post_id}";
    $_GET['paged'] = intval($_GET['paged']);
    if ($_GET['paged'] < 1) {
        $_GET['paged'] = 1;
    }
    $start = ($_GET['paged'] - 1) * 10;
    if ($start < 1) {
        $start = 0;
    }
    add_filter('post_limits', $limit_filter = create_function('$a', "return 'LIMIT {$start}, 10';"));
    list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    ?>

<form id="filter" action="" method="get">
<input type="hidden" name="type" value="<?php 
    echo attribute_escape($type);
    ?>
" />
<input type="hidden" name="tab" value="<?php 
    echo attribute_escape($tab);
    ?>
" />
<input type="hidden" name="post_id" value="<?php 
    echo (int) $post_id;
    ?>
" />
<input type="hidden" name="post_mime_type" value="<?php 
    echo attribute_escape($_GET['post_mime_type']);
    ?>
" />

<div id="search-filter">
	<input type="text" id="post-search-input" name="s" value="<?php 
    the_search_query();
    ?>
" />
	<input type="submit" value="<?php 
    echo attribute_escape(__('Search Media'));
    ?>
" class="button" />
</div>

<ul class="subsubsub">
<?php 
    $type_links = array();
    $_num_posts = (array) wp_count_attachments();
    $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
    foreach ($matches as $_type => $reals) {
        foreach ($reals as $real) {
            $num_posts[$_type] += $_num_posts[$real];
        }
    }
    // If available type specified by media button clicked, filter by that type
    if (empty($_GET['post_mime_type']) && !empty($num_posts[$type])) {
        $_GET['post_mime_type'] = $type;
        list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
    }
    if (empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all') {
        $class = ' class="current"';
    }
    $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type' => 'all', 'paged' => false, 'm' => false))) . "'{$class}>" . __('All Types') . "</a>";
    foreach ($post_mime_types as $mime_type => $label) {
        $class = '';
        if (!wp_match_mime_types($mime_type, $avail_post_mime_types)) {
            continue;
        }
        if (wp_match_mime_types($mime_type, $_GET['post_mime_type'])) {
            $class = ' class="current"';
        }
        $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type' => $mime_type, 'paged' => false))) . "'{$class}>" . sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='{$mime_type}-counter'>" . number_format_i18n($num_posts[$mime_type]) . '</span>') . '</a>';
    }
    echo implode(' | </li>', $type_links) . '</li>';
    unset($type_links);
    ?>
</ul>

<div class="tablenav">

<?php 
    $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'total' => ceil($wp_query->found_posts / 10), 'current' => $_GET['paged']));
    if ($page_links) {
        echo "<div class='tablenav-pages'>{$page_links}</div>";
    }
    ?>

<div class="alignleft">
<?php 
    $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM {$wpdb->posts} WHERE post_type = 'attachment' ORDER BY post_date DESC";
    $arc_result = $wpdb->get_results($arc_query);
    $month_count = count($arc_result);
    if ($month_count && !(1 == $month_count && 0 == $arc_result[0]->mmonth)) {
        ?>
<select name='m'>
<option<?php 
        selected(@$_GET['m'], 0);
        ?>
 value='0'><?php 
        _e('Show all dates');
        ?>
</option>
<?php 
        foreach ($arc_result as $arc_row) {
            if ($arc_row->yyear == 0) {
                continue;
            }
            $arc_row->mmonth = zeroise($arc_row->mmonth, 2);
            if ($arc_row->yyear . $arc_row->mmonth == $_GET['m']) {
                $default = ' selected="selected"';
            } else {
                $default = '';
            }
            echo "<option{$default} value='" . attribute_escape($arc_row->yyear . $arc_row->mmonth) . "'>";
            echo wp_specialchars($wp_locale->get_month($arc_row->mmonth) . " {$arc_row->yyear}");
            echo "</option>\n";
        }
        ?>
</select>
<?php 
    }
    ?>

<input type="submit" id="post-query-submit" value="<?php 
    echo attribute_escape(__('Filter &#187;'));
    ?>
" class="button-secondary" />

</div>

<br class="clear" />
</div>
</form>

<form enctype="multipart/form-data" method="post" action="<?php 
    echo attribute_escape($form_action_url);
    ?>
" class="media-upload-form validate" id="library-form">

<?php 
    wp_nonce_field('media-form');
    //media_upload_form( $errors );
    ?>

<script type="text/javascript">
<!--
jQuery(function($){
	var preloaded = $(".media-item.preloaded");
	if ( preloaded.length > 0 ) {
		preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');});
		updateMediaForm();
	}
});
-->
</script>

<div id="media-items">
<?php 
    echo get_media_items(null, $errors);
    ?>
</div>
<p class="ml-submit">
<input type="submit" class="button savebutton" name="save" value="<?php 
    echo attribute_escape(__('Save all changes'));
    ?>
" />
<input type="hidden" name="post_id" id="post_id" value="<?php 
    echo (int) $post_id;
    ?>
" />
</p>
</form>
<?php 
}
Example #26
0
 $avail_roles = array();
 $users_of_blog = get_users_of_blog();
 $total_users = count($users_of_blog);
 foreach ((array) $users_of_blog as $b_user) {
     $b_roles = unserialize($b_user->meta_value);
     foreach ((array) $b_roles as $b_role => $val) {
         if (!isset($avail_roles[$b_role])) {
             $avail_roles[$b_role] = 0;
         }
         $avail_roles[$b_role]++;
     }
 }
 unset($users_of_blog);
 $current_role = false;
 $class = empty($role) ? ' class="current"' : '';
 $role_links[] = "<li><a href='users.php'{$class}>" . sprintf(__ngettext('All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users), number_format_i18n($total_users)) . '</a>';
 foreach ($wp_roles->get_names() as $this_role => $name) {
     if (!isset($avail_roles[$this_role])) {
         continue;
     }
     $class = '';
     if ($this_role == $role) {
         $current_role = $role;
         $class = ' class="current"';
     }
     $name = translate_with_context($name);
     $name = sprintf(_c('%1$s <span class="count">(%2$s)</span>|user role with count'), $name, $avail_roles[$this_role]);
     $role_links[] = "<li><a href='users.php?role={$this_role}'{$class}>{$name}</a>";
 }
 echo implode(" |</li>\n", $role_links) . '</li>';
 unset($role_links);
        foreach ($wp_user_search->get_results() as $userid) {
            $tmp_user = new WP_User($userid);
            $roles = $tmp_user->roles;
            $role = array_shift($roles);
            $roleclasses[$role][$tmp_user->user_login] = $tmp_user;
        }
        if (isset($_GET['update'])) {
            switch ($_GET['update']) {
                case 'del':
                case 'del_many':
                    ?>
			<?php 
                    $delete_count = (int) $_GET['delete_count'];
                    ?>
			<div id="message" class="updated fade"><p><?php 
                    printf(__ngettext('%s user deleted', '%s users deleted', $delete_count), $delete_count);
                    ?>
</p></div>
		<?php 
                    break;
                case 'add':
                    ?>
			<div id="message" class="updated fade"><p><?php 
                    _e('New user created.');
                    ?>
</p></div>
		<?php 
                    break;
                case 'promote':
                    ?>
			<div id="message" class="updated fade"><p><?php 
Example #28
0
            the_post_thumbnail(array(250, 9999), array('class' => ' alignleft border'));
        }
        ?>
			<?php 
        the_content(__('read more...', 'titan'));
        ?>
			<?php 
        edit_post_link(__('Edit', 'titan'));
        ?>
			<?php 
        wp_link_pages();
        ?>
		</div><!--end entry-->
		<div class="post-footer">
			<div class="comments"><?php 
        comments_popup_link(__('Leave a comment', 'titan'), __('1 Comment', 'titan'), __ngettext('% Comment', '% Comments', get_comments_number(), 'titan'));
        ?>
</div>
		</div><!--end post footer-->
	</div><!--end post-->
	<?php 
    }
    /* rewind or continue if all posts have been fetched */
    ?>
	<div class="navigation index">
		<div class="alignleft"><?php 
    next_posts_link(__('&laquo; Older Entries', 'titan'));
    ?>
</div>
		<div class="alignright"><?php 
    previous_posts_link(__('Newer Entries &raquo;', 'titan'));
Example #29
0
function akismet_rightnow()
{
    global $submenu, $wp_db_version;
    if (8645 < $wp_db_version) {
        // 2.7
        $link = 'edit-comments.php?comment_status=spam';
    } elseif (isset($submenu['edit-comments.php'])) {
        $link = 'edit-comments.php?page=akismet-admin';
    } else {
        $link = 'edit.php?page=akismet-admin';
    }
    if ($count = get_option('akismet_spam_count')) {
        $intro = sprintf(__ngettext('<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already,', '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already,', $count), 'http://akismet.com/', number_format_i18n($count));
    } else {
        $intro = sprintf(__('<a href="%1$s">Akismet</a> blocks spam from getting to your blog,'), 'http://akismet.com/');
    }
    if ($queue_count = akismet_spam_count()) {
        $queue_text = sprintf(__ngettext('and there\'s <a href="%2$s">%1$s comment</a> in your spam queue right now.', 'and there are <a href="%2$s">%1$s comments</a> in your spam queue right now.', $queue_count), number_format_i18n($queue_count), clean_url($link));
    } else {
        $queue_text = sprintf(__("but there's nothing in your <a href='%1\$s'>spam queue</a> at the moment."), clean_url($link));
    }
    $text = sprintf(_c('%1$s %2$s|akismet_rightnow'), $intro, $queue_text);
    echo "<p class='akismet-right-now'>{$text}</p>\n";
}
Example #30
0
				<li id="page-info">
					<div class="info">
						<a href="<?php 
bb_tag_rss_link();
?>
"><img src="<?php 
echo bb_get_active_theme_uri();
?>
image/feed.png" width="16" height="16" alt="Feed"/></a>
					</div>
					<h2><?php 
_e('Page Information', 'guangzhou');
?>
</h2>
					<p><?php 
printf(__('This page shows <strong>%1s</strong> with the tag <strong>%2s</strong>.', 'guangzhou'), sprintf(__ngettext('%d topic', '%d topics', count($topics)), count($topics)), get_tag_name());
?>
</p>
					<p><?php 
printf(__('Subscribe through your <a href="%s">feed reader</a>.', 'guangzhou'), bb_get_tag_rss_link());
?>
</p>
				</li>
				<li>
					<?php 
do_action('gz_place_sidebar');
?>
				</li>
				<?php 
if (bb_current_user_can('manage_tags')) {
    ?>