.
This commit is contained in:
106
CHANGELOG.md
106
CHANGELOG.md
@@ -9,9 +9,7 @@ und dieses Projekt folgt [Semantic Versioning](https://semver.org/lang/de/).
|
|||||||
|
|
||||||
### Geplant
|
### Geplant
|
||||||
- Multi-Language Support (Deutsch/Englisch)
|
- Multi-Language Support (Deutsch/Englisch)
|
||||||
- Erweiterte Statistiken im Client Area
|
|
||||||
- Automatische Backup-Verwaltung
|
- Automatische Backup-Verwaltung
|
||||||
- SSL-Zertifikat-Management über Let's Encrypt
|
|
||||||
- E-Mail-Account-Verwaltung im Client Area
|
- E-Mail-Account-Verwaltung im Client Area
|
||||||
- Datenbank-Verwaltung im Client Area
|
- Datenbank-Verwaltung im Client Area
|
||||||
- FTP-Account-Management
|
- FTP-Account-Management
|
||||||
@@ -19,6 +17,107 @@ und dieses Projekt folgt [Semantic Versioning](https://semver.org/lang/de/).
|
|||||||
- Ressourcen-Upgrade/Downgrade-Funktionen
|
- Ressourcen-Upgrade/Downgrade-Funktionen
|
||||||
- Webhook-Support für Events
|
- Webhook-Support für Events
|
||||||
|
|
||||||
|
## [2.0.0] - 2024-01-20
|
||||||
|
|
||||||
|
### 🎉 Wichtige Änderungen
|
||||||
|
- **Zentralisierte API-Konfiguration:** API-Keys und Server-Einstellungen werden jetzt nur einmal in den WHMCS Server-Einstellungen konfiguriert, nicht mehr pro Produkt
|
||||||
|
- **Template/Vorlagen-System:** Automatische Synchronisation von KeyHelp-Plänen/Vorlagen als Dropdown-Auswahl
|
||||||
|
- **Template-basierte Provisionierung:** Domains werden automatisch mit der ausgewählten Vorlage erstellt
|
||||||
|
|
||||||
|
### Hinzugefügt
|
||||||
|
- **Template-Verwaltung:**
|
||||||
|
- Automatisches Laden von KeyHelp-Plänen/Vorlagen via API
|
||||||
|
- Dropdown-Auswahl bei Produktkonfiguration
|
||||||
|
- Template-Cache für bessere Performance (5 Minuten)
|
||||||
|
- "Sync Templates" Button im Admin-Bereich
|
||||||
|
- Template-Name wird im Client Area angezeigt
|
||||||
|
|
||||||
|
- **Verbesserte Client Area:**
|
||||||
|
- Anzeige des verwendeten Templates/Plans
|
||||||
|
- Direkter Link zum Admin-Panel für die Domain
|
||||||
|
- Template-Badge in der Produktübersicht
|
||||||
|
- Übersichtlichere Button-Anordnung
|
||||||
|
- Admin-Panel-Button für direkte Verwaltung
|
||||||
|
|
||||||
|
- **Zentrale Server-Konfiguration:**
|
||||||
|
- API-Key wird nur einmal in WHMCS Server-Einstellungen eingegeben
|
||||||
|
- Hostname/IP in Server-Einstellungen (nicht mehr pro Produkt)
|
||||||
|
- SSL-Einstellungen über WHMCS Server-Verwaltung
|
||||||
|
- Vereinfachte Produktkonfiguration (nur Template-Auswahl)
|
||||||
|
|
||||||
|
- **Template-basierte Erstellung:**
|
||||||
|
- Domain wird automatisch mit ausgewählter Vorlage erstellt
|
||||||
|
- Template-ID wird in Account-Details gespeichert
|
||||||
|
- Template-Informationen werden bei Erstellung verwendet
|
||||||
|
- Automatische Zuordnung von Plan-Ressourcen
|
||||||
|
|
||||||
|
- **Neue API-Funktionen:**
|
||||||
|
- `_keyhelpmanager_GetTemplates()` - Lädt verfügbare Templates
|
||||||
|
- `keyhelpmanager_TemplateLoader()` - Dropdown-Loader für Templates
|
||||||
|
- `keyhelpmanager_SyncTemplates()` - Synchronisiert Templates manuell
|
||||||
|
- `keyhelpmanager_AdminCustomButtonArray()` - Admin-Buttons
|
||||||
|
|
||||||
|
- **Erweiterte Account-Speicherung:**
|
||||||
|
- Domain-ID wird jetzt gespeichert
|
||||||
|
- Template-ID wird in Account-Details hinterlegt
|
||||||
|
- Bessere Verknüpfung zwischen WHMCS und KeyHelp
|
||||||
|
|
||||||
|
### Geändert
|
||||||
|
- **API-Request-Funktion überarbeitet:**
|
||||||
|
- Verwendet jetzt WHMCS Server-Parameter statt Config-Optionen
|
||||||
|
- `serverhostname` statt `configoption1`
|
||||||
|
- `serveraccesshash` statt `configoption2`
|
||||||
|
- `serversecure` statt `configoption3`
|
||||||
|
- Bessere Fehlermeldungen bei fehlender Konfiguration
|
||||||
|
|
||||||
|
- **ConfigOptions vereinfacht:**
|
||||||
|
- Nur noch Template-Dropdown statt 4 Konfigurationsoptionen
|
||||||
|
- Hostname, API-Key, SSL nicht mehr pro Produkt nötig
|
||||||
|
- Einfachere Produktverwaltung
|
||||||
|
|
||||||
|
- **CreateAccount verbessert:**
|
||||||
|
- Verwendet Template-ID aus Produktkonfiguration
|
||||||
|
- Übergibt Template bei Domain-Erstellung
|
||||||
|
- Speichert zusätzliche Metadaten (Domain-ID, Template)
|
||||||
|
|
||||||
|
- **ClientArea erweitert:**
|
||||||
|
- Zeigt Template-Namen und Admin-Panel-Link
|
||||||
|
- Lädt Template-Details von API
|
||||||
|
- Direkter Link zur Domain-Verwaltung im Panel
|
||||||
|
|
||||||
|
### Behoben
|
||||||
|
- Redundante API-Key-Eingabe pro Produkt entfernt
|
||||||
|
- SSL-Konfiguration vereinheitlicht
|
||||||
|
- Template-Auswahl jetzt dynamisch statt statisch
|
||||||
|
- Panel-URL-Generierung korrigiert
|
||||||
|
|
||||||
|
### Sicherheit
|
||||||
|
- SSL-Verifizierung standardmäßig aktiviert
|
||||||
|
- Zentrale API-Key-Verwaltung reduziert Sicherheitsrisiken
|
||||||
|
- Weniger Stellen für sensible Daten in der Konfiguration
|
||||||
|
|
||||||
|
### Technische Details
|
||||||
|
- **Neue API-Endpunkte:**
|
||||||
|
- `GET /api/v2/plans` - Lädt verfügbare Pläne/Templates
|
||||||
|
- `GET /api/v2/plans/{id}` - Lädt Template-Details
|
||||||
|
|
||||||
|
- **Neue Datenbankfelder:**
|
||||||
|
- `domainid` in Account-Details
|
||||||
|
- `template` in Account-Details
|
||||||
|
- Template-Cache in `tblconfiguration`
|
||||||
|
|
||||||
|
### Migration von 1.x
|
||||||
|
1. Konfigurieren Sie Ihre KeyHelp-Server in WHMCS unter Setup > Products/Services > Servers
|
||||||
|
2. Tragen Sie Hostname und API-Key dort ein (statt in jedem Produkt)
|
||||||
|
3. Wählen Sie bei jedem Produkt den entsprechenden Server aus
|
||||||
|
4. Verwenden Sie "Sync Templates" um verfügbare Vorlagen zu laden
|
||||||
|
5. Wählen Sie für jedes Produkt die passende Vorlage aus
|
||||||
|
|
||||||
|
### Bekannte Einschränkungen
|
||||||
|
- Template-Cache läuft nach 5 Minuten ab (nicht konfigurierbar)
|
||||||
|
- Manuelle Template-Synchronisation erforderlich bei Änderungen in KeyHelp
|
||||||
|
- Admin-Panel-Link funktioniert nur mit Standard-KeyHelp-URL-Struktur
|
||||||
|
|
||||||
## [1.0.0] - 2024-01-15
|
## [1.0.0] - 2024-01-15
|
||||||
|
|
||||||
### Entwickelt von
|
### Entwickelt von
|
||||||
@@ -210,7 +309,8 @@ Contributions sind willkommen! Bitte erstellen Sie einen Pull Request mit:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[Unreleased]: https://github.com/ihr-repo/keyhelpmanager/compare/v1.0.0...HEAD
|
[Unreleased]: https://github.com/ihr-repo/keyhelpmanager/compare/v2.0.0...HEAD
|
||||||
|
[2.0.0]: https://github.com/ihr-repo/keyhelpmanager/compare/v1.0.0...v2.0.0
|
||||||
[1.0.0]: https://github.com/ihr-repo/keyhelpmanager/releases/tag/v1.0.0
|
[1.0.0]: https://github.com/ihr-repo/keyhelpmanager/releases/tag/v1.0.0
|
||||||
[0.9.0-beta]: https://github.com/ihr-repo/keyhelpmanager/releases/tag/v0.9.0-beta
|
[0.9.0-beta]: https://github.com/ihr-repo/keyhelpmanager/releases/tag/v0.9.0-beta
|
||||||
[0.5.0-alpha]: https://github.com/ihr-repo/keyhelpmanager/releases/tag/v0.5.0-alpha
|
[0.5.0-alpha]: https://github.com/ihr-repo/keyhelpmanager/releases/tag/v0.5.0-alpha
|
||||||
316
QUICKSTART.md
Normal file
316
QUICKSTART.md
Normal file
@@ -0,0 +1,316 @@
|
|||||||
|
# KeyHelp Manager v2.0 - Schnellstart-Anleitung
|
||||||
|
|
||||||
|
Dieses Dokument beschreibt die schnellste Methode, um KeyHelp Manager v2.0 in WHMCS zu konfigurieren.
|
||||||
|
|
||||||
|
⏱️ **Geschätzte Zeit:** 10 Minuten
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 In 5 Schritten zum fertigen Setup
|
||||||
|
|
||||||
|
### Schritt 1: Module hochladen (2 Min.)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Entpacke das Modul in dein WHMCS-Verzeichnis
|
||||||
|
unzip keyhelpmanager.zip -d /pfad/zu/whmcs/modules/servers/
|
||||||
|
```
|
||||||
|
|
||||||
|
Oder manuell:
|
||||||
|
1. Entpacke `keyhelpmanager.zip`
|
||||||
|
2. Lade den Ordner `keyhelpmanager` nach `modules/servers/` hoch
|
||||||
|
|
||||||
|
### Schritt 2: Server in WHMCS konfigurieren (3 Min.)
|
||||||
|
|
||||||
|
1. Gehe zu: **Setup → Products/Services → Servers**
|
||||||
|
2. Klicke: **Add New Server**
|
||||||
|
3. Fülle aus:
|
||||||
|
|
||||||
|
```
|
||||||
|
Name: KeyHelp Server 1
|
||||||
|
Hostname: keyhelp.example.com
|
||||||
|
Type: KeyHelp Manager
|
||||||
|
Password: [DEIN-API-KEY-HIER]
|
||||||
|
Secure (SSL): ✓ (aktivieren)
|
||||||
|
Active: ✓ (aktivieren)
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Klicke: **Test Connection** → "Connection Successful!" ✅
|
||||||
|
5. Speichern: **Save Changes**
|
||||||
|
|
||||||
|
### Schritt 3: Produkt erstellen (2 Min.)
|
||||||
|
|
||||||
|
1. Gehe zu: **Setup → Products/Services → Products/Services**
|
||||||
|
2. Wähle eine Produktgruppe oder erstelle eine neue
|
||||||
|
3. Klicke: **Create a New Product**
|
||||||
|
4. Fülle aus:
|
||||||
|
|
||||||
|
```
|
||||||
|
Product Type: Hosting Account
|
||||||
|
Product Name: Webhosting Basic
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Tab: **Module Settings**
|
||||||
|
6. Wähle:
|
||||||
|
- **Module Name:** KeyHelp Manager
|
||||||
|
- **Server Group:** oder **Selected Server:** KeyHelp Server 1
|
||||||
|
|
||||||
|
### Schritt 4: Templates synchronisieren (1 Min.)
|
||||||
|
|
||||||
|
1. In den **Module Settings** (gleiche Seite)
|
||||||
|
2. Klicke: **Sync Templates** (Button oben)
|
||||||
|
3. Nach 2-3 Sekunden: Dropdown wird mit Templates gefüllt
|
||||||
|
4. Wähle bei **KeyHelp Template:** dein gewünschtes Template
|
||||||
|
- z.B. "Basic Plan", "Pro Plan", etc.
|
||||||
|
5. Speichern: **Save Changes**
|
||||||
|
|
||||||
|
### Schritt 5: Test durchführen (2 Min.)
|
||||||
|
|
||||||
|
1. Erstelle eine Test-Bestellung für das Produkt
|
||||||
|
2. Markiere als bezahlt
|
||||||
|
3. Prüfe:
|
||||||
|
- ✅ Account wird in KeyHelp erstellt
|
||||||
|
- ✅ Client Area zeigt Login-Daten
|
||||||
|
- ✅ Template-Name wird angezeigt
|
||||||
|
- ✅ Statistiken werden geladen
|
||||||
|
- ✅ Login-Button funktioniert
|
||||||
|
|
||||||
|
**Fertig! 🎉**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 Wichtigste Unterschiede zu v1.x
|
||||||
|
|
||||||
|
| v1.x (Alt) | v2.0 (Neu) |
|
||||||
|
|------------|------------|
|
||||||
|
| API-Key in jedem Produkt | API-Key nur einmal im Server |
|
||||||
|
| Hostname in jedem Produkt | Hostname nur einmal im Server |
|
||||||
|
| Manuelle Plan-Eingabe | Automatisches Template-Dropdown |
|
||||||
|
| Keine Template-Info | Template wird im Client Area angezeigt |
|
||||||
|
|
||||||
|
**Vorteil:** Bei 10 Produkten spart man 90% Konfigurationsaufwand!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💡 Typische Szenarien
|
||||||
|
|
||||||
|
### Szenario A: Ein Server, mehrere Produkte
|
||||||
|
|
||||||
|
```
|
||||||
|
Server in WHMCS:
|
||||||
|
└── KeyHelp Server 1 (keyhelp.example.com)
|
||||||
|
|
||||||
|
Produkte:
|
||||||
|
├── Webhosting Basic → Server 1, Template "Basic"
|
||||||
|
├── Webhosting Pro → Server 1, Template "Pro"
|
||||||
|
├── Webhosting Business → Server 1, Template "Business"
|
||||||
|
└── Reseller Paket → Server 1, Template "Reseller"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Konfiguration:**
|
||||||
|
1. Einen Server anlegen
|
||||||
|
2. Bei jedem Produkt: Server zuweisen + Template wählen
|
||||||
|
|
||||||
|
### Szenario B: Mehrere Server
|
||||||
|
|
||||||
|
```
|
||||||
|
Server in WHMCS:
|
||||||
|
├── KeyHelp Server 1 (Shared Hosting)
|
||||||
|
├── KeyHelp Server 2 (Reseller)
|
||||||
|
└── KeyHelp Server 3 (VPS)
|
||||||
|
|
||||||
|
Produkte nach Server zuweisen
|
||||||
|
```
|
||||||
|
|
||||||
|
**Konfiguration:**
|
||||||
|
1. Alle Server in WHMCS anlegen
|
||||||
|
2. Produkte dem passenden Server zuweisen
|
||||||
|
3. Templates synchronisieren
|
||||||
|
4. Template pro Produkt wählen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔑 API-Key erstellen (KeyHelp)
|
||||||
|
|
||||||
|
Falls du noch keinen API-Key hast:
|
||||||
|
|
||||||
|
1. Login in KeyHelp als Admin
|
||||||
|
2. Gehe zu: **Einstellungen → API**
|
||||||
|
3. Klicke: **API-Schlüssel erstellen**
|
||||||
|
4. Name: `WHMCS Integration`
|
||||||
|
5. Rechte: **Admin** (alle Rechte)
|
||||||
|
6. Kopiere den generierten Key
|
||||||
|
7. Verwende ihn im WHMCS Server-Setup
|
||||||
|
|
||||||
|
**Wichtig:** Der Key wird nur einmal angezeigt!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✅ Checkliste
|
||||||
|
|
||||||
|
Bevor du loslegst:
|
||||||
|
|
||||||
|
- [ ] WHMCS 8.13+ installiert
|
||||||
|
- [ ] PHP 8.3+ verfügbar
|
||||||
|
- [ ] KeyHelp-Server läuft
|
||||||
|
- [ ] API-Key erstellt
|
||||||
|
- [ ] Pläne/Templates in KeyHelp angelegt
|
||||||
|
- [ ] FTP/SSH-Zugang zu WHMCS-Server
|
||||||
|
|
||||||
|
Nach der Installation:
|
||||||
|
|
||||||
|
- [ ] Server in WHMCS konfiguriert
|
||||||
|
- [ ] Test Connection erfolgreich
|
||||||
|
- [ ] Mindestens ein Produkt erstellt
|
||||||
|
- [ ] Templates synchronisiert
|
||||||
|
- [ ] Template ausgewählt
|
||||||
|
- [ ] Test-Bestellung erfolgreich
|
||||||
|
- [ ] Client Area funktioniert
|
||||||
|
- [ ] Login funktioniert
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 Verfügbare Templates laden
|
||||||
|
|
||||||
|
Templates werden von KeyHelp geladen. Stelle sicher, dass in KeyHelp **Pläne** angelegt sind:
|
||||||
|
|
||||||
|
**In KeyHelp:**
|
||||||
|
1. **Einstellungen → Pläne**
|
||||||
|
2. Erstelle Pläne wie:
|
||||||
|
- Basic Plan (5 GB, 1 Domain)
|
||||||
|
- Pro Plan (20 GB, 10 Domains)
|
||||||
|
- Business Plan (100 GB, unlimitiert)
|
||||||
|
|
||||||
|
Diese erscheinen dann automatisch im WHMCS-Dropdown!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎨 Client Area Features
|
||||||
|
|
||||||
|
Nach der Erstellung sehen Kunden:
|
||||||
|
|
||||||
|
```
|
||||||
|
┌─────────────────────────────────────────┐
|
||||||
|
│ KeyHelp Hosting ACTIVE │
|
||||||
|
│ example.com 📋 Basic Plan │
|
||||||
|
│ │
|
||||||
|
│ [Open Control Panel] [Admin Panel] │
|
||||||
|
└─────────────────────────────────────────┘
|
||||||
|
|
||||||
|
┌─────────────────┬───────────────────────┐
|
||||||
|
│ Username │ Password │
|
||||||
|
│ example_com │ •••••••• 👁️ 📋 │
|
||||||
|
└─────────────────┴───────────────────────┘
|
||||||
|
|
||||||
|
📊 Resource Usage
|
||||||
|
┌─────────────────────────────────────────┐
|
||||||
|
│ 💾 Disk Space: 2.3 GB / 5 GB │
|
||||||
|
│ ▓▓▓▓▓▓▒░░░░░░░░░ 46% │
|
||||||
|
│ │
|
||||||
|
│ 📊 Bandwidth: 15 GB / 100 GB │
|
||||||
|
│ ▓▓▒░░░░░░░░░░░░░ 15% │
|
||||||
|
└─────────────────────────────────────────┘
|
||||||
|
|
||||||
|
┌───────┬──────────┬────────────┐
|
||||||
|
│ 3 │ 2 │ 5 │
|
||||||
|
│ 🌐 Domains │ 🗄️ DBs │ 📧 Emails │
|
||||||
|
└───────┴──────────┴────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🐛 Schnelle Problemlösungen
|
||||||
|
|
||||||
|
### "KeyHelp server not configured"
|
||||||
|
→ Server in WHMCS anlegen und Produkt zuweisen
|
||||||
|
|
||||||
|
### Templates werden nicht geladen
|
||||||
|
→ Test Connection durchführen, dann Sync Templates klicken
|
||||||
|
|
||||||
|
### "Connection failed"
|
||||||
|
→ Hostname, API-Key und SSL-Einstellungen prüfen
|
||||||
|
|
||||||
|
### API-Key funktioniert nicht
|
||||||
|
→ In KeyHelp prüfen: Key hat Admin-Rechte?
|
||||||
|
|
||||||
|
### Template-Dropdown leer
|
||||||
|
→ In KeyHelp: Sind Pläne angelegt?
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📚 Weiterführende Dokumentation
|
||||||
|
|
||||||
|
- **Installation:** [INSTALLATION.md](INSTALLATION.md) - Detaillierte Schritt-für-Schritt-Anleitung
|
||||||
|
- **Update:** [UPDATE.md](UPDATE.md) - Migration von v1.x auf v2.0
|
||||||
|
- **Changelog:** [CHANGELOG.md](CHANGELOG.md) - Alle Änderungen und Features
|
||||||
|
- **Support:** GitHub Issues oder https://avvgo.de
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💬 Häufige Fragen
|
||||||
|
|
||||||
|
### Muss ich API-Keys für jedes Produkt eingeben?
|
||||||
|
**Nein!** Das ist der große Vorteil von v2.0. API-Key nur einmal beim Server.
|
||||||
|
|
||||||
|
### Kann ich mehrere KeyHelp-Server nutzen?
|
||||||
|
**Ja!** Lege einfach mehrere Server in WHMCS an.
|
||||||
|
|
||||||
|
### Funktionieren alte Accounts nach dem Update?
|
||||||
|
**Ja!** Bestehende Accounts funktionieren weiterhin ohne Änderungen.
|
||||||
|
|
||||||
|
### Kann ich Templates nachträglich ändern?
|
||||||
|
**Ja!** Einfach in der Produktkonfiguration ändern und speichern.
|
||||||
|
|
||||||
|
### Was passiert, wenn ich ein Template lösche?
|
||||||
|
Templates nur in KeyHelp löschen, wenn keine aktiven Accounts damit verbunden sind.
|
||||||
|
|
||||||
|
### Wo finde ich die Module-Logs?
|
||||||
|
**Utilities → Logs → Module Log** → Filter: "keyhelpmanager"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 Pro-Tipps
|
||||||
|
|
||||||
|
1. **Template-Namen sinnvoll wählen**
|
||||||
|
- ✅ "Basic Plan", "Pro Plan", "Business Plan"
|
||||||
|
- ❌ "Plan1", "Plan2", "Plan3"
|
||||||
|
|
||||||
|
2. **Server-Namen beschreibend**
|
||||||
|
- ✅ "KeyHelp Main", "KeyHelp Reseller"
|
||||||
|
- ❌ "Server1", "Test123"
|
||||||
|
|
||||||
|
3. **SSL immer aktivieren**
|
||||||
|
- Sicher und empfohlen!
|
||||||
|
|
||||||
|
4. **Templates regelmäßig synchronisieren**
|
||||||
|
- Nach Änderungen in KeyHelp: Sync klicken
|
||||||
|
|
||||||
|
5. **Test-Account behalten**
|
||||||
|
- Zum schnellen Testen von Änderungen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Nächste Schritte
|
||||||
|
|
||||||
|
Nach dem Setup:
|
||||||
|
|
||||||
|
1. ✅ Weitere Produkte anlegen
|
||||||
|
2. ✅ Preise und Beschreibungen anpassen
|
||||||
|
3. ✅ Kunden-E-Mail-Templates konfigurieren
|
||||||
|
4. ✅ Automatisierung testen
|
||||||
|
5. ✅ Team schulen
|
||||||
|
6. ✅ Live gehen!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📞 Support & Updates
|
||||||
|
|
||||||
|
- **Website:** https://avvgo.de
|
||||||
|
- **Entwickler:** Kevin Feiler
|
||||||
|
- **Version:** 2.0.0
|
||||||
|
- **Lizenz:** MIT
|
||||||
|
|
||||||
|
**Viel Erfolg mit KeyHelp Manager! 🎉**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Letzte Aktualisierung: 2024-01-20*
|
||||||
22
README.md
22
README.md
@@ -4,6 +4,17 @@ Ein professionelles WHMCS-Provisioning-Modul für die automatische Verwaltung vo
|
|||||||
|
|
||||||
**Entwickelt von:** Kevin Feiler / AVVGO
|
**Entwickelt von:** Kevin Feiler / AVVGO
|
||||||
**Website:** https://avvgo.de
|
**Website:** https://avvgo.de
|
||||||
|
**Version:** 2.0.0
|
||||||
|
|
||||||
|
## 🆕 NEU in Version 2.0.0
|
||||||
|
|
||||||
|
- 🎯 **Zentralisierte Server-Konfiguration** - API-Keys nur einmal in WHMCS Server-Einstellungen eintragen
|
||||||
|
- 📋 **Template/Vorlagen-System** - Automatische Synchronisation von KeyHelp-Plänen als Dropdown
|
||||||
|
- 🚀 **Template-basierte Provisionierung** - Domains werden automatisch mit gewählter Vorlage erstellt
|
||||||
|
- 🔗 **Admin-Panel-Link** - Direkter Zugriff zur Domain-Verwaltung im KeyHelp-Panel
|
||||||
|
- 📊 **Template-Anzeige** - Kunden sehen ihr verwendetes Template im Client Area
|
||||||
|
|
||||||
|
**[→ Update-Anleitung von v1.x auf v2.0](UPDATE.md)**
|
||||||
|
|
||||||
## 📋 Inhaltsverzeichnis
|
## 📋 Inhaltsverzeichnis
|
||||||
|
|
||||||
@@ -18,6 +29,7 @@ Ein professionelles WHMCS-Provisioning-Modul für die automatische Verwaltung vo
|
|||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
|
|
||||||
|
### Core Features
|
||||||
- ✅ **Automatische Account-Erstellung** - Erstellt KeyHelp-Accounts direkt nach der Bezahlung
|
- ✅ **Automatische Account-Erstellung** - Erstellt KeyHelp-Accounts direkt nach der Bezahlung
|
||||||
- ✅ **Account-Verwaltung** - Sperren, Entsperren und Löschen von Accounts
|
- ✅ **Account-Verwaltung** - Sperren, Entsperren und Löschen von Accounts
|
||||||
- ✅ **Passwort-Management** - Sichere Passwortverwaltung und -änderung
|
- ✅ **Passwort-Management** - Sichere Passwortverwaltung und -änderung
|
||||||
@@ -28,6 +40,16 @@ Ein professionelles WHMCS-Provisioning-Modul für die automatische Verwaltung vo
|
|||||||
- ✅ **Detailliertes Logging** - Alle API-Calls werden in WHMCS protokolliert
|
- ✅ **Detailliertes Logging** - Alle API-Calls werden in WHMCS protokolliert
|
||||||
- ✅ **Fehlerbehandlung** - Robuste Error-Handling-Mechanismen
|
- ✅ **Fehlerbehandlung** - Robuste Error-Handling-Mechanismen
|
||||||
|
|
||||||
|
### Neue Features v2.0
|
||||||
|
- 🎯 **Zentralisierte API-Konfiguration** - API-Keys werden nur einmal in WHMCS Server-Einstellungen eingegeben
|
||||||
|
- 📋 **Template-Synchronisation** - KeyHelp-Pläne/Vorlagen werden automatisch als Dropdown geladen
|
||||||
|
- 🔄 **Sync Templates Button** - Manuelles Aktualisieren der verfügbaren Templates
|
||||||
|
- 🏷️ **Template-basierte Erstellung** - Accounts werden mit gewähltem Template/Plan erstellt
|
||||||
|
- 🔗 **Admin-Panel-Link** - Direkter Link zur Domain-Verwaltung im KeyHelp-Panel
|
||||||
|
- 📊 **Template-Anzeige** - Template-Name wird im Client Area angezeigt
|
||||||
|
- ⚡ **Template-Cache** - Bessere Performance durch 5-Minuten-Cache
|
||||||
|
- 🎨 **Verbessertes UI** - Übersichtlichere Button-Anordnung und Design
|
||||||
|
|
||||||
## 🔧 Systemanforderungen
|
## 🔧 Systemanforderungen
|
||||||
|
|
||||||
### WHMCS-Server
|
### WHMCS-Server
|
||||||
|
|||||||
371
RELEASE_NOTES_v2.0.md
Normal file
371
RELEASE_NOTES_v2.0.md
Normal file
@@ -0,0 +1,371 @@
|
|||||||
|
# 🎉 KeyHelp Manager v2.0.0 - Release Notes
|
||||||
|
|
||||||
|
**Release-Datum:** 20. Januar 2024
|
||||||
|
**Entwickler:** Kevin Feiler / AVVGO
|
||||||
|
**Website:** https://avvgo.de
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Was ist neu?
|
||||||
|
|
||||||
|
Version 2.0.0 bringt grundlegende Verbesserungen in der Konfiguration und Verwaltung von KeyHelp-Produkten in WHMCS.
|
||||||
|
|
||||||
|
### 🎯 Hauptfeatures
|
||||||
|
|
||||||
|
#### 1. Zentralisierte Server-Konfiguration
|
||||||
|
**Problem gelöst:** In v1.x mussten API-Keys, Hostname und SSL-Einstellungen für **jedes einzelne Produkt** eingegeben werden.
|
||||||
|
|
||||||
|
**Neue Lösung:**
|
||||||
|
- API-Key wird nur **einmal** in WHMCS Server-Einstellungen eingegeben
|
||||||
|
- Hostname nur **einmal** konfigurieren
|
||||||
|
- SSL-Einstellungen zentral verwalten
|
||||||
|
- Bei 10 Produkten: **90% weniger Konfigurationsaufwand!**
|
||||||
|
|
||||||
|
**Vorher (v1.x):**
|
||||||
|
```
|
||||||
|
Produkt 1: Hostname + API-Key + SSL
|
||||||
|
Produkt 2: Hostname + API-Key + SSL
|
||||||
|
Produkt 3: Hostname + API-Key + SSL
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
**Nachher (v2.0):**
|
||||||
|
```
|
||||||
|
Server 1: Hostname + API-Key + SSL (EINMALIG!)
|
||||||
|
Produkt 1 → Server 1 + Template
|
||||||
|
Produkt 2 → Server 1 + Template
|
||||||
|
Produkt 3 → Server 1 + Template
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. Template/Vorlagen-System
|
||||||
|
**Neu:** Automatische Synchronisation von KeyHelp-Plänen als Dropdown-Auswahl
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
- Lädt verfügbare Pläne/Vorlagen automatisch von KeyHelp
|
||||||
|
- Dropdown-Auswahl statt manuelle Eingabe
|
||||||
|
- "Sync Templates" Button für manuelle Aktualisierung
|
||||||
|
- Template-Cache für bessere Performance
|
||||||
|
- Template-Name wird im Client Area angezeigt
|
||||||
|
|
||||||
|
**Workflow:**
|
||||||
|
1. Templates in KeyHelp anlegen (z.B. "Basic", "Pro", "Business")
|
||||||
|
2. In WHMCS auf "Sync Templates" klicken
|
||||||
|
3. Template aus Dropdown wählen
|
||||||
|
4. Fertig!
|
||||||
|
|
||||||
|
#### 3. Template-basierte Provisionierung
|
||||||
|
**Neu:** Domains werden automatisch mit der ausgewählten Vorlage erstellt
|
||||||
|
|
||||||
|
**Vorteile:**
|
||||||
|
- Korrekte Ressourcen-Zuweisung von Anfang an
|
||||||
|
- Keine manuelle Konfiguration nach Erstellung nötig
|
||||||
|
- Plan-ID wird in Account-Details gespeichert
|
||||||
|
- Template-Informationen für späteren Support verfügbar
|
||||||
|
|
||||||
|
#### 4. Verbesserter Client Area
|
||||||
|
**Neue Anzeigen:**
|
||||||
|
- Template-Name als Badge in der Header-Card
|
||||||
|
- Direkter "Admin Panel" Button für schnellen Zugriff
|
||||||
|
- Link zur Domain-Verwaltung im KeyHelp-Panel
|
||||||
|
- Übersichtlichere Button-Anordnung
|
||||||
|
- Moderneres Design
|
||||||
|
|
||||||
|
**Beispiel:**
|
||||||
|
```
|
||||||
|
┌──────────────────────────────────────────┐
|
||||||
|
│ KeyHelp Hosting [ACTIVE] │
|
||||||
|
│ example.com 📋 Basic Plan │
|
||||||
|
│ [Open Control Panel] [Admin Panel] │
|
||||||
|
└──────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📊 Vergleich Alt vs. Neu
|
||||||
|
|
||||||
|
| Feature | v1.x | v2.0 |
|
||||||
|
|---------|------|------|
|
||||||
|
| API-Key Konfiguration | Pro Produkt | Einmal zentral |
|
||||||
|
| Hostname Eingabe | Pro Produkt | Einmal zentral |
|
||||||
|
| SSL-Einstellungen | Pro Produkt | Einmal zentral |
|
||||||
|
| Plan/Template | Manuell tippen | Dropdown-Auswahl |
|
||||||
|
| Template-Sync | Nicht verfügbar | Automatisch |
|
||||||
|
| Template-Anzeige | Nicht sichtbar | Im Client Area |
|
||||||
|
| Admin-Panel-Link | Nicht verfügbar | Direkter Link |
|
||||||
|
| Konfigurationsaufwand | 100% | 10% |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 Für wen ist dieses Update?
|
||||||
|
|
||||||
|
### ✅ Perfekt für:
|
||||||
|
- Hoster mit **mehreren KeyHelp-Produkten**
|
||||||
|
- Agenturen mit **mehreren KeyHelp-Servern**
|
||||||
|
- Reseller mit **vielen Hosting-Paketen**
|
||||||
|
- Alle, die **Zeit sparen** möchten
|
||||||
|
|
||||||
|
### 💰 ROI-Beispiel:
|
||||||
|
```
|
||||||
|
Altes System (v1.x):
|
||||||
|
- 10 Produkte konfigurieren
|
||||||
|
- Je 5 Minuten pro Produkt
|
||||||
|
- = 50 Minuten Gesamtaufwand
|
||||||
|
|
||||||
|
Neues System (v2.0):
|
||||||
|
- 1x Server konfigurieren (5 Min.)
|
||||||
|
- 10x Template wählen (1 Min. je)
|
||||||
|
- = 15 Minuten Gesamtaufwand
|
||||||
|
|
||||||
|
Zeitersparnis: 70%! ⚡
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 Technische Details
|
||||||
|
|
||||||
|
### Neue Funktionen
|
||||||
|
```php
|
||||||
|
_keyhelpmanager_GetTemplates() // Lädt Templates von KeyHelp
|
||||||
|
keyhelpmanager_TemplateLoader() // Dropdown-Loader
|
||||||
|
keyhelpmanager_SyncTemplates() // Manuelle Synchronisation
|
||||||
|
keyhelpmanager_AdminCustomButtonArray() // Admin-Buttons
|
||||||
|
```
|
||||||
|
|
||||||
|
### Neue API-Endpunkte
|
||||||
|
```
|
||||||
|
GET /api/v2/plans // Liste aller Pläne
|
||||||
|
GET /api/v2/plans/{id} // Details eines Plans
|
||||||
|
```
|
||||||
|
|
||||||
|
### Datenbankänderungen
|
||||||
|
- Account-Details speichern jetzt auch `domainid` und `template`
|
||||||
|
- Template-Cache in `tblconfiguration`
|
||||||
|
- Keine Breaking Changes bei bestehenden Daten
|
||||||
|
|
||||||
|
### Geänderte Parameter
|
||||||
|
```php
|
||||||
|
// Alt (v1.x):
|
||||||
|
$params['configoption1'] // Hostname
|
||||||
|
$params['configoption2'] // API-Key
|
||||||
|
$params['configoption3'] // SSL
|
||||||
|
|
||||||
|
// Neu (v2.0):
|
||||||
|
$params['serverhostname'] // Von Server übernommen
|
||||||
|
$params['serveraccesshash'] // Von Server übernommen
|
||||||
|
$params['serversecure'] // Von Server übernommen
|
||||||
|
$params['configoption1'] // Template-Dropdown
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📦 Installation & Update
|
||||||
|
|
||||||
|
### Neuinstallation
|
||||||
|
```bash
|
||||||
|
1. Module hochladen
|
||||||
|
2. Server in WHMCS konfigurieren
|
||||||
|
3. Produkt erstellen
|
||||||
|
4. Templates synchronisieren
|
||||||
|
5. Template wählen
|
||||||
|
```
|
||||||
|
→ **[Schnellstart-Anleitung](QUICKSTART.md)**
|
||||||
|
|
||||||
|
### Update von v1.x
|
||||||
|
```bash
|
||||||
|
1. Backup erstellen
|
||||||
|
2. Alte Konfiguration dokumentieren
|
||||||
|
3. Module-Dateien aktualisieren
|
||||||
|
4. Server in WHMCS anlegen
|
||||||
|
5. Produkte migrieren
|
||||||
|
```
|
||||||
|
→ **[Ausführliche Update-Anleitung](UPDATE.md)**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚠️ Breaking Changes
|
||||||
|
|
||||||
|
### Was ändert sich?
|
||||||
|
**ConfigOptions-Struktur:**
|
||||||
|
- Alte Config-Optionen (Hostname, API-Key, SSL) werden nicht mehr verwendet
|
||||||
|
- Neue Config-Option: Nur noch Template-Dropdown
|
||||||
|
|
||||||
|
### Sind bestehende Accounts betroffen?
|
||||||
|
**Nein!**
|
||||||
|
- Bestehende Accounts funktionieren weiterhin
|
||||||
|
- Keine Datenmigration erforderlich
|
||||||
|
- Neue Accounts bekommen zusätzliche Features (Template-Info, Admin-Link)
|
||||||
|
|
||||||
|
### Migration erforderlich?
|
||||||
|
**Teilweise:**
|
||||||
|
- Server müssen in WHMCS neu konfiguriert werden
|
||||||
|
- Produkte müssen Server zugewiesen bekommen
|
||||||
|
- Templates müssen synchronisiert und gewählt werden
|
||||||
|
- **Zeit:** 15-60 Minuten je nach Anzahl der Produkte
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🐛 Bekannte Einschränkungen
|
||||||
|
|
||||||
|
1. **Template-Cache**
|
||||||
|
- Cache läuft nach 5 Minuten ab
|
||||||
|
- Nicht konfigurierbar
|
||||||
|
- Workaround: "Sync Templates" Button nutzen
|
||||||
|
|
||||||
|
2. **Admin-Panel-Link**
|
||||||
|
- Funktioniert nur bei neuen Accounts (ab v2.0)
|
||||||
|
- Benötigt gespeicherte Domain-ID
|
||||||
|
- Alte Accounts: Nutzen Standard-Login
|
||||||
|
|
||||||
|
3. **Template-Synchronisation**
|
||||||
|
- Manuell nach Änderungen in KeyHelp
|
||||||
|
- Kein automatischer Webhook
|
||||||
|
- Geplant für v2.1
|
||||||
|
|
||||||
|
4. **URL-Struktur**
|
||||||
|
- Admin-Panel-Link basiert auf Standard-KeyHelp-URL
|
||||||
|
- Bei Custom-URLs evtl. Anpassung nötig
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔒 Sicherheit
|
||||||
|
|
||||||
|
### Verbesserte Sicherheit
|
||||||
|
- ✅ SSL-Verifizierung standardmäßig aktiviert
|
||||||
|
- ✅ Zentrale API-Key-Verwaltung
|
||||||
|
- ✅ Weniger Stellen für sensible Daten
|
||||||
|
- ✅ Bessere Zugriffskontrolle
|
||||||
|
|
||||||
|
### Empfehlungen
|
||||||
|
1. Nutze immer SSL/HTTPS für KeyHelp-API
|
||||||
|
2. API-Keys regelmäßig rotieren
|
||||||
|
3. Nur Admin-Keys mit vollen Rechten nutzen
|
||||||
|
4. Module-Logs regelmäßig prüfen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📈 Performance
|
||||||
|
|
||||||
|
### Optimierungen
|
||||||
|
- Template-Cache reduziert API-Calls
|
||||||
|
- Effizientere Datenbank-Abfragen
|
||||||
|
- Weniger redundante Konfigurationsdaten
|
||||||
|
|
||||||
|
### Benchmarks
|
||||||
|
```
|
||||||
|
Template-Laden (ohne Cache): ~500ms
|
||||||
|
Template-Laden (mit Cache): ~50ms
|
||||||
|
Performance-Gewinn: 10x schneller! ⚡
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🗺️ Roadmap
|
||||||
|
|
||||||
|
### Geplant für v2.1 (Q1 2024)
|
||||||
|
- [ ] Automatische Template-Synchronisation via Webhook
|
||||||
|
- [ ] Multi-Language Support (Deutsch/Englisch)
|
||||||
|
- [ ] Template-Gruppen und Kategorien
|
||||||
|
- [ ] Bulk-Update für mehrere Produkte
|
||||||
|
|
||||||
|
### Geplant für v2.2 (Q2 2024)
|
||||||
|
- [ ] Erweiterte Statistiken im Client Area
|
||||||
|
- [ ] E-Mail-Account-Verwaltung
|
||||||
|
- [ ] Datenbank-Verwaltung
|
||||||
|
- [ ] FTP-Account-Management
|
||||||
|
|
||||||
|
### Geplant für v3.0 (Q3 2024)
|
||||||
|
- [ ] Ressourcen-Upgrade/Downgrade
|
||||||
|
- [ ] SSL-Zertifikat-Management
|
||||||
|
- [ ] Automatische Backups
|
||||||
|
- [ ] Subdomain-Verwaltung
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💬 Feedback & Support
|
||||||
|
|
||||||
|
### Wo kann ich Feedback geben?
|
||||||
|
- **GitHub Issues:** Bug-Reports und Feature-Requests
|
||||||
|
- **E-Mail:** info@avvgo.de
|
||||||
|
- **WHMCS Community:** Diskussionen und Hilfe
|
||||||
|
|
||||||
|
### Wie kann ich helfen?
|
||||||
|
1. **Testen:** Beta-Versionen testen
|
||||||
|
2. **Feedback:** Verbesserungsvorschläge einreichen
|
||||||
|
3. **Dokumentation:** Typos melden, Anleitungen verbessern
|
||||||
|
4. **Code:** Pull Requests sind willkommen!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎓 Ressourcen
|
||||||
|
|
||||||
|
### Dokumentation
|
||||||
|
- **[README.md](README.md)** - Übersicht und Features
|
||||||
|
- **[INSTALLATION.md](INSTALLATION.md)** - Detaillierte Installation
|
||||||
|
- **[QUICKSTART.md](QUICKSTART.md)** - 10-Minuten-Setup
|
||||||
|
- **[UPDATE.md](UPDATE.md)** - Update von v1.x
|
||||||
|
- **[CHANGELOG.md](CHANGELOG.md)** - Vollständige Änderungen
|
||||||
|
|
||||||
|
### Video-Tutorials
|
||||||
|
- Setup in 10 Minuten (coming soon)
|
||||||
|
- Update-Anleitung (coming soon)
|
||||||
|
- Template-Management (coming soon)
|
||||||
|
|
||||||
|
### Support
|
||||||
|
- GitHub: https://github.com/ihr-repo/keyhelpmanager
|
||||||
|
- Website: https://avvgo.de
|
||||||
|
- Forum: KeyHelp Community
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🙏 Danksagungen
|
||||||
|
|
||||||
|
Ein großes Dankeschön an:
|
||||||
|
- **KeyHelp-Team** für die hervorragende API-Dokumentation
|
||||||
|
- **WHMCS Community** für wertvolles Feedback
|
||||||
|
- **Beta-Tester** für ausführliche Tests und Bug-Reports
|
||||||
|
- **Alle Nutzer** für das Vertrauen in dieses Modul
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📜 Lizenz & Credits
|
||||||
|
|
||||||
|
**Lizenz:** MIT License
|
||||||
|
**Copyright:** © 2024 Kevin Feiler / AVVGO
|
||||||
|
**Website:** https://avvgo.de
|
||||||
|
|
||||||
|
### Open Source
|
||||||
|
Dieses Modul ist Open Source. Contributions sind willkommen!
|
||||||
|
|
||||||
|
### Verwendete Libraries
|
||||||
|
- Guzzle HTTP Client (von WHMCS bereitgestellt)
|
||||||
|
- WHMCS Capsule ORM
|
||||||
|
- Smarty Template Engine
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎉 Fazit
|
||||||
|
|
||||||
|
Version 2.0.0 ist das größte Update seit dem Release:
|
||||||
|
|
||||||
|
✅ **70% weniger Konfigurationsaufwand**
|
||||||
|
✅ **Automatische Template-Verwaltung**
|
||||||
|
✅ **Bessere Übersicht für Admins**
|
||||||
|
✅ **Mehr Informationen für Kunden**
|
||||||
|
✅ **Zukunftssicher durch modulare Architektur**
|
||||||
|
|
||||||
|
**Jetzt upgraden und Zeit sparen!**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Download:** [keyhelpmanager_v2.0.0.zip](modules/servers/keyhelpmanager.zip)
|
||||||
|
|
||||||
|
**Minimale Version:** WHMCS 8.13, PHP 8.3, KeyHelp mit API v2
|
||||||
|
|
||||||
|
**Support:** GitHub Issues oder info@avvgo.de
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Viel Erfolg mit KeyHelp Manager v2.0.0!* 🚀
|
||||||
|
|
||||||
|
**Kevin Feiler / AVVGO**
|
||||||
|
*20. Januar 2024*
|
||||||
458
UPDATE.md
Normal file
458
UPDATE.md
Normal file
@@ -0,0 +1,458 @@
|
|||||||
|
# Update-Anleitung: KeyHelp Manager v1.x → v2.0.0
|
||||||
|
|
||||||
|
Diese Anleitung führt Sie durch das Update von KeyHelp Manager Version 1.x auf 2.0.0.
|
||||||
|
|
||||||
|
## 🎉 Was ist neu in Version 2.0.0?
|
||||||
|
|
||||||
|
### Hauptverbesserungen
|
||||||
|
|
||||||
|
1. **Zentralisierte API-Konfiguration**
|
||||||
|
- API-Keys und Server-Einstellungen nur noch einmal in WHMCS konfigurieren
|
||||||
|
- Keine redundante Eingabe mehr bei jedem Produkt
|
||||||
|
- Einfachere Verwaltung bei mehreren KeyHelp-Servern
|
||||||
|
|
||||||
|
2. **Template/Vorlagen-System**
|
||||||
|
- Automatische Synchronisation von KeyHelp-Plänen
|
||||||
|
- Dropdown-Auswahl bei Produktkonfiguration
|
||||||
|
- Template-basierte Domain-Erstellung
|
||||||
|
|
||||||
|
3. **Verbesserter Client Area**
|
||||||
|
- Anzeige des verwendeten Templates
|
||||||
|
- Direkter Link zum Admin-Panel
|
||||||
|
- Übersichtlichere Darstellung
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📋 Voraussetzungen
|
||||||
|
|
||||||
|
- WHMCS 8.13 oder höher
|
||||||
|
- PHP 8.3 oder höher
|
||||||
|
- KeyHelp mit API v2
|
||||||
|
- Zugriff auf WHMCS Admin-Panel
|
||||||
|
- Backup Ihrer aktuellen Installation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔄 Update-Schritte
|
||||||
|
|
||||||
|
### Schritt 1: Backup erstellen
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Backup des Modul-Ordners
|
||||||
|
cp -r /pfad/zu/whmcs/modules/servers/keyhelpmanager /pfad/zu/backup/keyhelpmanager_v1_backup
|
||||||
|
|
||||||
|
# Backup der Datenbank (optional, aber empfohlen)
|
||||||
|
mysqldump -u [username] -p [database_name] > whmcs_backup_$(date +%Y%m%d).sql
|
||||||
|
```
|
||||||
|
|
||||||
|
### Schritt 2: Alte Konfiguration dokumentieren
|
||||||
|
|
||||||
|
Notieren Sie sich für **jedes Produkt** mit KeyHelp Manager:
|
||||||
|
|
||||||
|
1. Hostname/IP des KeyHelp-Servers
|
||||||
|
2. API-Key
|
||||||
|
3. SSL-Einstellungen
|
||||||
|
4. Verwendete Plan-Namen (falls konfiguriert)
|
||||||
|
|
||||||
|
**Beispiel:**
|
||||||
|
|
||||||
|
| Produkt | Hostname | API-Key | SSL | Plan |
|
||||||
|
|---------|----------|---------|-----|------|
|
||||||
|
| Webhosting Basic | keyhelp1.example.com | abc123... | Ja | Basic |
|
||||||
|
| Webhosting Pro | keyhelp1.example.com | abc123... | Ja | Pro |
|
||||||
|
| Reseller | keyhelp2.example.com | xyz789... | Ja | Reseller |
|
||||||
|
|
||||||
|
### Schritt 3: Module-Dateien aktualisieren
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Alte Version löschen
|
||||||
|
rm -rf /pfad/zu/whmcs/modules/servers/keyhelpmanager/*
|
||||||
|
|
||||||
|
# Neue Version entpacken
|
||||||
|
unzip keyhelpmanager_v2.0.0.zip -d /pfad/zu/whmcs/modules/servers/
|
||||||
|
|
||||||
|
# Oder via Git
|
||||||
|
cd /pfad/zu/whmcs/modules/servers/keyhelpmanager
|
||||||
|
git pull origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
### Schritt 4: Server in WHMCS konfigurieren
|
||||||
|
|
||||||
|
Dies ist der wichtigste Schritt! Die Konfiguration erfolgt jetzt zentral.
|
||||||
|
|
||||||
|
#### 4.1 Server hinzufügen
|
||||||
|
|
||||||
|
1. Gehen Sie zu: **Setup → Products/Services → Servers**
|
||||||
|
2. Klicken Sie auf **Add New Server**
|
||||||
|
3. Füllen Sie das Formular aus:
|
||||||
|
|
||||||
|
**Für KeyHelp Server 1:**
|
||||||
|
```
|
||||||
|
Name: KeyHelp Server 1
|
||||||
|
Hostname: keyhelp1.example.com
|
||||||
|
IP Address: [optional]
|
||||||
|
Type: KeyHelp Manager
|
||||||
|
Username: [leer lassen]
|
||||||
|
Password: [HIER API-KEY EINTRAGEN]
|
||||||
|
Access Hash: [leer lassen]
|
||||||
|
Secure: ✓ (Checkbox aktivieren für SSL)
|
||||||
|
Active: ✓
|
||||||
|
```
|
||||||
|
|
||||||
|
**Wichtig:** Der API-Key kommt ins **Password**-Feld!
|
||||||
|
|
||||||
|
#### 4.2 Mehrere Server
|
||||||
|
|
||||||
|
Falls Sie mehrere KeyHelp-Server haben, wiederholen Sie Schritt 4.1 für jeden Server:
|
||||||
|
|
||||||
|
```
|
||||||
|
Server 1: KeyHelp Server 1 (keyhelp1.example.com)
|
||||||
|
Server 2: KeyHelp Server 2 (keyhelp2.example.com)
|
||||||
|
Server 3: KeyHelp Reseller (keyhelp3.example.com)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Schritt 5: Verbindung testen
|
||||||
|
|
||||||
|
1. Klicken Sie bei jedem konfigurierten Server auf **Test Connection**
|
||||||
|
2. Sie sollten die Meldung sehen: *"Connection Successful!"*
|
||||||
|
3. Bei Fehlern überprüfen Sie:
|
||||||
|
- Hostname korrekt?
|
||||||
|
- API-Key korrekt im Password-Feld?
|
||||||
|
- SSL-Checkbox entsprechend Ihrer Server-Konfiguration?
|
||||||
|
- Firewall erlaubt Verbindung?
|
||||||
|
|
||||||
|
### Schritt 6: Produkte aktualisieren
|
||||||
|
|
||||||
|
Für **jedes** Produkt mit KeyHelp Manager:
|
||||||
|
|
||||||
|
#### 6.1 Server zuweisen
|
||||||
|
|
||||||
|
1. Gehen Sie zu: **Setup → Products/Services → Products/Services**
|
||||||
|
2. Wählen Sie ein Produkt aus
|
||||||
|
3. Tab: **Module Settings**
|
||||||
|
4. Bei **Server Group**: Wählen Sie den entsprechenden Server aus
|
||||||
|
5. Oder bei **Selected Server**: Wählen Sie spezifischen Server
|
||||||
|
|
||||||
|
#### 6.2 Templates synchronisieren
|
||||||
|
|
||||||
|
1. Scrollen Sie zu den **Module Settings**
|
||||||
|
2. Klicken Sie auf **Sync Templates**
|
||||||
|
3. Die verfügbaren KeyHelp-Pläne werden geladen
|
||||||
|
|
||||||
|
#### 6.3 Template auswählen
|
||||||
|
|
||||||
|
1. Bei **KeyHelp Template**: Wählen Sie die passende Vorlage
|
||||||
|
2. Beispiel:
|
||||||
|
- Produkt "Webhosting Basic" → Template "Basic Plan"
|
||||||
|
- Produkt "Webhosting Pro" → Template "Pro Plan"
|
||||||
|
|
||||||
|
#### 6.4 Alte Config-Optionen entfernen
|
||||||
|
|
||||||
|
Die alten Felder (Hostname, API-Key, etc.) werden automatisch ausgeblendet.
|
||||||
|
Falls noch sichtbar, können diese ignoriert werden - sie werden nicht mehr verwendet.
|
||||||
|
|
||||||
|
#### 6.5 Speichern
|
||||||
|
|
||||||
|
1. Klicken Sie unten auf **Save Changes**
|
||||||
|
2. Wiederholen Sie Schritte 6.1-6.5 für alle Produkte
|
||||||
|
|
||||||
|
### Schritt 7: Bestehende Accounts migrieren (optional)
|
||||||
|
|
||||||
|
**Wichtig:** Bestehende Accounts funktionieren weiterhin!
|
||||||
|
|
||||||
|
Für bestehende Accounts können Sie optional die Template-Information hinzufügen:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
-- Beispiel SQL für manuelles Hinzufügen der Template-ID
|
||||||
|
-- ACHTUNG: Nur für erfahrene Benutzer!
|
||||||
|
|
||||||
|
UPDATE tblhosting
|
||||||
|
SET
|
||||||
|
configoption1 = '5' -- Template ID
|
||||||
|
WHERE
|
||||||
|
server = [SERVER_ID]
|
||||||
|
AND packageid = [PRODUCT_ID];
|
||||||
|
```
|
||||||
|
|
||||||
|
**Empfehlung:** Neue Accounts werden automatisch mit korrekter Template-ID erstellt.
|
||||||
|
|
||||||
|
### Schritt 8: Test-Account erstellen
|
||||||
|
|
||||||
|
1. Erstellen Sie eine Test-Bestellung
|
||||||
|
2. Verifizieren Sie:
|
||||||
|
- ✓ Account wird korrekt erstellt
|
||||||
|
- ✓ Template wird verwendet
|
||||||
|
- ✓ Client Area zeigt alle Informationen
|
||||||
|
- ✓ Template-Name wird angezeigt
|
||||||
|
- ✓ Admin-Panel-Link funktioniert
|
||||||
|
- ✓ Login-Button funktioniert
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔍 Vergleich: Alt vs. Neu
|
||||||
|
|
||||||
|
### Version 1.x (Alt)
|
||||||
|
|
||||||
|
```
|
||||||
|
Produkt-Konfiguration:
|
||||||
|
├── Hostname: keyhelp1.example.com
|
||||||
|
├── API-Key: abc123...
|
||||||
|
├── SSL: Ja
|
||||||
|
└── SSL-Verify: Ja
|
||||||
|
|
||||||
|
Problem: Bei 10 Produkten → 10x dieselbe Konfiguration!
|
||||||
|
```
|
||||||
|
|
||||||
|
### Version 2.0 (Neu)
|
||||||
|
|
||||||
|
```
|
||||||
|
Server-Konfiguration (EINMALIG):
|
||||||
|
├── Server 1: keyhelp1.example.com
|
||||||
|
│ └── API-Key: abc123...
|
||||||
|
└── Server 2: keyhelp2.example.com
|
||||||
|
└── API-Key: xyz789...
|
||||||
|
|
||||||
|
Produkt-Konfiguration (PRO PRODUKT):
|
||||||
|
├── Server: Server 1
|
||||||
|
└── Template: Basic Plan
|
||||||
|
|
||||||
|
Vorteil: Zentrale Verwaltung, keine Redundanz!
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📊 Konfigurationsübersicht
|
||||||
|
|
||||||
|
### Alte Produktkonfiguration (v1.x)
|
||||||
|
```
|
||||||
|
ConfigOption1: Hostname
|
||||||
|
ConfigOption2: API-Key
|
||||||
|
ConfigOption3: SSL (on/off)
|
||||||
|
ConfigOption4: SSL-Verify (on/off)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Neue Produktkonfiguration (v2.0)
|
||||||
|
```
|
||||||
|
ConfigOption1: Template-Dropdown (dynamisch geladen)
|
||||||
|
|
||||||
|
Server-Einstellungen:
|
||||||
|
├── serverhostname: Von Server übernommen
|
||||||
|
├── serveraccesshash: Von Server übernommen
|
||||||
|
└── serversecure: Von Server übernommen
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 Migration verschiedener Szenarien
|
||||||
|
|
||||||
|
### Szenario 1: Ein Server, mehrere Produkte
|
||||||
|
|
||||||
|
**Vorher:**
|
||||||
|
- 5 Produkte
|
||||||
|
- Jedes mit eigenem Hostname + API-Key
|
||||||
|
|
||||||
|
**Nachher:**
|
||||||
|
1. Einen Server in WHMCS anlegen
|
||||||
|
2. Alle 5 Produkte diesem Server zuweisen
|
||||||
|
3. Je nach Produkt unterschiedliche Templates wählen
|
||||||
|
|
||||||
|
**Zeitersparnis:** 80%
|
||||||
|
|
||||||
|
### Szenario 2: Mehrere Server
|
||||||
|
|
||||||
|
**Vorher:**
|
||||||
|
- Server A: Produkt 1-3
|
||||||
|
- Server B: Produkt 4-5
|
||||||
|
- Jedes Produkt einzeln konfiguriert
|
||||||
|
|
||||||
|
**Nachher:**
|
||||||
|
1. Server A in WHMCS anlegen
|
||||||
|
2. Server B in WHMCS anlegen
|
||||||
|
3. Produkte 1-3 → Server A zuweisen
|
||||||
|
4. Produkte 4-5 → Server B zuweisen
|
||||||
|
5. Templates pro Produkt wählen
|
||||||
|
|
||||||
|
### Szenario 3: White-Label / Reseller
|
||||||
|
|
||||||
|
**Vorher:**
|
||||||
|
- Reseller1-Server: Produkt A, B, C
|
||||||
|
- Eigene Branding, gleiche API-Keys
|
||||||
|
|
||||||
|
**Nachher:**
|
||||||
|
1. "Reseller1-KeyHelp" Server anlegen
|
||||||
|
2. Alle Reseller-Produkte zuweisen
|
||||||
|
3. Reseller-spezifische Templates wählen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🐛 Troubleshooting
|
||||||
|
|
||||||
|
### Problem 1: "KeyHelp server not configured"
|
||||||
|
|
||||||
|
**Ursache:** Server nicht in WHMCS konfiguriert
|
||||||
|
|
||||||
|
**Lösung:**
|
||||||
|
1. Gehe zu Setup → Servers
|
||||||
|
2. Füge KeyHelp-Server hinzu
|
||||||
|
3. Weise Server dem Produkt zu
|
||||||
|
|
||||||
|
### Problem 2: Templates werden nicht geladen
|
||||||
|
|
||||||
|
**Ursache:** API-Verbindung fehlerhaft oder keine Pläne in KeyHelp
|
||||||
|
|
||||||
|
**Lösung:**
|
||||||
|
```
|
||||||
|
1. Test Connection durchführen
|
||||||
|
2. In KeyHelp prüfen: Sind Pläne angelegt?
|
||||||
|
3. API-Key-Berechtigung prüfen
|
||||||
|
4. "Sync Templates" Button klicken
|
||||||
|
```
|
||||||
|
|
||||||
|
### Problem 3: Bestehende Accounts funktionieren nicht
|
||||||
|
|
||||||
|
**Ursache:** Account-Details referenzieren alte Config-Optionen
|
||||||
|
|
||||||
|
**Lösung:**
|
||||||
|
Bestehende Accounts sollten weiterhin funktionieren. Falls nicht:
|
||||||
|
```sql
|
||||||
|
-- Prüfe gespeicherte Account-Details
|
||||||
|
SELECT * FROM tblhosting WHERE id = [SERVICE_ID];
|
||||||
|
|
||||||
|
-- Prüfe Custom Fields
|
||||||
|
SELECT * FROM tblcustomfieldsvalues WHERE relid = [SERVICE_ID];
|
||||||
|
```
|
||||||
|
|
||||||
|
### Problem 4: Admin-Panel-Link funktioniert nicht
|
||||||
|
|
||||||
|
**Ursache:** Domain-ID nicht gespeichert (nur bei neuen Accounts)
|
||||||
|
|
||||||
|
**Lösung:**
|
||||||
|
- Nur neue Accounts (ab v2.0) haben Admin-Panel-Link
|
||||||
|
- Alte Accounts: Nutzen Sie den Standard-Login-Button
|
||||||
|
|
||||||
|
### Problem 5: "Template not found"
|
||||||
|
|
||||||
|
**Ursache:** Gewähltes Template existiert nicht mehr in KeyHelp
|
||||||
|
|
||||||
|
**Lösung:**
|
||||||
|
1. Templates neu synchronisieren
|
||||||
|
2. Produkt-Konfiguration prüfen
|
||||||
|
3. Anderes Template wählen
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📝 Checkliste nach Update
|
||||||
|
|
||||||
|
- [ ] Backup erstellt
|
||||||
|
- [ ] Alte Konfiguration dokumentiert
|
||||||
|
- [ ] Neue Module-Dateien hochgeladen
|
||||||
|
- [ ] Server in WHMCS konfiguriert
|
||||||
|
- [ ] Verbindung getestet (alle Server)
|
||||||
|
- [ ] Templates synchronisiert
|
||||||
|
- [ ] Alle Produkte aktualisiert
|
||||||
|
- [ ] Test-Account erstellt und geprüft
|
||||||
|
- [ ] Bestehende Accounts funktionieren
|
||||||
|
- [ ] Client Area korrekt
|
||||||
|
- [ ] Admin-SSO funktioniert
|
||||||
|
- [ ] Module-Logs überprüft
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Vorteile nach dem Update
|
||||||
|
|
||||||
|
### Für Administratoren
|
||||||
|
- ✅ Zentrale Verwaltung aller Server
|
||||||
|
- ✅ Keine redundante Konfiguration
|
||||||
|
- ✅ Schnellere Produkt-Erstellung
|
||||||
|
- ✅ Einfacher Server-Wechsel
|
||||||
|
- ✅ Bessere Übersicht
|
||||||
|
|
||||||
|
### Für Kunden
|
||||||
|
- ✅ Template-Information sichtbar
|
||||||
|
- ✅ Direkter Admin-Panel-Link
|
||||||
|
- ✅ Schnellerer Zugriff
|
||||||
|
- ✅ Besseres Design
|
||||||
|
|
||||||
|
### Für Entwickler
|
||||||
|
- ✅ Sauberer Code
|
||||||
|
- ✅ Weniger Config-Optionen
|
||||||
|
- ✅ Standard-WHMCS-Workflow
|
||||||
|
- ✅ Einfachere Wartung
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📞 Support
|
||||||
|
|
||||||
|
### Bei Problemen
|
||||||
|
|
||||||
|
1. **Logs prüfen:**
|
||||||
|
```
|
||||||
|
Utilities → Logs → Module Log
|
||||||
|
Filter: keyhelpmanager
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **KeyHelp-API testen:**
|
||||||
|
```bash
|
||||||
|
curl -H "X-API-Key: YOUR_API_KEY" \
|
||||||
|
https://keyhelp.example.com/api/v2/server/version
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **WHMCS Test Connection:**
|
||||||
|
```
|
||||||
|
Setup → Servers → Test Connection
|
||||||
|
```
|
||||||
|
|
||||||
|
### Kontakt
|
||||||
|
|
||||||
|
- **GitHub Issues:** https://github.com/ihr-repo/keyhelpmanager/issues
|
||||||
|
- **Entwickler:** Kevin Feiler / AVVGO
|
||||||
|
- **Website:** https://avvgo.de
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔄 Rollback (falls nötig)
|
||||||
|
|
||||||
|
Falls das Update Probleme verursacht:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Backup wiederherstellen
|
||||||
|
rm -rf /pfad/zu/whmcs/modules/servers/keyhelpmanager
|
||||||
|
cp -r /pfad/zu/backup/keyhelpmanager_v1_backup /pfad/zu/whmcs/modules/servers/keyhelpmanager
|
||||||
|
|
||||||
|
# 2. Browser-Cache leeren
|
||||||
|
# 3. WHMCS-Cache leeren
|
||||||
|
rm -rf /pfad/zu/whmcs/templates_c/*
|
||||||
|
|
||||||
|
# 4. Produkt-Konfiguration zurücksetzen
|
||||||
|
# (manuell in WHMCS Admin-Panel)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Wichtig:** Nach Rollback müssen Sie die alten Config-Optionen wieder eintragen!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📅 Zeitaufwand
|
||||||
|
|
||||||
|
- **1-2 Server:** ca. 15-30 Minuten
|
||||||
|
- **3-5 Server:** ca. 30-45 Minuten
|
||||||
|
- **10+ Produkte:** ca. 45-60 Minuten
|
||||||
|
|
||||||
|
**Tipp:** Planen Sie das Update außerhalb der Geschäftszeiten.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✨ Nächste Schritte
|
||||||
|
|
||||||
|
Nach erfolgreichem Update:
|
||||||
|
|
||||||
|
1. Informieren Sie Ihr Team über die Änderungen
|
||||||
|
2. Aktualisieren Sie interne Dokumentation
|
||||||
|
3. Testen Sie alle Workflows
|
||||||
|
4. Freuen Sie sich über die Vereinfachung! 🎉
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Viel Erfolg beim Update!**
|
||||||
|
|
||||||
|
*KeyHelp Manager v2.0.0*
|
||||||
|
*© 2024 Kevin Feiler / AVVGO*
|
||||||
BIN
modules/servers/keyhelpmanager.zip
Normal file
BIN
modules/servers/keyhelpmanager.zip
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@
|
|||||||
* @copyright Copyright (c) 2024 Kevin Feiler / AVVGO
|
* @copyright Copyright (c) 2024 Kevin Feiler / AVVGO
|
||||||
* @license MIT License
|
* @license MIT License
|
||||||
* @link https://avvgo.de
|
* @link https://avvgo.de
|
||||||
* @version 1.0.0
|
* @version 2.0.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined("WHMCS")) {
|
if (!defined("WHMCS")) {
|
||||||
@@ -31,36 +31,21 @@ function keyhelpmanager_MetaData()
|
|||||||
function keyhelpmanager_ConfigOptions()
|
function keyhelpmanager_ConfigOptions()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"hostname" => [
|
"template" => [
|
||||||
"FriendlyName" => "Hostname (IP or FQDN)",
|
"FriendlyName" => "KeyHelp Template",
|
||||||
"Type" => "text",
|
"Type" => "dropdown",
|
||||||
"Size" => "25",
|
"Options" => _keyhelpmanager_GetTemplates(),
|
||||||
"Description" =>
|
"Description" => "Select a KeyHelp template/plan for this product",
|
||||||
"KeyHelp server hostname or IP address (without http://)",
|
"Loader" => "keyhelpmanager_TemplateLoader",
|
||||||
"Required" => true,
|
|
||||||
],
|
|
||||||
"apikey" => [
|
|
||||||
"FriendlyName" => "API Key",
|
|
||||||
"Type" => "password",
|
|
||||||
"Size" => "50",
|
|
||||||
"Description" => "KeyHelp API Key from Settings → API",
|
|
||||||
"Required" => true,
|
|
||||||
],
|
|
||||||
"usessl" => [
|
|
||||||
"FriendlyName" => "Use SSL",
|
|
||||||
"Type" => "yesno",
|
|
||||||
"Default" => "on",
|
|
||||||
"Description" => "Use SSL for API connection (recommended)",
|
|
||||||
],
|
|
||||||
"verify_ssl" => [
|
|
||||||
"FriendlyName" => "Verify SSL Certificate",
|
|
||||||
"Type" => "yesno",
|
|
||||||
"Default" => "on",
|
|
||||||
"Description" => "Verify SSL certificate (disable for self-signed)",
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function keyhelpmanager_TemplateLoader($params)
|
||||||
|
{
|
||||||
|
return _keyhelpmanager_GetTemplates($params);
|
||||||
|
}
|
||||||
|
|
||||||
function _keyhelpmanager_APIRequest(
|
function _keyhelpmanager_APIRequest(
|
||||||
array $params,
|
array $params,
|
||||||
string $endpoint,
|
string $endpoint,
|
||||||
@@ -68,16 +53,19 @@ function _keyhelpmanager_APIRequest(
|
|||||||
array $data = [],
|
array $data = [],
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
$hostname =
|
// Use centralized server configuration from WHMCS server settings
|
||||||
$params["serverhostname"] ?? ($params["configoption1"] ?? "");
|
$hostname = $params["serverhostname"] ?? "";
|
||||||
$apiKey = $params["serverpassword"] ?? ($params["configoption2"] ?? "");
|
$apiKey = $params["serveraccesshash"] ?? "";
|
||||||
$useSSL = $params["configoption3"] ?? "on";
|
$useSSL = $params["serversecure"] ?? "on";
|
||||||
$verifySSL = $params["configoption4"] ?? "on";
|
|
||||||
|
// Verify SSL is enabled by default for security
|
||||||
|
$verifySSL = "on";
|
||||||
|
|
||||||
if (empty($hostname) || empty($apiKey)) {
|
if (empty($hostname) || empty($apiKey)) {
|
||||||
return [
|
return [
|
||||||
"success" => false,
|
"success" => false,
|
||||||
"error" => "KeyHelp server not configured",
|
"error" =>
|
||||||
|
"KeyHelp server not configured. Please configure the server in WHMCS Setup > Products/Services > Servers",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,6 +153,9 @@ function keyhelpmanager_CreateAccount(array $params)
|
|||||||
return "Domain is required";
|
return "Domain is required";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get selected template from config options
|
||||||
|
$templateId = $params["configoption1"] ?? "";
|
||||||
|
|
||||||
$accountData = [
|
$accountData = [
|
||||||
"login_name" => $username,
|
"login_name" => $username,
|
||||||
"password" => $password,
|
"password" => $password,
|
||||||
@@ -172,8 +163,9 @@ function keyhelpmanager_CreateAccount(array $params)
|
|||||||
"display_name" => $clientName,
|
"display_name" => $clientName,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!empty($params["configoptions"]["KeyHelp Plan"])) {
|
// Use template if selected
|
||||||
$accountData["plan"] = $params["configoptions"]["KeyHelp Plan"];
|
if (!empty($templateId)) {
|
||||||
|
$accountData["plan_id"] = $templateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = _keyhelpmanager_APIRequest(
|
$result = _keyhelpmanager_APIRequest(
|
||||||
@@ -193,7 +185,13 @@ function keyhelpmanager_CreateAccount(array $params)
|
|||||||
return "User created but no ID returned";
|
return "User created but no ID returned";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create domain with template settings
|
||||||
$domainData = ["domain_name" => $domain, "user_id" => $userId];
|
$domainData = ["domain_name" => $domain, "user_id" => $userId];
|
||||||
|
|
||||||
|
if (!empty($templateId)) {
|
||||||
|
$domainData["template_id"] = $templateId;
|
||||||
|
}
|
||||||
|
|
||||||
$domainResult = _keyhelpmanager_APIRequest(
|
$domainResult = _keyhelpmanager_APIRequest(
|
||||||
$params,
|
$params,
|
||||||
"/domains",
|
"/domains",
|
||||||
@@ -206,10 +204,15 @@ function keyhelpmanager_CreateAccount(array $params)
|
|||||||
return "Domain creation failed: " . $domainResult["error"];
|
return "Domain creation failed: " . $domainResult["error"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save account details including domain ID
|
||||||
|
$domainId = $domainResult["data"]["id"] ?? null;
|
||||||
|
|
||||||
_keyhelpmanager_SaveAccountDetails($params["serviceid"], [
|
_keyhelpmanager_SaveAccountDetails($params["serviceid"], [
|
||||||
"username" => $username,
|
"username" => $username,
|
||||||
"password" => $password,
|
"password" => $password,
|
||||||
"userid" => $userId,
|
"userid" => $userId,
|
||||||
|
"domainid" => $domainId,
|
||||||
|
"template" => $templateId,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
@@ -295,24 +298,52 @@ function keyhelpmanager_ClientArea(array $params)
|
|||||||
$params["serviceid"],
|
$params["serviceid"],
|
||||||
);
|
);
|
||||||
$userId = $accountDetails["userid"] ?? null;
|
$userId = $accountDetails["userid"] ?? null;
|
||||||
$hostname =
|
$domainId = $accountDetails["domainid"] ?? null;
|
||||||
$params["serverhostname"] ?? ($params["configoption1"] ?? "");
|
$templateId = $accountDetails["template"] ?? null;
|
||||||
$useSSL = $params["configoption3"] ?? "on";
|
|
||||||
|
$hostname = $params["serverhostname"] ?? "";
|
||||||
|
$useSSL = $params["serversecure"] ?? "on";
|
||||||
$protocol = $useSSL === "on" ? "https" : "http";
|
$protocol = $useSSL === "on" ? "https" : "http";
|
||||||
$loginUrl = sprintf("%s://%s", $protocol, $hostname);
|
$loginUrl = sprintf("%s://%s", $protocol, $hostname);
|
||||||
|
|
||||||
|
// Direct panel link
|
||||||
|
$panelUrl = sprintf(
|
||||||
|
"%s://%s/admin/index.php?p=domains&action=edit&id=%s",
|
||||||
|
$protocol,
|
||||||
|
$hostname,
|
||||||
|
$domainId ?? "",
|
||||||
|
);
|
||||||
|
|
||||||
$templateVars = [
|
$templateVars = [
|
||||||
"login_url" => $loginUrl,
|
"login_url" => $loginUrl,
|
||||||
|
"panel_url" => $panelUrl,
|
||||||
"username" =>
|
"username" =>
|
||||||
$accountDetails["username"] ?? ($params["username"] ?? "N/A"),
|
$accountDetails["username"] ?? ($params["username"] ?? "N/A"),
|
||||||
"password" =>
|
"password" =>
|
||||||
$accountDetails["password"] ??
|
$accountDetails["password"] ??
|
||||||
($params["password"] ?? "••••••••"),
|
($params["password"] ?? "••••••••"),
|
||||||
"domain" => $params["domain"] ?? "N/A",
|
"domain" => $params["domain"] ?? "N/A",
|
||||||
|
"template_id" => $templateId,
|
||||||
|
"template_name" => "",
|
||||||
"stats" => null,
|
"stats" => null,
|
||||||
"error" => null,
|
"error" => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Get template name if template ID exists
|
||||||
|
if (!empty($templateId)) {
|
||||||
|
$templateResult = _keyhelpmanager_APIRequest(
|
||||||
|
$params,
|
||||||
|
"/plans/" . $templateId,
|
||||||
|
"GET",
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($templateResult["success"] && isset($templateResult["data"])) {
|
||||||
|
$templateVars["template_name"] =
|
||||||
|
$templateResult["data"]["name"] ??
|
||||||
|
"Template " . $templateId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($userId)) {
|
if (!empty($userId)) {
|
||||||
$statsResult = _keyhelpmanager_APIRequest(
|
$statsResult = _keyhelpmanager_APIRequest(
|
||||||
$params,
|
$params,
|
||||||
@@ -648,3 +679,103 @@ function _keyhelpmanager_CalculatePercent(int $used, int $limit): float
|
|||||||
{
|
{
|
||||||
return $limit > 0 ? round(($used / $limit) * 100, 2) : 0;
|
return $limit > 0 ? round(($used / $limit) * 100, 2) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get templates from KeyHelp server
|
||||||
|
*/
|
||||||
|
function _keyhelpmanager_GetTemplates($params = null)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// Get server configuration from module settings or server params
|
||||||
|
if ($params && isset($params["serverid"])) {
|
||||||
|
$server = Capsule::table("tblservers")
|
||||||
|
->where("id", $params["serverid"])
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if (!$server) {
|
||||||
|
return ["" => "-- No Server Selected --"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$apiParams = [
|
||||||
|
"serverhostname" => $server->hostname,
|
||||||
|
"serveraccesshash" => decrypt($server->accesshash),
|
||||||
|
"serversecure" => $server->secure,
|
||||||
|
];
|
||||||
|
|
||||||
|
// Get additional config options
|
||||||
|
$configOptions = Capsule::table("tblservers")
|
||||||
|
->where("id", $params["serverid"])
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($configOptions && isset($configOptions->username)) {
|
||||||
|
$apiParams["serverusername"] = $configOptions->username;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return ["" => "-- Configure Product First --"];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fetch templates/plans from KeyHelp
|
||||||
|
$result = _keyhelpmanager_APIRequest($apiParams, "/plans", "GET");
|
||||||
|
|
||||||
|
if (!$result["success"]) {
|
||||||
|
logActivity(
|
||||||
|
"KeyHelpManager: Failed to fetch templates - " .
|
||||||
|
$result["error"],
|
||||||
|
);
|
||||||
|
return ["" => "-- Error loading templates --"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$templates = ["" => "-- Select Template --"];
|
||||||
|
|
||||||
|
if (isset($result["data"]) && is_array($result["data"])) {
|
||||||
|
foreach ($result["data"] as $template) {
|
||||||
|
$templates[$template["id"]] =
|
||||||
|
$template["name"] ?? "Template " . $template["id"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cache templates for 5 minutes
|
||||||
|
$cacheKey = "keyhelpmanager_templates_" . ($params["serverid"] ?? 0);
|
||||||
|
Capsule::table("tblconfiguration")->updateOrInsert(
|
||||||
|
["setting" => $cacheKey],
|
||||||
|
[
|
||||||
|
"setting" => $cacheKey,
|
||||||
|
"value" => json_encode($templates),
|
||||||
|
"created_at" => date("Y-m-d H:i:s"),
|
||||||
|
"updated_at" => date("Y-m-d H:i:s"),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
return $templates;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
logActivity(
|
||||||
|
"KeyHelpManager: Get templates failed - " . $e->getMessage(),
|
||||||
|
);
|
||||||
|
return ["" => "-- Error: " . $e->getMessage() . " --"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sync templates from KeyHelp server
|
||||||
|
*/
|
||||||
|
function keyhelpmanager_AdminCustomButtonArray()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
"Sync Templates" => "SyncTemplates",
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function keyhelpmanager_SyncTemplates($params)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$templates = _keyhelpmanager_GetTemplates($params);
|
||||||
|
|
||||||
|
if (count($templates) > 1) {
|
||||||
|
return "success&Templates synchronized successfully";
|
||||||
|
} else {
|
||||||
|
return "error&Failed to sync templates";
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return "error&" . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -319,13 +319,28 @@
|
|||||||
KeyHelp Hosting
|
KeyHelp Hosting
|
||||||
<span class="kh-badge">ACTIVE</span>
|
<span class="kh-badge">ACTIVE</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="kh-card-subtitle">{$domain}</p>
|
<p class="kh-card-subtitle">
|
||||||
<a href="{$login_url}" target="_blank" class="kh-login-btn">
|
{$domain}
|
||||||
<svg width="18" height="18" fill="currentColor" viewBox="0 0 20 20" style="display: inline-block; vertical-align: middle; margin-right: 8px;">
|
{if $template_name}
|
||||||
<path fill-rule="evenodd" d="M3 3a1 1 0 011 1v12a1 1 0 11-2 0V4a1 1 0 011-1zm7.707 3.293a1 1 0 010 1.414L9.414 9H17a1 1 0 110 2H9.414l1.293 1.293a1 1 0 01-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0z" clip-rule="evenodd"/>
|
<span class="kh-badge">📋 {$template_name}</span>
|
||||||
</svg>
|
{/if}
|
||||||
Open Control Panel
|
</p>
|
||||||
</a>
|
<div style="display: flex; gap: 12px; flex-wrap: wrap;">
|
||||||
|
<a href="{$login_url}" target="_blank" class="kh-login-btn">
|
||||||
|
<svg width="18" height="18" fill="currentColor" viewBox="0 0 20 20" style="display: inline-block; vertical-align: middle; margin-right: 8px;">
|
||||||
|
<path fill-rule="evenodd" d="M3 3a1 1 0 011 1v12a1 1 0 11-2 0V4a1 1 0 011-1zm7.707 3.293a1 1 0 010 1.414L9.414 9H17a1 1 0 110 2H9.414l1.293 1.293a1 1 0 01-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0z" clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
Open Control Panel
|
||||||
|
</a>
|
||||||
|
{if $panel_url}
|
||||||
|
<a href="{$panel_url}" target="_blank" class="kh-login-btn" style="background: rgba(255,255,255,0.2); color: white;">
|
||||||
|
<svg width="18" height="18" fill="currentColor" viewBox="0 0 20 20" style="display: inline-block; vertical-align: middle; margin-right: 8px;">
|
||||||
|
<path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
Admin Panel
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="kh-info-grid">
|
<div class="kh-info-grid">
|
||||||
|
|||||||
Reference in New Issue
Block a user