smartfaq
SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)

How to rename modules without touching the database?
Requested and Answered by Frankblack on 2006/4/27 16:09:43 (8427 reads)
I thought about an easier way on how to rename modules, without the hassle of saving and restoring database contents.

Some modules really have weird names (like debaser) which look ugly in an URL.

The modules will be called nice and ugly module. Here are the necessary steps:

1. Make a copy of the ugly module and save it to your PC
2. Rename it to a nice module
3. Take a good editor! and search the paths to the ugly module and replace with the paths to the nice module
4. Open xoops_version of the nice AND the ugly module and comment out the lines that start with $modversion[tables]... like this:

//$modversion['tables'][0] = 'tinyeditor_toolset';
//$modversion['tables'][1] = 'tinyeditor_mimetypes';


5. Deactivate, deinstall and delete the ugly module
6. Copy the nice module to your server and install it (generate templates if needed)
7. Remove the comments in xoops_version.php you made in step 4 if you want really deinstall the module one day
8. DONE!

Needless to say, that only cowards make a database-backup before doing the above!

Good luck!!


The comments are owned by the author. We aren't responsible for their content.
  • Just can't stay away

 oops, forgot one thing? to tell

Search the "nice" module for

getByDirname("OLDnameofmodule");


and rename it to

getByDirname("NEWnameofmodule");

 
  • Friend of XOOPS

 Changing Module Name without touching DB

If I follow the directions it will delete the tables and data from my data base.
#5 says to Deinstall, Deactivate and Delete the ugly named module.
Well if I deactivate and deinstall it will drop my tables and data in the DB.

Scratching head....

 
  • Just can't stay away

 Re: Changing Module Name without touching DB

Quote:

Well if I deactivate and deinstall it will drop my tables and data in the DB.


No, it will not, because the informatio which tables to drop is not existing anymore. See step 4.

 
  • Just popping in

 smartsection

i'll try again but when i was trying to do this was smartsection it just would not work.
would just show a blank page.

i'm guessing not all the pages use the dir varibale and have actually typed the link "xoopsurl/modules/smartsection/

 
  • Just popping in

 good editor?

You stated:

Quote:

Take a good editor! and search the paths to the ugly module and replace with the paths to the nice module


My first comment was that I had not idea what a "good editor" is but I think I found one, it's called JEdit: http://www.jedit.org/

 
  • Just popping in

 smartsections - not working...

I've followed all of your directions multiple times and cannot get this to work with smartsections! I want the folder to be called "articles" not "smartsections" but it won't work... any ideas?

it's give me the error message: "Module File for Not Found!"