<div>Hi,Joe</div>
<div>Thanks for you time and work, Joe!</div>
<div>You made main class independant of these related function. you also made modules of vtiger independant of save functions,getListQuery functions,module label functions,assigned_user_id functions and other functions.<br>
<br>&nbsp;</div>
<div><span class="gmail_quote">On 2/21/07, <b class="gmail_sendername">clement chazarra</b> &lt;<a href="mailto:chazarra.clement@gmail.com">chazarra.clement@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Thanks for your time and work Joe, I think this idea is marvelous, full of possibilities.. I hope there will be some echo about it from vTiger team.
<br><br>ByeBye 
<div><span class="e" id="q_110e19f038288c36_1"><br><br>
<div><span class="gmail_quote">On 2/20/07, <b class="gmail_sendername">Joe Bordes</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:joe@tsolucio.com" target="_blank">joe@tsolucio.com</a>&gt; wrote:
</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi all, <br><br>I am part of the Module Generator project on vtigerforge. I have been<br>assigned the task of designing the related functions from one module to
<br>another. The idea is to be able to establish a relation between the new <br>module and the already existing modules in VTiger (the new module will<br>appear in the &quot;More Information&quot; tab).<br><br>As you may know this is done by inserting a row in the
<br>vtiger_relatedlists table and inserting a new function into the main <br>class of the already existing related module that returns the related<br>elements, among other things that have to be done.<br><br>In the TSProjects module which I am (also) programming I have used a new
<br>technique to make the main class ( TSProject.php) independant of these<br>&quot;related&quot; functions.<br><br>Instead of adding functions to the main module&#39;s class I have created a<br>directory inside the modules &quot;home&quot;:
<br><br>modules/TSProjects/related <br><br>I have put in this directory one file per each related module with the<br>same name I establish in the vtiger_relatedlist table:<br><br>get_attachments.inc<br>get_prjtasks.inc<br>
get_stakeholders.inc<br>...<br><br>Each of these files has a function of the same name which is the one<br>that we usually add to the main class.<br><br>I, obviously, eliminate these functions from the main module class and
<br>add this piece of code:<br><br>-----------------------------------<br>&nbsp;&nbsp;// Load related functions from included files in module/related<br>directory<br>&nbsp;&nbsp;// TSolucio 2007-02-21<br>&nbsp;&nbsp;function __call( $method, $args )<br>
&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;global $currentModule; <br>&nbsp;&nbsp;&nbsp;&nbsp;$include_file=&quot;modules/$currentModule/related/$method.inc&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists($include_file)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include $include_file;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $method($args[0]);
<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;}<br>----------------------------------- <br><br>I can now add related modules simply adding a .inc file in the related<br>directory.<br><br>If we could get all modules to implement this feature we would get a
<br>much more modular application, would simplify the module generator and <br>avoid coding errors as all the code is more modular and independant.<br><br>I (again) offer my time and knowledge to modify all the modules with
<br>this change. For this I would like that somebody on the vtiger<br>development team get in touch with me (Richie?). I have been asking this <br>proactivly during various months now with no answer as the change I<br>propose here is not the only one I have proposed or asked about. I have
<br>sent various emails through the web and others on this forum with no<br>answer. As Richie stated today in a forum answer, I understand that you<br>can&#39;t answer them all. But you haven&#39;t answered ANY of mine. Not even
<br>the ones I sent through your web which are &quot;commercial&quot; questions. <br><br>Well, let&#39;s see what happens.<br><br>Regards, Joe<br>TSolucio<br><br>_______________________________________________<br>Reach hundreds of potential candidates - 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://jobs.vtiger.com/" target="_blank">http://jobs.vtiger.com </a><br></blockquote></div><br></span></div><br>_______________________________________________
<br>Reach hundreds of potential candidates - <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://jobs.vtiger.com/" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></div><br><br clear="all"><br>
-- <br>________________________________________<br>中国开源客户关系管理系统: <a href="http://www.c3crm.com">http://www.c3crm.com</a><br>-----------------------------------------------------------------------