You are missing our premiere tool bar navigation system! Register and use it for FREE!

•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
· Home
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 314 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Duplicating PHP-Nuke modules

Chapter 22. Duplicating PHP-Nuke modules

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.

Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.070 Seconds - 424 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded ( ::