Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision | ||
dev:284:helloworld [12.01.2015 08:54] – [install-struct.sql] Manuela v.d.Decken | dev:284:helloworld [07.04.2016 09:12] – [info.php (bis ca. zum 01.07.2015 noch erforderlich)] Manuela v.d.Decken | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Hello World - Projekt ====== | + | ====== Hello Classic |
FIXME | FIXME | ||
.. das klassische Beispiel Addon. Auch hier wird sich sehr vieles ändern. Grundsätzlich gilt jedoch, dass das bisherige, alte System zumindest für die 2.8.4 noch vollständig kompatibel ist. Aus diesem Grund hier auch zuerst die Beschreibung eines Addons nach der herkömmlichen Methode, jedoch bereits mit neuen Techniken und leider auch noch vielen ' | .. das klassische Beispiel Addon. Auch hier wird sich sehr vieles ändern. Grundsätzlich gilt jedoch, dass das bisherige, alte System zumindest für die 2.8.4 noch vollständig kompatibel ist. Aus diesem Grund hier auch zuerst die Beschreibung eines Addons nach der herkömmlichen Methode, jedoch bereits mit neuen Techniken und leider auch noch vielen ' | ||
Zeile 19: | Zeile 19: | ||
FIXME //(weitere Bedingungen für diese Files)// | FIXME //(weitere Bedingungen für diese Files)// | ||
- | ==== info.php (bis zum 01.06.2015 noch erforderlich) ==== | + | ==== info.php (deprecated) ==== |
- | 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 // | + | 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 // |
<code php info.php> | <code php info.php> | ||
Zeile 28: | Zeile 28: | ||
* This file ' | * This file ' | ||
* From 2.8.4 new core methods will no longer use the old vars from info.php! | * From 2.8.4 new core methods will no longer use the old vars from info.php! | ||
- | * It will be removed at least at 1th of June 2015 !!!! | + | * It will be removed at least at 1th of July 2015 !!!! |
*/ | */ | ||
if (!defined(' | if (!defined(' | ||
Zeile 87: | Zeile 87: | ||
; minimum needed PHP version | ; minimum needed PHP version | ||
minPhp | minPhp | ||
+ | ; maximum allowed PHP version in case of code restrictions. | ||
+ | ; set to empty string or ' | ||
+ | maxPhp | ||
</ | </ | ||
Zeile 126: | Zeile 129: | ||
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_helloworld_settings`; | DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_helloworld_settings`; | ||
CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_helloworld_settings` ( | CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_helloworld_settings` ( | ||
- | `section_id` int(11) NOT NULL DEFAULT ' | + | `instance` int(11) NOT NULL DEFAULT ' |
- | `key` varchar(64){FIELD_COLLATION} NOT NULL DEFAULT '', | + | `name` varchar(64){FIELD_COLLATION} NOT NULL DEFAULT '', |
`value` text{FIELD_COLLATION} | `value` text{FIELD_COLLATION} | ||
PRIMARY KEY (`section_id`, | PRIMARY KEY (`section_id`, | ||
Zeile 239: | Zeile 242: | ||
// --- import needed global vars ----------------------------- | // --- import needed global vars ----------------------------- | ||
| | ||
- | /* | + | // here you can set/get basical |
- | // here you can create a record of settings for this instance | + | $oAddonReg = new AddonRegistry($oReg, |
+ | $oAddonReg-> | ||
- | $sql = ' | ||
- | . 'SET (`section_id`, | ||
- | . ' | ||
- | . ' | ||
- | . ' | ||
- | if (! $oReg-> | ||
- | // use string var $sErrorMessage for returning of error messages! | ||
- | $sErrorMessage = $oReg-> | ||
- | } | ||
- | */ | ||
// --- end of file ------------------------------------------- | // --- end of file ------------------------------------------- | ||
</ | </ | ||
Zeile 271: | Zeile 265: | ||
* @lastmodified $Date: 2014-11-30 00:00:00 +0100 (So, 30 Nov 2014) $ | * @lastmodified $Date: 2014-11-30 00:00:00 +0100 (So, 30 Nov 2014) $ | ||
* @since | * @since | ||
- | * @description | + | * @description |
*/ | */ | ||
if (! defined(' | if (! defined(' | ||
Zeile 285: | Zeile 279: | ||
| | ||
* **********************************************************/ | * **********************************************************/ | ||
- | // --- finaly remove record from table `mod_helloworld` ------ | + | // --- finaly remove record from table `mod_helloworld_settings` ------ |
- | $sql = ' | + | $sql = ' |
- | . 'WHERE `section_id`=' | + | . 'WHERE `instance`=' |
if (! $oReg-> | if (! $oReg-> | ||
// use string var $sErrorMessage for returning of error messages! | // use string var $sErrorMessage for returning of error messages! |