WIKINDX API trunk

wikindx

Table of Contents

Packages

core

Classes

API
API hooks
IDEASCOMMON
IDEASCOMMON class
EXPORTCOMMON
EXPORT COMMON class
APP
APP class
CONTENT_TYPES
CONTENT_TYPES class
CORE
CORE class
DOCUMENT
DOCUMENT class
DOCUMENT_XML_RELS
DOCUMENT_XML_RELS class
ENDNOTES
ENDNOTES class
FONT_TABLE
FONT_TABLE class
FOOTER1
FOOTER1 class
FOOTER2
FOOTER2 class
FOOTNOTES
FOOTNOTES class
HEADER1
HEADER1 class
HEADER2
HEADER2 class
NUMBERING
NUMBERING class
RELS
RELS class
SETTINGS
SETTINGS class
STYLES
STYLES class
THEME1
THEME1 class
WEB_SETTINGS
WEB_SETTINGS class
FileManager
FileManager
FileServer
FileServer
Location
Location
EncodeExplorer
EncodeExplorer
HIGHLIGHT
HIGHLIGHT class.
PASSWORD
PASSWORD class.
WkxDbSessionHandler
Custom session handler used when the session is stored inside db

Constants

ABBREVIATION  : mixed = 'W1K1NDXABBREVIATION' . DELIM
BIB  : mixed = 'left width20percent'
BLOCKINDENT  : mixed = 720
BLOCKQUOTEINDENT  : mixed = '40px'
BORDER_STYLES  : mixed = [ // We only use those available in tinyMCE. I'...
BORDER_THICKNESS_MAX  : mixed = 96
BORDER_THICKNESS_MIN  : mixed = 2
BORDERCEILING  : mixed = 75
BQEND  : mixed = DELIM . 'W1K1NDXENDBQ'
BQFACTOR  : mixed = 2
BQSTART  : mixed = 'W1K1NDXSTARTBQ' . DELIM
BR  : mixed = "<br>"
CONSTANTS
CB  : mixed = 'left center width10percent'
CELL_DEFAULTS  : mixed = [ 'BorderStyle' => 's', // Solid 'BorderWidth'...
CELL_EMPTY  : mixed = '\intbl' . LF . '{}' . LF . '\cell\pard' . LF . LF
CELL_STUB  : mixed = [ 'Border' => 'clbrdr', // Begin cell border de...
CELL_USETABLEBORDER  : mixed = 'brdrtbl'
CELL_VALIGN  : mixed = ['top' => 'top', 'middle' => 'center', 'bottom'...
CELL_VALIGN  : mixed = ['top' => 't', 'middle' => 'c', 'bottom' => 'b']
CELL_VERTICALMERGE  : mixed = ['start' => 'clvmgf', 'continue' => 'clvmrg']
CELLBORDER_STYLES  : mixed = [ // We only use those available in tinyMCE. I'...
CELLPADDING  : mixed = 'clpad'
CELLPADDING_DEFAULT  : mixed = 55
CELLPADDING_UNIT  : mixed = 'clpadf'
CELLWIDTH_DEFAULT  : mixed = 300
CHARWIDTH  : mixed = 18
CITATION  : mixed = 'W1K1NDXCITATION' . DELIM
COLOUR_NAMES  : mixed = ["aliceblue" => "F0F8FF", "antiquewhite" => "FA...
COLOUR_NAMES  : mixed = ["aliceblue" => "F0F8FF", "antiquewhite" => "FA...
COLOURS  : mixed = [ '\red0\green0\blue0', // Black (text by defau...
CONSECUTIVE  : mixed = 'W1K1NDXCONSECUTIVE' . DELIM
CR  : mixed = "\r"
CREATORS  : mixed = 'W1K1NDXCREATORS' . DELIM
CRLF  : mixed = "\r\n"
CV1  : mixed = 'left width30percent'
CV2  : mixed = 'left width30percent'
DEFAULT_BACKGROUND_COLOUR  : mixed = 'auto'
DEFAULT_BORDER_COLOUR  : mixed = 'auto'
DEFAULT_BORDER_STYLE  : mixed = 'nil'
DEFAULT_BORDER_THICKNESS  : mixed = 2
Border thickness: "Specifies the width of the border. Table borders are line borders (see the val attribute below), and so the width is specified in eighths of a point, with a minimum value of two (1/4 of a point) and a maximum value of 96 (twelve points)." From: http://officeopenxml.com/WPtableCellProperties-Borders.php
DEFAULT_CELL_PADDING  : mixed = 0
DEFAULT_CELL_SPACING  : mixed = 0
DEFAULT_COLOUR  : mixed = '000000'
DEFAULT_COLOUR_CODE  : mixed = 'lightGray'
DEFAULT_COLOUR_HIGHLIGHT  : mixed = FALSE
DEFAULT_ENDNOTE_INDENT  : mixed = 'indentNone'
DEFAULT_ENDNOTE_POS  : mixed = 'docEnd'
DEFAULT_ENDNOTE_RESTART  : mixed = 'continuous'
DEFAULT_ENDNOTE_SIZE  : mixed = 12
DEFAULT_ENDNOTE_SPACING  : mixed = 240
DEFAULT_FONT  : mixed = 'arial'
DEFAULT_FONT_CODE  : mixed = 'courier new'
DEFAULT_FOOTNOTE_INDENT  : mixed = 'indentNone'
DEFAULT_FOOTNOTE_RESTART  : mixed = 'continuous'
DEFAULT_FOOTNOTE_SIZE  : mixed = 12
DEFAULT_FOOTNOTE_SPACING  : mixed = 240
DEFAULT_HEADING_SIZE  : mixed = 14
DEFAULT_HEADING_STYLE  : mixed = 'Heading3'
DEFAULT_LINE_SPACING  : mixed = 240
DEFAULT_PAGENUM_ALIGN  : mixed = 0
DEFAULT_PAGENUM_LOC  : mixed = 0
DEFAULT_PAGENUM_RESTART  : mixed = FALSE
DEFAULT_SECTION  : mixed = 'A4'
DEFAULT_SIZE  : mixed = 12
DELIM  : mixed = '>'
DELSPACE  : mixed = 'W1K1NDXDELSPACE'
DIALOGUEQUOTE  : mixed = 'W1K1NDXDIALOGUEQUOTE' . DELIM
DOCDEFAULTS  : mixed = "\\f1\\fs24\n\\s1\\cf1\\ql\\li1\\fi1"
ENDELLIPSES  : mixed = DELIM . 'W1K1NDXENDELLIPSES'
ENDFACTOR  : mixed = 1
ENDSPACE  : mixed = DELIM . 'W1K1NDXENDSPACE'
FB  : mixed = 'left width15percent'
FONTS  : mixed = ['andale mono' => [ "ePrefix" => "w", "eName" =...
FONTS  : mixed = ["andale mono", "arial", "arial black", "book a...
FONTSIZES  : mixed = ['xx-small' => 16, 'x-small' => 20, 'small' =>...
FORM_CLASS  : mixed = 'formElements'
FORM widgets class
FORM_CLASS  : mixed = 'formElements'
FORM_EXTENDED widgets class
FTFACTOR  : mixed = 1
HANGING  : mixed = 360
HARDPUNC  : mixed = 'W1K1NDXHARDPUNC' . DELIM
HEADINGS  : mixed = ['h6' => 8, 'h5' => 10, 'h4' => 12, 'h3' => 14,...
HEADINGS_STYLE  : mixed = ['h6' => 'Heading6', 'h5' => 'Heading5', 'h4' =...
HEADINGS_STYLE_SIZE  : mixed = ['h6' => 16, 'h5' => 20, 'h4' => 24, 'h3' => 28...
HIDDENPARASTART  : mixed = "W1K1NDXHIDDENPARASTART" . DELIM
HTML_BR  : mixed = 'W1K1NDXBR'
HTML_END_FT  : mixed = DELIM . 'W1K1NDXENDFT'
HTML_END_P  : mixed = DELIM . 'W1K1NDXENDP'
HTML_END_TAGELEMENT  : mixed = DELIM . 'W1K1NDXENDTAGELEMENT'
HTML_HEADINGS  : mixed = ['<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>']
HTML_START_ENTITY  : mixed = 'W1K1NDXSTARTENTITY' . DELIM
HTML_START_FT  : mixed = 'W1K1NDXSTARTFT' . DELIM
HTML_START_HTML  : mixed = 'W1K1NDXSTARTHTML' . DELIM
HTML_START_P  : mixed = 'W1K1NDXSTARTP' . DELIM
HTML_START_TABLE  : mixed = 'WIKINDXSTARTTABLE' . DELIM
HTML_START_TAGELEMENT  : mixed = 'W1K1NDXSTARTTAGELEMENT' . DELIM
HTMLSENTENCEENDINGS  : mixed = [HTML_END_P, HTML_BR, '</td>', '</li>', 'W1K1ND...
HTMLTOARRAYKEY  : mixed = [ // Translate some HTML attributes to keys use...
IGNOREDTAGS  : mixed = [ // Document metadata "base", "head", "link",...
IGNOREDTAGS  : mixed = [ // Document metadata "base", "head", "link",...
INDENT  : mixed = '40px'
INDENT  : mixed = 720
INDENT  : mixed = 18
INDENTS  : mixed = ['indentNone' => '', 'indentAll' => '\li' . BLO...
JUSTIFICATIONS  : mixed = [ // WIKINDX => DOCX 'center' => 'center', 'lef...
JUSTIFY  : mixed = ['center' => 'c', 'left' => 'l', 'right' => 'r'...
LEFTCELL  : mixed = 'generalTable borderStyleSolid left width60perc...
Styling, particularly width, for TD containers
LF  : mixed = "\n"
LINE_SPACING  : mixed = ['singleSpace' => 240, 'oneSixthSpace' => 276,...
LINESPACINGS  : mixed = ['singleSpace' => '\sl240\slmult1', 'oneSixthSp...
LINESPACINGSNUM  : mixed = ['1' => '\sl240\slmult1', '1.15' => '\sl276\slm...
LISTBULLETS  : mixed = ['bullet', 'circle', 'square']
LISTBULLETS_RTF  : mixed = ['\ls1\fi-360\li', '\ls2\fi-360\li', '\ls3\fi-3...
LISTINDENT  : mixed = 720
LISTINDENT_EXTRA  : mixed = 360
LISTORDERS  : mixed = ['arabic', 'lower-alpha', 'lower-roman']
LISTORDERS_RTF  : mixed = ['0', '4', '2']
LISTTYPES  : mixed = ['aa' => '\ls5\fi-360', 'a' => '\ls0\fi-360', '...
MAX_LEVEL  : mixed = 8
OL_LIST  : mixed = [0 => 'decimal', 1 => 'lowerLetter', 2 => 'lowe...
OPT  : mixed = 'left width60percent'
PAPERSIZES  : mixed = ['A4' => '\paperh16838\paperw11906\margl1134\ma...
PIXELSTOPOINTS  : mixed = 0.75
POINTSTOBORDERWIDTH  : mixed = 0.125
QEND  : mixed = DELIM . 'W1K1NDXENDQUOTE'
QENDNEST  : mixed = DELIM . 'W1K1NDXENDNESTEDQUOTE'
QSTART  : mixed = 'W1K1NDXSTARTQUOTE' . DELIM
QSTARTNEST  : mixed = 'W1K1NDXSTARTNESTEDQUOTE' . DELIM
RB1  : mixed = 'small left top width8percent'
RB2  : mixed = 'small left top width8percent'
RB3  : mixed = 'left top width8percent'
RECONSTITUTE_REMOVE_1  : mixed = [HARDPUNC, URL, SOFTPUNC, BQSTART, BQEND, QSTAR...
RECONSTITUTE_REMOVE_2  : mixed = ['W1K1NDXHARDPUNC', 'W1K1NDXURL', 'W1K1NDXSOFTP...
REPLACEHARDPUNC  : mixed = 'W1K1NDXREPLACEHARDPUNC'
ROWBORDER  : mixed = 'trbrdr'
ROWHEIGHT  : mixed = 'trrh'
ROWPADDING  : mixed = 'trpadd'
ROWPADDING_DEFAULT  : mixed = 55
ROWPADDING_UNIT  : mixed = 'trpaddf'
ROWSPACING  : mixed = 'trspd'
ROWSPACING_DEFAULT  : mixed = 0
ROWSPACING_UNIT  : mixed = 'trspdf'
ROWSTART_DEFAULT  : mixed = 0
SB1  : mixed = 'left center width20percent'
SB2  : mixed = 'left center width20percent'
SCHEMA_MAIN_2006  : mixed = "http://schemas.openxmlformats.org/drawingml/20...
SCHEMA_MAIN_2010  : mixed = "http://schemas.microsoft.com/office/drawing/20...
SCHEMA_PICTURE  : mixed = "http://schemas.openxmlformats.org/drawingml/20...
SECTIONSIZE  : mixed = ['A4' => ['size' => ['width' => 11906, 'height'...
SOFTPUNC  : mixed = 'W1K1NDXSOFTPUNC' . DELIM
START_LEVEL  : mixed = -1
STARTELLIPSES  : mixed = 'W1K1NDXSTARTELLIPSES' . DELIM
STARTSPACE  : mixed = 'W1K1NDXSTARTSPACE' . DELIM
TA  : mixed = 'left center middle width5percent'
TAB  : mixed = "\t"
TABFACTOR  : mixed = 40
TABLE_UNIT  : mixed = 3
The row definitions must be output for each row. 'x' refers to a variable additiion.
TABLEWIDTH_DEFAULT  : mixed = 100
TWIPSTOPIXELS  : mixed = 0.0666666667
TWIPSTOPIXELS  : mixed = 0.0666666667
TWIPSTOPOINTS  : mixed = 0.05
TWIPSTOPOINTS  : mixed = 0.05
UL_FONTS  : mixed = [0 => ['ascii' => 'Symbol', 'hAnsi' => 'Symbol'...
UL_LIST  : mixed = [ 0 => '•', // Symbol 1 => 'o', // Courier New...
URL  : mixed = 'W1K1NDXURL' . DELIM
USABLEHEIGHT  : mixed = [ // Set to paper height less margin top and ma...
USABLEWIDTH  : mixed = [ // Set to paper width less margin left and ma...
USABLEWIDTHS  : mixed = [ // Set to paper width less margin left and ma...
WIKINDX_ATOM_PAGE  : mixed = '/index.php?action=rss_RSS_CORE&method=atom10'
WIKINDX_AUTHGATE_MESSAGE_DEFAULT  : mixed = ''
WIKINDX_AUTHGATE_RESET_DEFAULT  : mixed = \FALSE
WIKINDX_AUTHGATE_USE_DEFAULT  : mixed = \FALSE
WIKINDX_BIN_FOLDER_CATDVI_DEFAULT  : mixed = ''
WIKINDX_BIN_FOLDER_DJVUTXT_DEFAULT  : mixed = ''
WIKINDX_BIN_FOLDER_PS2PDF_DEFAULT  : mixed = ''
WIKINDX_BROWSEBIBLIOGRAPHY_DEFAULT  : mixed = \FALSE
WIKINDX_BROWSER_TAB_ID  : mixed = $value
WIKINDX_BROWSER_TAB_ID_DEFAULT  : mixed = \FALSE
WIKINDX_BYPASS_SMARTY_COMPILATION_DEFAULT  : mixed = \FALSE
WIKINDX_CATEGORYEDIT_ALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_CHARSET  : mixed = 'UTF-8'
Default charset
WIKINDX_CMS_ALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_CMS_BIBSTYLE_DEFAULT  : mixed = \WIKINDX_STYLE_DEFAULT
WIKINDX_CMS_PAGE  : mixed = '/cmsprint.php'
WIKINDX_COMPONENTS_COMPATIBLE_VERSION  : mixed = [ 'plugin' => 20, // Must be an integer 'style'...
Components compatibility
WIKINDX_COMPONENTS_STYLE_JSON_FIRST_VERSION  : mixed = 29
First version of Json style components
WIKINDX_COMPONENTS_UPDATE_SERVER_DEFAULT  : mixed = 'https://wikindx.sourceforge.io/cus/index.php'
WIKINDX_CONTACT_EMAIL_DEFAULT  : mixed = ''
WIKINDX_COPYRIGHT_YEAR  : mixed = "2003-2026"
WIKINDX copyright
WIKINDX_CURRENT_DB_ENGINE_NAME  : mixed = $EngineName
WIKINDX_CURRENT_DB_ENGINE_VERSION  : mixed = $aEngineVersion
WIKINDX_DB_CHARSET  : mixed = 'utf8mb4'
MySQL CHARSET/NAMES option
WIKINDX_DB_COLLATION  : mixed = 'utf8mb4_unicode_520_ci'
MySQL COLLATE/COLLATION option
WIKINDX_DB_DEFAULT  : mixed = 'wikindx'
Default name of the MariaDB/MySQL database (case-sensitive)
WIKINDX_DB_ENGINE  : mixed = 'InnoDB'
MySQL engine option
WIKINDX_DB_GROUP_CONCAT_MAX_LEN  : mixed = 4294967295
MySQL SESSION group_concat_max_len option
WIKINDX_DB_HOST_DEFAULT  : mixed = 'localhost'
Default name of the MariaDB/MySQL host server (case-insensitive)
WIKINDX_DB_MAX_ALLOWED_PACKET  : mixed = 1073741824
MySQL GLOBAL max_allowed_packet option
WIKINDX_DB_PASSWORD_DEFAULT  : mixed = 'wikindx'
Default password of the user required to connect to and open the database (case-sensitive)
WIKINDX_DB_SQL_MODE  : mixed = 'TRADITIONAL'
MySQL SESSION sql_mode option
WIKINDX_DB_TIMEZONE  : mixed = '+00:00'
MySQL timezone option
WIKINDX_DB_USER_DEFAULT  : mixed = 'wikindx'
Default username required to connect to and open the database (case-sensitive)
WIKINDX_DEACTIVATE_RESOURCE_TYPES_DEFAULT  : mixed = ""
WIKINDX_DEBUG_ERRORS_DEFAULT  : mixed = \FALSE
WIKINDX_DEBUG_PSEUDOLOCALIZATION_DEFAULT  : mixed = \FALSE
WIKINDX_DEBUG_SQL_DEFAULT  : mixed = \FALSE
WIKINDX_DENY_READONLY_DEFAULT  : mixed = \FALSE
WIKINDX_DESCRIPTION_DEFAULT  : mixed = 'My WIKINDX'
WIKINDX_DIR_BASE  : mixed = \realpath(\implode(\DIRECTORY_SEPARATOR, [__DIR...
WIKINDX_DIR_CACHE  : mixed = 'cache'
WIKINDX_DIR_CACHE_ATTACHMENTS  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CA...
WIKINDX_DIR_CACHE_FILES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CA...
WIKINDX_DIR_CACHE_PLUGINS  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CA...
WIKINDX_DIR_CACHE_STYLES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CA...
WIKINDX_DIR_CACHE_TEMPLATES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CA...
WIKINDX_DIR_COMPONENT  : mixed = 'components'
WIKINDX_DIR_COMPONENT_PLUGINS  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CO...
WIKINDX_DIR_COMPONENT_STYLES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CO...
WIKINDX_DIR_COMPONENT_TEMPLATES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CO...
WIKINDX_DIR_CORE  : mixed = 'core'
WIKINDX_DIR_CORE_LANGUAGES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CO...
WIKINDX_DIR_DATA  : mixed = 'data'
WIKINDX_DIR_DATA_ATTACHMENTS  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DA...
WIKINDX_DIR_DATA_IMAGES  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DA...
WIKINDX_DIR_DATA_PLUGINS  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DA...
WIKINDX_DIR_DB_SCHEMA  : mixed = 'dbschema'
Root folder storing SQL Scripts used for a full db schema creation or an upgrades
WIKINDX_DIR_DOCS  : mixed = 'docs'
PhpDocumentor default directory
WIKINDX_DIR_LOG  : mixed = 'log'
Log files folder
WIKINDX_DIR_PUBLIC  : mixed = 'public'
Folder of public files that can be directly called by a browser without checking permissions (usually JS and CSS files)
WIKINDX_DISPLAY_CMS_LINK_DEFAULT  : mixed = \FALSE
WIKINDX_DISPLAY_RESOURCE_STATISTICS_DEFAULT  : mixed = \FALSE
WIKINDX_DISPLAY_STATISTICS_DEFAULT  : mixed = \FALSE
WIKINDX_DISPLAY_USER_STATISTICS_DEFAULT  : mixed = \FALSE
WIKINDX_DOMAIN_NAME  : mixed = $domain_name
WIKINDX_DOUBLEQUOTE_WIKINDX  : mixed = 'WIKINDXDOUBLEQUOTEWIKINDX'
Special constants used to do replacements required for SQL and similar.
WIKINDX_EMAIL_NEW_REGISTRATIONS_DEFAULT  : mixed = ''
WIKINDX_EMAIL_NEWS_DEFAULT  : mixed = \FALSE
WIKINDX_EMAIL_STATISTICS_DEFAULT  : mixed = \FALSE
WIKINDX_FILE_ATTACH_ALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_FILE_ATTACH_SIZE_UPPER_LIMIT  : mixed = 4000
Max file size of an attachment
WIKINDX_FILE_ATTACH_UPLOAD_MAX_SIZE_DEFAULT  : mixed = 5
WIKINDX_FILE_DELETE_SECONDS_DEFAULT  : mixed = 3600
WIKINDX_FILE_REPAIRKIT_DB_SCHEMA  : mixed = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DB...
Database schema description file for RepairKit component
WIKINDX_FILE_VIEW_LOGGEDON_ONLY_DEFAULT  : mixed = \FALSE
WIKINDX_GLOBAL_EDIT_DEFAULT  : mixed = \FALSE
WIKINDX_GS_ATTACHMENT_DEFAULT  : mixed = \FALSE
WIKINDX_GS_DISALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_HEADER_SESSION_COOKIE_SECURE_ATTRIBUTE_DEFAULT  : mixed = \FALSE
WIKINDX_HEADER_STRICT_TRANSPORT_SECURITY_DEFAULT  : mixed = \FALSE
WIKINDX_HOMEBIB_DEFAULT  : mixed = \FALSE
WIKINDX_IMG_ALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_IMG_HEIGHT_LIMIT_DEFAULT  : mixed = 400
WIKINDX_IMG_SIZE_UPPER_LIMIT  : mixed = 200
Max file size of an 8K 24 bits colors bmp image
WIKINDX_IMG_UPLOAD_MAX_SIZE_DEFAULT  : mixed = 5
WIKINDX_IMG_WIDTH_LIMIT_DEFAULT  : mixed = 400
WIKINDX_IMPORT_BIB_DEFAULT  : mixed = \FALSE
WIKINDX_IMPRESSUM_DEFAULT  : mixed = ''
WIKINDX_INTERNAL_PUBLIC_VERSION_MAPPING  : mixed = ["153" => "6.13.0", "151" => "6.12.1", "139" =>...
WIKINDX internal-official/public version mapping
WIKINDX_INTERNAL_VERSION  : mixed = 158.0
WIKINDX internal version information
WIKINDX_INTERNAL_VERSION_UPGRADE_MIN  : mixed = 5.1
WIKINDX minimum internal version upgradable
WIKINDX_IS_TRUNK_DEFAULT  : mixed = \FALSE
WIKINDX_LANGUAGE_DEFAULT  : mixed = 'en'
WIKINDX_LANGUAGE_DOMAIN_DEFAULT  : mixed = 'wikindx'
Translation domain name of the core part
WIKINDX_LANGUAGE_NAME_DEFAULT  : mixed = 'English (United Kingdom)'
Default language
WIKINDX_LAST_CHANGES_DAY_LIMIT_DEFAULT  : mixed = 10
WIKINDX_LAST_CHANGES_DEFAULT  : mixed = 10
WIKINDX_LAST_CHANGES_TYPE_DEFAULT  : mixed = 'number'
WIKINDX_LDAP_DEBUG_LEVEL  : mixed = 7
WIKINDX_LDAP_GROUP_DN_DEFAULT  : mixed = ''
WIKINDX_LDAP_GROUP_TYPE_FILTER  : mixed = '(|(sAMAccountType=268435456)(sAMAccountType=26...
WIKINDX_LDAP_PORT_DEFAULT  : mixed = 389
WIKINDX_LDAP_SEARCH_METHOD_DEFAULT  : mixed = 'tree'
WIKINDX_LDAP_SEARCH_METHOD_LIST  : mixed = ['list' => 'list', 'tree' => 'tree']
WIKINDX_LDAP_SEARCH_OPERATOR_DEFAULT  : mixed = 'and'
WIKINDX_LDAP_SEARCH_OPERATOR_LIST  : mixed = ['or' => 'or', 'and' => 'and']
WIKINDX_LDAP_SERVER_BIND_DOMAIN_DEFAULT  : mixed = ''
WIKINDX_LDAP_SERVER_BIND_DOMAIN_FORMAT_DEFAULT  : mixed = 'upn'
WIKINDX_LDAP_SERVER_BIND_DOMAIN_FORMAT_LIST  : mixed = ['none' => 'none', 'sam' => 'sam', 'upn' => 'upn']
WIKINDX_LDAP_SERVER_BIND_LOGIN_DEFAULT  : mixed = ''
WIKINDX_LDAP_SERVER_BIND_PASSWORD_DEFAULT  : mixed = ''
WIKINDX_LDAP_SERVER_BIND_TYPE_DEFAULT  : mixed = 'anonymous'
WIKINDX_LDAP_SERVER_BIND_TYPE_LIST  : mixed = ['anonymous' => 'anonymous', 'binduser' => 'bin...
WIKINDX_LDAP_SERVER_DEFAULT  : mixed = 'localhost'
WIKINDX_LDAP_SERVER_ENCRYPTION_DEFAULT  : mixed = 'none'
WIKINDX_LDAP_SERVER_ENCRYPTION_LIST  : mixed = ['none' => 'none', 'ssl' => 'ssl', 'starttls' =...
WIKINDX_LDAP_SERVER_NETWORK_TIMEOUT  : mixed = 10
WIKINDX_LDAP_SERVER_RESPONSE_TIMEOUT  : mixed = 15
WIKINDX_LDAP_USE_DEFAULT  : mixed = \FALSE
WIKINDX_LDAP_USE_REFERRALS  : mixed = 0
WIKINDX_LDAP_USER_ATTRIBUTE_EMAIL  : mixed = 'mail'
WIKINDX_LDAP_USER_ATTRIBUTE_FULLNAME  : mixed = 'displayname'
WIKINDX_LDAP_USER_ATTRIBUTE_LOGIN_DEFAULT  : mixed = 'sAMAccountName'
WIKINDX_LDAP_USER_ATTRIBUTE_LOGIN_LIST  : mixed = ['CN' => 'CN', 'sAMAccountName' => 'sAMAccountN...
WIKINDX_LDAP_USER_CREATE_DEFAULT  : mixed = \TRUE
WIKINDX_LDAP_USER_OU_DEFAULT  : mixed = ''
WIKINDX_LDAP_USER_TYPE_FILTER  : mixed = '(sAMAccountType=805306368)'
WIKINDX_LIST_LINK_DEFAULT  : mixed = \FALSE
WIKINDX_LOCALE_DEFAULT  : mixed = 'en_GB'
Default language
WIKINDX_MAIL_BACKEND_DEFAULT  : mixed = 'sendmail'
WIKINDX_MAIL_FROM_DEFAULT  : mixed = ''
WIKINDX_MAIL_REPLYTO_DEFAULT  : mixed = 'noreply@noreply.org'
WIKINDX_MAIL_RETURN_PATH_DEFAULT  : mixed = ''
WIKINDX_MAIL_SENDMAIL_PATH_DEFAULT  : mixed = '/usr/sbin/sendmail'
WIKINDX_MAIL_SMTP_AUTHTYPE_DEFAULT  : mixed = 'none'
WIKINDX_MAIL_SMTP_ENCRYPT_DEFAULT  : mixed = 'none'
WIKINDX_MAIL_SMTP_PASSWORD_DEFAULT  : mixed = ''
WIKINDX_MAIL_SMTP_PERSIST_DEFAULT  : mixed = \FALSE
WIKINDX_MAIL_SMTP_PORT_DEFAULT  : mixed = 25
WIKINDX_MAIL_SMTP_SERVER_DEFAULT  : mixed = 'localhost'
WIKINDX_MAIL_SMTP_USERNAME_DEFAULT  : mixed = ''
WIKINDX_MAIL_USE_DEFAULT  : mixed = \FALSE
WIKINDX_MARIADB_VERSION_MIN  : mixed = '10.11'
Minimum required PHP version
WIKINDX_MAX_EXECUTION_TIMEOUT_DEFAULT  : mixed = 60
Default max execution time of a script/page (in seconds, or FALSE)
WIKINDX_MAX_MULTIUPDATES  : mixed = \WIKINDX_DB_MAX_ALLOWED_PACKET - 1000000
This can be used to control the number of SET statements in SQL::multUpdate() and SQL::multiUpdateNull() statements by triggering the statement only when the number of bytes in the update array sent to the statement is larger than this constant.
WIKINDX_MAX_PASTE_DEFAULT  : mixed = 10
WIKINDX_MEMORY_LIMIT_DEFAULT  : mixed = '1G'
Default custom value for PHP memory_limit option (interger, string, or FALSE)
WIKINDX_MENU_DESKTOP_CONFIG_DEFAULT  : mixed = \serialize(['main' => []])
WIKINDX_MENU_MOBILE_CONFIG_DEFAULT  : mixed = \serialize(['main' => []])
WIKINDX_METADATA_ALLOW_DEFAULT  : mixed = \TRUE
WIKINDX_METADATA_USERONLY_DEFAULT  : mixed = \FALSE
WIKINDX_MIMETYPE_ABW  : mixed = 'application/x-abiword'
WIKINDX_MIMETYPE_ATOM  : mixed = 'application/atom+xml'
WIKINDX_MIMETYPE_BIB  : mixed = 'application/x-bibtex'
WIKINDX_MIMETYPE_CSV  : mixed = 'text/csv'
WIKINDX_MIMETYPE_DJV  : mixed = 'image/vnd.djvu'
WIKINDX_MIMETYPE_DOC  : mixed = 'application/msword'
WIKINDX_MIMETYPE_DOCM  : mixed = 'application/vnd.ms-word.document.macroEnabled.12'
WIKINDX_MIMETYPE_DOCX  : mixed = 'application/vnd.openxmlformats-officedocument....
WIKINDX_MIMETYPE_DOTM  : mixed = 'application/vnd.ms-word.template.macroEnabled.12'
WIKINDX_MIMETYPE_DOTX  : mixed = 'application/vnd.openxmlformats-officedocument....
WIKINDX_MIMETYPE_DVI  : mixed = 'application/x-dvi'
WIKINDX_MIMETYPE_ENDNOTE  : mixed = 'application/vnd.openxmlformats-officedocument....
WIKINDX_MIMETYPE_EPUB  : mixed = 'application/epub+zip'
WIKINDX_MIMETYPE_FB  : mixed = 'application/x-fictionbook'
WIKINDX_MIMETYPE_HTML  : mixed = 'text/html'
WIKINDX_MIMETYPE_JS  : mixed = 'application/javascript'
WIKINDX_MIMETYPE_JSON  : mixed = 'application/json'
WIKINDX_MIMETYPE_KWD  : mixed = 'application/vnd.kde.kword'
WIKINDX_MIMETYPE_LWP  : mixed = 'application/vnd.lotus-wordpro'
WIKINDX_MIMETYPE_MD  : mixed = 'text/markdown'
WIKINDX_MIMETYPE_MHT_ALT  : mixed = 'message/alternative'
WIKINDX_MIMETYPE_MHT_APP  : mixed = 'application/x-mimearchive'
WIKINDX_MIMETYPE_MHT_MIX  : mixed = 'message/mixed'
WIKINDX_MIMETYPE_MHT_MUL  : mixed = 'multipart/related'
WIKINDX_MIMETYPE_MHT_RFC  : mixed = 'message/rfc822'
WIKINDX_MIMETYPE_ODP  : mixed = 'application/vnd.oasis.opendocument.presentation'
WIKINDX_MIMETYPE_ODT  : mixed = 'application/vnd.oasis.opendocument.text'
WIKINDX_MIMETYPE_OTP  : mixed = 'application/vnd.oasis.opendocument.presentatio...
WIKINDX_MIMETYPE_OTT  : mixed = 'application/vnd.oasis.opendocument.text-template'
WIKINDX_MIMETYPE_OXPS  : mixed = 'application/oxps'
WIKINDX_MIMETYPE_PDF  : mixed = 'application/pdf'
WIKINDX_MIMETYPE_PHP  : mixed = 'application/x-httpd-php'
WIKINDX_MIMETYPE_POTM  : mixed = 'application/vnd.ms-powerpoint.template.macroEn...
WIKINDX_MIMETYPE_POTX  : mixed = 'application/vnd.openxmlformats-officedocument....
WIKINDX_MIMETYPE_PPT  : mixed = 'application/vnd.ms-powerpoint'
WIKINDX_MIMETYPE_PPTM  : mixed = 'application/vnd.ms-powerpoint.presentation.mac...
WIKINDX_MIMETYPE_PPTX  : mixed = 'application/vnd.openxmlformats-officedocument....
WIKINDX_MIMETYPE_PS  : mixed = 'application/postscript'
WIKINDX_MIMETYPE_RIS  : mixed = 'application/x-research-info-systems'
WIKINDX_MIMETYPE_RSS  : mixed = 'application/rss+xml'
WIKINDX_MIMETYPE_RTF_APP  : mixed = 'application/rtf'
WIKINDX_MIMETYPE_RTF_TEXT  : mixed = 'text/rtf'
WIKINDX_MIMETYPE_SCRIBUS  : mixed = 'application/vnd.scribus'
WIKINDX_MIMETYPE_STI  : mixed = 'application/vnd.sun.xml.impress.template'
WIKINDX_MIMETYPE_STW  : mixed = 'application/vnd.sun.xml.writer.template'
WIKINDX_MIMETYPE_SXI  : mixed = 'application/vnd.sun.xml.impress'
WIKINDX_MIMETYPE_SXW  : mixed = 'application/vnd.sun.xml.writer'
WIKINDX_MIMETYPE_TEI  : mixed = 'application/tei+xml'
WIKINDX_MIMETYPE_TROFF  : mixed = 'text/troff'
WIKINDX_MIMETYPE_TXT  : mixed = 'text/plain'
WIKINDX_MIMETYPE_WML  : mixed = 'text/vnd.wap.wml'
WIKINDX_MIMETYPE_WMLC  : mixed = 'application/vnd.wap.wmlc'
WIKINDX_MIMETYPE_WPD  : mixed = 'application/vnd.wordperfect'
WIKINDX_MIMETYPE_WPD51  : mixed = 'application/wordperfect5.1'
WIKINDX_MIMETYPE_WPS  : mixed = 'application/vnd.ms-works'
WIKINDX_MIMETYPE_WRI  : mixed = 'application/mswrite'
WIKINDX_MIMETYPE_XHTML  : mixed = 'application/xml+html'
WIKINDX_MIMETYPE_XML_APP  : mixed = 'application/xml'
WIKINDX_MIMETYPE_XML_TEXT  : mixed = 'text/xml'
WIKINDX_MIMETYPE_XPDF  : mixed = 'application/x-pdf'
WIKINDX_MIMETYPE_XPS  : mixed = 'application/vnd.ms-xpsdocument'
WIKINDX_MIMETYPE_ZIP  : mixed = 'application/zip'
WIKINDX_MULTIUSER_DEFAULT  : mixed = \FALSE
WIKINDX_MYSQL_VERSION_MIN  : mixed = '8.4.0'
Minimum required PHP version
WIKINDX_NO_SORT_DEFAULT  : mixed = \implode(",", ['an', 'a', 'the', 'der', 'die',...
WIKINDX_NOTIFY_DEFAULT  : mixed = \FALSE
WIKINDX_OFFICE_API_VERSION  : mixed = 2
Office add-ins API version
WIKINDX_ORIGINATOR_EDIT_ONLY_DEFAULT  : mixed = \FALSE
WIKINDX_PACKAGE_HASH_ALGO  : mixed = 'sha256'
Algo used for hashing the packages released by the project
WIKINDX_PAGING_DEFAULT  : mixed = 20
WIKINDX_PAGING_MAXLINKS_DEFAULT  : mixed = 11
WIKINDX_PAGING_TAG_CLOUD_DEFAULT  : mixed = 100
WIKINDX_PASSWORD_SIZE_DEFAULT  : mixed = 6
WIKINDX_PASSWORD_STRENGTH_DEFAULT  : mixed = 'strong'
WIKINDX_PATH_AUTO_DETECTION_DEFAULT  : mixed = \TRUE
Default value of path auto detection feature (for Virtual Host Apache config)
WIKINDX_PHP_TIMEZONE  : mixed = 'UTC'
Timezone for PHP defaults
WIKINDX_PHP_VERSION_MAX  : mixed = '8.5.99'
Maximum required PHP version
WIKINDX_PHP_VERSION_MIN  : mixed = '8.2.0'
Minimum required PHP version
WIKINDX_PHPMAILER_BACKENDS  : mixed = ['smtp' => 'SMTP', 'sendmail' => 'Sendmail']
WIKINDX_PHPMAILER_SMTP_AUTHTYPE  : mixed = ['none' => 'None', '' => 'Auto', 'CRAM-MD5' =>...
Mapping list of SMTP auth methods of PHPMailer with Wikindx options
WIKINDX_PHPMAILER_SMTP_ENCRYPT  : mixed = ['none' => 'none', 'tls' => 'tls', 'ssl' => 'ssl']
Mapping list of SMTP encryption methods of PHPMailer with Wikindx options
WIKINDX_POPULARITY_DOWNLOADS_WEIGHT  : mixed = 0.75
STATISTICS WEIGHTS
WIKINDX_POPULARITY_VIEWS_WEIGHT  : mixed = 0.25
STATISTICS WEIGHTS
WIKINDX_PUBLIC_VERSION  : mixed = '6.16.1'
WIKINDX official/public version information
WIKINDX_QUARANTINE_DEFAULT  : mixed = \FALSE
WIKINDX_READ_ONLY_ACCESS_DEFAULT  : mixed = \TRUE
WIKINDX_RELEASE_DATE  : mixed = "2026-05-11"
WIKINDX release date
WIKINDX_RELEASE_TIMESTAMP  : mixed = (new \DateTime(\WIKINDX_RELEASE_DATE))->getTime...
WIKINDX release timestamp
WIKINDX_RESOURCE_URL_PREFIX_DEFAULT  : mixed = ''
WIKINDX_RESTRICT_USERID_DEFAULT  : mixed = 0
WIKINDX_RSS_DESCRIPTION_DEFAULT  : mixed = \WIKINDX_DESCRIPTION_DEFAULT
WIKINDX_RSS_DISALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_RSS_DISPLAY_EDITED_RESOURCES_DEFAULT  : mixed = \FALSE
WIKINDX_RSS_LIMIT_DEFAULT  : mixed = 50
WIKINDX_RSS_PAGE  : mixed = '/index.php?action=rss_RSS_CORE&method=rss20'
WIKINDX_RSS_TITLE_DEFAULT  : mixed = \WIKINDX_TITLE_DEFAULT
WIKINDX_SEARCH_CONJUNCTION_DEFAULT  : mixed = 'OR'
WIKINDX_SEARCH_FILTER_DEFAULT  : mixed = \implode(",", ['an', 'a', 'the', 'and', 'to', '...
WIKINDX_SESSION_AUTH_MAXLIFETIME_DEFAULT  : mixed = 86400
WIKINDX_SESSION_AUTH_MAXLIFETIME_UPPER_LIMIT  : mixed = 86400
WIKINDX_SESSION_AUTH_REMEMBERME_MAXLIFETIME_DEFAULT  : mixed = 2678400
WIKINDX_SESSION_AUTH_REMEMBERME_MAXLIFETIME_UPPER_LIMIT  : mixed = 2678400
WIKINDX_SESSION_GC_DIVISOR  : mixed = 10
WIKINDX_SESSION_GC_FREQUENCY  : mixed = 300
WIKINDX_SESSION_GC_LASTEXEC_TIMESTAMP_DEFAULT  : mixed = \time()
WIKINDX_SESSION_GC_MAXLIFETIME  : mixed = 60
WIKINDX_SESSION_GC_PROBABILITY  : mixed = 1
WIKINDX_SESSION_NAME  : mixed = 'WKXSESSID'
WIKINDX_SESSION_NOTAUTH_MAXLIFETIME_DEFAULT  : mixed = 3600
WIKINDX_SESSION_NOTAUTH_MAXLIFETIME_UPPER_LIMIT  : mixed = 86400
WIKINDX_SINGLEQUOTE_WIKINDX  : mixed = 'WIKINDXSINGLEQUOTEWIKINDX'
Special constants used to do replacements required for SQL and similar.
WIKINDX_SITEMAP_DISALLOW_DEFAULT  : mixed = \FALSE
WIKINDX_SITEMAP_MAX_SIZE  : mixed = 500
Max number of url by page in a sitemap (50000 max. allowed in the standard and 10 Mo max.)
WIKINDX_SITEMAP_PAGE  : mixed = '/index.php?action=sitemap_SITEMAP_CORE'
URL of the website sitemap
WIKINDX_STATISTICS_COMPILED_DEFAULT  : mixed = '2018-01-01 01:01:01'
WIKINDX_STRING_LIMIT_DEFAULT  : mixed = 40
WIKINDX_STYLE_DEFAULT  : mixed = 'apa'
WIKINDX_SUPERADMIN_ID  : mixed = 1
WIKINDX_TAG_FACTOR_MAX  : mixed = 200
WIKINDX_TAG_FACTOR_MIN  : mixed = 50
WIKINDX_TAG_FACTOR_STEP  : mixed = 5
WIKINDX_TAG_HIGH_COLOUR_DEFAULT  : mixed = 'ff0000'
WIKINDX_TAG_HIGH_FACTOR_DEFAULT  : mixed = 200
WIKINDX_TAG_LOW_COLOUR_DEFAULT  : mixed = 'a0a0a0'
WIKINDX_TAG_LOW_FACTOR_DEFAULT  : mixed = 100
WIKINDX_TEMPLATE_DEFAULT  : mixed = 'default'
WIKINDX_TEMPLATE_MENU_DEFAULT  : mixed = 0
WIKINDX_TIMEZONE_DEFAULT  : mixed = 'UTC'
Default time zone (UTC)
WIKINDX_TITLE_DEFAULT  : mixed = 'WIKINDX'
WIKINDX_UNIX_PERMS_DEFAULT  : mixed = 0777
WIKINDX_URL  : mixed = 'https://wikindx.sourceforge.io'
WIKINDX SF url
WIKINDX_URL_BASE_DEFAULT  : mixed = ""
Default base URL of WIKINDX
WIKINDX_URL_CACHE  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_CACHE_ATTACHMENTS  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_CACHE_FILES  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_CACHE_PLUGINS  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_CACHE_STYLES  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_CACHE_TEMPLATES  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_COMPONENT  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_COMPONENT_PLUGINS  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_COMPONENT_STYLES  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_COMPONENT_TEMPLATES  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_DATA  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_DATA_ATTACHMENTS  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_DATA_IMAGES  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_DATA_PLUGINS  : mixed = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKIND...
WIKINDX_URL_HELP_TOPICS  : mixed = 'https://wikindx.sourceforge.io/web/' . \WIKIND...
URL of the Help Topics on the website
WIKINDX_USE_BIBTEX_KEY_DEFAULT  : mixed = \FALSE
WIKINDX_USE_WIKINDX_KEY_DEFAULT  : mixed = \FALSE
WIKINDX_USER_LANGUAGE_DEFAULT  : mixed = 'auto'
WIKINDX_USER_PAGING_DEFAULTLINKS  : mixed = 11
WIKINDX_USER_PAGING_DEFAULTPAGING  : mixed = 20
WIKINDX_USER_PAGING_MINLINKS  : mixed = 4
WIKINDX_USER_PAGING_MINPAGING  : mixed = 2
WIKINDX_USER_PAGING_STYLE_DEFAULT  : mixed = 'N'
WIKINDX_USER_REGISTRATION_DEFAULT  : mixed = \FALSE
WIKINDX_USER_REGISTRATION_MODERATE_DEFAULT  : mixed = \FALSE
WIKINDX_USER_STRING_MINLENGTH  : mixed = 10
WIKINDX_USER_TIMEZONE_DEFAULT  : mixed = 'auto'
WIKINDX_WP_DOCX_EXPORTER_VERSION  : mixed = '1.0'
WordProcessor Docx Exporter Version
WT  : mixed = 'left width30percent'
WTAGTAIL  : mixed = DELIM . 'W1K1NDX'

Functions

loadJavascript()  : void
Load the ajax javascript and the user javascript(s) into the HTML page output.
jActionForm()  : string
Create and load the HTML form element insert for the AJAX action and function.
jActionIcon()  : string
Create and load the IMG element insert for the AJAX action and function. Works with core/libs/LOADICONS.php.
encode_jArray()  : string
Convert $jsonArray to JSON string and format any array elements referencing javascript functions.
decode_jString()  : mixed
Convert JSON-formatted $jsonString to an array or object.
_json_error()  : void
echo JSON error or return if none.
getBibData()  : array<string|int, mixed>
Get data from citation sentences and return an array of citation data and an array of resource data ready for producing a bibliography from.
getItemArray()  : array<string|int, mixed>
Create an array of bibliographic data matching the template fields
addCreators()  : void
Add creators
findSubsequentFootnoteTemplates()  : void
Find examples of ibid, idem, and opCit footnote templates.
mapTemplate()  : array<string|int, mixed>
Map a template to the raw values and produce a basic bibliographic/footnote entry
invertFormat()  : string
Invert the format of a title where necessary.
mapSpecialTemplate()  : string
Map a special template (no partial, creator fields etc.—e.g., runningTimeTemplate) to the raw values and produce a string
checkMultiplePunctuation()  : array<string|int, mixed>
Make sure we don't have multiple punctuation characters after a field —NOT CURRENTLY USED (see cleanItems())
addLinks()  : string
Add link items such as URL and DOI
addLinksFt()  : string
Find any links in footnotes and make active if required
addDateStage1()  : array<string|int, mixed>
Add date: stage 1
addDateStage2()  : string
Add date: stage 2
formatDate()  : string
Format date from days and months
formatDay()  : array<string|int, mixed>
Format the day part of a date
addRunningTime()  : string
Add and format running time (films, TV etc.)
formatPages()  : array<string|int, mixed>
Add and format pages
addOtherItems()  : array<string|int, mixed>
Find other items in various resource arrays for adding to the $items array
setBookYears()  : void
For WIKINDX, if type is book, book_chapter or book article and there exists both 'year1' and 'year2' in $resource (entered as publication year and reprint year respectively), then switch these around as 'year1' is entered in the style template as 'originalPublicationYear' and 'year2' should be 'publicationYear'.
cleanItems()  : array<string|int, mixed>
Clean up the $item elements, deal with ordinals, and flatten to final string.
checkUltimate()  : array<string|int, mixed>
Check if the ultimate value should have its first characterf removed (double punctuation)
editorSwitch()  : bool
Set any author/editor re-ordering for book and book_article type.
formatCreators()  : void
Format creator name lists (authors, editors, etc.)
numCreatorManage()  : array<string|int, mixed>
Keep only some elements in array if we've exceeded set thresholds and create an etAl string if necessary.
rewriteCreatorStrings()  : array<string|int, mixed>
Rewrite creator strings
addCustom()  : array<string|int, mixed>
Add custom fields.
formatRunningTime()  : string
Format running time for audiovisual bibliography items
findAmbiguousYears()  : array<string|int, mixed>
Add year fields.
addEdition()  : array<string|int, mixed>
Add any edition field
formatEdition()  : mixed
Format edition (might not be numeric)
getOrdinalExtensionAlignment()  : array<string|int, string>
Get alignment for ordinal extension
checkPartial()  : array<string|int, mixed>
Check that the first field of $template exists in $item and has a value.
checkFallBackFields()  : array<string|int, mixed>
When using a fallback template, ensure the fields are valid for that resource type
setCreatorRepeat()  : array<string|int, mixed>
Check against repeat creator options and amend $items if required If this is footnotes, then $newItems is also ordered correctly.
setCreatorRepeatEndnotes()  : array<string|int, mixed>
Check against repeat creator options and amend $items if required If this is footnotes, then $newItems is also ordered correctly.
mapTemplateCreatorRepeatString()  : string
Basic map template for creator repeat string
settings()  : mixed
Deal with various settings, setting, getting, incrementing, decrementing etc.
getNameString()  : string
Get the nameString variable
checkInitials()  : string
Handle initials.
hyphenatedInitials()  : string
Deal with hyphenated firstnames as initials
addCreatorDelimiters()  : void
Add delimiters to creators
formatMultiplePages()  : string
Format multiple pages.
titleCapitalization()  : string
Do title capitalization
setEtAl()  : string
Set et al. for multiple creators
findAlternates()  : array<string|int, mixed>
Find alternate fields dependent on previous or following fields and deal with accordingly.
formatTitle()  : string
Format a resource title
formatShortTitle()  : string
Format a resource shortTitle
formatPubStatus()  : string
Format publication status
mapDependencies()  : array<string|int, mixed>
Deal with __DEPENDENT_ON_PREVIOUS_FIELD__ for pre and post dependent on previous field's existence and __DEPENDENT_ON_NEXT_FIELD__ for pre and post dependent on the next field's existence
mapTemplateIndependents()  : void
Map independent fields of templates.
mapTemplatePlurals()  : array<string|int, mixed>
Deal with singular/plural dependencies for fields such as pages and creators
replaceWhitespace()  : string|array<string|int, mixed>
Replace ASCII whitespace with locale's whitespace character(s) from elements of an array Callback
stripTemplateBackticks()  : array<string|int, mixed>
Strip backticks used in template
ordinals()  : string
format ordinals
findAmbiguity()  : array<string|int, mixed>
Identify ambiguous in-text citations and references.
fillinPreview()  : array<string|int, mixed>
Provide empty array elements in resourceData from the adminstyle plugin's preview functions to conform with what BIBCITEGATEWAY expects.
setJustify()  : string|false
Generic code for setting justification
setLineSpace()  : string|false
Generic code for setting line height
setIndentation()  : string|false
Generic code for setting indentation
setFontSize()  : string|false
Generic code for setting font size
exportSettings()  : mixed
Setters and getters for various export preferences (e.g. from word processor)
doCitations()  : array<string|int, mixed>
Compile and add the citations to the text
mapTemplate()  : array<string|int, mixed>
Map a template to the raw values and produce a basic citation for inserting into the text
checkResourceTypeTemplate()  : array<string|int, mixed>
Some resource types have specific templates for in-text citations
forceAmbiguousTemplate()  : array<string|int, mixed>
Force the use of ambiguous templates overriding other templates other than subsequentCreatorTemplate
checkSubsequentCreatorTemplate()  : array<string|int, mixed>
Confirm (or not) that a subsequentCreatorTemplate designation is correct.
citationPosition()  : array<string|int, mixed>
Find required position of citation in sentence. Not all requests are possible so drop through three levels . . . Be careful! 0 => "Unchanged" 1 => "After previous creator name(s)" 2 => "After previous quotation" 3 => "Before end of sentence" 4 => "After end of sentence" 5 => "Before next soft punctuation" 6 => "After next soft punctuation"
checkConsecutiveCitations()  : array<string|int, mixed>
For multiple citations that are repositioned after soft or hard punctuation, mark them as consecutive citations.
checkFollowCreatorTemplate()  : array<string|int, mixed>
Confirm (or not) that a followCreatorTemplate designation is correct (in-text citations).
checkConsecutiveCreatorTemplate()  : array<string|int, mixed>
Confirm (or not) that a consecutiveCreatorTemplate designation is correct (in-text citations).
formatCitation()  : array<string|int, mixed>
Format the citation
hyperlinkCitation()  : void
Hyperlink the citation text
citationWrapping()  : array<string|int, mixed>
Format citation with wrapping characters taking account of consecutive citation runs and their delimiting characters
trueFootnoteWrapping()  : string
Wrapping of true footnotes in the text — only used for endInc, endSameId, and endSameIdOrdered
formatSentence()  : string
Format the sentence with each citation obeying required positions.
positionCitationInSentence()  : array<string|int, mixed>
Position citations in the sentence.
doPageSplit()  : void
Check if a citation page should indeed be split and deal with dependencies.
mapTemplateTidyYears()  : array<string|int, mixed>
Do some pre-processing of various year fields in the template
formatPages()  : void
Format pages.
formatCreators()  : void
Format creator name lists (authors, editors, etc.)
replacementYears()  : array<string|int, mixed>
Add replacement years fields to templates
copyYearAlternates()  : void
Copy any alternates relating to pre and post fields from the 'year' field to 'year1' and 'year2' fields
parseIndependent()  : void
Parse independent strings of new templates
compileTemplates()  : array<string|int, mixed>
Compile in-text and endote-style citation templates
addAmbiguity()  : void
Add any ambiguity letter to year field. Only for in-text citations
formatYear()  : void
Format years for citations
secondYearField()  : array<string|int, mixed>
Conditionally add second year field for formatting citations (e.g. revision year, reprint year etc.)—depends on resource type
splitIntoSentences()  : array<string|int, mixed>
Split text into sentences.
parseSentences()  : array<string|int, mixed>
Parse the sentences array for citations and make some initial decisions
findSubsequentTemplates()  : void
Decide if the template for this citation should be the subsequentCreatorTemplate or similar for endnote styles.
findFollowCreatorTemplate()  : array<string|int, mixed>
Find cases for followCreatorTemplate and mark position after creator's name.
getCPattern()  : array<string|int, mixed>
Create the preg pattern for finding a citation's creator names in the same sentence.
tidySentences()  : array<string|int, mixed>
end-of-sentence characters have been captured in $split's array elements. These must be appended to the previous part sentence.
quotationCitationIndex()  : array<string|int, mixed>
Add the citation index to relevant quotations.
tidySentencesEndQuote()  : array<string|int, mixed>
Ensure hard punctuation just before a quotation end marker is treated as marking the end of a complete sentence.
findSpecialQuotes()  : string
Find special quotes such as dialogue and nested quotes—mark them and protect contents of nested quotes
findDialogueQuotes()  : string
Find dialogue quotes and mark them.
findNestedQuotes()  : string
Find and mark nested quotations.
findQuotes()  : string
Mark quotations and protect their content (in case the content has hard punctuation).
blockQuote1()  : string
Mark blockquotes.
blockQuote2()  : string
Format blockquotes and ensure tailend bits are part of it.
blockQuoteSort()  : string
Sort the blockQuote array by length so that the preg_replace works as expected
findEllipses()  : string
Mark ellipses and protect their content (in case the content has hard punctuation).
findTitle()  : array<string|int, mixed>
Find and note existence of title and short title in sentences
tidyInputText()  : string
Preliminary tidying of input text.
reconstituteBlockquote()  : string
Reconsitute blockquote
reconstituteQuote()  : string
Reconsitute quotation
reconstituteQuoteCallback()  : string
Reconsitute quotation callback
reconstituteText()  : string
Return sentence temporary markup to original
debugPrint()  : void
Print an array prettily for debugging purposes
getType()  : array<string|int, string>
Return an array containing the most used grammar types of a locale
compileQuotationMarkers()  : array<string|int, mixed>
Return array of quotation markers for each locale.
compileHardPunctuation()  : array<string|int, mixed>
Return array of hard punctuation (END of sentence only) for each locale.
compileSoftPunctuation()  : array<string|int, mixed>
Return array of soft punctuation (within sentence) for each locale.
compileAllPunctuation()  : array<string|int, mixed>
Return array of all hard and soft punctuation.
compileAbbreviations()  : array<string|int, mixed>
Return array of abbreviations for each locale.
compileNumbers()  : array<string|int, mixed>
Return array of number abbreviations (ordinals and measurements) for each locale.
compileEllipses()  : array<string|int, mixed>
Return array of ellipses for each locale.
compilePossessives()  : array<string|int, string>
Return array of possessives for each locale.
compileEtAl()  : array<string|int, mixed>
Return array of et al. possibilities for each locale.
compileCreatorConjunctions()  : array<string|int, mixed>
Return array of creator conjunction possibilities for each locale.
compileWordSpace()  : array<string|int, mixed>
Return array of word space characters for each locale.
compileApostrophe()  : array<string|int, mixed>
Return array of apostophe for each locale (e.g., in English the "'" of "it's" (short for "it is")
compileInitialPunctuation()  : array<string|int, mixed>
Return array of initial punctuation for each locale.
compileNumberConjunctions()  : array<string|int, mixed>
Return array of number conjunctions for each locale.
abbreviationsAppend()  : array<string|int, mixed>
Append common (Latin) bibliographic abbreviations
readComponentsList()  : array<string|int, mixed>
Read and return the list of all components installed
writeComponentsList()  : void
Write a list of components from an array
refreshComponentsListCache()  : void
Refresh the components list if needed, or forced by the caller
isBuiltinComponent()  : bool
Is a component builtin?
checkComponentsList()  : array<string|int, mixed>
Return a structured list of installed components
computeComponentVersion()  : int
Compute a component version number from the current date
computeComponentSignature()  : string
Compute the hash signature of a component from its installed code
createComponentMetadataFile()  : void
Create the component.json file of a component
enableComponent()  : bool
Enable a component
disableComponent()  : bool
Disable a component
checkComponentIntegrity()  : int
Check the integrity of a component
componentIntegrityErrorMessage()  : string
Return the message of an error code of the function checkComponentIntegrity()
extractComponentPackage()  : bool
Extract a WIKINDX Component Package to a folder
extractComponentPackageDefinition()  : array<string|int, mixed>
Extract the component.json file of a WIKINDX Component Package to an array
listPluginComponents()  : array<string|int, mixed>
List all plugins enabled in WIKINDX_DIR_COMPONENT_PLUGINS with a sane configuration
listStyleComponents()  : array<string|int, mixed>
List all styles enabled in WIKINDX_DIR_COMPONENT_STYLES with a sane configuration
listTemplateComponents()  : array<string|int, mixed>
List all templates enabled in WIKINDX_DIR_COMPONENT_TEMPLATES with a sane configuration
checkPluginVersionCompatibility()  : bool
Check version compatibility of a plugin
loadStyleInfo()  : associative
Extract info entries from a JSON bibliographic style file and return an associative array of childnode's value of 'info' node.
timezoneOffsetFromUTC()  : string
Returns the timezone offset from UTC
localeDate2dbDate()  : string
Convert a datetime form the user timezone to the database timezone
dbDate2localeDate()  : string
Convert a datetime form the database timezone to user timezone
dateFormatFromString()  : string
Format dates and times for localization in numeric short format
dateFormatFromTimeStamp()  : string
Format dates and times for localization in numeric short format
getAllTimezones()  : array<string|int, string>
Return a selected list of all time zones recognised by PHP
determine_timezone()  : string
Determine the user's preferred timezone.
determine_timezone_priority_stack()  : array<string|int, string>
Determine the user's preferred timezone.
pkgPaths()  : mixed
Get and set the DOCX package paths, creating the folder in cache/files/
STARTDOM()  : void
Create and traverse the DOM from the HTML file.
traverseDOM()  : mixed
Traverse the DOM and produce DOCX code
nodeAttributes()  : array<string|int, mixed>
Convert attributes
calculateTwipsWidth()  : int
Calculate table widths in twips from either % or px values
calculateBorderSize()  : int
Calculate table border size in twips from px values.
domImageToDocxImage()  : void
Images are renamed and copied to
domNodeAttributes2Array()  : array<string|int, string>
Convert attributes of a DOMNode to an array of attributes
colours()  : mixed
Set and write colours.
getColour()  : string
Ensure input colour is in 6-character HEX format
rels()  : mixed
Set and get the rels array and the rId.
endnotes()  : mixed
Various functions related to endnotes
fonts()  : mixed
Set and get the rFonts array and the current font.
sizes()  : mixed
Set and get the rFonts array and the current font.
writeSize()  : void
Convert font size to DOCX (in span and p tags as "style=font-size: xxpt;") and write XML
footnotes()  : mixed
Various functions related to footnotes
formats()  : void
Set and write the rProps array
italics()  : void
Italics (em or i)
underline()  : void
underline (span text-decoration: line-through)
bold()  : void
bold (strong or b)
strikethrough()  : void
strikethrough (span text-decoration: line-through)
superscript()  : void
superscript (sup)
subscript()  : void
subscript (sup)
images()  : void
Set and write images.
floatParams()  : mixed
Set and get image float values.
relsStore()  : array<string|int, mixed>
get the default file extention associated to an image mimetype
justify()  : mixed
Set and get the justification and indentation for the current paragraph.
lists()  : mixed
Set and get methods for dealing with lists.
numIds()  : array<string|int, mixed>
Build up the numIds array
abstractNumIds()  : array<string|int, mixed>
Build up the abstractNumIds array
startListItem()  : void
Start a list (ul or ol)
listItemProps()  : void
List item (li)
endListItem()  : void
End a list (ul or ol)
needNumbering()  : bool
Set and get the flag indicating if the word/numbering.xml file needs to be written (e.g., for lists, endnotes, and so on)
needTables()  : bool
Set and get the flag indicating if the xml string needs DOM-traversal in order to insert table headers (see \DOCX\format\TABLES\writeTableHeaders())
needSections()  : bool
Set and get the flag indicating if the xml string needs DOM-traversal in order to insert sections (see \DOCX\format\SECTIONS\writeSections())
needFootnotes()  : bool
Set and get the flag indicating if the xml string needs DOM-traversal in order to insert footnotes (see \FOOTNOTES)
needEndnotes()  : bool
Set and get the flag indicating if the xml string needs DOM-traversal in order to insert endnotes (see \ENDNOTES)
hr()  : void
Horizontal ruler (hr)
startHyperlink()  : void
Start a hyperlink (a)
endHyperlink()  : void
End a hyperlink (a)
startHeading()  : void
Start a heading (h1, h2, etc.)
endHeading()  : void
End a heading (h1, h2, etc.)
getXmlRelsId()  : string
Produce an incrementing rId number for the document.xml.rels file.
getDotRelsId()  : string
Produce an incrementing rId number for the .rels file
genHex()  : string
Generate a unique random 8 digit hex value used for paragraph ids, table cell ids, etc.
pxToEmu()  : float
Convert pixels to emus (English Metric Units)
twipToEmu()  : int
Convert twips to emus (English Metric Units)
br()  : void
Add a new line (br)
pStatus()  : bool
Set and get the open/close status of a paragraph. The initial text in a table cell is not enclosed in p tags in the html but must be in a paragrph in DOCX. However, a second paragraph in the cell _is_ enclosed in p tags in the HTML. We must ensure that the initial paragraph of a cell does not itself encapsulate any other paragraphs in the cell. The initial text in a cell will call startP() and set the pStatus to TRUE (open). Any subsequent call to startP() must check if pStatus is TRUE and, if so, close the preceding paragraph.
startP()  : void
Start a paragraph (p).
endP()  : void
End a paragraph (p)
pProps()  : mixed
Set and write the pProps
rProps()  : mixed
Set and write the rProps
sections()  : mixed
Set and get the initial sectPr element
writeSections()  : string
Insert section breaks other than the default (i.e., section breaks have been inserted in the WP).
pageNums()  : mixed
Set and get page number options. These are written as part of the section block.
tables()  : mixed
Set and get and manipulate table settings and elements.
tableHeaders()  : bool
Handle table headers to be written to the XML after all tables' data have been collected.
getGridArray()  : array<string|int, mixed>
Get the gridArray for the table cells once they have all been parsed and the table properties are ready to be finalised in XML.
calculateGridArrayWidths()  : array<string|int, mixed>
Calculate the gridArray widths.
startTable()  : void
Start a new table
endTable()  : void
End a table
writeCells()  : bool
Write the table cell widths (for existing cells) and insert vMerge=continue cells after having created the grid.
createVmergeCell()  : DOMNode
Write a vMerge=continue cell.
writeTblGrid()  : void
Write the tblGrid node
createTblProps()  : void
Set up the tblPr node
startRow()  : void
Start a new table row
endRow()  : void
End a table row
startCell()  : void
Start a new table cell
vMergeProps()  : mixed
Set and get and reset the properties of the vMerge=restart cells for use in their vMerge=continue cells
cellProps()  : array<string|int, mixed>
Do properties (borders, shading) for table cells
endCell()  : void
End a table cell
text()  : void
Text
writeRunCharacterFormatting()  : void
writeElementAttribute()  : void
Write an array of attributes within an element.
writeElementAttributeNs()  : void
Write an array of NS attributes within an element.
writeElement()  : void
Write one or more elements
writeElementMultAttrNs()  : void
Write an NS element with prefixes and multiple attributes
writeFontDefinition()  : void
Write a font definition (for fontTable.xml header)
endElement()  : void
End an element
format()  : string
Format for HTML or RTF/plain?
notes()  : mixed
Set and get footnote and endnote texts.
bbcode()  : string
Deal with BBCODE
endnoteId()  : string
Format the endnote ID in the endnotes
trueFootnoteId()  : string
Format the true footnote ID in the footnotes section
newline()  : string
Return a newline character.
setHeaders()  : void
Set download headers
readfile_chunked()  : bool
Download file to user
createFileName()  : array<string|int, mixed>
create a fileName for this file. If directory based on session ID does not exist, create it.
fileAttachUploadMaxSize()  : int
Get attachment max upload size in bytes
imageUploadMaxSize()  : int
Get image max upload size in bytes
fileUploadMaxSize()  : int
Get file max upload size in bytes
return_bytes()  : int
Convert some ini values to numerical values (to bytes)
dirToArray()  : array<string|int, mixed>
Enumerate files and subdirectories of a directory except . and .. subdirectories
dirInDirToArray()  : array<string|int, mixed>
Enumerate subdirectories of a directory except . and .. subdirectories
fileInDirToArray()  : array<string|int, mixed>
Enumerate files of a directory except . and .. subdirectories
recurse_AbsoluteDirToArray()  : array<string|int, mixed>
Enumerate recursively files and subdirectories of a directory except . and .. subdirectories
recurse_fileInDirToArray()  : array<string|int, mixed>
Enumerate recursively files and subdirectories of a directory except . and .. subdirectories
recurse_dir_copy()  : void
Copy recursively a folder
recurse_rmdir()  : void
Remove recursively a folder
rmfile()  : void
Remove a file
fileUpload()  : array<string|int, mixed>
Return filename, hash, type and size of an uploaded file or an array of such information for each file uploaded
rearrangeFilesArray()  : array<string|int, mixed>
Rearrange the $_FILES array for multiple file uploads
fileStore()  : bool
Store uploaded file in given directory with given name
listFiles()  : array<string|int, mixed>
list and HTML format all files for sessionID
tidyFiles()  : void
tidy up the files directory by removing all files and folders older than WIKINDX_FILE_DELETE_SECONDS
zip()  : mixed
Zip up an array of files. File is stored in files dir.
read_json_file()  : mixed
Read a JSON file to a data structure
write_json_file()  : int
Write a data structure to a JSON file
formatSize()  : string
Format a file size in bytes to the greater multiple for display
getMimeType()  : string
Return the mime-type of a file
getExtension()  : string
Return the extension of a file in lowercase (without point)
replaceFileExtension()  : string
Replace the extension of a file by an other
removeFileExtension()  : string
Remove the extension of a file path (and its point)
base64_encode_file()  : void
Encode a file with base64 as an other file
base64_decode_file()  : void
Encode a file with base64 as an other file
bin2hex_encode_file()  : void
Encode a file with bin2hex as an other file
hash_path()  : string
Generates a hash of a file or directory at the given path with the specified algo.
hash_component_dir()  : string
Generates a hash of all files and directories of a component with the specified algo.
imageMimeTypeConstant2extension()  : string
Get the default file extention associated to an image mimetype
imageMimeTypeConstant2ContentType()  : string
Get the default file extention associated to an image mimetype
_inlineHtmlAttribute()  : string
Build a string for insertion of an HTML tag attribute.
formHeader()  : string
print form header with hidden action field
formHeaderVisibleAction()  : string
print form header with visible action field -- typically used for tinyMCE popups
formHeaderName()  : string
print form header with hidden action field and name and id fields
formEnd()  : string
end a form
formMultiHeader()  : string
print form header with hidden action field for multi-part upload forms
formSubmit()  : string
print form footer with submit field
closePopup()  : string
print form footer with close popup button
formSubmitButton()  : string
print form footer with submit button field
formReset()  : string
print form reset button
hidden()  : string
print hidden form input
hiddenNoJSNoId()  : string
print hidden form input without JavaScript action
radioButton()  : string
print radio button
radioButtonGroup()  : string
Print a radio button group.
checkbox()  : string
print checkbox
selectYesNoBox()  : string
create special select box that only provides yes (1) and no (0) as options (values)
selectFBox()  : string
create select boxes for HTML forms
selectedBox()  : string
create select boxes for HTML forms
selectFBoxValue()  : string
create select boxes for HTML forms
selectedBoxValue()  : string
create select boxes for HTML forms
selectFBoxValueMultiple()  : string
create select boxes for HTML forms
selectedBoxValueMultiple()  : string
create select boxes for HTML forms
passwordInput()  : string
password input type
honeypotInput()  : string
A honeypot field made with text input
textInput()  : string
text input type
colorInput()  : string
color input type
textareaInput()  : string
textarea input type
textareaInputmceNoEditor()  : string
textarea input type without MCE editor
textareaReadonly()  : string
textarea readonly
fileUpload()  : string
upload box
fileUploadMultiple()  : string
upload box for multiple files
dateInput()  : string
date input type
label()  : string
Label Form element
getFormAttribute()  : string
Get the form attribute string
formHeaderName()  : string
print form header with hidden action field and name and id fields
hidden()  : string
print hidden form input
hiddenNoJSNoId()  : string
print hidden form input without JavaScript action
textInput()  : string
text input type
checkbox()  : string
print checkbox
radioButton()  : string
print radio button
selectFBoxValue()  : string
create select boxes for HTML forms
selectedBoxValue()  : string
create select boxes for HTML forms
selectFBoxValueMultiple()  : string
create select boxes for HTML forms
selectedBoxValueMultiple()  : string
create select boxes for HTML forms
selectYesNoBox()  : string
create special select box that only provides yes (1) and no (0) as options (values)
filterHTML()  : string
Filter HTML in fields destined for the search_ tables
filterHTMLLinks()  : string
Filter HTML links for LISTCOMMON output
escape()  : mixed
Escape strings inserted in HTML
escapeHTMLTemp()  : mixed
Temporarily escape HTML entities
_inlineHtmlAttribute()  : string
Build a string for insertion of an HTML tag attribute.
h()  : string
<Hx> heading element
div()  : string
<DIV> element
divScrollable()  : string
Scrollable <DIV> element
iframe()  : string
<IFRAME> element
p()  : string
<P> element
pBrowse()  : string
<P> element
pre()  : string
<PRE> element
ul()  : string
<UL> element
ol()  : string
<OL> element
li()  : string
<LI> element
hr()  : string
<HR> element
mark()  : string
<mark> element
object()  : string
<OBJECT> element For display attachment previews
span()  : string
<SPAN> element
color()  : string
<SPAN color> element
strong()  : string
<STRONG> element (Semantic equivalent of <B>)
em()  : string
<EM> element (Semantic equivalent of <I>)
u()  : string
<U> element
img()  : string
<IMG> element
anchor()  : string
<A> element used as internal anchor
a()  : string
<A> element used as hyperlink
aBrowse()  : string
<A> element used as hyperlink
tableStart()  : string
Start a <TABLE> tag
tableEnd()  : string
Close a <TABLE> tag
tableCaption()  : string
provide a table <caption>
tbodyStart()  : string
Provide a <tbody> tag
tbodyEnd()  : string
Provide a </tbody> tag
theadStart()  : string
Provde a <thead> tag
theadEnd()  : string
Provide a </thead> tag
tfootStart()  : string
Provide a <tfoot> tag
tfootEnd()  : string
Provide a </tfoot> tag
trStart()  : string
Provide a <tr> tag
trEnd()  : string
Provide a </tr> tag
tdStart()  : string
Provide a <td> tag without closing it or encapsulating data
tdEnd()  : string
Provide a </td> tag
td()  : string
Provide a <td>...</td> tag
thStart()  : string
Provide a <th> tag without closing it or encapsulating data
thEnd()  : string
Provide a </th> tag
th()  : string
Provide a <th>...</th> tag
cssInlineExternal()  : string
Insert a call to an external CSS file
jsInline()  : string
Inlining JavaScript code
jsInlineExternal()  : string
Insert a call to an external javascript file
successToast()  : string
Format a text as a HTML success toast message (temporary info)
errorToast()  : string
Format a text as a HTML error toast message (temporary info)
nlToHtml()  : string
replace newlines and carriage returns with appropriate HTML code.
htmlToNl()  : mixed
replace HTML newlines and carriage returns in a string or array with appropriate ANSI code.
removeNl()  : string
remove all newlines and replace with single space.
removeNlNoSpace()  : string
remove all newlines with no replacement.
stripHtml()  : mixed
Strip HTML from string or array
clearSortField()  : string
Strip HTML from string
get_core_message()  : string
Translate a message from a domain
get_message()  : string
Translate a message from a domain
translate_message()  : string
Translate a message from a domain
codeISO639a1toName()  : string
Return the name of a language defined by its locale code or its ISO 639-1 (alpha-2) code.
set_locales()  : void
Set the default locale of Intl library with the user's preferred locale
load_locales_json()  : array<string|int, mixed>
Load the translation catalogs of the user's preferred language.
determine_locale()  : string
Determine the user's preferred language.
determine_locale_priority_stack()  : array<string|int, string>
Determine the user's preferred language.
getAllLocales()  : array<string|int, string>
Return a selected list of all locales recognised by Intl and usable for translation and formatting
localetoBCP47()  : string
Return the BCP 47 code that matches the code of a locale.
getTranslatableLocales()  : array<string|int, string>
Get a list of translatable locales sorted by locale name
searchLanguageCode()  : string
Return the language code matching a language name
sort()  : bool
Sort an array according to the current Intl locale in ascending order
asort()  : bool
Sort an array according to the current Intl locale in ascending order and maintain index association
ksort()  : bool
Sort an array according to the current Intl locale in ascending order and maintain index association
rsort()  : bool
Sort an array according to the current Intl locale in descending order
arsort()  : bool
Sort an array according to the current Intl locale in descending order and maintain index association
krsort()  : bool
Sort an array according to the current Intl locale in descending order and maintain index association
messageTranslatorNeeded()  : string
Return a message if the project need translation contribution for the current locale
getPagingParams()  : array<string|int, mixed>
Get the paging start and total
getNum()  : string
Get information on the number or characters being used for alphabetical and dictionary paging
setLinks()  : array<string|int, mixed>
Get links for alphabetical and dictionary paging
getZoomSlices()  : void
Get zooming paging slices
calculateZoomSlices()  : mixed
Calculate the zoom slices
getZoomLinks()  : array<string|int, mixed>
Get the zoom links
zoomToTop()  : string
Set zoom top link link
zoomUpOneLevel()  : string
Set zoom up one level link
storeZoomData()  : void
Store the zoom session
getRootLink()  : mixed
Get the root link for the paging link
linksInfo()  : string
Format display information string
getUserBib()  : array<string|int, mixed>
Check for user bibliographies
getBib()  : mixed
Get details about the bibliography being used
getData()  : array<string|int, mixed>
get data from database
grabCollection()  : void
Grab collection title
grabPublisher()  : void
Grab publisher
grabNames()  : void
grabNames
webFormat()  : string
web_article, URL and accessed date
year2Format()  : string
format YYYY/MM/DD of conference dates etc
year1Format()  : string
format YYYY/MM/DD of publication
timeFormat()  : string
format running time for films
grabNoteAbstract()  : void
grabNoteAbstract
grabKeywords()  : void
grabKeywords
tidyOutput()  : array<string|int, mixed>
Tidy up the output for plain text
header()  : string
Set some defaults and create the RTF opening tag
footer()  : string
Create the RTF closing tag
footnotes()  : mixed
Set RTF headers regarding footnotes/endnotes
citation()  : mixed
Citation stuff The options for $citeStyle are: 'inText' In-text citations (needs bibliography appended) 'ftInc' Footnotes: the footnotes order increments from 1 (needs bibliography appended) 'endInc' Endnotes: the endnotes order increments from 1 'endSameId' Endnotes using the same ID for the same resource: the endnotes order increments from 1 'endSameIdOrdered' Endnotes using the same ID for the same resource: the endnotes order is set in the bibliography settings
documentSettings()  : mixed
Deal with document defaults. This function has various roles depending on the value of $method Must be called before traverseDOM()
cleanHtml()  : string
Clean up HTML before parsing and do some initial conversion
specialCharsToRTF()  : string
Convert special characters.
cleanBlockquotes()  : string
TinyMCE always puts p tags within blockquote—remove them!
fonts()  : mixed
Deal with fonts. This function has various roles depending on the value of $method
colours()  : mixed
Deal with colours. This function has various roles depending on the value of $method
lists()  : mixed
Deal with lists. This function has various roles depending on the value of $method
listToRTF()  : string
Convert lists to RTF (deals with nested lists too and recognizes unordered or ordered)
newListTableItem()  : string
Create new listtable item
textDecoration()  : mixed
text-decoration styling
fontWeight()  : string
Convert font-weight
fontSize()  : string
Convert font size to RTF
traverseDOM()  : string
Traverse the DOM and produce RTF code
nodeAttributes()  : mixed
Convert attributes
tables()  : mixed
Deal with tables and their elements. This function has various roles depending on the value of $method
setCellEdgeDefaults()  : array<string|int, mixed>
Set cell edge defaults in the table matrix.
tableCellToRTF()  : array<string|int, mixed>
Convert table cell to RTF cell property string
inheritParentBorders()  : array<string|int, mixed>
Transfer the parent's border properties to a spanned child
getCellBorderParams()  : array<string|int, mixed>
Get cell border parameters
updateCellEdges()  : array<string|int, mixed>
Update cell edge in the table matrix for one cell. i.e. border has been set for this table cell
cellBordersToString()  : string
Create a string of cell border properties from an array
calculateTableMatrix()  : array<string|int, mixed>
We need to set up a table matrix counting number of rows and number of their children so we can deal with various properties.
getCellWidth()  : string
Get cell width
startCellToRTF()  : array<string|int, mixed>
Start the process of converting a td or th element
utf8_2_rtfansicpg1252()  : string
UTF-8 to ANSI Windows 1252 strings for RTF only
domImageToRtfImagePlaceholders()  : string
Replace HTML image src attribute by a placeholder pointing to a cached file on disk
domNodeAttributes2Array()  : array<string|int, string>
Convert attributes of a DOMNode to an array of attributes
arrayMonthAndSeasonNames()  : array<string|int, string>
Return an array of months and season names
monthAndSeasonName()  : string
Return a month or season name
cardinalToOrdinal()  : string
Make an ordinal from a cardinal. Default is English
cardinalToOrdinalWord()  : string
Convert ordinal to word
cardinalToOrdinalWordLatin()  : string
Convert ordinal to word in Latin
cardinalToGreek()  : string
convert cardinal (Arabic) to Greek numerals
cardinalToRoman()  : string
convert cardinal (Arabic) to Roman numerals
getUuid()  : string
Get UUID from database
store()  : bool
Store/merge data.
exists()  : bool
Check a row exists
fetch()  : array<string|int, mixed>|false
Fetch data array
fetchOne()  : mixed
Fetch one array element
delete()  : void
Delete row
deleteKeys()  : bool
Delete keys from the row data array
build_query()  : string
Generate URL-encoded query string according to RFC 3986
escape()  : string
Escape a component of a URL according to RFC 3986
reduceUrl()  : string
Reduce the size of long URL to keep web browser display tidy
getCurrentProtocol()  : string
Return the protocol requested by the HTTP client
getVhost()  : string
Return the vHost name (Virtual Hostname)
URL_exists()  : bool
Check that an internet resource exists
html_numeric_entity_decode()  : string
Convert numeric HTML entities to their corresponding characters
mb_ucfirst()  : string
A unicode aware replacement for ucfirst()
mb_explode()  : array<string|int, mixed>
Simulate explode() for multibytes strings (as documented for PHP 7.0)
mb_strrev()  : string
Simulate strrev() for multibytes strings
mb_substr_replace()  : string
Simulate substr_replace() for multibytes strings
mb_trim()  : string
Multi-byte safely strip white-spaces (or other characters) from the beginning and end of a string.
mb_ltrim()  : string
Multi-byte safely strip white-spaces (or other characters) from the beginning of a string.
mb_rtrim()  : string
Multi-byte safely strip white-spaces (or other characters) from the end of a string.
listCoreMandatoryPHPExtensions()  : array<string|int, string>
Return an array of mandatory PHP extensions used by the WIKINDX core
listCoreOptionalPHPExtensions()  : array<string|int, string>
Return an array of optional PHP extensions used by the WIKINDX core
OSName()  : string
Return the normalized name of the current os
matchPrefix()  : bool
Check if a prefix match against a string
matchSuffix()  : bool
Check if a suffix match against a string
curl_download_file_http()  : bool
Download a file from an url with HTTP
uuid()  : string
Return a (pseudo) unique string of variable length using random_bytes().
createDataFolders()  : void
Create default data folders used by the application
checkFileSystemPerms()  : mixed
Check the permissions of various folders and files which must be writable
arrayCombinations()  : void
Generate an array of all possible combinations of array values From https://stackoverflow.com/questions/10834393/php-how-to-get-all-possible-combinations-of-1d-array with minor adaptation ($space)
splitDate()  : array<string|int, mixed>
Take input from HTML FORM <input type=date> and split into separate fields.
balanceBraces()  : string
Balance braces after removing noSort in resource input/edit of title or for bibTeX input
sumBraces()  : int
Balance braces after removing noSort or for bibTeX input — return result of sum of open - close braces
noSortPattern()  : string
Create a preg pattern for checking presence of a WIKINDX_NO_SORT value at the beginning of a string.
writeUserPassword()  : void
Write a hashed version of a user password in users table
verifyUserPassword()  : bool
Verify that a password matches a password hash of a user
array_value_select()  : mixed
Return the corresponding value of an array key or a default value
createHelpTopicLink()  : string
Create a popup link for a Help Topic on the website
canIResumeExecution()  : bool
Can I resume execution?
command_exists()  : bool
Does an unix command exist?
insertExportImages()  : void
Insert cached images inside exported files, and delete them
reduceLongText()  : string
Reduce the size of long text (in select boxes usually) to keep web browser display tidy.
computeBibtexKeyAuthorYear()  : string
Generate a BibTeX citation key for one resource with format 'AuthorYear'
computeBibtexKeyAuthorID()  : string
Generate a BibTeX citation key for one resource with format 'Author.ResourceId'
clearXmlString()  : string
Clear forbidden characters from an XML string
clearDOI()  : string
Clear a DOI number
validateDOI()  : bool
Validate a DOI number
escape()  : string
Escape strings inserted in XML
handleParams()  : mixed
Handle the params array and act as a gateway to other functions
initialiseParams()  : array<string|int, mixed>
Initialise params for each type of list.
commonInit()  : array<string|int, mixed>
Initialise common list parameters
qsearchInit()  : array<string|int, mixed>
Initialise qsearch parameters
citeInit()  : array<string|int, mixed>
Initialise cite parameters
basketInit()  : array<string|int, mixed>
Initialise basket parameters
browseInit()  : array<string|int, mixed>
Initialise browse parameters We only need BibId and that's done in commonInit(9.
listInit()  : array<string|int, mixed>
Initialise list parameters
zoomInit()  : array<string|int, mixed>
Initialise zoom parameters
listSomeInit()  : array<string|int, mixed>
Initialise listSome parameters
ideasInit()  : array<string|int, mixed>
Initialise ideas parameters
advsearchInit()  : array<string|int, mixed>
Initialise advsearch parameters
filter()  : array<string|int, mixed>
Filter parameters
setParams()  : array<string|int, mixed>
Set a parameter. Multiple parameters can be set.
finalize()  : mixed
After completion of listing, save parameters
transferArrows()  : array<string|int, mixed>
Make the transfer arrows to transfer fields between select boxes with onclick
makeSelectBox()  : string
Make div selected box
makeRadioButtons1()  : string
Create radio buttons for AND and OR and NOT
makeRadioButtons2()  : string
Create radio buttons for AND and OR
wordDiv()  : string
Word search div
categoryDiv()  : string
Category div
subcategoryDiv()  : string
Subcategory div
addedByDiv()  : string
AddedBy div
editedByDiv()  : string
EditedBy div
valueDiv()  : string
Value div for publicationYear, access, maturityIndex
typeDiv()  : string
Resource type div
creatorDiv()  : string
Creator div
keywordDiv()  : string
Keyword div
metaKeywordDiv()  : string
Metadata Keyword div
languageDiv()  : string
Language div
publisherDiv()  : string
Publisher div
collectionDiv()  : string
Collection div
userTagDiv()  : string
UserTag div
tagDiv()  : string
Import Tag div
grabLanguages()  : array<string|int, mixed>
get languages from database
userBibs()  : string
Return select box of user bibliographies for this user. Called from LISTCOMMON when displaying results.
makeRadioButtonsFilter()  : string
Create radio buttons for AND and OR and NOT—specifically for the filter buttons
displayOptions()  : string
Display attachment options. Called from LISTCOMMON when displaying results.
loadStaticConfig()  : array<string|int, mixed>
Load configuration from config.php
needUpdate()  : bool
Check if the current WIKINDX data (db and files) need an upgrade
existsTableVersion()  : bool
Check if 'version' table that stores the version number of the db schema exists
getCoreInternalVersion()  : float
Return the internal version stored in the database of the core
setCoreInternalVersion()  : mixed
Write an internal version in the database of a component or the core
getComponentInternalVersion()  : float
Return the internal version of a component stored in the database
setComponentInternalVersion()  : mixed
Write an internal version of a component in the database
deleteComponentInternalVersion()  : mixed
Delete an internal version of a component from the database
existsSuperadminAccount()  : bool
Check if 'users' table has not been filled with the superadmin account
getConfigContactEmail()  : float
Return the configContactEmail depending on the software version
logonCheckUpgradeDB()  : bool
Initial logon to the system when upgrading the database.
wkx_error_handler()  : bool
Custom PHP errors handler
wkx_shutdown_handler()  : mixed
Shutdown Handler
wkx_exception_handler()  : mixed
Custom handler for uncaught exceptions
wkx_error_log()  : void
Write a message to the application log
wkx_error_function_args()  : void
Prints in tabular format the positional arguments of a function to the logs
wkx_clear_error_log()  : mixed
Remove expired error logs (14 days max) and limit their size to 25 MB by file
buildUpgradePage()  : mixed

Constants

ABBREVIATION

public mixed ABBREVIATION = 'W1K1NDXABBREVIATION' . DELIM

BLOCKINDENT

public mixed BLOCKINDENT = 720

BLOCKQUOTEINDENT

public mixed BLOCKQUOTEINDENT = '40px'

BORDER_STYLES

public mixed BORDER_STYLES = [ // We only use those available in tinyMCE. I've tried to match these to DOCX . . . 'solid' => 'single', 'dotted' => 'dotted', 'dashed' => 'dashed', 'double' => 'double', 'groove' => 'threeDEmboss', 'ridge' => 'threeDEngrave', 'inset' => 'inset', 'outset' => 'outset', 'none' => 'nil', 'hidden' => 'nil', ]

BORDER_THICKNESS_MAX

public mixed BORDER_THICKNESS_MAX = 96

BORDER_THICKNESS_MIN

public mixed BORDER_THICKNESS_MIN = 2

BORDERCEILING

public mixed BORDERCEILING = 75

BQEND

public mixed BQEND = DELIM . 'W1K1NDXENDBQ'

BQSTART

public mixed BQSTART = 'W1K1NDXSTARTBQ' . DELIM

CELL_DEFAULTS

public mixed CELL_DEFAULTS = [ 'BorderStyle' => 's', // Solid 'BorderWidth' => 20, // 1pt = 20 twips 'BorderColor' => 1, ]

CELL_EMPTY

public mixed CELL_EMPTY = '\intbl' . LF . '{}' . LF . '\cell\pard' . LF . LF

CELL_STUB

public mixed CELL_STUB = [ 'Border' => 'clbrdr', // Begin cell border definition — add one of 't', 'l', 'b', 'r' 'BorderStyle' => 'brdr', // Add from CELLBORDER_STYLES[] 'BorderWidth' => 'brdrw', // Add a number in twips 'BorderColor' => 'brdrcf', // Add a number from colour table 'Padding' => 'clpad', // Add one of 't', 'l', 'b', 'r' and a number in twips 'PaddingUnit' => 'clpadf', // Add one of 't', 'l', 'b', 'r' and a number in twips 'BackgroundColor' => 'clcbpat', // Add a number from colour table 'TextAlign' => 'q', // Add a letter from JUSTIFY[] 'VAlign' => 'clvertal', // Add a letter from CELLVALING[] 'CellX' => 'cellx', ]

CELL_USETABLEBORDER

public mixed CELL_USETABLEBORDER = 'brdrtbl'

CELL_VALIGN

public mixed CELL_VALIGN = ['top' => 'top', 'middle' => 'center', 'bottom' => 'bottom']

CELL_VALIGN

public mixed CELL_VALIGN = ['top' => 't', 'middle' => 'c', 'bottom' => 'b']

CELL_VERTICALMERGE

public mixed CELL_VERTICALMERGE = ['start' => 'clvmgf', 'continue' => 'clvmrg']

CELLBORDER_STYLES

public mixed CELLBORDER_STYLES = [ // We only use those available in tinyMCE. I've tried to match these to RTF . . . 'solid' => 's', 'dotted' => 'dot', 'dashed' => 'dash', 'double' => 'db', 'groove' => 'emboss', 'ridge' => 'engrave', 'inset' => 'tnthlg', // Thick thin large 'outset' => 'thtnlg', // Thin thick large 'none' => FALSE, 'hidden' => FALSE, ]

CELLPADDING

public mixed CELLPADDING = 'clpad'

CELLPADDING_DEFAULT

public mixed CELLPADDING_DEFAULT = 55

CELLPADDING_UNIT

public mixed CELLPADDING_UNIT = 'clpadf'

CELLWIDTH_DEFAULT

public mixed CELLWIDTH_DEFAULT = 300

CHARWIDTH

public mixed CHARWIDTH = 18

CITATION

public mixed CITATION = 'W1K1NDXCITATION' . DELIM

COLOUR_NAMES

public mixed COLOUR_NAMES = ["aliceblue" => "F0F8FF", "antiquewhite" => "FAEBD7", "aqua" => "00FFFF", "aquamarine" => "7FFFD4", "azure" => "F0FFFF", "beige" => "F5F5DC", "bisque" => "FFE4C4", "black" => "000000", "blanchedalmond" => "FFEBCD", "blue" => "0000FF", "blueviolet" => "8A2BE2", "brown" => "A52A2A", "burlywood" => "DEB887", "cadetblue" => "5F9EA0", "chartreuse" => "7FFF00", "chocolate" => "D2691E", "coral" => "FF7F50", "cornflowerblue" => "6495ED", "cornsilk" => "FFF8DC", "crimson" => "DC143C", "cyan" => "00FFFF", "darkblue" => "00008B", "darkcyan" => "008B8B", "darkgoldenrod" => "B8860B", "darkgray" => "A9A9A9", "darkgreen" => "006400", "darkgrey" => "A9A9A9", "darkkhaki" => "BDB76B", "darkmagenta" => "8B008B", "darkolivegreen" => "556B2F", "darkorange" => "FF8C00", "darkorchid" => "9932CC", "darkred" => "8B0000", "darksalmon" => "E9967A", "darkseagreen" => "8FBC8F", "darkslateblue" => "483D8B", "darkslategray" => "2F4F4F", "darkslategrey" => "2F4F4F", "darkturquoise" => "00CED1", "darkviolet" => "9400D3", "deeppink" => "FF1493", "deepskyblue" => "00BFFF", "dimgray" => "696969", "dimgrey" => "696969", "dodgerblue" => "1E90FF", "firebrick" => "B22222", "floralwhite" => "FFFAF0", "forestgreen" => "228B22", "fuchsia" => "FF00FF", "gainsboro" => "DCDCDC", "ghostwhite" => "F8F8FF", "gold" => "FFD700", "goldenrod" => "DAA520", "gray" => "808080", "green" => "008000", "greenyellow" => "ADFF2F", "grey" => "808080", "honeydew" => "F0FFF0", "hotpink" => "FF69B4", "indianred" => "CD5C5C", "indigo" => "4B0082", "ivory" => "FFFFF0", "khaki" => "F0E68C", "lavender" => "E6E6FA", "lavenderblush" => "FFF0F5", "lawngreen" => "7CFC00", "lemonchiffon" => "FFFACD", "lightblue" => "ADD8E6", "lightcoral" => "F08080", "lightcyan" => "E0FFFF", "lightgoldenrodyellow" => "FAFAD2", "lightgray" => "D3D3D3", "lightgreen" => "90EE90", "lightgrey" => "D3D3D3", "lightpink" => "FFB6C1", "lightsalmon" => "FFA07A", "lightseagreen" => "20B2AA", "lightskyblue" => "87CEFA", "lightslategray" => "778899", "lightslategrey" => "778899", "lightsteelblue" => "B0C4DE", "lightyellow" => "FFFFE0", "lime" => "00FF00", "limegreen" => "32CD32", "linen" => "FAF0E6", "magenta" => "FF00FF", "maroon" => "800000", "mediumaquamarine" => "66CDAA", "mediumblue" => "0000CD", "mediumorchid" => "BA55D3", "mediumpurple" => "9370DB", "mediumseagreen" => "3CB371", "mediumslateblue" => "7B68EE", "mediumspringgreen" => "00FA9A", "mediumturquoise" => "48D1CC", "mediumvioletred" => "C71585", "midnightblue" => "191970", "mintcream" => "F5FFFA", "mistyrose" => "FFE4E1", "moccasin" => "FFE4B5", "navajowhite" => "FFDEAD", "navy" => "000080", "oldlace" => "FDF5E6", "olive" => "808000", "olivedrab" => "6B8E23", "orange" => "FFA500", "orangered" => "FF4500", "orchid" => "DA70D6", "palegoldenrod" => "EEE8AA", "palegreen" => "98FB98", "paleturquoise" => "AFEEEE", "palevioletred" => "DB7093", "papayawhip" => "FFEFD5", "peachpuff" => "FFDAB9", "peru" => "CD853F", "pink" => "FFC0CB", "plum" => "DDA0DD", "powderblue" => "B0E0E6", "purple" => "800080", "red" => "FF0000", "rosybrown" => "BC8F8F", "royalblue" => "4169E1", "saddlebrown" => "8B4513", "salmon" => "FA8072", "sandybrown" => "F4A460", "seagreen" => "2E8B57", "seashell" => "FFF5EE", "sienna" => "A0522D", "silver" => "C0C0C0", "skyblue" => "87CEEB", "slateblue" => "6A5ACD", "slategray" => "708090", "slategrey" => "708090", "snow" => "FFFAFA", "springgreen" => "00FF7F", "steelblue" => "4682B4", "tan" => "D2B48C", "teal" => "008080", "thistle" => "D8BFD8", "tomato" => "FF6347", "turquoise" => "40E0D0", "violet" => "EE82EE", "wheat" => "F5DEB3", "white" => "FFFFFF", "whitesmoke" => "F5F5F5", "yellow" => "FFFF00", "yellowgreen" => "9ACD32"]

COLOUR_NAMES

public mixed COLOUR_NAMES = ["aliceblue" => "F0F8FF", "antiquewhite" => "FAEBD7", "aqua" => "00FFFF", "aquamarine" => "7FFFD4", "azure" => "F0FFFF", "beige" => "F5F5DC", "bisque" => "FFE4C4", "black" => "000000", "blanchedalmond" => "FFEBCD", "blue" => "0000FF", "blueviolet" => "8A2BE2", "brown" => "A52A2A", "burlywood" => "DEB887", "cadetblue" => "5F9EA0", "chartreuse" => "7FFF00", "chocolate" => "D2691E", "coral" => "FF7F50", "cornflowerblue" => "6495ED", "cornsilk" => "FFF8DC", "crimson" => "DC143C", "cyan" => "00FFFF", "darkblue" => "00008B", "darkcyan" => "008B8B", "darkgoldenrod" => "B8860B", "darkgray" => "A9A9A9", "darkgreen" => "006400", "darkgrey" => "A9A9A9", "darkkhaki" => "BDB76B", "darkmagenta" => "8B008B", "darkolivegreen" => "556B2F", "darkorange" => "FF8C00", "darkorchid" => "9932CC", "darkred" => "8B0000", "darksalmon" => "E9967A", "darkseagreen" => "8FBC8F", "darkslateblue" => "483D8B", "darkslategray" => "2F4F4F", "darkslategrey" => "2F4F4F", "darkturquoise" => "00CED1", "darkviolet" => "9400D3", "deeppink" => "FF1493", "deepskyblue" => "00BFFF", "dimgray" => "696969", "dimgrey" => "696969", "dodgerblue" => "1E90FF", "firebrick" => "B22222", "floralwhite" => "FFFAF0", "forestgreen" => "228B22", "fuchsia" => "FF00FF", "gainsboro" => "DCDCDC", "ghostwhite" => "F8F8FF", "gold" => "FFD700", "goldenrod" => "DAA520", "gray" => "808080", "green" => "008000", "greenyellow" => "ADFF2F", "grey" => "808080", "honeydew" => "F0FFF0", "hotpink" => "FF69B4", "indianred" => "CD5C5C", "indigo" => "4B0082", "ivory" => "FFFFF0", "khaki" => "F0E68C", "lavender" => "E6E6FA", "lavenderblush" => "FFF0F5", "lawngreen" => "7CFC00", "lemonchiffon" => "FFFACD", "lightblue" => "ADD8E6", "lightcoral" => "F08080", "lightcyan" => "E0FFFF", "lightgoldenrodyellow" => "FAFAD2", "lightgray" => "D3D3D3", "lightgreen" => "90EE90", "lightgrey" => "D3D3D3", "lightpink" => "FFB6C1", "lightsalmon" => "FFA07A", "lightseagreen" => "20B2AA", "lightskyblue" => "87CEFA", "lightslategray" => "778899", "lightslategrey" => "778899", "lightsteelblue" => "B0C4DE", "lightyellow" => "FFFFE0", "lime" => "00FF00", "limegreen" => "32CD32", "linen" => "FAF0E6", "magenta" => "FF00FF", "maroon" => "800000", "mediumaquamarine" => "66CDAA", "mediumblue" => "0000CD", "mediumorchid" => "BA55D3", "mediumpurple" => "9370DB", "mediumseagreen" => "3CB371", "mediumslateblue" => "7B68EE", "mediumspringgreen" => "00FA9A", "mediumturquoise" => "48D1CC", "mediumvioletred" => "C71585", "midnightblue" => "191970", "mintcream" => "F5FFFA", "mistyrose" => "FFE4E1", "moccasin" => "FFE4B5", "navajowhite" => "FFDEAD", "navy" => "000080", "oldlace" => "FDF5E6", "olive" => "808000", "olivedrab" => "6B8E23", "orange" => "FFA500", "orangered" => "FF4500", "orchid" => "DA70D6", "palegoldenrod" => "EEE8AA", "palegreen" => "98FB98", "paleturquoise" => "AFEEEE", "palevioletred" => "DB7093", "papayawhip" => "FFEFD5", "peachpuff" => "FFDAB9", "peru" => "CD853F", "pink" => "FFC0CB", "plum" => "DDA0DD", "powderblue" => "B0E0E6", "purple" => "800080", "red" => "FF0000", "rosybrown" => "BC8F8F", "royalblue" => "4169E1", "saddlebrown" => "8B4513", "salmon" => "FA8072", "sandybrown" => "F4A460", "seagreen" => "2E8B57", "seashell" => "FFF5EE", "sienna" => "A0522D", "silver" => "C0C0C0", "skyblue" => "87CEEB", "slateblue" => "6A5ACD", "slategray" => "708090", "slategrey" => "708090", "snow" => "FFFAFA", "springgreen" => "00FF7F", "steelblue" => "4682B4", "tan" => "D2B48C", "teal" => "008080", "thistle" => "D8BFD8", "tomato" => "FF6347", "turquoise" => "40E0D0", "violet" => "EE82EE", "wheat" => "F5DEB3", "white" => "FFFFFF", "whitesmoke" => "F5F5F5", "yellow" => "FFFF00", "yellowgreen" => "9ACD32"]

COLOURS

public mixed COLOURS = [ '\red0\green0\blue0', // Black (text by default) '\red0\green0\blue255', // Blue (hyperlinks) '\red255\green0\blue0', // Red '\red211\green211\blue211', // Light grey used for <code>...</code> background colour '\red0\green0\blue0', ]

CONSECUTIVE

public mixed CONSECUTIVE = 'W1K1NDXCONSECUTIVE' . DELIM

CREATORS

public mixed CREATORS = 'W1K1NDXCREATORS' . DELIM

DEFAULT_BACKGROUND_COLOUR

public mixed DEFAULT_BACKGROUND_COLOUR = 'auto'

DEFAULT_BORDER_COLOUR

public mixed DEFAULT_BORDER_COLOUR = 'auto'

DEFAULT_BORDER_STYLE

public mixed DEFAULT_BORDER_STYLE = 'nil'

DEFAULT_BORDER_THICKNESS

Border thickness: "Specifies the width of the border. Table borders are line borders (see the val attribute below), and so the width is specified in eighths of a point, with a minimum value of two (1/4 of a point) and a maximum value of 96 (twelve points)." From: http://officeopenxml.com/WPtableCellProperties-Borders.php

public mixed DEFAULT_BORDER_THICKNESS = 2

DEFAULT_CELL_PADDING

public mixed DEFAULT_CELL_PADDING = 0

DEFAULT_CELL_SPACING

public mixed DEFAULT_CELL_SPACING = 0

DEFAULT_COLOUR

public mixed DEFAULT_COLOUR = '000000'

DEFAULT_COLOUR_CODE

public mixed DEFAULT_COLOUR_CODE = 'lightGray'

DEFAULT_COLOUR_HIGHLIGHT

public mixed DEFAULT_COLOUR_HIGHLIGHT = FALSE

DEFAULT_ENDNOTE_INDENT

public mixed DEFAULT_ENDNOTE_INDENT = 'indentNone'

DEFAULT_ENDNOTE_POS

public mixed DEFAULT_ENDNOTE_POS = 'docEnd'

DEFAULT_ENDNOTE_RESTART

public mixed DEFAULT_ENDNOTE_RESTART = 'continuous'

DEFAULT_ENDNOTE_SIZE

public mixed DEFAULT_ENDNOTE_SIZE = 12

DEFAULT_ENDNOTE_SPACING

public mixed DEFAULT_ENDNOTE_SPACING = 240

DEFAULT_FONT

public mixed DEFAULT_FONT = 'arial'

DEFAULT_FONT_CODE

public mixed DEFAULT_FONT_CODE = 'courier new'

DEFAULT_FOOTNOTE_INDENT

public mixed DEFAULT_FOOTNOTE_INDENT = 'indentNone'

DEFAULT_FOOTNOTE_RESTART

public mixed DEFAULT_FOOTNOTE_RESTART = 'continuous'

DEFAULT_FOOTNOTE_SIZE

public mixed DEFAULT_FOOTNOTE_SIZE = 12

DEFAULT_FOOTNOTE_SPACING

public mixed DEFAULT_FOOTNOTE_SPACING = 240

DEFAULT_HEADING_SIZE

public mixed DEFAULT_HEADING_SIZE = 14

DEFAULT_HEADING_STYLE

public mixed DEFAULT_HEADING_STYLE = 'Heading3'

DEFAULT_LINE_SPACING

public mixed DEFAULT_LINE_SPACING = 240

DEFAULT_PAGENUM_ALIGN

public mixed DEFAULT_PAGENUM_ALIGN = 0

DEFAULT_PAGENUM_LOC

public mixed DEFAULT_PAGENUM_LOC = 0

DEFAULT_PAGENUM_RESTART

public mixed DEFAULT_PAGENUM_RESTART = FALSE

DEFAULT_SECTION

public mixed DEFAULT_SECTION = 'A4'

DELIM

public mixed DELIM = '>'

DELSPACE

public mixed DELSPACE = 'W1K1NDXDELSPACE'

DIALOGUEQUOTE

public mixed DIALOGUEQUOTE = 'W1K1NDXDIALOGUEQUOTE' . DELIM

DOCDEFAULTS

public mixed DOCDEFAULTS = "\\f1\\fs24\n\\s1\\cf1\\ql\\li1\\fi1"

ENDELLIPSES

public mixed ENDELLIPSES = DELIM . 'W1K1NDXENDELLIPSES'

ENDFACTOR

public mixed ENDFACTOR = 1

ENDSPACE

public mixed ENDSPACE = DELIM . 'W1K1NDXENDSPACE'

FONTS

public mixed FONTS = ['andale mono' => [ "ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Andale Mono"], "hAnsi" => ['prefix' => 'w', 'val' => "Andale Mono"], // no cs "cs" => ['prefix' => 'w', 'val' => "Andale Mono"], ], 'arial' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Arial"], "hAnsi" => ['prefix' => 'w', 'val' => "Arial"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'arial black' => [ // might need <w:b/><w:bCs/> in the rPr element "ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "arial black"], // lowercase "hAnsi" => ['prefix' => 'w', 'val' => "arial black"], // lowercase "cs" => ['prefix' => 'w', 'val' => "Arial black"], ], 'arial unicode ms' => [ // might need <w:b/><w:bCs/> in the rPr element "ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Arial Unicode MS"], "hAnsi" => ['prefix' => 'w', 'val' => "Arial Unicode MS"], "cs" => ['prefix' => 'w', 'val' => "Arial Unicode MS"], ], 'book antiqua' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "book antiqua"], "hAnsi" => ['prefix' => 'w', 'val' => "book antiqua"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'comic sans ms' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Comic Sans MS"], "hAnsi" => ['prefix' => 'w', 'val' => "Comic Sans MS"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'courier new' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Courier New"], "hAnsi" => ['prefix' => 'w', 'val' => "Courier New"], "cs" => ['prefix' => 'w', 'val' => "Courier New"]], 'georgia' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Georgia"], "hAnsi" => ['prefix' => 'w', 'val' => "Georgia"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'helvetica' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Helvetica"], "hAnsi" => ['prefix' => 'w', 'val' => "Helvetica"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'impact' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Impact"], "hAnsi" => ['prefix' => 'w', 'val' => "Impact"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'liberation mono' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Liberation Mono"], "hAnsi" => ['prefix' => 'w', 'val' => "Liberation Mono"], "cs" => ['prefix' => 'w', 'val' => "Liberation Mono"]], 'liberation sans' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Liberation Sans"], "hAnsi" => ['prefix' => 'w', 'val' => "Liberation Sans"], "cs" => ['prefix' => 'w', 'val' => "Liberation Sans"]], 'liberation serif' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Liberation Serif"], "hAnsi" => ['prefix' => 'w', 'val' => "Liberation Serif"], "cs" => ['prefix' => 'w', 'val' => "Liberation Serif"]], 'symbol' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Symbol"], "hAnsi" => ['prefix' => 'w', 'val' => "Symbol"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'tahoma' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "tahoma"], "hAnsi" => ['prefix' => 'w', 'val' => "tahoma"], "cs" => ['prefix' => 'w', 'val' => "tahoma"]], 'terminal' => [ // Terminal (in WIKINDX) is not a font in Word or LO, so we replace it with the next in the family: Monaco "ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Monaco"], "hAnsi" => ['prefix' => 'w', 'val' => "Monaco"], "cs" => ['prefix' => 'w', 'val' => "Arial"], ], 'times new roman' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Times New Roman"], "hAnsi" => ['prefix' => 'w', 'val' => "Times New Roman"], "cs" => ['prefix' => 'w', 'val' => "Times New Roman"]], 'trebuchet ms' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Trebuchet MS"], "hAnsi" => ['prefix' => 'w', 'val' => "Trebuchet MS"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'unifont' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Unifont"], "hAnsi" => ['prefix' => 'w', 'val' => "Unifont"], "cs" => ['prefix' => 'w', 'val' => "Unifont"]], 'unifont csur' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Unifont CSUR"], "hAnsi" => ['prefix' => 'w', 'val' => "Unifont CSUR"], "cs" => ['prefix' => 'w', 'val' => "Unifont CSUR"]], 'unifont sample' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Unifont Sample"], "hAnsi" => ['prefix' => 'w', 'val' => "Unifont Sample"], "cs" => ['prefix' => 'w', 'val' => "Unifont Sample"]], 'unifont upper' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Unifont Upper"], "hAnsi" => ['prefix' => 'w', 'val' => "Unifont Upper"], "cs" => ['prefix' => 'w', 'val' => "Unifont Upper"]], 'unifont-jp' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Unifont-JP"], "hAnsi" => ['prefix' => 'w', 'val' => "Unifont-JP"], "cs" => ['prefix' => 'w', 'val' => "Unifont-JP"]], 'verdana' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Verdana"], "hAnsi" => ['prefix' => 'w', 'val' => "Verdana"], "cs" => ['prefix' => 'w', 'val' => "Verdana"]], 'webdings' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "webdings"], "hAnsi" => ['prefix' => 'w', 'val' => "webdings"], "cs" => ['prefix' => 'w', 'val' => "Arial"]], 'wingdings' => ["ePrefix" => "w", "eName" => "rFonts", "ascii" => ['prefix' => 'w', 'val' => "Wingdings"], "hAnsi" => ['prefix' => 'w', 'val' => "Wingdings"], "cs" => ['prefix' => 'w', 'val' => "Arial"]]]

FONTS

public mixed FONTS = ["andale mono", "arial", "arial black", "book antiqua", "comic sans ms", "courier new", "georgia", "helvetica", "impact", "symbol", "tahoma", "terminal", "times new roman", "trebuchet ms", "verdana", "webdings", "wingdings"]

FONTSIZES

public mixed FONTSIZES = ['xx-small' => 16, 'x-small' => 20, 'small' => 24, 'medium' => 28, 'large' => 36, 'x-large' => 48, 'xx-large' => 72]

FORM_CLASS

FORM widgets class

public mixed FORM_CLASS = 'formElements'

FORM_CLASS

FORM_EXTENDED widgets class

public mixed FORM_CLASS = 'formElements'

HANGING

public mixed HANGING = 360

HARDPUNC

public mixed HARDPUNC = 'W1K1NDXHARDPUNC' . DELIM

HEADINGS

public mixed HEADINGS = ['h6' => 8, 'h5' => 10, 'h4' => 12, 'h3' => 14, 'h2' => 18, 'h1' => 24]

HEADINGS_STYLE

public mixed HEADINGS_STYLE = ['h6' => 'Heading6', 'h5' => 'Heading5', 'h4' => 'Heading4', 'h3' => 'Heading3', 'h2' => 'Heading2', 'h1' => 'Heading1']

HEADINGS_STYLE_SIZE

public mixed HEADINGS_STYLE_SIZE = ['h6' => 16, 'h5' => 20, 'h4' => 24, 'h3' => 28, 'h2' => 36, 'h1' => 48]

HIDDENPARASTART

public mixed HIDDENPARASTART = "W1K1NDXHIDDENPARASTART" . DELIM

HTML_BR

public mixed HTML_BR = 'W1K1NDXBR'

HTML_END_FT

public mixed HTML_END_FT = DELIM . 'W1K1NDXENDFT'

HTML_END_P

public mixed HTML_END_P = DELIM . 'W1K1NDXENDP'

HTML_END_TAGELEMENT

public mixed HTML_END_TAGELEMENT = DELIM . 'W1K1NDXENDTAGELEMENT'

HTML_HEADINGS

public mixed HTML_HEADINGS = ['<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>']

HTML_START_ENTITY

public mixed HTML_START_ENTITY = 'W1K1NDXSTARTENTITY' . DELIM

HTML_START_FT

public mixed HTML_START_FT = 'W1K1NDXSTARTFT' . DELIM

HTML_START_HTML

public mixed HTML_START_HTML = 'W1K1NDXSTARTHTML' . DELIM

HTML_START_P

public mixed HTML_START_P = 'W1K1NDXSTARTP' . DELIM

HTML_START_TABLE

public mixed HTML_START_TABLE = 'WIKINDXSTARTTABLE' . DELIM

HTML_START_TAGELEMENT

public mixed HTML_START_TAGELEMENT = 'W1K1NDXSTARTTAGELEMENT' . DELIM

HTMLSENTENCEENDINGS

public mixed HTMLSENTENCEENDINGS = [HTML_END_P, HTML_BR, '</td>', '</li>', 'W1K1NDXSTARTHTML', HTML_START_TABLE, HIDDENPARASTART]

HTMLTOARRAYKEY

public mixed HTMLTOARRAYKEY = [ // Translate some HTML attributes to keys used in the table array constants 'border-style' => 'BorderStyle', 'border-color' => 'BorderColor', 'border' => 'BorderWidth', 'background-color' => 'BackgroundColor', 'text-align' => 'TextAlign', 'vertical-align' => 'VAlign', ]

IGNOREDTAGS

public mixed IGNOREDTAGS = [ // Document metadata "base", "head", "link", "meta", "style", "title", // Content sectioning "aside", // Image and multimedia "area", "audio", "map", "track", "video", // Embedded content "embed", "iframe", "object", "portal", "source", // Scripting "canvas", "script", // Forms "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", // Interactive elements "details", "dialog", "summary", // Web Components "slot", "template", // Obsolete and deprecated elements "applet", "bgsound", "content", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "noembed", "noframes", "param", "plaintext", "rb", "rtc", "shadow", "spacer", ]

IGNOREDTAGS

public mixed IGNOREDTAGS = [ // Document metadata "base", "head", "link", "meta", "style", "title", // Content sectioning "aside", // Image and multimedia "area", "audio", "map", "track", "video", // Embedded content "embed", "iframe", "object", "portal", "source", // Scripting "canvas", "script", // Forms "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", // Interactive elements "details", "dialog", "summary", // Web Components "slot", "template", // Obsolete and deprecated elements "applet", "bgsound", "content", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "noembed", "noframes", "param", "plaintext", "rb", "rtc", "shadow", "spacer", ]

INDENT

public mixed INDENT = 720

INDENT

public mixed INDENT = 18

INDENTS

public mixed INDENTS = ['indentNone' => '', 'indentAll' => '\li' . BLOCKINDENT, 'indentAllLeft' => '\li' . BLOCKINDENT, 'indentAllRight' => '\ri' . BLOCKINDENT, 'indentFL' => '\fi' . BLOCKINDENT, 'indentNotFL' => '\fi-' . BLOCKINDENT . '\li' . BLOCKINDENT, 'indentBoth' => '\ri' . BLOCKINDENT . '\li' . BLOCKINDENT]

JUSTIFICATIONS

public mixed JUSTIFICATIONS = [ // WIKINDX => DOCX 'center' => 'center', 'left' => 'left', 'right' => 'right', 'justify' => 'both', ]

JUSTIFY

public mixed JUSTIFY = ['center' => 'c', 'left' => 'l', 'right' => 'r', 'justify' => 'j']

LEFTCELL

Styling, particularly width, for TD containers

public mixed LEFTCELL = 'generalTable borderStyleSolid left width60percent'

LINE_SPACING

public mixed LINE_SPACING = ['singleSpace' => 240, 'oneSixthSpace' => 276, 'oneHalfSpace' => 360, 'doubleSpace' => 480]

LINESPACINGS

public mixed LINESPACINGS = ['singleSpace' => '\sl240\slmult1', 'oneSixthSpace' => '\sl276\slmult1', 'oneHalfSpace' => '\sl360\slmult1', 'doubleSpace' => '\sl480\slmult1']

LINESPACINGSNUM

public mixed LINESPACINGSNUM = ['1' => '\sl240\slmult1', '1.15' => '\sl276\slmult1', '1.5' => '\sl360\slmult1', '2' => '\sl480\slmult1']

LISTBULLETS

public mixed LISTBULLETS = ['bullet', 'circle', 'square']

LISTBULLETS_RTF

public mixed LISTBULLETS_RTF = ['\ls1\fi-360\li', '\ls2\fi-360\li', '\ls3\fi-360\li']

LISTINDENT

public mixed LISTINDENT = 720

LISTINDENT_EXTRA

public mixed LISTINDENT_EXTRA = 360

LISTORDERS

public mixed LISTORDERS = ['arabic', 'lower-alpha', 'lower-roman']

LISTORDERS_RTF

public mixed LISTORDERS_RTF = ['0', '4', '2']

LISTTYPES

public mixed LISTTYPES = ['aa' => '\ls5\fi-360', 'a' => '\ls0\fi-360', 'ii' => '\ls3\fi-360', 'i' => '\ls2\fi-360', '1' => '\ls4\fi-360', 'bullet' => '\ls1\fi-360']

MAX_LEVEL

public mixed MAX_LEVEL = 8

OL_LIST

public mixed OL_LIST = [0 => 'decimal', 1 => 'lowerLetter', 2 => 'lowerRoman']

PAPERSIZES

public mixed PAPERSIZES = ['A4' => '\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134', 'letter' => '\paperh15840\paperw12240\margl1134\margr1134\margt1134\margb1134', 'A5' => '\paperh11906\paperw8391\margl1134\margr1134\margt1134\margb1134', 'legal' => '\paperh20160\paperw12240\margl1134\margr1134\margt1134\margb1134', 'executive' => '\paperw10440\paperh15120\margl1134\margr1134\margt1134\margb1134']

PIXELSTOPOINTS

public mixed PIXELSTOPOINTS = 0.75

POINTSTOBORDERWIDTH

public mixed POINTSTOBORDERWIDTH = 0.125

QEND

public mixed QEND = DELIM . 'W1K1NDXENDQUOTE'

QENDNEST

public mixed QENDNEST = DELIM . 'W1K1NDXENDNESTEDQUOTE'

QSTART

public mixed QSTART = 'W1K1NDXSTARTQUOTE' . DELIM

QSTARTNEST

public mixed QSTARTNEST = 'W1K1NDXSTARTNESTEDQUOTE' . DELIM

RECONSTITUTE_REMOVE_1

public mixed RECONSTITUTE_REMOVE_1 = [HARDPUNC, URL, SOFTPUNC, BQSTART, BQEND, QSTART, QEND, QSTARTNEST, QENDNEST, DIALOGUEQUOTE, CITATION, CREATORS, CONSECUTIVE, STARTELLIPSES, ENDELLIPSES, STARTSPACE, ENDSPACE, HTML_START_FT, HTML_END_FT, HTML_START_TABLE, HTML_START_ENTITY, HTML_START_HTML, HTML_START_TAGELEMENT, HTML_END_TAGELEMENT, ABBREVIATION, HTML_BR, REPLACEHARDPUNC, DELSPACE, HTML_START_P, HTML_END_P, WTAGTAIL, HIDDENPARASTART]

RECONSTITUTE_REMOVE_2

public mixed RECONSTITUTE_REMOVE_2 = ['W1K1NDXHARDPUNC', 'W1K1NDXURL', 'W1K1NDXSOFTPUNC', 'W1K1NDXSTARTBQ', 'W1K1NDXENDBQ', 'W1K1NDXSTARTQUOTE', 'W1K1NDXENDQUOTE', 'W1K1NDXSTARTNESTEDQUOTE', 'W1K1NDXENDNESTEDQUOTE', 'W1K1NDXDIALOGUEQUOTE', 'W1K1NDXCITATION', 'W1K1NDXCREATORS', 'W1K1NDXCONSECUTIVE', 'W1K1NDXSTARTELLIPSES', 'W1K1NDXENDELLIPSES', 'W1K1NDXSTARTSPACE', 'W1K1NDXENDSPACE', 'W1K1NDXSTARTFT', 'W1K1NDXENDFT', 'WIKINDXSTARTTABLE', 'W1K1NDXSTARTENTITY', 'W1K1NDXSTARTHTML', 'W1K1NDXSTARTTAGELEMENT', 'W1K1NDXENDTAGELEMENT', 'W1K1NDXABBREVIATION', 'W1K1NDXBR', 'W1K1NDXREPLACEHARDPUNC', 'W1K1NDXDELSPACE', 'W1K1NDXSTARTP', 'W1K1NDXENDP', 'W1K1NDX']

REPLACEHARDPUNC

public mixed REPLACEHARDPUNC = 'W1K1NDXREPLACEHARDPUNC'

ROWBORDER

public mixed ROWBORDER = 'trbrdr'

ROWHEIGHT

public mixed ROWHEIGHT = 'trrh'

ROWPADDING

public mixed ROWPADDING = 'trpadd'

ROWPADDING_DEFAULT

public mixed ROWPADDING_DEFAULT = 55

ROWPADDING_UNIT

public mixed ROWPADDING_UNIT = 'trpaddf'

ROWSPACING

public mixed ROWSPACING = 'trspd'

ROWSPACING_DEFAULT

public mixed ROWSPACING_DEFAULT = 0

ROWSPACING_UNIT

public mixed ROWSPACING_UNIT = 'trspdf'

ROWSTART_DEFAULT

public mixed ROWSTART_DEFAULT = 0

SCHEMA_MAIN_2006

public mixed SCHEMA_MAIN_2006 = "http://schemas.openxmlformats.org/drawingml/2006/main"

SCHEMA_MAIN_2010

public mixed SCHEMA_MAIN_2010 = "http://schemas.microsoft.com/office/drawing/2010/main"

SCHEMA_PICTURE

public mixed SCHEMA_PICTURE = "http://schemas.openxmlformats.org/drawingml/2006/picture"

SECTIONSIZE

public mixed SECTIONSIZE = ['A4' => ['size' => ['width' => 11906, 'height' => 16838, 'code' => 9], 'margins' => ['top' => 1440, 'right' => 1440, 'bottom' => 1440, 'left' => 1440, 'header' => 720, 'footer' => 720, 'gutter' => 0], 'cols' => ['space' => 720], 'grid' => ['linePitch' => 360]], 'letter' => ['size' => ['width' => 12240, 'height' => 15840, 'code' => 1], 'margins' => ['top' => 1440, 'right' => 1440, 'bottom' => 1440, 'left' => 1440, 'header' => 720, 'footer' => 720, 'gutter' => 0], 'cols' => ['space' => 720], 'grid' => ['linePitch' => 360]], 'A5' => ['size' => ['width' => 8400, 'height' => 11900, 'code' => 11], 'margins' => ['top' => 1440, 'right' => 1440, 'bottom' => 1440, 'left' => 1440, 'header' => 720, 'footer' => 720, 'gutter' => 0], 'cols' => ['space' => 720], 'grid' => ['linePitch' => 360]], 'legal' => ['size' => ['width' => 12240, 'height' => 20160, 'code' => 5], 'margins' => ['top' => 1440, 'right' => 1440, 'bottom' => 1440, 'left' => 1440, 'header' => 720, 'footer' => 720, 'gutter' => 0], 'cols' => ['space' => 720], 'grid' => ['linePitch' => 360]], 'executive' => ['size' => ['width' => 10440, 'height' => 15120, 'code' => 7], 'margins' => ['top' => 1440, 'right' => 1440, 'bottom' => 1440, 'left' => 1440, 'header' => 720, 'footer' => 720, 'gutter' => 0], 'cols' => ['space' => 720], 'grid' => ['linePitch' => 360]]]

SOFTPUNC

public mixed SOFTPUNC = 'W1K1NDXSOFTPUNC' . DELIM

START_LEVEL

public mixed START_LEVEL = -1

STARTELLIPSES

public mixed STARTELLIPSES = 'W1K1NDXSTARTELLIPSES' . DELIM

STARTSPACE

public mixed STARTSPACE = 'W1K1NDXSTARTSPACE' . DELIM

TABFACTOR

public mixed TABFACTOR = 40

TABLE_UNIT

The row definitions must be output for each row. 'x' refers to a variable additiion.

public mixed TABLE_UNIT = 3

The minimum are: \trowd (starts the row definition) \trleftx (position in twips from the left margin of the left edge of the first cell) \trpaddxx (padding for each edge of the row: emit 4 times adding one of 't', 'l', 'b', 'r' then number in twips) \trpaddfxx (units for each edge of the row: emit 4 times adding one of 't', 'l', 'b', 'r' then TABLE_UNIT)

The cell definitions must be output for each cell. 'x' refers to a variable addition. Padding is not necessary when the row has default padding defined but it is a good idea to do this for each cell The minimum are: \clpadxx (padding for each edge of the row: emit 4 times adding one of 't', 'l', 'b', 'r' then number in twips) \clpadfxx (units for each edge of the row: emit 4 times adding one of 't', 'l', 'b', 'r' then TABLE_UNIT)

Borders are part of cell definitions. If no borders are required, emit no border definitions. HTML only does borders around the whole table or around each cell. RTF does borders for each cell edge. If a border is required for a cell, define it for each cell edge. Although RTF cell borders can each have their own style, this is not possible in HTML tables so apply the table cell style to each RTF cell. Note that, if a table border is specified (with no cell borders), the borders must be set appropriately for the cells in each row. See the note in tableCellToRTF() If no width attribute in a table cell, use a reasonable number and \RTF\tables("fixCellWidths") will sort it out based on the number of cells in the row, the table width (default 100%) and the usable margin. Note that, because of the missing width information for some or all cells, the result might not be the same as in tinyMCE. A failsafe.

TABLEWIDTH_DEFAULT

public mixed TABLEWIDTH_DEFAULT = 100

TWIPSTOPIXELS

public mixed TWIPSTOPIXELS = 0.0666666667

TWIPSTOPIXELS

public mixed TWIPSTOPIXELS = 0.0666666667

TWIPSTOPOINTS

public mixed TWIPSTOPOINTS = 0.05

TWIPSTOPOINTS

public mixed TWIPSTOPOINTS = 0.05

UL_FONTS

public mixed UL_FONTS = [0 => ['ascii' => 'Symbol', 'hAnsi' => 'Symbol'], 1 => ['ascii' => 'Courier New', 'hAnsi' => 'Courier New'], 2 => ['ascii' => 'Wingdings', 'hAnsi' => 'Wingdings']]

UL_LIST

public mixed UL_LIST = [ 0 => '•', // Symbol 1 => 'o', // Courier New 2 => '§', ]

URL

public mixed URL = 'W1K1NDXURL' . DELIM

USABLEHEIGHT

public mixed USABLEHEIGHT = [ // Set to paper height less margin top and margin bottom. For e.g., images 'A4' => 13958, 'letter' => 12960, 'A5' => 9020, 'legal' => 17280, 'executive' => 12240, ]

USABLEWIDTH

public mixed USABLEWIDTH = [ // Set to paper width less margin left and margin right. For e.g., images 'A4' => 9026, 'letter' => 9360, 'A5' => 5520, 'legal' => 9360, 'executive' => 7560, ]

USABLEWIDTHS

public mixed USABLEWIDTHS = [ // Set to paper width less margin left and margin right. For e.g., table and hr widths 'A4' => 9638, 'letter' => 9972, 'A5' => 6123, 'legal' => 9972, 'executive' => 12852, ]

WIKINDX_ATOM_PAGE

public mixed WIKINDX_ATOM_PAGE = '/index.php?action=rss_RSS_CORE&method=atom10'

WIKINDX_BROWSEBIBLIOGRAPHY_DEFAULT

public mixed WIKINDX_BROWSEBIBLIOGRAPHY_DEFAULT = \FALSE

WIKINDX_BROWSER_TAB_ID

public mixed WIKINDX_BROWSER_TAB_ID = $value

WIKINDX_CHARSET

Default charset

public mixed WIKINDX_CHARSET = 'UTF-8'
Tags
global

string WIKINDX_CHARSET

WIKINDX_CMS_PAGE

public mixed WIKINDX_CMS_PAGE = '/cmsprint.php'

WIKINDX_COMPONENTS_COMPATIBLE_VERSION

Components compatibility

public mixed WIKINDX_COMPONENTS_COMPATIBLE_VERSION = [ 'plugin' => 20, // Must be an integer 'style' => 31, // Must be an integer 'template' => 8, ]

This array is used by LOADPLUGINS class and \COMPONENT\checkComponentIntegrity() to check components compatibility with the core.

Each type of component has its own compatibility version because they do not have the same lifecycle.

Tags
global

int[] WIKINDX_COMPONENTS_COMPATIBLE_VERSION

WIKINDX_COMPONENTS_STYLE_JSON_FIRST_VERSION

First version of Json style components

public mixed WIKINDX_COMPONENTS_STYLE_JSON_FIRST_VERSION = 29

After this version the style components are automatically updated on loading by class PARSESTYLEJSON.

Tags
global

int WIKINDX_COMPONENTS_STYLE_JSON_FIRST_VERSION

WIKINDX_COMPONENTS_UPDATE_SERVER_DEFAULT

public mixed WIKINDX_COMPONENTS_UPDATE_SERVER_DEFAULT = 'https://wikindx.sourceforge.io/cus/index.php'

WIKINDX copyright

public mixed WIKINDX_COPYRIGHT_YEAR = "2003-2026"
global

string WIKINDX_COPYRIGHT_YEAR

WIKINDX_CURRENT_DB_ENGINE_NAME

public mixed WIKINDX_CURRENT_DB_ENGINE_NAME = $EngineName

WIKINDX_CURRENT_DB_ENGINE_VERSION

public mixed WIKINDX_CURRENT_DB_ENGINE_VERSION = $aEngineVersion

WIKINDX_DB_HOST_DEFAULT

Default name of the MariaDB/MySQL host server (case-insensitive)

public mixed WIKINDX_DB_HOST_DEFAULT = 'localhost'
Tags
global

string WIKINDX_DB_HOST_DEFAULT

WIKINDX_DB_MAX_ALLOWED_PACKET

MySQL GLOBAL max_allowed_packet option

public mixed WIKINDX_DB_MAX_ALLOWED_PACKET = 1073741824

Support the largest fields size used (LONGTEXT)

According to https://dev.mysql.com/doc/refman/8.0/en/blob.html, max_allowed_packet need to be as large as the largest type of column stored and we use LONGTEXT so we need the maximum value allowed 1G (in the absence of 4G).

Tags
see
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_allowed_packet
global

int WIKINDX_DB_MAX_ALLOWED_PACKET

WIKINDX_DB_PASSWORD_DEFAULT

Default password of the user required to connect to and open the database (case-sensitive)

public mixed WIKINDX_DB_PASSWORD_DEFAULT = 'wikindx'
Tags
global

string WIKINDX_DB_PASSWORD_DEFAULT

WIKINDX_DB_TIMEZONE

MySQL timezone option

public mixed WIKINDX_DB_TIMEZONE = '+00:00'

The database always stores data in UTC, and it is up to PHP to perform the conversion when necessary, depending on the global configuration and user preferences.

The "time difference" notation is preferred to the "time zone name" notation because the name resolution functionality is optional in the MySQL/MariaDB engine.

Tags
see
https://dev.mysql.com/doc/refman/8.4/en/time-zone-support.html
global

string WIKINDX_DB_TIMEZONE

WIKINDX_DB_USER_DEFAULT

Default username required to connect to and open the database (case-sensitive)

public mixed WIKINDX_DB_USER_DEFAULT = 'wikindx'
Tags
global

string WIKINDX_DB_USER_DEFAULT

WIKINDX_DIR_BASE

public mixed WIKINDX_DIR_BASE = \realpath(\implode(\DIRECTORY_SEPARATOR, [__DIR__, '..', '..']))

WIKINDX_DIR_CACHE

public mixed WIKINDX_DIR_CACHE = 'cache'

WIKINDX_DIR_CACHE_ATTACHMENTS

public mixed WIKINDX_DIR_CACHE_ATTACHMENTS = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CACHE, 'attachments'])

WIKINDX_DIR_CACHE_FILES

public mixed WIKINDX_DIR_CACHE_FILES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CACHE, 'files'])

WIKINDX_DIR_CACHE_PLUGINS

public mixed WIKINDX_DIR_CACHE_PLUGINS = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CACHE, 'plugins'])

WIKINDX_DIR_CACHE_STYLES

public mixed WIKINDX_DIR_CACHE_STYLES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CACHE, 'styles'])

WIKINDX_DIR_CACHE_TEMPLATES

public mixed WIKINDX_DIR_CACHE_TEMPLATES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CACHE, 'templates'])

WIKINDX_DIR_COMPONENT

public mixed WIKINDX_DIR_COMPONENT = 'components'

WIKINDX_DIR_COMPONENT_PLUGINS

public mixed WIKINDX_DIR_COMPONENT_PLUGINS = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_COMPONENT, 'plugins'])

WIKINDX_DIR_COMPONENT_STYLES

public mixed WIKINDX_DIR_COMPONENT_STYLES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_COMPONENT, 'styles'])

WIKINDX_DIR_COMPONENT_TEMPLATES

public mixed WIKINDX_DIR_COMPONENT_TEMPLATES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_COMPONENT, 'templates'])

WIKINDX_DIR_CORE

public mixed WIKINDX_DIR_CORE = 'core'

WIKINDX_DIR_CORE_LANGUAGES

public mixed WIKINDX_DIR_CORE_LANGUAGES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_CORE, 'messages'])

WIKINDX_DIR_DATA

public mixed WIKINDX_DIR_DATA = 'data'

WIKINDX_DIR_DATA_ATTACHMENTS

public mixed WIKINDX_DIR_DATA_ATTACHMENTS = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DATA, 'attachments'])

WIKINDX_DIR_DATA_IMAGES

public mixed WIKINDX_DIR_DATA_IMAGES = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DATA, 'images'])

WIKINDX_DIR_DATA_PLUGINS

public mixed WIKINDX_DIR_DATA_PLUGINS = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DATA, 'plugins'])

WIKINDX_DIR_DB_SCHEMA

Root folder storing SQL Scripts used for a full db schema creation or an upgrades

public mixed WIKINDX_DIR_DB_SCHEMA = 'dbschema'
Tags
global

string WIKINDX_DIR_DB_SCHEMA

WIKINDX_DIR_DOCS

PhpDocumentor default directory

public mixed WIKINDX_DIR_DOCS = 'docs'
Tags
global

string WIKINDX_DIR_DOCS

WIKINDX_DIR_LOG

Log files folder

public mixed WIKINDX_DIR_LOG = 'log'
Tags
global

string WIKINDX_DIR_LOG

WIKINDX_DIR_PUBLIC

Folder of public files that can be directly called by a browser without checking permissions (usually JS and CSS files)

public mixed WIKINDX_DIR_PUBLIC = 'public'
Tags
global

string WIKINDX_DIR_PUBLIC

public mixed WIKINDX_DISPLAY_CMS_LINK_DEFAULT = \FALSE

WIKINDX_DISPLAY_RESOURCE_STATISTICS_DEFAULT

public mixed WIKINDX_DISPLAY_RESOURCE_STATISTICS_DEFAULT = \FALSE

WIKINDX_DOUBLEQUOTE_WIKINDX

Special constants used to do replacements required for SQL and similar.

public mixed WIKINDX_DOUBLEQUOTE_WIKINDX = 'WIKINDXDOUBLEQUOTEWIKINDX'

Typically used to temporarily replace literal characters in strings to protect them from incorrect interpretation.

Tags
global

string WIKINDX_DOUBLEQUOTE_WIKINDX

WIKINDX_FILE_ATTACH_SIZE_UPPER_LIMIT

Max file size of an attachment

public mixed WIKINDX_FILE_ATTACH_SIZE_UPPER_LIMIT = 4000
Tags
global

int WIKINDX_FILE_ATTACH_SIZE_UPPER_LIMIT

WIKINDX_FILE_REPAIRKIT_DB_SCHEMA

Database schema description file for RepairKit component

public mixed WIKINDX_FILE_REPAIRKIT_DB_SCHEMA = \implode(\DIRECTORY_SEPARATOR, [\WIKINDX_DIR_DB_SCHEMA, 'repairkit.schema.json'])
Tags
global

string WIKINDX_DIR_PUBLIC

public mixed WIKINDX_HEADER_SESSION_COOKIE_SECURE_ATTRIBUTE_DEFAULT = \FALSE

WIKINDX_HEADER_STRICT_TRANSPORT_SECURITY_DEFAULT

public mixed WIKINDX_HEADER_STRICT_TRANSPORT_SECURITY_DEFAULT = \FALSE

WIKINDX_HOMEBIB_DEFAULT

public mixed WIKINDX_HOMEBIB_DEFAULT = \FALSE

WIKINDX_IMG_SIZE_UPPER_LIMIT

Max file size of an 8K 24 bits colors bmp image

public mixed WIKINDX_IMG_SIZE_UPPER_LIMIT = 200
Tags
global

int WIKINDX_IMG_SIZE_UPPER_LIMIT

WIKINDX_INTERNAL_PUBLIC_VERSION_MAPPING

WIKINDX internal-official/public version mapping

public mixed WIKINDX_INTERNAL_PUBLIC_VERSION_MAPPING = ["153" => "6.13.0", "151" => "6.12.1", "139" => "6.12.0", "138" => "6.11.0", "128" => "6.8.0", "114" => "6.7.1", "113" => "6.6.8", "112" => "6.6.6", "111" => "6.6.4", "74" => "6.6.0", "73" => "6.4.14", "72" => "6.4.11", "70" => "6.4.10", "65" => "6.4.9", "59" => "6.4.8", "57" => "6.4.7", "55" => "6.4.6", "54" => "6.4.5", "46" => "6.4.4", "42" => "6.4.2", "38" => "6.4.1", "23" => "6.4.0", "15" => "6.3.8", "12" => "6.2.2", "11" => "6.2.1", "10" => "6.0.8", "9" => "6.0.6", "8" => "6.0.5", "7" => "6.0.4", "6" => "6.0.0", "5.9" => "5.9.1", "5.8" => "5.8.2", "5.5" => "5.7.0", "5.4" => "5.3.1", "5.3" => "5.2.2", "5.2" => "5.2.0", "5.1" => "5.1"]

This array (internal version => "public version", ...) is used to find the minimum public version upgraded by an internal version.

Add an entry when an internal version is added, but if you have to add many internal versions for a single public version, add only the lowest.

Tags
global

array WIKINDX_INTERNAL_PUBLIC_VERSION_MAPPING

WIKINDX_INTERNAL_VERSION

WIKINDX internal version information

public mixed WIKINDX_INTERNAL_VERSION = 158.0

This number MUST be a positive integer (written as a float), and should be incremented by one each time an upgrade need to be triggered. Before the value 6, this number was a float corresponding (or not) to part X.Y of the public version number.

Tags
global

float WIKINDX_INTERNAL_VERSION

WIKINDX_INTERNAL_VERSION_UPGRADE_MIN

WIKINDX minimum internal version upgradable

public mixed WIKINDX_INTERNAL_VERSION_UPGRADE_MIN = 5.1

The syntax is the same as for WIKINDX_INTERNAL_VERSION.

A database with a lower version number cannot be upgraded.

Tags
global

float WIKINDX_INTERNAL_VERSION_UPGRADE_MIN

WIKINDX_LANGUAGE_DOMAIN_DEFAULT

Translation domain name of the core part

public mixed WIKINDX_LANGUAGE_DOMAIN_DEFAULT = 'wikindx'

WIKINDX_LANGUAGE_NAME_DEFAULT

Default language

public mixed WIKINDX_LANGUAGE_NAME_DEFAULT = 'English (United Kingdom)'

WIKINDX_LDAP_DEBUG_LEVEL

public mixed WIKINDX_LDAP_DEBUG_LEVEL = 7

WIKINDX_LDAP_GROUP_TYPE_FILTER

public mixed WIKINDX_LDAP_GROUP_TYPE_FILTER = '(|(sAMAccountType=268435456)(sAMAccountType=268435457))'

WIKINDX_LDAP_SEARCH_METHOD_LIST

public mixed WIKINDX_LDAP_SEARCH_METHOD_LIST = ['list' => 'list', 'tree' => 'tree']

WIKINDX_LDAP_SEARCH_OPERATOR_LIST

public mixed WIKINDX_LDAP_SEARCH_OPERATOR_LIST = ['or' => 'or', 'and' => 'and']

WIKINDX_LDAP_SERVER_BIND_DOMAIN_FORMAT_DEFAULT

public mixed WIKINDX_LDAP_SERVER_BIND_DOMAIN_FORMAT_DEFAULT = 'upn'

WIKINDX_LDAP_SERVER_BIND_DOMAIN_FORMAT_LIST

public mixed WIKINDX_LDAP_SERVER_BIND_DOMAIN_FORMAT_LIST = ['none' => 'none', 'sam' => 'sam', 'upn' => 'upn']

WIKINDX_LDAP_SERVER_BIND_TYPE_LIST

public mixed WIKINDX_LDAP_SERVER_BIND_TYPE_LIST = ['anonymous' => 'anonymous', 'binduser' => 'binduser', 'user' => 'user']

WIKINDX_LDAP_SERVER_ENCRYPTION_LIST

public mixed WIKINDX_LDAP_SERVER_ENCRYPTION_LIST = ['none' => 'none', 'ssl' => 'ssl', 'starttls' => 'starttls']

WIKINDX_LDAP_SERVER_NETWORK_TIMEOUT

public mixed WIKINDX_LDAP_SERVER_NETWORK_TIMEOUT = 10

WIKINDX_LDAP_SERVER_RESPONSE_TIMEOUT

public mixed WIKINDX_LDAP_SERVER_RESPONSE_TIMEOUT = 15

WIKINDX_LDAP_USE_REFERRALS

public mixed WIKINDX_LDAP_USE_REFERRALS = 0

WIKINDX_LDAP_USER_ATTRIBUTE_EMAIL

public mixed WIKINDX_LDAP_USER_ATTRIBUTE_EMAIL = 'mail'

WIKINDX_LDAP_USER_ATTRIBUTE_FULLNAME

public mixed WIKINDX_LDAP_USER_ATTRIBUTE_FULLNAME = 'displayname'

WIKINDX_LDAP_USER_ATTRIBUTE_LOGIN_DEFAULT

public mixed WIKINDX_LDAP_USER_ATTRIBUTE_LOGIN_DEFAULT = 'sAMAccountName'

WIKINDX_LDAP_USER_ATTRIBUTE_LOGIN_LIST

public mixed WIKINDX_LDAP_USER_ATTRIBUTE_LOGIN_LIST = ['CN' => 'CN', 'sAMAccountName' => 'sAMAccountName', 'uid' => 'uid', 'userPrincipalName' => 'userPrincipalName']

WIKINDX_LDAP_USER_TYPE_FILTER

public mixed WIKINDX_LDAP_USER_TYPE_FILTER = '(sAMAccountType=805306368)'

WIKINDX_MARIADB_VERSION_MIN

Minimum required PHP version

public mixed WIKINDX_MARIADB_VERSION_MIN = '10.11'
Tags
see
MariaDB

EOL https://endoflife.date/mariadb

global

string WIKINDX_MARIADB_VERSION_MIN

WIKINDX_MAX_EXECUTION_TIMEOUT_DEFAULT

Default max execution time of a script/page (in seconds, or FALSE)

public mixed WIKINDX_MAX_EXECUTION_TIMEOUT_DEFAULT = 60
Tags
global

bool|int WIKINDX_MAX_EXECUTION_TIMEOUT_DEFAULT

WIKINDX_MAX_MULTIUPDATES

This can be used to control the number of SET statements in SQL::multUpdate() and SQL::multiUpdateNull() statements by triggering the statement only when the number of bytes in the update array sent to the statement is larger than this constant.

public mixed WIKINDX_MAX_MULTIUPDATES = \WIKINDX_DB_MAX_ALLOWED_PACKET - 1000000

1_000_000 bytes is a sensible margin.

Tags
global

int WIKINDX_MAX_MULTIUPDATES

WIKINDX_MEMORY_LIMIT_DEFAULT

Default custom value for PHP memory_limit option (interger, string, or FALSE)

public mixed WIKINDX_MEMORY_LIMIT_DEFAULT = '1G'
Tags
global

bool|int WIKINDX_MEMORY_LIMIT_DEFAULT

WIKINDX_MENU_DESKTOP_CONFIG_DEFAULT

public mixed WIKINDX_MENU_DESKTOP_CONFIG_DEFAULT = \serialize(['main' => []])

WIKINDX_MENU_MOBILE_CONFIG_DEFAULT

public mixed WIKINDX_MENU_MOBILE_CONFIG_DEFAULT = \serialize(['main' => []])

WIKINDX_MIMETYPE_ABW

public mixed WIKINDX_MIMETYPE_ABW = 'application/x-abiword'

WIKINDX_MIMETYPE_ATOM

public mixed WIKINDX_MIMETYPE_ATOM = 'application/atom+xml'

WIKINDX_MIMETYPE_BIB

public mixed WIKINDX_MIMETYPE_BIB = 'application/x-bibtex'

WIKINDX_MIMETYPE_CSV

public mixed WIKINDX_MIMETYPE_CSV = 'text/csv'

WIKINDX_MIMETYPE_DJV

public mixed WIKINDX_MIMETYPE_DJV = 'image/vnd.djvu'

WIKINDX_MIMETYPE_DOC

public mixed WIKINDX_MIMETYPE_DOC = 'application/msword'

WIKINDX_MIMETYPE_DOCM

public mixed WIKINDX_MIMETYPE_DOCM = 'application/vnd.ms-word.document.macroEnabled.12'

WIKINDX_MIMETYPE_DOCX

public mixed WIKINDX_MIMETYPE_DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'

WIKINDX_MIMETYPE_DOTM

public mixed WIKINDX_MIMETYPE_DOTM = 'application/vnd.ms-word.template.macroEnabled.12'

WIKINDX_MIMETYPE_DOTX

public mixed WIKINDX_MIMETYPE_DOTX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'

WIKINDX_MIMETYPE_DVI

public mixed WIKINDX_MIMETYPE_DVI = 'application/x-dvi'

WIKINDX_MIMETYPE_ENDNOTE

public mixed WIKINDX_MIMETYPE_ENDNOTE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml'

WIKINDX_MIMETYPE_EPUB

public mixed WIKINDX_MIMETYPE_EPUB = 'application/epub+zip'

WIKINDX_MIMETYPE_FB

public mixed WIKINDX_MIMETYPE_FB = 'application/x-fictionbook'

WIKINDX_MIMETYPE_HTML

public mixed WIKINDX_MIMETYPE_HTML = 'text/html'

WIKINDX_MIMETYPE_JS

public mixed WIKINDX_MIMETYPE_JS = 'application/javascript'

WIKINDX_MIMETYPE_JSON

public mixed WIKINDX_MIMETYPE_JSON = 'application/json'

WIKINDX_MIMETYPE_KWD

public mixed WIKINDX_MIMETYPE_KWD = 'application/vnd.kde.kword'

WIKINDX_MIMETYPE_LWP

public mixed WIKINDX_MIMETYPE_LWP = 'application/vnd.lotus-wordpro'

WIKINDX_MIMETYPE_MD

public mixed WIKINDX_MIMETYPE_MD = 'text/markdown'

WIKINDX_MIMETYPE_MHT_ALT

public mixed WIKINDX_MIMETYPE_MHT_ALT = 'message/alternative'

WIKINDX_MIMETYPE_MHT_APP

public mixed WIKINDX_MIMETYPE_MHT_APP = 'application/x-mimearchive'

WIKINDX_MIMETYPE_MHT_MIX

public mixed WIKINDX_MIMETYPE_MHT_MIX = 'message/mixed'

WIKINDX_MIMETYPE_MHT_MUL

public mixed WIKINDX_MIMETYPE_MHT_MUL = 'multipart/related'

WIKINDX_MIMETYPE_MHT_RFC

public mixed WIKINDX_MIMETYPE_MHT_RFC = 'message/rfc822'

WIKINDX_MIMETYPE_ODP

public mixed WIKINDX_MIMETYPE_ODP = 'application/vnd.oasis.opendocument.presentation'

WIKINDX_MIMETYPE_ODT

public mixed WIKINDX_MIMETYPE_ODT = 'application/vnd.oasis.opendocument.text'

WIKINDX_MIMETYPE_OTP

public mixed WIKINDX_MIMETYPE_OTP = 'application/vnd.oasis.opendocument.presentation-template'

WIKINDX_MIMETYPE_OTT

public mixed WIKINDX_MIMETYPE_OTT = 'application/vnd.oasis.opendocument.text-template'

WIKINDX_MIMETYPE_OXPS

public mixed WIKINDX_MIMETYPE_OXPS = 'application/oxps'

WIKINDX_MIMETYPE_PDF

public mixed WIKINDX_MIMETYPE_PDF = 'application/pdf'

WIKINDX_MIMETYPE_PHP

public mixed WIKINDX_MIMETYPE_PHP = 'application/x-httpd-php'

WIKINDX_MIMETYPE_POTM

public mixed WIKINDX_MIMETYPE_POTM = 'application/vnd.ms-powerpoint.template.macroEnabled.12'

WIKINDX_MIMETYPE_POTX

public mixed WIKINDX_MIMETYPE_POTX = 'application/vnd.openxmlformats-officedocument.presentationml.template'

WIKINDX_MIMETYPE_PPT

public mixed WIKINDX_MIMETYPE_PPT = 'application/vnd.ms-powerpoint'

WIKINDX_MIMETYPE_PPTM

public mixed WIKINDX_MIMETYPE_PPTM = 'application/vnd.ms-powerpoint.presentation.macroEnabled.12'

WIKINDX_MIMETYPE_PPTX

public mixed WIKINDX_MIMETYPE_PPTX = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'

WIKINDX_MIMETYPE_PS

public mixed WIKINDX_MIMETYPE_PS = 'application/postscript'

WIKINDX_MIMETYPE_RIS

public mixed WIKINDX_MIMETYPE_RIS = 'application/x-research-info-systems'

WIKINDX_MIMETYPE_RSS

public mixed WIKINDX_MIMETYPE_RSS = 'application/rss+xml'

WIKINDX_MIMETYPE_RTF_APP

public mixed WIKINDX_MIMETYPE_RTF_APP = 'application/rtf'

WIKINDX_MIMETYPE_RTF_TEXT

public mixed WIKINDX_MIMETYPE_RTF_TEXT = 'text/rtf'

WIKINDX_MIMETYPE_SCRIBUS

public mixed WIKINDX_MIMETYPE_SCRIBUS = 'application/vnd.scribus'

WIKINDX_MIMETYPE_STI

public mixed WIKINDX_MIMETYPE_STI = 'application/vnd.sun.xml.impress.template'

WIKINDX_MIMETYPE_STW

public mixed WIKINDX_MIMETYPE_STW = 'application/vnd.sun.xml.writer.template'

WIKINDX_MIMETYPE_SXI

public mixed WIKINDX_MIMETYPE_SXI = 'application/vnd.sun.xml.impress'

WIKINDX_MIMETYPE_SXW

public mixed WIKINDX_MIMETYPE_SXW = 'application/vnd.sun.xml.writer'

WIKINDX_MIMETYPE_TEI

public mixed WIKINDX_MIMETYPE_TEI = 'application/tei+xml'

WIKINDX_MIMETYPE_TROFF

public mixed WIKINDX_MIMETYPE_TROFF = 'text/troff'

WIKINDX_MIMETYPE_TXT

public mixed WIKINDX_MIMETYPE_TXT = 'text/plain'

WIKINDX_MIMETYPE_WML

public mixed WIKINDX_MIMETYPE_WML = 'text/vnd.wap.wml'

WIKINDX_MIMETYPE_WMLC

public mixed WIKINDX_MIMETYPE_WMLC = 'application/vnd.wap.wmlc'

WIKINDX_MIMETYPE_WPD

public mixed WIKINDX_MIMETYPE_WPD = 'application/vnd.wordperfect'

WIKINDX_MIMETYPE_WPD51

public mixed WIKINDX_MIMETYPE_WPD51 = 'application/wordperfect5.1'

WIKINDX_MIMETYPE_WPS

public mixed WIKINDX_MIMETYPE_WPS = 'application/vnd.ms-works'

WIKINDX_MIMETYPE_WRI

public mixed WIKINDX_MIMETYPE_WRI = 'application/mswrite'

WIKINDX_MIMETYPE_XHTML

public mixed WIKINDX_MIMETYPE_XHTML = 'application/xml+html'

WIKINDX_MIMETYPE_XML_APP

public mixed WIKINDX_MIMETYPE_XML_APP = 'application/xml'

WIKINDX_MIMETYPE_XML_TEXT

public mixed WIKINDX_MIMETYPE_XML_TEXT = 'text/xml'

WIKINDX_MIMETYPE_XPDF

public mixed WIKINDX_MIMETYPE_XPDF = 'application/x-pdf'

WIKINDX_MIMETYPE_XPS

public mixed WIKINDX_MIMETYPE_XPS = 'application/vnd.ms-xpsdocument'

WIKINDX_MIMETYPE_ZIP

public mixed WIKINDX_MIMETYPE_ZIP = 'application/zip'

WIKINDX_MYSQL_VERSION_MIN

Minimum required PHP version

public mixed WIKINDX_MYSQL_VERSION_MIN = '8.4.0'
Tags
see
MySQL

EOL https://endoflife.date/mysql

global

string WIKINDX_MYSQL_VERSION_MIN

WIKINDX_NO_SORT_DEFAULT

public mixed WIKINDX_NO_SORT_DEFAULT = \implode(",", ['an', 'a', 'the', 'der', 'die', 'das', 'ein', 'eine', 'einer', 'eines', 'le', 'la', 'las', 'il', 'les', 'une', 'un', 'una', 'uno', 'lo', 'los', 'i', 'gli', 'de', 'het', 'um', 'uma', 'o', 'os', 'as', 'den', 'det', 'en', 'et', 'du', 'des'])

WIKINDX_OFFICE_API_VERSION

Office add-ins API version

public mixed WIKINDX_OFFICE_API_VERSION = 2

In each add-in (Word, Google Docs, LibreOffice etc.) the compatibility variable must equal this.

Tags
global

int WIKINDX_OFFICE_API_VERSION

WIKINDX_PACKAGE_HASH_ALGO

Algo used for hashing the packages released by the project

public mixed WIKINDX_PACKAGE_HASH_ALGO = 'sha256'
Tags
global

string WIKINDX_COMPONENTS_UPDATE_SERVER

WIKINDX_PATH_AUTO_DETECTION_DEFAULT

Default value of path auto detection feature (for Virtual Host Apache config)

public mixed WIKINDX_PATH_AUTO_DETECTION_DEFAULT = \TRUE
Tags
global

bool WIKINDX_PATH_AUTO_DETECTION_DEFAULT

WIKINDX_PHP_TIMEZONE

Timezone for PHP defaults

public mixed WIKINDX_PHP_TIMEZONE = 'UTC'

Just like the database (see WIKINDX_DB_TIMEZONE), PHP is configured by default to use UTC.

It is the responsibility of the display or form processing code to convert UTC dates to the user's preferred timezone (and vice versa), or failing that, the one defined by the administrator.

Use \DATE\determine_timezone() to get the user preferred timezone.

Tags
global

string WIKINDX_PHP_TIMEZONE

WIKINDX_PHP_VERSION_MAX

Maximum required PHP version

public mixed WIKINDX_PHP_VERSION_MAX = '8.5.99'
Tags
global

string WIKINDX_PHP_VERSION_MAX

WIKINDX_PHP_VERSION_MIN

Minimum required PHP version

public mixed WIKINDX_PHP_VERSION_MIN = '8.2.0'
Tags
global

string WIKINDX_PHP_VERSION_MIN

WIKINDX_PHPMAILER_BACKENDS

public mixed WIKINDX_PHPMAILER_BACKENDS = ['smtp' => 'SMTP', 'sendmail' => 'Sendmail']

WIKINDX_PHPMAILER_SMTP_AUTHTYPE

Mapping list of SMTP auth methods of PHPMailer with Wikindx options

public mixed WIKINDX_PHPMAILER_SMTP_AUTHTYPE = ['none' => 'None', '' => 'Auto', 'CRAM-MD5' => 'CRAM-MD5', 'LOGIN' => 'LOGIN', 'PLAIN' => 'PLAIN']

NB: 'None' is used for PHPMailer\PHPMailer->SMTPAuth and others for PHPMailer\SMTP->AuthType.

Tags
see
https://phpmailer.github.io/PHPMailer/classes/PHPMailer-PHPMailer-PHPMailer.html#property_SMTPAuth
https://phpmailer.github.io/PHPMailer/classes/PHPMailer-PHPMailer-PHPMailer.html#property_AuthType
global

array WIKINDX_PHPMAILER_SMTP_AUTHTYPE_LIST

WIKINDX_POPULARITY_DOWNLOADS_WEIGHT

STATISTICS WEIGHTS

public mixed WIKINDX_POPULARITY_DOWNLOADS_WEIGHT = 0.75

This value is relative to WIKINDX_POPULARITY_VIEWS_WEIGHT and should total 1.0.

Tags
global

float WIKINDX_POPULARITY_DOWNLOADS_WEIGHT

WIKINDX_POPULARITY_VIEWS_WEIGHT

STATISTICS WEIGHTS

public mixed WIKINDX_POPULARITY_VIEWS_WEIGHT = 0.25

This value is relative to WIKINDX_POPULARITY_DOWNLOADS_WEIGHT and should total 1.0.

Tags
global

float WIKINDX_POPULARITY_VIEWS_WEIGHT

WIKINDX_PUBLIC_VERSION

WIKINDX official/public version information

public mixed WIKINDX_PUBLIC_VERSION = '6.16.1'

This number is the official release version used by the update server to download the components.

It can be of the form X.Y.Z or X.Y.Z-rcN (with X, Y, Z, and N positive integers).

Tags
global

string WIKINDX_PUBLIC_VERSION

WIKINDX_RELEASE_DATE

WIKINDX release date

public mixed WIKINDX_RELEASE_DATE = "2026-05-11"
Tags
global

string WIKINDX_RELEASE_DATE

WIKINDX_RELEASE_TIMESTAMP

WIKINDX release timestamp

public mixed WIKINDX_RELEASE_TIMESTAMP = (new \DateTime(\WIKINDX_RELEASE_DATE))->getTimestamp()

The release script use it to change the date of files and make archives reproducible.

Tags
global

int WIKINDX_RELEASE_TIMESTAMP

WIKINDX_RSS_DESCRIPTION_DEFAULT

public mixed WIKINDX_RSS_DESCRIPTION_DEFAULT = \WIKINDX_DESCRIPTION_DEFAULT

WIKINDX_RSS_DISPLAY_EDITED_RESOURCES_DEFAULT

public mixed WIKINDX_RSS_DISPLAY_EDITED_RESOURCES_DEFAULT = \FALSE

WIKINDX_RSS_PAGE

public mixed WIKINDX_RSS_PAGE = '/index.php?action=rss_RSS_CORE&method=rss20'

WIKINDX_SEARCH_FILTER_DEFAULT

public mixed WIKINDX_SEARCH_FILTER_DEFAULT = \implode(",", ['an', 'a', 'the', 'and', 'to', 'und', 'et'])

WIKINDX_SESSION_AUTH_MAXLIFETIME_UPPER_LIMIT

public mixed WIKINDX_SESSION_AUTH_MAXLIFETIME_UPPER_LIMIT = 86400

WIKINDX_SESSION_AUTH_REMEMBERME_MAXLIFETIME_DEFAULT

public mixed WIKINDX_SESSION_AUTH_REMEMBERME_MAXLIFETIME_DEFAULT = 2678400

WIKINDX_SESSION_AUTH_REMEMBERME_MAXLIFETIME_UPPER_LIMIT

public mixed WIKINDX_SESSION_AUTH_REMEMBERME_MAXLIFETIME_UPPER_LIMIT = 2678400

WIKINDX_SESSION_GC_DIVISOR

public mixed WIKINDX_SESSION_GC_DIVISOR = 10

WIKINDX_SESSION_GC_FREQUENCY

public mixed WIKINDX_SESSION_GC_FREQUENCY = 300

WIKINDX_SESSION_GC_LASTEXEC_TIMESTAMP_DEFAULT

public mixed WIKINDX_SESSION_GC_LASTEXEC_TIMESTAMP_DEFAULT = \time()

WIKINDX_SESSION_GC_MAXLIFETIME

public mixed WIKINDX_SESSION_GC_MAXLIFETIME = 60

WIKINDX_SESSION_GC_PROBABILITY

public mixed WIKINDX_SESSION_GC_PROBABILITY = 1

WIKINDX_SESSION_NAME

public mixed WIKINDX_SESSION_NAME = 'WKXSESSID'

WIKINDX_SESSION_NOTAUTH_MAXLIFETIME_DEFAULT

public mixed WIKINDX_SESSION_NOTAUTH_MAXLIFETIME_DEFAULT = 3600

WIKINDX_SESSION_NOTAUTH_MAXLIFETIME_UPPER_LIMIT

public mixed WIKINDX_SESSION_NOTAUTH_MAXLIFETIME_UPPER_LIMIT = 86400

WIKINDX_SINGLEQUOTE_WIKINDX

Special constants used to do replacements required for SQL and similar.

public mixed WIKINDX_SINGLEQUOTE_WIKINDX = 'WIKINDXSINGLEQUOTEWIKINDX'

Typically used to temporarily replace literal characters in strings to protect them from incorrect interpretation.

Tags
global

string WIKINDX_SINGLEQUOTE_WIKINDX

WIKINDX_SITEMAP_MAX_SIZE

Max number of url by page in a sitemap (50000 max. allowed in the standard and 10 Mo max.)

public mixed WIKINDX_SITEMAP_MAX_SIZE = 500

For a response time and analysis of the response 500 links per page seems reasonable, ie below the second, as the search engines expect..

Tags
global

int WIKINDX_SITEMAP_MAX_SIZE

WIKINDX_SITEMAP_PAGE

URL of the website sitemap

public mixed WIKINDX_SITEMAP_PAGE = '/index.php?action=sitemap_SITEMAP_CORE'
Tags
global

string WIKINDX_SITEMAP_PAGE

WIKINDX_STATISTICS_COMPILED_DEFAULT

public mixed WIKINDX_STATISTICS_COMPILED_DEFAULT = '2018-01-01 01:01:01'

WIKINDX_SUPERADMIN_ID

public mixed WIKINDX_SUPERADMIN_ID = 1

WIKINDX_TAG_FACTOR_MAX

public mixed WIKINDX_TAG_FACTOR_MAX = 200

WIKINDX_TAG_FACTOR_MIN

public mixed WIKINDX_TAG_FACTOR_MIN = 50

WIKINDX_TAG_FACTOR_STEP

public mixed WIKINDX_TAG_FACTOR_STEP = 5

WIKINDX_TEMPLATE_MENU_DEFAULT

public mixed WIKINDX_TEMPLATE_MENU_DEFAULT = 0

WIKINDX_UNIX_PERMS_DEFAULT

public mixed WIKINDX_UNIX_PERMS_DEFAULT = 0777

WIKINDX_URL

WIKINDX SF url

public mixed WIKINDX_URL = 'https://wikindx.sourceforge.io'
Tags
global

WIKINDX_URL

WIKINDX_URL_BASE_DEFAULT

Default base URL of WIKINDX

public mixed WIKINDX_URL_BASE_DEFAULT = ""
Tags
global

string WIKINDX_URL_BASE_DEFAULT

WIKINDX_URL_CACHE

public mixed WIKINDX_URL_CACHE = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_CACHE)

WIKINDX_URL_CACHE_ATTACHMENTS

public mixed WIKINDX_URL_CACHE_ATTACHMENTS = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_CACHE_ATTACHMENTS)

WIKINDX_URL_CACHE_FILES

public mixed WIKINDX_URL_CACHE_FILES = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_CACHE_FILES)

WIKINDX_URL_CACHE_PLUGINS

public mixed WIKINDX_URL_CACHE_PLUGINS = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_CACHE_PLUGINS)

WIKINDX_URL_CACHE_STYLES

public mixed WIKINDX_URL_CACHE_STYLES = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_CACHE_STYLES)

WIKINDX_URL_CACHE_TEMPLATES

public mixed WIKINDX_URL_CACHE_TEMPLATES = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_CACHE_TEMPLATES)

WIKINDX_URL_COMPONENT

public mixed WIKINDX_URL_COMPONENT = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_COMPONENT)

WIKINDX_URL_COMPONENT_PLUGINS

public mixed WIKINDX_URL_COMPONENT_PLUGINS = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_COMPONENT_PLUGINS)

WIKINDX_URL_COMPONENT_STYLES

public mixed WIKINDX_URL_COMPONENT_STYLES = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_COMPONENT_STYLES)

WIKINDX_URL_COMPONENT_TEMPLATES

public mixed WIKINDX_URL_COMPONENT_TEMPLATES = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_COMPONENT_TEMPLATES)

WIKINDX_URL_DATA

public mixed WIKINDX_URL_DATA = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_DATA)

WIKINDX_URL_DATA_ATTACHMENTS

public mixed WIKINDX_URL_DATA_ATTACHMENTS = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_DATA_ATTACHMENTS)

WIKINDX_URL_DATA_IMAGES

public mixed WIKINDX_URL_DATA_IMAGES = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_DATA_IMAGES)

WIKINDX_URL_DATA_PLUGINS

public mixed WIKINDX_URL_DATA_PLUGINS = \str_replace(\DIRECTORY_SEPARATOR, "/", \WIKINDX_DIR_DATA_PLUGINS)

WIKINDX_URL_HELP_TOPICS

URL of the Help Topics on the website

public mixed WIKINDX_URL_HELP_TOPICS = 'https://wikindx.sourceforge.io/web/' . \WIKINDX_PUBLIC_VERSION . '/help-topics'
Tags
global

string WIKINDX_URL_HELP_TOPICS

WIKINDX_USE_BIBTEX_KEY_DEFAULT

public mixed WIKINDX_USE_BIBTEX_KEY_DEFAULT = \FALSE

WIKINDX_USE_WIKINDX_KEY_DEFAULT

public mixed WIKINDX_USE_WIKINDX_KEY_DEFAULT = \FALSE

WIKINDX_USER_LANGUAGE_DEFAULT

public mixed WIKINDX_USER_LANGUAGE_DEFAULT = 'auto'
public mixed WIKINDX_USER_PAGING_DEFAULTLINKS = 11

WIKINDX_USER_PAGING_DEFAULTPAGING

public mixed WIKINDX_USER_PAGING_DEFAULTPAGING = 20
public mixed WIKINDX_USER_PAGING_MINLINKS = 4

WIKINDX_USER_PAGING_MINPAGING

public mixed WIKINDX_USER_PAGING_MINPAGING = 2

WIKINDX_USER_PAGING_STYLE_DEFAULT

public mixed WIKINDX_USER_PAGING_STYLE_DEFAULT = 'N'

WIKINDX_USER_STRING_MINLENGTH

public mixed WIKINDX_USER_STRING_MINLENGTH = 10

WIKINDX_USER_TIMEZONE_DEFAULT

public mixed WIKINDX_USER_TIMEZONE_DEFAULT = 'auto'

WIKINDX_WP_DOCX_EXPORTER_VERSION

WordProcessor Docx Exporter Version

public mixed WIKINDX_WP_DOCX_EXPORTER_VERSION = '1.0'

This value is written in the 'AppVersion' element of the app.xml file to distinguish the version that generated a Word document.

Tags
global

string WIKINDX_WP_DOCX_EXPORTER_VERSION

WTAGTAIL

public mixed WTAGTAIL = DELIM . 'W1K1NDX'

Functions

loadJavascript()

Load the ajax javascript and the user javascript(s) into the HTML page output.

loadJavascript([mixed $scripts = [] ]) : void
Parameters
$scripts : mixed = []

Either an array of .js scripts to load or a single string.

jActionForm()

Create and load the HTML form element insert for the AJAX action and function.

jActionForm(string $action, array<string|int, mixed> $jsonArray[, bool $return = false ]) : string
Parameters
$action : string

The javascript action such as 'onclick' etc.

$jsonArray : array<string|int, mixed>

The parameter to be passed to gateway() as an array ready to be converted to JSON

$return : bool = false

If TRUE, generated javascript has a return from the gateway() function. Default is FALSE.

Return values
string

jActionIcon()

Create and load the IMG element insert for the AJAX action and function. Works with core/libs/LOADICONS.php.

jActionIcon(string $icon, string $action, array<string|int, mixed> $jsonArray[, bool $return = false ]) : string
Parameters
$icon : string

The icon to make an image of ('add', 'delete', 'view' etc.)

$action : string

The javascript action such as 'onclick' etc.

$jsonArray : array<string|int, mixed>

The parameter to be passed to gateway() as an array ready to be converted to JSON

$return : bool = false

If TRUE, generated javascript has a return from the gateway() function. Default is FALSE.

Return values
string

The image tag

encode_jArray()

Convert $jsonArray to JSON string and format any array elements referencing javascript functions.

encode_jArray(array<string|int, mixed> $jsonArray[, bool $quote = false ]) : string
Parameters
$jsonArray : array<string|int, mixed>

The unformatted JSON array

$quote : bool = false

No encoding of quotation marks (") if set to FALSE. Default is FALSE.

Return values
string

The JSON string

decode_jString()

Convert JSON-formatted $jsonString to an array or object.

decode_jString(string $jsonString) : mixed
Parameters
$jsonString : string

The JSON string

Return values
mixed

Array or object

_json_error()

echo JSON error or return if none.

_json_error(string $type) : void
Parameters
$type : string

getBibData()

Get data from citation sentences and return an array of citation data and an array of resource data ready for producing a bibliography from.

getBibData(mixed $sentences, array<string|int, mixed> $resIds, array<string|int, mixed> $flags) : array<string|int, mixed>

We only get here if the text from which $sentences is produced has citations (and thus resource data for the bibliography). NB elements of the $sentences array might not themselves have citations/resource data — discard these.

$resIds is an ordered list of resourceIds for in-text bibliographies and endnote-style citations using the same ID number where the style dictates the bibliography order is NOT to be used: in this case, we use the citation array's endnoteId. In other endnote styles, we order $resourceData by the citation array's endnoteId value.

Parameters
$sentences : mixed
$resIds : array<string|int, mixed>
$flags : array<string|int, mixed>
Return values
array<string|int, mixed>

getItemArray()

Create an array of bibliographic data matching the template fields

getItemArray(array<string|int, mixed> $localBibType, array<string|int, mixed> $bibStyle, mixed $creatorStyle, array<string|int, mixed> $template, array<string|int, mixed> $customTypes, array<string|int, mixed> $flags, string $styleLocalisation, string $type, array<string|int, mixed> $resourceData, array<string|int, mixed> $citationData, string $puncPattern, string $space) : array<string|int, mixed>
Parameters
$localBibType : array<string|int, mixed>
$bibStyle : array<string|int, mixed>
$creatorStyle : mixed
$template : array<string|int, mixed>
$customTypes : array<string|int, mixed>
$flags : array<string|int, mixed>
$styleLocalisation : string
$type : string
$resourceData : array<string|int, mixed>
$citationData : array<string|int, mixed>
$puncPattern : string
$space : string
Return values
array<string|int, mixed>

addCreators()

Add creators

addCreators(array<string|int, mixed> $localBibType, array<string|int, mixed> $template, array<string|int, mixed> $resourceData, array<string|int, mixed> $creatorStyle, string $styleLocalisation, string $type, array<string|int, mixed> &$items, array<string|int, mixed> $flags) : void
Parameters
$localBibType : array<string|int, mixed>
$template : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$creatorStyle : array<string|int, mixed>
$styleLocalisation : string
$type : string
$items : array<string|int, mixed>
$flags : array<string|int, mixed>

findSubsequentFootnoteTemplates()

Find examples of ibid, idem, and opCit footnote templates.

findSubsequentFootnoteTemplates(array<string|int, mixed> &$footnotes, string $citeType) : void

If using endnotes that use the same ID for the same resource, set only to templateEndnote.

Parameters
$footnotes : array<string|int, mixed>
$citeType : string

mapTemplate()

Map a template to the raw values and produce a basic bibliographic/footnote entry

mapTemplate(array<string|int, mixed> $localBibType, array<string|int, mixed> $bibStyle, string $styleLocalisation, array<string|int, mixed> $template, string $allPuncPattern, array<string|int, mixed> $item, array<string|int, mixed> $flags) : array<string|int, mixed>
Parameters
$localBibType : array<string|int, mixed>
$bibStyle : array<string|int, mixed>
$styleLocalisation : string
$template : array<string|int, mixed>
$allPuncPattern : string
$item : array<string|int, mixed>
$flags : array<string|int, mixed>
Return values
array<string|int, mixed>

invertFormat()

Invert the format of a title where necessary.

invertFormat(string $title, string $pre, string $post) : string

e.g., if the original title has elements in italics and the title field of the template is enclosed in italics, remove the formatting of those original elements. The same for underline, bold, superscript, and subscript. The formatting comes from tinyMCE so we know what it is for each type.

Parameters
$title : string
$pre : string
$post : string
Return values
string

mapSpecialTemplate()

Map a special template (no partial, creator fields etc.—e.g., runningTimeTemplate) to the raw values and produce a string

mapSpecialTemplate(array<string|int, mixed> $template, array<string|int, mixed> $item) : string
Parameters
$template : array<string|int, mixed>
$item : array<string|int, mixed>
Return values
string

checkMultiplePunctuation()

Make sure we don't have multiple punctuation characters after a field —NOT CURRENTLY USED (see cleanItems())

checkMultiplePunctuation(string $itemString, string $lastItemString, string $puncPattern, string $pre, string $post) : array<string|int, mixed>
Parameters
$itemString : string
$lastItemString : string
$puncPattern : string
$pre : string
$post : string
Return values
array<string|int, mixed>

Add link items such as URL and DOI

addLinks(string|array<string|int, mixed>|null $item, array<string|int, mixed> $flags) : string
Parameters
$item : string|array<string|int, mixed>|null
$flags : array<string|int, mixed>
Return values
string

addLinksFt()

Find any links in footnotes and make active if required

addLinksFt(string $item, array<string|int, mixed> $flags) : string
Parameters
$item : string
$flags : array<string|int, mixed>
Return values
string

addDateStage1()

Add date: stage 1

addDateStage1(array<string|int, mixed> $localBibType, string $styleLocalisation, array<string|int, mixed> $bibStyle, array<string|int, mixed> $data, array<string|int, mixed> $items) : array<string|int, mixed>

For 'web_article', $startDay and $startMonth represent the publication date

Parameters
$localBibType : array<string|int, mixed>
$styleLocalisation : string
$bibStyle : array<string|int, mixed>
$data : array<string|int, mixed>
$items : array<string|int, mixed>
Return values
array<string|int, mixed>

addDateStage2()

Add date: stage 2

addDateStage2(array<string|int, mixed> $localBibType, string $styleLocalisation, array<string|int, mixed> $bibStyle, string|int $startDay, string|int $startMonth, string|int $endDay, string|int $endMonth) : string
Parameters
$localBibType : array<string|int, mixed>
$styleLocalisation : string
$bibStyle : array<string|int, mixed>
$startDay : string|int
$startMonth : string|int
$endDay : string|int
$endMonth : string|int
Return values
string

formatDate()

Format date from days and months

formatDate(string|int $startDay, string|int $endDay, string|int $startMonth, string|int $endMonth, array<string|int, mixed> $monthArray, array<string|int, mixed> $bibStyle) : string
Parameters
$startDay : string|int
$endDay : string|int
$startMonth : string|int
$endMonth : string|int
$monthArray : array<string|int, mixed>
$bibStyle : array<string|int, mixed>
Return values
string

formatDay()

Format the day part of a date

formatDay(string|int $startDay, string|int $endDay, array<string|int, mixed> $bibStyle, string $styleLocalisation) : array<string|int, mixed>
Parameters
$startDay : string|int
$endDay : string|int
$bibStyle : array<string|int, mixed>
$styleLocalisation : string
Return values
array<string|int, mixed>

addRunningTime()

Add and format running time (films, TV etc.)

addRunningTime(string $styleLocalisation, array<string|int, mixed> $bibStyle, array<string|int, mixed> $data) : string
Parameters
$styleLocalisation : string
$bibStyle : array<string|int, mixed>
$data : array<string|int, mixed>
Return values
string

formatPages()

Add and format pages

formatPages(array<string|int, mixed> $data, array<string|int, mixed> $bibStyle, array<string|int, mixed> $items) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
$bibStyle : array<string|int, mixed>
$items : array<string|int, mixed>
Return values
array<string|int, mixed>

addOtherItems()

Find other items in various resource arrays for adding to the $items array

addOtherItems(array<string|int, mixed> $localBibType, array<string|int, mixed> $resourceData, array<string|int, mixed> $items) : array<string|int, mixed>
Parameters
$localBibType : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$items : array<string|int, mixed>
Return values
array<string|int, mixed>

setBookYears()

For WIKINDX, if type is book, book_chapter or book article and there exists both 'year1' and 'year2' in $resource (entered as publication year and reprint year respectively), then switch these around as 'year1' is entered in the style template as 'originalPublicationYear' and 'year2' should be 'publicationYear'.

setBookYears(array<string|int, mixed> &$resource, string $type) : void
Parameters
$resource : array<string|int, mixed>
$type : string

cleanItems()

Clean up the $item elements, deal with ordinals, and flatten to final string.

cleanItems(string $styleLocalisation, array<string|int, mixed> $itemArray, string $allPuncPattern, string $space, string $ultimate, array<string|int, mixed> $flags) : array<string|int, mixed>

Keep the print statements (commented out for production) as they are useful for debugging. Note that we use '·' to help show spaces either end of the string.

Parameters
$styleLocalisation : string
$itemArray : array<string|int, mixed>
$allPuncPattern : string
$space : string
$ultimate : string
$flags : array<string|int, mixed>
Return values
array<string|int, mixed>

checkUltimate()

Check if the ultimate value should have its first characterf removed (double punctuation)

checkUltimate(array<string|int, mixed> $item, string $ultimate, array<string|int, mixed> $puncs) : array<string|int, mixed>
Parameters
$item : array<string|int, mixed>
$ultimate : string
$puncs : array<string|int, mixed>
Return values
array<string|int, mixed>

editorSwitch()

Set any author/editor re-ordering for book and book_article type.

editorSwitch(array<string|int, mixed> $bibStyle, array<string|int, mixed> &$template, array<string|int, mixed>|null &$creators, string $type) : bool

If required, we unset the 'authors' element in template, set resourcecreatorRole to 1, and copy the editorSwitch template to the 'authors' element so that the primary creator name formatting settings are used. Setting resourcecreatorRole to 1, we don't need to unset the 'editors' element in $template.

Parameters
$bibStyle : array<string|int, mixed>
$template : array<string|int, mixed>
$creators : array<string|int, mixed>|null
$type : string
Return values
bool

formatCreators()

Format creator name lists (authors, editors, etc.)

formatCreators(array<string|int, mixed> $creators, string $nameType, array<string|int, mixed> $localBibType, array<string|int, mixed> $creatorStyle, string $styleLocalisation, array<string|int, mixed> $template, string $type, array<string|int, mixed> &$items, array<string|int, mixed> $flags) : void
Parameters
$creators : array<string|int, mixed>

Multi-associative array of creator names e.g. this array might be of the primary authors:

array([0] => array(['surname'] => 'Grimshaw', ['firstname'] => Mark, ['initials'] => 'N', ['prefix'] => ),
[1] => array(['surname'] => 'Witt', ['firstname'] => Jan, ['initials'] => , ['prefix'] => 'de'))
$nameType : string
$localBibType : array<string|int, mixed>
$creatorStyle : array<string|int, mixed>
$styleLocalisation : string
$template : array<string|int, mixed>
$type : string
$items : array<string|int, mixed>
$flags : array<string|int, mixed>

numCreatorManage()

Keep only some elements in array if we've exceeded set thresholds and create an etAl string if necessary.

numCreatorManage(array<string|int, mixed> $bibStyle, array<string|int, mixed> $cArray, string $localNameType, string $list, string $limit, string $moreThan, bool $italics, string $abbreviation, string $delimitTwo, string $delimitFirstBetween, string $delimitNextBetween, string $delimitLast) : array<string|int, mixed>

Produce the near-final creator string. Check if there are plural creators.

Parameters
$bibStyle : array<string|int, mixed>
$cArray : array<string|int, mixed>
$localNameType : string
$list : string
$limit : string
$moreThan : string
$italics : bool
$abbreviation : string
$delimitTwo : string
$delimitFirstBetween : string
$delimitNextBetween : string
$delimitLast : string
Return values
array<string|int, mixed>

rewriteCreatorStrings()

Rewrite creator strings

rewriteCreatorStrings(array<string|int, mixed> $template, string $nameString, string $nameType, bool &$firstInList, bool &$rewriteCreatorBeforeDone) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>
$nameString : string
$nameType : string
$firstInList : bool
$rewriteCreatorBeforeDone : bool
Return values
array<string|int, mixed>

addCustom()

Add custom fields.

addCustom(array<string|int, mixed> $customTypes, array<string|int, mixed>|string $data, string $type, array<string|int, mixed> $items) : array<string|int, mixed>
Parameters
$customTypes : array<string|int, mixed>
$data : array<string|int, mixed>|string
$type : string
$items : array<string|int, mixed>
Return values
array<string|int, mixed>

formatRunningTime()

Format running time for audiovisual bibliography items

formatRunningTime(string $styleLocalisation, array<string|int, mixed> $bibStyle, mixed $hours, mixed $minutes, mixed $seconds, mixed $milliseconds) : string
Parameters
$styleLocalisation : string
$bibStyle : array<string|int, mixed>
$hours : mixed
$minutes : mixed
$seconds : mixed
$milliseconds : mixed
Return values
string

findAmbiguousYears()

Add year fields.

findAmbiguousYears(array<string|int, mixed> $localBibType, array<string|int, mixed> $resourceData, array<string|int, mixed> $citationData, array<string|int, mixed> $bibStyle, array<string|int, mixed> $template, string $type, array<string|int, mixed> $items) : array<string|int, mixed>

Ambiguous entires are those with the same author(s) and same publication year(s). For in-text styles, we must deal with any ambiguity and place any letter picked up in CITE.php accordingly—ambiguous entires here are ONLY when the entries come from cited text. Append the letter to the main publication year except for certain types. a) For certain types, if the second year field follows immediately on from the first year field in the template, append the letter there. NB. This assumes the template provides some conjunction between the two fields so that the result might be: 2012–2021a or 2012/2021b b) If a) is not the case for these types, append the letter to the 'resourceyearYear1' field in the template as it must match the in-text citation. c) If there is no ambiguity or this is not an in-text style, return the years unchanged.

TODO: The use of 'ambiguousTemplate' in the citation means no letter is provided — perhaps this should be looked at at some later date so that the bibliographic entries are disambiguated . . .

Parameters
$localBibType : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$citationData : array<string|int, mixed>
$bibStyle : array<string|int, mixed>
$template : array<string|int, mixed>
$type : string
$items : array<string|int, mixed>
Return values
array<string|int, mixed>

addEdition()

Add any edition field

addEdition(array<string|int, mixed> $localBibType, array<string|int, mixed> $data, array<string|int, mixed> $bibStyle, string $styleLocalisation, string $type, array<string|int, mixed> $items) : array<string|int, mixed>
Parameters
$localBibType : array<string|int, mixed>
$data : array<string|int, mixed>
$bibStyle : array<string|int, mixed>
$styleLocalisation : string
$type : string
$items : array<string|int, mixed>
Return values
array<string|int, mixed>

formatEdition()

Format edition (might not be numeric)

formatEdition(mixed $edition, array<string|int, mixed> $bibStyle, string $styleLocalisation) : mixed
Parameters
$edition : mixed
$bibStyle : array<string|int, mixed>
$styleLocalisation : string

getOrdinalExtensionAlignment()

Get alignment for ordinal extension

getOrdinalExtensionAlignment(int|null $alignment) : array<string|int, string>

If $alignment is out of range, 0 is used instead.

TODO: the ?int is a temp fix. Find a better way.

Parameters
$alignment : int|null

0 = Aligned on baseline, 1 = Superscript, 2 = Subscript (Default is 0)

Return values
array<string|int, string>

["pre-tag", "post-tag"]

checkPartial()

Check that the first field of $template exists in $item and has a value.

checkPartial(array<string|int, mixed> $template, array<string|int, mixed> $item, bool $esDone) : array<string|int, mixed>

If it does not, and $template has a partial template array, rearrange $template

Parameters
$template : array<string|int, mixed>
$item : array<string|int, mixed>
$esDone : bool
Return values
array<string|int, mixed>

checkFallBackFields()

When using a fallback template, ensure the fields are valid for that resource type

checkFallBackFields(object|null $styleMap, array<string|int, mixed> $template, string $fallbacks, string $type) : array<string|int, mixed>
Parameters
$styleMap : object|null
$template : array<string|int, mixed>
$fallbacks : string
$type : string
Return values
array<string|int, mixed>

setCreatorRepeat()

Check against repeat creator options and amend $items if required If this is footnotes, then $newItems is also ordered correctly.

setCreatorRepeat(object $styleMap, array<string|int, mixed> $bibStyle, array<string|int, mixed> $items, array<string|int, mixed> $bibFootnoteIds, array<string|int, mixed>|bool $footnotes, array<string|int, mixed> $flags) : array<string|int, mixed>
Parameters
$styleMap : object
$bibStyle : array<string|int, mixed>
$items : array<string|int, mixed>
$bibFootnoteIds : array<string|int, mixed>
$footnotes : array<string|int, mixed>|bool
$flags : array<string|int, mixed>
Return values
array<string|int, mixed>

setCreatorRepeatEndnotes()

Check against repeat creator options and amend $items if required If this is footnotes, then $newItems is also ordered correctly.

setCreatorRepeatEndnotes(object $styleMap, array<string|int, mixed> $bibStyle, array<string|int, mixed> $items, array<string|int, mixed> $footnotes, array<string|int, mixed> $flags) : array<string|int, mixed>
Parameters
$styleMap : object
$bibStyle : array<string|int, mixed>
$items : array<string|int, mixed>
$footnotes : array<string|int, mixed>
$flags : array<string|int, mixed>
Return values
array<string|int, mixed>

mapTemplateCreatorRepeatString()

Basic map template for creator repeat string

mapTemplateCreatorRepeatString(array<string|int, mixed> $cTemplate, string $string, string $output, bool $replaceFormatting) : string
Parameters
$cTemplate : array<string|int, mixed>
$string : string
$output : string
$replaceFormatting : bool
Return values
string

settings()

Deal with various settings, setting, getting, incrementing, decrementing etc.

settings(string $method[, mixed $extra = false ]) : mixed

This is a common location for this sort of thing.

Parameters
$method : string
$extra : mixed = false
Tags
poaram

mixed $extra Default is FALSE

getNameString()

Get the nameString variable

getNameString(string $initialsStyle, string $firstNameInitial, string $nameStyle, string $uppercase, array<string|int, mixed> $style, array<string|int, mixed> $creator, string $localisation[, bool $citation = false ][, array<string|int, mixed> $citationVars = [] ][, bool $ftUseSurname = false ]) : string
Parameters
$initialsStyle : string
$firstNameInitial : string
$nameStyle : string
$uppercase : string
$style : array<string|int, mixed>
$creator : array<string|int, mixed>
$localisation : string
$citation : bool = false

Default is FALSE

$citationVars : array<string|int, mixed> = []

Default is []

$ftUseSurname : bool = false

Default is FALSE

Return values
string

checkInitials()

Handle initials.

checkInitials(array<string|int, mixed> &$creator, int $initialsStyle, bool $firstNameInitial, string $localisation) : string
Parameters
$creator : array<string|int, mixed>

Associative array of creator name e.g.

array(['surname'] => 'Grimshaw', ['firstname'] => Mark, ['initials'] => 'M N G', ['prefix'] => ))

Initials must be space-delimited.

$initialsStyle : int
$firstNameInitial : bool
$localisation : string
Tags
see
formatNames()
Return values
string

Formatted string of initials.

hyphenatedInitials()

Deal with hyphenated firstnames as initials

hyphenatedInitials(array<string|int, mixed> $hyphenated, int $initialsStyle) : string

'Jean-Pierre' should become 'J.-P.'

Parameters
$hyphenated : array<string|int, mixed>
$initialsStyle : int
Return values
string

addCreatorDelimiters()

Add delimiters to creators

addCreatorDelimiters(array<string|int, mixed> $style, array<string|int, mixed> &$cArray, string $delimitTwo, string $delimitFirstBetween, string $delimitNextBetween, string $delimitLast) : void
Parameters
$style : array<string|int, mixed>
$cArray : array<string|int, mixed>
$delimitTwo : string
$delimitFirstBetween : string
$delimitNextBetween : string
$delimitLast : string

formatMultiplePages()

Format multiple pages.

formatMultiplePages(int $pageFormat, int|string $rangeDelimiter, string $start, string $end) : string

$this->style['pageFormat']: 0 == 132-9 1 == 132-39 2 == 132-139

Parameters
$pageFormat : int
$rangeDelimiter : int|string
$start : string

Page start.

$end : string

Page end.

Return values
string

titleCapitalization()

Do title capitalization

titleCapitalization(string|null $pString, string $delimitLeft, string $delimitRight[, int $CondCapitalization = 1 ]) : string
Parameters
$pString : string|null

Raw title string.

$delimitLeft : string
$delimitRight : string
$CondCapitalization : int = 1

Default is 1.

Return values
string

Formatted title string.

setEtAl()

Set et al. for multiple creators

setEtAl(array<string|int, mixed> &$creators, int $limit, bool $italics, string $abbreviation) : string
Parameters
$creators : array<string|int, mixed>
$limit : int
$italics : bool
$abbreviation : string
Return values
string

findAlternates()

Find alternate fields dependent on previous or following fields and deal with accordingly.

findAlternates(array<string|int, mixed> $template, array<string|int, mixed> $item) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>
$item : array<string|int, mixed>
Return values
array<string|int, mixed>

formatTitle()

Format a resource title

formatTitle(array<string|int, mixed> $resource, array<string|int, mixed> $styleCitation, string $puncPattern, string $space[, bool $trans = false ]) : string
Parameters
$resource : array<string|int, mixed>
$styleCitation : array<string|int, mixed>
$puncPattern : string
$space : string
$trans : bool = false

Default is FALSE

Return values
string

formatShortTitle()

Format a resource shortTitle

formatShortTitle(array<string|int, mixed> $resource, array<string|int, mixed> $styleCitation[, bool $trans = false ][, bool $ftUseTitle = false ]) : string
Parameters
$resource : array<string|int, mixed>
$styleCitation : array<string|int, mixed>
$trans : bool = false

Default is FALSE

$ftUseTitle : bool = false

Default is FALSE

Return values
string

formatPubStatus()

Format publication status

formatPubStatus(array<string|int, mixed> $resource, array<string|int, mixed> $styleCitation, string $puncPattern, string $space) : string
Parameters
$resource : array<string|int, mixed>
$styleCitation : array<string|int, mixed>
$puncPattern : string
$space : string
Return values
string

mapDependencies()

Deal with __DEPENDENT_ON_PREVIOUS_FIELD__ for pre and post dependent on previous field's existence and __DEPENDENT_ON_NEXT_FIELD__ for pre and post dependent on the next field's existence

mapDependencies(array<string|int, mixed> $value, bool $previousFieldExists, mixed $nextFieldExists, string $pre, string $post) : array<string|int, mixed>
Parameters
$value : array<string|int, mixed>
$previousFieldExists : bool
$nextFieldExists : mixed
$pre : string
$post : string
Return values
array<string|int, mixed>

mapTemplateIndependents()

Map independent fields of templates.

mapTemplateIndependents(array<string|int, mixed> $independent, array<string|int, mixed> &$itemArray) : void

Check for independent characters. These (should) come in pairs.

Parameters
$independent : array<string|int, mixed>
$itemArray : array<string|int, mixed>

mapTemplatePlurals()

Deal with singular/plural dependencies for fields such as pages and creators

mapTemplatePlurals(array<string|int, mixed> $value, string $pre, string $post, mixed $plurals) : array<string|int, mixed>
Parameters
$value : array<string|int, mixed>
$pre : string
$post : string
$plurals : mixed
Return values
array<string|int, mixed>

replaceWhitespace()

Replace ASCII whitespace with locale's whitespace character(s) from elements of an array Callback

replaceWhitespace(string|array<string|int, mixed> $input, string|array<string|int, mixed> $citeLocalisation) : string|array<string|int, mixed>
Parameters
$input : string|array<string|int, mixed>
$citeLocalisation : string|array<string|int, mixed>
Return values
string|array<string|int, mixed>

stripTemplateBackticks()

Strip backticks used in template

stripTemplateBackticks(string $pre, mixed $post) : array<string|int, mixed>
Parameters
$pre : string
$post : mixed
Return values
array<string|int, mixed>

ordinals()

format ordinals

ordinals(array<string|int, mixed> $matches, string $output) : string
Parameters
$matches : array<string|int, mixed>
$output : string
Return values
string

findAmbiguity()

Identify ambiguous in-text citations and references.

findAmbiguity(array<string|int, mixed> $sentences, array<string|int, mixed> $resIds, int $ambiguousAction) : array<string|int, mixed>

An ambiguous citation is one reference that has the same creator(s) and publication year(s) as another. There are three options: Do nothing (use the original templates for the citation and reference) Add a letter after the year with the original citation template (in which case the bibliographic entry must also use the letter) Use the ambiguous template for the in-text citation and no letter for the reference.

The order of the reference in the bibliography provides the ordering of the letters. The $resIds array provides this order.

Parameters
$sentences : array<string|int, mixed>
$resIds : array<string|int, mixed>
$ambiguousAction : int

(1 = letter, 2 = template)

Return values
array<string|int, mixed>

fillinPreview()

Provide empty array elements in resourceData from the adminstyle plugin's preview functions to conform with what BIBCITEGATEWAY expects.

fillinPreview(array<string|int, mixed> $resourceData) : array<string|int, mixed>
Parameters
$resourceData : array<string|int, mixed>
Return values
array<string|int, mixed>

setJustify()

Generic code for setting justification

setJustify(string $input) : string|false
Parameters
$input : string
Return values
string|false

setLineSpace()

Generic code for setting line height

setLineSpace(string $input) : string|false
Parameters
$input : string
Return values
string|false

setIndentation()

Generic code for setting indentation

setIndentation(string $input[, mixed $bq = false ]) : string|false
Parameters
$input : string
$bq : mixed = false
Return values
string|false

setFontSize()

Generic code for setting font size

setFontSize(string $input) : string|false
Parameters
$input : string
Return values
string|false

exportSettings()

Setters and getters for various export preferences (e.g. from word processor)

exportSettings(string $method[, mixed $extra = false ]) : mixed
Parameters
$method : string
$extra : mixed = false

Default is FALSE

doCitations()

Compile and add the citations to the text

doCitations(array<string|int, mixed> $sentences, array<string|int, mixed> $orderedResIds, array<string|int, mixed> $styleInfo, array<string|int, mixed> $styleCitation, array<string|int, mixed> $templates, array<string|int, mixed> $replaceInTextCitationTemplates, array<string|int, mixed> $flags, string $hyperlinkBase) : array<string|int, mixed>
Parameters
$sentences : array<string|int, mixed>
$orderedResIds : array<string|int, mixed>
$styleInfo : array<string|int, mixed>
$styleCitation : array<string|int, mixed>
$templates : array<string|int, mixed>
$replaceInTextCitationTemplates : array<string|int, mixed>
$flags : array<string|int, mixed>
$hyperlinkBase : string
Return values
array<string|int, mixed>

mapTemplate()

Map a template to the raw values and produce a basic citation for inserting into the text

mapTemplate(array<string|int, mixed> &$citation, int $cIndex, string $sentence, array<string|int, mixed> $templates, array<string|int, mixed> $styleCitation, string $citeLocalisation, array<string|int, mixed> $item) : array<string|int, mixed>
Parameters
$citation : array<string|int, mixed>
$cIndex : int
$sentence : string
$templates : array<string|int, mixed>
$styleCitation : array<string|int, mixed>
$citeLocalisation : string
$item : array<string|int, mixed>
Return values
array<string|int, mixed>

checkResourceTypeTemplate()

Some resource types have specific templates for in-text citations

checkResourceTypeTemplate(array<string|int, mixed> $citations, array<string|int, mixed> $replaceTemplates, array<string|int, mixed> $templates) : array<string|int, mixed>
Parameters
$citations : array<string|int, mixed>
$replaceTemplates : array<string|int, mixed>
$templates : array<string|int, mixed>
Return values
array<string|int, mixed>

forceAmbiguousTemplate()

Force the use of ambiguous templates overriding other templates other than subsequentCreatorTemplate

forceAmbiguousTemplate(array<string|int, mixed> $citations) : array<string|int, mixed>
Parameters
$citations : array<string|int, mixed>
Return values
array<string|int, mixed>

checkSubsequentCreatorTemplate()

Confirm (or not) that a subsequentCreatorTemplate designation is correct.

checkSubsequentCreatorTemplate(array<string|int, mixed> $styleCitation, mixed $sentence) : array<string|int, mixed>

$styleCitation['subsequentCreatorRange'] == 0 // Entire text $styleCitation['subsequentCreatorRange'] == 1 // Paragraph $styleCitation['subsequentCreatorRange'] == 2 // Section

Parameters
$styleCitation : array<string|int, mixed>
$sentence : mixed
Return values
array<string|int, mixed>

citationPosition()

Find required position of citation in sentence. Not all requests are possible so drop through three levels . . . Be careful! 0 => "Unchanged" 1 => "After previous creator name(s)" 2 => "After previous quotation" 3 => "Before end of sentence" 4 => "After end of sentence" 5 => "Before next soft punctuation" 6 => "After next soft punctuation"

citationPosition(array<string|int, mixed> $styleCitation, string $citeLocalisation, array<string|int, mixed> $citations, string &$sentence) : array<string|int, mixed>

NB positions 0, 3 and 4 are final destinations that if provided, preclude all later options

Parameters
$styleCitation : array<string|int, mixed>
$citeLocalisation : string
$citations : array<string|int, mixed>
$sentence : string
Return values
array<string|int, mixed>

checkConsecutiveCitations()

For multiple citations that are repositioned after soft or hard punctuation, mark them as consecutive citations.

checkConsecutiveCitations(array<string|int, mixed> $sentence, int $citationStyle) : array<string|int, mixed>
Parameters
$sentence : array<string|int, mixed>
$citationStyle : int
Return values
array<string|int, mixed>

checkFollowCreatorTemplate()

Confirm (or not) that a followCreatorTemplate designation is correct (in-text citations).

checkFollowCreatorTemplate(array<string|int, mixed> $styleCitation, array<string|int, mixed> $citations) : array<string|int, mixed>
Parameters
$styleCitation : array<string|int, mixed>
$citations : array<string|int, mixed>
Return values
array<string|int, mixed>

checkConsecutiveCreatorTemplate()

Confirm (or not) that a consecutiveCreatorTemplate designation is correct (in-text citations).

checkConsecutiveCreatorTemplate(array<string|int, mixed> $citations) : array<string|int, mixed>
Parameters
$citations : array<string|int, mixed>
Return values
array<string|int, mixed>

formatCitation()

Format the citation

formatCitation(array<string|int, mixed> $citation, int $cIndex, array<string|int, mixed> $styleCitation, array<string|int, mixed> $itemArray, array<string|int, mixed> $flags, string $hyperlinkBase) : array<string|int, mixed>
Parameters
$citation : array<string|int, mixed>
$cIndex : int
$styleCitation : array<string|int, mixed>
$itemArray : array<string|int, mixed>
$flags : array<string|int, mixed>
$hyperlinkBase : string
Return values
array<string|int, mixed>

hyperlinkCitation()

Hyperlink the citation text

hyperlinkCitation(mixed &$citeText, int $id, string $hyperlinkBase) : void
Parameters
$citeText : mixed
$id : int
$hyperlinkBase : string

citationWrapping()

Format citation with wrapping characters taking account of consecutive citation runs and their delimiting characters

citationWrapping(array<string|int, mixed> $styleCitation, array<string|int, mixed> $citation, string $citeText, string $pageSplit, string $output) : array<string|int, mixed>
Parameters
$styleCitation : array<string|int, mixed>
$citation : array<string|int, mixed>
$citeText : string
$pageSplit : string
$output : string
Return values
array<string|int, mixed>

trueFootnoteWrapping()

Wrapping of true footnotes in the text — only used for endInc, endSameId, and endSameIdOrdered

trueFootnoteWrapping(array<string|int, mixed> $styleCitation, array<string|int, mixed> $citation, string $citeText, array<string|int, mixed> $flags) : string
Parameters
$styleCitation : array<string|int, mixed>
$citation : array<string|int, mixed>
$citeText : string
$flags : array<string|int, mixed>
Return values
string

formatSentence()

Format the sentence with each citation obeying required positions.

formatSentence(array<string|int, mixed> $citation, int $cIndex, string $sentence, array<string|int, mixed> $styleCitation, string $citeLocalisation, mixed $citeText, bool $pageSplit, bool $isConsecutive, array<string|int, mixed> $flags) : string
Parameters
$citation : array<string|int, mixed>
$cIndex : int
$sentence : string
$styleCitation : array<string|int, mixed>
$citeLocalisation : string
$citeText : mixed
$pageSplit : bool
$isConsecutive : bool
$flags : array<string|int, mixed>
Return values
string

positionCitationInSentence()

Position citations in the sentence.

positionCitationInSentence(string $sentence, array<string|int, mixed> $citeTexts, array<string|int, mixed> $patterns, array<string|int, mixed> $hardPuncs, string $space) : array<string|int, mixed>

The array $hardPuncs contains bools. If TRUE, the $hardPunc pattern is part of the search pattern. This encodes whatever the hard punctuation was and thus might include concluding space characters. If we don't want a space before the citation, these space characters must be placed after the citation. The matching array element from $citeTexts must be an array. If the elements of this array are integers, they refer to elements of the callback's $matches array

Parameters
$sentence : string
$citeTexts : array<string|int, mixed>
$patterns : array<string|int, mixed>
$hardPuncs : array<string|int, mixed>
$space : string
Return values
array<string|int, mixed>

doPageSplit()

Check if a citation page should indeed be split and deal with dependencies.

doPageSplit(array<string|int, mixed> &$styleCitation, array<string|int, mixed> &$citation, string &$pre, string &$post) : void

Splitting only occurs if the cited creator's name(s) is in the sentence.

Deal with DEPENDENT_ON_PREVIOUS_FIELD for characters dependent on previous field's existence and DEPENDENT_ON_NEXT_FIELD for characters dependent on the next field's existence

Parameters
$styleCitation : array<string|int, mixed>
$citation : array<string|int, mixed>
$pre : string
$post : string

mapTemplateTidyYears()

Do some pre-processing of various year fields in the template

mapTemplateTidyYears(array<string|int, mixed> $template, array<string|int, mixed> $item) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>
$item : array<string|int, mixed>
Return values
array<string|int, mixed>

formatPages()

Format pages.

formatPages(array<string|int, mixed> $styleCitation, string $pages, array<string|int, mixed> &$item[, bool $footnotes = false ][, string $field = 'pages' ]) : void

If $footnotes is TRUE, these are pages for short footnotes

Parameters
$styleCitation : array<string|int, mixed>
$pages : string
$item : array<string|int, mixed>
$footnotes : bool = false

Default is FALSE

$field : string = 'pages'

Default is 'pages'

formatCreators()

Format creator name lists (authors, editors, etc.)

formatCreators(array<string|int, mixed> $creators, array<string|int, mixed> $styleCitation, string $citeLocalisation, array<string|int, mixed> &$item, array<string|int, mixed> $resIds, int $resId) : void
Parameters
$creators : array<string|int, mixed>

Multi-associative array of creator names e.g. this array might be of the primary authors:

array([0] => array(['surname'] => 'Grimshaw', ['firstname'] => Mark, ['initials'] => 'N', ['prefix'] => ),
[1] => array(['surname'] => 'Witt', ['firstname'] => Jan, ['initials'] => , ['prefix'] => 'de'))
$styleCitation : array<string|int, mixed>
$citeLocalisation : string
$item : array<string|int, mixed>
$resIds : array<string|int, mixed>
$resId : int

replacementYears()

Add replacement years fields to templates

replacementYears(string $template, array<string|int, mixed> $style, STYLEMAP $styleMap) : array<string|int, mixed>
Parameters
$template : string
$style : array<string|int, mixed>
$styleMap : STYLEMAP
Return values
array<string|int, mixed>

copyYearAlternates()

Copy any alternates relating to pre and post fields from the 'year' field to 'year1' and 'year2' fields

copyYearAlternates(string $yearField, array<string|int, mixed> &$newTemplate) : void
Parameters
$yearField : string
$newTemplate : array<string|int, mixed>

parseIndependent()

Parse independent strings of new templates

parseIndependent(array<string|int, mixed> &$template) : void
Parameters
$template : array<string|int, mixed>

compileTemplates()

Compile in-text and endote-style citation templates

compileTemplates(array<string|int, mixed> $template, array<string|int, mixed> $citationFields, array<string|int, mixed> $years[, bool $freeStanding = false ]) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>
$citationFields : array<string|int, mixed>
$years : array<string|int, mixed>
$freeStanding : bool = false

Default is FALSE

Return values
array<string|int, mixed>

addAmbiguity()

Add any ambiguity letter to year field. Only for in-text citations

addAmbiguity(array<string|int, mixed> $styleCitation, array<string|int, mixed> &$item, array<string|int, mixed> $citation) : void
Parameters
$styleCitation : array<string|int, mixed>
$item : array<string|int, mixed>
$citation : array<string|int, mixed>

formatYear()

Format years for citations

formatYear(array<string|int, mixed> $styleCitation, array<string|int, mixed> &$item, array<string|int, mixed> $resource) : void
Parameters
$styleCitation : array<string|int, mixed>
$item : array<string|int, mixed>
$resource : array<string|int, mixed>

secondYearField()

Conditionally add second year field for formatting citations (e.g. revision year, reprint year etc.)—depends on resource type

secondYearField(array<string|int, mixed> $types, string|array<string|int, mixed> $citationYearsTemplate, array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
$types : array<string|int, mixed>

used for replacement years

$citationYearsTemplate : string|array<string|int, mixed>
$row : array<string|int, mixed>
Return values
array<string|int, mixed>

splitIntoSentences()

Split text into sentences.

splitIntoSentences(string $citeLocalisation, string $text) : array<string|int, mixed>

Must discount abbreviations ending in an end-of-sentence character and such characters deep within quotation marks

Parameters
$citeLocalisation : string
$text : string
Return values
array<string|int, mixed>

Array of ordered sentences.

parseSentences()

Parse the sentences array for citations and make some initial decisions

parseSentences(string $citeLocalisation, array<string|int, mixed> $styleCitation, array<string|int, mixed> $input) : array<string|int, mixed>
Parameters
$citeLocalisation : string
$styleCitation : array<string|int, mixed>
$input : array<string|int, mixed>
Return values
array<string|int, mixed>

findSubsequentTemplates()

Decide if the template for this citation should be the subsequentCreatorTemplate or similar for endnote styles.

findSubsequentTemplates(array<string|int, mixed> $styleCitation, string $sentence, null &$templateField, array<string|int, mixed> $resIds, int $resId, int $resIdsIndex, string $currentPages, string $previousPages) : void

We don't have all information yet to make further decisions (e.g., creator's name).

Parameters
$styleCitation : array<string|int, mixed>
$sentence : string
$templateField : null
$resIds : array<string|int, mixed>
$resId : int
$resIdsIndex : int
$currentPages : string
$previousPages : string

findFollowCreatorTemplate()

Find cases for followCreatorTemplate and mark position after creator's name.

findFollowCreatorTemplate(string $citeLocalisation, array<string|int, mixed> $styleCitation, array<string|int, mixed> $sentenceArray, int $citationKey, array<string|int, mixed> $previousCPatterns) : array<string|int, mixed>

If an author has already been found by a previous citation in the sentence, do not mark the position for this citation. We check by comparing this $cPattern with previous ones in this sentence.

Parameters
$citeLocalisation : string
$styleCitation : array<string|int, mixed>
$sentenceArray : array<string|int, mixed>
$citationKey : int
$previousCPatterns : array<string|int, mixed>
Return values
array<string|int, mixed>

getCPattern()

Create the preg pattern for finding a citation's creator names in the same sentence.

getCPattern(array<string|int, mixed> $creators, string $citeLocalisation, string $cInitialPunc, string $spaceRaw, string $space) : array<string|int, mixed>
Parameters
$creators : array<string|int, mixed>
$citeLocalisation : string
$cInitialPunc : string
$spaceRaw : string
$space : string
Return values
array<string|int, mixed>

[$cPattern, $puncTrim]

tidySentences()

end-of-sentence characters have been captured in $split's array elements. These must be appended to the previous part sentence.

tidySentences(string $citeLocalisation, array<string|int, mixed> $split, array<string|int, mixed> $puncs) : array<string|int, mixed>
Parameters
$citeLocalisation : string
$split : array<string|int, mixed>
$puncs : array<string|int, mixed>
Return values
array<string|int, mixed>

quotationCitationIndex()

Add the citation index to relevant quotations.

quotationCitationIndex(string $citeLocalisation, array<string|int, mixed> $sentences) : array<string|int, mixed>
Parameters
$citeLocalisation : string
$sentences : array<string|int, mixed>
Return values
array<string|int, mixed>

tidySentencesEndQuote()

Ensure hard punctuation just before a quotation end marker is treated as marking the end of a complete sentence.

tidySentencesEndQuote(string $citeLocalisation, array<string|int, mixed> $sentences, array<string|int, mixed> $quotes, array<string|int, mixed> $puncs) : array<string|int, mixed>
Parameters
$citeLocalisation : string
$sentences : array<string|int, mixed>
$quotes : array<string|int, mixed>
$puncs : array<string|int, mixed>
Return values
array<string|int, mixed>

findSpecialQuotes()

Find special quotes such as dialogue and nested quotes—mark them and protect contents of nested quotes

findSpecialQuotes(string $text, array<string|int, mixed> $quotes, array<string|int, mixed> $apostrophes, string $space) : string
Parameters
$text : string
$quotes : array<string|int, mixed>
$apostrophes : array<string|int, mixed>
$space : string
Return values
string

findDialogueQuotes()

Find dialogue quotes and mark them.

findDialogueQuotes(mixed $para, string $qStart, string $qEnd, string $apos1, string $apos2) : string

First use the split paragraphs in attempt to find dialogue quotes (odd numbers of quotation marks in each paragraph indicate dialogue). Need to ensure we don't count quote characters that function as apostrophe or possessive. Need mark only the start and continuation of such a pattern leaving quote marks in between. The pattern might be:

Here begins "some dialogue." Mark said “Stéphane!"

// paragraph with odd number of marks. The last marks the start.

“What?” said Stéphane. “Go away. . .

// paragraph with odd number of marks.

“OK” said Mark.

// First subsequent paragraph with even number of marks.

Could also be:

Here begins "some dialogue." Mark said “Stéphane!

// paragraph with odd number of marks. The last marks the start.

“What?” said Stéphane. “Go away. . .

// paragraph with odd number of marks.

“OK.”

// First subsequent paragraph with even number of marks. . . . and other variations . . .

Parameters
$para : mixed
$qStart : string
$qEnd : string
$apos1 : string
$apos2 : string
Return values
string

findNestedQuotes()

Find and mark nested quotations.

findNestedQuotes(string $text, string $qStart, string $qEnd, string $quoteProtection, string $apos2, string $space) : string
Parameters
$text : string
$qStart : string
$qEnd : string
$quoteProtection : string
$apos2 : string
$space : string
Return values
string

findQuotes()

Mark quotations and protect their content (in case the content has hard punctuation).

findQuotes(string $text, string $citeLocalisation, string $space) : string

We also find the number of qords in long quotations and mark the text as blockquote if required. If doing this, we also need to ensure that any punctuation immediately following is part of the blockquote plus any citation or footnote.

Parameters
$text : string
$citeLocalisation : string
$space : string
Return values
string

blockQuote1()

Mark blockquotes.

blockQuote1(array<string|int, mixed> $matches) : string

This is only used when exporting a document (e.g., from the word processor)

Parameters
$matches : array<string|int, mixed>

return string

Return values
string

blockQuote2()

Format blockquotes and ensure tailend bits are part of it.

blockQuote2(string $text, string $citeLocalisation, string $space) : string

This is only used when exporting a document (e.g., from the word processor) We use

because of the indent options available to the user

Parameters
$text : string
$citeLocalisation : string
$space : string

return string

Return values
string

blockQuoteSort()

Sort the blockQuote array by length so that the preg_replace works as expected

blockQuoteSort(string $a, string $b) : string
Parameters
$a : string
$b : string
Return values
string

findEllipses()

Mark ellipses and protect their content (in case the content has hard punctuation).

findEllipses(string $text, string $citeLocalisation, string $space) : string
Parameters
$text : string
$citeLocalisation : string
$space : string
Return values
string

findTitle()

Find and note existence of title and short title in sentences

findTitle(array<string|int, mixed> $sentences) : array<string|int, mixed>
Parameters
$sentences : array<string|int, mixed>
Return values
array<string|int, mixed>

tidyInputText()

Preliminary tidying of input text.

tidyInputText(string $text, string $citeLocalisation, string $space) : string

Text from TinyMce can be a complete mess . . . For example: "[cite]201:101[/cite]. Here is an initial citation [cite]100:252-253[/cite] that has page numbers. Yet another quote from the same source with a different page number is: "Bløh, bløh, bløh"[cite]46:65-66[/cite].

Here's a new paragraph with a subsequent citation [cite]46:71[/cite]. And again [cite]46:99[/cite]. Here, [cite]101[/cite], is a work by one author who also, [cite]101[/cite], in the 44th. year, wrote this ambiguous tome stating: "yet more blah, blah, blah" [cite]100:133[/cite]. Again, a citation with multiple authors, a publication year, and a page number: "We were 'worked' like slaves" says [cite]111:41[/cite], and another with no creator [cite]99[/cite]. Try this: "A quotation. Here we go again. Third part of quotation ?" A "quotation . . . with ellipses !" So . . . here. . . . and....there... again… ? Finally. . . . it's working!

A web citation: [cite]357[/cite].

Another paragraph with a citation that has no creators[cite]1172[/cite]. "But I'll be back."

New paragraph.

I say "blah blah" [cite]515[/cite][cite]535[/cite] something.

A sentence with a citation [cite]515[/cite] and then another [cite]535[/cite] that follows.

Problems here include:

  1. No paragraph start at beginning of sentence (but there could be).
  2. Use of

    for a new paragraph mixed with use of

    ...

User input practices can vary. For example, variable number of spaces (or none) before the [cite] tag. These must be removed as the citation style dictates if there should be a space before citations or not.

Note that tinyMCE appears to do its own tidying up—not always successfully! For example, resource metadata that, in the editor's HTML view, looks like:

I say "blah blah"[cite]515[/cite][cite]535[/cite] something.

A sentence with a citation[cite]515[/cite] and then another[cite]535[/cite] that follows.

might be returned by tinyMCE as:

I say "blah blah"[cite]515[/cite][cite]535[/cite] something.

A sentence with a citation[cite]515[/cite] and then another[cite]535[/cite] that follows.

There is a missing paragraph end at the end of the first sentence—this must be dealt with.

The sentences and paragraphs need to be normalized before starting the citation parsing in such a way that the resultant text does not differ (too much) from the original but that the citation parsing can do its job. The above example should end up as:

"

[cite]201:101[/cite]. Here is an initial citation[cite]100:252-253[/cite] that has page numbers. Yet another quote from the same source with a different page number is: "Bløh, bløh, bløh"[cite]46:65-66[/cite].

Here's a new paragraph with a subsequent citation[cite]46:71[/cite]. And again[cite]46:99[/cite]. Here,[cite]101[/cite], is a work by one author who also,[cite]101[/cite], in the 44th. year, wrote this ambiguous tome stating: "yet more blah, blah, blah"[cite]100:133[/cite]. Again, a citation with multiple authors, a publication year, and a page number: "We were 'worked' like slaves" says[cite]111:41[/cite], and another with no creator[cite]99[/cite]. Try this: "A quotation. Here we go again. Third part of quotation ?" A "quotation . . . with ellipses !" So . . . here. . . . and....there... again… ? Finally. . . . it's working!

A web citation:[cite]357[/cite].

Another paragraph with a citation that has no creators[cite]1172[/cite]. "But I'll be back."

New paragraph.

I say "blah blah"[cite]515[/cite][cite]535[/cite] something.

A sentence with a citation[cite]515[/cite] and then another[cite]535[/cite] that follows.

before then replacing paragraph tags and passing onto the citation parser.

Parameters
$text : string
$citeLocalisation : string
$space : string
Return values
string

reconstituteBlockquote()

Reconsitute blockquote

reconstituteBlockquote(string $newText, array<string|int, mixed> $quotes) : string
Parameters
$newText : string
$quotes : array<string|int, mixed>
Return values
string

reconstituteQuote()

Reconsitute quotation

reconstituteQuote(string $newText, array<string|int, mixed> $quotes[, bool $keepQuoteMarks = true ]) : string
Parameters
$newText : string
$quotes : array<string|int, mixed>
$keepQuoteMarks : bool = true

Default is TRUE

Return values
string

reconstituteQuoteCallback()

Reconsitute quotation callback

reconstituteQuoteCallback(array<string|int, mixed> $matches, string $qStart, string $qEnd, bool $keepQuoteMarks) : string
Parameters
$matches : array<string|int, mixed>
$qStart : string
$qEnd : string
$keepQuoteMarks : bool
Return values
string

reconstituteText()

Return sentence temporary markup to original

reconstituteText(string $newText, string $citeLocalisation, array<string|int, mixed> $flags, array<string|int, mixed> $quotes) : string
Parameters
$newText : string
$citeLocalisation : string
$flags : array<string|int, mixed>
$quotes : array<string|int, mixed>
Return values
string

debugPrint()

Print an array prettily for debugging purposes

debugPrint(array<string|int, mixed> $array) : void
Parameters
$array : array<string|int, mixed>

getType()

Return an array containing the most used grammar types of a locale

getType([string $locale = "en" ][, string $type = "" ]) : array<string|int, string>

When grammar type is not defined for a locale, the grammar type of the language is used, and in last resort the grammar type of 'en'.

'en' is not 'en_GB' but a generic/default form using typical English grammar types (e.g., " and " as quotes). It must exist in the array.

Parameters
$locale : string = "en"

Code of a locale (format: ll[_Script][_CC]) (optional, 'en' by default)

$type : string = ""

Grammar type ('' by default). One of: 'quotation', 'hardPunctuation', 'softPunctuation', 'allPunctuation', 'abbreviations', 'numbers', 'ellipses', 'possessives', 'etAl', 'creatorConjunctions', 'wordSpace', 'apostrophe', 'initialPunctuation', 'numberConjunctions'

Tags
see
https://github.com/unicode-org/cldr/tree/main/common/main

CLDR Unicode Database

https://en.wikipedia.org/wiki/Quotation_mark
https://op.europa.eu/en/web/eu-vocabularies/formex/physical-specifications/character-encoding/use-of-quotation-marks-in-the-different-languages
Return values
array<string|int, string>

[0 => "", 1 => ""] Where the value of 0 is the starting quotation and 1 is the ending quotation

compileQuotationMarkers()

Return array of quotation markers for each locale.

compileQuotationMarkers() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

The first member of the array opens the quotation, the second member closes it.

Some languages have alternate quote marks (se 'da' below for an example). Ensure there are an even number of elements in the array.

Tags
todo

Check locale validity with later versions of Intl

see
https://en.wikipedia.org/wiki/Quotation_mark
https://op.europa.eu/en/web/eu-vocabularies/formex/physical-specifications/character-encoding/use-of-quotation-marks-in-the-different-languages
Return values
array<string|int, mixed>

compileHardPunctuation()

Return array of hard punctuation (END of sentence only) for each locale.

compileHardPunctuation() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

Spaces around punctuation must be present if required. Space characters here are assumed to be the same as those entered for compileWordSpace() below.

Return values
array<string|int, mixed>

compileSoftPunctuation()

Return array of soft punctuation (within sentence) for each locale.

compileSoftPunctuation() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

Spaces around punctuation must be present if required. Space characters here are assumed to be the same as those entered for compileWordSpace() below.

Used for finding creator names in sentences—see compileCreatorConjunctions()

Return values
array<string|int, mixed>

compileAllPunctuation()

Return array of all hard and soft punctuation.

compileAllPunctuation() : array<string|int, mixed>

Used when compiling bibliographies and deciding whether to remove the title-subtitle conjunction (removed if title is closed with punctuation).

Return values
array<string|int, mixed>

compileAbbreviations()

Return array of abbreviations for each locale.

compileAbbreviations() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

This is not necessarily an exhaustive list for each language.

———> The point is to avoid a false end of sentence <——— Only abbreviations with a locale-specific, end-of-sentence character at the end should be listed (see compileHardPunctuation() for each locale). –––> Do NOT add this final end-of-sentence character. <–––

Abbreviations are case sensitive so give all possible forms.

Common (Latin) bibliographic abbreviations are appended to each locale.

Abbreviation arrays are used to distinguish false sentence endings (abbreviations) from real sentence endings.

Abbreviations such as U.S.A. etc. are dealt with in the code.

Return values
array<string|int, mixed>

compileNumbers()

Return array of number abbreviations (ordinals and measurements) for each locale.

compileNumbers() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

In English, an ordinal would be '2nd.', '44th.' etc. The '.' is a false end-of-sentence character. You can also add abbreviations following a number where there is no space inbetween (e.g., units such as weight, measurement, time). These can also be listed in abbreviations above but there a space is inserted in the code before the abbreviation. It is probably safest to have the number abbreviation duplicated in abbreviations.

Anything listed here is assumed to have a cardinal/digit before it (checked in regexp with '\d?') and no intervening space.

———> The point is to avoid a false end of sentence <——— Only abbreviations with a locale-specific, end-of-sentence character at the end should be listed (see compileHardPunctuation() for each locale). –––> Do NOT add this final end-of-sentence character. <–––

Abbreviations are case sensitive so give all possible forms.

Tags
see
https://en.wikipedia.org/wiki/Imperial_units
https://en.wikipedia.org/wiki/United_States_customary_units
https://en.wikipedia.org/wiki/Metrication
https://en.wikipedia.org/wiki/International_System_of_Units
https://www.ramat.ca/

Ramat, A., & Benoit, A.-M. (2020). Le ramat de la typographie. 11th ed. Québec: Anne-Marie Benoit éditrice. (Original work published 2017).

Return values
array<string|int, mixed>

compileEllipses()

Return array of ellipses for each locale.

compileEllipses() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

Needs listing ONLY if the ellipses contain hard punctuation for the locale. NB Necessary to order by size so that longer strings end up in the regexp as the first matches tried. Particularly important if using similar characters as in English.

Tags
see
https://en.wikipedia.org/wiki/Ellipsis
Return values
array<string|int, mixed>

compilePossessives()

Return array of possessives for each locale.

compilePossessives() : array<string|int, string>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

When using the word processor, how is the possessive defined. This is only for a single creator's surname (or following values from the etAll array below) and is used to detect if that name is in the same sentence as the citation (e.g., "Grimshaw's", "Jones'", "and colleagues'"). English has two forms (singular or plural/words that end in 's').

Tags
see
https://en.wikipedia.org/wiki/Possessive#From_nouns
https://wals.info/chapter/57
Return values
array<string|int, string>

compileEtAl()

Return array of et al. possibilities for each locale.

compileEtAl() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

This is used only for checking the occurrence of creator names in a sentence (e.g., 'Grimshaw et al.', 'Jones and colleagues'). It relates to repositioning of the citation after the creator's name. Each locale should list common abbreviations for multiple creator names.

Add spaces to ONLY the start of the phrase if required. Space characters here are assumed to be the same as those entered for compileWordSpace() below.

Return values
array<string|int, mixed>

compileCreatorConjunctions()

Return array of creator conjunction possibilities for each locale.

compileCreatorConjunctions() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array or else the 'en' array will be used by default.

This is used only for checking the occurrence of creator names in a sentence. An example would be 'Grimshaw, Grimshaw-Aagaard & Aulery claim that . . .' where '&' is the conjunction. Checking for the ',' is done through compileSoftPunctuation().

It relates to repositioning of the citation after the creator's name. Each locale should list common conjunctions between multiple creator names.

Add spaces to either or both sides of the phrase if required. Space characters here are assumed to be the same as those entered for compileWordSpace() below.

Return values
array<string|int, mixed>

compileWordSpace()

Return array of word space characters for each locale.

compileWordSpace() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array element thus [""] or else the 'en' array will be used by default.

This is used in regexps for identifying potential gaps between words that a language might have. As the regexps are UTF-8-safe, you can use not only multiple characters but also multibyte characters here.

Each array should have only ONE element.

Word space characters here are assumed to be the same as those entered in other functions here where it is indicated they might be required either side of the characters being entered.

Note, that if your language uses the same word space character as the English 'en' locale, then you need not add your locale here as the 'en' character will be used.

Return values
array<string|int, mixed>

compileApostrophe()

Return array of apostophe for each locale (e.g., in English the "'" of "it's" (short for "it is")

compileApostrophe() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array element thus [""] or else the 'en' array will be used by default.

This is used in regexps for avoiding misidentification of quotation marks. You should only add a locale and apostrophe forms here (if not using the default 'en' locale) if the locale's apostrophe is the same as one of the quotation marks for that locale—see compileQuotationMarkers().

The regexp assumes an apostrophe is preceded and followed by a word character.

As the regexps are UTF-8-safe, you can use not only multiple characters but also multibyte characters here.

Note, that if your language uses the same apostrophe character as the English 'en' locale, then you need not add your locale here as the 'en' character will be used.

If you put in an empty array for your locale, no conjunctions will be used between numbers.

Return values
array<string|int, mixed>

compileInitialPunctuation()

Return array of initial punctuation for each locale.

compileInitialPunctuation() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use it, put in an empty array element thus [""] or else the 'en' array will be used by default.

This is used in regexps for identifying initials when part of a name (e.g. M.N. Grimshaw-Aagaard). As the regexps are UTF-8-safe, you can use not only multiple characters but also multibyte characters here.

It is also used in citation and bibliographic formatting to replace the '.' character following creator initials if a creator initial option is chosen that uses '.' (default English) while the style localisation specifies something else.

If there is no equivalent in your locale for the English character, put in an empty array element.

The first element of the 'en' array represents the character(s) between initials. For example: M. N. Grimshaw-Aagaard where periods are extracted from the 'en' array. Spaces come from compileWordSpace() above.

Each array should have only ONE element.

There should be no whitespace characters either side—the regexp takes care of this along with compileWordSpace() above.

Note, that if your language uses the same initial character as the English 'en' locale, then you need not add your locale here as the 'en' character will be used.

Return values
array<string|int, mixed>

compileNumberConjunctions()

Return array of number conjunctions for each locale.

compileNumberConjunctions() : array<string|int, mixed>

'en' must be a key of the returned array.

If a language does not use such conjunctions, put in an empty array element thus [""] or else the 'en' array will be used by default.

When presenting, for example, running time (film, TV, etc.), numbers can be conjoined by characters. For example, running time might be given as 2'45", 2:45, and so on, but these can be replaced if appropriate characters are provided for your locale and the bibliographic style localisation is set to that locale.

It is important that there be parity between the lengths of the 'en' array and another locale and across conjunction positions in the array. If there is no equivalent in your locale for the English conjunction, put in an empty array element.

For example: 2 hours, 45 minutes where comma is extracted from the 'en' array. Spaces come from compileWordSpace() above. Note that the last element has the spaces around the English word.

Note, that if your language uses the same characters as the English 'en' locale, then you need not add your locale here as the 'en' character set will be used.

Return values
array<string|int, mixed>

readComponentsList()

Read and return the list of all components installed

readComponentsList([bool $force = false ]) : array<string|int, mixed>

Status of activation are kept in /data/components.json file, other data are in /cache/components.json file because the status must be be persistent between two upgrades, or a component is uninstalled. This function merges status after reading the two files.

Use only this function to read the components list.

Parameters
$force : bool = false

Forces the cache overwriting if it already exists (optional, FALSE by default)

Return values
array<string|int, mixed>

writeComponentsList()

Write a list of components from an array

writeComponentsList(array<string|int, mixed> $ComponentsList) : void

Status of activation are kept in /data/components.json file, other data are in /cache/components.json file because the status must be be persistent between two upgrades, or a component is uninstalled. This function separates the status from the other fields and saves them in separate files.

Use only this function to save the components list.

Parameters
$ComponentsList : array<string|int, mixed>

Components list (with activation status)

refreshComponentsListCache()

Refresh the components list if needed, or forced by the caller

refreshComponentsListCache([bool $force = false ]) : void
Parameters
$force : bool = false

Forces the file overwriting if it already exists (optional, FALSE by default)

isBuiltinComponent()

Is a component builtin?

isBuiltinComponent(string $component_type, string $component_id) : bool

A builtin component is packed with the core. It can be updated and cannot be disabled or uninstalled.

Parameters
$component_type : string

A type of component (plugin, style, or template)

$component_id : string

A component Id

Return values
bool

checkComponentsList()

Return a structured list of installed components

checkComponentsList() : array<string|int, mixed>

The list is extracted form the component.json file of each component and an integrity check is performed against the component. A default activation status is computed from this minimal integrity check and the configuration read.

Return values
array<string|int, mixed>

computeComponentVersion()

Compute a component version number from the current date

computeComponentVersion() : int

The component version number is the number of days elapsed since the launch of the system of components (v6 on 2020-01-12)

Return values
int

computeComponentSignature()

Compute the hash signature of a component from its installed code

computeComponentSignature(string $component_type, string $component_id) : string

The algorithm used is defined implicitly by the WIKINDX_PACKAGE_HASH_ALGO constant.

During the hashing a temp folder is created inside cache/cmpsigning/<type_id>

Parameters
$component_type : string

A type of component (plugin, style, or template)

$component_id : string

A component Id

Return values
string

createComponentMetadataFile()

Create the component.json file of a component

createComponentMetadataFile(string $component_type, string $component_id) : void

Do not overwrite the file if it already exists.

Parameters
$component_type : string

A type of component (plugin, style, or template)

$component_id : string

A component Id

enableComponent()

Enable a component

enableComponent(string $component_type, string $component_id) : bool
Parameters
$component_type : string

A type of component (plugin, style, or template)

$component_id : string

A component Id

Return values
bool

TRUE on success, FALSE otherwise

disableComponent()

Disable a component

disableComponent(string $component_type, string $component_id) : bool
Parameters
$component_type : string

A type of component (plugin, style, or template)

$component_id : string

A component Id

Return values
bool

TRUE on success, FALSE otherwise

checkComponentIntegrity()

Check the integrity of a component

checkComponentIntegrity(string $componentDirPath) : int
Parameters
$componentDirPath : string

A path to the folder of a component

Return values
int

Error code: 0 is for OK and others issues.

componentIntegrityErrorMessage()

Return the message of an error code of the function checkComponentIntegrity()

componentIntegrityErrorMessage(int $error_code) : string
Parameters
$error_code : int
Return values
string

An error message

extractComponentPackage()

Extract a WIKINDX Component Package to a folder

extractComponentPackage(string $ComponentPackageFile, string $DestinationFolder) : bool

Only Zip packages are supported.

If missing, the destination folder is created silently. otherwise its contents is overwritten and existing files that are not in the archive are deleted.

It is not necessary to delete the files of the previous component that occupies the same destination, which limits the loss of an already installed component if the operation does not complete.

However, it is always possible to end up in an inconsistent state if the operation failed between the decompression of two files. It should be very rare.

So a component should never create files and folders in its code directories otherwise they will be deleted. Use the private cache and data folders of a component for this task.*

BUGS: https://bugs.php.net/bug.php?id=79912 Phar crashs with an exception on Gzip/Bzip2 archives

Parameters
$ComponentPackageFile : string

Absolute or relative path to an archive file created with \FILE\createComponentPackage

$DestinationFolder : string

Absolute or relative path of a folder where the archive is extracted

Return values
bool

TRUE on success, FALSE otherwise

extractComponentPackageDefinition()

Extract the component.json file of a WIKINDX Component Package to an array

extractComponentPackageDefinition(string $ComponentPackageFile) : array<string|int, mixed>

Only Zip packages are supported.

The component.json file is read in memory before parsing.

Parameters
$ComponentPackageFile : string

Absolute or relative path to an archive file created with \FILE\createComponentPackage

Return values
array<string|int, mixed>

Structured definition of the component

listPluginComponents()

List all plugins enabled in WIKINDX_DIR_COMPONENT_PLUGINS with a sane configuration

listPluginComponents([bool $all = false ]) : array<string|int, mixed>
Parameters
$all : bool = false

If TRUE, lists also disabled components

Return values
array<string|int, mixed>

Sorted associative array - keys = component_id, values = component_longname.

listStyleComponents()

List all styles enabled in WIKINDX_DIR_COMPONENT_STYLES with a sane configuration

listStyleComponents([bool $all = false ]) : array<string|int, mixed>
Parameters
$all : bool = false

If TRUE, lists also disabled components

Return values
array<string|int, mixed>

Sorted associative array - keys = component_id, values = component_longname.

listTemplateComponents()

List all templates enabled in WIKINDX_DIR_COMPONENT_TEMPLATES with a sane configuration

listTemplateComponents([bool $all = false ]) : array<string|int, mixed>
Parameters
$all : bool = false

If TRUE, lists also disabled components

Return values
array<string|int, mixed>

checkPluginVersionCompatibility()

Check version compatibility of a plugin

checkPluginVersionCompatibility(string $dir) : bool
Parameters
$dir : string
Return values
bool

loadStyleInfo()

Extract info entries from a JSON bibliographic style file and return an associative array of childnode's value of 'info' node.

loadStyleInfo(string $file) : associative
Parameters
$file : string

Location of a StyleFile

Return values
associative

array - keys = name, description, styleLocalisation, citeLocalisation, osbibversion

timezoneOffsetFromUTC()

Returns the timezone offset from UTC

timezoneOffsetFromUTC(string $timezone) : string

This function builds a timezone priority stack and return the first entry as the user's preferred timezone.

If $force_timezone is passed, this function will try to use this timezone first.

Parameters
$timezone : string
Return values
string

localeDate2dbDate()

Convert a datetime form the user timezone to the database timezone

localeDate2dbDate(string $datetime) : string

Use it for converting a date input by a user to store in the db as UTC.

If $datetime is not parseable then its value is returned unformated.

Parameters
$datetime : string

Comes in from the database in the format 'YYYY-MM-DD HH:MM:SS' e.g. 2013-01-31 15:54:55

Return values
string

dbDate2localeDate()

Convert a datetime form the database timezone to user timezone

dbDate2localeDate(string $datetime) : string

Use it for converting a date set inside a form field that must be displayed with user timezone.

If $datetime is not parseable then its value is returned unformated.

Parameters
$datetime : string

Comes in from the database in the format 'YYYY-MM-DD HH:MM:SS' e.g. 2013-01-31 15:54:55

Return values
string

dateFormatFromString()

Format dates and times for localization in numeric short format

dateFormatFromString(string $datetime) : string

Use it for displaying data to the user, not formatting data for the db.

If $datetime is not parseable then its value is returned unformated.

If IntlDateFormatter instanciation fails then the date is formated with "Y-M-d H:i:s" pattern.

Parameters
$datetime : string

Comes in from the database in the format 'YYYY-MM-DD HH:MM:SS' e.g. 2013-01-31 15:54:55

Return values
string

dateFormatFromTimeStamp()

Format dates and times for localization in numeric short format

dateFormatFromTimeStamp(int $timestamp) : string

Use it for displaying data to the user, not formatting data for the db.

If IntlDateFormatter instanciation fails then the date is formated with "Y-M-d H:i:s" pattern.

Parameters
$timestamp : int
Return values
string

getAllTimezones()

Return a selected list of all time zones recognised by PHP

getAllTimezones([bool $sorted_by_key = false ]) : array<string|int, string>

Each entry of the returned array is English time zones name (taken from PHP) as key and its localized name as value.

Parameters
$sorted_by_key : bool = false

If TRUE, sort the table by keys instead of values

Tags
see
https://www.php.net/manual/en/timezones.php
Return values
array<string|int, string>

determine_timezone()

Determine the user's preferred timezone.

determine_timezone([string|null $force_timezone = null ]) : string

This function builds a timezone priority stack and return the first entry as the user's preferred timezone.

If $force_timezone is passed, this function will try to use this timezone first.

Parameters
$force_timezone : string|null = null

Name of a timezone

Return values
string

determine_timezone_priority_stack()

Determine the user's preferred timezone.

determine_timezone_priority_stack([string|null $force_timezone = null ]) : array<string|int, string>

This function builds a timezone priority stack. The first is the highest priority.

If $force_timezone is passed, this function will try to use this timezone first.

Parameters
$force_timezone : string|null = null

Name of a timezone

Return values
array<string|int, string>

pkgPaths()

Get and set the DOCX package paths, creating the folder in cache/files/

pkgPaths(string $method) : mixed
Parameters
$method : string

STARTDOM()

Create and traverse the DOM from the HTML file.

STARTDOM(string $fDir, string $fName, XMLWriter $xml) : void
Parameters
$fDir : string
$fName : string
$xml : XMLWriter

traverseDOM()

Traverse the DOM and produce DOCX code

traverseDOM(mixed $domNode, XMLWriter $xml) : mixed
Parameters
$domNode : mixed
$xml : XMLWriter

nodeAttributes()

Convert attributes

nodeAttributes(DOMNODE $node, XMLWriter $xml) : array<string|int, mixed>
Parameters
$node : DOMNODE
$xml : XMLWriter
Return values
array<string|int, mixed>

calculateTwipsWidth()

Calculate table widths in twips from either % or px values

calculateTwipsWidth(string $input) : int
Parameters
$input : string
Return values
int

calculateBorderSize()

Calculate table border size in twips from px values.

calculateBorderSize(string $input) : int

"Specifies the width of the border. Table borders are line borders (see the val attribute below), and so the width is specified in eighths of a point, with a minimum value of two (1/4 of a point) and a maximum value of 96 (twelve points)." From: http://officeopenxml.com/WPtableCellProperties-Borders.php

Parameters
$input : string
Return values
int

domImageToDocxImage()

Images are renamed and copied to

domImageToDocxImage(DOMNode $domNode, XMLWriter $xml) : void
Parameters
$domNode : DOMNode
$xml : XMLWriter

domNodeAttributes2Array()

Convert attributes of a DOMNode to an array of attributes

domNodeAttributes2Array(DOMNode $domNode) : array<string|int, string>
Parameters
$domNode : DOMNode
Return values
array<string|int, string>

colours()

Set and write colours.

colours(string $method[, XMLWriter $xml = null ][, string $colour = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$colour : string = ''

Default ''

getColour()

Ensure input colour is in 6-character HEX format

getColour(string $colour) : string
Parameters
$colour : string
Return values
string

rels()

Set and get the rels array and the rId.

rels(string $method[, string $rel = '' ]) : mixed
Parameters
$method : string
$rel : string = ''

Default ''

endnotes()

Various functions related to endnotes

endnotes(string $method[, string|int $input = '' ]) : mixed
Parameters
$method : string
$input : string|int = ''

Default is ''

fonts()

Set and get the rFonts array and the current font.

fonts(string $method[, XMLWriter $xml = null ][, string $font = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$font : string = ''

Default ''

sizes()

Set and get the rFonts array and the current font.

sizes(string $method[, XMLWriter $xml = null ][, string $size = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$size : string = ''

Default ''

writeSize()

Convert font size to DOCX (in span and p tags as "style=font-size: xxpt;") and write XML

writeSize(XMLWriter $xml, string $size) : void
Parameters
$xml : XMLWriter

Default NULL

$size : string

footnotes()

Various functions related to footnotes

footnotes(string $method[, string|int $input = '' ]) : mixed
Parameters
$method : string
$input : string|int = ''

Default is ''

formats()

Set and write the rProps array

formats(string $method[, XMLWriter $xml = null ][, string $format = '' ]) : void
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$format : string = ''

Default ''

italics()

Italics (em or i)

italics(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

underline()

underline (span text-decoration: line-through)

underline(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

bold()

bold (strong or b)

bold(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

strikethrough()

strikethrough (span text-decoration: line-through)

strikethrough(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

superscript()

superscript (sup)

superscript(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

subscript()

subscript (sup)

subscript(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

images()

Set and write images.

images([XMLWriter $xml = null ][, string $imagePathSource = '' ][, float $editW = 0 ][, float $editH = 0 ][, string $mimeType = '' ][, string $style = '' ]) : void
Parameters
$xml : XMLWriter = null

Default NULL

$imagePathSource : string = ''

Default ''

$editW : float = 0

Default 0

$editH : float = 0

Default 0

$mimeType : string = ''

Default ''

$style : string = ''

Default ''

floatParams()

Set and get image float values.

floatParams(string $method[, string $style = '' ]) : mixed

If images are defined as floating, they all belong to the nsame paragraph. This includes text in the next paragraph (as in the HTML

Parameters
$method : string
$style : string = ''

= ''

relsStore()

get the default file extention associated to an image mimetype

relsStore(string $method[, string $extension = "" ][, string $contentType = "" ]) : array<string|int, mixed>
Parameters
$method : string
$extension : string = ""
$contentType : string = ""
Return values
array<string|int, mixed>

justify()

Set and get the justification and indentation for the current paragraph.

justify(string $method[, XMLWriter $xml = null ][, string $input = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$input : string = ''

Default ''

lists()

Set and get methods for dealing with lists.

lists(string $method[, XMLWriter $xml = null ][, string $list = 'ul' ][, string $attr = '' ]) : mixed

$list can be either 'ul' or 'ol'. If $list is 'ul' and $attr is '', then this is the initial bullet of the UL_LIST array—an array of three bullet types we cycle through. If $list is 'ol' and $attr is '', then this is a numbered list. In tinyMCE, unless specified, a numbered list levels stay on numbered.

Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$list : string = 'ul'

Default 'ul'

$attr : string = ''

Default ''

numIds()

Build up the numIds array

numIds(int $numId, int $abstractNumId) : array<string|int, mixed>
Parameters
$numId : int
$abstractNumId : int
Return values
array<string|int, mixed>

abstractNumIds()

Build up the abstractNumIds array

abstractNumIds(int $level, string $numFmt, mixed $lvlText) : array<string|int, mixed>
Parameters
$level : int
$numFmt : string
$lvlText : mixed
Return values
array<string|int, mixed>

startListItem()

Start a list (ul or ol)

startListItem(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

listItemProps()

List item (li)

listItemProps(XMLWriter $xml, int $ilvl, int $numId) : void
Parameters
$xml : XMLWriter
$ilvl : int
$numId : int

endListItem()

End a list (ul or ol)

endListItem(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

needNumbering()

Set and get the flag indicating if the word/numbering.xml file needs to be written (e.g., for lists, endnotes, and so on)

needNumbering(string $method) : bool
Parameters
$method : string
Return values
bool

needTables()

Set and get the flag indicating if the xml string needs DOM-traversal in order to insert table headers (see \DOCX\format\TABLES\writeTableHeaders())

needTables(string $method) : bool
Parameters
$method : string
Return values
bool

needSections()

Set and get the flag indicating if the xml string needs DOM-traversal in order to insert sections (see \DOCX\format\SECTIONS\writeSections())

needSections(string $method) : bool
Parameters
$method : string
Return values
bool

needFootnotes()

Set and get the flag indicating if the xml string needs DOM-traversal in order to insert footnotes (see \FOOTNOTES)

needFootnotes(string $method) : bool
Parameters
$method : string
Return values
bool

needEndnotes()

Set and get the flag indicating if the xml string needs DOM-traversal in order to insert endnotes (see \ENDNOTES)

needEndnotes(string $method) : bool
Parameters
$method : string
Return values
bool

hr()

Horizontal ruler (hr)

hr(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

Start a hyperlink (a)

startHyperlink(XMLWriter $xml, string $url) : void
Parameters
$xml : XMLWriter
$url : string

End a hyperlink (a)

endHyperlink(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

startHeading()

Start a heading (h1, h2, etc.)

startHeading([XMLWriter $xml = null ][, string $size = "" ]) : void

A heading is text enclosed within a paragraph

Parameters
$xml : XMLWriter = null

Default NULL

$size : string = ""

endHeading()

End a heading (h1, h2, etc.)

endHeading(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

getXmlRelsId()

Produce an incrementing rId number for the document.xml.rels file.

getXmlRelsId() : string

This is also used for the generation of rId numbers for footnotes, endnotes, hyperlinks, and images.

Return values
string

getDotRelsId()

Produce an incrementing rId number for the .rels file

getDotRelsId() : string
Return values
string

genHex()

Generate a unique random 8 digit hex value used for paragraph ids, table cell ids, etc.

genHex() : string
Return values
string

pxToEmu()

Convert pixels to emus (English Metric Units)

pxToEmu(float $px) : float

There are 96 pixels / inch There are 914,400 emus / inch Therefore, each pixel is 9525 emus (914,400 / 96)

Parameters
$px : float
Return values
float

twipToEmu()

Convert twips to emus (English Metric Units)

twipToEmu(int $twip) : int

There are 1440 twips / inch There are 914,400 emus / inch Therefore, each twip is 635 emus (914,400 / 1440)

Parameters
$twip : int
Return values
int

br()

Add a new line (br)

br(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

pStatus()

Set and get the open/close status of a paragraph. The initial text in a table cell is not enclosed in p tags in the html but must be in a paragrph in DOCX. However, a second paragraph in the cell _is_ enclosed in p tags in the HTML. We must ensure that the initial paragraph of a cell does not itself encapsulate any other paragraphs in the cell. The initial text in a cell will call startP() and set the pStatus to TRUE (open). Any subsequent call to startP() must check if pStatus is TRUE and, if so, close the preceding paragraph.

pStatus(string $method) : bool
Parameters
$method : string
Return values
bool

startP()

Start a paragraph (p).

startP(XMLWriter $xml[, bool $isPreElement = false ]) : void

Return the current paragraph ID in case we need to insert section data

Parameters
$xml : XMLWriter
$isPreElement : bool = false

endP()

End a paragraph (p)

endP(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

pProps()

Set and write the pProps

pProps(string $method[, XMLWriter $xml = null ][, string $prop = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$prop : string = ''

Default ''

Tags
@return

mixed;

rProps()

Set and write the rProps

rProps(string $method[, XMLWriter $xml = null ][, string $prop = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$prop : string = ''

Default ''

Tags
@return

mixed;

sections()

Set and get the initial sectPr element

sections(string $method[, XMLWriter $xml = null ][, string $section = '' ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$section : string = ''

Default ''

writeSections()

Insert section breaks other than the default (i.e., section breaks have been inserted in the WP).

writeSections(string $input) : string

Note that the code here only allows for one set of section variables regarding page dimensions. This is fine for our purposes . . .

Parameters
$input : string
Return values
string

pageNums()

Set and get page number options. These are written as part of the section block.

pageNums(string $method[, string $input = '' ]) : mixed
Parameters
$method : string
$input : string = ''

tables()

Set and get and manipulate table settings and elements.

tables(string $method[, XMLWriter $xml = null ][, string $param = '' ][, array<string|int, mixed> $attr = [] ]) : mixed
Parameters
$method : string
$xml : XMLWriter = null

Default NULL

$param : string = ''

Default ''

$attr : array<string|int, mixed> = []

Default []

tableHeaders()

Handle table headers to be written to the XML after all tables' data have been collected.

tableHeaders(string $method[, string $input = '' ][, array<string|int, mixed> $attr = [] ]) : bool

TinyMCE is quite buggy. Cell splitting or merging in the editor can leave behind empty rows or cells and lead to incorrect colspan or rowspan values. Additionally, nesting tables in tinyMCE is problematic. For example, I have seen situations where not only is the width of a table set to more than 100% but that width is for a table nested within another table that has a width of less than 100%. Sometimes, two widths are given for the table . . .

Parameters
$method : string
$input : string = ''

Default ''

$attr : array<string|int, mixed> = []

Default []

Return values
bool

getGridArray()

Get the gridArray for the table cells once they have all been parsed and the table properties are ready to be finalised in XML.

getGridArray(array<string|int, mixed> $header) : array<string|int, mixed>
Parameters
$header : array<string|int, mixed>
Return values
array<string|int, mixed>

calculateGridArrayWidths()

Calculate the gridArray widths.

calculateGridArrayWidths(array<string|int, mixed> $header) : array<string|int, mixed>
Parameters
$header : array<string|int, mixed>
Return values
array<string|int, mixed>

startTable()

Start a new table

startTable(XMLWriter $xml, array<string|int, mixed> $attr) : void
Parameters
$xml : XMLWriter
$attr : array<string|int, mixed>

endTable()

End a table

endTable(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

writeCells()

Write the table cell widths (for existing cells) and insert vMerge=continue cells after having created the grid.

writeCells(DOMDocument $dom, DOMNode $table, array<string|int, mixed> $header) : bool

Note, that with nested tables, the list of cells gathered with getElementsByTagName('tc') is from both the mother table and the nested table.

Parameters
$dom : DOMDocument
$table : DOMNode
$header : array<string|int, mixed>
Return values
bool

createVmergeCell()

Write a vMerge=continue cell.

createVmergeCell(DOMDocument $dom, array<string|int, mixed> $header, string $vmCellId) : DOMNode
Parameters
$dom : DOMDocument
$header : array<string|int, mixed>
$vmCellId : string
Return values
DOMNode

writeTblGrid()

Write the tblGrid node

writeTblGrid(DOMDocument $dom, DOMNode $table, array<string|int, mixed> $gridArray) : void
Parameters
$dom : DOMDocument
$table : DOMNode
$gridArray : array<string|int, mixed>

createTblProps()

Set up the tblPr node

createTblProps(DOMDocument $dom, DOMNode $table, array<string|int, mixed> $gridArray, array<string|int, mixed> $attr) : void
Parameters
$dom : DOMDocument
$table : DOMNode
$gridArray : array<string|int, mixed>
$attr : array<string|int, mixed>

startRow()

Start a new table row

startRow(XMLWriter $xml, array<string|int, mixed> $attr) : void

The border exceptions are not working. See http://officeopenxml.com/WPtablePropertyExceptions.php

Parameters
$xml : XMLWriter
$attr : array<string|int, mixed>

endRow()

End a table row

endRow(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

startCell()

Start a new table cell

startCell(XMLWriter $xml, array<string|int, mixed> $attr) : void

Note that tinyMce typically provides individual cell widths that, in any row, add up to less than the specified table width. The specified table width is used for calculations but, at the end when the XML is written for the table properties, the value for w:tblW is adjusted from that stored in the table header array to be a sum of the cell widths in the first row.

Parameters
$xml : XMLWriter
$attr : array<string|int, mixed>

vMergeProps()

Set and get and reset the properties of the vMerge=restart cells for use in their vMerge=continue cells

vMergeProps(string $method[, string $cellId = '' ][, array<string|int, mixed> $props = [] ]) : mixed
Parameters
$method : string
$cellId : string = ''

Default is ''

$props : array<string|int, mixed> = []

Default is []

cellProps()

Do properties (borders, shading) for table cells

cellProps(XMLWriter $xml, array<string|int, mixed> $attr) : array<string|int, mixed>
Parameters
$xml : XMLWriter
$attr : array<string|int, mixed>
Return values
array<string|int, mixed>

endCell()

End a table cell

endCell(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

text()

Text

text(string $method, XMLWriter $xml, string $input[, bool $isPreElement = false ]) : void
Parameters
$method : string
$xml : XMLWriter
$input : string
$isPreElement : bool = false

// Is the text wrapped inside an HTML

 element? (Default is FALSE)

writeRunCharacterFormatting()

writeRunCharacterFormatting(XMLWriter $xml, array<string|int, mixed> $flags) : void
Parameters
$xml : XMLWriter
$flags : array<string|int, mixed>

writeElementAttribute()

Write an array of attributes within an element.

writeElementAttribute(object $xml, string $element, array<string|int, mixed> $array) : void

If $element === FALSE, this function will only write attributes—it is assumed that you will manually start and end the enclosing element.

Parameters
$xml : object
$element : string
$array : array<string|int, mixed>

writeElementAttributeNs()

Write an array of NS attributes within an element.

writeElementAttributeNs(object $xml, string $element, array<string|int, mixed> $array) : void

If $element === FALSE, this function will only write attributes—it is assumed that you will manually start and end the enclosing element.

Parameters
$xml : object
$element : string
$array : array<string|int, mixed>

e.g. 'asciiTheme' => ['prefix' => 'w', 'val' => "minorHAnsi"],

writeElement()

Write one or more elements

writeElement(object $xml, array<string|int, mixed> $element) : void

$element can be an array [$name => $value] or an array of such arrays. If $value in the array is itself an array, then $array is [$name => ['prefix', 'value']] and writeElementNs() is used rather than writeElement().

Parameters
$xml : object
$element : array<string|int, mixed>

writeElementMultAttrNs()

Write an NS element with prefixes and multiple attributes

writeElementMultAttrNs(object $xml, array<string|int, mixed> $element) : void

$element is an array such as: [ 'ePrefix' => 'w', 'eName' => 'rFonts', 'asciiTheme' => ['prefix' => 'w', 'val' = "minorHAnsi"], 'eastasiaTheme' => ['prefix' => 'w', 'val' = "minorHAnsi"], 'hAnsiTheme' => ['prefix' => 'w', 'val' = "minorHAnsi"], 'csTheme' => ['prefix' => 'w', 'val' = "minorBidi"], ]

Parameters
$xml : object
$element : array<string|int, mixed>

writeFontDefinition()

Write a font definition (for fontTable.xml header)

writeFontDefinition(object $xml, array<string|int, mixed> $font) : void
Parameters
$xml : object
$font : array<string|int, mixed>

endElement()

End an element

endElement(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

format()

Format for HTML or RTF/plain?

format(string $data, string $outputFormat[, int|false $citeId = false ][, int|false $bibId = false ]) : string
Parameters
$data : string

Input string

$outputFormat : string

One of 'wikindx', 'html', 'cite', 'wp', 'plain', 'rtf'

$citeId : int|false = false

Default FALSE (Only present and used if formatting a citation for 'wikindx' or 'html' output)

$bibId : int|false = false

Default FALSE (Only present and used if formatting a bibliography reference for 'wikindx' or 'html' output)

Return values
string

notes()

Set and get footnote and endnote texts.

notes(string $method[, array<string|int, mixed> $flags = [] ][, string $text = '' ][, array<string|int, mixed> $citationStyle = [] ]) : mixed

e.g., for DOCX, we do not use the footnote texts in spans enclosed in divs but store them here.

Parameters
$method : string
$flags : array<string|int, mixed> = []

default is []

$text : string = ''

Default is ''

$citationStyle : array<string|int, mixed> = []

Default is []

bbcode()

Deal with BBCODE

bbcode(string $data, string $outputFormat) : string
Parameters
$data : string
$outputFormat : string
Return values
string

endnoteId()

Format the endnote ID in the endnotes

endnoteId(array<string|int, mixed> $citationStyle, int $id, string $outputFormat) : string
Parameters
$citationStyle : array<string|int, mixed>
$id : int
$outputFormat : string
Return values
string

trueFootnoteId()

Format the true footnote ID in the footnotes section

trueFootnoteId(array<string|int, mixed> $citationStyle, int $id, string $outputFormat) : string
Parameters
$citationStyle : array<string|int, mixed>
$id : int
$outputFormat : string
Return values
string

newline()

Return a newline character.

newline(string $outputFormat) : string

Also, bibliographic/footnote templates may have the special string 'NEWLINE'

Parameters
$outputFormat : string
Return values
string

setHeaders()

Set download headers

setHeaders(string $type, int $size, string $filename, string $lastmodified[, string $mode = 'inline' ][, string $charset = '' ]) : void
Parameters
$type : string
$size : int
$filename : string
$lastmodified : string
$mode : string = 'inline'

'inline' or 'attachment' ('attachment' forces the download)

$charset : string = ''

Default is ''

readfile_chunked()

Download file to user

readfile_chunked(string $file) : bool

From http://uk3.php.net/function.readfile

Parameters
$file : string
Return values
bool

createFileName()

create a fileName for this file. If directory based on session ID does not exist, create it.

createFileName(string $dirName, string $string, string $extension) : array<string|int, mixed>
Parameters
$dirName : string
$string : string

File contents

$extension : string

File extension

Return values
array<string|int, mixed>

(filename, full filepath)

fileAttachUploadMaxSize()

Get attachment max upload size in bytes

fileAttachUploadMaxSize() : int

WIKINDX_FILE_ATTACH_SIZE_UPPER_LIMIT is the upper limit

Return values
int

imageUploadMaxSize()

Get image max upload size in bytes

imageUploadMaxSize() : int

WIKINDX_IMG_SIZE_UPPER_LIMIT is the upper limit

Return values
int

fileUploadMaxSize()

Get file max upload size in bytes

fileUploadMaxSize() : int

1G is the upper limit

Return values
int

return_bytes()

Convert some ini values to numerical values (to bytes)

return_bytes(int|string $val) : int
Parameters
$val : int|string
Return values
int

dirToArray()

Enumerate files and subdirectories of a directory except . and .. subdirectories

dirToArray(string $dir) : array<string|int, mixed>
Parameters
$dir : string

A directory to explore

Return values
array<string|int, mixed>

An array of file and subdirectory names

dirInDirToArray()

Enumerate subdirectories of a directory except . and .. subdirectories

dirInDirToArray(string $dir) : array<string|int, mixed>
Parameters
$dir : string

A directory to explore

Return values
array<string|int, mixed>

An array of subdirectory names

fileInDirToArray()

Enumerate files of a directory except . and .. subdirectories

fileInDirToArray(string $dir) : array<string|int, mixed>
Parameters
$dir : string

A directory to explore

Return values
array<string|int, mixed>

An array of filenames

recurse_AbsoluteDirToArray()

Enumerate recursively files and subdirectories of a directory except . and .. subdirectories

recurse_AbsoluteDirToArray(string $dir) : array<string|int, mixed>
Parameters
$dir : string

A directory to explore

Return values
array<string|int, mixed>

An array of file and subdirectory absolute paths

recurse_fileInDirToArray()

Enumerate recursively files and subdirectories of a directory except . and .. subdirectories

recurse_fileInDirToArray(string $dir) : array<string|int, mixed>
Parameters
$dir : string

A directory to explore

Return values
array<string|int, mixed>

An array of file and subdirectory paths

recurse_dir_copy()

Copy recursively a folder

recurse_dir_copy(string $src, string $dst) : void
Parameters
$src : string

Source directory

$dst : string

Destination directory

recurse_rmdir()

Remove recursively a folder

recurse_rmdir(string $dir) : void
Parameters
$dir : string

Target directory

rmfile()

Remove a file

rmfile(string $file) : void
Parameters
$file : string

Target filename

fileUpload()

Return filename, hash, type and size of an uploaded file or an array of such information for each file uploaded

fileUpload([false|string $filename = false ][, bool $multiple = false ]) : array<string|int, mixed>
Parameters
$filename : false|string = false
$multiple : bool = false

multiple files (default FALSE)

Return values
array<string|int, mixed>

(filename, hash, type, size) or array of these

rearrangeFilesArray()

Rearrange the $_FILES array for multiple file uploads

rearrangeFilesArray(array<string|int, mixed> $files) : array<string|int, mixed>
Parameters
$files : array<string|int, mixed>
Return values
array<string|int, mixed>

fileStore()

Store uploaded file in given directory with given name

fileStore(string $dirName, string $name[, int|false $index = false ]) : bool
Parameters
$dirName : string
$name : string
$index : int|false = false

if moving multiple file uploads

Return values
bool

listFiles()

list and HTML format all files for sessionID

listFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

(filesDir, fileDeleteSecs, fileArray)

tidyFiles()

tidy up the files directory by removing all files and folders older than WIKINDX_FILE_DELETE_SECONDS

tidyFiles() : void

zip()

Zip up an array of files. File is stored in files dir.

zip(array<string|int, mixed> $files, string $dirpath) : mixed
Parameters
$files : array<string|int, mixed>

unqualified filenames (key is label of file, value is filename on disk)

$dirpath : string

directory path

Return values
mixed

unqualified SHA1'ed filename of zip or FALSE if failure

read_json_file()

Read a JSON file to a data structure

read_json_file(string $file) : mixed

Read a JSON file and unserialize its content to a data structure with json_decode()

Parameters
$file : string

An absolute or relative path to a file

Tags
see
https://www.php.net/manual/en/function.json-decode.php
Return values
mixed

A value, a data structure, or NULL on error

write_json_file()

Write a data structure to a JSON file

write_json_file(string $file, mixed $data) : int

Serialize a data structure with json_encode() and write it in a file

Parameters
$file : string

An absolute or relative path to a file

$data : mixed

A data structure or a value

Tags
see
https://www.php.net/manual/en/function.json-encode.php
Return values
int

JSON_ERROR_NONE on success, a JSON error constant on encoding error, or JSON_ERROR_NONE - 1 on file writing error

formatSize()

Format a file size in bytes to the greater multiple for display

formatSize(int $size) : string
Parameters
$size : int

In bytes

Return values
string

getMimeType()

Return the mime-type of a file

getMimeType(string $filepath[, string $altfilename = "" ]) : string

The PHP finfo() function doesn't always return the right mime-type, so it tries to read it from OCF containers and to fallback on file extension when the mime-type is obviously too generic (e.g. text/plain, text/xml).

You can provide an alternate filename to force the extension instead of taking the extension of filepath.

Parameters
$filepath : string

An absolute or relative file path

$altfilename : string = ""

Default is ""

Return values
string

A mime-type

getExtension()

Return the extension of a file in lowercase (without point)

getExtension(string $filepath) : string
Parameters
$filepath : string

An absolute or relative file path

Return values
string

replaceFileExtension()

Replace the extension of a file by an other

replaceFileExtension(string $filepath, string $new_extension) : string
Parameters
$filepath : string

An absolute or relative file path

$new_extension : string

New extension (without point)

Return values
string

removeFileExtension()

Remove the extension of a file path (and its point)

removeFileExtension(string $filepath) : string
Parameters
$filepath : string

An absolute or relative file path

Return values
string

bin2hex_encode_file()

Encode a file with bin2hex as an other file

bin2hex_encode_file(string $fsrc, string $fdst) : void
Parameters
$fsrc : string

An absolute or relative file path as source

$fdst : string

An absolute or relative file path as destination

hash_path()

Generates a hash of a file or directory at the given path with the specified algo.

hash_path(string $algo, string $path) : string

If the path is to a single file, it uses hash_file. Otherwise, it recursively loops through all files in a directory to generate the hash of hashes of those files.

NB: to hash component directories use hash_component_dir() instead.

Parameters
$algo : string
  • the hash algo
$path : string
  • the path of the folder or file
Tags
see
https://www.php.net/manual/en/function.hash-algos.php
Return values
string

hash_component_dir()

Generates a hash of all files and directories of a component with the specified algo.

hash_component_dir(string $algo, string $path) : string

If the path is to a single file, it uses hash_file. Otherwise, it recursively loops through all files in a directory to generate the hash of hashes of those files.

component.json file is hashed from a separate copy in memory, otherwise the calculated hash is different at each execution although the component has not changed.

Parameters
$algo : string
  • the hash algo
$path : string
  • the path of the folder or file
Tags
see
https://www.php.net/manual/en/function.hash-algos.php
Return values
string

imageMimeTypeConstant2extension()

Get the default file extention associated to an image mimetype

imageMimeTypeConstant2extension(int $mimeTypeConstant) : string
Parameters
$mimeTypeConstant : int
Return values
string

imageMimeTypeConstant2ContentType()

Get the default file extention associated to an image mimetype

imageMimeTypeConstant2ContentType(int $mimeTypeConstant) : string
Parameters
$mimeTypeConstant : int
Return values
string

_inlineHtmlAttribute()

Build a string for insertion of an HTML tag attribute.

_inlineHtmlAttribute([string $name = '' ][, mixed $value = '' ]) : string

Ensures that the attribute value is never empty (incorrect syntax)

Parameters
$name : string = ''
$value : mixed = ''

Default is ''

Return values
string

formHeader()

print form header with hidden action field

formHeader(string $action[, string $js = '' ][, bool $BT = true ]) : string

$js is for javascript functions

Parameters
$action : string
$js : string = ''

Default is ''

$BT : bool = true

Default is TRUE

Return values
string

formHeaderVisibleAction()

print form header with visible action field -- typically used for tinyMCE popups

formHeaderVisibleAction(string $action, string $name[, string $js = '' ][, bool $BT = true ]) : string

$js is for javascript functions

Parameters
$action : string
$name : string
$js : string = ''

Default is ''

$BT : bool = true

Default is TRUE

Return values
string

formHeaderName()

print form header with hidden action field and name and id fields

formHeaderName(string $action, string $name[, string $js = '' ][, bool $BT = true ]) : string

js is for javascript functions

Parameters
$action : string
$name : string
$js : string = ''

Default is ''

$BT : bool = true

Default is TRUE

Return values
string

formEnd()

end a form

formEnd() : string
Return values
string

formMultiHeader()

print form header with hidden action field for multi-part upload forms

formMultiHeader(string $action[, string $js = '' ][, bool $BT = true ]) : string
Parameters
$action : string
$js : string = ''

Default is ''

$BT : bool = true

Default is TRUE

Return values
string

formSubmit()

print form footer with submit field

formSubmit([mixed $value = false ][, string|false $name = false ][, string $js = '' ]) : string
Parameters
$value : mixed = false

Default is FALSE

$name : string|false = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

closePopup()

print form footer with close popup button

closePopup(mixed $value) : string
Parameters
$value : mixed
Return values
string

formSubmitButton()

print form footer with submit button field

formSubmitButton(mixed $value[, string|false $name = false ][, string $js = '' ]) : string
Parameters
$value : mixed

Default is FALSE

$name : string|false = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

formReset()

print form reset button

formReset(mixed $value[, string $js = '' ]) : string
Parameters
$value : mixed
$js : string = ''

Default is ''

Return values
string

hidden()

print hidden form input

hidden(string $name, string $value[, string $js = '' ]) : string
Parameters
$name : string
$value : string
$js : string = ''

Default is ''

Return values
string

hiddenNoJSNoId()

print hidden form input without JavaScript action

hiddenNoJSNoId(string $name, mixed $value) : string
Parameters
$name : string
$value : mixed
Return values
string

radioButton()

print radio button

radioButton(string $name[, mixed $value = false ][, bool|string $checked = false ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$checked : bool|string = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

radioButtonGroup()

Print a radio button group.

radioButtonGroup(string $groupName, array<string|int, mixed> $buttons, mixed $checkedValue[, string $divider = BR ][, string $js = '' ]) : string

For more fine-grained control over radio buttons (individual $js for each button, placement of label etc.), do not use this but use radioButton() directly.

Parameters
$groupName : string
$buttons : array<string|int, mixed>

[$buttonValue => $buttonLabel]

$checkedValue : mixed

Which $buttonValue is checked

$divider : string = BR

Default BR

$js : string = ''

Default ''

Return values
string

checkbox()

print checkbox

checkbox(string $label, string $name[, bool|string $checked = false ][, string $title = '' ][, string $js = '' ]) : string
Parameters
$label : string
$name : string
$checked : bool|string = false

Default is FALSE

$title : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

selectYesNoBox()

create special select box that only provides yes (1) and no (0) as options (values)

selectYesNoBox(string $name, string|null $select[, string $js = '' ]) : string

'selected value' is set SELECTED

Parameters
$name : string
$select : string|null
$js : string = ''

Default is ''

Return values
string

selectFBox()

create select boxes for HTML forms

selectFBox(string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

First OPTION is always SELECTED optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$name : string
$array : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectedBox()

create select boxes for HTML forms

selectedBox(string $name, array<string|int, mixed> $array, string $select[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

'selected value' is set SELECTED optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$name : string
$array : array<string|int, mixed>
$select : string
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectFBoxValue()

create select boxes for HTML forms

selectFBoxValue(string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

First entry is default selection. OPTION VALUE is set so expects assoc. array where key holds this value optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$name : string
$array : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectedBoxValue()

create select boxes for HTML forms

selectedBoxValue(string $name, array<string|int, mixed> $array, string $select[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

$select is default selection. OPTION VALUE is set so expects assoc. array where key holds this value optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$name : string
$array : array<string|int, mixed>
$select : string
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectFBoxValueMultiple()

create select boxes for HTML forms

selectFBoxValueMultiple(string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

First entry is default selection. OPTION VALUE is set so expects assoc. array where key holds this value. MULTIPLE values may be selected optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$name : string
$array : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectedBoxValueMultiple()

create select boxes for HTML forms

selectedBoxValueMultiple(string $name, array<string|int, mixed> $array, array<string|int, mixed> $values[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

OPTION VALUE is set so expects assoc. array where key holds this value. MULTIPLE values may be selected optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$name : string
$array : array<string|int, mixed>
$values : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

passwordInput()

password input type

passwordInput(string $name[, mixed $value = false ][, int $size = 20 ][, int $maxLength = 255 ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$size : int = 20

Default is 20

$maxLength : int = 255

Default is 255

$js : string = ''

Default is ''

Return values
string

honeypotInput()

A honeypot field made with text input

honeypotInput(string $name) : string

Robots fill it by mistake and are pawned!

Parameters
$name : string
Return values
string

textInput()

text input type

textInput(string $name[, mixed $value = false ][, int $size = 20 ][, int $maxLength = 255 ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$size : int = 20

Default is 20

$maxLength : int = 255

Default is 255

$js : string = ''

Default is ''

Return values
string

colorInput()

color input type

colorInput(string $name[, mixed $value = false ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

textareaInput()

textarea input type

textareaInput(string $name[, mixed $value = false ][, int $cols = 30 ][, int $rows = 5 ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$cols : int = 30

Default is 30

$rows : int = 5

Default is 5

$js : string = ''

Default is ''

Return values
string

textareaInputmceNoEditor()

textarea input type without MCE editor

textareaInputmceNoEditor(string $name[, mixed $value = false ][, int $cols = 30 ][, int $rows = 5 ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$cols : int = 30

Default is 30

$rows : int = 5

Default is 5

$js : string = ''

Default is ''

Return values
string

textareaReadonly()

textarea readonly

textareaReadonly(string $name[, mixed $value = false ][, int $cols = 30 ][, int $rows = 5 ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$cols : int = 30

Default is 30

$rows : int = 5

Default is 5

$js : string = ''

Default is ''

Return values
string

fileUpload()

upload box

fileUpload(string $name[, int $size = 20 ][, string $accept = "" ][, string $js = '' ]) : string
Parameters
$name : string
$size : int = 20

Default is 20

$accept : string = ""

Default is "" (all file types)

$js : string = ''

Default is ''

Return values
string

fileUploadMultiple()

upload box for multiple files

fileUploadMultiple(string $name[, int $size = 20 ][, string $accept = "" ][, string $js = '' ]) : string
Parameters
$name : string
$size : int = 20

Default is 20

$accept : string = ""

Default is "" (all file types)

$js : string = ''

Default is ''

Return values
string

dateInput()

date input type

dateInput(string $name[, mixed $value = false ][, string $js = '' ]) : string
Parameters
$name : string
$value : mixed = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

label()

Label Form element

label(string $for) : string
Parameters
$for : string

Id of the form control associated to this label

Return values
string

getFormAttribute()

Get the form attribute string

getFormAttribute(string $formName) : string
Parameters
$formName : string
Return values
string

formHeaderName()

print form header with hidden action field and name and id fields

formHeaderName(string $action, string $name[, string $js = '' ][, bool $BT = true ][, array<string|int, mixed> $hidden = [] ]) : string

js is for javascript functions

Parameters
$action : string
$name : string
$js : string = ''

Default is ''

$BT : bool = true

Default is TRUE

$hidden : array<string|int, mixed> = []

= []

Return values
string

hidden()

print hidden form input

hidden(string $formName, string $name, mixed $value[, string $js = '' ]) : string
Parameters
$formName : string
$name : string
$value : mixed
$js : string = ''

Default is ''

Return values
string

hiddenNoJSNoId()

print hidden form input without JavaScript action

hiddenNoJSNoId(string $formName, string $name, mixed $value) : string
Parameters
$formName : string
$name : string
$value : mixed
Return values
string

textInput()

text input type

textInput(string $formName, string $name[, mixed $value = false ][, int $size = 20 ][, int $maxLength = 255 ][, string $js = '' ]) : string
Parameters
$formName : string
$name : string
$value : mixed = false

Default is FALSE

$size : int = 20

Default is 20

$maxLength : int = 255

Default is 255

$js : string = ''

Default is ''

Return values
string

checkbox()

print checkbox

checkbox(string $formName, string $label, string $name[, bool|string $checked = false ][, string $title = '' ][, string $js = '' ]) : string
Parameters
$formName : string
$label : string
$name : string
$checked : bool|string = false

Default is FALSE

$title : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

radioButton()

print radio button

radioButton(string $formName, string $name[, mixed $value = false ][, bool|string $checked = false ][, string $js = '' ]) : string
Parameters
$formName : string
$name : string
$value : mixed = false

Default is FALSE

$checked : bool|string = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectFBoxValue()

create select boxes for HTML forms

selectFBoxValue(string $formName, string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

First entry is default selection. OPTION VALUE is set so expects assoc. array where key holds this value optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$formName : string
$name : string
$array : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectedBoxValue()

create select boxes for HTML forms

selectedBoxValue(string $formName, string $name, array<string|int, mixed> $array, string $select[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

$select is default selection. OPTION VALUE is set so expects assoc. array where key holds this value optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$formName : string
$name : string
$array : array<string|int, mixed>
$select : string
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectFBoxValueMultiple()

create select boxes for HTML forms

selectFBoxValueMultiple(string $formName, string $name, array<string|int, mixed> $array[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

First entry is default selection. OPTION VALUE is set so expects assoc. array where key holds this value. MULTIPLE values may be selected optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$formName : string
$name : string
$array : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectedBoxValueMultiple()

create select boxes for HTML forms

selectedBoxValueMultiple(string $formName, string $name, array<string|int, mixed> $array, array<string|int, mixed> $values[, int $size = 3 ][, int|bool $override = false ][, string $js = '' ]) : string

OPTION VALUE is set so expects assoc. array where key holds this value. MULTIPLE values may be selected optional $override allows the programmer to override the user set preferences for character limiting in select boxes

Parameters
$formName : string
$name : string
$array : array<string|int, mixed>
$values : array<string|int, mixed>
$size : int = 3

Default is 3

$override : int|bool = false

Default is FALSE

$js : string = ''

Default is ''

Return values
string

selectYesNoBox()

create special select box that only provides yes (1) and no (0) as options (values)

selectYesNoBox(string $formName, string $name, string|null $select[, string $js = '' ]) : string

'selected value' is set SELECTED

Parameters
$formName : string
$name : string
$select : string|null
$js : string = ''

Default is ''

Return values
string

filterHTML()

Filter HTML in fields destined for the search_ tables

filterHTML(string $html) : string
Parameters
$html : string
Return values
string

Filter HTML links for LISTCOMMON output

filterHTMLLinks(string $html) : string

This function is used only to remove links from a formatted resource when it is displayed inside a link because nested links are not supported by HTML.

Parameters
$html : string
Return values
string

escape()

Escape strings inserted in HTML

escape(mixed $value[, bool $force = false ]) : mixed

If $value is not a string, return $value unchanged

NB: This function ignores the special case of backticks as attribute delimiters. IE is no longer supported.

Parameters
$value : mixed
$force : bool = false

If true force escaping of allready escaped entities (Default if FALSE)

escapeHTMLTemp()

Temporarily escape HTML entities

escapeHTMLTemp(bool $protect, mixed $value) : mixed

If $value is not a string, return $value unchanged

This function is usually called twice. The first time ($protect = TRUE) will convert HTML entities. Presumably something is then done with the returned string, after which the function can be called with $protect = FALSE. The intention is to allow operations on a string that might interfere with or be interfered by any HTML entities in the string that are of type &...;

Parameters
$protect : bool
$value : mixed

_inlineHtmlAttribute()

Build a string for insertion of an HTML tag attribute.

_inlineHtmlAttribute([string $name = '' ][, string $value = '' ]) : string

Ensures that the attribute value is never empty (incorrect syntax)

Parameters
$name : string = ''

Default is ''

$value : string = ''

Default is ''

Return values
string

h()

<Hx> heading element

h([mixed $data = '' ][, string $class = '' ][, int $level = 4 ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

$level : int = 4

Default is 4

Return values
string

div()

<DIV> element

div(string $id[, mixed $data = '' ][, string $class = '' ]) : string

If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element

Parameters
$id : string
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

divScrollable()

Scrollable <DIV> element

divScrollable(string $id[, mixed $data = '' ][, string $class = '' ][, int $width = 500 ][, int $height = 200 ]) : string

If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element

Parameters
$id : string
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

$width : int = 500

Default is 500px

$height : int = 200

Default is 200px

Return values
string

iframe()

<IFRAME> element

iframe(string $id[, mixed $data = '' ][, string $class = '' ]) : string

If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element

Parameters
$id : string
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

p()

<P> element

p([mixed $data = '' ][, string $class = '' ][, string $align = 'left' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

$align : string = 'left'

Default is 'left'

Return values
string

pBrowse()

<P> element

pBrowse([mixed $data = '' ][, string $class = '' ]) : string

for browsing creators, collections etc. (tag colour) where a background colour needs to be specified

Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

pre()

<PRE> element

pre(mixed $data[, string $class = '' ][, string $align = 'left' ]) : string
Parameters
$data : mixed
$class : string = ''

Default is ''

$align : string = 'left'

Default is 'left'

Return values
string

ul()

<UL> element

ul([mixed $data = '' ][, string $class = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

ol()

<OL> element

ol([mixed $data = '' ][, string $class = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

li()

<LI> element

li([mixed $data = '' ][, string $class = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

hr()

<HR> element

hr([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

mark()

<mark> element

mark(mixed $data) : string
Parameters
$data : mixed
Return values
string

object()

<OBJECT> element For display attachment previews

object(mixed $data, string $type, int $width, int $height) : string
Parameters
$data : mixed
$type : string
$width : int
$height : int
Return values
string

span()

<SPAN> element

span([mixed $data = '' ][, string $class = '' ][, string $title = '' ][, string $js = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

$title : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

color()

<SPAN color> element

color([mixed $data = '' ][, string $class = 'blackText' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = 'blackText'

Default is 'blackText'

Return values
string

strong()

<STRONG> element (Semantic equivalent of <B>)

strong([mixed $data = '' ][, string $class = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

em()

<EM> element (Semantic equivalent of <I>)

em([mixed $data = '' ][, string $class = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

u()

<U> element

u(mixed $data[, string $class = '' ]) : string
Parameters
$data : mixed
$class : string = ''

Default is ''

Return values
string

img()

<IMG> element

img(string $src, int $width, int $height[, string $title = '' ][, string $alt = '' ][, string $js = '' ]) : string
Parameters
$src : string
$width : int
$height : int
$title : string = ''

Default is ''

$alt : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

anchor()

<A> element used as internal anchor

anchor(string $name[, mixed $data = '' ][, string $title = '' ]) : string
Parameters
$name : string
$data : mixed = ''

Default is ''

$title : string = ''

Default is ''

Return values
string

a()

<A> element used as hyperlink

a(string $class, mixed $label, string $link[, string $target = '' ][, string $title = '' ][, string $rel = 'nofollow' ]) : string

NB: these links have the nofollow attribute by default to block unnecessary crawling by search engines.

Parameters
$class : string
$label : mixed
$link : string
$target : string = ''

Default is ''

$title : string = ''

Default is ''

$rel : string = 'nofollow'
Tags
see
https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#tabnabbing
Return values
string

aBrowse()

<A> element used as hyperlink

aBrowse([string $color = '#000' ][, string $size = '1em' ][, mixed $label = '' ][, string $link = '' ][, string $target = '' ][, string $title = '' ][, string $js = '' ]) : string

Hyperlinks for browsing creators, collections etc. (tag clouds) where the text colour and size is provided by the scripts to indicate frequency

NB: these links have the nofollow attribute to block unnecessary crawling by search engines.

Parameters
$color : string = '#000'

Default is '#000'

$size : string = '1em'

Default is '1em'

$label : mixed = ''

Default is ''

$link : string = ''

Default is ''

$target : string = ''

Default is ''

$title : string = ''

Default is ''

$js : string = ''

Default is ''

Tags
see
https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html#tabnabbing
Return values
string

tableStart()

Start a <TABLE> tag

tableStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

tableEnd()

Close a <TABLE> tag

tableEnd() : string
Return values
string

tableCaption()

provide a table <caption>

tableCaption([mixed $caption = '' ][, string $class = '' ]) : string
Parameters
$caption : mixed = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

tbodyStart()

Provide a <tbody> tag

tbodyStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

tbodyEnd()

Provide a </tbody> tag

tbodyEnd() : string
Return values
string

theadStart()

Provde a <thead> tag

theadStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

theadEnd()

Provide a </thead> tag

theadEnd() : string
Return values
string

tfootStart()

Provide a <tfoot> tag

tfootStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

tfootEnd()

Provide a </tfoot> tag

tfootEnd() : string
Return values
string

trStart()

Provide a <tr> tag

trStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

trEnd()

Provide a </tr> tag

trEnd() : string
Return values
string

tdStart()

Provide a <td> tag without closing it or encapsulating data

tdStart([string $class = '' ][, int|string $colspan = '' ]) : string
Parameters
$class : string = ''

Default is ''

$colspan : int|string = ''

Default is ''

Return values
string

tdEnd()

Provide a </td> tag

tdEnd() : string
Return values
string

td()

Provide a <td>...</td> tag

td([mixed $data = '' ][, string $class = '' ][, int|string $colspan = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

$colspan : int|string = ''

Default is ''

Return values
string

thStart()

Provide a <th> tag without closing it or encapsulating data

thStart([string $class = '' ][, int|string $colspan = '' ]) : string
Parameters
$class : string = ''

Default is ''

$colspan : int|string = ''

Default is ''

Return values
string

thEnd()

Provide a </th> tag

thEnd() : string
Return values
string

th()

Provide a <th>...</th> tag

th([mixed $data = '' ][, string $class = '' ][, int|string $colspan = '' ]) : string
Parameters
$data : mixed = ''

Default is ''

$class : string = ''

Default is ''

$colspan : int|string = ''

Default is ''

Return values
string

cssInlineExternal()

Insert a call to an external CSS file

cssInlineExternal(string $url[, string $media = "all" ]) : string
Parameters
$url : string
$media : string = "all"

Default is 'all' (can be 'all' for all media, 'print' for printing, 'screen' for screens)

Tags
see
https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_types
Return values
string

jsInline()

Inlining JavaScript code

jsInline(string $jsCode[, string $execMode = "sync" ][, string $type = "" ]) : string
Parameters
$jsCode : string
$execMode : string = "sync"

When the script should be executed? Default is 'sync'

$type : string = ""

Script type? Default is ''

Tags
see
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Execution modes:

  • 'sync' for sync loading and execution
  • 'async' for async loading and execution
  • 'defer' to defer execution until the DOM is fully parsed (not allowed on inlined scripts)

Script types:

  • '' for a regular JS script
  • 'module' for a JavaScript module
  • 'importmap' for an import map
Return values
string

jsInlineExternal()

Insert a call to an external javascript file

jsInlineExternal(string $url[, string $execMode = "sync" ][, string $type = "" ]) : string
Parameters
$url : string
$execMode : string = "sync"

Is the execution defered until the DOM is loaded? Default is 'sync'

$type : string = ""

Script type? Default is ''

Tags
see
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Execution modes:

  • 'sync' for sync loading and execution
  • 'async' for async loading and execution
  • 'defer' to defer execution until the DOM is fully parsed (not allowed on inlined scripts)

Script types:

  • '' for a regular JS script
  • 'module' for a JavaScript module
  • 'importmap' for an import map
Return values
string

successToast()

Format a text as a HTML success toast message (temporary info)

successToast(mixed $string) : string
Parameters
$string : mixed
Return values
string

errorToast()

Format a text as a HTML error toast message (temporary info)

errorToast(mixed $string) : string
Parameters
$string : mixed
Return values
string

nlToHtml()

replace newlines and carriage returns with appropriate HTML code.

nlToHtml(mixed $string) : string

first multiples then singles. Used for display back from DB table

Parameters
$string : mixed
Return values
string

htmlToNl()

replace HTML newlines and carriage returns in a string or array with appropriate ANSI code.

htmlToNl(mixed $string) : mixed

first multiples then singles. Used for display back from DB table

Parameters
$string : mixed

removeNl()

remove all newlines and replace with single space.

removeNl(mixed $string) : string

For cases when user cut 'n' pastes multiple lines into single-line text box Used before writing to DB table

Parameters
$string : mixed
Return values
string

removeNlNoSpace()

remove all newlines with no replacement.

removeNlNoSpace(mixed $string) : string

For cases when user cut 'n' pastes multiple lines into single-line text box Used in DOCX conversion to remove all newlines.

Parameters
$string : mixed
Return values
string

stripHtml()

Strip HTML from string or array

stripHtml(mixed $string) : mixed
Parameters
$string : mixed

clearSortField()

Strip HTML from string

clearSortField(mixed $string) : string
Parameters
$string : mixed
Return values
string

get_core_message()

Translate a message from a domain

get_core_message(string $sectionKey, string $messageKey[, mixed $messageParam = "" ]) : string

This function is mimicking dgettext().

Parameters
$sectionKey : string

Section key of the catalog

$messageKey : string

Message key of the catalog

$messageParam : mixed = ""

Optional array or single value that replaces '###' in the message. Default is ""

Tags
see
https://www.php.net/manual/en/function.dgettext.php
Return values
string

get_message()

Translate a message from a domain

get_message(string $domain, string $sectionKey, string $messageKey[, mixed $messageParam = "" ]) : string

This function is mimicking dgettext().

Parameters
$domain : string

Catalog domain name

$sectionKey : string

Section key of the catalog

$messageKey : string

Message key of the catalog

$messageParam : mixed = ""

Optional array or single value that replaces '###' in the message. Default is ""

Tags
see
https://www.php.net/manual/en/function.dgettext.php
https://en.wikipedia.org/wiki/Pseudolocalization
Return values
string

translate_message()

Translate a message from a domain

translate_message(string $domain, string $message) : string

This function is mimicking dgettext().

Parameters
$domain : string

Catalog domain name

$message : string

Message to translate

Tags
see
https://www.php.net/manual/en/function.dgettext.php
Return values
string

codeISO639a1toName()

Return the name of a language defined by its locale code or its ISO 639-1 (alpha-2) code.

codeISO639a1toName(string $codeISO) : string
Parameters
$codeISO : string

Language ISO 639-1 (alpha-2) code

Tags
see
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Return values
string

set_locales()

Set the default locale of Intl library with the user's preferred locale

set_locales() : void

load_locales_json()

Load the translation catalogs of the user's preferred language.

load_locales_json(string $domain, string $locale) : array<string|int, mixed>
Parameters
$domain : string

Catalog domain name

$locale : string

Code of a locale (format: ll[_Script][_CC])

Return values
array<string|int, mixed>

determine_locale()

Determine the user's preferred language.

determine_locale([string|null $force_locale = null ]) : string

This function builds a language priority stack and return the first entry as the user's preferred language.

If $force_locale is passed, this function will try to use this locale first.

Parameters
$force_locale : string|null = null

Code of a locale (format: ll[_Script][_CC])(optional, NULL by default)

Return values
string

determine_locale_priority_stack()

Determine the user's preferred language.

determine_locale_priority_stack([string|null $force_locale = null ]) : array<string|int, string>

This function builds a language priority stack. The first is the highest priority.

If $force_locale is passed, this function will try to use this locale first.

Parameters
$force_locale : string|null = null

Code of a locale (format: ll[_Script][_CC])(optional, NULL by default)

Return values
array<string|int, string>

getAllLocales()

Return a selected list of all locales recognised by Intl and usable for translation and formatting

getAllLocales([bool $sorted_by_key = false ]) : array<string|int, string>

Each entry of the returned array is locale code (format: ll[_Script][_CC]) as key and its name as value [format: language (Country, Variant)].

ll is a mandatory language code CC is an optional country code variant is an optional script, money or collation code

Parameters
$sorted_by_key : bool = false

If TRUE, sort the table by keys instead of values

Tags
see
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-input-locales-for-windows-language-packs?view=windows-11
https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/locale/Makefile.locale
https://github.com/freebsd/freebsd-src/blob/main/share/ctypedef/Makefile
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/share/ctypedef/Makefile
https://github.com/haiku/haiku/tree/master/data/catalogs/preferences/locale
Return values
array<string|int, string>

localetoBCP47()

Return the BCP 47 code that matches the code of a locale.

localetoBCP47(string $locale) : string

The BCP 47 code is used in the lang attribute of any HTML tag. The list of supported languages is simple enough to avoid having to encounter any particular case.

Parameters
$locale : string

Code of a locale (format: ll[_Script][_CC])

Tags
see
https://www.w3.org/International/questions/qa-html-language-declarations
https://www.w3.org/International/questions/qa-choosing-language-tags
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Return values
string

If a BCP47 code is missing, return 'en'

getTranslatableLocales()

Get a list of translatable locales sorted by locale name

getTranslatableLocales(string $in_locale) : array<string|int, string>

This is a list of locales that a translator can use to translate a text, and not a list of locales currently available on the system.

Parameters
$in_locale : string

Transalate locales names with local $in_locale

Return values
array<string|int, string>

Each key is a locale code and its value a displayname.

searchLanguageCode()

Return the language code matching a language name

searchLanguageCode(string $language_name) : string

If no language code matchs the name, return "".

NB: this function is slow and should not be used outside the upgrade code

Parameters
$language_name : string
Return values
string

sort()

Sort an array according to the current Intl locale in ascending order

sort(array<string|int, mixed> &$array[, int $flags = Collator::SORT_REGULAR ]) : bool

This function is a wrapper of collator_sort() that works as sort().

If you really need more flexibility or the full power of an Unicode sort algo, use the original function.

Parameters
$array : array<string|int, mixed>

Array of strings to sort.

$flags : int = Collator::SORT_REGULAR

Optional sorting type, one of the following:

  • Collator::SORT_REGULAR - compare items normally (don't change types)
  • Collator::SORT_NUMERIC - compare items numerically
  • Collator::SORT_STRING - compare items as strings Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Tags
see
https://www.php.net/manual/en/function.sort.php
https://www.php.net/manual/en/collator.sort.php
https://www.php.net/manual/fr/class.collator.php
Return values
bool

TRUE on success, FALSE otherwise

asort()

Sort an array according to the current Intl locale in ascending order and maintain index association

asort(array<string|int, mixed> &$array[, int $flags = Collator::SORT_REGULAR ]) : bool

This function is a wrapper of collator_asort() that works as asort().

If you really need more flexibility or the full power of an Unicode sort algo, use the original function.

Parameters
$array : array<string|int, mixed>

Array of strings to sort.

$flags : int = Collator::SORT_REGULAR

Optional sorting type, one of the following:

  • Collator::SORT_REGULAR - compare items normally (don't change types)
  • Collator::SORT_NUMERIC - compare items numerically
  • Collator::SORT_STRING - compare items as strings Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Tags
see
https://www.php.net/manual/en/function.asort.php
https://www.php.net/manual/fr/collator.asort.php
https://www.php.net/manual/fr/class.collator.php
Return values
bool

TRUE on success, FALSE otherwise

ksort()

Sort an array according to the current Intl locale in ascending order and maintain index association

ksort(array<string|int, mixed> &$array[, int $flags = Collator::SORT_REGULAR ]) : bool

This function is a wrapper of Collator::compare() that works as ksort().

If you really need more flexibility or the full power of an Unicode sort algo, use the original function.

Parameters
$array : array<string|int, mixed>

Array of strings to sort.

$flags : int = Collator::SORT_REGULAR

Optional sorting type, one of the following:

  • Collator::SORT_REGULAR - compare items normally (don't change types)
  • Collator::SORT_NUMERIC - compare items numerically
  • Collator::SORT_STRING - compare items as strings Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Tags
see
https://www.php.net/manual/en/function.ksort.php
https://www.php.net/manual/fr/collator.compare.php
https://www.php.net/manual/fr/class.collator.php
Return values
bool

TRUE on success, FALSE otherwise

rsort()

Sort an array according to the current Intl locale in descending order

rsort(array<string|int, mixed> &$array[, int $flags = Collator::SORT_REGULAR ]) : bool

This function is a wrapper of Collator::compare() that works as rsort().

If you really need more flexibility or the full power of an Unicode sort algo, use the original function.

Parameters
$array : array<string|int, mixed>

Array of strings to sort.

$flags : int = Collator::SORT_REGULAR

Optional sorting type, one of the following:

  • Collator::SORT_REGULAR - compare items normally (don't change types)
  • Collator::SORT_NUMERIC - compare items numerically
  • Collator::SORT_STRING - compare items as strings Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Tags
see
https://www.php.net/manual/en/function.rsort.php
https://www.php.net/manual/fr/collator.compare.php
https://www.php.net/manual/fr/class.collator.php
Return values
bool

TRUE on success, FALSE otherwise

arsort()

Sort an array according to the current Intl locale in descending order and maintain index association

arsort(array<string|int, mixed> &$array[, int $flags = Collator::SORT_REGULAR ]) : bool

This function is a wrapper of Collator::compare() that works as arsort().

If you really need more flexibility or the full power of an Unicode sort algo, use the original function.

Parameters
$array : array<string|int, mixed>

Array of strings to sort.

$flags : int = Collator::SORT_REGULAR

Optional sorting type, one of the following:

  • Collator::SORT_REGULAR - compare items normally (don't change types)
  • Collator::SORT_NUMERIC - compare items numerically
  • Collator::SORT_STRING - compare items as strings Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Tags
see
https://www.php.net/manual/en/function.arsort.php
https://www.php.net/manual/fr/collator.compare.php
https://www.php.net/manual/fr/class.collator.php
Return values
bool

TRUE on success, FALSE otherwise

krsort()

Sort an array according to the current Intl locale in descending order and maintain index association

krsort(array<string|int, mixed> &$array[, int $flags = Collator::SORT_REGULAR ]) : bool

This function is a wrapper of Collator::compare() that works as krsort().

If you really need more flexibility or the full power of an Unicode sort algo, use the original function.

Parameters
$array : array<string|int, mixed>

Array of strings to sort.

$flags : int = Collator::SORT_REGULAR

Optional sorting type, one of the following:

  • Collator::SORT_REGULAR - compare items normally (don't change types)
  • Collator::SORT_NUMERIC - compare items numerically
  • Collator::SORT_STRING - compare items as strings Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid flags value has been specified.
Tags
see
https://www.php.net/manual/en/function.krsort.php
https://www.php.net/manual/fr/collator.compare.php
https://www.php.net/manual/fr/class.collator.php
Return values
bool

TRUE on success, FALSE otherwise

messageTranslatorNeeded()

Return a message if the project need translation contribution for the current locale

messageTranslatorNeeded() : string
Return values
string

getPagingParams()

Get the paging start and total

getPagingParams(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
Return values
array<string|int, mixed>

getNum()

Get information on the number or characters being used for alphabetical and dictionary paging

getNum(array<string|int, mixed> $pagingArray, string $conjunction, int $start, int $total) : string
Parameters
$pagingArray : array<string|int, mixed>
$conjunction : string
$start : int
$total : int
Return values
string

Get links for alphabetical and dictionary paging

setLinks(array<string|int, mixed> $pagingArray, string $conjunction, int $start, string $browserTabID, string $queryString) : array<string|int, mixed>
Parameters
$pagingArray : array<string|int, mixed>
$conjunction : string
$start : int
$browserTabID : string
$queryString : string
Return values
array<string|int, mixed>

getZoomSlices()

Get zooming paging slices

getZoomSlices(int $paging, int $start, int $total, int $maxLinks, array<string|int, mixed> $vars, string $queryString, string $prefix) : void
Parameters
$paging : int
$start : int
$total : int
$maxLinks : int
$vars : array<string|int, mixed>
$queryString : string
$prefix : string

calculateZoomSlices()

Calculate the zoom slices

calculateZoomSlices(int $paging, int $start, int $total, int $maxLinks, int $row, array<string|int, mixed> $storeSlices, array<string|int, mixed> $vars, object $icons, object $store, string $rootLink, string $queryString, string $prefix, mixed $BT, bool $reloaded) : mixed
Parameters
$paging : int
$start : int
$total : int
$maxLinks : int
$row : int
$storeSlices : array<string|int, mixed>
$vars : array<string|int, mixed>
$icons : object
$store : object
$rootLink : string
$queryString : string
$prefix : string
$BT : mixed
$reloaded : bool

Get the zoom links

getZoomLinks(int $paging, int $start, int $total, array<string|int, mixed> $starts, array<string|int, mixed> $ends, array<string|int, mixed> $slices, int $row, int $sliceSize, array<string|int, mixed> $storeColumns, array<string|int, mixed> $storeStarts, array<string|int, mixed> $storeEnds, object $icons, string $rootLink, string $queryString, string $prefix, string $BT, object $store) : array<string|int, mixed>
Parameters
$paging : int
$start : int
$total : int
$starts : array<string|int, mixed>
$ends : array<string|int, mixed>
$slices : array<string|int, mixed>
$row : int
$sliceSize : int
$storeColumns : array<string|int, mixed>
$storeStarts : array<string|int, mixed>
$storeEnds : array<string|int, mixed>
$icons : object
$rootLink : string
$queryString : string
$prefix : string
$BT : string
$store : object
Return values
array<string|int, mixed>

zoomToTop()

Set zoom top link link

zoomToTop(object $icons, string $rootLink, string $queryString, string $BT) : string
Parameters
$icons : object
$rootLink : string
$queryString : string
$BT : string
Return values
string

zoomUpOneLevel()

Set zoom up one level link

zoomUpOneLevel(int $row, array<string|int, mixed> $storeColumns, array<string|int, mixed> $storeStarts, array<string|int, mixed> $storeEnds, object $icons, string $rootLink, string $queryString, string $BT) : string
Parameters
$row : int
$storeColumns : array<string|int, mixed>
$storeStarts : array<string|int, mixed>
$storeEnds : array<string|int, mixed>
$icons : object
$rootLink : string
$queryString : string
$BT : string
Return values
string

storeZoomData()

Store the zoom session

storeZoomData(string $prefix, string $storeSlices, string $storeSliceSizes, string $storeStarts, string $storeEnds, string $storeColumns, object $store) : void
Parameters
$prefix : string
$storeSlices : string
$storeSliceSizes : string
$storeStarts : string
$storeEnds : string
$storeColumns : string
$store : object

Get the root link for the paging link

getRootLink(string $queryString) : mixed
Parameters
$queryString : string

linksInfo()

Format display information string

linksInfo(int $start, int $total, int $paging[, false|string $bibTitle = false ][, false|string $ideas = false ]) : string
Parameters
$start : int
$total : int
$paging : int
$bibTitle : false|string = false

Default is FALSE

$ideas : false|string = false

Default is FALSE

Return values
string

getUserBib()

Check for user bibliographies

getUserBib() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBib()

Get details about the bibliography being used

getBib(string $bibTitle) : mixed
Parameters
$bibTitle : string

getData()

get data from database

getData(array<string|int, mixed> $resourceData, object $common, object $bibCite) : array<string|int, mixed>
Parameters
$resourceData : array<string|int, mixed>
$common : object
$bibCite : object
Return values
array<string|int, mixed>

grabCollection()

Grab collection title

grabCollection(array<string|int, mixed> $rowTypes, array<string|int, mixed> &$entryArray, array<string|int, mixed> $resourceData, object $map) : void
Parameters
$rowTypes : array<string|int, mixed>
$entryArray : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$map : object

grabPublisher()

Grab publisher

grabPublisher(array<string|int, mixed> $rowTypes, array<string|int, mixed> &$entryArray, array<string|int, mixed> $resourceData, object $map) : void
Parameters
$rowTypes : array<string|int, mixed>
$entryArray : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$map : object

grabNames()

grabNames

grabNames(array<string|int, mixed> $rowTypes, array<string|int, mixed> &$entryArray, array<string|int, mixed> $resourceData, object $map, object $common) : void
Parameters
$rowTypes : array<string|int, mixed>
$entryArray : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$map : object
$common : object

webFormat()

web_article, URL and accessed date

webFormat(array<string|int, mixed> $row, array<string|int, mixed> $urls) : string
Parameters
$row : array<string|int, mixed>
$urls : array<string|int, mixed>
Return values
string

year2Format()

format YYYY/MM/DD of conference dates etc

year2Format(array<string|int, mixed> $row) : string
Parameters
$row : array<string|int, mixed>
Return values
string

year1Format()

format YYYY/MM/DD of publication

year1Format(array<string|int, mixed> $row) : string
Parameters
$row : array<string|int, mixed>
Return values
string

timeFormat()

format running time for films

timeFormat(array<string|int, mixed> $row) : string
Parameters
$row : array<string|int, mixed>
Return values
string

grabNoteAbstract()

grabNoteAbstract

grabNoteAbstract(array<string|int, mixed> &$entryArray, array<string|int, mixed> $resourceData, object $bibCite) : void
Parameters
$entryArray : array<string|int, mixed>
$resourceData : array<string|int, mixed>
$bibCite : object

grabKeywords()

grabKeywords

grabKeywords(array<string|int, mixed> &$entryArray, array<string|int, mixed> $rIds, object $db) : void
Parameters
$entryArray : array<string|int, mixed>
$rIds : array<string|int, mixed>
$db : object

tidyOutput()

Tidy up the output for plain text

tidyOutput(array<string|int, mixed> $input) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>
Return values
array<string|int, mixed>

header()

Set some defaults and create the RTF opening tag

header() : string
Return values
string

Create the RTF closing tag

footer() : string
Return values
string

footnotes()

Set RTF headers regarding footnotes/endnotes

footnotes(string $method[, mixed $extra = false ]) : mixed

See notes at the beginning of this file. But especially remember that endSameId and endSameIdOrdered are fake endnotes (span data-wikindxbib is removed in RTFEXPORT::parseHTML())

Parameters
$method : string
$extra : mixed = false

Default FALSE

citation()

Citation stuff The options for $citeStyle are: 'inText' In-text citations (needs bibliography appended) 'ftInc' Footnotes: the footnotes order increments from 1 (needs bibliography appended) 'endInc' Endnotes: the endnotes order increments from 1 'endSameId' Endnotes using the same ID for the same resource: the endnotes order increments from 1 'endSameIdOrdered' Endnotes using the same ID for the same resource: the endnotes order is set in the bibliography settings

citation(string $method[, mixed $extra1 = false ][, mixed $extra2 = false ]) : mixed

Most of the formatting of citations is accomplished by the citation engine and formatting in HTML and a bibliography is appended where appropriate.

Parameters
$method : string
$extra1 : mixed = false

Default FALSE

$extra2 : mixed = false

Default FALSE

documentSettings()

Deal with document defaults. This function has various roles depending on the value of $method Must be called before traverseDOM()

documentSettings(string $method[, mixed $extra = false ][, string $paperSize = 'A4' ][, string $lineSpacing = 'singleSpace' ]) : mixed
Parameters
$method : string
$extra : mixed = false

Default FALSE

$paperSize : string = 'A4'

Default 'A4'

$lineSpacing : string = 'singleSpace'

Default 'singleSpace'

cleanHtml()

Clean up HTML before parsing and do some initial conversion

cleanHtml(string $text) : string
Parameters
$text : string
Return values
string

specialCharsToRTF()

Convert special characters.

specialCharsToRTF(string $text, bool $protectCurlyBrace) : string

For RTF, for escaping special characters used to build control words, it is recommended to convert to hex

Parameters
$text : string
$protectCurlyBrace : bool
Return values
string

cleanBlockquotes()

TinyMCE always puts p tags within blockquote—remove them!

cleanBlockquotes(string $text) : string
Parameters
$text : string
Return values
string

fonts()

Deal with fonts. This function has various roles depending on the value of $method

fonts(string $method[, string $font = '' ]) : mixed
Parameters
$method : string
$font : string = ''

Default ''

colours()

Deal with colours. This function has various roles depending on the value of $method

colours(string $method[, string $colour = '' ]) : mixed
Parameters
$method : string
$colour : string = ''

Default ''

lists()

Deal with lists. This function has various roles depending on the value of $method

lists(string $method[, string $string = '' ]) : mixed
Parameters
$method : string
$string : string = ''

Default ''

listToRTF()

Convert lists to RTF (deals with nested lists too and recognizes unordered or ordered)

listToRTF(array<string|int, mixed> $stack, string $listType) : string

Although list items might have style attributes such as align right, these are ignored by RTF so ignore them here too.

Parameters
$stack : array<string|int, mixed>
$listType : string
Return values
string

newListTableItem()

Create new listtable item

newListTableItem(int $levelnfc, int $listIndex) : string
Parameters
$levelnfc : int
$listIndex : int
Return values
string

textDecoration()

text-decoration styling

textDecoration(string $style) : mixed
Parameters
$style : string

fontWeight()

Convert font-weight

fontWeight(string $style) : string
Parameters
$style : string
Return values
string

fontSize()

Convert font size to RTF

fontSize(string $size) : string
Parameters
$size : string
Return values
string

traverseDOM()

Traverse the DOM and produce RTF code

traverseDOM(DOMNode $domNode[, mixed $listLevel = 0 ][, int $tableNestLevel = 0 ]) : string
Parameters
$domNode : DOMNode
$listLevel : mixed = 0
$tableNestLevel : int = 0

Default = 0

Return values
string

nodeAttributes()

Convert attributes

nodeAttributes(DOMNode $node[, bool $wantArray = false ]) : mixed
Parameters
$node : DOMNode
$wantArray : bool = false

Default = FALSE

tables()

Deal with tables and their elements. This function has various roles depending on the value of $method

tables(string $method[, mixed $extra = false ][, mixed $extra2 = false ]) : mixed

For each table, there is a $tableObject, and each nested table gets a new $tableObject

Parameters
$method : string
$extra : mixed = false

Default = FALSE

$extra2 : mixed = false

Default FALSE

setCellEdgeDefaults()

Set cell edge defaults in the table matrix.

setCellEdgeDefaults(array<string|int, mixed> $tableMatrix, string $key, mixed $value) : array<string|int, mixed>

Done when first encountering a table tag.

Also used to set the table parameter 'cellpadding' on all cells.

Parameters
$tableMatrix : array<string|int, mixed>
$key : string
$value : mixed
Return values
array<string|int, mixed>

tableCellToRTF()

Convert table cell to RTF cell property string

tableCellToRTF(array<string|int, mixed> $attributes, array<string|int, mixed> $cellArray, int $thisRowNumber, int $thisCellNumber[, bool $th = false ]) : array<string|int, mixed>
Parameters
$attributes : array<string|int, mixed>
$cellArray : array<string|int, mixed>
$thisRowNumber : int
$thisCellNumber : int
$th : bool = false

(Default FALSE)

Return values
array<string|int, mixed>

inheritParentBorders()

Transfer the parent's border properties to a spanned child

inheritParentBorders(array<string|int, mixed> $childCell, int $childRowNumber) : array<string|int, mixed>

Child can never have top edge

Parameters
$childCell : array<string|int, mixed>
$childRowNumber : int
Return values
array<string|int, mixed>

getCellBorderParams()

Get cell border parameters

getCellBorderParams(string $key, string $value[, array<string|int, mixed> $attributes = [] ]) : array<string|int, mixed>
Parameters
$key : string
$value : string
$attributes : array<string|int, mixed> = []

Default [] (used only if $key == 'border-style')

Return values
array<string|int, mixed>

updateCellEdges()

Update cell edge in the table matrix for one cell. i.e. border has been set for this table cell

updateCellEdges(array<string|int, mixed> $cellArray, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$cellArray : array<string|int, mixed>
$params : array<string|int, mixed>

($style, $width, $color)

Return values
array<string|int, mixed>

cellBordersToString()

Create a string of cell border properties from an array

cellBordersToString(array<string|int, mixed> $cellArray, array<string|int, mixed> $edges) : string

We also deal with rowspans where there may or may not be padding and borders

Parameters
$cellArray : array<string|int, mixed>
$edges : array<string|int, mixed>
Return values
string

calculateTableMatrix()

We need to set up a table matrix counting number of rows and number of their children so we can deal with various properties.

calculateTableMatrix(DOMNode $domNode) : array<string|int, mixed>

Need to count max row cells in a table before we can set up the matrix. Note that the HTML code for vertical spanning ('rowspan') is likely to have uneven numbers of cells. Where there are gaps, we must insert the child cell. Note the relationship (Parent/Child) row no./cell no. for each member of a spanned group to be able to deal with inserted cell properties later on. Cell borders, background colours, properties and so on inherit from the table properties but can override them with individual cell settings. This function is called on an opening table or tbody tag, so, here, we first set up the table matrix consisting of rows where the key is the row count for the table and the value is an array comprising an array of default properties for each cell. These properties can then be overriden in tableCellToRTF().

Parameters
$domNode : DOMNode
Return values
array<string|int, mixed>

getCellWidth()

Get cell width

getCellWidth(array<string|int, mixed> $attributes) : string
Parameters
$attributes : array<string|int, mixed>
Return values
string

startCellToRTF()

Start the process of converting a td or th element

startCellToRTF(DOMNode $domNode, bool $rowSpanParent, int $tableNestLevel) : array<string|int, mixed>
Parameters
$domNode : DOMNode
$rowSpanParent : bool
$tableNestLevel : int

// > 1 == nested

Return values
array<string|int, mixed>

utf8_2_rtfansicpg1252()

UTF-8 to ANSI Windows 1252 strings for RTF only

utf8_2_rtfansicpg1252(string $string) : string

Returns a string encoded accordingly to Rich Text Format (RTF) Specification Version 1.9.1.

Parameters
$string : string

UTF-8 encoded string

Tags
see
https://www.microsoft.com/en-us/download/details.aspx?id=10725
Return values
string

plain ASCII with RTF specific sequences for others characters

domImageToRtfImagePlaceholders()

Replace HTML image src attribute by a placeholder pointing to a cached file on disk

domImageToRtfImagePlaceholders(DOMNode $domNode) : string

The file is hex encoded in cache/files and its filename is inserted inside src, using a pattern as "##.img.hex##"

Online resources are dwnloaded and included like others images.

The real insertion is postponed and delegated to \UTILS\insertExportImages() that consumes less memory.

Parameters
$domNode : DOMNode
Return values
string

domNodeAttributes2Array()

Convert attributes of a DOMNode to an array of attributes

domNodeAttributes2Array(DOMNode $domNode) : array<string|int, string>
Parameters
$domNode : DOMNode
Return values
array<string|int, string>

arrayMonthAndSeasonNames()

Return an array of months and season names

arrayMonthAndSeasonNames(string $format[, string $locale = "en_GB" ]) : array<string|int, string>
Parameters
$format : string

Short form (short), Long form (long) (Default is 'long')

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

Tags
see
https://en.wikipedia.org/wiki/Ordinal_indicator
https://es.wikipedia.org/wiki/Indicador_ordinal

When the formatter had no value for a locale, English names re returned.

Accepted month/season numbers are:

  • 1: January
  • 2: February
  • 3: March
  • 4: April
  • 5: May
  • 6: June
  • 7: July
  • 8: August
  • 9: September
  • 10: October
  • 11: November
  • 12: December
  • 13: Spring
  • 14: Summer
  • 15: Autumn
  • 16: Winter
  • 17: Fall
Return values
array<string|int, string>

monthAndSeasonName()

Return a month or season name

monthAndSeasonName(int $number, string $format[, string $locale = "en_GB" ]) : string
Parameters
$number : int

Month or season number

$format : string

Short form (short), Long form (long) (Default is 'long')

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

Tags
see
https://en.wikipedia.org/wiki/Ordinal_indicator
https://es.wikipedia.org/wiki/Indicador_ordinal

When $number is outside the range 1 to 17, an empty string is returned.

When the formatter had no value for a locale, the English name is returned.

Accepted month/season numbers are:

  • 1: January
  • 2: February
  • 3: March
  • 4: April
  • 5: May
  • 6: June
  • 7: July
  • 8: August
  • 9: September
  • 10: October
  • 11: November
  • 12: December
  • 13: Spring
  • 14: Summer
  • 15: Autumn
  • 16: Winter
  • 17: Fall

For seasons translations are taken from Google Translate [1] or Omniglot [2].

https://translate.google.fr

Google Translate [1]

https://omniglot.com/language/time/seasons.htm

Omniglot [2]

Return values
string

cardinalToOrdinal()

Make an ordinal from a cardinal. Default is English

cardinalToOrdinal(int $number[, string $locale = "en_GB" ][, string $gender = "m" ][, string $pre = '' ][, string $post = '' ]) : string
Parameters
$number : int

Number value

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

$gender : string = "m"

One letter code for masculine (m), feminine (f) (optional, 'm' by default)

$pre : string = ''

Tag framing the extension of the ordinal on the left

$post : string = ''

Tag framing the extension of the ordinal on the right

Tags
see
https://en.wikipedia.org/wiki/Ordinal_indicator
https://es.wikipedia.org/wiki/Indicador_ordinal

When $number is negative, an empty string is returned.

Return values
string

cardinalToOrdinalWord()

Convert ordinal to word

cardinalToOrdinalWord(int $number[, string $locale = "en_GB" ][, string $gender = "m" ]) : string

This implementation is limited to the numeric range 1 to 10,000 for Latin, and to ICU spec. range for others (very high).

When a formatter is not defined or return an error, the English formatter is used instead.

When $number is negative, an empty string is returned.

Parameters
$number : int

Positive number value

$locale : string = "en_GB"

Code of a locale (format: ll[_Script][_CC])(optional, 'en_GB' by default)

$gender : string = "m"

One letter code for masculine (m), feminine (f), or neutral (n) (optional, 'm' by default)

Tags
see
https://www.saxonica.com/html/documentation10/extensibility/config-extend/localizing/ICU-numbering-dates/ICU-numbering.html
Return values
string

cardinalToOrdinalWordLatin()

Convert ordinal to word in Latin

cardinalToOrdinalWordLatin(int $number[, string $gender = "m" ]) : string

This implementation is limited to the numeric range 1 to 10,000. higher numbers are formatted with ICU English formatter instead.

When $number is negative, an empty string is returned.

Parameters
$number : int

Positive number value

$gender : string = "m"

One letter code for masculine (m), feminine (f), or neutral (n) (optional, 'm' by default)

Return values
string

cardinalToGreek()

convert cardinal (Arabic) to Greek numerals

cardinalToGreek(int $cardinal) : string

This implementation is limited to the numeric range 1 to 9,999 following the ancient greek alphabetical numeral system.

Its use is intended only for modern notation of years, centuries, or volumes ..., like Roman numbers in modern latin scripts.

When $cardinal is outside the accepted range, the empty string is returned.

Parameters
$cardinal : int
Tags
see
https://en.wikipedia.org/wiki/Greek_numerals

Greek numerals (Wikipedia)

https://simple.wikipedia.org/wiki/Greek_numerals

Greek numerals (Wikipedia simplified)

http://www.russellcottrell.com/greek/utilities/GreekNumberConverter.htm

The Greek Number Converter

https://www.researchgate.net/publication/2417759_From_Unicode_to_Typography_a_Case_Study_the_Greek_Script

From Unicode to Typography, a Case Study: the Greek Script, p. 16

Return values
string

cardinalToRoman()

convert cardinal (Arabic) to Roman numerals

cardinalToRoman(int $cardinal) : string

This implementation is limited to the numeric range 0 to 3,999 following the standard form of Roman numerals, plus the medieval nulla (N).

Its use is intended only for modern notation of years, centuries, or volumes ...

When $cardinal is outside the accepted range, the empty string is returned.

Parameters
$cardinal : int
Tags
see
https://en.wikipedia.org/wiki/Roman_numerals#Standard_form
Return values
string

getUuid()

Get UUID from database

getUuid(class $db) : string
Parameters
$db : class
Return values
string

$uuid

store()

Store/merge data.

store(SQL $db, string $uuid, array<string|int, mixed> $data[, bool $overwrite = false ]) : bool

If $overwrite is FALSE, the data to be stored is merged with the existing data in the database.

Parameters
$db : SQL
$uuid : string
$data : array<string|int, mixed>
$overwrite : bool = false

Default is FALSE

Return values
bool

FALSE if $uuid is not set or $data empty, otherwise TRUE

exists()

Check a row exists

exists(SQL $db, string $uuid) : bool
Parameters
$db : SQL
$uuid : string
Return values
bool

fetch()

Fetch data array

fetch(SQL $db, string $uuid) : array<string|int, mixed>|false
Parameters
$db : SQL
$uuid : string
Return values
array<string|int, mixed>|false

$data

fetchOne()

Fetch one array element

fetchOne(SQL $db, string $uuid, string $key) : mixed
Parameters
$db : SQL
$uuid : string
$key : string
Return values
mixed

$data FALSE if $key is not in row

delete()

Delete row

delete(SQL $db, string $uuid) : void
Parameters
$db : SQL
$uuid : string

deleteKeys()

Delete keys from the row data array

deleteKeys(SQL $db, string $uuid, array<string|int, mixed> $deleteKeys) : bool
Parameters
$db : SQL
$uuid : string
$deleteKeys : array<string|int, mixed>
Return values
bool

FALSE if row doesn't exist, otherwise TRUE

build_query()

Generate URL-encoded query string according to RFC 3986

build_query(array<string|int, mixed>|object $data) : string

This function is a wrapper for http_build_query() where $encoding_type parameter is always PHP_QUERY_RFC3986

Parameters
$data : array<string|int, mixed>|object

Array or object key-value pairs

Return values
string

escape()

Escape a component of a URL according to RFC 3986

escape(mixed $url) : string

This function attempts to split a URL into its components and recompose it after decoding and re-encoding the components.

A well-constructed URL should not suffer from this operation. Those that are malformed can be corrected but if an & character appears in the parameters, parameters may disappear.

Use the \URL\build_query() function to construct well-encoded parameters.

If $url is not a string, $url is casted to string type before escaping.

Parameters
$url : mixed

URL

Tags
see
https://www.php.net/manual/fr/function.rawurlencode.php#25182
http://www.faqs.org/rfcs/rfc3986.html
Return values
string

reduceUrl()

Reduce the size of long URL to keep web browser display tidy

reduceUrl(string $url, int $limit) : string

When $limit is less than 0, the URL is not reduced.

Parameters
$url : string

URL to reduce

$limit : int

Max number unicode characters

Return values
string

getCurrentProtocol()

Return the protocol requested by the HTTP client

getCurrentProtocol() : string
Return values
string

http or https (in lowercase)

getVhost()

Return the vHost name (Virtual Hostname)

getVhost() : string

Read also the special 'CLI_VHOST' constant which can be defined to simulate a vHost in CLI mode.

Return an empty string when the vHost cannot be read.

Return values
string

URL_exists()

Check that an internet resource exists

URL_exists(string $url) : bool

The resource is queried with the HTTP protocol to find out if it really exists online. The HTTP error code returned must be between 200 and 300.

Parameters
$url : string
Return values
bool

html_numeric_entity_decode()

Convert numeric HTML entities to their corresponding characters

html_numeric_entity_decode(string $str) : string

Act like html_entity_decode() builtin but converts also control characters.

Parameters
$str : string
Tags
see
https://www.december.com/html/spec/codes.html
Return values
string

mb_ucfirst()

A unicode aware replacement for ucfirst()

mb_ucfirst(string $str[, string|null $encoding = null ]) : string

TODO(LkpPo): remove this polyfill when PHP 8.4 will be the minimum PHP version

Parameters
$str : string
$encoding : string|null = null

Encoding ID Default is NULL

Tags
author

Andrea Rossato arossato@istitutocolli.org

see
ucfirst()
https://wiki.php.net/rfc/mb_ucfirst
Return values
string

mb_explode()

Simulate explode() for multibytes strings (as documented for PHP 7.0)

mb_explode(string $delimiter, string $string[, int|null $limit = PHP_INT_MAX ]) : array<string|int, mixed>
Parameters
$delimiter : string
$string : string
$limit : int|null = PHP_INT_MAX

Default is PHP_INT_MAX.

Return values
array<string|int, mixed>

mb_strrev()

Simulate strrev() for multibytes strings

mb_strrev(string $str) : string
Parameters
$str : string
Return values
string

mb_substr_replace()

Simulate substr_replace() for multibytes strings

mb_substr_replace(string $string, string $replacement, int $start[, int|null $length = null ][, string|null $encoding = null ]) : string
Parameters
$string : string
$replacement : string
$start : int

Start position in characters

$length : int|null = null

Default is NULL

$encoding : string|null = null

Encoding ID Default is NULL

Return values
string

mb_trim()

Multi-byte safely strip white-spaces (or other characters) from the beginning and end of a string.

mb_trim(string $string[, string $characters = " \f\n\r\t\v\x00             

   …᠎" ][, string|null $encoding = null ]) : string
Parameters
$string : string

The string that will be trimmed.

$characters : string = " \f\n\r\t\v\x00             

   …᠎"

Optionally, the stripped characters can also be specified using the $characters parameter. Simply list all characters that you want to be stripped.

$encoding : string|null = null

The encoding parameter is the character encoding Default is NULL

Tags
see
https://github.com/PHP-Polyfills/mb_trim/blob/main/src/mb_trim.php

TODO(LkpPo): remove this polyfill when PHP 8.4 will be the minimum PHP version

Return values
string

The trimmed string

mb_ltrim()

Multi-byte safely strip white-spaces (or other characters) from the beginning of a string.

mb_ltrim(string $string[, string $characters = " \f\n\r\t\v\x00             

   …᠎" ][, string|null $encoding = null ]) : string
Parameters
$string : string

The string that will be trimmed.

$characters : string = " \f\n\r\t\v\x00             

   …᠎"

Optionally, the stripped characters can also be specified using the $characters parameter. Simply list all characters that you want to be stripped.

$encoding : string|null = null

The encoding parameter is the character encoding Default is NULL

Tags
see
https://github.com/PHP-Polyfills/mb_trim/blob/main/src/mb_trim.php

TODO(LkpPo): remove this polyfill when PHP 8.4 will be the minimum PHP version

Return values
string

The trimmed string

mb_rtrim()

Multi-byte safely strip white-spaces (or other characters) from the end of a string.

mb_rtrim(string $string[, string $characters = " \f\n\r\t\v\x00             

   …᠎" ][, string|null $encoding = null ]) : string
Parameters
$string : string

The string that will be trimmed.

$characters : string = " \f\n\r\t\v\x00             

   …᠎"

Optionally, the stripped characters can also be specified using the $characters parameter. Simply list all characters that you want to be stripped.

$encoding : string|null = null

The encoding parameter is the character encoding Default is NULL

Tags
see
https://github.com/PHP-Polyfills/mb_trim/blob/main/src/mb_trim.php

TODO(LkpPo): remove this polyfill when PHP 8.4 will be the minimum PHP version

Return values
string

The trimmed string

listCoreMandatoryPHPExtensions()

Return an array of mandatory PHP extensions used by the WIKINDX core

listCoreMandatoryPHPExtensions() : array<string|int, string>

The name of each extension is the value of an array entry. An extension name use the same casing as get_loaded_extensions().

Return values
array<string|int, string>

listCoreOptionalPHPExtensions()

Return an array of optional PHP extensions used by the WIKINDX core

listCoreOptionalPHPExtensions() : array<string|int, string>

The name of each extension is the value of an array entry. An extension name use the same casing as get_loaded_extensions().

Return values
array<string|int, string>

OSName()

Return the normalized name of the current os

OSName() : string

Values can be:

  • "windows" for Cygwin, mingw, msys, or Windows
  • "mac" forall version of MAC OSX
  • The raw name in lowercase (a-z chars only) for others
Return values
string

matchPrefix()

Check if a prefix match against a string

matchPrefix(string $string, string $prefix[, bool $casesensitive = false ]) : bool
Parameters
$string : string

A string

$prefix : string

A prefix

$casesensitive : bool = false

Perform a case sensitive comparison if TRUE (FALSE by default)

Return values
bool

matchSuffix()

Check if a suffix match against a string

matchSuffix(string $string, string $suffix[, bool $casesensitive = false ]) : bool
Parameters
$string : string

A string

$suffix : string

A suffix

$casesensitive : bool = false

Perform a case sensitive comparison if TRUE (FALSE by default)

Return values
bool

curl_download_file_http()

Download a file from an url with HTTP

curl_download_file_http(string $url, string $file) : bool

NB: follow 32 redirects (for SourceForge) and don't check certificats and fingerprints

Parameters
$url : string

The url of a web resource

$file : string

The path of a local file

Return values
bool

TRUE if the download is successful, FALSE otherwise

uuid()

Return a (pseudo) unique string of variable length using random_bytes().

uuid([int $length = 16 ]) : string
Parameters
$length : int = 16

Length of the returned string (Default is 16)

Return values
string

createDataFolders()

Create default data folders used by the application

createDataFolders() : void

checkFileSystemPerms()

Check the permissions of various folders and files which must be writable

checkFileSystemPerms([bool $withFiles = false ]) : mixed
Parameters
$withFiles : bool = false

Also check file perms (Default is FALSE)

arrayCombinations()

Generate an array of all possible combinations of array values From https://stackoverflow.com/questions/10834393/php-how-to-get-all-possible-combinations-of-1d-array with minor adaptation ($space)

arrayCombinations(array<string|int, mixed> $arr, string $temp_string, string $space, array<string|int, mixed> &$collect) : void
Parameters
$arr : array<string|int, mixed>
$temp_string : string
$space : string
$collect : array<string|int, mixed>

splitDate()

Take input from HTML FORM <input type=date> and split into separate fields.

splitDate(string $dateInput) : array<string|int, mixed>

Date comes in as 'yyyy-mm-dd' (but displayed on web form as 'dd / mm / yyyy'). All three fields must have a valid value else the form input is FALSE. This should be tested before calling this function.

Parameters
$dateInput : string
Return values
array<string|int, mixed>

array(year, month, day)

balanceBraces()

Balance braces after removing noSort in resource input/edit of title or for bibTeX input

balanceBraces(string $string) : string
Parameters
$string : string
Return values
string

sumBraces()

Balance braces after removing noSort or for bibTeX input — return result of sum of open - close braces

sumBraces(string $string) : int
Parameters
$string : string
Return values
int

noSortPattern()

Create a preg pattern for checking presence of a WIKINDX_NO_SORT value at the beginning of a string.

noSortPattern([array<string|int, mixed> $noSortArray = [] ]) : string

If empty($noSortArray), then we use WIKINDX_NO_SORT (and assume that WIKINDX_NO_SORT has been checked for content). Otherwise, $noSortArray is from admin::configure::updateNoSort()

Parameters
$noSortArray : array<string|int, mixed> = []

Default is []

Return values
string

writeUserPassword()

Write a hashed version of a user password in users table

writeUserPassword(SQL $db, string $usersId, string $usersPassword) : void

Implementation history: see \UTILS\verifyUserPassword()

Parameters
$db : SQL

An SQL object

$usersId : string

A user Id

$usersPassword : string

A clear password to encrypt/hash

verifyUserPassword()

Verify that a password matches a password hash of a user

verifyUserPassword(SQL $db, string $usersId, string $usersPassword) : bool

It hides the implementation changes linked to the evolution of cryptographic techniques.

Parameters
$db : SQL

An SQL object

$usersId : string

A user Id

$usersPassword : string

A clear password to verify

Tags
see
https://www.php.net/manual/en/function.password-hash.php#124138

A goof hash renewal strategy is explained on this page: https://www.michalspacek.com/upgrading-existing-password-hashes

Unfortunately the hashes used with crypt have not been memorized and it is not possible to do the double hash step.

So the option chosen is to hash the password the next time a user connects and in a future version remove the old algorithm and reset the password for users who have never reconnected.

Implementation history

  • v1 (before 5.2.0): use crypt() with a salt generated by: strrev(time()).
  • v2 (5.2.0 to 6.3.10): use crypt() with a salt generated by: \UTF8\mb_strrev(time()).
  • v3 (from 6.4.0): use crypt() with a salt generated by: strrev(time()).
  • v4 (from 6.4.0, v35): use password_hash() with PASSWORD_DEFAULT algo without custom options.

The last version replaced the pre-PHP 5.5 crypt() function by password_hash() which has stronger defaults and is protected against time attacks.

version
4
Return values
bool

array_value_select()

Return the corresponding value of an array key or a default value

array_value_select(array<string|int, mixed> $array, mixed $key[, mixed $defaultKey = null ][, mixed $defaultValue = null ]) : mixed

This function is an access to the value of an array with fallback solutions in the event of absence.

This function is useful when it is necessary to select a value from a list and one of the inputs is also the default key or it is mandatory to obtain a consistent value at the output of the selection without having to write additional code.

Parameters
$array : array<string|int, mixed>

An array to search the key for

$key : mixed

The key whose value must be returned

$defaultKey : mixed = null

The default key whose value must be returned if the key was not found (NULL by default)

$defaultValue : mixed = null

The value returned if no key was found (NULL by default)

Create a popup link for a Help Topic on the website

createHelpTopicLink(mixed $helpTopic) : string
Parameters
$helpTopic : mixed
Return values
string

HTML link tag

canIResumeExecution()

Can I resume execution?

canIResumeExecution([int $memorySizeRemaining = 1048576 ][, int $excutionTimeRemaining = 6 ]) : bool

Says if it is possible to continue the execution of the program according to the consumption of memory and time.

Use this for memory or time intensive tasks you intend to interrupt without crash.

Say TRUE:

  • if 10 MB or less remains before the PHP max memory limit
  • or if 6 s. or less time remains before max_execution_time.

Otherwise FALSE.

NB:

  • If memory_limit option is set to -1, the memory condition is not checked.
  • If max_execution_time option is set to 0, the time condition is not checked.
Parameters
$memorySizeRemaining : int = 1048576

Memory size in bytes of remaining before the limit (Default is 10MB = 1024 * 1024 bytes)

$excutionTimeRemaining : int = 6

Execution time remaining before the max executionlimit (Default is 6 seconds)

Return values
bool

command_exists()

Does an unix command exist?

command_exists(string $command) : bool
Parameters
$command : string

Command to test with the default shell

Return values
bool

TRUE on success

insertExportImages()

Insert cached images inside exported files, and delete them

insertExportImages(string $fileName) : void

The file is written to consume as little memory as possible because the number of images can be large.

Parameters
$fileName : string

reduceLongText()

Reduce the size of long text (in select boxes usually) to keep web browser display tidy.

reduceLongText(string $text[, bool|int $override = false ][, int $words = 0 ][, bool $balance = true ]) : string

Optional $override allows the programmer to override the user set preferences for number of characters. If optional $words is greater than 0, then that number of words is used rather than a number of characters. If optional $balance l= TRUE, the return string is something like 'xxxx ... xxxx' else it is 'xxxx ...' (if there are chars/words removed). If $words is being used, then $balance is ignored and the first $words are returned.

Parameters
$text : string
$override : bool|int = false

Default is FALSE

$words : int = 0

Default is 0

$balance : bool = true

Default TRUE

Return values
string

computeBibtexKeyAuthorYear()

Generate a BibTeX citation key for one resource with format 'AuthorYear'

computeBibtexKeyAuthorYear(int $resourceId, string $creatorPrefix, string $creatorSurname, string|int $year, array<string|int, string> $bibtexKeys) : string

LkpPo(TODO): fix the max length

Parameters
$resourceId : int

Resource Id

$creatorPrefix : string

Prefix of the first creator of the resource

$creatorSurname : string

Surname of the first creator of the resource

$year : string|int

Year of publication of the resource

$bibtexKeys : array<string|int, string>

An array of existing BibTeX citation keys already stored in db

Return values
string

computeBibtexKeyAuthorID()

Generate a BibTeX citation key for one resource with format 'Author.ResourceId'

computeBibtexKeyAuthorID(int $resourceId, string $creatorPrefix, string $creatorSurname, array<string|int, string> $bibtexKeys) : string

LkpPo(TODO): fix the max length

Parameters
$resourceId : int

Resource Id

$creatorPrefix : string

Prefix of the first creator of the resource

$creatorSurname : string

Surname of the first creator of the resource

$bibtexKeys : array<string|int, string>

An array of existing BibTeX citation keys already stored in db

Return values
string

clearXmlString()

Clear forbidden characters from an XML string

clearXmlString(string $xmlstring) : string

If a forbidden character is in a XML string, PHP XML libraries crash.

This function should be used to remove forbidden characters from an XML file or string when the source in untrusted.

Parameters
$xmlstring : string

An XML string

Tags
see
https://www.w3.org/TR/REC-xml/#charsets
https://stackoverflow.com/questions/14463573/php-simplexml-load-file-invalid-character-error
Return values
string

validateDOI()

Validate a DOI number

validateDOI(string $string) : bool

The DOI prefix is <directoryIndicator>.<registrantCode>

The following rules apply:

  • The directory indicator can contain only numeric values. The directory indicator is usually 10 but other indicators may be designated as compliant by the DOI Foundation.

  • The registrant code can contain only numeric values and one or several full stops which are used to subdivide the code. For example: 10.1000, 10.500.100, etc. If the directory indicator is 10 then a registrant code is mandatory

Parameters
$string : string
Tags
see
DOI

Handbook, 3.2.2 DOI PREFIX, https://www.doi.org/doi-handbook/DOI_Handbook_Final.pdf

validateDOI()

JS function

Return values
bool

escape()

Escape strings inserted in XML

escape(mixed $value) : string

If $value is not a string, $value is casted to string type before escaping.

Parameters
$value : mixed
Return values
string

handleParams()

Handle the params array and act as a gateway to other functions

handleParams(string $method[, mixed $extra = false ][, mixed $type = false ]) : mixed
Parameters
$method : string
$extra : mixed = false

Default FALSE

$type : mixed = false

Default FALSE

initialiseParams()

Initialise params for each type of list.

initialiseParams(string $type, array<string|int, mixed> $extra) : array<string|int, mixed>
Parameters
$type : string
$extra : array<string|int, mixed>
Return values
array<string|int, mixed>

commonInit()

Initialise common list parameters

commonInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

qsearchInit()

Initialise qsearch parameters

qsearchInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

citeInit()

Initialise cite parameters

citeInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

basketInit()

Initialise basket parameters

basketInit(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

browseInit()

Initialise browse parameters We only need BibId and that's done in commonInit(9.

browseInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

listInit()

Initialise list parameters

listInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

zoomInit()

Initialise zoom parameters

zoomInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

listSomeInit()

Initialise listSome parameters

listSomeInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

ideasInit()

Initialise ideas parameters

ideasInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, mixed $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$reorder : mixed
Return values
array<string|int, mixed>

advsearchInit()

Initialise advsearch parameters

advsearchInit(array<string|int, mixed> $vars, array<string|int, mixed> $params, string $type, bool $reorder) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$params : array<string|int, mixed>
$type : string
$reorder : bool
Return values
array<string|int, mixed>

filter()

Filter parameters

filter(array<string|int, mixed> $vars, string $type) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>
$type : string
Return values
array<string|int, mixed>

setParams()

Set a parameter. Multiple parameters can be set.

setParams(array<string|int, mixed> $extra, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$extra : array<string|int, mixed>
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

finalize()

After completion of listing, save parameters

finalize(string $listStmt, mixed $type, array<string|int, mixed> $params) : mixed
Parameters
$listStmt : string

param string $type

$type : mixed
$params : array<string|int, mixed>

transferArrows()

Make the transfer arrows to transfer fields between select boxes with onclick

transferArrows(mixed $source, mixed $target) : array<string|int, mixed>
Parameters
$source : mixed
$target : mixed
Return values
array<string|int, mixed>

[toRightImage, toLeftImage]

makeSelectBox()

Make div selected box

makeSelectBox(mixed &$array, mixed $type, mixed $index, array<string|int, mixed> $params) : string
Parameters
$array : mixed
$type : mixed
$index : mixed
$params : array<string|int, mixed>
Return values
string

makeRadioButtons1()

Create radio buttons for AND and OR and NOT

makeRadioButtons1(string $type) : string
Parameters
$type : string
Return values
string

makeRadioButtons2()

Create radio buttons for AND and OR

makeRadioButtons2(string $type[, bool $defaultAND = false ]) : string
Parameters
$type : string
$defaultAND : bool = false

= FALSE

Return values
string

wordDiv()

Word search div

wordDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

categoryDiv()

Category div

categoryDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

subcategoryDiv()

Subcategory div

subcategoryDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

addedByDiv()

AddedBy div

addedByDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed

Ø @param array $params

$params : array<string|int, mixed>
Return values
string

editedByDiv()

EditedBy div

editedByDiv(string $index, array<string|int, mixed> $params) : string
Parameters
$index : string
$params : array<string|int, mixed>
Return values
string

valueDiv()

Value div for publicationYear, access, maturityIndex

valueDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

typeDiv()

Resource type div

typeDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

creatorDiv()

Creator div

creatorDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

keywordDiv()

Keyword div

keywordDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

metaKeywordDiv()

Metadata Keyword div

metaKeywordDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

languageDiv()

Language div

languageDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

publisherDiv()

Publisher div

publisherDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

collectionDiv()

Collection div

collectionDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

userTagDiv()

UserTag div

userTagDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

tagDiv()

Import Tag div

tagDiv(mixed $index, array<string|int, mixed> $params) : string
Parameters
$index : mixed
$params : array<string|int, mixed>
Return values
string

grabLanguages()

get languages from database

grabLanguages() : array<string|int, mixed>
Return values
array<string|int, mixed>

userBibs()

Return select box of user bibliographies for this user. Called from LISTCOMMON when displaying results.

userBibs() : string
Return values
string

makeRadioButtonsFilter()

Create radio buttons for AND and OR and NOT—specifically for the filter buttons

makeRadioButtonsFilter() : string
Return values
string

displayOptions()

Display attachment options. Called from LISTCOMMON when displaying results.

displayOptions(array<string|int, mixed> $params) : string

NB this belongs to the FILTER form not the SEARCH form!

Parameters
$params : array<string|int, mixed>
Return values
string

loadStaticConfig()

Load configuration from config.php

loadStaticConfig() : array<string|int, mixed>

This function die() if a config parameter is wrong.

Return values
array<string|int, mixed>

Array of error messages

needUpdate()

Check if the current WIKINDX data (db and files) need an upgrade

needUpdate(object $db) : bool
Parameters
$db : object

An SQL object

Return values
bool

existsTableVersion()

Check if 'version' table that stores the version number of the db schema exists

existsTableVersion(object $db) : bool

Check also the old names of the version table.

This function is used only during the upgrade process.

Parameters
$db : object

An SQL object

Return values
bool

getCoreInternalVersion()

Return the internal version stored in the database of the core

getCoreInternalVersion(object $db) : float

This function is used only during the upgrade process, and the value should be looked up in the field regardless of the version.

Parameters
$db : object

An SQL object

Return values
float

setCoreInternalVersion()

Write an internal version in the database of a component or the core

setCoreInternalVersion(object $db, float|int $version) : mixed

This function is used only during the upgrade process, and the value should be written in the field regardless of the version.

If $version is NULL, the version number used it 0.0.

Parameters
$db : object

An SQL object

$version : float|int

getComponentInternalVersion()

Return the internal version of a component stored in the database

getComponentInternalVersion(object $db, string $ComponentType, string $ComponentId) : float

This function is used only during the upgrade process or when a component is installed, and the value should be looked up in the field regardless of the version.

Parameters
$db : object

An SQL object

$ComponentType : string

Type of a component

$ComponentId : string

Id of a component

Return values
float

setComponentInternalVersion()

Write an internal version of a component in the database

setComponentInternalVersion(object $db, string $ComponentType, string $ComponentId, float|int $version) : mixed

This function is used only during the upgrade process or when a component is installed, and the value should be written n the field regardless of the version.

If $version is NULL, the version number used it 0.0.

Parameters
$db : object

An SQL object

$ComponentType : string

Type of a component

$ComponentId : string

Id of a component

$version : float|int

deleteComponentInternalVersion()

Delete an internal version of a component from the database

deleteComponentInternalVersion(object $db, string $ComponentType, string $ComponentId) : mixed

This function is used only during the upgrade process or when a component is uninstalled, and the value should be written n the field regardless of the version.

Parameters
$db : object

An SQL object

$ComponentType : string

Type of a component

$ComponentId : string

Id of a component

existsSuperadminAccount()

Check if 'users' table has not been filled with the superadmin account

existsSuperadminAccount(object $db) : bool

This function is used only during the upgrade process.

Parameters
$db : object

An SQL object

Return values
bool

getConfigContactEmail()

Return the configContactEmail depending on the software version

getConfigContactEmail(object $db) : float

This function is used only during the upgrade process, and the value should be looked up in the field regardless of the version.

Parameters
$db : object

An SQL object

Return values
float

logonCheckUpgradeDB()

Initial logon to the system when upgrading the database.

logonCheckUpgradeDB(object $db, string $username, string $password) : bool
Parameters
$db : object

An SQL object

$username : string
$password : string
Return values
bool

TRUE if able to authenticate

wkx_error_handler()

Custom PHP errors handler

wkx_error_handler(int $errno, string $errstr, string $errfile, int $errline) : bool

cf. https://www.php.net/manual/fr/function.set-error-handler.php

The $errcontext parameter is not used because it is deprecated since PHP 7.2 It is no longer possible to know the context of the error. Instead we use the debug_print_backtrace() function.

NB: fatal errors like ‘parse error’ are still written in the log defined by error_log php.ini option because this handler cannot be called in that case.

Parameters
$errno : int

PHP error code

$errstr : string

PHP error message

$errfile : string

File or script where the error occurred

$errline : int

Error line number

Return values
bool

wkx_shutdown_handler()

Shutdown Handler

wkx_shutdown_handler() : mixed

Vérifie si la dernière erreur était fatal, et dans ce cas inscrit les informations de débogage dans la trace global car le script ne peut pas intercepter ce genre d'erreur lui-même.

Check if the last error was fatal on shutdown, and if so, log the debugging information to the global trace, as the script cannot intercept this type of error itself.

cf. https://www.php.net/manual/en/function.register-shutdown-function.php cf. https://www.php.net/manual/en/function.set-error-handler.php

wkx_exception_handler()

Custom handler for uncaught exceptions

wkx_exception_handler(Throwable $exception) : mixed

This will trigger instead of the PHP one, if the script has not intercepted it itself.

Then PHP terminates the script on its own.

cf. https://www.php.net/manual/en/function.set-exception-handler.php

Parameters
$exception : Throwable

wkx_error_log()

Write a message to the application log

wkx_error_log(mixed $Message) : void

When the application is not yet configured, the message is written to the log defined by php.ini.

Parameters
$Message : mixed

Message

wkx_error_function_args()

Prints in tabular format the positional arguments of a function to the logs

wkx_error_function_args(string $func_name, string $func_args) : void

To use this function, add at the top of the traced function body: wkx_error_function_args(FUNCTION, func_get_args()); or wkx_error_function_args(METHOD, func_get_args());

Parameters
$func_name : string

Function name (e.g. pass FUNCTION)

$func_args : string

Function arguments (e.g. pass func_get_args())

wkx_clear_error_log()

Remove expired error logs (14 days max) and limit their size to 25 MB by file

wkx_clear_error_log() : mixed

buildUpgradePage()

buildUpgradePage(string $body) : mixed
Parameters
$body : string

        
On this page

Search results