Index.rst 11.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.

.. include:: ../Includes.txt


.. _admin-manual:

Administrator Manual
====================

14
15
16
Preparation
-----------

17
The QFQ extension needs in PHP 5.x the PHP MySQL native driver. The following functions are used and are only available with the
18
19
20
21
22
native driver (see also: http://dev.mysql.com/downloads/connector/php-mysqlnd/):

* mysqli::get_result (important),
* mysqli::fetch_all (nice to use)

23
24
25
26
To normalize UTF8 input, the *php5-intl* resp. *php7.0-intl* package is needed by

* normalizer::normalize()

27
Preparation for Ubuntu 14.04::
28

29
	sudo apt-get install php5-mysqlnd php5-intl
30
31
32
	sudo php5enmod mysqlnd
	sudo service apache2 restart

33
34
Preparation steps for Ubuntu 16.04::

Carsten  Rose's avatar
Carsten Rose committed
35
	sudo apt install php7.0-intl
36

37
38
39
40
Setup
-----

* Install the extension via the Extensionmanager.
41
42

  * If you install the extension by manual download/upload and get an error message
43
    "can't activate extension": rename the downloaded zip file to `qfq.zip` or `qfq_<version>.zip` (e.g. version: 0.9.1).
44

45
46
47
  * If the Extensionmanager stops after importing: check your memory limit in php.ini.

* Enable the online Documentation_.
48
49
50
* Copy/rename the file *<Documentroot>/typo3conf/ext/<ext_dir>/config.example.qfq.ini* to
  *<Documentroot>/typo3conf/config.qfq.ini* and configure the necessary values: `config.qfq.ini`_
  The configuration file is outside the extension directory to not loose it during updates.
51
* Play the SQL File *<ext_dir>/qfq/sql/formEditor.sql* to fill the database with the *FormEditor* records.
52
* Configure Typoscript to include Bootstrap, jQuery, QFQ javascript and CSS files.
53
54
55

::

56
57
58
59
60
61
	page.meta {
	  X-UA-Compatible = IE=edge
	  X-UA-Compatible.attribute = http-equiv
	  viewport=width=device-width, initial-scale=1
	}

62
63
	page.includeCSS {

64
65
66
		file1 = typo3conf/ext/qfq/Resources/Public/Css/bootstrap.min.css
		file2 = typo3conf/ext/qfq/Resources/Public/Css/bootstrap-theme.min.css
		file3 = typo3conf/ext/qfq/Resources/Public/Css/jqx.base.css
Carsten  Rose's avatar
Carsten Rose committed
67
		file4 = typo3conf/ext/qfq/Resources/Public/Css/jqx.bootstrap.css
68
		file5 = typo3conf/ext/qfq/Resources/Public/Css/qfq-bs.css
69
70
71
72
	}

	page.includeJS {

73
74
75
76
		file1 = typo3conf/ext/qfq/Resources/Public/JavaScript/jquery.min.js
		file2 = typo3conf/ext/qfq/Resources/Public/JavaScript/bootstrap.min.js
		file3 = typo3conf/ext/qfq/Resources/Public/JavaScript/validator.min.js
		file4 = typo3conf/ext/qfq/Resources/Public/JavaScript/jqx-all.js
77
78
79
80
		file5 = typo3conf/ext/qfq/Resources/Public/JavaScript/globalize.js
		file6 = typo3conf/ext/qfq/Resources/Public/JavaScript/tinymce.min.js
		file7 = typo3conf/ext/qfq/Resources/Public/JavaScript/EventEmitter.min.js
		file8 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js
81
82
	}

83

84
85
86
87
88
89
FormEditor
----------
Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content record of type *qfq*. In the bodytext insert the following code:

::

90
91
	# If there is a form given by SIP: show
	form={{form:S}}
92
93

	10 {
94
		# List of Forms: Do not show this list of forms if there is a form given by SIP.
95
96
97
98
99
100
101
102
103
104
		# Table header.
		sql = SELECT CONCAT('{{pageId:T}}&form=Form&') as Pagen, '#', 'Name', 'Title', 'Table' FROM (SELECT 1) AS fake WHERE  '{{form:SE}}'=''
		head = <table class="table table-hover">
		tail = </table>
		rbeg = <thead><tr>
		rend = </tr></thead>
		fbeg = <th>
		fend = </th>

		10 {
105
106
			# All forms
			sql = SELECT CONCAT('{{pageId:T}}&form=Form&r=', f.id) as Pagee, f.id, f.name, f.title, f.tableName, CONCAT('form=Form&r=', f.id) as Paged FROM Form AS f  ORDER BY f.name
107
108
109
110
111
112
			rbeg = <tr>
			rend = </tr>
			fbeg = <td>
			fend = </td>
		}
	}
113

Carsten  Rose's avatar
Carsten Rose committed
114
.. _config-qfq-ini:
115

116
config.qfq.ini
117
--------------
118

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| 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                                             |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DB_INIT                     | DB_INIT=set names utf8                  | Global init for using the database.                                        |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| 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_INTERNA    L | 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                    |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_CLASS_QFQ_CONTAINER     |CSS_CLASS_QFQ_CONTAINER=container        | QFQ with own Bootstrap: 'container'.                                       |
|                             |                                         | QFQ already nested in Bootstrap of mainpage: <empty>                       |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_CLASS_QFQ_FORM_PILL     |CSS_CLASS_QFQ_FORM_PILL=qfq-color-grey-1 | Wrap around title bar for pills: CSS Class, typically a background color   |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_CLASS_QFQ_FORM_BODY     |CSS_CLASS_QFQ_FORM_BODY=qfq-color-grey-2 | Wrap around formelements: CSS Class, typically a background color          |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DATE_FORMAT                 | DATE_FORMAT= yyyy-mm-dd                 | Possible options: yyyy-mm-dd, dd.mm.yyyy                                   |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_PATTERN_ERROR     |FORM_DATA_PATTERN_ERROR=please check pa. | Customizable error message used in validator.js. 'pattern' violation       |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_REQUIRED_ERROR    |FORM_DATA_REQUIRED_ERROR=missing value   | Customizable error message used in validator.js. 'required' fields         |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_MATCH_ERROR       |FORM_DATA_MATCH_ERROR=type error         | Customizable error message used in validator.js. 'match' retype mismatch   |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_ERROR             |FORM_DATA_ERROR=generic error            | Customizable error message used in validator.js. 'no specific' given       |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
163
| FORM_BUTTON_ON_CHANGE_CLASS | FORM_BUTTON_ON_CHANGE_CLASS=alert-info btn-info | Color for save button after modification                           |
164
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
165
166


167

168
Example: *typo3conf/config.qfq.ini*
169
170
171

::

Carsten  Rose's avatar
Carsten Rose committed
172
	; To get internal default values, inactivate the option by commenting (= ';') it.
173
174
175
176
	DB_USER = qfqUser
	DB_SERVER = localhost
	DB_PASSWORD = 12345678
	DB_NAME = qfq_db
177
	DB_INIT = set names utf8
178
	SQL_LOG = sql.log
179
180
	SHOW_DEBUG_INFO = auto
	CSS_LINK_CLASS_INTERNAL = internal
181
	CSS_LINK_CLASS_EXT = external
Carsten  Rose's avatar
Carsten Rose committed
182
183
184
185
186
187
188
189
	;CSS_CLASS_QFQ_CONTAINER =
	;CSS_CLASS_QFQ_FORM =
	CSS_CLASS_QFQ_FORM_PILL = qfq-color-grey-1
	CSS_CLASS_QFQ_FORM_BODY = qfq-color-grey-2
	;FORM_DATA_PATTERN_ERROR =
	;FORM_DATA_REQUIRED_ERROR =
	;FORM_DATA_MATCH_ERROR =
	;FORM_DATA_ERROR =
190
191
192
	;FORM_BS_LABEL_COLUMNS = 3
	;FORM_BS_INPUT_COLUMNS = 6
	;FORM_BS_NOTE_COLUMNS = 3
193
194
195
196
197
198

Documentation
-------------

To render the QFQ reST documentation:

199
* Take care to have 'unzip' and 'Python setuptools' installed (necessary to run).
200
201
202

Preparation for Ubuntu 16.04::

Carsten  Rose's avatar
Carsten Rose committed
203
	sudo apt install unzip python-setuptools python-pip
204

205
206
207
208
209
210
211
212
* Install the extension "Sphinx Python Documentation Generator and Viewer" (sphinx).

  * Execute the update script (symbol 'two arrows as a circle' behind the extension name)
  * Choose 'Sphinx 1.4.4' - click on 'Import'.

* In the Exension Manager open the configuration dialog of the extension 'sphinx'. Activate the 'Sphinx 1.4.4' option and save it.
* On top of the browser window click on the 'question mark' to open the menu, choose 'Sphinx'.
* Show doumentation 'QFQ Extension'
Carsten  Rose's avatar
Carsten Rose committed
213
214

* If you have problems with the rendering, please check: http://mbless.de/blog/2015/01/26/sphinx-doc-installation-steps.html