File: ./Proj.demo/documentation.page.php - ver:1.6.0
Open source - π˜“π˜π˜Šπ˜Œπ˜•π˜šπ˜Œ & 𝘊𝘰𝘱𝘺𝘳π˜ͺ𝘨𝘩𝘡 Β© 2019-2026 EV-soft *** See the file: LICENSECTRL-Scroll UP/Down mousewheel to zoom window content.
Skip to the contentGo to the view tools

documentation.page.php



Test site and documentation for Clever html engine β€’ Errors may occur and future news may be shown β€’ ver.1.9.2


MOVE: Drag to place this card elsewhere among the cards. Alt + arrow up/down: one place. The order is remembered in this browser.What is new in version 1.6 TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card width COLLAPSE: Click to close all cards EXPAND: Click to open all cards
For the user of a page:
  • Keyboard: card headers and their icons, state buttons, the tab close cross and the table index are reached with Tab and used with Enter / Space. Hints are also shown when a field or button gets keyboard focus. The left menu opens when it gets focus.
  • Shortcuts: buttons with akey: work as Alt+key (Firefox: Alt+Shift+key) - the hint shows the key.
  • Phones: cards are never wider than the screen, the vertical edge texts are hidden, the left menu is placed above the content.
  • Dark theme: readable card titles, side texts, PDF pager, human test and pasted colored text.
  • Language: choose the language with the flag button in the floating view bar (the languages that have translations).
  • Card size: drag the grip in the lower right corner of a card to change its width and height (arrow keys work too). The size is remembered per card in the browser; double-click the grip (or Home) for the original size. A program can turn the grips off with $gbl_CardResize= false;
  • Move cards: drag the handle in a card header to place the card elsewhere among its sibling cards (Alt+↑/↓ moves one place). The order is remembered per page in the browser; the card menu (right-click a header) has Original card order. The program decides how moving is activated: $gbl_CardMove= 'icon' (default), 'header' (drag the header itself - a click still folds), 'toggle' (the view bar button Arrange cards turns it on) or false. A single card stays in place with htm_Card_(move:false). Try the modes on the Card page.
  • Quick actions: a page can have a bar with shortcuts at the bottom of the window (see the Advanced example page). On phones only the icons are shown.
  • Session: while you work, the session is kept alive. After a long pause you are asked 2 minutes before it ends, and if it has ended you are told to reload before you save - no more lost form data.
  • Print: every page prints only the content - no menus, bars or buttons, folded cards printed open.
  • Home screen: the demo can be installed as an app (manifest.json, icon).
  • My notes: the note button in the view bar opens a personal notepad. The notes are saved automatically in this browser - the same notes on every page; nothing is sent to the server. A dot on the button shows that there are notes. Download saves them as a text file.
  • Help: the ? button in the view bar opens the help text of the page in a movable window (grey when the page has none). The texts are in help_system.json (English) and help_system_da.json (Danish) - one entry per page.
  • Column view: the column button in the view bar lets the cards flow in columns (like a newspaper) - the number of columns follows the window width. The choice is remembered in the browser.
