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

How to rename modules without touching the database?
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.
user

 oops, forgot one thing? to tell


Search the "nice" module for

getByDirname("OLDnameofmodule");


and rename it to

getByDirname("NEWnameofmodule");

 
user

 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....

 
user

 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.

 
user

 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/

 
user

 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/

 
user

 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!"

 


Login

Who's Online

192 user(s) are online (3 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 192


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

You can change dates and time formats in xoops?

Random question

What is an image optimization tool?