Esempio n. 1
0
function uninstall()
{
    global $wpdb;
    $meta_query = "DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '" . LONGTAIL_KEY . "%';";
    $option_query = "DELETE FROM {$wpdb->options} WHERE option_name LIKE '" . LONGTAIL_KEY . "%';";
    $post_query = "DELETE FROM {$wpdb->posts} WHERE post_type = 'jw_playlist';";
    $wpdb->query($meta_query);
    $wpdb->query($option_query);
    $wpdb->query($post_query);
    @unlink(LongTailFramework::getPlayerPath());
    @unlink(LongTailFramework::getEmbedderPath());
    @rmdir(JWPLAYER_FILES_DIR . "/player/");
    $handler = @opendir(JWPLAYER_FILES_DIR . "/configs");
    if ($handler) {
        while ($file = readdir($handler)) {
            if ($file != "." && $file != ".." && strstr($file, ".xml")) {
                @unlink(JWPLAYER_FILES_DIR . "/configs/{$file}");
            }
        }
        closedir($handler);
    }
    @rmdir(JWPLAYER_FILES_DIR . "/configs/");
    @rmdir(JWPLAYER_FILES_DIR);
    update_option(LONGTAIL_KEY . "uninstalled", true);
    feedback_message(__('Files and settings deleted.  The plugin can now be deactivated.', 'jw-player-plugin-for-wordpress'));
}
Esempio n. 2
0
function jwplayer_init()
{
    clearstatcache();
    load_plugin_textdomain("jw-player-plugin-for-wordpress", false, basename(dirname(__FILE__)));
    if (!@is_dir(JWPLAYER_FILES_DIR)) {
        if (!@mkdir(JWPLAYER_FILES_DIR, 0755, true)) {
            add_action('admin_notices', "jwplayer_directory_error");
            return;
        }
        chmod(JWPLAYER_FILES_DIR, 0755);
        if (!@mkdir(JWPLAYER_FILES_DIR . "/player", 0755)) {
            add_action('admin_notices', "jwplayer_player_error");
            return;
        }
        chmod(JWPLAYER_FILES_DIR . "/player", 0755);
        if (!@mkdir(JWPLAYER_FILES_DIR . "/configs", 0755)) {
            add_action('admin_notices', "jwplayer_configs_error");
            return;
        }
        chmod(JWPLAYER_FILES_DIR . "/configs", 0755);
        if (@is_dir(JWPLAYER_PLUGIN_DIR . "/configs")) {
            foreach (get_old_configs() as $config) {
                @rename(JWPLAYER_PLUGIN_DIR . "/configs/{$config}.xml", JWPLAYER_FILES_DIR . "/configs/{$config}.xml");
            }
        }
    }
    if (!@is_dir(JWPLAYER_FILES_DIR)) {
        add_action('admin_notices', "jwplayer_total_error");
    } else {
        if (!file_exists(LongTailFramework::getPlayerPath())) {
            // Error if the player doesn't exist
            add_action('admin_notices', "jwplayer_install_notices");
        }
    }
    if (file_exists(LongTailFramework::getEmbedderPath())) {
        if (get_option(LONGTAIL_KEY . "player_location_enable")) {
            wp_register_script("jw-embedder", get_option(LONGTAIL_KEY . "player_location") . "jwplayer.js", array(), false);
        } else {
            wp_register_script("jw-embedder", LongTailFramework::getEmbedderURL(), array(), false);
        }
        if (get_option(LONGTAIL_KEY . "use_head_js")) {
            wp_enqueue_script('jw-embedder');
        }
    } else {
        if (get_option(LONGTAIL_KEY . "use_head_js")) {
            wp_enqueue_script('swfobject');
        }
    }
    if (!get_option(LONGTAIL_KEY . "uninstalled")) {
        jwplayer_upgrade();
    }
    add_filter("the_content", "jwplayer_tag_callback", 11);
    add_filter("the_excerpt", "jwplayer_tag_excerpt_callback", 11);
    add_filter("widget_text", "jwplayer_tag_widget_callback", 11);
    // Parse the $_GET vars for callbacks
    add_filter('query_vars', 'jwplayer_queryvars');
    add_action('parse_request', 'jwplayer_parse_request', 9);
    add_action("wp_ajax_verify_player", "verify_player");
}
Esempio n. 3
0
function upload_state()
{
    ?>
  <h2><?php 
    echo "JW Player Install";
    ?>
</h2>
  <p/>
  <?php 
    $result = player_upload();
    ?>
  <?php 
    if ($result == SUCCESS) {
        ?>
  <div id="info" class="fade updated" style="display: none;">
    <p><strong><span id="player_version"><?php 
        echo "Successfully installed your player, JW Player ";
        ?>
</span></strong></p>
  </div>
  <div id="error" class="error fade" style="display: none;">
    <p><strong><?php 
        echo "JW Player was not detected.";
        ?>
</strong></p>
  </div>
  <form name="<?php 
        echo LONGTAIL_KEY . "form";
        ?>
" method="post" action="">
    <table class="form-table">
      <tr>
        <td colspan="2">
          <?php 
        embed_demo_player();
        ?>
        </td>
      </tr>
    </table>
  </form>
  <?php 
    } else {
        if ($result == WRITE_ERROR) {
            error_message("Not able to install JW Player.  Please make sure the " . LongTailFramework::getPlayerPath() . " directory exists (and is writabe) and then visit the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.  " . JW_FILE_PERMISSIONS);
            default_state();
        } else {
            if ($result == ZIP_ERROR) {
                error_message("The necessary zip classes are missing.  Please upload the player manually instead using the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.");
                default_state();
            } else {
                if ($result == READ_ERROR) {
                    error_message("Could not find player.swf or yt.swf.  Either they are not present or the archive is invalid.");
                    default_state();
                } else {
                    error_message("Not a valid zip archive.");
                    default_state();
                }
            }
        }
    }
}
 static function purge_jwp5_settings()
 {
     global $wpdb;
     $meta_query = "DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '" . LONGTAIL_KEY . "%';";
     $option_query = "DELETE FROM {$wpdb->options} WHERE option_name LIKE '" . LONGTAIL_KEY . "%';";
     $post_query = "DELETE FROM {$wpdb->posts} WHERE post_type = 'jw_playlist';";
     $wpdb->query($meta_query);
     $wpdb->query($option_query);
     $wpdb->query($post_query);
     require_once dirname(__FILE__) . '/../framework/LongTailFramework.php';
     // echo "\nUnlinking: " . LongTailFramework::getPlayerPath();
     // echo "\nUnlinking: " . LongTailFramework::getEmbedderPath();
     @unlink(LongTailFramework::getPlayerPath());
     @unlink(LongTailFramework::getEmbedderPath());
     @rmdir(JWPLAYER_FILES_DIR . "/player/");
     $uploads = wp_upload_dir();
     $jwp5_files_dir = $uploads["basedir"] . "/" . plugin_basename(JWP6_PLUGIN_DIR_NAME);
     $handler = @opendir($jwp5_files_dir . "/configs");
     if ($handler) {
         while ($file = readdir($handler)) {
             if ($file != "." && $file != ".." && strstr($file, ".xml")) {
                 // echo "\nUnlinking: " . $jwp5_files_dir . "/configs/$file";
                 @unlink($jwp5_files_dir . "/configs/{$file}");
             }
         }
         closedir($handler);
     }
     // echo "Deleting: directories.";
     @rmdir($jwp5_files_dir . "/configs/");
     @rmdir($jwp5_files_dir);
     add_option(JWP6 . 'jwp5_purged', true);
     return True;
 }
