WEB JUKEBOX — INSTALL GUIDE (plain text)
=========================================

Created by Sarutobi for Animehistory.org
https://animehistory.org/

This guide helps you add the jukebox to your site or run it on your
own computer. You do not need to be a programmer.


WHAT YOU NEED
-------------

  * PHP 7.4 or newer (PHP 8.x recommended)
  * MP3 and/or OGG music files
  * A web browser


STEP 1 — ADD YOUR MUSIC
-----------------------

  Copy your .mp3 or .ogg files into the jukebox/music/ folder.
  The player lists every supported file in that folder (no database).
  Track titles come from the file name (spaces instead of _ or -).


STEP 2 — UPLOAD TO YOUR HOST
----------------------------

  Upload the ENTIRE jukebox folder to your website, for example:
    public_html/jukebox/
    www/jukebox/

  Edit config.php only if auto-detect is wrong. If you uploaded to
  public_html/free_jukebox/, the path should be:
    $jukebox_url_path = '/free_jukebox';
  (Leading slash, no trailing slash. Newer copies guess this from the
  folder name automatically.)


STEP 3 — PUT THE JUKEBOX ON A PAGE
----------------------------------

  Open any existing .php page on your site and add this line where you
  want the player to appear:

    <?php include("jukebox/jukebox.php"); ?>

  Adjust the path if your jukebox folder lives somewhere else.
  One include = the full compact widget (playlist, controls, skins).


OPTION A — STANDALONE DEMO PAGE
-------------------------------

  After upload, you can also open:
    https://YOUR-DOMAIN.com/jukebox/
  That uses index.php, which includes the same widget for testing.


OPTION B — RUN ON YOUR COMPUTER (LOCAL DEMO)
--------------------------------------------

  1. Install PHP if needed (see your OS package manager or windows.php.net).

  2. Open a terminal and go into the jukebox folder:
       cd /path/to/jukebox

  3. Start PHP's built-in web server:
       php -S localhost:8080

  4. Visit http://localhost:8080/ in your browser.
     (index.php sets the asset path for this mode automatically.)

  5. Press Ctrl+C in the terminal to stop the server.


EMBED ON A NON-PHP PAGE?
------------------------

  This release is designed for PHP includes. If your page is pure HTML,
  rename it to .php or use a small PHP wrapper page that includes the
  jukebox line above.


TROUBLESHOOTING
---------------

  Widget shows but styles are missing, playlist empty, skins do nothing
    → Re-upload jukebox.php, config.php, and assets/js/jukebox.js
      (older copies left the playlist JSON outside the widget, so JS never started).
    → If you include the jukebox from another page, set
      $jukebox_url_path = '/free_jukebox'; (or whatever folder you used).

  Playlist is empty
    → Add .mp3 or .ogg files to music/ (same folder as jukebox.php, not the site root).

  Click Play but nothing happens
    → Some browsers block audio until you click Play (normal).
    → Check that music files are uploaded and URLs work in the browser.

  Tracks fail to load on shared hosting
    → Confirm the music/ folder and files are readable by the web server.


CREDITS
-------

  Web Jukebox by Sarutobi
  Animehistory.org — https://animehistory.org/

For features, skins, and config options, see readme.txt in this folder.
