Differences

This shows you the differences between two versions of the page.

english:technics:internal-function-call:script-into-head-area [2011/03/21 12:35]
Knut Heermann (flip-flop)
english:technics:internal-function-call:script-into-head-area [2018/06/03 18:09] (current)
Line 48: Line 48:
\\ \\
-**Since phpwcms r411:**  
-<code css> 
-   <!--CSS:  
-   #header { 
-      background: #F9E931 url(template/img/mozilla.png) no-repeat left top !important; 
-      background: #F9E931 url(template/img/mozilla.png) no-repeat left top;  
-   } 
-   -->  
-</code> 
- 
- 
-\\ 
**Special case CSS-file at /template/inc_css/*** **Special case CSS-file at /template/inc_css/***
In this case we can use an own array ['block']['css']. It´s home base is /template/inc_css/* . \\ In this case we can use an own array ['block']['css']. It´s home base is /template/inc_css/* . \\
Line 70: Line 58:
\\ \\
-**Since phpwcms r411:** + 
 +==== Since phpwcms r411: ==== 
 + 
 +Forum: [[http://forum.phpwcms.org/viewtopic.php?p=127961#p127961|…and some more too]] 
 + 
 +<note important> 
 +**Notation:** %%<!--%%##%% %%##%%[CSS:|JS:]%%##%% %%##instruction##%% %%##%%-->%%  
 + 
 +The designated spaces##%% %%##  are mandatory!! 
 +</note> 
 + 
 +\\ 
 + 
 +=== CSS: === 
 + 
<code css> <code css>
<!-- CSS: {TEMPLATE}inc_css/my.css --> <!-- CSS: {TEMPLATE}inc_css/my.css -->
 +</code>
 +\\
 +
 +- As Inline CSS: Equal CSS used this way is rendered only once and also always put into the <head> section.
 +
 +<code css>
 +<!-- CSS: body {background:yellow;} -->
 +<!-- CSS:
 +  body {
 +    background:yellow;
 +  }
 +  a {
 +    text-decoration: none;
 +    background: transparent url({TEMPLATE}img/link.png) no-repeat left center;
 +    padding-left: 25px;
 +  }
 +-->
 +</code>
 +
 +\\
 +
 +=== JavaScript: ===
 +
 +
 +<code html>
 +<!-- JS: {TEMPLATE}inc_js/calendarDateInput/calendarDateInputX.js -->
 +<!-- JS: {TEMPLATE}inc_js/MyFolder/MyScript.js -->
 +</code>
 +
 +\\
 +- Integrate plugins (jQuery) e.g. using the files:
 +  * template/lib/jquery/plugin/ui-1.8.custom.min.js
 +  * template/lib/jquery/plugin/jquery.easing.min.js
 +
 +<code html>
 +<!-- JS: ui-1.8.custom.min -->
 +<!-- JS: easing.min -->
 +</code>
 +
 +\\
 +Similarly, for MooTools:
 +
 +Load Plugin or More as described and based on current JavaScript framework/library. It will also render <srcipt src="" /> in head.
 +
 +- Integrate  e.g. MooTools 1.2x with the files in:
 +  * template/lib/mootools/plugin-1.2/mootools.flext.js
 +  * template/lib/mootools/plugin-1.2/mootools.Quickie-yui.js
 +
 +<code html>
 +<!-- JS: flext -->
 +<!-- JS: Quickie-yui -->
 +</code>
 +
 +\\
 +- Loading More Components:
 +
 +<code html>
 +<!-- JS: myplugin -->
 +<!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion -->
 +</code>
 +\\
 +
 +- And the best now is multi line JavaScript put as <script /> in head section.
 +
 +Be aware – every equal JavaScript section like used in looped Content Parts is rendered only once. \\
 +To be detected as JavaScript it will need ##%%;%%##, ##%%//%%## und/oder ##%%/*%%##. \\
 +Just end your JavaScript line by ##%%;%%## is the safest way:
 +
 +<code js>
 +<!-- JS:
 +  // My Custom JS
 +  alert('hey dude it works as expected');
 +-->
</code> </code>
english/technics/internal-function-call/script-into-head-area.1300707327.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0