Duc Minh Nguyen wrote
I want to change YourCompany to NMDUC. Here are what I did:
-In My Documents\Visual Studio 2008\Templates\ItemTemplates\Visual Web Developer\CSharp, I unzipped Module_CS.zip.
-In Module_CS, I went to ModuleName folder. Open all file and change YourCompany with NMDUC.
Then:
-In My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#, I unzipped Web. There is zipped Module_Compiled_CS. I unzipped it.
-You can see DotNetNuke Module.vstemplate. Open it with Notepad.
-Find this
Change YourCompany with whatever you want.
Then zip everything.
I would like to revise/correct (or is it update?) the procedure for changing "YourCompany", which you described. This is for using DNN Version 04.09.01. This example given in VB, but easy enough to infer what to do for C#. To do this the easiest, you will need a zip program that will let you edit and update files within it.
First of all, go to the "My Documents\Visual Studio 2008\Templates\ItemTemplates\Visual Web Developer\VisualBasic" directory and open the "Module_VB.zip" file. Using Notepad, search every file (and I mean *every* file) for instances of "YourCompany" and replace with the company name you want.
The files I had to change in Module_VB.zip were:
- ViewModule.ascx
- Uninstall.SqlDataProvider
- Module.dnn
- App_Code\ModuleName\SqlDataProvider.vb
- App_Code\ModuleName\Info.vb
- App_Code\ModuleName\DataProvider.vb
- App_Code\ModuleName\Controller.vb
- DesktopModules\ModuleName\01.00.00.SqlDataProvider
- DesktopModules\ModuleName\EditModule.ascx
- DesktopModules\ModuleName\EditModule.ascx.vb
- DesktopModules\ModuleName\Settings.ascx
- DesktopModules\ModuleName\Settings.ascx.vb
- DesktopModules\ModuleName\ViewModule.ascx.vb
Then go to "My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual Basic\Web" directory and open the "Module_Compiled_VB.zip" file. Search every file for instances of "YourCompany" there as well and replace with the company name you want.
The files I had to change in Module_Compiled_VB.zip were:
- Components\DataProvider.vb
- Components\ModuleNameController.vb
- Components\ModuleNameInfo.vb
- Components\SqlDataProvider.vb
Finally, go to the "My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual Web Developer\VisualBasic" directory and open the "DotNetNuke.zip" file.
DO NOT change "YourCompany" in the "DotNetNuke.vstemplate" file. If you do, you will also have to rename the "YourCompany.SkinWidgets.SampleWidget" file in the archive's "Resources/SkinWidgets\scripts" directory but, once that's changed it will cause errors when Visual Studio attempts to find the template.
What you can do in the "DotNetNuke.zip" file, however, is change the connection string definitions in the "web.config" and "release.config" files to a connection string matching what you commonly use. If you don't want to that, then there's no need to fool with the "DotNetNuke.zip" file at all.
With these changes, if you create a new DNN Module you will encounter one, small problem (which I haven't figured out yet). After doing the "Add Item" to create the module and renaming the 2 "Module" directories, when you build the project you will get an error in the "ViewXXX.ascx.vb" code within DesktopModules. Very simple to fix: Load the "Viewxxx.ascx" file and change the "YourCompany" reference in it to your company's name.
Hope this helps.