It is the spring of 1943, and the immense Blockhaus near Watten is nearly complete. The Axis have geared up production on the V-2 rocket but continue to fire them from a remote launch site. The Allies must destroy t
In some situations, you may find yourself wishing a second, identical module to the one you already have installed. This requires the following general steps on your part:
Copy the whole module directory, say module1, to a different name, say module2, in the modules folder. You now have modules/module1 and modules/module2, where module1 and module2 are exact
directory copies.
Copy all administrative files of module1 (if any). Search for them in admin/modules, admin/links and admin/case. The copied files should be in the same directory as the original ones.
Find all tables used by module1. This part may be tricky and involves close examination of the code of all files under modules/module1.
Locate the part(s) of the nuke.sql file (located under the sql directory of the extracted PHP-Nuke package) that creates and populates the tables used by module1.
Copy that part(s) in a separate file, say nuke2.sql, and change the names of the tables involved e.g. by adding a "2" after the names. Run the nuke2.sql file, just as you had ran nuke.sql (see
Section 3.2.4):
mysql -u dbuname -p dbname < nuke2.sql
Inspect the code of all files under modules/module2 and change the table names to reflect the changes in nuke2.sql, e.g. by adding a "2" to every table that is specific to module2. Also change any
references to administrative files to point to the copied ones. Check the code of the copied administrative files too.
If your module uses any "op" parameter from the URL, you need to edit all the "op" input fields and all the calls to/from those "op's" in the admin/case file.
If the duplicate module should use different texts from the original ones, then you should create the appropriate entries in the language files (under admin/language/, modules/YourModule/ and
language/).
Activate module2 from the administration panel (Section 7.1)
As you can see from the above, duplicating modules can be a fairly complicated enterprise (see also How do I
duplicate modules?, Multiple Content Modules). In what follows, we will demonstrate this general procedure in a
real world example - duplicating the FAQ module.