function jwplayer_init()
{
    global $pluginURL;
    clearstatcache();
    if (!@is_dir(JWPLAYER_FILES_DIR)) {
        if (!@mkdir(JWPLAYER_FILES_DIR, 0755, true)) {
            add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('There was a problem completing activation of the plugin.  The wp-content/uploads/jw-player-plugin-for-wordpress directory could not be created.  ' . 'Please ensure the WordPress uploads directory is writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
            return;
        }
        chmod(JWPLAYER_FILES_DIR, 0755);
        if (!@mkdir(JWPLAYER_FILES_DIR . "/player", 0755)) {
            add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('There was a problem completing activation of the plugin.  The wp-content/uploads/jw-player-plugin-for-wordpress/player directory could not be created.  ' . 'Please ensure the WordPress uploads directory is writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
            return;
        }
        chmod(JWPLAYER_FILES_DIR . "/player", 0755);
        if (!@mkdir(JWPLAYER_FILES_DIR . "/configs", 0755)) {
            add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('There was a problem completing activation of the plugin.  The wp-content/uploads/jw-player-plugin-for-wordpress/configs directory could not be created.  ' . 'Please ensure the WordPress uploads directory is writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
            return;
        }
        chmod(JWPLAYER_FILES_DIR . "/configs", 0755);
        if (@is_dir(JWPLAYER_PLUGIN_DIR . "/configs")) {
            foreach (get_old_configs() as $config) {
                @rename(JWPLAYER_PLUGIN_DIR . "/configs/{$config}.xml", JWPLAYER_FILES_DIR . "/configs/{$config}.xml");
            }
        }
    }
    if (!@is_dir(JWPLAYER_FILES_DIR)) {
        add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('Activation of the JW Player Plugin for WordPress could not complete successfully.  The following directories could not be created automatically: </p><ul><li>- ' . JWPLAYER_FILES_DIR . '</li><li>- ' . JWPLAYER_FILES_DIR . '/configs</li><li>- ' . JWPLAYER_FILES_DIR . '/player</li></ul><p>Please ensure these directories are writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
    } else {
        if (!file_exists(LongTailFramework::getPlayerPath())) {
            // Error if the player doesn't exist
            add_action('admin_notices', "jwplayer_install_notices");
        }
    }
    if (file_exists(LongTailFramework::getEmbedderPath())) {
        if (get_option(LONGTAIL_KEY . "player_location_enable")) {
            wp_register_script("jw-embedder", get_option(LONGTAIL_KEY . "player_location") . "jwplayer.js", array(), false);
        } else {
            wp_register_script("jw-embedder", LongTailFramework::getEmbedderURL(), array(), false);
        }
        if (get_option(LONGTAIL_KEY . "use_head_js")) {
            wp_enqueue_script('jw-embedder');
        }
    } else {
        if (get_option(LONGTAIL_KEY . "use_head_js")) {
            wp_enqueue_script('swfobject');
        }
    }
    if (!get_option(LONGTAIL_KEY . "uninstalled")) {
        jwplayer_upgrade();
    }
    add_filter("the_content", "jwplayer_tag_callback", 11);
    add_filter("the_excerpt", "jwplayer_tag_excerpt_callback", 11);
    add_filter("widget_text", "jwplayer_tag_widget_callback", 11);
    // Player configuration and Media Management, limited to administrators.
    if (is_admin()) {
        wp_register_script('jquery-ui-jw', $pluginURL . '/' . plugin_basename(dirname(__FILE__)) . "/js/jquery.ui.jw.js");
    }
    // Parse the $_GET vars for callbacks
    add_filter('query_vars', 'jwplayer_queryvars');
    add_action('parse_request', 'jwplayer_parse_request', 9);
    add_action("wp_ajax_verify_player", "verify_player");
}
Esempio n. 6
0
$uploads = wp_upload_dir();
if (isset($uploads["error"]) && !empty($uploads["error"])) {
    add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>There was a problem completing activation of the JW Player Plugin for WordPress.  Please note that the JWPlayer Plugin for WordPress requires that the WordPress uploads directory exists and is writable.  ' . JW_FILE_PERMISSIONS . '</strong></p></div>\';'));
    return;
}
$isHttps = is_ssl();
$pluginURL = $isHttps ? str_replace("http://", "https://", WP_PLUGIN_URL) : WP_PLUGIN_URL;
$uploadsURL = $isHttps ? str_replace("http://", "https://", $uploads["baseurl"]) : $uploads["baseurl"];
define("JWPLAYER_PLUGIN_DIR", WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
define("JWPLAYER_PLUGIN_URL", $pluginURL . "/" . plugin_basename(dirname(__FILE__)));
define("JWPLAYER_FILES_DIR", $uploads["basedir"] . "/" . plugin_basename(dirname(__FILE__)));
define("JWPLAYER_FILES_URL", $uploadsURL . "/" . plugin_basename(dirname(__FILE__)));
if (!@is_dir(JWPLAYER_FILES_DIR)) {
    add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('Activation of the JW Player Plugin for WordPress could not complete successfully.  The following directories could not be created automatically: </p><ul><li>- ' . JWPLAYER_FILES_DIR . '</li><li>- ' . JWPLAYER_FILES_DIR . '/configs</li><li>- ' . JWPLAYER_FILES_DIR . '/player</li></ul><p>Please ensure these directories are writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
} else {
    if (!file_exists(LongTailFramework::getPlayerPath())) {
        // Error if the player doesn't exist
        add_action('admin_notices', "jwplayer_install_notices");
    }
}
function jwplayer_activation()
{
    clearstatcache();
    if (!@is_dir(JWPLAYER_FILES_DIR)) {
        if (!@mkdir(JWPLAYER_FILES_DIR, 0755, true)) {
            add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('There was a problem completing activation of the plugin.  The wp-content/uploads/jw-player-plugin-for-wordpress directory could not be created.  Please ensure the WordPress uploads directory is writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
            return;
        }
        chmod(JWPLAYER_FILES_DIR, 0755);
        if (!@mkdir(JWPLAYER_FILES_DIR . "/player", 0755)) {
            add_action('admin_notices', create_function('', 'echo \'<div id="message" class="fade updated"><p><strong>' . __('There was a problem completing activation of the plugin.  The wp-content/uploads/jw-player-plugin-for-wordpress/player directory could not be created.  Please ensure the WordPress uploads directory is writable.  ' . JW_FILE_PERMISSIONS) . '</strong></p></div>\';'));
Esempio n. 7
0
  /**
   * @see AdminState::render()
   */
  public function render() {
    $players = LongTailFramework::getConfigs();
    if (!$players) $this->infoMessage(sprintf(__("If you wish to create custom players please make sure the %s/configs/" . " directory exists and is writable.  This directory is necessary for creating custom players.  ", 'jw-player-plugin-for-wordpress') . JW_FILE_PERMISSIONS, JWPLAYER_FILES_DIR)); ?>
    <div class="wrap">

      <script type="text/javascript">

        function updateHandler(button) {
          button.form.submit();
        }

        function selectionHandler(button) {
          var field = document.getElementById("<?php echo LONGTAIL_KEY . "player" ?>");
          field.setAttribute("value", button.id.replace("<?php echo LONGTAIL_KEY . "player_"; ?>", ""));
          var field = document.getElementById("<?php echo LONGTAIL_KEY . "new_player"; ?>");
          field.setAttribute("value", button.id.replace("<?php echo LONGTAIL_KEY . "player_"; ?>", ""));
        }

        function copyHandler(button) {
          var field = document.getElementById("<?php echo LONGTAIL_KEY . "player" ?>");
          field.setAttribute("value", button.id.replace("<?php echo LONGTAIL_KEY . "player_"; ?>", ""));
          var field = document.getElementById("<?php echo LONGTAIL_KEY . "new_player"; ?>");
          field.setAttribute("value", button.id.replace("<?php echo LONGTAIL_KEY . "player_"; ?>", "") + "_copy");
        }

        function deleteHandler(button) {
          var result = confirm(__("Are you sure wish to delete the Player?", 'jw-player-plugin-for-wordpress'));
          if (result) {
            selectionHandler(button);
            return true;
          }
          return false;
        }

      </script>

      <h2>JW Player Setup</h2>
      <p><span><?php echo JW_SETUP_DESC; ?></span><p>
      <?php if (file_exists(LongTailFramework::getPrimaryPlayerPath())) { ?>
        <form name="<?php echo LONGTAIL_KEY . "upgrade_form" ?>" method="post" action="admin.php?page=jwplayer-update">
          <?php $version = get_option(LONGTAIL_KEY . "version"); ?>
          <?php $alternate = get_option(LONGTAIL_KEY . "player_location_enable"); ?>
          <?php $location = get_option(LONGTAIL_KEY . "player_location"); ?>
          <?php $jwPlayer = file_exists(LongTailFramework::getPlayerPath()); ?>
          <?php $jwEmbedder = file_exists(LongTailFramework::getEmbedderPath()); ?>
            <div id="poststuff">
              <div id="post-body">
                <div id="post-body-content">
                  <div class="stuffbox">
                    <h3 class="hndle"><span><?php _e("JW Player Status", 'jw-player-plugin-for-wordpress'); ?></span></h3>
                    <div class="inside" style="margin: 15px;">
                      <table>
                        <tr valign="top">
                          <td>
                            <div>
                            <?php if (!$alternate) { ?>
                              <p>
                                <span><strong>JW Player:</strong> <?php echo $jwPlayer ? __("Installed", 'jw-player-plugin-for-wordpress') : __("Not detected", 'jw-player-plugin-for-wordpress'); echo $version && $jwPlayer ? " (JW Player $version)" : ""; ?></span>
                              </p>
                              <p><span><strong>JW Embedder:</strong></span> <?php echo $jwEmbedder ? __("Installed", 'jw-player-plugin-for-wordpress') : __("Not detected (SWFObject will be used instead)", 'jw-player-plugin-for-wordpress'); ?></p>
                              <?php if (!strstr($version, "Licensed")) { ?>
                                <p><span><strong><?php _e("Please Note:", 'jw-player-plugin-for-wordpress');?></strong> <?php _e("The JW Player Plugin for WordPress does not yet support JW Player 6.  We are working quickly to update the plugin over the next few weeks. By early 2013, you will be able to use WordPress with JW Player 6.  For now, we recommend sticking with JW Player 5. Please stay tuned!", 'jw-player-plugin-for-wordpress'); ?></span></p>
                                <p><strong><?php _e("Supported Versions:", 'jw-player-plugin-for-wordpress'); ?></strong></p>
                                <table style="border: 1px solid gray;">
                                  <tr>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.0</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.1</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.2</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.3</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.4</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.5</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.6</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.7</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.8</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.9</td>
                                    <td style="border: 1px solid gray; width: 30px; text-align: center">5.10</td>
                                  </tr>
                                </table>
                                <p><em><?php _e("If you have already purchased a commercial upgrade for JW6, we can either process a refund, or you can keep your commercial license until the plugin is updated.  We apologize for the inconvenience.");?></em></p>
                              <?php } ?>
                            <?php } else if ($alternate) { ?>
                              <p><span><?php echo "<strong>" . __("Current Player", 'jw-player-plugin-for-wordpress') . ":</strong> " . __("Version Unknown", 'jw-player-plugin-for-wordpress'); ?></span></p>
                              <p><span><?php printf(__("The player is being loaded from an alternate location (<strong>%s</strong>) and is not being managed by the plugin.", 'jw-player-plugin-for-wordpress'), $location); ?></span></p>
                            <?php } else { ?>
                              <p><span><?php _e("<strong>Current Player:</strong> Version Unknown", 'jw-player-plugin-for-wordpress'); ?></span></p>
                              <p><input class="button-secondary" type="submit" name="Update_Player" value="<?php _e("Click Here to Reinstall", 'jw-player-plugin-for-wordpress'); ?>" /></p>
                            <?php } ?>
                          </div>
                        </td>
                      </tr>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </form>
      <?php } else if (file_exists(LongTailFramework::getSecondaryPlayerPath())) { ?>
        <form name="<?php echo LONGTAIL_KEY . "upgrade_form" ?>" method="post" action="admin.php?page=jwplayer-update">
          <span><?php _e("<strong>Current Player:</strong> Version Unknown ", 'jw-player-plugin-for-wordpress'); ?></span>
          <input class="button-secondary" type="submit" name="Update_Player" value="<?php _e("Click Here to Reinstall", 'jw-player-plugin-for-wordpress'); ?>" />
        </form>
      <?php } ?>
      <form name="<?php echo LONGTAIL_KEY . "form" ?>" method="post" action="">
      <div id="poststuff">
        <div id="post-body">
          <div id="post-body-content">
            <div class="stuffbox">
              <h3 class="hndle"><span>Manage Players</span></h3>
              <div class="inside" style="margin: 15px;">
                <table style="width: 100%;">
                  <tr valign="top">
                    <td>
                      <div>
                        <p><span><?php echo JW_SETUP_EDIT_PLAYERS; ?></span></p>
                          <table class="widefat" cellspacing="0">
                            <thead>
                              <tr>
                                <th class="manage-column column-name" style="text-shadow: none;">Default</th>
                                <th class="manage-column column-name">Players</th>
                                <th class="manage-column column-name">Control Bar</th>
                                <th class="manage-column column-name">Skin</th>
                                <th class="manage-column column-name">Dock</th>
                                <th class="manage-column column-name">Autostart</th>
                                <th class="manage-column column-name">Height</th>
                                <th class="manage-column column-name">Width</th>
                                <th class="manage-column column-name" style="text-shadow: none;">Actions</th>
                              </tr>
                            </thead>
                            <tbody>
                              <tr>
                                <td style="vertical-align: middle">
                                  <input onchange="updateHandler(this);" type="radio" id="<?php echo LONGTAIL_KEY . "default_Out-of-the-Box"; ?>" name="<?php echo LONGTAIL_KEY . "default"; ?>" value="<?php _e("Out-of-the-Box", 'jw-player-plugin-for-wordpress'); ?> <?php checked("Out-of-the-Box", get_option(LONGTAIL_KEY . "default")); ?>"/>
                                </td>
                                <td style="vertical-align: middle;"><span><?php echo "Out-of-the-Box"; ?></span></td>
                                <td style="vertical-align: middle;"><span><?php echo "bottom"; ?></span></td>
                                <td style="vertical-align: middle;"><span><?php echo "default"; ?></span></td>
                                <td style="vertical-align: middle;"><span><?php echo "false"; ?></span></td>
                                <td style="vertical-align: middle;"><span><?php echo "false"; ?></span></td>
                                <td style="vertical-align: middle;"><span><?php echo "300"; ?></span></td>
                                <td style="vertical-align: middle;"><span><?php echo "400"; ?></span></td>
                                <td style="vertical-align: middle;"><input class="button-secondary action" id="<?php echo LONGTAIL_KEY . "player_Out-of-the-Box"; ?>" type="submit" name="Next" value="<?php _e("Copy", 'jw-player-plugin-for-wordpress'); ?>" onclick="copyHandler(this)"/></td>
                              </tr>
                              <?php $alternate = false; ?>
                              <?php if ($players) { ?>
                                <?php foreach ($players as $player) { ?>
                                  <?php if ($player != __("New Player", 'jw-player-plugin-for-wordpress')) { ?>
                                    <?php $alternate = !$alternate; ?>
                                    <?php LongTailFramework::setConfig($player); ?>
                                    <?php $details = LongTailFramework::getPlayerFlashVars(LongTailFramework::BASIC); ?>
                                    <tr <?php if ($alternate) echo "class=\"alternate\""; ?> >
                                      <td style="vertical-align: middle;">
                                        <input onchange="updateHandler(this);" type="radio" id="<?php echo LONGTAIL_KEY . "default_" . $player; ?>" name="<?php echo LONGTAIL_KEY . "default"; ?>" value="<?php echo $player; ?>" <?php checked($player, get_option(LONGTAIL_KEY . "default")); ?>/>
                                      </td>
                                      <td style="vertical-align: middle;"><span><?php echo $player ?></span></td>
                                      <?php foreach (array_keys($details) as $detail) { ?>
                                        <?php foreach($details[$detail] as $fvar) { ?>
                                          <td style="vertical-align: middle;"><span><?php echo $fvar->getDefaultValue() ? $fvar->getDefaultValue() : "default"; ?></span></td>
                                        <?php } ?>
                                      <?php } ?>
                                      <td>
                                        <input class="button-secondary action" id="<?php echo LONGTAIL_KEY . "player_" . $player; ?>" type="submit" name="Next" value="<?php _e("Copy", 'jw-player-plugin-for-wordpress'); ?>" onclick="copyHandler(this)"/>
                                        <input class="button-secondary action" id="<?php echo LONGTAIL_KEY . "player_" . $player; ?>" type="submit" name="Next" value="<?php _e("Edit", 'jw-player-plugin-for-wordpress'); ?>" onclick="selectionHandler(this)"/>
                                        <input class="button-secondary action" id="<?php echo LONGTAIL_KEY . "player_" . $player; ?>" type="submit" name="Next" value="<?php _e("Delete", 'jw-player-plugin-for-wordpress'); ?>" onclick="return deleteHandler(this)"/>
                                      </td>
                                    </tr>
                                  <?php } ?>
                                <?php } ?>
                              <?php } ?>
                            </tbody>
                          </table>
                          <br/>
                          <input class="button-secondary action" type="submit" name="Next" value="<?php _e("Create Custom Player", 'jw-player-plugin-for-wordpress'); ?>"/>
                          <input id="<?php echo LONGTAIL_KEY . "new_player"; ?>" type="hidden" name="<?php echo LONGTAIL_KEY . "new_player"; ?>" value=""/>
                          <input id="<?php echo LONGTAIL_KEY . "player"; ?>" type="hidden" name="<?php echo LONGTAIL_KEY . "config" ?>" value=""/>
                          <input type="hidden" name="<?php echo LONGTAIL_KEY . "state" ?>" value=<?php echo PlayerState::getID(); ?> />
                        </div>
                      </td>
                    </tr>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </form>
    </div>
    <?php
  }