System enviroment
PHP2HTML makes use of some external libraries which can be located either locally in a folder on the host server or public on a CDN server: Cloudflare on the Internet.
If location on a CDN server is chosen, it has the disadvantage that the program loses functionality when there is no connection to the Internet.
If local location is selected, it is up to you to copy needed files and provide updates manually.
When you program a page, you must choose which library and location to use.
Locally located libraries are located in the system folder _assets.
Local folders:
<System_folder> System support files (.lib.php .sys.json .init.php)
¦---- _accessories Project support files (.img .ttf)
¦---- _assets "libraries"
¦ ¦---- jquery "jquery" ¹
¦ ¦---- jquery-ui "jquery-UserInterface" ¹
¦ ¦---- tablesorter "Advanced tables" ¹
¦ ¦---- font-awesome "Icons" ¹
¦ ¦---- tinymce "HTML rich text editor" ¹
¦ ¦---- dialog-polyfill "popup dialog"
¦---- <Project_1_folder> (.page.php)
¦ ¦---- <Project_data> (.dat .json .img)
¦---- <Project_2_folder> (.page.php)
¦---- <Project_data> (.dat .json .img)
¹ Every library-folder has a subfolder: latest containing the newest library-files.
Content in a github clone:
Project folders:
[_accessories] (System)
[_assets] (System)
[Data.demo] (Related demo system)
[Proj.demo] (Related demo system)
[world] (Related demo system)
System files:
php2html.lib.php (Core system)
menu.inc.php (System)
translate.inc.php (System)
funcscann.php (System)
_trans.sys.json (System)
Project.notes.txt (System)
LICENSE (System)
filedata.inc.php (file library)
project.init.php (Custom setup)
customLib.inc.php (Custom setup)
customRules.inc.php (Custom setup)
_config.yml (Github file)
index.md (Github file)
README.md (Github file)
About the powerfull externel libraryes:
jquery "jquery" Feature-rich JavaScript library
jquery-ui "jquery-UserInterface" User interface interactions
tablesorter "Advanced tables" Plugin for turning a standard HTML table into a sortable table
font-awesome "Icons" Icon library and toolkit
tinymce "HTML rich text editor" Self hosted advanced WYSIWYG HTML editor
dialog-polyfill "popup dialog" Dialog element for a popup box
Project building:
A project consists of a number of web-pages and a menu system to navigate between these.
Each project-page is calling php2html.lib.php and is activating needed libraries:
As needed, other libraries are called, for example, menu.inc.php, translate.inc.php, filedata.inc.php, etc.
Local project data is also initialized in "project.page".
Global project data is initialized in project.init.php which php2html.lib.php calls initially.
If you have custom functions you can place them in customLib.inc.php which is called from php2html.lib.php at the end.
A 3rd file which can be called from php2html.lib.php is customRules.inc.php. It only concerns special rules for htm_Table().