I was recently asked how to clone the SmartSection module for XOOPS, so I thought I would document the process here on my blog. (XOOPS is another favorite CMS I use for my clients when they want a CMS)

Duplicate the smartsection module folder (this is the folder with all the module files in it – the folder you will put into the “modules” directory within your XOOPS install)

Now it is time to do a few “find and replaces” with your favorite text editor. (I prefer TextWrangler) For the sake of an example, I am going to name my cloned version of the SmartSection module SmartJappler. Within the entire duplicated folder, find and replace every instance of the following with the name of your newly cloned module. **Make sure you are replacing every instance in all the files**

Find: smartsection and replace it with smartjappler (your module name here)

Find: SMARTSECTION and replace it with SMARTJAPPLER (your module name here)

Find: SmartSection and replace it with SmartJappler (your module name here)

Find: Smart Section and replace it with Smart Jappler (your module name here)

Find: SSECTION and replace it with SJAPPLER (your module name here)

Find: Smartsection and replace it with Smartjappler (your module name here)

You also need to change the template file names in your duplicated folder to match your cloned module name. In the SmartJappler (or whatever you renamed the module) find the /templates/ folder and rename all files that have “smartsection” in the file name to “smartjappler” (or whatever you renamed the module). **Make sure all files in /templates/ and /templates/blocks/ have the new file names. (ex. smartsection_rss.html would be renamed to smartjappler.html)

Last but not least, you will need to do one more find and replace within one file: /sql/mysql.sql. Again, with your favorite text editor, find all instances of: smartsection_ and replace it with the name of your module. In my case I would replace it with smartjappler_.