For the programmer:
  • msg_Dialog() is deprecated: it now shows the theme-aware dialog of sysAlert() / sysConfirm() (button 1 = OK, button 2 = Cancel, the message as text) - jQuery UI is not used by the library any more. Use sysAlert() / sysConfirm(), msg_Error() ... or htm_Alert() in new code. Tablesorter is loaded by the first htm_Table() of a page; $gbl_LazyLibs= false; loads Tablesorter and jQuery UI in <head> as before.
  • 1.6.1 - 1.6.3: faster pages (the CSS/JS of <head> in cached files in _cache/, Tablesorter loaded by the first table, no jQuery UI, one shared card menu), newer libraries (TinyMCE 8.9.3, pdf.js 6), all library texts in Danish, German, French and Swedish, HTML5-valid output, a real card footer (htm_Card_end(foot:, subm:)). Settings: $gbl_AssetCache, $gbl_LazyLibs.
  • 1.6.4: reference pages for htm_Table() (table.page.php) and htm_Card_() (card.page.php) with live examples and the parameters read from the library; calc with your own formula, rtrn in every function, uniform parameter names (the old ones still work), folded code examples (htm_CodeBox(fold:)), better keyboard and screen reader support, and about 100 bug fixes.
  • 1.6.5: the new function htm_faq() (a question with a folded answer), the complete list of parameter names in the function overview, no clear-text password from calcHash(), escaped texts in popup menus, option lists and messages, better keyboard and screen reader support, and about 50 bug fixes.
  • 1.7.0 - one parameter order: texts first (capt/labl, icon, hint, plho), then variant, name, value and content, then form/acti, then size and look (wdth ... styl, attr), then the function's own parameters, and rtrn last. 34 functions got the new order; a function without a heading text keeps its main content first. Upgrading: named arguments (labl:'...') work as before. Positional calls: run php tools/named_args.php <folder> --write on your code before you replace the library - it rewrites them to named arguments (a copy is saved as *.bak).
  • 1.9.2: ten fixes: sys_toFloat() reads "kr. 99" right, sys_login() always waits after wrong passwords (also without its file), htm_Chart() leaves out NAN / INF, htm_NotePad() keeps the notes per program, htm_Table() 0d shows an empty value blank, and htm_Input(): units up to 15 characters, radio / select / checkbox values with & or ' and as strings, attr: on each checkbox.
  • 1.9.1: the Caps Lock warning of password fields is shown only while Caps Lock is on.
  • 1.9.0: log in (htm_Login(), sys_login() with a growing wait after wrong tries, back to the page after the login), charts as plain SVG (htm_Chart()), a message after a POST in one call (sys_redirect()), several buttons in one form (htm_AcceptButt(valu:)), p2hPost() for JavaScript, a Caps Lock warning; the library no longer overwrites the page's $DocVer; tools/check_pages.php; fixed: the strength meter and the eye button of password fields on pages without jQuery.
  • 1.8.1: the libraries (jQuery, Tablesorter, Font Awesome ...) are loaded automatically - only what the page uses; the path to the library ($gbl_ProgRoot) is found from the files, so a page needs only the require; php2html.api.md - an API reference for people and AI assistants, made by tools/make_api_md.php.
  • 1.8.0 - in the program itself: the activity log (p2h_audit.inc.php: p2h_audit(), htm_AuditLog()) and the translations (p2h_trans.inc.php: htm_TransEditor() - only the changed texts saved, suggestions, "Copy for AI"), flags of 51 languages (all of Europe) and $gbl_Flags, htm_QuickBar() with form buttons, a new look of the context menus, the button colours in every theme, and hints at their own element.
  • 1.7.7: numbers typed by people (sys_toFloat()): "1,234.50", "1.500.000" and "1.234,50-" are read right; the value of a hidden table column is also an attribute of its row (<tr data-id="17">), and without Tablesorter the headers no longer stand over the wrong columns.
  • 1.7.6: install with Composer (composer require ev-soft/clever-html-engine), a new README with a 30-second example, CHANGELOG.md, and no false "jQuery is not loaded" error on pages that do not use jQuery.
  • 1.7.5: library hints instead of browser tooltips (tabs, view bar, notes, help), the logged in user and log out in the view bar, $gbl_PageHelp= false, a click on the empty part of a card header folds the card, $gbl_SessionKeep= true keeps the session alive while the page is open.
  • 1.7.4: the hint of a card header icon is shown just below its own icon (it was placed from the card's corner, far away), and the "Go up" button of a file table gives no PHP notice.
  • 1.7.3: the grips for changing a table column width are on the column lines (they were beside them in a centered card and with zoom).
  • 1.7.2: htm_TextArea(), htm_ActionButt(), htm_MultistateButt() and htm_ModalDialog() echo by default, as all other functions (they returned the HTML). Where you use their result, add rtrn:true - tools/named_args.php does it.
  • 1.7.1: number columns sorted as numbers (and filtered with e.g. >9), 0 shown as 0,00, the CSV export writes the data as shown, fields without a label named by their hint, escaped radio values, tools/named_args.php --from=1.6.3, and about 20 other fixes.
  • Table rows: a suffix column of type rowact gives row actions in the browser - ['@Del.', '2%', 'rowact', '', ['center'], '@Hint', 'del'] (values: del copy up down move undo). Delete asks first, a copy is inserted below the row as a new record, Undo takes back the last change. The rows are posted with the form in their new order (see the content table on Advanced example).
  • Customize without editing the library: put the settings of a project in its own file, outside the library folder, and point to it in the page before the library is loaded: $gbl_InitFile= __DIR__.'/../myproject.init.php'; (else project.init.php next to the library is used). An update of the library then never overwrites the project. In that file: all $gbl_... settings, $gbl_CustomCss (CSS text or the address of a .css file - added after the system CSS), $gbl_CustomLib (own functions), $gbl_CustomRules (table row rules), define('DecimalSep', ...) / ThousandsSep / DEBUG, and $headEndScript, $bodyEndScript, $gbl_novice.
  • htm_Card_(elem:'section') - the HTML element of a card: span (default), section, article, aside, main, header, footer, div. A semantic card gets its caption as accessible name. htm_Page_() now puts the page content in <main>.
  • htm_Tab(dflt:true) - the tab is opened when the page has loaded.
  • $englishOnly= true; (in the page before require, or in project.init.php) turns the translation system off - English texts only, no language selector. Before, the library always set it to false.
  • From NH-logistik: session warning ($gbl_SessionWarn= false; turns it off; keep-alive request ?p2h_keepalive=1), print CSS for all pages, and manifest.json + favicon.svg next to the library (linked by htm_Page_() when they exist).
  • From TinyCash: htm_NotePad() (personal notes in the view bar; $gbl_NotePad= false; removes it), htm_PageHelp() (help per page, help_system.json) and htm_QuickBar(list:[[link, label, icon, hint, dot color, JavaScript], ...]) - the page gets room at the bottom, and the fixed elements of the library near the bottom are lifted above the bar.
  • From NH-logistik: htm_Alert() (message box), htm_Banner(), htm_Badge() (small label), htm_ConfirmPostLink() (asks first, then POSTs with the CSRF token) and htm_TableTools() (search and sort without jQuery) - see the Others page.
  • htm_LangSelect() - language selector with flags (p2h_flag(): inline SVG), part of htm_ViewBar(). A language is only remembered from a POST with a valid CSRF token.
  • Danish numbers like 1 234,50 keep their decimals in htm_Input (dec/num) and htm_Table (0d/1d/2d, calc) - see sys_toFloat().
  • htm_Input(form:'...') posts with method POST and the CSRF token. The mail variant has a valid pattern.
  • htm_Table columns chck save per row; bold/ital are read-only. Data values are no longer translated.
  • PDF viewer: a local copy of pdf.js in _assets/pdfview/latest/ ($needPdfview='1'), and a message if the PDF cannot be loaded.
  • project.init.php, customLib.inc.php, customRules.inc.php are read from the folder of php2html.lib.php (before: the folder above the page).
  • Card help (help:) - see the ? icon, e.g. on the Demo page.
Drag to resize the card (or use the arrow keys). Double-click or Home: original sizeColumn view: the column decides the width of the card - only the height can be dragged (down to less than the content). Turn the column view off to change the width.
MOVE: Drag to place this card elsewhere among the cards. Alt + arrow up/down: one place. The order is remembered in this browser.Documentation: TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card width COLLAPSE: Click to close all cards EXPAND: Click to open all cards
You can find informations about using the PHP2HTML-system here:

Overviews:
htm_Functions - Look at this page:
  • FUNCTIONS > Overview > Card: The overview over the system functions.
  • FUNCTIONS > Overview > Card: Parameter-names: Notes about function parameters

  • Folder/Files - Look at this page:
  • FILES > Folders and files > Card: Libraryes and files
  • Miscellaneous - Study all pages in this demo


  • Details:
    Study notes and code in the file: php2html.lib.php
    .
    Drag to resize the card (or use the arrow keys). Double-click or Home: original sizeColumn view: the column decides the width of the card - only the height can be dragged (down to less than the content). Turn the column view off to change the width.
    MOVE: Drag to place this card elsewhere among the cards. Alt + arrow up/down: one place. The order is remembered in this browser.User manual: TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card width COLLAPSE: Click to close all cards EXPAND: Click to open all cards
    Help to the program user:

    Following is shown instruktions to handle some complex objects
    Drag to resize the card (or use the arrow keys). Double-click or Home: original sizeColumn view: the column decides the width of the card - only the height can be dragged (down to less than the content). Turn the column view off to change the width.
    MOVE: Drag to place this card elsewhere among the cards. Alt + arrow up/down: one place. The order is remembered in this browser.Github source: TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card width COLLAPSE: Click to close all cards EXPAND: Click to open all cards
    You can find source files on Github here:
    https://github.com/EV-soft/Clever-Html-Engine
    and a introduktion here:
    https://ev-soft.github.io/Clever-Html-Engine/
    Drag to resize the card (or use the arrow keys). Double-click or Home: original sizeColumn view: the column decides the width of the card - only the height can be dragged (down to less than the content). Turn the column view off to change the width.