Index.rst 6.55 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
23
24
25
26
27
28
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

29
30
31
32
33
34
35
36
37
38
39
40
Setup
-----

* Install the extension via the Extensionmanager.
* Rename the file *<ext_dir>/config.example.ini* to *<ext_dir>/config.ini* and configure the necessary values: `<ext_dir>/config.ini`_
* Play the SQL File *<ext_dir>/qfq/sql/formEditor.sql* to fill the database with the *FormEditor* records.
* Configure Typoscript to include Bootstrap, jQuery and QFQ javascript and CSS files.

::

	page.includeCSS {

41
42
43
44
45
		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
		file4 = typo3conf/ext/qfq/Resources/Public/Css/jqx.darkblue.css
		file5 = typo3conf/ext/qfq/Resources/Public/Css/qfq-bs.css
46
47
48
49
	}

	page.includeJS {

50
51
52
53
54
55
		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
		file5 = typo3conf/ext/qfq/Resources/Public/JavaScript/EventEmitter.min.js
		file6 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.debug.js
56
57
58
59
60
61
62
63
64
	}

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:

::

  form = {{form}}
65
66
67
68
69
70
71
72
73
  10 {
    sql = SELECT CONCAT('{{pageId}}&form=Form&r=', f.id) as Pagee, f.id, f.name, f.title, f.tableName FROM FormEditor As f ORDER BY f.name
    head = <br><table class="table">
    tail = </table>
    rbeg = <tr class="table-hover">
    rend = </tr>
    fbeg = <td>
    fend = </td>
  }
74
75
76
77

<ext_dir>/config.ini
--------------------

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
+------------------------+----------------------------------+----------------------------------------------------------------------------+
| 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                    |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
105
106
| DATE_FORMAT            | DATE_FORMAT= yyyy-mm-dd          | Possible options: yyyy-mm-dd, dd.mm.yyyy                                   |
+------------------------+----------------------------------+----------------------------------------------------------------------------+
107

108
Example: *<ext_dir>/config.ini*
109
110
111

::

112
113
114
115
116
117
118
	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
119
120
121
	SHOW_DEBUG_INFO = auto
	CSS_LINK_CLASS_INTERNAL = internal
	CSS_LINK_CLASS_EXT = external