Sort module order and GoogleAnalyticsScript

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/9/2010 10:38:04 AM
Gravatar
Total Posts 171
I am a Russian programmer

Sort module order and GoogleAnalyticsScript

Hi, Joe!
 

It is necessary to correct sort order after you add the module to the panel or move the module between the panels
 

PageLayout.aspx.cs
1) private void btnCreateNewContent_Click(Object sender, EventArgs e)
 

change:

ArrayList modules = GetPaneModules("contentPane");
to
ArrayList modules = GetPaneModules(m.PaneName);

and

Module.UpdateModuleOrder(pageID, item.ModuleId, item.ModuleOrder, "contentPane");
to
Module.UpdateModuleOrder(pageID, item.ModuleId, item.ModuleOrder, m.PaneName);

 

2) and for move the module between the panels
private void MoveContent(ListBox listBox, string sourcePane, string targetPane)
after CurrentPage.RefreshModules();
add
ArrayList modulesSource = GetPaneModules(sourcePane);
OrderModules(modulesSource);

foreach (Module item in modulesSource)
{
Module.UpdateModuleOrder(pageID, item.ModuleId, item.ModuleOrder, sourcePane);
}

ArrayList modulesTarget = GetPaneModules(targetPane);
OrderModules(modulesTarget);

foreach (Module item in modulesTarget)
{
Module.UpdateModuleOrder(pageID, item.ModuleId, item.ModuleOrder, modulesTarget);
}

3) GoogleAnalyticsScript.cs
SetupMainScript()

change:
script.Append("\n<script type=\"text/javascript\" src=\"" + overrideScriptUrl + "\" />\n");

to

script.Append("\n<script type=\"text/javascript\" src=\"" + overrideScriptUrl + "\" >");
script.Append(" </script>");

reason for the change is:

If the source is:
<script type="text/javascript" src="/ClientScript/googleanalytics/ga.js" />

Any script recorded after this code is not executed in browsers Firefox and IE. It executed only in Opera and Google Chrome


If the source is:
<script type="text/javascript" src="/ClientScript/googleanalytics/ga.js" > </script>

Scripts after this code are executed in all browsers
 

Best regards, Alexander

3/9/2010 10:52:51 AM
Gravatar
Total Posts 18439

Re: Sort module order and GoogleAnalyticsScript

I will make these changes.

Thanks,

Joe

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