User Tools

Site Tools


en:dev:284:helloworld

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dev:284:helloworld [15.08.2015 21:26] mrbasemanen:dev:284:helloworld [17.08.2015 21:17] (current) – ready with translation - removed fixme mrbaseman
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// 
- 
 ====== Hello Classic World - Project ====== ====== Hello Classic World - Project ======
 .. The classic example addon. Here, too, very much will change. In principle, however the previous, old system is is still fully compatible at least for 2.8.4. For this reason also the first description of an addon to the conventional method, however, already with new techniques and, unfortunately, still with many 'old' problems. .. The classic example addon. Here, too, very much will change. In principle, however the previous, old system is is still fully compatible at least for 2.8.4. For this reason also the first description of an addon to the conventional method, however, already with new techniques and, unfortunately, still with many 'old' problems.
Line 21: Line 19:
 FIXME (further conditions for these files) FIXME (further conditions for these files)
  
-==== info.php (bis ca. zum 01.07.2015 noch erforderlich) ==== +==== info.php (currently still needed) ==== 
-Diese Datei ist zwischenzeitlich nur noch aus Gründen der Abwärtskompatibilität vorhanden und enthält ausschließlich einen Aufruf zum Import der Informationen aus der Datei //**info.ini**//Neue oder überarbeitet Funktionen des Core greifen ab sofort vorrangig auf die Datei //**info.ini**// zuDiese Kompatibilitäts-Funktion wird voraussichtlich Mitte 2015 endgültig deaktiviertBestehende Module müssen also bis zu diesem Zeitpunkt auf die neue //**info.ini**// umgestellt sein.+In the meantime this file is available only for backward compatibility and only contains a call to import the information from the //**info.ini**// fileNew or revised features of the core grab immediate priority on the //**info.ini**// fileThis compatibility feature is expected to be disabled permanently  in the futureExisting modules must therefore be changed up to this point to use the new //**info.ini**//.
  
 <code php info.php> <code php info.php>
Line 44: Line 42:
 </code> </code>
  
-==== info.ini (erforderlich) ====+==== info.ini (required) ====
  
-Diese Datei enthält ausschließlich Informationen über das aktuelle Addon in Kurzfassung. **Ein Changelog oder sonstige 'Romanehaben in dieser Datei absolut nichts verloren.**\\ +This file contains only information about the current Addon in a nutshell. **A changelog or other 'novelshave absolutely no place in this file.**\\ 
-Ausführlichere Informationen müssen in verschiedenen anderen, spezialisierten Dateien im Unterverzeichnis modulverzeichnis/**//DOC/ //** zur Verfügung gestellt werden:\\ +For more detailed information must be provided in various other specialized files in the subdirectory module directory/**//DOC/ //**:\\ 
-**//DOC/CHANGELOG// ->** In chronologischer Reihenfolge (neueste Einträge zuoberstwerden hier Änderungen an den Scripts eingetragenAuch der Einstieg/Ausstieg weiterer Entwickler wird an der zeitlich richtigen Position eingetragen.\\ +**//DOC/CHANGELOG// ->** In chronological order (newest entries at the topchanges to the scripts are entered hereAlso, the entry exit of other developers will be entered at the correct time position
-**//DOC/LICENSE// ->** Der Ort für ausführliche Lizenzangaben und sonstige rechtliche Angaben.\\ +**//DOC/LICENSE// ->** The place for detailed license information and other legal information
-**//DOC/COPYING// ->** Diese Datei kann benutzt werden um z,B, eine Kopie der GPL unterzubringen.\\ +**//DOC/COPYING// ->** This file can be used to e.g.to accommodate a copy of the GPL. 
-**//DOC/README.EN// ->** Hier ist endlos Platz für ausführliche Beschreibungen und AnleitungenDurch Anpassung der Dateiendung können diese Angaben in den unterschiedlichsten Sprachen geschrieben werden.+**//DOC/README.EN// ->** Here is unlimited space for detailed descriptions and instructionsBy adapting the file extension, such information may be written in different languages.
  
-:!: **Versionsnummern müssen ausschließlich in einem Format angegeben werden, das zu der PHP-Funktion //version_compare()// kompatibel ist.**+:!: **Version numbers must only be given in a format that is compatible with the PHP function //version_compare()//.**
  
 <code ini info.ini> <code ini info.ini>
