Пример #1
0
function download_state()
{
    ?>
  <h2><?php 
    echo "JW Player Install";
    ?>
</h2>
  <p/>
  <?php 
    $result = player_download();
    if ($result == SUCCESS) {
        ?>
  <div id="info" class="fade updated">
    <p><strong><span id="player_version"><?php 
        echo "Successfully downloaded and installed the latest player version, JW Player ";
        ?>
</span></strong></p>
    <p><?php 
        echo "If you have a specific version of the JW Player you wish to install (eg. licensed version), then you can install it using the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.";
        ?>
</p>
  </div>
  <form name="<?php 
        echo LONGTAIL_KEY . "form";
        ?>
" method="post" action="">
    <table class="form-table">
      <tr>
        <td colspan="2">
          <?php 
        embed_demo_player(true);
        ?>
        </td>
      </tr>
    </table>
  </form>
  <?php 
    } else {
        if ($result == DOWNLOAD_ERROR) {
            error_message("Not able to download JW Player.  Please check your internet connection. <br/> If you already have the JW Player then you can install it using the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.  " . JW_FILE_PERMISSIONS);
        } 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);
            } 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>.");
                } 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.");
                    }
                }
            }
        }
    }
}
Пример #2
0
function download_state() { ?>
  <h2><?php _e("JW Player Install", 'jw-player-plugin-for-wordpress'); ?></h2>
  <p/>
  <?php
  $result = player_download();
  if ($result == SUCCESS) { ?>
  <div id="info" class="fade updated">
    <p><strong><span id="player_version"><?php _e("Successfully downloaded and installed the latest player version, JW Player ", 'jw-player-plugin-for-wordpress'); ?></span></strong></p>
    <p><?php _e("If you have a specific version of the JW Player you wish to install (eg. licensed version), then you can install it using the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.", 'jw-player-plugin-for-wordpress'); ?></p>
  </div>
  <form name="<?php echo LONGTAIL_KEY . "form"; ?>" method="post" action="">
    <table class="form-table">
      <tr>
        <td colspan="2">
          <?php embed_demo_player(true); ?>
        </td>
      </tr>
    </table>
  </form>
  <?php } else if ($result == DOWNLOAD_ERROR) {
    error_message(sprintf(__("Not able to download JW Player.  Please check your internet connection. <br/>
    If you already have the JW Player then you can install it using the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.<br/>
    Alternatively you may FTP the player files directly to your site.  Place the player.swf and jwplayer.js files in %s/player/. <br/> ", 'jw-player-plugin-for-wordpress'), JWPLAYER_FILES_DIR) . JW_FILE_PERMISSIONS);
  } else if ($result == WRITE_ERROR) {
    error_message(sprintf(__("Not able to install JW Player.
    Please make sure the %s/player/ directory exists (and is writabe) and then visit the <a href='admin.php?page=jwplayer-update'>upgrade page</a>.<br/>
    Alternatively you may FTP the player.swf and jwplayer.js files directly to your site. <br/>", 'jw-player-plugin-for-wordpress'), JWPLAYER_FILES_DIR) . JW_FILE_PERMISSIONS);
  } else if ($result == ZIP_ERROR) {
    error_message(sprintf(__("The necessary zip classes are missing.  Please FTP the player manually.  <br/>Place the player.swf and jwplayer.js files in %s/player/.", 'jw-player-plugin-for-wordpress'), JWPLAYER_FILES_DIR));
  } else if ($result == READ_ERROR) {
    error_message(sprintf(__("Could not find player.swf or jwplayer.js.  Either they are not present or the archive is invalid.<br/>
    Alternatively you may FTP the player files directly to your site.  Place the player.swf and jwplayer.js files in %s/player/.", 'jw-player-plugin-for-wordpress'), JWPLAYER_FILES_DIR));
  }
}