Seite 1 von 1

[DE] Pfadangaben Download Extension release 8.x

Verfasst: So 10. Nov 2024, 14:02
von oxpus
Einleitung

Trotz der vorhandenen Online-Hilfe in der Download Erweiterung werden immer wieder die Pfadangaben in den einzelnen Punkten missverstanden und damit falsch angegeben.
Die Folge davon sind defekte Downloads und anschließende Support-Anfragen hierzu, die letztlich meist zu gleich lautenden Antworten führen.
Daher an dieser Stelle eine kleine Hilfestellung, was wo einzutragen ist, damit die Downloads korrekt verwaltet und auch fehlerfrei heruntergeladen werden können.

Hinweis:
Alle nachfolgenden Pfad- und Dateinamen sind exakt wie angegeben zu übernehmen (abgesehen von der Namenswahl), allerdings nicht die dargestellten Hochkommas.
Die Hochkommas dienen in dieser Hilfestellung lediglich zur besseren Lesbarkeit der Pfad- und Dateinamen.


Zusammensetzung des Pfades zur Download Datei

Die Erweiterung setzt den Pfad zum Download einer Datei gemäß den Angaben an mehreren Stellen in der Erweiterung selber zusammen:

Server-Domain und Scriptpfad in der Erweiterung
Werden im Forum von der Erweiterung selber verwaltet. Der Einstiegspunkt der Dateien liegt im Ordner forumroot/files/dlext/

Unterordner für die Kategorien
Jede Kategorie kann, muss aber nicht einen eigenen Unterordner haben. Es können auch mehrere Kategorien auf einem Unterordner zeigen. Es muss aber mindestens ein Unterordner angelegt werden, damit die Erweiterung korrekt arbeiten kann und man selber auch etwas mehr Übersicht behält.

Dateiangabe zum Download
Der Name der Datei, die in den Download Bereich eingestellt wird

Eintrag der Pfadbestandteile in der Download Erweiterung
Für die Erfassung o. g. Pfad- und Dateinamen sind in der Erweiterung vorgegebene Stellen vorhanden:

Pfad zum Download-Bereich
Der physische Pfad zum Download Bereich auf dem eigenen Webspace/Server wird im ACP in den Einstellungen der Erweiterung angezeigt und ist unveränderbar.
Dort ist als Pfad nach der Installation forumroot/files/dlext/downloads/ eingetragen und zeigt damit auf dem Server unterhalb des Forum Hauptverzeichnis (dort, wo z. B. auch die viewtopic.php enthalten ist).
In der Extension für das phpBB 3.2.x oder neuer wird der Pfad intern geführt und kann durch ein Auswahlfeld bestimmt werden.
Dabei werden alle bestehenden Ordner und Dateien bei einem Wechsel automatisch an den neu gewählten Ort verschoben.

Pfad für die Kategorie/n
Unterhalb des Pfades zum Download Bereich ist nun mindestens ein weiterer Unterordner zu erstellen, der in der Namenswahl frei bestimmt werden kann. Nennen wir ihn mal "mods".
Dieser Ordner ist dann in der/den Kategorie/n einzutragen, die auf diesen Ordner zeigen sollen, damit der Pfad vervollständigt wird.
In der/den Kategorie/n wäre demnach "mods/" als Pfad einzutragen (genau auf die Schreibweise zu achten, also der / am Ende und keiner am Anfang!).
Damit existiert unterhalb des Forum-Roots nun der Pfad forumroot/files/dlext/downloads/mods/, in dem Dateien hochgeladen und von dem diese auch heruntergeladen werden können.
Dieser Ordner muss dabei auf CHMOD 744 oder höher eingestellt werden, damit die Erweiterung auch in den Ordner schreiben kann (ist aber auch ein Stück weit von den Zugriffsrechten des Webservers, bzw. dem PHP-User auf dem Server abhängig).
Die Ordner können allerdings auch mit der Erweiterung selber angelegt werden. Dazu gibt es die "Toolbox", die mit der Download Erweiterung als Modul im Administrations-Bereich installiert wird.
Mit der Toolbox können Ordner angelegt und auch (sofern leer) gelöscht werden. Alle nötigen Zugriffsrechte werden dabei automatisch gesetzt.

