Welcome to the Learning Center

The Guide | Knowledge Base | FAQ

Browse it all or refine your selection using the filters below on the left.

XMod Pro Considerations

In this post, we'll talk briefly about the settings that you may want to try out if you are using XMod Pro on a DNN site where you are running PageBlaster.

By: Ryan Moore On: 08/10/2011

Link to this Article
https://dnndev.com/Learn/Guide/Article/XMod-Pro-Considerations

In this post, we'll talk briefly about the settings that you may want to try out if you are using XMod Pro on a DNN site where you are running PageBlaster.

If you're not familiar with PageBlaster, and you are using DotNetNuke for corporate websites, then you need to check it out!

In his blog post, "How I Get My DotNetNuke Sites To Run So Fast," Mitch Sellers wrote an excellent outline on increasing the performance of a DNN installation.

http://www.mitchelsellers.com/blogs/articletype/articleview/articleid/283/how-i-get-my-dotnetnuke-sites-to-run-so-fast.aspx

One of the best notes in there was my first introduction to Snapsis PageBlaster,

"...if I really need to get the most performance out of a site I will tend to lean towards Snapsis PageBlaster as a good option. I currently use PageBlaster on this site only and have had very good luck with it, although when configuring the module you must be careful to test all functionality first. This was another change that once implemented I noticed very visible performance improvements."

Well, getting PageBlaster installed and operating properly isn't the hardest thing to do, but it's also not as simple as installing the module and you're done instantly. Most of the tweaking and customization come from the steps that you'll need to do to get PageBlaster working to optimize the site correctly, without causing problems with your specific modules in use. You see, one of the ways that Page Blaster makes things run better is by collecting, grouping and "minifying" the code before it is put out to the browser. This is great in most cases, but can cause problems with some JavaScript when things are compressed too far or there are conflicts. So you have to tweak the settings in PageBlaster to arrive at the perfect balance of compression and optimization while still allowing the site to run properly.

For the most part, XMod Pro works just fine under PageBlaster with no further customization. However, we found that there were some problems with both CAPTCHA in XMod Pro forms, and most irksome, with the graybox popup that gives quick access to XMod Form/Template code. Here we present the solution we've used a few times now to get XMod and PageBlaster to play well together.

In PageBlaster, the master control of many settings is through a config file in the DNN root, "Snapsis.PageBlaster.config". Making a few lines of code in the <ExcludePaths> block will control and edit the actions of PageBlaster. This is a copy of our general code used.

the XMod-related code for the Snapsis.PageBlaster.config:


<ExcludePaths>

<!-- original updated below path pattern="/admin/|/host/|install|jquery|.axd" excludeFrom="All" />-->

<p excludefrom="All" pattern="/admin/|/host/|install|jquery|.axd|\.axd|spmenu|captcha|BannerDisplay"</p>
<p excludefrom="Replacements" pattern="ctl[/=](edit|module|tab)"> </p>
<p excludefrom="Replacements" pattern="\.js$|\.css$|\.html$"></p>

<!--Comment or remove the next two exclude paths to further optimize DNN JS & CSS files /-->
<p excludefrom="MergeJS" pattern="\.js$"> </p>
<p excludefrom="MergeCSS" pattern="\.css$"></p>

<!--Uncomment the next line if you have trouble with post-backs or Ajax-->

<!--<path pattern="(Web|Script)Resource" excludeFrom="All" />-->

<!-- Additional MooreCreative Items to try/use -->
<p excludefrom="All" pattern="captcha\.aspx"< </p>
<p excludefrom="All" pattern="ImageChallenge\.captcha\.aspx"< </p>
<p excludefrom="All" pattern="jquery\.min\.js"></p>

<!-- Items to address problems with XMod Pro -->
<p excludefrom="All" pattern="DesktopModules(?!Xmod)"> </p>
<p excludefrom="All" pattern="kbxm-cp-ajax|initWidgets"> </p>
<p excludefrom="All" pattern="tabid(/|=)(339|346|359)(?!\d)"></p>
<!-- temp turn off pageblaster -->

<!--path pattern=".*" excludeFrom="All" /> -->

</ExcludePaths>
 

In the code above, we have a few customizations that you'll see. I'll step through them:

  1. We exclude "captcha" from the directories that PB acts on.
  2. Next, we block a couple of different lines specific to Captcha and the ImageChallenge.
  3. The next two lines are the only two specifically for XMod, and instruct PB to not compress/act on XMod or the popups.
  4. Finally, the last line with the tab id's is one that we specifically put in place to stop PB from optimizing three pages (by their TabID) which contained an XMod Form with CAPTCHA.

Enjoy The Results

With a little bit of extra setup after install, PageBlaster will allow XMod Pro to work like normal, while dramatically improving the speed and performance of your DNN site. These tweaks solved the few problems that we were encountering with PB... Do let me know if any of you have had other issues that I should add to this post, or whether there are any that we can help troubleshoot for you!

Thanks for reading everyone,

Ryan - MooreCreative

MooreCreative XMod Development Blog

In the MooreCreative XMod Pro Development Blog, I'll try to share some of the thoughts and ideas that we've come up with on a day-to-day basis as my development company uses DNN + XMod Pro to tackle client projects. I'll include items such as tips/tricks, did-you-know articles, troubleshooting/testing examples as well as posting samples solutions and explanations behind our experience working with XMod and jQuery functions, PageBlaster, ZLDNN Article, and other modules/elements.

If you would like to see us tackle a topic, especially anything out of the forums that could use further examples, please, don't hesitate to email me, and I'll look into preparing it for a blog post.