Jump to content
thirty bees forum
  • 0

Copy a module


rudymadsen

Question

2 answers to this question

Recommended Posts

  • 0

Off the top of my head, these steps are required to duplicate a module:

  1. Duplicate the module folder.
  2. Give the new folder a meaningful name.
  3. Inside that folder is the main PHP file, same name as the folder, plus .php suffix. Rename this to the new folder name.
  4. This main PHP file defines a class making up the module. In its constructor, a variable/property '$this->name', change that to the new name as well.
  5. Delete all files starting with 'config' and ending with '.php', they'll get recreated automatically.

That said, duplication makes no sense for some modules. For example, modules defining a database table; the module copy would use the same database or require more substantial coding efforts.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...