Smart.Framework :: PHP/Javascript web framework :: Test and Demo Suite @ [ Index ]
Core Test Suite     ::     コアテスト·スイート



TESTING AREA (tests will be loaded here) :: 2019-01-21 13:30:02 +0000 ...

Click to Test Image Gallery Click to Test Image Gallery


Smart.Framework, a PHP / Javascript Web Framework
app::powered.by
OpenBSD Operating System
Apache Web Server
PHP Server-Side Scripting Language
SQLite Embedded Database
HTML Markup Language for World Wide Web
CSS Style Sheet Language for World Wide Web
Javascript Client-Side Scripting Language for World Wide Web
jQuery Javascript Library
[Other]: ([?]) :: Web Browser
Click on the (buttons) links below / Press the Submit buttons to play with interractions ...


Test JS-UI Alert    Test JS-UI Dialog

  


Open Modal (strict)    Open PopUp (strict)

  PopUp + Focus (with a remote URL)

Play with the Form controls below (if the Limited TextArea is not empty a REDIRECTION on Success/Error is reversed !):



[Selecting Date is mandatory. This area will be replaced after sending the form if the below TextArea is not empty. If the below TextArea is empty, the page will refresh after post !]

Calendar Selector:
TimePicker Selector:
AutoComplete Single:
Autocomplete Multi:
SingleSelect DropDown List without Blank:
SingleSelect DropDown List (from Multi):
SingleSelect DropDown List with Search:
MultiSelect DropDown List:

Yes    No
Yes    No
MultiSelect CheckBoxes:
  Label 1
  Label 2
  Label 3

Limited TextArea:
Click to Refresh Image
Confirm you are not a robot

CSS Notifications:

 
This is an Info
This is a Notice
This is a Question
This is a Warning
This is an Error



Markers-TPL, a powerful and secure Templating Engine:

      Markers-TPL Templating Demo
As an alternative to the Markers-TPL Templating Engine syntax (built-in, default) it is possible to use the Twig Templating Engine syntax to render Views of Smart.Framework if making available an extra module from Smart.Framework.Modules: mod-tpl-twig.
Of course it is possible to load other Templating Engines like Typo3-Fluid Templating Engine syntax (which is available in Smart.Framework.Modules: mod-tpl-typo3-fluid).
And as a premium feature you can make use of the very fast Nette-Latte Templating Engine syntax (which is also available in Smart.Framework.Modules: mod-tpl-nette-latte).
Or why not, just create new custom Smart.Framework.Modules to integrate other TPL engines such as Smarty or PHP Plates for use with Smart.Framework as this is a very flexible and extensible framework.
      Nette-Latte Templating Demo (extra modules)
  Twig Templating Demo (extra modules)
  Typo3-Fluid Templating Demo (extra modules)
Markers-TPL Templating Engine is a very fast and 100% secure [*] PHP Templating Engine and is available for both PHP and Javascript [**] languages.
Because the Markers-TPL Templating is rendering the Views by injecting plain strings and data arrays directly into these Views (no re-interpreted PHP/Javascript code) there are NO SECURITY RISKS like injecting malicious code into the Views like in the case of using the Twig Templating for PHP or Smarty Templating for PHP. The original concept of Markers-TPL Templating was inspired by simplistic mark(er)s used in templates by Typo3 CMS. Thereafter, a full new concept was developed from the scratch into Smart.Framework based on this idea as a brand new TPL engine: Markers-TPL.
The Markers-TPL Templating Engine, built into Smart.Framework begins by using markers that have a start [ and stop ] limits and marking variables are enclosed in 4 # # # # (instead of 3 # # # as the original concept). At the very begining the full escaping syntax was developed for these markers to escape: html, js, url, json, ... and more ... was added a support for loading SUB-TEMPLATES files. Later the support for IF / ELSE, LOOP, SPECIAL CHARACTERS and COMMENTS syntax was finalizing this concept.
Currently the TPL Marker Syntax Templating Engine for PHP (and TPL Marker Syntax Templating Engine for Javascript [**]) is a mature project, fully developed and maintained inside the code base of Smart.Framework. It is heavily tested in production on web servers serving million+ page views / day.
  Markers-TPL Syntax Explanation
