Hi all!
I need to create my own Content-type module with custom functions. {News} fits perfectly as a basic working module, which I decided to edit...
How I can install {News} module twice. Is it possible? How I can rename it?
Thanks for any help...
How to install a copy of the News module?
Re: How to install a copy of the News module?
ehaldur,
You might try the following before uploading the news module
- Rename the directory News to ie MyNews
- Rename MyNews\News.module.php to MyNews.module.php
- Rename 'class News extends CMSModule' inside MyNews.module.php to 'class MyNews extends CMSModule'
When done, upload module and test.
Tag {MyNews} will not exist, work. Use {cms_module module=MyNews}
Changing/adding content types may cause problems since they are part of the core.
Duketown
You might try the following before uploading the news module
- Rename the directory News to ie MyNews
- Rename MyNews\News.module.php to MyNews.module.php
- Rename 'class News extends CMSModule' inside MyNews.module.php to 'class MyNews extends CMSModule'
When done, upload module and test.
Tag {MyNews} will not exist, work. Use {cms_module module=MyNews}
Changing/adding content types may cause problems since they are part of the core.
Duketown
Re: How to install a copy of the News module?
I don't think that will be enough... think of renaming the database tables too in the various files, etc.
Re: How to install a copy of the News module?
Correctly added Jos.
The advantage will be that whenever you want to delete module MyNews, you can. Without renaming the internaly used files, you will also delete the News related tables and thus have to restore from back up.
Thanks for the heads up.
Duketown
The advantage will be that whenever you want to delete module MyNews, you can. Without renaming the internaly used files, you will also delete the News related tables and thus have to restore from back up.
Thanks for the heads up.
Duketown
Re: How to install a copy of the News module?
I use PSPad editor to do a search/replace to change News to a different module altogether, but there is one part that you may not see in News.module.php [nN]ews there are 4 lines that have this...
Re: How to install a copy of the News module?
Speaking from experience, it is a PITA to copy/rename modules especially when it comes to upgrades.
My advice for you would be to create a new module, eg using ListIt2.
My advice for you would be to create a new module, eg using ListIt2.
Re: How to install a copy of the News module?
Or MCFactory
Re: How to install a copy of the News module?
If for some reason, I need two, I use News and CGBlog. I usually just use categories for one or the other.