1
neo_coder
Module cloning
  • 2006/2/8 0:36

  • neo_coder

  • Just popping in

  • Posts: 4

  • Since: 2006/1/31


Does anyone knows how to clone a simple module???

I'm tryin' to use a same module two times but it says that some variables are already used!!!!

Thx for help

2
unni82
Re: Module cloning
  • 2006/2/8 4:53

  • unni82

  • Just popping in

  • Posts: 35

  • Since: 2005/11/10


hi
i m saying on behalf of module pical .it varies according to modules

1. First Copy the entire folder named “pical” from the server [ .. /.. /modules/pical ] into your Local machine.


2. In the file xoops_version.php (can be found inside the pical folder) change the value of the ' dirname':
$modversion['dirname ' ] = "pical2";

3. Seek and replace in all the files the references to the repertory, ie:
“/modules/pical/” by “/modules/pical2/”

4. In the file xoops_version.php modify the references to the table: $modversion['tables'][0] = 'pical2_event';
Seek and replace in all the files the references to the table. In this case, make research several times: with simple and doubles quotes, with and without spaces:
Replace prefix (' pical '), prefix ("pical"), prefix (' pical') ... by prefix (' pical2 ')

5. Certain modules have a file include\read_config.php (or equivalent). Then all the above mentioned changes need to be made in that file as well.

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

7. In the file xoops_version.php modify the noun of the functions approve and update:
$$modversion['comments']['callbackFile ' ] = ' include/comment_functions.php ';
$$modversion['comments']['callback']['approve ' ] = ' pical2_com_approve ';
$$modversion['comments']['callback']['update ' ] = ' pical2_com_update ';

8. In the file xoops_version.php modify the noun of the function look_up:
$$modversion['notification']['lookup_func ' ] = ' news02_notify_iteminfo ';

9.This step is nonessential, but preferable. Change the names of the files in xoops_version.php, without forgetting to re-elect correctly those in the repertory templates
$$modversion['templates'][1]['file ' ] = "pical2_archive.html";

10. To modify the logo and make it available in the administration of the modules.
Once modified, think of re-electing it and of changing the name indicated in xoops_version.php.
$$modversion['image ' ] = "images/pical2_slogo.png";

11. Go to the administration menu of the modules: your clone should appear without any error messages. Install your clone. Launch your clone. Test all the configurations of blocks and functionalities (research, comments, notification).



These tests must be carried out in the 2 cases of figure:
- With the original version installed, to detect conflicts or interactions
- Without the original version installed (temporarily removed) to check that your clone is autonomous, and that certain files do not point to the original module.

3
unni82
Re: Module cloning
  • 2006/2/8 5:05

  • unni82

  • Just popping in

  • Posts: 35

  • Since: 2005/11/10


Quote:

unni82 wrote:in ur case i dont know which module u r using but i think function names r recurring so u need to check in functions.php for recurring functions in the same modules and change the function name which should reflect in all the coming files
hi
i m saying on behalf of module pical .it varies according to modules

1. First Copy the entire folder named “pical” from the server [ .. /.. /modules/pical ] into your Local machine.


2. In the file xoops_version.php (can be found inside the pical folder) change the value of the ' dirname':
$modversion['dirname ' ] = "pical2";

3. Seek and replace in all the files the references to the repertory, ie:
“/modules/pical/” by “/modules/pical2/”

4. In the file xoops_version.php modify the references to the table: $modversion['tables'][0] = 'pical2_event';
Seek and replace in all the files the references to the table. In this case, make research several times: with simple and doubles quotes, with and without spaces:
Replace prefix (' pical '), prefix ("pical"), prefix (' pical') ... by prefix (' pical2 ')

5. Certain modules have a file include\read_config.php (or equivalent). Then all the above mentioned changes need to be made in that file as well.

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

7. In the file xoops_version.php modify the noun of the functions approve and update:
$$modversion['comments']['callbackFile ' ] = ' include/comment_functions.php ';
$$modversion['comments']['callback']['approve ' ] = ' pical2_com_approve ';
$$modversion['comments']['callback']['update ' ] = ' pical2_com_update ';

8. In the file xoops_version.php modify the noun of the function look_up:
$$modversion['notification']['lookup_func ' ] = ' news02_notify_iteminfo ';

9.This step is nonessential, but preferable. Change the names of the files in xoops_version.php, without forgetting to re-elect correctly those in the repertory templates
$$modversion['templates'][1]['file ' ] = "pical2_archive.html";

10. To modify the logo and make it available in the administration of the modules.
Once modified, think of re-electing it and of changing the name indicated in xoops_version.php.
$$modversion['image ' ] = "images/pical2_slogo.png";

11. Go to the administration menu of the modules: your clone should appear without any error messages. Install your clone. Launch your clone. Test all the configurations of blocks and functionalities (research, comments, notification).



These tests must be carried out in the 2 cases of figure:
- With the original version installed, to detect conflicts or interactions
- Without the original version installed (temporarily removed) to check that your clone is autonomous, and that certain files do not point to the original module.

4
unni82
Re: Module cloning
  • 2006/2/8 5:05

  • unni82

  • Just popping in

  • Posts: 35

  • Since: 2005/11/10


Quote:

unni82 wrote:in ur case i dont know which module u r using but i think function names r recurring so u need to check in functions.php for recurring functions in the same modules and change the function name which should reflect in all the coming files
hi
i m saying on behalf of module pical .it varies according to modules

1. First Copy the entire folder named “pical” from the server [ .. /.. /modules/pical ] into your Local machine.


2. In the file xoops_version.php (can be found inside the pical folder) change the value of the ' dirname':
$modversion['dirname ' ] = "pical2";

3. Seek and replace in all the files the references to the repertory, ie:
“/modules/pical/” by “/modules/pical2/”

4. In the file xoops_version.php modify the references to the table: $modversion['tables'][0] = 'pical2_event';
Seek and replace in all the files the references to the table. In this case, make research several times: with simple and doubles quotes, with and without spaces:
Replace prefix (' pical '), prefix ("pical"), prefix (' pical') ... by prefix (' pical2 ')

5. Certain modules have a file include\read_config.php (or equivalent). Then all the above mentioned changes need to be made in that file as well.

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

7. In the file xoops_version.php modify the noun of the functions approve and update:
$$modversion['comments']['callbackFile ' ] = ' include/comment_functions.php ';
$$modversion['comments']['callback']['approve ' ] = ' pical2_com_approve ';
$$modversion['comments']['callback']['update ' ] = ' pical2_com_update ';

8. In the file xoops_version.php modify the noun of the function look_up:
$$modversion['notification']['lookup_func ' ] = ' news02_notify_iteminfo ';

9.This step is nonessential, but preferable. Change the names of the files in xoops_version.php, without forgetting to re-elect correctly those in the repertory templates
$$modversion['templates'][1]['file ' ] = "pical2_archive.html";

10. To modify the logo and make it available in the administration of the modules.
Once modified, think of re-electing it and of changing the name indicated in xoops_version.php.
$$modversion['image ' ] = "images/pical2_slogo.png";

11. Go to the administration menu of the modules: your clone should appear without any error messages. Install your clone. Launch your clone. Test all the configurations of blocks and functionalities (research, comments, notification).



These tests must be carried out in the 2 cases of figure:
- With the original version installed, to detect conflicts or interactions
- Without the original version installed (temporarily removed) to check that your clone is autonomous, and that certain files do not point to the original module.

Login

Who's Online

166 user(s) are online (71 user(s) are browsing Support Forums)


Members: 0


Guests: 166


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits