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<br><br><div><span class="gmail_quote">On 2/20/07, <b class="gmail_sendername">
Joe Bordes</b> <<a href="mailto:joe@tsolucio.com">joe@tsolucio.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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 "More Information" 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>"related" functions.<br><br>Instead of adding functions to the main module's class I have created a<br>directory inside the modules "home":<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> // Load related functions from included files in module/related<br>directory<br> // TSolucio 2007-02-21<br> function __call( $method, $args )<br> {<br> global $currentModule;
<br> $include_file="modules/$currentModule/related/$method.inc";<br> if (file_exists($include_file)) {<br> include $include_file;<br> return $method($args[0]);<br> }<br> }<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't answer them all. But you haven't answered ANY of mine. Not even<br>the ones I sent through your web which are "commercial" questions.
<br><br>Well, let's see what happens.<br><br>Regards, Joe<br>TSolucio<br><br>_______________________________________________<br>Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com
</a><br></blockquote></div><br>