Global.asax modification

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/15/2010 3:34:53 AM
Gravatar
Total Posts 98

Global.asax modification

Hello,

  Can I modify the Global.asax.cs file for add this code?

if (WebConfigSettings.UseCultureOverride)
{
SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();
if ((siteSettings != null) && (siteSettings.SiteId > -1))
{
string siteCultureKey = "site" + siteSettings.SiteId.ToString(CultureInfo.InvariantCulture) + "culture";

if (ConfigurationManager.AppSettings[siteCultureKey]!= null)
{
try
{
CultureInfo siteCulture= new CultureInfo(ConfigurationManager.AppSettings[siteCultureKey]);
Thread.CurrentThread.CurrentCulture = siteCulture;

}
catch { }
}
}
}

I need for multiple sites!!

I download latest released version of mojo 2.3.3.4 and put on my server and get from svn source code (by the way this two is compatible?)

It possible to modify in source code the Global.asax.cs file and than replace mojoPortal.Web.dll file in bin folder?

I need the same to modify code for SearchInput.ascx control

and for SearchResults.aspc page

 

Thanks,

  Valik

1/15/2010 8:59:23 AM
Gravatar
Total Posts 18439

Re: Global.asax modification

You should not modify any mojoPortal code at all.

It seems like you are trying to add functionality that already exists in our CultureHelperHttpModule.cs

It is already possible to specify culture for each site in a multi site installation as documented on the bottom of Localization Page.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.