Dateiname für den Download
Im Download selber wird nur noch der Dateiname selber verwaltet. Dieser wird über das Upload-Formular automatisch nach Auswahl einer Datei übernommen, im Admin-Bereich darf man dagegen nur bereits auf dem Server vorhandene Dateien angeben, allerdings dann auch nur den Dateinamen und ohne führende oder abschließende / oder gar Pfadangaben.
Dabei ist gerade bei der manuellen Angabe der Dateinamen im Admin-Bereich darauf zu achten, dass sich die Datei auch tatsächlich in dem Ordner befindet, der sich hinter der angegebenen Kategorie verbirgt, da ansonsten der Download zwar erfasst, aber die Datei nicht fehlerfrei und damit nur defekt heruntergeladen werden kann!
Somit wäre im Download selber z. B. die Datei "Download_Mod.zip" einzutragen, mehr nicht.

Verbindung der Pfadbestandteile innerhalb der Erweiterung

Mit den o. g. Angaben der Pfad- und Dateinamen kann nun die Download Erweiterung korrekt auf die Datei verweisen und diese damit fehlerfrei an den User senden (= Download).
Die in dieser Hilfestellung angegebenen Beispielnamen führen damit zu folgendem Pfad:
forumroot/files/dlext/downloads/mods/Download_Mod.zip
Damit ist nun ein fehlerfreier Download gewährleistet und der Benutzer kann die Datei herunterladen.

Mögliche Fehlerquellen bei den Pfadangaben und des Dateihandlings

Fehlende oder falsche Pfadabgaben in den Kategorien
Bei dem Anlegen einer neuen Download-Kategorie wird als Pfad lediglich "/" vorgeben.
Das ist absichtlich eingerichtet worden, um Fehler bei der Erfassung zu vermeiden und da auch an dieser Stelle noch kein Unterordner vorhanden sein kann, bzw. die Erweiterung diese ja nicht kennt.
Diese Pfad-Angabe ist aber spätestens dann zu ändern und der korrekte Unterordner einzutragen, wenn in die Kategorie Downloads auf den eigenen Server/Webspace hochgeladen werden sollen.
Dabei können auch verschachtelte Unterordner als Pfad eingetragen werden, wie z. B. der Ordner forumroot/files/dlext/downloads/mods/eigene/zip/neu/, wobei aus diesem Pfad wie oben genannt nur der Teil "/mods/eigene/zip/neu/" in der betreffenden Kategorie aus dem angezeigten Drop Down einzutragen ist.
Damit ist die Pfadangabe in der Kategorie unabhängig von der Hierarchie der Kategorien in der Download Erweiterung selber und muss demnach nicht gleich lautend eingerichtet werden.

Fehlen eines physikalischen Ordners, der in der Kategorie angegeben wurde
Beim Anlegen oder Ändern einer Kategorie prüft die Erweiterung, ob der angegebene Pfad auch tatsächlich vorhanden ist und zeigt ggf. eine entsprechende Meldung an. Dann ist der Pfad zu prüfen und zu korrigieren.
Der voreingestellte Slash "/" ist dabei zunächst nicht falsch, ein Pfad forumroot/files//dlext/downloads// kann aber u. U. je nach Webserver auch zu einem Fehler führen, daher ist dieses zu vermeiden.

Weitere Hilfestellungen
In der Erweiterung selber sind bei der Bearbeitung in der Regel Hilfestellungen je Feld/Option hinterlegt. Diese sind über ein (?) aufrufbar, welche sich jeweils direkt vor dem eigentlichen Feld / der eigentlichen Option befinden.
In dieser Online-Hilfe ist zwar nicht selten knapp, aber durchgängig jedes Feld und jede Option erklärt, wodurch auf eine weitere Erklärung in dieser Hilfestellung verzichtet wird.

[EN] Path settings Download Extension release 8.x

Verfasst: So 10. Nov 2024, 14:07
von oxpus
English, translated by Google Translator:

Introduction

Despite the available online help in the download extension, the path information in the individual points is repeatedly misunderstood and therefore incorrectly stated.
The result of this are defective downloads and subsequent support requests, which ultimately usually lead to the same answers.
Therefore, a little help here as to what needs to be entered where so that the downloads can be managed correctly and downloaded without errors.

