NAVIGATION
This shows you the differences between two versions of the page.
deutsch:technik:module [2010/08/29 09:27] Knut Heermann (flip-flop) |
deutsch:technik:module [2018/06/03 18:08] (current) |
||
---|---|---|---|
Line 6: | Line 6: | ||
===== Implementieren von FE Anwender-CSS/JS in ein Module ===== | ===== Implementieren von FE Anwender-CSS/JS in ein Module ===== | ||
- | Um in der Frontenausgabe CSS oder JS Dateien (Im Headbereich) in das Modul zu bringen kannst du folgendes Schnipsen zum deinem Code hinzufügen. | + | Um in der Frontendausgabe CSS oder JS Dateien (Im Headbereich) in das Modul zu bringen kannst du folgendes Schnipsen zum deinem Code hinzufügen. |
\\ | \\ | ||
---- | ---- | ||
Line 12: | Line 12: | ||
**Forum:** [[http://forum.phpwcms.org/viewtopic.php?p=113969#p113969|How to include custom CSS in module]] | **Forum:** [[http://forum.phpwcms.org/viewtopic.php?p=113969#p113969|How to include custom CSS in module]] | ||
- | **Autor:** breitsch http://web.casa-loca.com/ \\ | + | **Autor:** breitsch \\ |
**CMS-Version:** >= V1.3.0 \\ | **CMS-Version:** >= V1.3.0 \\ | ||
**Version:** -- //(2009/02/21)// \\ | **Version:** -- //(2009/02/21)// \\ | ||
Line 46: | Line 46: | ||
$BE['HEADER'][] = getJavaScriptSourceLink('include/inc_js/optionselect.js'); | $BE['HEADER'][] = getJavaScriptSourceLink('include/inc_js/optionselect.js'); | ||
</code> | </code> | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ===== Klassischer Aufbau eines Moduls ===== | ||
+ | |||
+ | FIXME | ||
+ | |||
+ | Festlegen vom Parametern für die Moduleinbindung in "include/inc_module/mod_xxxx/**module.default.php**": | ||
+ | <code php> | ||
+ | // Module/Plug-in Glossary | ||
+ | |||
+ | // register module name | ||
+ | //DO NOT USE SPECIAL CHARS HERE, NO WHITE SPACES, USE LOWER CASE!!! | ||
+ | $_module_name = 'glossary'; | ||
+ | |||
+ | // module type - defines where used | ||
+ | // 0 = BE and FE, 1 = BE only, 2 = FE only | ||
+ | $_module_type = 0; | ||
+ | |||
+ | // Set if it should be listed as content part | ||
+ | // has content part: true or false | ||
+ | $_module_contentpart = true; | ||
+ | |||
+ | // simple switch to allow fe render or fe init | ||
+ | $_module_fe_render = true; | ||
+ | $_module_fe_init = false; | ||
+ | $_module_fe_search = true; | ||
+ | </code> | ||
+ | \\ | ||
+ | |||
+ | In der Datei include/inc_lib/default.php werden die folgenden drei Variablen initialisiert: | ||
+ | <code php> | ||
+ | $phpwcms['modules'] = array(); | ||
+ | $phpwcms['modules_fe_render'] = array(); | ||
+ | $phpwcms['modules_fe_init'] = array(); | ||
+ | </code> | ||
+ | \\ | ||
+ | |||
+ | In der Datei "include/inc_lib/modules.check.inc.php" werden alle Module in das Array **$phpwcms['modules'][] ** aufgenommen. | ||
+ | |||
+ | Durch die Angaben in der Datei **module.default.php** wird entschieden ob Script in frontend_init/render ausgeführt werden sollen bzw. die Arrays | ||
+ | * $phpwcms['modules_fe_init'][] | ||
+ | * $phpwcms['modules_fe_render'][] | ||
+ | werden mit den jeweiligen Links zu den Dateien gefüllt. | ||
+ | |||
+ | \\ | ||
+ | |||
+ | In der Datei "include/inc_front/content.article.inc.php" werden die Moduldateien "include/inc_module/inc/cnt.article.php" aus dem Array **$phpwcms['modules'][]** includiert. | ||
+ | |||
+ | In der Datei "include/inc_front/content.func.inc.php" werden alle frontend_init/render Scripte aus den Arrays **$phpwcms['modules_fe_init'][]** und **$phpwcms['modules_fe_render'][]** includiert. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |