Add CSV to dist config
[bdrem.git] / data / bdrem.config.php.dist
index 87d01fc3628c2ad9a032df6935d673a899ac0ad4..3689d1bb4a916c526570d3e6080d61d04c33c40f 100644 (file)
@@ -1,6 +1,64 @@
 <?php
+//source: birthday file
 $source = array('Bdf', '/path/to/birthday.bdf');
-$daysBefore = 3;
-$daysAfter = 14;
+
+//Source: CSV file (simple)
+$source = array('Csv', '/path/to/file.csv');
+
+//Source: CSV file (complex)
+$source = array(
+    'Csv',
+    array(
+        'filename' => '/path/to/file.csv',
+        'columns' => array(
+            'name'  => 0,
+            'event' => 1,
+            'date'  => 2
+        ),
+        'firstLineIsHeader' => true,
+        'defaultEvent' => 'Birthday',
+        'separator' => ',',
+    )
+);
+
+//Source: SQL database
+$source = array(
+    'Sql',
+    array(
+        'dsn' => 'mysql:dbname=bdrem;host=127.0.0.1',
+        'user' => 'FIXME',
+        'password' => 'FIXME',
+        'table' => 'contacts',
+        'fields' => array(
+            'date' => array(
+                //column name => event title
+                'c_birthday' => 'Birthday'
+            ),
+            //column with name, or array with column names
+            'name' => array('c_name'),
+            //sprintf-compatible name formatting instruction
+            'nameFormat' => '%s',
+        )
+    )
+);
+
+//Source: LDAP
+$source = array(
+    'Ldap',
+    array(
+        'host'   => 'ldap.example.org',
+        'basedn' => 'ou=adressbuch,dc=example,dc=org',
+        'binddn' => 'cn=FIXME,ou=users,dc=example,dc=org',
+        'bindpw' => 'FIXME'
+    )
+);
+
+
+$daysPrev = 3;
+$daysNext = 14;
 $locale = 'de_DE.UTF-8';
+
+//email settings
+$mail_from = 'birthday@example.org';
+$mail_to = array('a@example.org', 'b@example.org');
 ?>