Page 1 of 1

can I install newsmodule again with another name?

Posted: Wed Feb 02, 2011 9:40 pm
by babytiger
Hi
Newmodule has good features like custom field. I want to install it again with another name called "videos" or "anyname"

is it possible?

Thank you.

Re: can I install newsmodule again with another name?

Posted: Wed Feb 02, 2011 10:20 pm
by Wishbone
Why?

I [mis]use News, CGWhatever modules for many different purposes on the same site, but use different categories to keep them separated.

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 2:20 am
by Dr.CSS
I've converted some modules to be another module, you have to do a search/replace on all the files and change the name of some of them...

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 3:12 am
by Wishbone
Dr.CSS wrote:I've converted some modules to be another module, you have to do a search/replace on all the files and change the name of some of them...
Also have to change table names internal to all the files.

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 12:37 pm
by spcherub
FYI - There is a UDT elsewhere in this forum (in the Dutch or German sections) that can be used to duplicate an existing module. I would have searched for it and provided a link here, but search seems to be down.

-S

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 12:45 pm
by Jos

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 3:26 pm
by Wishbone
Does that UDT really duplicate the module, or give it another menu item with another name? I can't imagine a script to truly duplicate a module and make them independent of each other.

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 4:18 pm
by spcherub
It actually does duplicate the module. AFAIK - it duplicates the PHP code and gives the new module the name you specify. It also replicates the tables and given them new names as well.

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 8:51 pm
by Dr.CSS
@Wishbone

If I make a new module form an existing one it will make new tables in DB install so I see no need to change them by hand in DB, or I don't know what you mean...

Re: can I install newsmodule again with another name?

Posted: Thu Feb 03, 2011 9:11 pm
by Wishbone
I was wondering more about the table names inside the code. If the table names are clearly specified in the module.install.php file, I guess they can lift the table names from the table creation statements and change all instances of the table name in the code. If you use variables anywhere in the table names, I can't see it working. Very clever idea.. I might try it out.