1. Installation
==============
1.0. Kurzanleitung
------------------
- Inhalt ZIP im root der Website ablegen
- Aufruf Installation mit:
  XAMPP: localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&apply=1
  Webspace: domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&apply=1

Notwendige Informationen:
- Name des Layouts
- Kennwort für Installation

1.1. Ausführliche Anleitung
---------------------------
1.2. Dateien entpacken und Inhalt von ZIP in root-Verzeichnis kopieren (Server oder lokaL XAMPP)

1.3. Aufruf in Adresszeile des Browsers

Zwei Informationen bereithalten:
- Name des Layouts, welches um Modul erweitert werden soll, z.B. moziloCMS
  entspricht Parameter layout=

- Kennwort, damit Installation startet
  entspricht Parameter token=

2. Allgemeiner Aufruf:
=====================
install-addon.php?layout=LAYOUTNAME&token=KENNWORT&PARAMETER

- LAYOUTNAME	--> Name des zu erweiterten Layouts im Ordner layouts
- KENNWORT	--> mitgeteiltes Kennwort
- PARAMETER	--> &dry-run=1 - nur Testlauf; reine Simulation; keine Änderungen am System
		--> &apply=1 - Ausführen; komplette Installation
		--> &uninstall=1 - Simulation Deinstallation; reine Simulation; was würde entfernt
		--> &uninstall=1&apply=1 - Deinstallation: Anpassung in style.css und Benutzerelemente werden entfernt
		--> &uninstall=1&apply=1&remove-css-file=1 - auch css-Datei wird gelöscht
		--> &uninstall=1&apply=1&remove-own-js-file=1 - auch Datei own_js.js wird gelöscht
		--> &uninstall=1&apply=1&remove-js-include=1 - auch JS-Einbindung in template.html wird entfernt

Anmerkung: 
----------
Da die JS-Datei own_js.js auch für andere Addons gilt, wird sie bei der 
Standard-Deinstallatin (Parameter &uninstall=1&apply=1) nicht entfernt. 
Auch die Einbindung des js-Scripts in der template.html bleibt erhalten.

Was passiert bei Installation?
------------------------------
- CSS-Datei wird in Ordner css kopiert
- CSS-Datei wird in style.css per @import integriert / Anlegen Kommentar an Einfügestelle ganz am Anfang
- JS-Datei wird in Ordner js kopiert - Ordner js wird angelegt, falls nicht vorhanden
- JS-Datei wird in template.html integriert / Anlegen Kommentar an Einfügestelle ganz am Ende vor </body>
- Benutzer-Elemente werden im Adminbereich bei Benutzerdefinierte Syntaxelemente eingefügt

Anmerkung:
----------
Manuelle Installation wählen, wenn bei Dir nicht zutrifft:
- style.css ist die bestimmende CSS-Datei (Standard)
- style.css liegt im css-Ordner des Layouts (Standard)
- template.html ist das HTML-Gerüst Deines Layouts (Standard)

3. Installations-Routine und mögliche Parameter
===============================================
XAMPP - Dateien liegen im root (htdocs) bzw. in einem Unterordner

3.1. Installation
- nur Simuilation
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&dry-run=1
- echte Installation
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&apply=1

3.2. Deinstallation
- nur Simuilation
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1
- echte Deinstallation
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1&remove-css-file=1
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1&remove-own-js-file=1
localhost/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1&remove-js-include=1

4. Konkretes Beispiel:
======================
Das Layout soll um ein Ausklappelement ( Akkordeon) erweitert werden.
Dateien aus dem ZIP im root ablegen.

- anzupassendes Layout:		moziloCMS 
- übermitteltes Kennwort:	Akko-Inst01

4.1. XAMPP
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&dry-run=1
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&apply=1
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&uninstall=1
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&uninstall=1&apply=1
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&uninstall=1&apply=1&remove-css-file=1
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&uninstall=1&apply=1&remove-own-js-file=1
localhost/install-addon.php?layout=moziloCMS&token=Akko-Inst01&uninstall=1&apply=1&remove-js-include=1

4.2. Web-Server

domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&dry-run=1
domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&apply=1
domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1
domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1
domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1&remove-css-file=1
domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1&remove-own-js-file=1
domain/install-addon.php?layout=LAYOUTNAME&token=KENNWORT&uninstall=1&apply=1&remove-js-include=1