Note:
All subsequent path and file names must be adopted exactly as specified (apart from the choice of name), but not the apostrophes shown.
The apostrophes in this help only serve to make the path and file names easier to read.


Composition of the path to the download file

The extension composes the path to download a file according to the information in several places in the extension itself:

Server domain and script path in the extension
Are managed in the forum by the extension itself. The entry point of the files is in the folder forumroot/files/dlext/

Subfolders for the categories
Each category can, but does not have to, have its own subfolder. It can also show multiple categories on a subfolder. However, at least one subfolder must be created so that the extension can work correctly and you can keep a little more overview.

File information for download
The name of the file that will be placed in the download area

Entry of the path components in the download extension
For the recording of the above Path and file names are present in predetermined places in the extension:

Path to the download area
The physical path to the download area on your own web space/server is displayed in the ACP in the extension settings and cannot be changed.
After the installation, the path entered there is forumroot/files/dlext/downloads/ and thus points to the server below the forum main directory (where, for example, viewtopic.php is also contained).
In the extension for phpBB 3.2.x or newer, the path is managed internally and can be determined using a selection field.
All existing folders and files are automatically moved to the new location when you change.

Path for the category(s
At least one further subfolder must now be created below the path to the download area, which can be freely determined in the choice of name. Let's call him "mods".
This folder must then be entered in the category(s) that should point to this folder so that the path is completed.
“mods/” should therefore be entered as the path in the category(s) (pay close attention to the spelling, i.e. the / at the end and none at the beginning!).
This means that the path forumroot/files/dlext/downloads/mods/ now exists below the forum root, where files can be uploaded and from which they can also be downloaded.
This folder must be set to CHMOD 744 or higher so that the extension can also write to the folder (but this also depends to a certain extent on the access rights of the web server or the PHP user on the server).
However, the folders can also be created using the extension itself. There is also the “Toolbox”, which is installed with the download extension as a module in the administration area.
With the toolbox, folders can be created and also deleted (if empty). All necessary access rights are set automatically.

File name for download
In the download itself, only the file name itself is managed. This is automatically applied via the upload form after selecting a file, whereas in the admin area you can only specify files that already exist on the server, but then only the file name and without leading or final / or even path information.
When specifying the file names manually in the admin area, it is important to ensure that the file is actually located in the folder that is behind the specified category, otherwise the download will be recorded, but the file will not be error-free and therefore can only be downloaded defectively!
This means that the download itself would contain e.g. B. to enter the file “Download_Mod.zip”, nothing more.

Connecting the path components within the extension

With the above If the path and file names are specified, the download extension can now correctly point to the file and thus send it to the user without errors (= download).
The example names given in this help lead to the following path:
forumroot/files/dlext/downloads/mods/Download_Mod.zip
This now ensures an error-free download and the user can download the file.

Possible sources of error in path information and file handling

Missing or incorrect path submissions in the categories
When creating a new download category, only "/" is specified as the path.
This was set up intentionally to avoid errors during the entry and because there cannot be a subfolder at this point, or the extension does not recognize them.
However, this path information must be changed and the correct subfolder entered at the latest if you want to upload to your own server/webspace in the Downloads category.
Nested subfolders can also be entered as a path, such as: E.g. the folder forumroot/files/dlext/downloads/mods/own/zip/new/, whereby from this path, as mentioned above, only the part "/mods/own/zip/new /" must be entered in the relevant category from the drop down displayed.
This means that the path information in the category is independent of the hierarchy of categories in the download extension itself and therefore does not have to be set up with the same name.

Missing physical folder specified in category
When creating or changing a category, the extension checks whether the specified path actually exists and, if necessary, displays a corresponding message. Then the path must be checked and corrected.
The default slash "/" is initially not wrong, but a path forumroot/files//dlext/downloads// can also lead to an error depending on the web server, so this is too avoid.

Further assistance
The extension itself usually contains assistance with editing for each field/option. These can be accessed via a (?), which are located directly in front of the actual field/option.
Although this online help is often brief, every field and every option is explained consistently, which means there is no need for further explanation in this help.