Hacks: The cloning of a module

Posted by: JMorrisOn 2004/9/16 14:19:53 10235 reads

4) definitions of language (modinfo.php)
You will have to re-elect all the definitions of language of the file modinfo.php , to prevent in particular that they are declared 2 times and generate of Warning in mode debug php.
In theory, the other files of languages do not need to be modified, but you can do it for questions of coherence.
Not very easy to describe a method, all will depend on the module.
If all the variables are prefixed (ex) _ MI_NEWS _ made a total replacement of _ MI_NEWS _ by _ MI_NEWS02 _
Idem if they all are prefixed _ SEMI _ made a total replacement of _ SEMI _ by _ MI_NEWS02 _ p.ex.
If it is mixed one, attention not to find you with _ MI_NEWS02_NEWS02 _ p.ex.
NB: if you entirely do not carry out this part, at the end of the cloning, install and launch the module in mode debug php: correct the defines generating a warning.

5) Function seeks

* in xoops_version only modify the noun of the function
$$modversion['search']['func ' ] = "news02_search";
* publish the file include\search.inc.php and modify the noun of the function
function news02_search($queryarray, $$andor, $$limit, $$offset, $$userid)