<div dir="ltr">@Alan<div><br></div><div>The console is okay for new module creation. We are talking of already developed modules.</div><div>Viz folks who may have already built extensions and other nice stuff.</div><div><br></div><div>Thanks, should be easy enough to fix when we have the time.</div><div><br></div><div>Regards</div><div>ST</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 9, 2016 at 8:31 PM, Matteo Baranzoni <span dir="ltr"><<a href="mailto:info@greenbitweb.com" target="_blank">info@greenbitweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">i try to import module with this php script and it works: <div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><?php<br>/*+***************************<wbr>******************************<wbr>*************************<br> * The contents of this file are subject to the vtiger CRM Public License Version 1.0<br> * ("License"); You may not use this file except in compliance with the License<br> * The Original Code is:  vtiger CRM Open Source<br> * The Initial Developer of the Original Code is vtiger.<br> * Portions created by vtiger are Copyright (C) vtiger.<br> * All Rights Reserved.<br> *****************************<wbr>******************************<wbr>*************************/<br>$Vtiger_Utils_Log = true;<br>include_once 'vtlib/Vtiger/Module.php';<br>include_once 'vtlib/Vtiger/Package.php';<br>include_once 'includes/main/WebUI.php';<br>require_once('vtlib/Vtiger/<wbr>Block.php');<br>require_once('vtlib/Vtiger/<wbr>Field.php');<br>include_once 'include/Webservices/Utils.<wbr>php';<br>require_once 'modules/ModComments/<wbr>ModComments.php';<br>include_once('modules/<wbr>ModTracker/ModTracker.php');<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                 </span>$path = "Accounting.zip";<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                      </span>$package = new Vtiger_Package();<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                 </span>$module  = $package-><wbr>getModuleNameFromZip($path);<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                 <br></span><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                 </span>$moduleInstance = Vtiger_Module::getInstance($<wbr>module);<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>if ($moduleInstance) {<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                           </span>echo "ERROR: Module $module already exists!\n";<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>} else {<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                         </span>echo "Importing ...";<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                          </span>$package->import($path);<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                              </span>echo "DONE.\n";<br><span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span>}<span class="m_-7377872862959080237gmail-Apple-tab-span" style="white-space:pre-wrap">  </span><br>$moduleInstance = Vtiger_Module::getInstance('<wbr>Accounting');<br>ModTracker::<wbr>enableTrackingForModule($<wbr>moduleInstance->id);<br>$commentsModule = Vtiger_Module::getInstance('<wbr>ModComments');<br>$fieldInstance = Vtiger_Field::getInstance('<wbr>related_to', $commentsModule);<br>$fieldInstance-><wbr>setRelatedModules(array('<wbr>Accounting'));</blockquote><div><br></div><div>my accounting module does not work well but it's inventory based module with some js extra features.</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-12-09 14:49 GMT+01:00 Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 09/12/16 13:46, Alan Lord wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Copy the file from the old layout and rename it...<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
sudo cp<br>
../../../../vlayout/modules/Se<wbr>ttings/ModuleManager/ImportUse<wbr>rModuleStep1.tpl<br>
Step1.tpl<br>
</blockquote>
<br>
But do remember to backup Step1.tpl first<br>
</blockquote>
<br></span>
PS: The javascript is broken so it still won't work ;-)<br>
<br>
Didn't the vtiger Console "Import Module" feature work?<br>
<br>
<a href="http://community.vtiger.com/help/vtigercrm/developers/vtlib/console-tool.html#import-module" rel="noreferrer" target="_blank">http://community.vtiger.com/he<wbr>lp/vtigercrm/developers/vtlib/<wbr>console-tool.html#import-modul<wbr>e</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">With best regards,<br><br>S.T.Prasad<br><br><a href="http://www.vtigress.com" target="_blank">http://www.vtigress.com</a><br>The Purr-fect mate for vTiger<br></div>
</div>