Update INSTALL.md
This commit is contained in:
131
INSTALL.md
131
INSTALL.md
@@ -1,101 +1,58 @@
|
|||||||
# README — DA
|
# Installationsvejledning – Twitch PHP Bot
|
||||||
|
|
||||||
Dette projekt er et **PHP-baseret starterkit** til en **Moderator Platform** til Mix It Up Bot, som kører på **Windows** med lokale brugere (uden Twitch-login). Systemet giver **SU-Admin** og **Moderatorer** adgang til administration af kommandoer, filer, events m.m. direkte via en webgrænseflade.
|
## 1️⃣ Download
|
||||||
|
Klon eller hent ZIP fra GitHub:
|
||||||
|
|
||||||
## Funktioner
|
```
|
||||||
- Login-system (lokale brugere gemt i MySQL)
|
git clone https://github.com/<dit-brugernavn>/twitch-php-bot.git
|
||||||
- Roller: SU-Admin, Moderator, Redaktør
|
Placer i din webserver, fx:
|
||||||
- Dashboard med basisfunktioner
|
|
||||||
- Kommandooversigt (stub – klar til at blive udvidet)
|
|
||||||
- Fil-editor (`storage/files/*.txt`) hvor Moderator og SU-Admin kan redigere
|
|
||||||
- Database-opsætning (`schema.sql` + `seed.sql`)
|
|
||||||
- Klar til integration med Mix It Up API via `app/MixItUpService.php`
|
|
||||||
|
|
||||||
## Installation (Windows + XAMPP)
|
makefile
|
||||||
1. Installer **XAMPP** (Apache, PHP 8.2+, MariaDB).
|
C:\xampp\htdocs\bot\
|
||||||
2. Opret database, kør `database/schema.sql` + `database/seed.sql`.
|
```
|
||||||
3. Placer mappen i `C:\xampp\htdocs\mod-platform`.
|
|
||||||
4. Ret `app/config.php` (DB login, base_url, MixItUp API).
|
|
||||||
5. Start Apache & MySQL i XAMPP.
|
|
||||||
6. Gå til `http://localhost/mod-platform/public/login.php`.
|
|
||||||
7. Log ind med: **admin / ChangeMe!2025** (skift straks kodeord!).
|
|
||||||
|
|
||||||
---
|
2️⃣ Krav
|
||||||
|
PHP 8.1+
|
||||||
|
|
||||||
# README — EN
|
Aktiverede extensions:
|
||||||
|
pdo_sqlite
|
||||||
|
curl
|
||||||
|
mbstring
|
||||||
|
json
|
||||||
|
Tjek i php.ini at disse ikke er udkommenteret.
|
||||||
|
|
||||||
This project is a **PHP-based starter kit** for a **Moderator Platform** for Mix It Up Bot, running on **Windows** with local users (no Twitch login). The system provides **SU-Admin** and **Moderators** access to manage commands, files, events, and more via a web interface.
|
3️⃣ Konfiguration
|
||||||
|
Opret filen .env i projektets rod:
|
||||||
|
|
||||||
## Features
|
.env
|
||||||
- Login system (local users stored in MySQL)
|
```
|
||||||
- Roles: SU-Admin, Moderator, Editor
|
TWITCH_CHANNEL=ditkanalnavn
|
||||||
- Dashboard with basic controls
|
TWITCH_OAUTH=oauth:xxxxxxxxxxxxxxxxxxxx
|
||||||
- Commands overview (stub – ready to be expanded)
|
TWITCH_CLIENT_ID=din_client_id
|
||||||
- File editor (`storage/files/*.txt`) where Moderator and SU-Admin can edit
|
TWITCH_CLIENT_SECRET=din_client_secret
|
||||||
- Database setup (`schema.sql` + `seed.sql`)
|
Hent OAuth-token her: https://twitchapps.com/tmi/
|
||||||
- Ready for Mix It Up API integration via `app/MixItUpService.php`
|
```
|
||||||
|
|
||||||
## Installation (Windows + XAMPP)
|
4️⃣ Database & Admin
|
||||||
1. Install **XAMPP** (Apache, PHP 8.2+, MariaDB).
|
Gå til http://localhost/bot/web/migrate_users.php → sikrer korrekte kolonner
|
||||||
2. Create database, run `database/schema.sql` + `database/seed.sql`.
|
Gå til http://localhost/bot/web/create_admin.php → opretter admin
|
||||||
3. Place project folder in `C:\xampp\htdocs\mod-platform`.
|
|
||||||
4. Edit `app/config.php` (DB login, base_url, MixItUp API).
|
|
||||||
5. Start Apache & MySQL in XAMPP.
|
|
||||||
6. Open `http://localhost/mod-platform/public/login.php`.
|
|
||||||
7. Login with: **admin / ChangeMe!2025** (change password immediately!).
|
|
||||||
|
|
||||||
---
|
Login:
|
||||||
|
Brugernavn: admin
|
||||||
|
Adgangskode: demo
|
||||||
|
|
||||||
# Beskrivelse — DA
|
5️⃣ Start botten
|
||||||
|
Åbn http://localhost/bot/web/login.php
|
||||||
|
|
||||||
Moderator Platform er udviklet for at give en samlet og brugervenlig webgrænseflade til styring af Mix It Up Bot. Den gør det muligt for moderatorer og admins at:
|
Log ind og klik Start
|
||||||
- Oprette og redigere kommandoer
|
Botten kører i PHP bag kulissen og svarer på chat-kommandoer.
|
||||||
- Administrere events og timere
|
|
||||||
- Se og ændre i tekstfiler (fx citater)
|
|
||||||
- Udvides med moderation, statistik og logs
|
|
||||||
|
|
||||||
Målet er at skabe et fleksibelt og sikkert værktøj, som kan køre direkte på din Windows-server sammen med Mix It Up Bot.
|
6️⃣ (Valgfrit) Live-log via WebSocket
|
||||||
|
Installer Node.js → kør:
|
||||||
|
|
||||||
---
|
```
|
||||||
|
npm install ws
|
||||||
|
node ws_server.js
|
||||||
|
```
|
||||||
|
Dashboardet skifter automatisk til WebSocket, hvis tilgængelig.
|
||||||
|
|
||||||
# Description — EN
|
|
||||||
|
|
||||||
Moderator Platform is built to provide a unified and user-friendly web interface for managing Mix It Up Bot. It allows moderators and admins to:
|
|
||||||
- Create and edit commands
|
|
||||||
- Manage events and timers
|
|
||||||
- View and edit text files (e.g., quotes)
|
|
||||||
- Extend with moderation, statistics, and logs
|
|
||||||
|
|
||||||
The goal is to deliver a flexible and secure tool that runs directly on your Windows server alongside Mix It Up Bot.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# INSTALL — DA
|
|
||||||
|
|
||||||
1. Download og installer **XAMPP** (Apache, PHP 8.2+, MariaDB).
|
|
||||||
2. Klon eller udpak projektet i `C:\xampp\htdocs\mod-platform`.
|
|
||||||
3. Opret en database i phpMyAdmin kaldet `mod_platform`.
|
|
||||||
4. Importér `database/schema.sql` og derefter `database/seed.sql`.
|
|
||||||
5. Ret `app/config.php` med:
|
|
||||||
- Database login
|
|
||||||
- Base URL (fx `http://localhost/mod-platform/public`)
|
|
||||||
- MixItUp API base (fx `http://127.0.0.1:8911`)
|
|
||||||
6. Start Apache og MySQL via XAMPP-kontrolpanelet.
|
|
||||||
7. Åbn browser: `http://localhost/mod-platform/public/login.php`.
|
|
||||||
8. Log ind: `admin / ChangeMe!2025` og skift password straks.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# INSTALL — EN
|
|
||||||
|
|
||||||
1. Download and install **XAMPP** (Apache, PHP 8.2+, MariaDB).
|
|
||||||
2. Clone or extract the project into `C:\xampp\htdocs\mod-platform`.
|
|
||||||
3. Create a database in phpMyAdmin named `mod_platform`.
|
|
||||||
4. Import `database/schema.sql` and then `database/seed.sql`.
|
|
||||||
5. Edit `app/config.php` with:
|
|
||||||
- Database login
|
|
||||||
- Base URL (e.g., `http://localhost/mod-platform/public`)
|
|
||||||
- MixItUp API base (e.g., `http://127.0.0.1:8911`)
|
|
||||||
6. Start Apache and MySQL via the XAMPP control panel.
|
|
||||||
7. Open browser: `http://localhost/mod-platform/public/login.php`.
|
|
||||||
8. Login: `admin / ChangeMe!2025` and change the password immediately.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user