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



TESTING AREA (tests will be loaded here) :: 2021-10-22 03:37:47 +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
DBA/GDBM Embedded DataStore (@autoselect)
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 on sending the form if the below TextArea is not empty. Else, 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 (Sync):
  Label 1
  Label 2
  Label 3

Limited TextArea:
I am not a robot !
  
Confirm you are not a Robot
Tick (check) the nearest checkbox after the timer to confirm you are not a robot.
 
 

CSS Notifications:

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



Marker-TPL, a powerful and secure Templating Engine:

      Marker-TPL Templating Demo
As an alternative to the Marker-TPL Templating Engine syntax (built-in, default) it is possible to use alternatives: Dust Templating Engine (by LinkedIn) syntax to render Views of Smart.Framework by using the Smart.Framework.Module: mod-tpl-dust or is possible to use Twig Templating Engine syntax to render Views of Smart.Framework by using the Smart.Framework.Module: mod-tpl-twig.
And as a premium feature you can use the flavoured XML DOM parser based Typo3-Fluid Templating Engine syntax (which is available in Smart.Framework.Modules: mod-tpl-typo3-fluid).
If you are not satisfied with any of these you can create new custom Smart.Framework.Modules to integrate other TPL engines such as Smarty or PHP Plates for use with Smart.Framework.
      Dust Templating Demo (extra modules)
  Twig Templating Demo (extra modules)
  Typo3-Fluid Templating Demo (extra modules)

Marker-TPL Templating Engine is a very fast and 100% secure [*] PHP Templating Engine and is available for both PHP and Javascript [**] languages.
Because the Marker-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 Marker-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: Marker-TPL.
The Marker-TPL Templating Engine, built into Smart.Framework begins by using markers that have a start [ and stop ] limits and marking variables are enclosed in 3 # # #. 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.


  Marker-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|slug|lower###], [###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
[%%%|SB-L%%%] ensures a LEFT SQUARE BRACKET [
[%%%|SB-R%%%] ensures a RIGHT SQUARE BRACKET ]
[%%%|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/a|list|with|elements/###MARKER###};%%%]
conditional IF part, display when condition is matched
[%%%ELSE:VARIABLE%%%]
conditional ELSE part, display otherwise (optional)
[%%%/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-VAR%%%]
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 Marker-TPL Template from server-side PHP (not also if rendering it directly from client-side Javascript)

TPL Render Test: Marker-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
Unique Entropy Test Values:
UUID10N:7018531705
UUID10R:F1P8N9U5Z5
UUID10S:0L2AMCTGLI
UUID12S:0L2AMCTGL601
UUID13S:00wB0gaNDp5qj
UUID15S:00wB0gaNDp5yl01
UUID32:0L2AMCTGMT-2428052699-5E3F9B9R7N
UUID34:0L2AMCTGMY01-6409339108-6R2T6B8W0N
UUID35:00wB0gaNDp5WH-3268159529-9X3H8T1U7P
UUID37:00wB0gaNDp6aR01-8219466914-3H5G9A4Z7I
UUID36:4f7a52bf-836b-a7b5-a2dc-2303bf268886
UUID45:b0b50896-6713-25e5-9a9f-b6f863e4b322-8734c522