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 [17.08.2015 21:01] – [The files of addons of type 'page'] 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 212: Line 210:
 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.\\ 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: 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' indicates the context in which the variable is visible. 'Global Scope' is teh areawhich also contains the superglobal $_GLOBALS[].))** +:!: **//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 [].))
- +
-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 Datenbank. Die 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. +
- +
  
 +Always assume that the files are called from inside a function/class method and of course, global variables are not available!//**\\
 +[[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?]]\\
 +A Page addon requires at least one base table in the database. The table must be according to the pattern: it 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.
 ==== add.php (erforderlich) ==== ==== add.php (erforderlich) ====
  
Line 251: Line 246:
 </file> </file>
  
-==== delete.php (erforderlich) ====+==== delete.php (required) ====
  
 <file php delete.php> <file php delete.php>
Line 292: Line 287:
  
  
-FIXME ... und es geht noch weiter...+FIXME ... and many more things to be added...
en/dev/284/helloworld.1439845277.txt.gz · Last modified: 17.08.2015 21:01 by mrbaseman