Hacks

The cloning of a module

JMorris  16-Sep-2004 14:12 9685 Reads   2 Comment(s) 

2) the repertory

* To make a copier/coller repertory of the module and to re-elect it in news02
* in xoops_version to change the value of the ' dirname':
$$modversion['dirname ' ] = "news02";
* seek and replace in all the files the references to the repertory:
replace /modules/news/ by /modules/news02/
NB: For certain modules systematically using $$xoopsModule->getvar('dirname ') this last operation will not be necessary.

3) tables

* to publish the file mysql.sq L of the repertory sql and re-elect the tables for each instruction sql:
CREATE COUNTS STORIES02 (
CREATE COUNTS TOPICS02 (
INSERT INTO TOPICS02
* in xoops_version modify the references to the tables:
$$modversion['sqlfile']['mysql ' ] = "sql/mysql.sql";
$$modversion['tables'][0 ] = "stories02";
$$modversion['tables'][1 ] = "topics02";
* seek and replace in all the files the references to the tables.
If you make a total replacement, do it with prefix(' nomdelatable rather ') than the name of the table alone; you would be likely unnecessarily to change values of variables which would bear the same name.
In this case, made research several times: with simple and doubles quotes, with and without space:
replace prefix(' stories ') , prefix("stories") , prefix(' stories') ... by prefix(' stories02 ')
replace prefix(' topics ') , prefix("topics") , prefix(' topics') ... by prefix(' topics02 ')
NB: certain modules have a file include\read_config.php (or equivalent) in which the names of the tables are assigned with variables.
In this case, only this file is to be modified.
« 1 (2) 3 4 5 6 »
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Who's Online

150 user(s) are online (1 user(s) are browsing Publisher)


Members: 0


Guests: 150


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

Categories