[Vtigercrm-developers] custom module settings

Adam Heinz amh at metricwise.net
Wed Oct 24 13:19:25 PDT 2012


What do folks generally do when they want to provide some
configuration switches to their custom modules?  I found myself
writing similar code for a few of our modules, so I now have a
prototype modification to modules/Vtiger/Settings.php that grants
common access to the vtiger_tab_settings table [1], which acts both as
a sort of vtiger_field configuration table, but also holds the
fieldvalue.  I've cribbed some code from DisplayFields.tpl and
Settings.tpl such that it's starting to self-configure based on
uitype, which is nice.  Has anyone else done something like this?  I'm
doing this work in our 5.4.0 migration branch, so it should be easily
converted into a patch, if there is any interest.

[1]
mysql> select * from vtiger_tab_settings;
+---------+-----------------------+-----------------------+---------------+-------+------------+--------+
| fieldid | fieldname             | fieldlabel            | fieldvalue
   | tabid | typeofdata | uitype |
+---------+-----------------------+-----------------------+---------------+-------+------------+--------+
|       1 | estimate_datefield    | Estimate Date Field   |
contract_date |    43 | V~M        |     16 |
|       2 | alternate_permissions | Alternate Permissions | on
   |    45 | C~M        |     56 |
+---------+-----------------------+-----------------------+---------------+-------+------------+--------+


More information about the vtigercrm-developers mailing list