New Mandator

From i-doit documentation

Jump to: navigation, search

Contents

Creating a new mandator in three steps.

If you just want to create a new language for an existing mandator, you need to process step 3 only.

Don't forget to change the database name: 'idoit_new_mandator'. and mysql user root we used for this example.


Step 1. - Create a new database

Get a connection to your database:

mysql -uroot -p

Create your new mandator database:

create database idoit_new_mandator;

Step 2. - Import a dump of the i-doit data tables into your new database.

Switch to your idoit directory:

cd idoit-path/

Insert a fresh database (change idoit_new_mandator to the name you used for your new database in step one):

mysql -uroot -p -Didoit_new_mandator < setup/sql/idoit_data.sql

Don't forget to use also the most recent database updates from the directory 'patches'.

Step 3. - Insert a new mandator entry into your idoit system database

Get a connection to your database management system and select your i-doit system database:

mysql -uroot -p -Didoit_system_database

Modify the quoted fields (Replace mandanttitle with the name of your mandant) after the keyword VALUES before inserting, but dont remove these quotes.

Field description

  • isys_mandator__id = Auto generated ID of this recordset, leave this blank or set it to 'DEFAULT' without quotes
  • isys_mandator__title = Name of your mandator for the GUI
  • isys_mandator__description = Short description of this mandator
  • isys_mandator__dir_cache = Directory for caching in i-doit-dir/temp/
  • isys_mandator__dir_tpl = Your theme for users who are not logged in (Login window)
  • isys_mandator__db_host = IP of your MySQL Database
  • isys_mandator__db_port = Port of your MySQL Database (3306 is the default)
  • isys_mandator__db_name = MySQL Database name of newly created mandator
  • isys_mandator__db_user = User who has got read and write permissions to the mandator database
  • isys_mandator__db_pass = Password for this user
  • isys_mandator__sort = Here your can define a priority for sorting the mandator selection items in the i-doit GUI
  • isys_mandator__default_lang_const = The constant for the mandator's language. Currently there are two languages included: ISYS_LANGUAGE_ENGLISH and ISYS_LANGUAGE_GERMAN.
  • isys_mandator__short_lang = Short name of your language (Also displayed in GUI)
  • isys_mandator__active = Status. If this mandator should be activated, set this to 1, otherwize to 0

Insert a new mandator entry with english language:

INSERT INTO `isys_mandator` ( `isys_mandator__id` , `isys_mandator__title` , `isys_mandator__description` , `isys_mandator__dir_cache` , 
`isys_mandator__dir_tpl` , `isys_mandator__db_host` , `isys_mandator__db_port` , `isys_mandator__db_name` , `isys_mandator__db_user` , 
`isys_mandator__db_pass` , `isys_mandator__sort` , `isys_mandator__default_lang_const` , `isys_mandator__default_language_short` )
VALUES (DEFAULT, 'MandantTitle', NULL , 'cache_mandanttitle_without_spaces', 'default', 'db_ip', '3306', 'idoit_new_mandator', 'db_user', 'db_pass', 
'50', 'ISYS_LANGUAGE_ENGLISH', 'en');

Insert a new mandator entry with german language:

INSERT INTO `isys_mandator` ( `isys_mandator__id` , `isys_mandator__title` , `isys_mandator__description` , `isys_mandator__dir_cache` ,
`isys_mandator__dir_tpl` , `isys_mandator__db_host` , `isys_mandator__db_port` , `isys_mandator__db_name` , `isys_mandator__db_user` , 
`isys_mandator__db_pass` , `isys_mandator__sort` , `isys_mandator__default_lang_const` , `isys_mandator__default_language_short` )
VALUES (DEFAULT, 'MandantTitle', NULL , 'cache_mandanttitle_without_spaces', 'default', 'db_ip', '3306', 'idoit_new_mandator', 'db_user', 'db_pass', 
'50', 'ISYS_LANGUAGE_GERMAN', 'de');

Mandator - Table description:

<isys_mandator>
 <isys_mandator__id>1</isys_mandator__id>
 <isys_mandator__title>Your company name</isys_mandator__title>
 <isys_mandator__description>description</isys_mandator__description>
 <isys_mandator__dir_cache>cache_your_company</isys_mandator__dir_cache>
 <isys_mandator__dir_tpl>default</isys_mandator__dir_tpl>
 <isys_mandator__db_host>localhost</isys_mandator__db_host>
 <isys_mandator__db_port>3306</isys_mandator__db_port>
 <isys_mandator__db_name>idoit_data</isys_mandator__db_name>
 <isys_mandator__db_user>i-doit</isys_mandator__db_user>
 <isys_mandator__db_pass>we-doit</isys_mandator__db_pass>
 <isys_mandator__sort>1</isys_mandator__sort>
 <isys_mandator__default_lang_const>ISYS_LANGUAGE_GERMAN</isys_mandator__default_lang_const>
 <isys_mandator__default_language_short>de</isys_mandator__default_language_short>
</isys_mandator>

Grant access:

    GRANT ALL PRIVILEGES ON `isys_mandator__db_name` .  * TO 'isys_mandator__db_user'@'isys_mandator__db_host';

- You can also use another frontend than the mysql-client if you like.

Personal tools