<div dir="ltr"><div><div><div>Hello,<br><br></div>I am trying to add parameters in the "my preferences", that could be used in order to activate/deactivate customizations.<br><br></div>From my understanding, this is best done with a module extension. So I created the bootstrap code to be run in order to modify the database. <br>
<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><?php<br>include_once('vtlib/Vtiger/Module.php');<br>$module = new Vtiger_Module();<br>
$module->name = 'Users';<br>$module->id = 29;<br>$module->save();<br>// Initialize all the tables required<br>$module->initTables();<br>// Add the basic module block<br>$block1 = new Vtiger_Block();<br>
$block1->label = 'Personal Config';<br>$module->addBlock($block1);<br>/** Create required fields and add to the block */<br>$field1 = new Vtiger_Field();<br>$field1->name = 'rail1';<br>$field1->table = $module->basetable;<br>
$field1->column = 'rail1';<br>$field1->label = 'Activity rail1';<br>$field1->columntype = 'VARCHAR(255)';<br>$field1->uitype = 33;<br>$field1->typeofdata = 'V~M';<br>$field1->setPicklistValues( Array ('rail', 'Todo') );<br>
$field1->defaultvalue ='rail';<br>$block1->addField($field1);<br>?><br></blockquote><br></div>By forcing<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
$module->name = 'Users';<br>$module->id = 29;</blockquote><div><br></div><div>the modification will occur on the vtiger_users table, which is what I am trying to do.<br><br></div><div>Questions:<br></div><div>
- is this the proper way to extend a module like users?<br></div><div>- the modification is not extracted via the module manager. So that means I cannot distribute this user table change.<br><br></div><div>What should be the right approach?<br>
<br></div><div>Thanks, Joel <br></div><br><br></div>