Commit 5e9442d0 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Merge remote-tracking branch 'origin/crose_work' into raos_work

parents 8a767f04 eecfb808
......@@ -11,6 +11,21 @@
Administrator Manual
====================
Preparation
-----------
The QFQ extension needs the PHP MySQL native driver. The following functions are used and are only available with the
native driver (see also: http://dev.mysql.com/downloads/connector/php-mysqlnd/):
* mysqli::get_result (important),
* mysqli::fetch_all (nice to use)
Installation for Ubuntu::
sudo apt-get install php5-mysqlnd
sudo php5enmod mysqlnd
sudo service apache2 restart
Setup
-----
......@@ -56,42 +71,45 @@ Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content
<ext_dir>/config.ini
--------------------
+------------------------+--------------+----------------------------------------------------------------------------+
| Keyword | Example | Description |
+========================+==============+============================================================================+
| DBUSER | qfqUser | Credentials configured in MySQL |
+------------------------+--------------+----------------------------------------------------------------------------+
| DBPW | 12345678 | Credentials configured in MySQL |
+------------------------+--------------+----------------------------------------------------------------------------+
| DBSERVER | localhost | Hostname of MySQL Server |
+------------------------+--------------+----------------------------------------------------------------------------+
| DB | qfq_db | Database name |
+------------------------+--------------+----------------------------------------------------------------------------+
| TESTDB | qfq_db_test | Used during development of QFQ |
+------------------------+--------------+----------------------------------------------------------------------------+
| SESSIONNAME | qfq | By default 'qfq' |
+------------------------+--------------+----------------------------------------------------------------------------+
| SQLLOG | sql.log | filename to log all SQL commands |
+------------------------+--------------+----------------------------------------------------------------------------+
| SHOW_DEBUG_INFO | auto | Possible values: auto|yes|no. For 'auto': If a BE User is logged in, |
| | | debug information will be shown on the fronend. |
+------------------------+--------------+----------------------------------------------------------------------------+
| CSS_LINK_CLASS_INTERNAL| internal | CSS class name of links which points to internal tagets |
+------------------------+--------------+----------------------------------------------------------------------------+
| CSS_LINK_CLASS_EXTERNAL| external | CSS class name of links which points to internal tagets |
+------------------------+--------------+----------------------------------------------------------------------------+
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| Keyword | Example | Description |
+========================+==================================+============================================================================+
| DB_USER | DB_USER=qfqUser | Credentials configured in MySQL |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| DB_PASSWORD | DB_PASSWORD=12345678 | Credentials configured in MySQL |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| DB_SERVER | DB_SERVER=localhost | Hostname of MySQL Server |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| DB_NAME | DB_NAME=qfq_db | Database name |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| DB_NAME_TEST | DB_NAME_TEST=qfq_db_test | Used during development of QFQ |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| SESSION_NAME | SESSION_NAME=qfq | PHP Session name, by default 'qfq' |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| SQL_LOG | SQL_LOG=sql.log | Filename to log SQL commands: relative to <ext_dir> or absolute. |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| SQL_LOG_MODE | SQL_LOG_MODE=modify | *all*: every statement will be logged - this is a lot |
| | | *modify*: log only statements who change data |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| SHOW_DEBUG_INFO | SHOW_DEBUG_INFO=auto | Possible values: auto|yes|no. For 'auto': If a BE User is logged in, |
| | | debug information will be shown on the fronend. |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| CSS_LINK_CLASS_INTERNAL| CSS_LINK_CLASS_INTERNAL=internal | CSS class name of links which points to internal tagets |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| CSS_LINK_CLASS_EXTERNAL| CSS_LINK_CLASS_EXTERNAL=external | CSS class name of links which points to internal tagets |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
Example: *<ext_dir>/config.ini*
::
DBUSER = qfqUser
DBSERVER = localhost
DBPW = 12345678
DB = qfq_db
TESTDB = qfq_db_test
SESSIONNAME = qfq
SQLLOG = sql.log
DB_USER = qfqUser
DB_SERVER = localhost
DB_PASSWORD = 12345678
DB_NAME = qfq_db
DB_NAME_TEST = qfq_db_test
SESSION_NAME = qfq
SQL_LOG = sql.log
SHOW_DEBUG_INFO = auto
CSS_LINK_CLASS_INTERNAL = internal
CSS_LINK_CLASS_EXT = external
\ No newline at end of file
......@@ -45,8 +45,6 @@ QFQ Keywords (Bodytext)
| | * by SIP: **form = {{form}}** |
| | * by SQL: **form = {{SELECT c.form FROM conference AS c WHERE c.id={{a:C}} }}** |
+-----------------+---------------------------------------------------------------------------------+
| debugShowStack | In case of an exception, show the call stack. E.g. *debugShowStack = 1* |
+-----------------+---------------------------------------------------------------------------------+
| <level>.db | Select a DB. Only necessary if a different than the standard DB should be used. |
+-----------------+---------------------------------------------------------------------------------+
| <level>.debug | Debug Level for *report* |
......@@ -74,7 +72,26 @@ QFQ Keywords (Bodytext)
| <level>.sql | SQL Query |
+-----------------+---------------------------------------------------------------------------------+
| <level>.althead | If <level>.sql is empty, these token will be rendered |
+-----------------+----------------------------------------------------------------------------------+
+-----------------+---------------------------------------------------------------------------------+
Debug
^^^^^
* config.ini: *SHOW_DEBUG_INFO = yes|no|auto*
* 'yes':
* Show tooltips in forms filled with decoded SIP.
* Shows 'Edit form' button in every form.
* 'no': No debug info rendered in the output.
* 'auto':
* checks if there is a Typo3 BE Session.
* yes: *SHOW_DEBUG_INFO = 'yes'*
* no: *SHOW_DEBUG_INFO = 'no'*
Form
----
......@@ -237,8 +254,8 @@ Store: *TYPO3* (Bodytext) - T
| Name | Explanation |
+===============+===================================================================+
| form | Formname defined in ttcontent record bodytext |
| | * fix. E.g. *form = person* |
| | * via SIP. E.g. *form = {{form}} |
| | * Fix. E.g. *form = person* |
| | * via SIP. E.g. *form = {{form}}* |
+---------------+-------------------------------------------------------------------+
| debugShowStack| Any exception will show the call stack. E.g. *debugShowStack = 1* |
+---------------+-------------------------------------------------------------------+
......@@ -331,8 +348,7 @@ Form: basic setup
+------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------+
|permitEdit | enum('sip', 'logged_in', 'logged_out', 'always', 'never')| Default: sip |
+------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------+
|permitUrlParameter | textarea | Braucht es das wircklich? per line one GET-'parameter name' with a class DIGIT, ALNUMX, |
| | | ALL. F.e.: *email:ALPHANUM \n postalcode:DIGIT* |
|showButton | set('new', 'delete') | Default 'new,delete'. Displays button 'new' and 'detete'. |
+------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------+
|render | enum('plain','table', 'bootstrap') | Default bootstrap |
+------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------+
......@@ -363,6 +379,16 @@ Form: basic setup
|created | datetime | set once through QFQ |
+------------------------+----------------------------------------------------------+-----------------------------------------------------------------------------------------+
Field: Form.showButton
^^^^^^^^^^^^^^^^^^^^^^
Display or hide the button 'new' and / or 'delete'.
* *new*: Creates a new record. If the form needs any special parameter via SIP or Client, hide this 'new' button - the necessary parameter are not provided.
* *delete*: The simple form of deleting a record only deletes the record itself, not any child records.
.. _form-parameter:
Field: Form.parameter
......@@ -640,6 +666,7 @@ Type: hidden
Type: input
^^^^^^^^^^^^^^^^^^^^
* General tnput for text and number.
* size:
......@@ -715,7 +742,7 @@ Type: subrecord
* *sql1*: SQL query to select records. E.g.::
{{!SELECT a.id AS id, CONCAT(a.strasse, a.hausnummer) AS a, a.city AS b, a.zip AS c FROM adresse AS a}}
{{!SELECT a.id AS id, CONCAT(a.street, a.streetnumber) AS a, a.city AS b, a.zip AS c FROM adresse AS a}}
# Remark the **exclamation mark** after '{{' - this is necessary to return an array of elements, instead of a single string.
......@@ -733,8 +760,8 @@ Type: subrecord
* The parameters are position independet.
* Examples::
SELECT note1 AS 'Comment', note2 AS 'Comment\|50' , note3 AS 'title=Comment\|width=100\|nostrip', note4 AS '50\|Comment',
'checked.png' AS 'Status\|icon', email AS 'mailto', CONCAT(homepage, '\|Homepage') AS 'url' ...
SELECT note1 AS 'Comment', note2 AS 'Comment\|50' , note3 AS 'title=Comment\|width=100\|nostrip', note4 AS '50\|Comment',
'checked.png' AS 'Status\|icon', email AS 'mailto', CONCAT(homepage, '\|Homepage') AS 'url' ...
Type: string
......@@ -880,15 +907,15 @@ Syntax
There is a set of **variables** that will get replace before the SQL-Query gets executed:
Column values of the recent rows: ~<level>.<columnname>
Column values of the recent rows: {{<level>.<columnname>}}
Global variables: ~global.<name>
Global variables: {{global.<name>}}
Sanitized URL (Post/Get) variables: ~url.<name>
Sanitized URL (Post/Get) variables: {{url.<name>}}
Row index and total rows: ~<level>.line.count|total
Row index and total rows: {{<level>.line.count}} or {{<level>.line.total}}
'last_insert_id' and 'affected_rows': ~<level>.line.total
'last_insert_id' and 'affected_rows': {{<level>.line.total}} (*total* have a different meaning, depending of the type of the SQL command)
See ?Variables for a full list of all available variables.
......@@ -900,7 +927,8 @@ Syntax
* In general, all columns of all rows will be printed out sequentially.
On a per column base, printing of columns can be suppressed. This might be useful to select values which will be accesed later on in another query via the ~level.columnname variable. To suppress printing of a column, use a
On a per column base, printing of columns can be suppressed. This might be useful to select values which will be
accessed later on in another query via the {{level.columnname}} variable. To suppress printing of a column, use a
underscore as column name prefix.
Reserved column names have a special meaning and will be processed in a special way. See ?Processing of columns in the SQL result for details.
......@@ -918,10 +946,10 @@ See the example below:
::
10.sql = SELECT id as _person_id, concat(first_name, " ", last_name, " ") as name FROM person
10.sql = SELECT id AS person_id, CONCAT(first_name, " ", last_name, " ") AS name FROM person
10.sep = <br />
10.10.sql = SELECT concat(postal_code, " ", city) FROM address WHERE p_id = ~10._person_id
10.10.sql = SELECT CONCAT(postal_code, " ", city) FROM address WHERE p_id = {{10.person_id}}
10.10.rbeg = (
10.10.rend = )
......@@ -942,10 +970,7 @@ This would result in
Columns of the upper level result can be accessed via variables, eg. ~10._person_id will be replaced by the value in the _person_id column.
Certain column names have a special meaning. Their content will be processes in a special way. For example columns with a leading _ in their name will not get displayed, their content will only be available as variables (see _person_id in
the example above).
Columns of the upper level result can be accessed via variables, eg. {{10.person_id}} will be replaced by the value in the person_id column.
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|**Levels** |A report is divided into levels. Example 1 has 3 levels **10**, **20.20**, **20.30.10** |
......@@ -975,11 +1000,11 @@ Report Example 1:
# Displays current date
10.sql = SELECT CURDATE()
# Show all students from the person table (_p_id won't be shown because of the leading underscore)
20.sql = SELECT p.id AS _p_id, p.first_name, " - ", p.last_name FROM person AS p WHERE p.typ LIKE "student"
# Show all students from the person table
20.sql = SELECT p.id AS p_id, p.first_name, " - ", p.last_name FROM person AS p WHERE p.typ LIKE "student"
# Show all the marks from the current student ordered chronological
20.20.sql = SELECT e.mark FROM exam AS e WHERE e.p_id=~20._p_id ORDER BY e.date
20.20.sql = SELECT e.mark FROM exam AS e WHERE e.p_id={{20.p_id}} ORDER BY e.date
# This query will never be fired, cause there is no direct parent called 20.30.
20.30.10.sql = SELECT 'never fired'
......@@ -1000,10 +1025,10 @@ Processing of columns in the SQL result
* The content of all columns of all rows will be printed sequentially, without separator.
* Rows with `Special column names`_ will be processed in a special way.
* Column names, which start with a '_', will not be printed. This is useful if you only want to access the content of
some columns during later on via the ~<level>.<column> variable but don't want to print the content of those columns.
some columns during later on via the {{<level>.<column>}} variable but don't want to print the content of those columns.
Special column names
********************
--------------------
* The input parameters for the processing function are stored as as column values.
* Single parameters are delimited by the '|' character.
......@@ -1013,7 +1038,7 @@ Special column names
* or by a **one character qualifier** followed by the : character, placed in front of the actual parameter value.
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|**Special column name** | **Purpose** |
|**Special column name** | **Purpose** |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|_<someName> |Suppress output. Column names with leading underscore are used to select data from the database and make it available in other parts of the report without generating any output. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
......@@ -1036,7 +1061,7 @@ Special column names
Column: link
************
^^^^^^^^^^^^
{{url | display | **i (intern)**, e(extern) | **- (same)**,n (new), p (parent), t(top) | **-**, (e(edit), c(copy), n(new), d(delete), i(insert) , f(file)) }}
......@@ -1129,51 +1154,51 @@ Column: link
Link Examples
'''''''''''''
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SQL-Query |Result |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"m:info@example.com"aslink |info@example.com as linked text, encrypted with javascript, class=external |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"m:info@example.com|c:0"aslink |info@example.com as linked text, not encrypted, class=external |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"m:info@example.com|P:mail.gif"aslink |info@example.com as linked image mail.gif, encrypted with javascript, class=external |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"m:info@example.com|P:mail.gif|o:sendmail"aslink |*info@example.com*_ as linked image mail.gif, encrypted with javascript, class=external, tooltip: "sendmail" |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"m:info@example.com|t:mailtoinfo@example.com|o:sendmail"aslink|'mail to *info@example.com*_' as linked text, encrypted with javascript, class=external |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"u:www.example.com"aslink |www.example as link, class=external |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"u:http://www.example.com"aslink |*http://www.example*_ as link, class=external |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"u:www.example.com|q:Pleaseconfirm"aslink |www.example as link, class=external, ?JavaScript Window which has to be confirmed with click on 'ok' |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"u:www.example.com|c:i"aslink |*http://www.example*_ as link, class=internal |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"u:www.example.com|c:nicelink"aslink |*http://www.example*_ as link, class=nicelink |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"p:form_person|c:e"aslink |<a class="external" href="?form_person">Text</a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"p:form_person&S_person=Text|t:Person"aslink |<a class="internal" href="?form_person&S_person=Text">Person</a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"p:form_person|e"aslink |<a class="internal" href="?form_person"><img alttext="Edit" src="fileadmin/typo3conf/ext/formreport/icons/edit.gif"></a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"p:form_person|e|g:_blank"aslink |<a target="_blank" class="internal" href="?form_person"><img alttext="Edit" src="fileadmin/typo3conf/ext/formreport/icons/edit.gif"></a>|
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"p:form_person|C"aslink |<a class="internal" href="?form_person"><img alttext="Check" src="fileadmin/typo3conf/ext/formreport/icons/checked-green.gif"></a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"p:form_person|C:green"aslink |<a class="internal" href="?form_person"><img alttext="Check" src="fileadmin/typo3conf/ext/formreport/icons/checked-green.gif"></a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"A:p:form_person|G:C"aslink |<a class="internal" href="?form_person"><img alttext="Check" src="fileadmin/typo3conf/ext/formreport/icons/checked-green.gif"></a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|select"A:u:www.example.com|G:P:home.gif|t:Home"aslink |<a class="internal" href="?form_person"><img alttext="Check" src="ffileadmin/typo3conf/ext/formreport/icons/home.gif">Home</a> |
+--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
^^^^^^^^^^^^^
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SQL-Query |Result |
+=======================================================================+========================================================================================================================================+
|SELECT "m:info@example.com" AS link |info@example.com as linked text, encrypted with javascript, class=external |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "m:info@example.com|c:0" AS link |info@example.com as linked text, not encrypted, class=external |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "m:info@example.com|P:mail.gif" AS link |info@example.com as linked image mail.gif, encrypted with javascript, class=external |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "m:info@example.com|P:mail.gif|o:sendmail" AS link |*info@example.com* as linked image mail.gif, encrypted with javascript, class=external, tooltip: "sendmail" |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "m:info@example.com|t:mailtoinfo@example.com|o:sendmail" AS link|'mail to *info@example.com*' as linked text, encrypted with javascript, class=external |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "u:www.example.com" AS link |www.example as link, class=external |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "u:http://www.example.com" AS link |*http://www.example* as link, class=external |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "u:www.example.com|q:Pleaseconfirm" AS link |www.example as link, class=external, ?JavaScript Window which has to be confirmed with click on 'ok' |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "u:www.example.com|c:i" AS link |*http://www.example* as link, class=internal |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "u:www.example.com|c:nicelink" AS link |*http://www.example* as link, class=nicelink |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|c:e" AS link |<a class="external" href="?form_person">Text</a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person&S_person=Text|t:Person" AS link |<a class="internal" href="?form_person&S_person=Text">Person</a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|e" AS link |<a class="internal" href="?form_person"><img alttext="Edit" src="fileadmin/typo3conf/ext/formreport/icons/edit.gif"></a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|e|g:_blank" AS link |<a target="_blank" class="internal" href="?form_person"><img alttext="Edit" src="fileadmin/typo3conf/ext/formreport/icons/edit.gif"></a>|
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|C" AS link |<a class="internal" href="?form_person"><img alttext="Check" src="fileadmin/typo3conf/ext/formreport/icons/checked-green.gif"></a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|C:green" AS link |<a class="internal" href="?form_person"><img alttext="Check" src="fileadmin/typo3conf/ext/formreport/icons/checked-green.gif"></a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "A:p:form_person|G:C" AS link |<a class="internal" href="?form_person"><img alttext="Check" src="fileadmin/typo3conf/ext/formreport/icons/checked-green.gif"></a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "A:u:www.example.com|G:P:home.gif|t:Home" AS link |<a class="internal" href="?form_person"><img alttext="Check" src="ffileadmin/typo3conf/ext/formreport/icons/home.gif">Home</a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
Columns: pageX & PageX
**********************
^^^^^^^^^^^^^^^^^^^^^^
These columns provide a shortcut version of the link interface to use for fast creation of internal links. The colum name
is composed of the string *page* and a optional character to specify the type of the link.
......@@ -1185,10 +1210,9 @@ automatic hash to be used by the forms
::
select "[options]" as page[<link type>]
where
SELECT "[options]" AS page[<link type>]
[options] = [<page>]|[<record id>]|[<text>]|[<tooltip>]|[<msgbox>]|[<class>]|[<target>]|[<render mode>]|[<create hash>]
with: [options] = [<page>]|[<record id>]|[<text>]|[<tooltip>]|[<msgbox>]|[<class>]|[<target>]|[<render mode>]|[<create hash>]
<link type> = c,d,e,h,i,n,s
......@@ -1229,7 +1253,7 @@ below.
+-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+
|**Parameter**|**Description** |**Default value** |Example |
+-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+
|<page> |TYPO3 page id or page alias. |The current page: *~pageId* |45 application application&N_param1=1045 |
|<page> |TYPO3 page id or page alias. |The current page: *{{pageId}}* |45 application application&N_param1=1045 |
+-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+
|<recordid> |Effective Record ID stored in hash array. |<empty> |7011 |
+-------------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------+---------------------------------------------------------------+
......@@ -1254,7 +1278,7 @@ below.
Column: vertical
****************
^^^^^^^^^^^^^^^^
Render text vertically. This is useful for tables with limited column width. The vertical rendering is achieved via CSS tranformations (rotation) defined in the style attribute of the wrapping tag. You can optionally specify the rotation
angle.
......@@ -1264,7 +1288,7 @@ angle.
::
select "<text>|[<angle>]|[<width>]|[<height>]|[<wrap tag>]" as vertical
SELECT "<text>|[<angle>]|[<width>]|[<height>]|[<wrap tag>]" AS vertical
..
......@@ -1290,7 +1314,7 @@ angle.
::
10.sql = select "Hallo" as vertical
10.sql = SELECT "Hallo" AS vertical
..
......@@ -1301,15 +1325,15 @@ angle.
::
10.sql = select "Hallo|90" as vertical
20.sql = select "Hallo|90|3em|7em|span" as vertical
10.sql = SELECT "Hallo|90" as vertical
20.sql = SELECT "Hallo|90|3em|7em|span" AS vertical
..
Column: mailto
**************
^^^^^^^^^^^^^^
Easily create Email links.
......@@ -1318,7 +1342,7 @@ Easily create Email links.
::
select "<email address>|[<link text>]" as mailto
SELECT "<email address>|[<link text>]" AS mailto
..
......@@ -1340,7 +1364,7 @@ Easily create Email links.
::
10.sql = select "john.doe@example.com" as mailto
10.sql = SELECT "john.doe@example.com" AS mailto
..
......@@ -1351,14 +1375,14 @@ Easily create Email links.
::
10.sql = select "john.doe@example.com|John Doe" as mailto
10.sql = select "john.doe@example.com|John Doe" AS mailto
..
Column: sendmail
****************
^^^^^^^^^^^^^^^^
Send simple plain text emails. Every mail will be logged in the mail log. The logfile can be configured in ext_localconf.php via $TYPO3_CONF_VARS[$_EXTKEY]['log']['mail'].
......@@ -1367,7 +1391,7 @@ Send simple plain text emails. Every mail will be logged in the mail log. The lo
::
select "receiver@domain.com[:john doe],receiver2@domain.com[:jane doe]|sender@domain.com[:willi wutzmann]|subject|body" as sendmail
SELECT "receiver@domain.com[:john doe],receiver2@domain.com[:jane doe]|sender@domain.com[:willi wutzmann]|subject|body" AS sendmail
..
......@@ -1391,7 +1415,7 @@ Send simple plain text emails. Every mail will be logged in the mail log. The lo
::
10.sql = select "john.doe@example.com|company@example.com|Latest News|The new version of FormReport is now available." as sendmail
10.sql = SELECT "john.doe@example.com|company@example.com|Latest News|The new version of FormReport is now available." AS sendmail
..
......@@ -1404,7 +1428,7 @@ This will send an email with subject *Latest News* from company@example.com to j
::
10.sql = select "customer1@example.com, customer2@example.com|company@example.com|Latest News|The new version of FormReport is now available." as sendmail
10.sql = SELECT "customer1@example.com, customer2@example.com|company@example.com|Latest News|The new version of FormReport is now available." AS sendmail
..
......@@ -1413,7 +1437,7 @@ This will send an email with subject *Latest News* from company@example.com to j
This will send an email with subject *Latest news* from company@example.com to customer1@example.com and to customer2@example.com.
Column: advancedmail
********************
^^^^^^^^^^^^^^^^^^^^
Send plain text/html emails. This is identical to ?t#Column:_sendmail, but allows to additionaly set the cc:, bcc: and reply-to: -headers. Every mail will be logged in the mail log. The logfile can be configured in ext_localconf.php via
$TYPO3_CONF_VARS[$_EXTKEY]['log']['mail'].
......@@ -1423,7 +1447,7 @@ $TYPO3_CONF_VARS[$_EXTKEY]['log']['mail'].
::
select "receiver@domain.com[:john doe],receiver2@domain.com[:jane doe]|sender@domain.com[:willi wutzmann]|subject|cc1@domain.com[:willi wutzmann]|bcc1@domain.com[:george wutzmann]|replyto@domain.com[:Support-Desk]|format|body" as sendmail
SELECT "receiver@domain.com[:john doe],receiver2@domain.com[:jane doe]|sender@domain.com[:willi wutzmann]|subject|cc1@domain.com[:willi wutzmann]|bcc1@domain.com[:george wutzmann]|replyto@domain.com[:Support-Desk]|format|body" AS sendmail
..
......@@ -1451,7 +1475,7 @@ $TYPO3_CONF_VARS[$_EXTKEY]['log']['mail'].
Column: img
***********
^^^^^^^^^^^
Render images. Allows to define a alternative text and a title attribute for the image. Alternative text and title text are optional.
......@@ -1464,7 +1488,7 @@ Render images. Allows to define a alternative text and a title attribute for the
::
select "<path to image>|[<alt text>]|[<title text>]" as img
SELECT "<path to image>|[<alt text>]|[<title text>]" AS img
..
......@@ -1486,7 +1510,7 @@ Render images. Allows to define a alternative text and a title attribute for the
::
10.sql = select "fileadmin/img/img.jpg" as img
10.sql = SELECT "fileadmin/img/img.jpg" AS img
..
......@@ -1497,21 +1521,21 @@ Render images. Allows to define a alternative text and a title attribute for the
::
10.sql = select "fileadmin/img/img.jpg|Aternative Text" as img # alt="Alternative Text, no title
20.sql = select "fileadmin/img/img.jpg|Aternative Text|" as img # alt="Alternative Text, no title
30.sql = select "fileadmin/img/img.jpg|Aternative Text|Title Text" as img # alt="Alternative Text, title="Title Text"
40.sql = select "fileadmin/img/img.jpg|Alternative Text" as img # alt="Alternative Text", no title
50.sql = select "fileadmin/img/img.jpg" as img # empty alt, no title
60.sql = select "fileadmin/img/img.jpg|" as img # empty alt, no title
70.sql = select "fileadmin/img/img.jpg||Title Text" as img # empty alt, title="Title Text"
80.sql = select "fileadmin/img/img.jpg||" as img # empty alt, no title
10.sql = SELECT "fileadmin/img/img.jpg|Aternative Text" AS img # alt="Alternative Text, no title
20.sql = SELECT "fileadmin/img/img.jpg|Aternative Text|" AS img # alt="Alternative Text, no title
30.sql = SELECT "fileadmin/img/img.jpg|Aternative Text|Title Text" AS img # alt="Alternative Text, title="Title Text"
40.sql = SELECT "fileadmin/img/img.jpg|Alternative Text" AS img # alt="Alternative Text", no title
50.sql = SELECT "fileadmin/img/img.jpg" AS img # empty alt, no title
60.sql = SELECT "fileadmin/img/img.jpg|" AS img # empty alt, no title
70.sql = SELECT "fileadmin/img/img.jpg||Title Text" AS img # empty alt, title="Title Text"
80.sql = SELECT "fileadmin/img/img.jpg||" AS img # empty alt, no title
..
Column: exec
************
^^^^^^^^^^^^
Runs batch files or excutables on the webserver. In case of an error, returncode and errormessage will be returned.
......@@ -1538,15 +1562,15 @@ Runs batch files or excutables on the webserver. In case of an error, returncode
::
10.sql = select "ls -s" as exec
20.sql = select "./batchfile.sh" as exec
10.sql = SELECT "ls -s" AS exec
20.sql = SELECT "./batchfile.sh" AS exec
..
Column: F
*********
^^^^^^^^^
Challenge 1
'''''''''''
......@@ -1557,7 +1581,7 @@ Due to the limitations of MySQL, reserved column names can't be further concaten
# This is valid:
10.sql = select concat("/static/directory/", p.foto) as img from person as p where...
10.sql = SELECT concat("/static/directory/", p.foto) AS img FROM person AS p WHERE ...
# Returns:
<img src=...>
......@@ -1572,7 +1596,7 @@ Now assume you want to wrap the image in a div tag:
# This is valid:
10.sql = select "<div>", concat("/static/directory/", p.foto) as img, "</div>" from person as p where...
10.sql = SELECT "<div>", CONCAT("/static/directory/", p.foto) AS img, "</div>" FROM person AS p WHERE ...
# Returns: