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:47] – [install.php (erforderlich)] translated 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 158: Line 156:
 /* **** END INSTALL ********************************************************* */ /* **** END INSTALL ********************************************************* */
  
-</code> FIXME complement to return error messages !! +</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 184: 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 207: 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 247: Line 246:
 </file> </file>
  
-==== delete.php (erforderlich) ====+==== delete.php (required) ====
  
 <file php delete.php> <file php delete.php>
Line 288: Line 287:
  
  
-FIXME ... und es geht noch weiter...+FIXME ... and many more things to be added...
en/dev/284/helloworld.1439675273.txt.gz · Last modified: 15.08.2015 21:47 by mrbaseman