| Wraps the entire row above the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnTopLeftWrap | | Wraps elements on the left side of the row above the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnTopRightWrap | | Wraps elements on the right side of the row above the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnTopLeftOrder | | Set the button sequence on the top left above your form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnTopRightOrder | | Set the button sequence on the top right above your form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnFooterWrap | | Wraps the entire row above the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnFooterLeftWrap | | Wraps elements on the left side of row at footer the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnFooterRightWrap | | Wraps elements on the right side of row at footer the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnFooterLeftOrder | | Set the button sequence on the footer left below your form |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| btnFooterRightOrder | | Set the button sequence on the footer right below your form |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonDefault | | Build save button using regular qfq notation. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonDefault | | Build delete button using regular qfq notation. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonDefault | | Build close button using regular qfq notation. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonDefault | | Build new button using regular qfq notation. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formEditButtonDefault | | Build formedit button using regular qfq notation. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formViewButtonDefault | | Build formview button using regular qfq notation. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonText | | Text on the form save button. Typically none. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonTooltip | Save | Tooltip on the form save button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for save button on top of the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| buttonOnChangeClass | alert-info btn-info | Bootstrap CSS class for save button showing 'data changed'. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonGlyphIcon | glyphicon-ok | Icon for the form save button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonText | | Text on the form close button. Typically none. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonTooltip | close | Tooltip on the form close button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for close button on top of the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonGlyphIcon | glyphicon-remove | Icon for the form close button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonText | | Text on the form delete button. Typically none. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonTooltip | delete | Tooltip on the form delete button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for delete button on top of the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonGlyphIcon | glyphicon-trash | Icon for the form delete button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonText | | Text on the form new button. Typically none. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonTooltip | new | Tooltip on the form new button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for new button on top of the form. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonGlyphIcon | glyphicon-plus | Icon for the form new button. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| **Custom** |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| custom1...30 | Empty. Example: PHONE=6355847 | Custom Variable |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| **Dynamic** |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| fillStoreSystemBySqlRow | SELECT gr.reference AS name, gr.id AS value FROM | Specific values read from the database to fill STORE_SYSTEM. |
| | | Fired at the **beginning** of loading STORE_SYSTEM. **No support** of |
| | Ggroup AS gr WHERE gr.loadConfig='yes' | **QFQ-Variables**. See :ref:`fillStoreSystemBySqlRow` for a usecase. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| fillStoreSystemBySqlRowErrorMsg | No record found | Only define an error message, if QFQ should stop running |
| | | in case of an SQL error or not at least one record. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| fillStoreSystemBySqlRowVariable | SELECT 'pIdUser' AS name, p.id AS value | Specific values read from the database to fill STORE_SYSTEM. |
| | FROM Person AS p | Fired at the **end** of loading STORE_SYSTEM. Supports **QFQ-Variables** |
| | WHERE p.account = '{{feUser:T}}' | from STORE_SYSTEM. See :ref:`fillStoreSystemBySqlRow` for a usecase. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| fillStoreSystemBySqlRowVariable- | No record found | Only define an error message, if QFQ should stop running |
| ErrorMsg | | in case of an SQL error or not at least one record. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| fillStoreSystemBySql1/2/3 | SELECT s.id AS ... | Specific values read from the database to fill the system store during QFQ |
| | | load. See :ref:`fillStoreSystemBySql` for a usecase. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| fillStoreSystemBySqlErrorMsg1/2/3 | No current period found | Only define an error message, if QFQ should stop running |
| | | in case of an SQL error or not exact one record. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| **File** |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cacheDirSecure | fileadmin/protected/cache | Important: secure the directory (recursive) against direct access. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cachePurgeFilesOlderDays | 365 | Purge files in $cacheDirSecure older than $cachePurgeFilesOlderDays. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| maxFileSize | 10M | If empty, take minimum of 'post_max_size' and 'upload_max_filesize'. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| imageUploadDir | fileadmin/imageUploadDir | Used for TinyMCE Image Upload. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| thumbnailDirSecure | fileadmin/protected/qfqThumbnail | Important: secure the directory (recursive) against direct access. |
| | | Used by special columnname '_thumbnail'. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| thumbnailDirPublic | typo3temp/qfqThumbnail | Will be used by a special columnname '_thumbnail'. |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| sqlDirectdownloadphp/dl...dl3 | no default | Access via download.php. Example: SELECT CONCAT('d:output.pdf|F:', |
| | | n.pathFileName) FROM notiz AS n WHERE n.id=? AND NOW() | Set this ONLY if your SMTP needs a static 'from' address (weired setup). |
| | | 'reply-to' will be used to offer simple 'Reply' functionality to user. |
| | | To hide static 'from' address to the reciever, a realname is set for the |
| | | 'from' address. Take realname from 'Reply-To', 'From', 'forceSmtpSender' or|
| | | misuse the 'From' email as realname (take first in the named priority). |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| sendEMailOptions | -o tls=yes | General options. Check: http://caspian.dotconf.net/menu/Software/SendEmail |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cmdWget | wget >/dev/null 2>&1 | Command is used for trying to download content from protected folder. |
| | | To accept self signed certificate, add option '--no-check-certificate' |
+-----------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
After parsing the configuration, the following variables will be set automatically in STORE_SYSTEM:
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| Keyword | Description |
+===============================+====================================================================================================================================+
| dbNameData | Name of the 'data'-database. '{{dbNameData:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| dbNameQfq | Name of the 'QFQ'-database. '{{dbNameQfq:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| dbNameT3 | Name of the 'T3'-database. '{{dbNameT3:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| sitePath | Absolute path of the current T3 instance. '{{sitePath:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| extPath | Absolute path of the QFQ extension. '{{extPath:Y}} |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
.. _`CustomVariables`:
Custom variables
^^^^^^^^^^^^^^^^
Up to 30 custom variables can be defined in :ref:`configuration`.
E.g. to setup a contact address and reuse the information inside your installation do: ::
custom1: ADMINISTRATIVE_CONTACT = john@doe.com
custom2: ADMINISTRATIVE_ADDRESS = John Doe, Hollywood Blvd. 1, L.A.
custom3: ADMINISTRATIVE_NAME = John Doe
* Somewhere in a `Form` or in `Report`::
{{ADMINISTRATIVE_CONTACT:Y}}, {{ADMINISTRATIVE_ADDRESS:Y}}, {{ADMINISTRATIVE_NAME}}
Change your custom variables in the T3 Extension Configuration window under Custom.
.. _`fillStoreSystemBySql`:
Fill STORE_SYSTEM by SQL
^^^^^^^^^^^^^^^^^^^^^^^^
A specified SELECT statement in :ref:`configuration` in variable `fillStoreSystemBySql1` (or `2`,
or `3`) will be fired. The query should have 0 (nothing happens) or 1 row. All columns will be
**added** to the existing STORE_SYSTEM. Existing variables will be overwritten. Be careful not to overwrite system values.
This option is useful to make generic custom values, saved in the database, accessible to all QFQ Report and Forms.
Access such variables via `{{:Y}}`.
In case QFQ should stop working if a given query does not select exact one record (e.g. a missing period), define an
error message: ::
fillStoreSystemBySql1: SELECT name FROM Person WHERE name='Doe'
fillStoreSystemBySqlErrorMsg1: Too many or to few "Doe's" in our database
.. _`periodId`:
periodId
""""""""
This is
* a usecase, implemented via :ref:`fillStoreSystemBySql`,
* a way to access `Period.id` with respect to the current period (the period itself is custom defined).
After a full QFQ installation:
* a table `Period` (extend / change it to your needs, fill them with your periods),
* one sample record in table `Period`,
Websites, delivering semester data, school year schedules, or any other type or periods, often need an index to the
*current* period.
In :ref:`configuration`: ::
fillStoreSystemBySql1: SELECT id AS periodId FROM Period WHERE start<=NOW() ORDER BY start DESC LIMIT 1
a variable 'periodId' will automatically computed and filled in STORE SYSTEM. Access it via `{{periodId:Y0}}`.
To get the name and current period: ::
SELECT name, ' / ', start FROM Period WHERE id={{periodId:Y0}}
Typically, it's necessary to offer a 'previous' / 'next' link. In this example, the STORE SIP holds the new periodId: ::
SELECT CONCAT('p:{{pageSlug:T}}?periodId=', {{periodId:SY0}}-1, '|Next') AS _page, ' ', name, ' ',
CONCAT('p:{{pageSlug:T}}?periodId=', {{periodId:SY0}}+1, '|Next') AS _page FROM Period AS s WHERE s.id={{periodId:SY0}}
Take care for minimum and maximum indexes (do not render the links if out of range).
.. _`fillStoreSystemBySqlRow`:
Fill STORE SYSTEM by Sql Row
""""""""""""""""""""""""""""
Similar to the fillStoreSystemBySql1/2/3 a specified SELECT statement in :ref:`configuration` in variable
`fillStoreSystemBySqlRow` will be fired. This option gives the opportunity to define a key name and assigning a value to
that key for multiple rows. It makes UNION usable too.
The 'fillStoreSystemBySqlRowVariable' is like `fillStoreSystemBySqlRow` but it can parse variables from T|S|Y|C Store.
Best practice is to create a new column 'storeSystem' for the specific table from which the query is executed. A type
ENUM with yes and no could then be used to filter the desired values.
Exactly two columns are expected as aliases: name, value
Example: ::
fillStoreSystemBySqlRow: SELECT gr.reference AS name, IF('{{pageLanguage:T}}'=0 OR gr.value2='', gr.value, gr.value2) AS value FROM Ggroup AS gr WHERE gr.storeSystem='yes'
To retrieve the value, name is used as variable name. For example if the column reference from one record is named
'id_accepted' and related column value has the value '22': ::
{{id_accepted:Y}}
This returns the value '22'.
Giving more or less than two columns will lead to an error. Also not allowed are the use of other aliases than 'name' and 'value'.
In case QFQ should stop working if a given query does not select at least one record or more, define an
error message: ::
fillStoreSystemBySqlRowErrorMsg: No rows found with given query.
Best practice is to make a Person table with column account and then use the typo3 store variable '{{feUser:T}}' to get the person id.
Example: ::
fillStoreSystemBySqlRowVariable: SELECT 'pIdUser' AS name, p.id AS value FROM Person AS p.account = '{{feUser:T}}'
To retrieve the person id use {{pIdUser:Y}}.
In case QFQ should stop working if a given query does not select at least one record or more, define an
error message: ::
fillStoreSystemBySqlRowVariableErrorMsg: No rows found with given query.
.. _`DbUserPrivileges`:
DB USER privileges
^^^^^^^^^^^^^^^^^^
The specified DB User needs privileges
* to the QFQ database of at least: SELECT / INSERT / UPDATE / DELETE / SHOW.
* to the Typo3 database of at least table `tt_content` with SELECT.
To apply automatically QFQ-'DB UPDATE' the following rights are mandatory too: CREATE / ALTER
To get access to the Typo3 installation, 'dbuser' should also have access to the Typo3 Database with at least SELECT / INSERT / UPDATE / DELETE.
.. _`ExceptionMaxLength`:
Exception for SECURITY_GET_MAX_LENGTH
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If it is necessary to use a GET variable which exceeds `securityGetMaxLength` limit, name the variable with '_' at
the end. E.g. `my_long_variable_130`. Such a variable has an allowed length of 130 chars. Access the variable as
usual with the variable name: `{{my_long_variable_130:C:...}}`.
.. _`sessionTimeoutSeconds`:
FE-User: Session timeout seconds
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is no timeout for website users who are not logged in (but typically those users don't have access to protected content).
For logged in users, the default timeout is the php.ini settings for `session.cookie_lifetime` and `session.gc_maxlifetime`
(minimum of both). These timeout only affects QFQ related content and can be
specified a) globally (QFQ configuration) and b) specific per Form.
The maximum timeout depends on the minimal value of php.ini `session.cookie_lifetime` and `session.gc_maxlifetime`.
Specifying a higher value produces an error in the front end.
Every access to QFQ related content resets the timeout.
After FE login, the next access to QFQ related content starts the timeout counter.
.. _`removeFormBackupCron`:
Cron Job: Remove Form Backup Files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following cron job may be used to automatically remove form backup files (see :ref:`formAsFile`) which are older than 31 days. Be sure to adjust the path accordingly: ::
0 19 * * * find /var/www/html/fileadmin/protected/qfqProject/form/.backup/ -type f -mtime +31 -exec rm {} \;