KWeb
6.4
|
KScript is a simple string replacement engine, designed to be used in document bodies. More...
Data Structures | |
class | KScript |
"Język" skryptowy do wykorzystywania w niektórych polach tekstowych, np. More... | |
class | KWebScript |
KScript is a simple string replacement engine, designed to be used in document bodies.
To use it, one should put script elements in a text, and use KScript::parse() function on it.
For more information about the KScript class and it's functions, check the reference.
{{ command | parameter 0 | parameter 1 | name=value | paramater 3 | #filter }}
{{upper | text }}
Converts text to uppercase
Zwraca parametr konfiguracji
Dla konfiguracji głównej {{setting | nazwa | default = }}
Dla konfiguracji bazo danowej {{setting | nazwa | db = nazwa | default = }}
Zwraca zmienną globalną (KVar::$inst->get)
{{var | nazwa }}
Zwraca zmienną przekazaną do skryptu
{{svar | nazwa }}
Drukuje zawartość wybranego obiektu
{{inset | item = id | genre = rodzaj (item) | view = widok (view/inset) }} {{inset | item = id | genre = rodzaj (item) | inc = include }}
{{inset | inc = include }}
Zwraca ścieżkę do zasobu
{{url | item = id | genre = rodzaj (item) | view = widok | lang = język}} {{url | inc = strona | lang = język}}
Drukuje opis obiektu
{{info | item = id | genre = rodzaj (item) | lang = język}}
Zwraca tekst lokalizacji (strings)
{{string | baza | nazwa | lang = język}}
Z parsowaniem KScript: {{string | baza | nazwa | lang = język | script = 1}}
Returns object's data
{{objectData | [attr =] attribute name [| lang = language | svar = scrip var with object]}}
Returns formatted time
{{strftime | format}}
Zawiadywanie boxami
{{tmplBox | clear | box = left/right }} {{tmplBox | remove | box = left/right | id = | name = }} {{tmplBox | add | box = left/right }}
Dodaje meta tagi w nagłówku
{{tmplMeta | js = sciezka_do_js}} {{tmplMeta | css = sciezka_do_css | alternate = }} {{tmplMeta | rss = sciezka_do_rss | title = nazwa}} {{tmplMeta | url = dowolny_meta_url | dodatkowe parametry}}
Generuje ścieżki do plików
{{tmplPath | img = obrazek }} {{tmplPath | js = js }} {{tmplPath | css = css }} {{tmplPath | ico = obrazek | size = 16 / 24 / 32 / 48 }}
Equivalent to calling KWebTemplate::addCSSClass()
{{TmplCSS | class = class }}
{{ ... | #url }}
Encodes result for safe inclusion in URLs
{{ ... | #html }}
Encodes result for safe inclusion in HTML
{{ ... | #slash }}
Encodes result for inclusion in JavaScript