1. MARKERS
* with optional escapings or transformers
[####MARKER####] with optional escapings or transformers that may be combined in logic chains: [####MARKER|bool####], [####MARKER|int####], [####MARKER|dec{1..4}####], [####MARKER|num####], [####MARKER|htmid####], [####MARKER|jsvar####], [####MARKER|json####], [####MARKER|lower####], [####MARKER|upper####], [####MARKER|ucfirst####], [####MARKER|ucwords####], [####MARKER|trim####], [####MARKER|substr{1..65535}####], [####MARKER|subtxt{5..65535}####], [####MARKER|url####], [####MARKER|js####], [####MARKER|html####], [####MARKER|nl2br####], [####MARKER|url|js####], [####MARKER|html|nl2br####], [####MARKER|trim|js|html####], [####MARKER|dec2|url####], [####MARKER|js|html####], [####MARKER|css|html####], ..., [####MARKER|url|js|html####], ...)
2. SPECIAL CHARACTERS and COMMENTS
* special characters can be used in templates to assure consistency
* commented code in a template will not be rendered at all
[%%%%|SPACE%%%%] ensures a SPACE ⎵
[%%%%|T%%%%] ensures a TAB \t
[%%%%|N%%%%] ensures a LINE FEED \n
[%%%%|R%%%%] ensures a CARRIAGE RETURN \r
[%%%%|R%%%%][%%%%|N%%%%] ensures a CRLF (CARRIAGE RETURN + LINE FEED) \r\n
[%%%%COMMENT%%%%] This text will never be displayed and will be cut off when rendering this template [%%%%/COMMENT%%%%]
3. IF / ELSE [**]
* conditionals are available with optional ELSE syntax
[%%%%IF:VARIABLE:==|!=|<|>|<=|>=|%|!%|@=|@!|@+|@-|^~|^*|~~|~*|$~|$*|{string|number|####MARKER####};%%%%]
conditional IF part, display when condition is matched
[%%%%ELSE:VARIABLE%%%%]
conditional ELSE part, display otherwise
[%%%%/IF:VARIABLE%%%%]
4. LOOP [**]
* expect associative array: (by key/val) or non-associative (by iterator)
[%%%%LOOP:ARRAY-VAR%%%%]
Rendering of Loop syntax is depending upon the array type ; it can be combined with IF / ELSE and the other syntax elements ...
* if ARRAY-VAR is a NON-ASSOCIATIVE ARRAY [0=>[row]..n=>[row]] can display for each row the columns 'column-A', 'column-N' which are as ARRAY-VAR[i][column-a] and ARRAY-VAR[i][column-n] where 'i' is the row number for non-associative array and 'row' is an associative array of key/val pairs which must contain at least the keys (columns) 'column-a' and 'column-n' such as: [####ARRAY-VAR.COLUMN-A|int####], [####ARRAY-VAR.COLUMN-B|html####]
* if ARRAY-VAR is an ASSOCIATIVE ARRAY [key1=>val1,...,keyN=>valueN] can display for each key/value pair: [####ARRAY-VAR._-KEY-_|html####] = [####ARRAY-VAR._-VAL-_|trim|html####]
[%%%%/LOOP:ARRAY%%%%]
5. INCLUDE Sub-Template [**]
* can include subtemplates mandatory or optional, includding make use of variable path
[@@@@SUB-TEMPLATE:the-main-tpl-relative-path/partials/the-partial-tpl-to-be-includded.inc.htm@@@@] mandatory include a partial from the same directory under the sub-directory 'partials'
[@@@@SUB-TEMPLATE:!web-dir/relative/tpl-path/the-partial-tpl-to-be-includded.inc.htm!@@@@] mandatory include a partial from another directory, from inside the app web root
[@@@@SUB-TEMPLATE:?!web-dir/relative/tpl-alternate-path/the-partial-tpl-to-be-includded-if-exists-only.inc.htm!@@@@] optional include a partial from another alternate directory, from inside the app web root
[@@@@SUB-TEMPLATE:%variable-relative-path-of-sub-tpl-to-include%@@@@]
mandatory include a variable path partial which is set at the controller level in the section: '%variable-relative-path-of-sub-tpl-to-include%'
[**]: Feature is currently supported only when rendering a Markers-TPL Template from server-side PHP (not also if rendering it directly from client-side Javascript)

TPL Render Test: Markers-TPL Templating - Basic Syntax
Column 1.x (HTML Escape) Column 2.x (JS Escape) Column 3.x (URL Escape)
<Column 1.1> Column 1.2\n Column%201.3%09
<Column 2.1> Column 2.2\n Column%202.3%09
<Column 3.1> Column 3.2\n Column%203.3%09
1 [ >= 1 ; C2 = a ] a A
1 * 0.123456789 (Numeric Escape)
Smart.Framework TestUnit: Demo and Samples, License: BSD