Line 92: Line 90:
 </code> </code>
 ==== install-struct.sql ==== ==== install-struct.sql ====
-:!: **Diese Datei wird nur benötigt, wenn das Addon eigene Datenbanktabellen erhalten soll!**+:!: **This file is only needed if the addon is to get their own database tables!**
  
-[[dev:284:q_a-helloworld?&#was_ist_eine_sql-strukturdatei|{{:quest.png?32|}}]]  [[dev:284:q_a-helloworld?&#was_ist_eine_sql-strukturdatei|Was ist eine SQL-Strukturdatei?]]+[[dev:284:q_a-helloworld?&#was_ist_eine_sql-strukturdatei|{{:quest.png?32|}}]]  [[dev:284:q_a-helloworld?&#was_ist_eine_sql-strukturdatei|What is a SQL file structure?]]
  
-Die Musterdateien für Install / Upgrade / Uninstall enthalten bereits die fertige Einbindung der SQL-Strukturdatei.\\ +The sample files for Install / Upgrade / Uninstall included the final integration of the SQL file structure.\\ 
-Sollte die Datei //install-struct.sql// nicht vorhanden seinweil z.B. einfach keine Datenbanktabellen benötigt werdenerkennt der Code dieses und geht einfach zum Individualteil über.+If the file //install-struct.sql// is not presentfor example, because simply no database tables are requiredthe code automatically recognizes this and simply proceeds with the individual part.
  
 <file sql install-struct.sql> <file sql install-struct.sql>
Line 137: Line 135:
 -- -------------------------------------------------------- -- --------------------------------------------------------
 </file> </file>
-==== install.php (erforderlich) ==== +==== install.php (required) ==== 
-Die Installation eines Addons erfolgt grundsätzlich in und durch Core-Methoden. +The installation of an Addon basically is done by core methodsOnly pure Addon specific thingssuch as creating new database tables are created by this file.
-Erst rein addonspezifische Dingewie das Anlegen von neuen Datenbanktabellen werden durch diese Datei übernommen+
 <code php install.php> <code php install.php>
 <?php <?php
Line 159: Line 156:
 /* **** END INSTALL ********************************************************* */ /* **** END INSTALL ********************************************************* */
  
-</code> FIXME ergänzen um Rückgabe von Fehlermeldungen!! +</code> FIXME complement by return error messages !! 
-==== uninstall.php (erforderlich) ==== +==== uninstall.php (required) ==== 
-Auch die Deinstallation eines Addons wird größtenteils durch Core-Methoden erledigt. Diese Datei muss eigentlich nur dafür sorgen, dass alles, was außerhalb des Addonverzeichnisses oder in Tabellen, die nicht zum Addon gehören (was nach den Coding-Standards eigentlich strikt verboten istangelegt/geändert wurderückgängig gemacht wirdDie Tabellen des Addons werden durch den SQL-Importer des Core anhand der //install-struct.sql// gelöschtNach Ausführung dieser //uninstall.php// Datei löscht der Core dann das komplette Addonverzeichnis und entfernt alle relevanten Einträge zu diesem Modul aus allen Coredateien.\\ +The uninstall of an Addon is mostly done by core methodstoo. This file must actually only ensure that everything outside the addon directory was created/modified (which is actually strictly forbidden according to the coding standardsor in tables that do not belong to the addonis revertedThe tables of the addon will be deleted by the SQL-based Core Importer of the //install-struct.sql//After executing this file //uninstall.php// the Core will delete the entire addon folder and removes all relevant entries to this module from all core files
-:!: **Es ist grundsätzlich //nicht// möglich, ein Addon zu löschenwenn es noch auf irgendeiner Seite in Benutzung ist!!** +:!: **It is generally //not// possible to delete an addonif it is still on in use on any page!!** 
- +
 <code php uninstall.php> <code php uninstall.php>
 <?php <?php
Line 185: Line 182:
 /* **** END UNINSTALL ******************************************************* */ /* **** END UNINSTALL ******************************************************* */
  
-</code> FIXME ergänzen um Rückgabe von Fehlermeldungen!! +</code> FIXME accomplish by the return of error messages!! 
-==== upgrade.php (erforderlich) ==== +==== upgrade.php (required) ==== 
-Diese Datei hat die Angewohnheit, dass sie im Laufe der Zeit immer weiter anwachsen kannJeder Übergang von einer Version zur nächsten kann erfordern, dass Daten des Addon an neue Bedingungen angepasst werden müssenEine der wichtigsten Regeln für diese Datei istEs muss möglich sein, von jeder beliebigen Version auf die neueste Version upzudaten.+This file has a habit that they can always continue to grow over timeEach transition from one version to another may require that the information about the addon must be adapted to new conditionsOne of the most important rules for this file isIt must be possible to update from any version to the latest version.
  
 <code php upgrade.php> <code php upgrade.php>
Line 208: Line 205:
 /* **** END UPGRADE ********************************************************* */ /* **** END UPGRADE ********************************************************* */
  
-</code> FIXME ergänzen um Rückgabe von Fehlermeldungen!!+</code> FIXME complement by return error messages !! 
 + 
 +===== The files of addons of type 'page' ===== 
 +A so-called 'Page'-Addon currently needs a set of files so that the core can control the creating, deleting and managing of addon instances. These '//required//' files can not be run stand alone, but the can only be called from the core.\\ 
 +For these files, the following rule applies: 
 +:!: **//Warning: Never assume that the base files of addons are loaded and run in the 'Global Scope' (( 'Scope' denotes the visibility and scope of a variable.  'Global Scope' is the area which is also addressed by the superglobal $_GLOBALS [].))
  
-===== Die Dateien eines Addons Type 'page' ===== +Always assume that the files are called from inside a function/class method and of courseglobal variables are not available!//**\\ 
-Ein sogenanntes 'page'-Addon benötigt derzeit noch eine Reihe von Dateien, über die der Core das Anlegen, Löschen und Verwalten von Addon-Instanzen steuern kann. Diese '//erforderlich//'en Dateien sind nicht selbstständig lauffähig und werden ausschließlich vom Core aufgerufen.\\ +[[dev:284:q_a-helloworld?&#weshalb_keine_page_id_mehr_in_addons|{{:quest.png?32|}}]]  [[dev:284:q_a-helloworld?&#weshalb_keine_page_id_mehr_in_addons|Why is page_id no longer needed in addons?]]\\ 
-Auch für diese Dateien gilt folgende Regel:\\ +Page addon requires at least one base table in the databaseThe table must be according to the patternit must be named mod_AddonName and have at least an integer data field included for SectionId. Each record in this table associates an instance of the addon with a Section. More fields can contain standard settings of the addon instance, for example.
-:!: **//Achtung: Verlassen Sie sich niemals daraufdass die Basis-Dateien eines Addons im 'Global Scope' ((mit 'Scope' wird der Sichtbarkeits- und Gültigkeitsbereich einer Variablen bezeichnet. 'Global Scope ist der Bereich, der auch durch die Superglobale $_GLOBALS[] angesprochen wird.)) geladen und ausgeführt werden!! +
-Gehen Sie grundsätzlich immer von der Annahme aus, dass diese Dateien innerhalb einer Funktion/Klassenmethode aufgerufen werden und dadurch selbstverständlich globale Variablen nicht direkt zur Verfügung stehen!//**\\ +
-[[dev:284:q_a-helloworld?&#weshalb_keine_page_id_mehr_in_addons|{{:quest.png?32|}}]]  [[dev:284:q_a-helloworld?&#weshalb_keine_page_id_mehr_in_addons|Weshalb wird die page_id in Addons nicht mehr benötigt?]]\\ +
-Ein Page-Addon benötigt wenigstens eine Basis-Tabelle in der DatenbankDie Tabelle muss nach dem Muster: mod_AddonName benannt werden und muss zumindest ein Integer Datenfeld für die SectionId enthalten Jeder Datensatz in dieser Tabelle verknüpft eine Instanz des Addons mit einer Section. Weitere Datenfelder können z.B. die Grundeinstellungen der jeweiligen Addon-Instanz aufnehmen.+
 ==== add.php (erforderlich) ==== ==== add.php (erforderlich) ====
  
Line 248: Line 246:
 </file> </file>
  
-==== delete.php (erforderlich) ====+==== delete.php (required) ====
  
 <file php delete.php> <file php delete.php>
Line 289: Line 287:
  
  
-FIXME ... und es geht noch weiter...+FIXME ... and many more things to be added...
en/dev/284/helloworld.1439673960.txt.gz · Last modified: 15.08.2015 21:26 by mrbaseman