Index.rst 9.18 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
17
18
19
20
21
22
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)

23
Preparation for Ubuntu 14.04::
24
25
26
27
28

	sudo apt-get install php5-mysqlnd
	sudo php5enmod mysqlnd
	sudo service apache2 restart

29
30
31
32
Preparation steps for Ubuntu 16.04::

	none

33
34
35
36
Setup
-----

* Install the extension via the Extensionmanager.
37
38

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

41
42
43
  * If the Extensionmanager stops after importing: check your memory limit in php.ini.

* Enable the online Documentation_.
44
45
46
* 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.
47
* Play the SQL File *<ext_dir>/qfq/sql/formEditor.sql* to fill the database with the *FormEditor* records.
48
* Configure Typoscript to include Bootstrap, jQuery, QFQ javascript and CSS files.
49
50
51
52
53

::

	page.includeCSS {

54
55
56
		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
57
		file4 = typo3conf/ext/qfq/Resources/Public/Css/jqx.bootstrap.css
58
		file5 = typo3conf/ext/qfq/Resources/Public/Css/qfq-bs.css
59
60
61
62
	}

	page.includeJS {

63
64
65
66
		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
Carsten  Rose's avatar
Carsten Rose committed
67
		file4 = typo3conf/ext/qfq/Resources/Public/JavaScript/tinymce.min.js
68
		file5 = typo3conf/ext/qfq/Resources/Public/JavaScript/EventEmitter.min.js
Carsten  Rose's avatar
Carsten Rose committed
69
		file6 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js
70
71
72
73
74
75
76
77
	}

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:

::

78
  form = {{form:T}}
79
  10 {
80
    sql = SELECT CONCAT('{{pageId}}&form=Form&r=', f.id) as Pagee, f.id, f.name, f.title, f.tableName FROM Form AS f ORDER BY f.name
81
82
83
84
85
86
87
    head = <br><table class="table">
    tail = </table>
    rbeg = <tr class="table-hover">
    rend = </tr>
    fbeg = <td>
    fend = </td>
  }
88

89

90
config.qfq.ini
91
--------------
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
+-------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| 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_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                    |
+-------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| 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                                   |
+-------------------------+-----------------------------------------+----------------------------------------------------------------------------+
129

130
Example: *typo3conf/config.qfq.ini*
131
132
133

::

134
135
136
137
138
	DB_USER = qfqUser
	DB_SERVER = localhost
	DB_PASSWORD = 12345678
	DB_NAME = qfq_db
	DB_NAME_TEST = qfq_db_test
139
	DB_INIT = set names utf8
140
	SQL_LOG = sql.log
141
142
	SHOW_DEBUG_INFO = auto
	CSS_LINK_CLASS_INTERNAL = internal
143
	CSS_LINK_CLASS_EXT = external
144
145
146
    CSS_CLASS_QFQ_CONTAINER =
    CSS_CLASS_QFQ_FORM_PILL = qfq-color-grey-1
    CSS_CLASS_QFQ_FORM_BODY = qfq-color-grey-2
147
148
149
150
151
152

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

To render the QFQ reST documentation:

153
* Take care to have 'unzip' and 'Python setuptools' installed (necessary to run).
154
155
156
157
158

Preparation for Ubuntu 16.04::

	sudo apt install unzip python-setuptools

159
160
161
162
163
164
165
166
* 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'