NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:technik:aufruf-interner-funktionen [2010/05/19 14:50] Knut Heermann (flip-flop) |
deutsch:technik:aufruf-interner-funktionen [2018/06/03 18:08] (current) |
||
|---|---|---|---|
| Line 88: | Line 88: | ||
| sollten/können nicht mehr verwendet werden. Eigene Mootools-Sets sind nun nicht mehr die erste Wahl. Alle Komponenten sind im System vorhanden. | sollten/können nicht mehr verwendet werden. Eigene Mootools-Sets sind nun nicht mehr die erste Wahl. Alle Komponenten sind im System vorhanden. | ||
| - | Wenn zusätzliche Funktionen aus der **Moore Reihe** gebraucht werden, dann können diese so eingebunden werden: | + | Wenn zusätzliche Funktionen aus der **More Reihe** gebraucht werden, dann können diese so eingebunden werden: |
| **Im HTML-Quelltext:** | **Im HTML-Quelltext:** | ||
| - | <code html><!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion --></code> | + | <code html><!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion --></code> \\ |
| + | Siehe auch "Skript in den <head> Bereich": [[deutsch/technik/aufruf-interner-funktionen/skript-in-den-head-bereich#ab_phpwcms_r411]] | ||
| \\ | \\ | ||
| Line 131: | Line 132: | ||
| **initJSPlugin('SimpleTabs');** ruft gleichzeitig auch das richtige JS-Framework auf. | **initJSPlugin('SimpleTabs');** ruft gleichzeitig auch das richtige JS-Framework auf. | ||
| + | |||
| + | Alternativ in einem Template: | ||
| + | <code php> | ||
| + | [PHp]initJSPlugin('SimpleTabs');[/PHP] | ||
| + | </code> | ||
| + | oder | ||
| + | <code php> | ||
| + | <!-- JS: SimpleTabs --> | ||
| + | <!-- JS: http://digitarald.de/project/simple-tabs/1-0/source/SimpleTabs.js --> | ||
| + | </code> | ||
| + | |||
| + | <note important> | ||
| + | Ab Version r410 ist der Aufruf von Scripten die sich auf externen Seiten befinden mit z.B. \\ ##%%<!-- JS: http://XYZ.js -->%%## aus Sicherheitsgründen nicht mehr möglich. \\ | ||
| + | \\ | ||
| + | Alternativ kann diese Methode gewählt werden:\\ ##%%[PHP]$GLOBALS['block']['custom_htmlhead']['XYZ'] = getJavaScriptSourceLink(html_specialchars('http://XYZ.js'));[/PHP] %%## | ||
| + | </note> | ||
| * **Die externen Scripte** werden nun aus dem entsprechenden Pluginverzeichnis gestartet. | * **Die externen Scripte** werden nun aus dem entsprechenden Pluginverzeichnis gestartet. | ||
| - | * Dem ursprünglichen Dateinamen **SimpleTabs.js** wird ein **mootools.** bzw. **jquery.** vorangestellt. -> **mootools.SimpleTabs.js**. | + | * Dem ursprünglichen Dateinamen **SimpleTabs.js** wird ein **mootools.** bzw. **jquery.** vorangestellt. -> **mootools.SimpleTabs.js** //(analog dazu für jquery: **jquery.SimpleTabs.js**)// |
| So kann das System autom. das richtige JS-Framework zuordnen. | So kann das System autom. das richtige JS-Framework zuordnen. | ||
| Line 144: | Line 161: | ||
| \\ | \\ | ||
| + | === Prüfe aktuell eingestellte JS Lib === | ||
| + | Vorlage -> JS Bibliothek: [Variable: PHPWCMS_JSLIB] | ||
| + | |||
| + | <code php> | ||
| + | if(PHPWCMS_JSLIB == 'mootools-1.1') { ...... } | ||
| + | if(PHPWCMS_JSLIB == 'mootools-1.2') { ...... } | ||
| + | if(PHPWCMS_JSLIB == 'jquery-1.3') { ...... } | ||
| + | if(PHPWCMS_JSLIB == 'jquery-1.4') { ...... } | ||
| + | </code> | ||
| + | |||
| + | |||
| + | ~~UP~~ | ||
| ===== Init Lightbox ===== | ===== Init Lightbox ===== | ||
| + | |||
| + | Lightbox aktivieren/initialisieren | ||
| **File:** /include/inc_front/front.func.inc.php | **File:** /include/inc_front/front.func.inc.php | ||
| Line 154: | Line 185: | ||
| **Tag:** -- -> **function:** initializeLightbox() | **Tag:** -- -> **function:** initializeLightbox() | ||
| - | **Initialisierung %%<=%% v1.4.3 r380** der SlimBox /template/inc_js/slimbox/js/slimbox.js und den und Mootools //(siehe oben)//. \\ | + | **Initialisierung %%<=%% v1.4.3 r380** der SlimBox \\ /template/inc_js/slimbox/js/slimbox.js und Mootools //(siehe oben)//. \\ |
| - | **Initialisierung %%>=%% v1.4.4 r381** der SlimBox /template/lib/slimbox/[slimbox.mootools-1.1.js]|[slimbox.mootools-1.2.js]|[slimbox.jquery.js] und den und Mootools //(siehe oben)//. | + | **Initialisierung %%>=%% v1.4.4 r381** der SlimBox \\ /template/lib/slimbox/[slimbox.mootools-1.1.js]|[slimbox.mootools-1.2.js]|[slimbox.jquery.js] und Mootools //(siehe oben)//. |
| **Registriert** mit: | **Registriert** mit: | ||
| Line 175: | Line 206: | ||
| **Aufruf:** | **Aufruf:** | ||
| <code php> | <code php> | ||
| - | Unset ($GLOBALS['block']['custom_htmlhead']['slimbox.js']); | + | // unset Slimbox CCC and JS |
| + | Unset( | ||
| + | $GLOBALS['block']['custom_htmlhead']['lightbox.css'], | ||
| + | $GLOBALS['block']['custom_htmlhead']['slimbox.js'] | ||
| + | ); | ||
| initializeLightbox(); | initializeLightbox(); | ||
| // Alternativ zu initializeLightbox(); | // Alternativ zu initializeLightbox(); | ||
| + | // $GLOBALS['block']['['css']']['lightbox.css'] = ' ../lib/slimbox/slimbox.css'; | ||
| // $GLOBALS['block']['custom_htmlhead']['slimbox.js'] = ' <script type="text/javascript" src="template/slimbox/js/slimbox.js" ></script>'; | // $GLOBALS['block']['custom_htmlhead']['slimbox.js'] = ' <script type="text/javascript" src="template/slimbox/js/slimbox.js" ></script>'; | ||
| </code> | </code> | ||
| - | \\ | + | ~~UP~~ |
| ===== Init SwfObject JS Library ===== | ===== Init SwfObject JS Library ===== | ||
| Line 210: | Line 247: | ||
| </code> | </code> | ||
| - | \\ | + | ~~UP~~ |
| Line 287: | Line 324: | ||
| ) | ) | ||
| </code> | </code> | ||
| - | \\ | ||
| + | ~~UP~~ | ||
| \\ | \\ | ||
| Line 321: | Line 358: | ||
| </code> | </code> | ||
| - | \\ | + | ~~UP~~ |
| ===== Nachträgliches Austauschen einer CSS-Datei, die im Template eingetragen ist ===== | ===== Nachträgliches Austauschen einer CSS-Datei, die im Template eingetragen ist ===== | ||