<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0cFQXg6eip7ImA9WhRVGUg.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889</id><updated>2012-01-19T08:36:50.612+02:00</updated><category term="Tweaking" /><category term="Extending" /><category term="Modules" /><category term="SQL" /><category term="Video" /><category term="Web" /><category term="Implementations" /><category term="Troubleshooting" /><category term="Utilities" /><title>DotNetNuke them!</title><subtitle type="html">My blog on DNN development and customization</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://dnnuke.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/DotnetnukeThem" /><feedburner:info uri="dotnetnukethem" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUQHQHs4fSp7ImA9WhRSGUg.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-3455282512485751081</id><published>2011-11-22T12:18:00.001+02:00</published><updated>2011-11-22T12:22:11.535+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-22T12:22:11.535+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting" /><title>Dealing with ‘Could not load type ‘DotNetNuke.Common.Global’’</title><content type="html">There are a thousand reasons this dreaded message can appear, but what if it appears on a site that you are 100% sure nobody has tampered with in any way other than uploading files for quite some time?&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;The problem&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The error itself is as follows:&lt;br /&gt;
&lt;h4 align="left"&gt;
&lt;i&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;h4 align="left"&gt;
&lt;i&gt;Parser Error&lt;/i&gt;&lt;/h4&gt;
&lt;div align="left"&gt;
&lt;b&gt;Description: &lt;/b&gt;An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.     &lt;br /&gt;&lt;b&gt;Parser Error Message: &lt;/b&gt;Could not load type 'DotNetNuke.Common.Global'.     &lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt;&lt;/div&gt;
&lt;div align="left"&gt;
&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div align="left"&gt;
&lt;pre&gt;Line 1:  &amp;lt;%@ Application Inherits="DotNetNuke.Common.Global" Language="VB" %&amp;gt;&lt;/pre&gt;
&lt;b style="font-family: monospace; white-space: pre;"&gt;Source File: &lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;/global.asax&lt;/span&gt;&lt;b style="font-family: monospace; white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Line: &lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;strong&gt;The context&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
That was exactly the case I faced today when a client called me and reported the error. The client was absolutely sure that no changes had been performed other than uploading some files, both to the application and the server itself (no upgrades, no apppool changes, no iis configuration changes).&amp;nbsp; Just to be safe, I checked the dates of the files in the bin folder as well as the date of the global.asax file and all had not been changed during the past few months. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Possible causes&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Searching the Web, I was panicked to see that there were at least a few dozen possible causes of this error. For example, there’s &lt;a href="http://www.dotnetnuke.com/Resources/Forums/forumid/107/threadid/14567/scope/posts/threadpage/1.aspx" target="_blank"&gt;a multi-page thread in the DotNetNuke forums&lt;/a&gt; dicussing this error. Sadly, most of the cases regarded upgrades to the core platform, recompiling or other stuff that had been changed.&lt;br /&gt;
&lt;br /&gt;
So what else could be wrong? Well, I once more discovered than when something seems inexplicable, it doesn’t always have to be some extremely complicated technical issue. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The client had access to the full site root via an FTP client. Upon trying to upload stuff, the client accidentally moved the App_Data folder inside another folder. That was it!&lt;br /&gt;
&lt;br /&gt;
I moved the App_Data folder back to the root and everything was fine again.&lt;br /&gt;
&lt;br /&gt;
What I learned from this incident: &lt;strong&gt;Always look for the simplest possible cause of an error first&lt;/strong&gt;. Hope it helps some of you out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-3455282512485751081?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OU2vtGkie9Z1FxonySL51TBIeC0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OU2vtGkie9Z1FxonySL51TBIeC0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OU2vtGkie9Z1FxonySL51TBIeC0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OU2vtGkie9Z1FxonySL51TBIeC0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/w9DuPlbBowc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/3455282512485751081/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=3455282512485751081" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3455282512485751081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3455282512485751081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/w9DuPlbBowc/there-are-thousand-reasons-this-dreaded.html" title="Dealing with ‘Could not load type ‘DotNetNuke.Common.Global’’" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/11/there-are-thousand-reasons-this-dreaded.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04CQnk6eSp7ImA9WhRTFE8.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-4103700675963363295</id><published>2011-11-04T17:29:00.001+02:00</published><updated>2011-11-04T17:52:43.711+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-04T17:52:43.711+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Implementations" /><title>What modules I used to develop www.alunet.com (Part 3 – Indoo Grid)</title><content type="html">&lt;p&gt;When it comes to displaying data on a grid, you can either choose to implement your own custom module, utilize a module like Open Web Studio (read about it in &lt;a href="http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html" target="_blank"&gt;Part 2&lt;/a&gt;) or, if you really want speed and efficiency, install a copy of &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15173&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Indoo Grid&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This module delivers what it promises: Grids. Fully customizable, sortable and editable, either in-line or via a form. Of course, if you really need advanced form functionality, have a look at &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Dynamic Forms&lt;/a&gt; from Datasprings (read about this module in &lt;a href="http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html" target="_blank"&gt;Part 1&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Every multi-purpose module is powerful in a specific area. Indoo Grid is very powerful in presenting data, and provides acceptable functionality for editing data. It’s ideal, though, for administrative tasks, especially if custom tables are involved. That was the case with alunet.com, so I used it heavily at the site administration pages.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-U928MsaOvlk/TrQErk0i65I/AAAAAAAAA9g/ZqsxiRwPOiA/s1600-h/indoo_products%25255B21%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="indoo_products" border="0" alt="indoo_products" src="http://lh3.ggpht.com/-R0gVM7FhNZQ/TrQEsotIEQI/AAAAAAAAA9o/ol9GMcQjVlE/indoo_products_thumb%25255B17%25255D.png?imgmax=800" width="420" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size="1"&gt;Here you can see how the products administration screen looks like. The links to view and edit pages are constructed fields which lead to a Dynamic Forms page and a public detail page respectively. You can sort columns by clicking on them and you can filter data using the text box and the comboboxes above the grid. The “Category”, “Company” and “Views” columns come from respective joined tables. This is not an SQL view you’re seeing – joins are defined in Indoo Grid’s configuration.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can instruct Indoo Grid to display records from a table or view, defining things such as searchboxes (you can define separate searchboxes for each column or combine them in a single searchbox, excluding the columns you don’t need to search), records per page selector, initial sorting and sortable columns, editable columns (if you need to edit things) and so on.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You also don’t have to worry about those cryptic referential integrity errors when trying, let’s say, to delete something that is related to another table – you can configure it to display messages that are understandable to the user.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-iBE4kGSagJQ/TrQEteJxUDI/AAAAAAAAA9w/OV5qUiMX4Zs/s1600-h/indoo_categories%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="indoo_categories" border="0" alt="indoo_categories" src="http://lh6.ggpht.com/-i5fsl8wJ4Jo/TrQEufRgRII/AAAAAAAAA94/6QssoCBmN6s/indoo_categories_thumb%25255B2%25255D.png?imgmax=800" width="420" height="258" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size="1"&gt;This is the grid for managing categories. Remember, the Categories table is a self-joined table that is presented in the form of a tree inside the web site.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can also create columns that are lookups in joined tables and even automatically create drop-downs from the values of those columns so that you can filter your grid with them. Additionally, you can create “calculated” fields that may contain one or more column values together with other html markup or scripts you may need (yes, that’s an easy way to include pictures or links to other pages).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One thing that Indoo Grid does that you won’t easily find elsewhere is that it can also handle hierarchical data. In alunet.com’s case, the “categories” table is a self-joined table that contains the entire tree of categories, where each record “knows” the id of its parent record. This was easily managed with Indoo Grid.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-WlGWpQrOD0c/TrQEvEVAyPI/AAAAAAAAA-A/7sB_4HFaT08/s1600-h/indoo_categories_hier_edit%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="indoo_categories_hier_edit" border="0" alt="indoo_categories_hier_edit" src="http://lh3.ggpht.com/-ZKiKmnQEr9c/TrQEwEau3iI/AAAAAAAAA-I/jq-iiXGiHSE/indoo_categories_hier_edit_thumb%25255B2%25255D.png?imgmax=800" width="420" height="298" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;&lt;font size="1"&gt;&lt;em&gt;Here you see the same grid for Categories management, after navigating to a specific category (castings). What we see now are the children of this category in the tree. You can also see that we have an easy way to add new records right below the grid, that will belong to the “Castings” parent category.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of coure, you can also use Indoo Grid for your front-end. It’s fully customizable in terms of styling and you can always use it in read-only mode. It’s very fast (authors have a &lt;a href="http://www.indoolab.com/Demo/Millionrecordspage/tabid/161/Default.aspx" target="_blank"&gt;demo&lt;/a&gt; with a million records which runs pretty smoothly),and there are some predefined templates and samples on their website, too.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Company website: &lt;a href="http://www.indoolab.com"&gt;www.indoolab.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Buy it from Snowcovered: &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15173&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Click&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html"&gt;Click here to read Part 1&lt;/a&gt; (Introduction and Dynamic Forms from Datasprings)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html"&gt;Click here to read Part 2&lt;/a&gt; (Open Web Studio)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-4103700675963363295?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/s5Dj_vNMHzxTHoJnCx1ejwduNEQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/s5Dj_vNMHzxTHoJnCx1ejwduNEQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/s5Dj_vNMHzxTHoJnCx1ejwduNEQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/s5Dj_vNMHzxTHoJnCx1ejwduNEQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/6TUMenwRKPM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/4103700675963363295/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=4103700675963363295" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/4103700675963363295?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/4103700675963363295?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/6TUMenwRKPM/what-modules-i-used-to-develop.html" title="What modules I used to develop www.alunet.com (Part 3 – Indoo Grid)" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-R0gVM7FhNZQ/TrQEsotIEQI/AAAAAAAAA9o/ol9GMcQjVlE/s72-c/indoo_products_thumb%25255B17%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/11/what-modules-i-used-to-develop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cDQnszfCp7ImA9WhdaEkw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-5767925591372650588</id><published>2011-10-21T18:12:00.001+03:00</published><updated>2011-10-21T18:31:13.584+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-21T18:31:13.584+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>Adding paging to the core Announcements module</title><content type="html">&lt;p&gt;The &lt;a href="http://www.dotnetnuke.com/Community/Extensions-Forge/Module-Announcements.aspx" target="_blank"&gt;Announcements module&lt;/a&gt; (at the time of writing this, the latest version was 4.0.3) is a very simple DNN core module that lets you present a list of titles and descriptions leading to files, other pages, external links or nowhere at all. It’s customizable via templates, but it doesn’t include any form of paging. So if you have like hundreds of announcements to publish, you probably have to use another module.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Not any more, since with a little help from a clever JQuery plugin called &lt;strong&gt;Pajinate&lt;/strong&gt; (&lt;a href="https://github.com/wesnolte/Pajinate/wiki" target="_blank"&gt;download from here&lt;/a&gt;), you can add paging to your announcements module. Of course, you’ll be loading all items since Pajinate functions on the client side, but it’s better than not having paging at all.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I used the default template that comes with the Announcements module and added what was needed to implement paging on it. Unfortunately, Pajinate does not hide the pager when there’s only one page nor does it hide the First/Previous and Next/Last buttons when we are at the first and last page respectively, so I had to write my own little chunk of Javascript to handle this correctly.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Additionally, I adapted the default header and footer templates to include IDs and other stuff needed for pajinate to work correctly. Those IDs are used in the additional javascript code I wrote.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So here’s the Javascript code. I suggest you put this code on a separate file (I used pajinatehelper.js) and load it AFTER the pajinate javascript file. You will probably need to change the value of the itemsperpage variable (top of script) to your own preference, as well as the literals for the First/Previous/Next/Last buttons that follow.&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;p&gt;&lt;span style="color: #008000"&gt;//Set the number of items per page&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #008000"&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;var itemsperpage = 10;&lt;br /&gt;$(document).ready(function(){&lt;br /&gt;$(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).pajinate( {&lt;br /&gt;    item_container_id : &lt;span style="color: #006080"&gt;'#pagetable'&lt;/span&gt;,  &lt;span style="color: #008000"&gt;//This must be left as is&lt;/span&gt;&lt;br /&gt;    items_per_page: itemsperpage,    &lt;br /&gt;    nav_label_first: &lt;span style="color: #006080"&gt;'First'&lt;/span&gt;,&lt;span style="color: #008000"&gt;//Change this to whatever you like&lt;/span&gt;&lt;br /&gt;    nav_label_prev: &lt;span style="color: #006080"&gt;'Prev'&lt;/span&gt;,  &lt;span style="color: #008000"&gt;//Change this to whatever you like    &lt;/span&gt;&lt;br /&gt;    nav_label_next: &lt;span style="color: #006080"&gt;'Next'&lt;/span&gt;,  &lt;span style="color: #008000"&gt;//Change this to whatever you like&lt;/span&gt;&lt;br /&gt;    nav_label_last: &lt;span style="color: #006080"&gt;'Last'&lt;/span&gt;   &lt;span style="color: #008000"&gt;//Change this to whatever you like&lt;/span&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Get the total number of items&lt;/span&gt;&lt;br /&gt;var total_items = $(&lt;span style="color: #006080"&gt;'#pagetable'&lt;/span&gt;).children().size()&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Get the number of pages&lt;/span&gt;&lt;br /&gt;var numberofpages = Math.ceil(total_items/itemsperpage);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Since we start at page 1, hide First/Previous buttons&lt;/span&gt;&lt;br /&gt;hideFirstPrev();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Decide what to hide when user clicks on a page number.&lt;/span&gt;&lt;br /&gt;$(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.page_link'&lt;/span&gt;).click(function(){&lt;br /&gt;&lt;br /&gt;    var currpage = parseInt($(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;).attr(&lt;span style="color: #006080"&gt;'longdesc'&lt;/span&gt;));&lt;br /&gt;    currpage+=1; &lt;span style="color: #008000"&gt;//longdesc is 0-based but page numbers start at 1.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (currpage==1) {&lt;br /&gt;        hideFirstPrev();&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (currpage==numberofpages) {&lt;br /&gt;        hideNextLast();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;br /&gt;    &lt;br /&gt;    {&lt;br /&gt;        showAll();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Hide First and Previous links when the user clicks the First link&lt;/span&gt;&lt;br /&gt;$(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.first_link'&lt;/span&gt;).click(function(){&lt;br /&gt;        hideFirstPrev();&lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Hide Last and Next links when the user clicks on the Last link&lt;/span&gt;&lt;br /&gt;$(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.last_link'&lt;/span&gt;).click(function(){&lt;br /&gt;        hideNextLast();&lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Decide what to hide when the user clicks on the Next or Previous links&lt;/span&gt;&lt;br /&gt;$(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.previous_link,.next_link'&lt;/span&gt;).click(function(){&lt;br /&gt;&lt;br /&gt;    var currpage = parseInt($(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.active_page'&lt;/span&gt;).attr(&lt;span style="color: #006080"&gt;'longdesc'&lt;/span&gt;));&lt;br /&gt;    currpage+=1; &lt;span style="color: #008000"&gt;//longdesc is 0-based but page numbers start at 1.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (currpage==1) {&lt;br /&gt;            hideFirstPrev();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (currpage==numberofpages) {&lt;br /&gt;            hideNextLast();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; {&lt;br /&gt;            showAll();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//If we have only one page, disable pager completely.            &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(total_items&amp;lt;itemsperpage){&lt;br /&gt;    $(&lt;span style="color: #006080"&gt;'.page_navigation'&lt;/span&gt;).hide();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;  &lt;br /&gt;&lt;span style="color: #008000"&gt;//These are helper functions for hiding / showing First/Last/Next/Previous links&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; function hideFirstPrev() {&lt;br /&gt;    toggleFirstLastNextPrevControls(1);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function hideNextLast() {&lt;br /&gt;    toggleFirstLastNextPrevControls(2);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function showAll() {&lt;br /&gt;    toggleFirstLastNextPrevControls(3);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function toggleFirstLastNextPrevControls (mode) {&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (mode==1) {&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.first_link'&lt;/span&gt;).hide();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.previous_link'&lt;/span&gt;).hide();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.last_link'&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.next_link'&lt;/span&gt;).show();&lt;br /&gt;    } &lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (mode==2) &lt;br /&gt;    {&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.first_link'&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.previous_link'&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.last_link'&lt;/span&gt;).hide();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.next_link'&lt;/span&gt;).hide();&lt;br /&gt;    } &lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (mode==3)&lt;br /&gt;    &lt;br /&gt;    {&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.first_link'&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.previous_link'&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.last_link'&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style="color: #006080"&gt;'#paging_container'&lt;/span&gt;).find(&lt;span style="color: #006080"&gt;'.next_link'&lt;/span&gt;).show();&lt;br /&gt;    }&lt;br /&gt; }&lt;br /&gt;  &lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here’s the code for the Header Template for the Announcements module:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&amp;lt;link rel=&lt;span style="color: #006080"&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; type=&lt;span style="color: #006080"&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt; href=&lt;span style="color: #006080"&gt;&amp;quot;/portals/0/scripts/pajinate.css&amp;quot;&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;script type=&lt;span style="color: #006080"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span style="color: #006080"&gt;&amp;quot;/portals/0/scripts/jquery.pajinate.js&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&lt;span style="color: #006080"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span style="color: #006080"&gt;&amp;quot;/portals/0/scripts/pajinatehelper.js&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&lt;span style="color: #006080"&gt;&amp;quot;paging_container&amp;quot;&lt;/span&gt; style=&lt;span style="color: #006080"&gt;&amp;quot;text-align:left;&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;table &lt;span style="color: #0000ff"&gt;class&lt;/span&gt;=&lt;span style="color: #006080"&gt;&amp;quot;DNN_ANN_DesignTable&amp;quot;&lt;/span&gt; cellspacing=&lt;span style="color: #006080"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; summary=&lt;span style="color: #006080"&gt;&amp;quot;Announcements Design Table&amp;quot;&lt;/span&gt; border=&lt;span style="color: #006080"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; style=&lt;span style="color: #006080"&gt;&amp;quot;border-collapse:collapse;&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;div id=&lt;span style="color: #006080"&gt;&amp;quot;pagetable&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Please note that I include the stylesheet (pajinate.css), the js file for Pajinate (jquery.pajinate.js – you can use jquery.pajinate.min.js too) and my own .js file (pajinatehelper.js) from my /portals/0/scripts folder (I actually created that “scripts” folder, since it didn’t exist in the default skin’s folder structure). You, of course, can load them from whatever path you like, or you can even inject them in the page’s HEAD section (&lt;a href="http://dnnuke.blogspot.com/2011/05/injecting-css-javascript-on-your-page.html" target="_blank"&gt;see this post for more on that&lt;/a&gt;).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Pajinate demands that the items to be paged are enclosed inside an element with a specific id (in our case, “paging_container”). You can see the complete documentation &lt;a href="https://github.com/wesnolte/Pajinate/wiki" target="_blank"&gt;here&lt;/a&gt;. Unfortunately, this doesn’t work well with tables, so I used an enclosing DIV with this id. Of cource, in your implementation, you can ditch the TABLE alltogether and just use DIVs. I tried to alter the default template as little as possible.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Pajinate also needs a second element that contains elements to be paged. I used this also, as a div with “pagetable” id. Those two are configurable (see the script)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And here’s the code for the footer:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;div &lt;span style="color: #0000ff"&gt;class&lt;/span&gt;=&lt;span style="color: #006080"&gt;&amp;quot;page_navigation&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The “page_navigation” div is once again required by pajinate in order to show the pager.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Phew. When you put all the code in place, and ensure that it’s working correctly, the result will be something like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-dn4RQ_8pwag/TqGL6Ua2qKI/AAAAAAAAA84/KIx_7pXUMOg/s1600-h/pajinate%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="pajinate" border="0" alt="pajinate" src="http://lh3.ggpht.com/-TFOn3C-cfrE/TqGL7AWtOuI/AAAAAAAAA9A/aeUScZd6j90/pajinate_thumb%25255B3%25255D.png?imgmax=800" width="430" height="179" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The orange pager comes from the default stylesheet that comes with Pajinate. You can, of course, change it at your will. In this example, I used a page size of 2.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;CAUTION: Since errors in Javascript can sometimes render your page useless and even disable the edit controls, please take a bookmark of the module edit page URL before you apply changes, so you can always get back to it in case things go wrong.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Have fun and good luck!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-5767925591372650588?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/d3ONmbxIkxBAvTevK0t312kDBZ8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/d3ONmbxIkxBAvTevK0t312kDBZ8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/d3ONmbxIkxBAvTevK0t312kDBZ8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/d3ONmbxIkxBAvTevK0t312kDBZ8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/pCFM6N_d-GE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/5767925591372650588/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=5767925591372650588" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5767925591372650588?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5767925591372650588?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/pCFM6N_d-GE/adding-paging-to-core-announcements.html" title="Adding paging to the core Announcements module" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-TFOn3C-cfrE/TqGL7AWtOuI/AAAAAAAAA9A/aeUScZd6j90/s72-c/pajinate_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/10/adding-paging-to-core-announcements.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEDQ3kycSp7ImA9WhRTE04.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7814368275878312176</id><published>2011-08-09T16:43:00.001+03:00</published><updated>2011-11-03T17:04:32.799+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T17:04:32.799+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Implementations" /><title>What modules I used to develop www.alunet.com (Part 2 - Open Web Studio)</title><content type="html">&lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=12152&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Open Web Studio&lt;/a&gt; (or OWS in short) is a FREE (yes, free!) module from R2integrated, formerly known as ListX. (There are paid subscription options too, although I'm not quite sure what is offered). At first glance, it looks like a module where you can define an sql query and then create a template to render results - something like a glorified data repeater. But it's a lot more than that. It supports AJAX, paging, variables, it can &amp;quot;talk&amp;quot; to DNN and retrieve things like the tab id, the module id, the locale etc. it can make decisions and branch execution, you can nest modules and have one call another via AJAX, you can do redirections or change page and module titles, you can cache query results and you can even write to files!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Activity lists, product and company lists, product and company details, as well as the users' control panel are rendered via OWS. Additionally, OWS is used in all security checks (such as checking if the user has the right to edit a specific company or product or if the user can add another product). This is achieved via modules that have no front-end but nevertheless run when the page is requested.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-ZdT47NsmWtc/TkE5Uhz6mRI/AAAAAAAAA7k/rR4IU-XLUZ8/s1600-h/alunetcom_controlpanel_thumb92.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_controlpanel_thumb[9]" border="0" alt="alunetcom_controlpanel_thumb[9]" src="http://lh4.ggpht.com/-GCy1RAZm3PE/TkE5VXTFunI/AAAAAAAAA7o/CxOEZTJOenA/alunetcom_controlpanel_thumb9_thumb.png?imgmax=800" width="420" height="177" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-LU16Wf6fw-I/TkE5V7TnFJI/AAAAAAAAA7s/55pb717En9k/s1600-h/alunetcom_controlpanel_products_thum%25255B1%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_controlpanel_products_thumb[11]" border="0" alt="alunetcom_controlpanel_products_thumb[11]" src="http://lh3.ggpht.com/-NGrEXi8AcRw/TkE5WQLM4iI/AAAAAAAAA7w/zwVOyE5H0ho/alunetcom_controlpanel_products_thum%25255B2%25255D.png?imgmax=800" width="420" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-Dnp6u8Zif6g/TkE5XQO_OJI/AAAAAAAAA70/QAkNzqVdMpk/s1600-h/alunetcom_companylist_thumb62.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_companylist_thumb[6]" border="0" alt="alunetcom_companylist_thumb[6]" src="http://lh5.ggpht.com/-49JbzNSy3MA/TkE5YVMu9BI/AAAAAAAAA74/d6mawGbR-3U/alunetcom_companylist_thumb6_thumb.png?imgmax=800" width="420" height="609" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Development in OWS is done via a handy tree-like interface where you define things like variables, If - else sections, sql queries, header-detail-alternate detail-footer sections etc.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The site's first page is a good OWS example. The asynchronous effect you will see when you load the first page is because only the main activities are retrieved when the page loads. Subactivities are then queried and rendered via AJAX, and query results are cached for each subactivity (yes, OWS can do named caching on query results so that you don't have to query your database all the time - you can even use fields from your queries to construct names for the cached elements). This is on purpose, since there is a large number of activities and counting products and companies for each one can take some time. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What's more is that you can then have more control over your caching - when a new company or product is submitted, you can clear only the cache that corresponds to the specific main activity it belongs to - leaving all the other query results cached. (No, I haven't done that yet - that's why it's a bit slow :))&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another example would be the company details page, in the future - the site will soon be supporting &amp;quot;packages&amp;quot;, i.e. there will be companies that will register for free and companies that will pay. The &amp;quot;free&amp;quot; companies will have fewer details shown than the paying ones. This is very easy to control via OWS. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-AbryRiQH2fY/TkE5aXsnvrI/AAAAAAAAA78/3vvYq3LRZIc/s1600-h/alunetcom_companyprofile_thumb162.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_companyprofile_thumb[16]" border="0" alt="alunetcom_companyprofile_thumb[16]" src="http://lh5.ggpht.com/-K6qnj6W-gZo/TkE5b2yg1ZI/AAAAAAAAA8A/Xd9A6Khjni8/alunetcom_companyprofile_thumb16_thu.png?imgmax=800" width="420" height="851" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In fact, I could use OWS to even create the submission forms - but it would be very hard since I would have to do it all by hand - Dynamic Forms is very easier for this type of task. I created the quick search form on the company and product lists with OWS, though. When submitted, it runs a stored procedure which brings the appropriate results - illegal character escaping, injection protection, even parameter type checking and default values assignment are all built-in and easily customizable.&lt;/p&gt;  &lt;p&gt;What's the catch? Well, lack of documentation. You've got to turn a lot of knobs and push a lot of buttons to understand what OWS really can do. Fortunately, there's a great community of OWS fans (me included), and this has solved most of my problems.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;OWS Pros:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Free! &lt;/li&gt;    &lt;li&gt;Very few bugs compared to other solutions &lt;/li&gt;    &lt;li&gt;Integrated RAD development environment including debugger &lt;/li&gt;    &lt;li&gt;It can talk to any external database (you can define connection strings) &lt;/li&gt;    &lt;li&gt;Supports calls to webservices or even external DLLs &lt;/li&gt;    &lt;li&gt;Supports caching, ajax, paging, sorting, decisions, variables &lt;/li&gt;    &lt;li&gt;Can talk to DNN - actually it can retrieve everything the PortalSettings class offers and some more. &lt;/li&gt;    &lt;li&gt;Very portable configurations, provides an option to even create your own PA assemblies, meaning that you can create your own modules using OWS. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;OWS Cons:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;VERY poor wiki-style documentation (but lots of examples in the community forums) &lt;/li&gt;    &lt;li&gt;Internal functions have a syntax that is somewhat hard to read (quotes inside quotes, brackets, curly brackets, parentheses, escaped quotes, you can usually find them all in one line) &lt;/li&gt;    &lt;li&gt;Developer must be very proficient in SQL and HTML / Javascript in order to achieve good results (actually IMHO, this is not a bad thing) &lt;/li&gt;    &lt;li&gt;Can be painful to debug in very complex scenarios &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Company website: &lt;a href="http://www.r2integrated.com"&gt;www.r2integrated.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Module website: &lt;a href="http://www.openwebstudio.com"&gt;www.openwebstudio.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Snowcovered: &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=12152&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Click&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html" target="_blank"&gt;Click here to read Part 1&lt;/a&gt; (introduction and Dynamic Forms from Datasprings)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7814368275878312176?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0jEVDWDXd-AupWoSteFVLS79G2s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0jEVDWDXd-AupWoSteFVLS79G2s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0jEVDWDXd-AupWoSteFVLS79G2s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0jEVDWDXd-AupWoSteFVLS79G2s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/TQpNsarHbJs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7814368275878312176/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7814368275878312176" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7814368275878312176?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7814368275878312176?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/TQpNsarHbJs/what-modules-i-used-to-develop_09.html" title="What modules I used to develop www.alunet.com (Part 2 - Open Web Studio)" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-GCy1RAZm3PE/TkE5VXTFunI/AAAAAAAAA7o/CxOEZTJOenA/s72-c/alunetcom_controlpanel_thumb9_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8EQnY-cCp7ImA9WhRTE04.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7028786093442752558</id><published>2011-08-09T16:40:00.001+03:00</published><updated>2011-11-03T17:06:43.858+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T17:06:43.858+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Implementations" /><title>What modules I used to develop www.alunet.com (Part 1 - introduction and Dynamic Forms from Datasprings)</title><content type="html">&lt;p&gt;Instead of writing another boring &amp;quot;top 10&amp;quot; list of modules &amp;quot;you must use before you die&amp;quot;, I chose to present a site I developed (currently online but in Beta stage). This is a unique opportunity, since I usually don't get permission or don't have enough time to publish details on my work.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The site is &lt;a href="http://www.alunet.com"&gt;www.alunet.com&lt;/a&gt;, a global directory related to aluminium companies and products, and has been developed using the following DNN modules:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-xarDlHarZcA/TkE4oBol6TI/AAAAAAAAA7E/_Jp4N-RZiHI/s1600-h/alunetcom_main14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_main" border="0" alt="alunetcom_main" src="http://lh4.ggpht.com/-qlT-HtH12i0/TkE4pUglY-I/AAAAAAAAA7I/6W5HDAEjI0M/alunetcom_main_thumb12.png?imgmax=800" width="420" height="431" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Dynamic Forms&lt;/a&gt; from Datasprings&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15173&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;IndooGrid&lt;/a&gt; from IndooLab&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=12152&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Open Web Studio&lt;/a&gt; from R2integrated&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=5694&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;News Articles&lt;/a&gt; from Ventrian&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=22555&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Live Tabs&lt;/a&gt; from Mandeeps&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=21279&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Navigation Suite&lt;/a&gt; from DNN360.net&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=20148&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;SmokeRanch Ad Manager&lt;/a&gt; from Smoke Ranch Software&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(Please be aware that the design is not mine - the layout and site structure was entirely designed by the client and my job was to implement all the functionality needed).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The site is also heavily using &lt;a href="http://www.jquery.com" target="_blank"&gt;jQuery&lt;/a&gt;, &lt;a href="http://fancybox.net/" target="_blank"&gt;Fancybox&lt;/a&gt; (a jQuery plugin for displaying images and/or html) as well as &lt;a href="http://www.percipientstudios.com/imagegen/overview.aspx" target="_blank"&gt;ImageGen&lt;/a&gt;, an image resizer originally developed for the Umbraco CMS that can function stand-alone in any .NET - based website.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let's discuss where I used what and why:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dynamic Forms from Datasprings&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Dynamic Forms&lt;/a&gt; is being used for almost all end-user data submission tasks. This is a very powerful forms generator for DotNetNuke, which allows you to create data-driven forms, storing data either in the module's internal database schema or in any custom external table structure. I am using custom tables for companies, products and categories so I chose the second approach. You can easily load data to your forms as well as save data to your database via SQL queries or stored procedures. You can populate form fields using SQL, and this is especially useful with lookup data used in combo boxes or checkbox groups.&amp;#160; The module supports various goodies like injecting your own javascript, creating your own validations and launching events on form submission that can send email or write to the database. I used Dynamic Forms for the product and company data submission forms that are displayed to registered users.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-fltBumoorqg/TkE4qDwQ12I/AAAAAAAAA7M/1thk-sdXB7Q/s1600-h/alunetcom_companyform16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_companyform" border="0" alt="alunetcom_companyform" src="http://lh5.ggpht.com/-dFyYuoOh-LQ/TkE4unsZFzI/AAAAAAAAA7Q/Y2OojMlgzVk/alunetcom_companyform_thumb14.png?imgmax=800" width="420" height="1411" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Registered users can submit their company data. Each user can submit only one company, which is approved by the site's administrator. Companies must have a main activity and subactivities that fall under their main activity (it's a tree with 3 levels). After initial submission, the user must select a main activity and subactivities. (again, Dynamic Forms is used for the selection forms). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When this process is complete, the company must be approved by the site administrators. Users get an email when this is done. (Of course, administrators also get an email for each submitted company). This is achieved via Dynamic Forms post-submission events.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Afterwards, the user is able to submit up to a specific number of products for the company (currently 10, but it's as easy to change as a record in a database table) and assign each product to one of the subactivities they have defined for their company. Actually, the &amp;quot;main activity&amp;quot; acts only as a grouping category, while subactivities are the actual activities of the company.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-IjjhlLrSjVI/TkE4wK4PSNI/AAAAAAAAA7U/vl5hRXvw28I/s1600-h/alunetcom_productform5.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_productform" border="0" alt="alunetcom_productform" src="http://lh3.ggpht.com/-Is6NOou2GXU/TkE4x7TGa6I/AAAAAAAAA7Y/zkZudLkQkVs/alunetcom_productform_thumb3.png?imgmax=800" width="420" height="730" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When editing the subactivity list, the forms present only subactivities that can be selected depending on the main activity chosen and do not let the user unselect a subactivity he has already assigned products to.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-nyOqfolLiOg/TkE4ydY_lmI/AAAAAAAAA7c/cuXiY0N2ZC4/s1600-h/alunetcom_activities7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="alunetcom_activities" border="0" alt="alunetcom_activities" src="http://lh4.ggpht.com/-0R8rTCkujFU/TkE4zEV-8uI/AAAAAAAAA7g/F4yuLGB4Nxg/alunetcom_activities_thumb5.png?imgmax=800" width="420" height="485" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Users have their own &amp;quot;control panel&amp;quot; where they can manage companies, products and activities. This works mainly with Open Web Studio, which we'll examine later on.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dynamic Forms pros:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Very powerful &lt;/li&gt;    &lt;li&gt;Datastore in own schema or custom database &lt;/li&gt;    &lt;li&gt;Post-submission events (email, sql, etc.) &lt;/li&gt;    &lt;li&gt;Field events (when you fill a field - you can hide/show sections depending on value etc.) &lt;/li&gt;    &lt;li&gt;Great selection of controls - including data-driven comboboxes, listbox/radio groups, rich text editor, image and file upload controls. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Dynamic Forms cons:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Bugs arise when you try to push it too far &lt;/li&gt;    &lt;li&gt;Somewhat expensive - you must make sure that you need it &lt;/li&gt;    &lt;li&gt;Not very good / easy control on final layout &lt;/li&gt;    &lt;li&gt;Image and file upload controls have many features (e.g. unique filenames, automatic thumbnail resizing) but need a lot of work to operate correctly. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Company website: &lt;a href="http://www.datasprings.com"&gt;www.datasprings.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Snowcovered: &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Click&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html" target="_blank"&gt;Click here to read Part 2&lt;/a&gt; (Open Web Studio)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7028786093442752558?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FBOPNwOsHNqAO7Xfj0O_z6TxC6g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FBOPNwOsHNqAO7Xfj0O_z6TxC6g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FBOPNwOsHNqAO7Xfj0O_z6TxC6g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FBOPNwOsHNqAO7Xfj0O_z6TxC6g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/Rtqh0-5kImE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7028786093442752558/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7028786093442752558" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7028786093442752558?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7028786093442752558?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/Rtqh0-5kImE/what-modules-i-used-to-develop.html" title="What modules I used to develop www.alunet.com (Part 1 - introduction and Dynamic Forms from Datasprings)" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-qlT-HtH12i0/TkE4pUglY-I/AAAAAAAAA7I/6W5HDAEjI0M/s72-c/alunetcom_main_thumb12.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEBRnc6eCp7ImA9WhZXFUw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7034720121190042433</id><published>2011-05-04T15:54:00.001+03:00</published><updated>2011-05-04T15:54:17.910+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-04T15:54:17.910+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Injecting CSS / Javascript on your page, revised</title><content type="html">&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;A long time ago, I had posted &lt;a href="http://dnnuke.blogspot.com/2008/10/adding-javascript-to-body-tag-in-dnn.html" target="_blank"&gt;a method to include Javascript in your .ascx skin’s HEAD section&lt;/a&gt;. Things have evolved till then, DNN supports JQuery out of the box, and we need an easy way to inject scripts and css stylesheets in our page, taking care that core stylesheets and jquery are loaded BEFORE our scripts, so they can work correctly. This is especially important with JQuery plugins.&lt;/font&gt;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;Latest DNN versions include two placeholder controls on the default.aspx page, with Ids CSS and SCRIPTS accordingly. These are the controls that can hold our scripts and stylesheets after all core stuff has been loaded, and we can have code inside our .ascx skins that uses these controls and injects stuff like jquery plugins or custom stylesheets inside our page’s HEAD section.&lt;/font&gt;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;I’ve written some reusable code to do so, which, in this basic implementation, can be used to control what scripts and stylesheets are loaded per skin. Of course, you can customize it even more to control things even on a tab level.&lt;/font&gt;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;The code has basically two functions, AddCSS and AddJS (what they do is obvious). You must override the Page_Init function and add your calls to the functions there.&lt;/font&gt;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Arial"&gt;Here’s the code. You can use it inline inside your .ascx page, preferrably right after your last @Register statement.&lt;/font&gt; &lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;font size="1"&gt;&amp;lt;script runat=&lt;span class="str"&gt;"server"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' An enum which holds the various type of elements to be &lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' injected in the HEAD section of our page    &lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Enum&lt;/span&gt; htmlHeadElementType &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;&lt;br /&gt;        css = 1&lt;br /&gt;        javascript = 2&lt;br /&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Enum&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' Add a CSS element to the HEAD section of our page&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;param name="csspath"&amp;gt;The path to the CSS file&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; AddCSS(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; csspath &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;)&lt;br /&gt;        AddHTMLHeadElement(csspath, htmlHeadElementType.css)&lt;br /&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' Add a JavaScript element to the HEAD section of our page&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;param name="jsPath"&amp;gt;The path to the js file&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; AddJS(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; jsPath &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;)&lt;br /&gt;        AddHTMLHeadElement(jsPath, htmlHeadElementType.javascript)&lt;br /&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' This is the actual function. &lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' It addds the element to the HEAD section of our page.    &lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;param name="elementPath"&amp;gt;The path to the file (css, js etc)&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;param name="elementType"&amp;gt;a htmlHeadElementType corresponding &lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' to the type of the element&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' we are adding to the HEAD section.&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;''' &amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; AddHTMLHeadElement( _&lt;br /&gt;          &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; elementPath &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt; _&lt;br /&gt;        , &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; elementType &lt;span class="kwrd"&gt;As&lt;/span&gt; htmlHeadElementType)&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; containerControl &lt;span class="kwrd"&gt;As&lt;/span&gt; Control &lt;br /&gt;        &lt;br /&gt;        &lt;span class="kwrd"&gt;Select&lt;/span&gt; &lt;span class="kwrd"&gt;Case&lt;/span&gt; elementType&lt;br /&gt;        &lt;br /&gt;            &lt;span class="kwrd"&gt;Case&lt;/span&gt; htmlHeadElementType.css &lt;br /&gt;                &lt;br /&gt;                containerControl = &lt;span class="kwrd"&gt;Me&lt;/span&gt;.Page.FindControl(&lt;span class="str"&gt;"CSS"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;Case&lt;/span&gt; htmlHeadElementType.javascript &lt;br /&gt;        &lt;br /&gt;                containerControl = &lt;span class="kwrd"&gt;Me&lt;/span&gt;.Page.FindControl(&lt;span class="str"&gt;"SCRIPTS"&lt;/span&gt;)&lt;br /&gt;                &lt;br /&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Select&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        &lt;span class="kwrd"&gt;If&lt;/span&gt; &lt;span class="kwrd"&gt;Not&lt;/span&gt; containerControl &lt;span class="kwrd"&gt;Is&lt;/span&gt; &lt;span class="kwrd"&gt;Nothing&lt;/span&gt; &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span class="rem"&gt;'Create our generic html control&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;Dim&lt;/span&gt; oLink &lt;span class="kwrd"&gt;As&lt;/span&gt; HtmlGenericControl&lt;br /&gt;            &lt;br /&gt;            &lt;span class="rem"&gt;'Decide on what type of element to add&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;Select&lt;/span&gt; &lt;span class="kwrd"&gt;Case&lt;/span&gt; elementType&lt;br /&gt;                &lt;br /&gt;                &lt;span class="kwrd"&gt;Case&lt;/span&gt; htmlHeadElementType.css&lt;br /&gt;                    &lt;br /&gt;                    oLink = &lt;span class="kwrd"&gt;New&lt;/span&gt; HtmlGenericControl(&lt;span class="str"&gt;"link"&lt;/span&gt;)&lt;br /&gt;                    oLink.Attributes(&lt;span class="str"&gt;"rel"&lt;/span&gt;) = &lt;span class="str"&gt;"stylesheet"&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class="str"&gt;"type"&lt;/span&gt;) = &lt;span class="str"&gt;"text/css"&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class="str"&gt;"href"&lt;/span&gt;) = elementPath&lt;br /&gt;                &lt;br /&gt;                &lt;br /&gt;                &lt;span class="kwrd"&gt;Case&lt;/span&gt; htmlHeadElementType.javascript&lt;br /&gt;                    &lt;br /&gt;                    oLink = &lt;span class="kwrd"&gt;New&lt;/span&gt; HtmlGenericControl(&lt;span class="str"&gt;"script"&lt;/span&gt;)&lt;br /&gt;                    oLink.Attributes(&lt;span class="str"&gt;"language"&lt;/span&gt;) = &lt;span class="str"&gt;"javascript"&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class="str"&gt;"type"&lt;/span&gt;) = &lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class="str"&gt;"src"&lt;/span&gt;) = elementPath&lt;br /&gt;            &lt;br /&gt;            &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Select&lt;/span&gt;&lt;br /&gt;            &lt;br /&gt;            &lt;span class="rem"&gt;'Add a script reference to the head section &lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;If&lt;/span&gt; &lt;span class="kwrd"&gt;Not&lt;/span&gt; oLink &lt;span class="kwrd"&gt;Is&lt;/span&gt; &lt;span class="kwrd"&gt;Nothing&lt;/span&gt; &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;br /&gt;                containerControl.Controls.Add(oLink)&lt;br /&gt;            &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;br /&gt;            &lt;br /&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;    &lt;br /&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; Page_Init( _&lt;br /&gt;        &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; sender &lt;span class="kwrd"&gt;As&lt;/span&gt; System.&lt;span class="kwrd"&gt;Object&lt;/span&gt; _&lt;br /&gt;        , &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; e &lt;span class="kwrd"&gt;As&lt;/span&gt; System.EventArgs _&lt;br /&gt;        ) &lt;span class="kwrd"&gt;Handles&lt;/span&gt; &lt;span class="kwrd"&gt;MyBase&lt;/span&gt;.Init&lt;br /&gt;&lt;br /&gt;        &lt;span class="rem"&gt;'Add the various files to the HEAD section of our page.&lt;/span&gt;&lt;br /&gt;        AddJS(&lt;span class="str"&gt;"/somepath/myscript.js"&lt;/span&gt;)&lt;br /&gt;        AddCSS(&lt;span class="str"&gt;"/somepath/mystylesheet.css"&lt;/span&gt;) &lt;br /&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7034720121190042433?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZcQEf0Ipcfci9PwWmj6X6GzpMCw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZcQEf0Ipcfci9PwWmj6X6GzpMCw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZcQEf0Ipcfci9PwWmj6X6GzpMCw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZcQEf0Ipcfci9PwWmj6X6GzpMCw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/KFNlt7NZaL4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7034720121190042433/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7034720121190042433" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7034720121190042433?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7034720121190042433?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/KFNlt7NZaL4/injecting-css-javascript-on-your-page.html" title="Injecting CSS / Javascript on your page, revised" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>8</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/05/injecting-css-javascript-on-your-page.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4DR38-fSp7ImA9WhZTGEU.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7107832560838533182</id><published>2011-03-23T15:46:00.001+02:00</published><updated>2011-03-23T15:46:16.155+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-23T15:46:16.155+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting" /><title>Fix: Points not added to core DNN Maps module</title><content type="html">&lt;p&gt;The DNN Maps module is very simple and useful, but you may come across a problem: When you add points they are simply not added (and when you go to “data” later you see nothing on the list). This behaviour has been reported for module version 01.00.09.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The fix is very simple and I’m posting it here in order to facilitate anyone who’s been having the same problem: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to your DNN root folder and find &lt;/p&gt;  &lt;p&gt;DesktopModules\Map\Sources\Dotnetnuke.Map.Standard.js    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Change the return value in the mapWriteData function as follows.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;from:&lt;/p&gt;  &lt;p&gt;return encodeURIComponent(strvalue)    &lt;br /&gt;to:&lt;/p&gt;  &lt;p&gt;return strvalue&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And points will be added normally.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You may need to clear your browser’s cache in order to get it working.&lt;/p&gt;  &lt;p&gt;Source: &lt;a href="http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/130/threadid/327921/scope/posts/threadpage/2/Default.aspx" target="_blank"&gt;DNN Support Forums&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7107832560838533182?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bT-lSwO9wjILnQSrPcjlte3gkgg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bT-lSwO9wjILnQSrPcjlte3gkgg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bT-lSwO9wjILnQSrPcjlte3gkgg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bT-lSwO9wjILnQSrPcjlte3gkgg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/a2gHbOkro0c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7107832560838533182/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7107832560838533182" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7107832560838533182?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7107832560838533182?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/a2gHbOkro0c/fix-points-not-added-to-core-dnn-maps.html" title="Fix: Points not added to core DNN Maps module" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/03/fix-points-not-added-to-core-dnn-maps.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQARng_fyp7ImA9WhdUFEw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-9209594954652480767</id><published>2011-02-20T22:24:00.001+02:00</published><updated>2011-09-30T22:19:07.647+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T22:19:07.647+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting" /><title>Datasprings Dynamic Forms and image upload problems - a fix for specific scenarios</title><content type="html">&lt;p&gt;This may not interest lots of people, but if you're using the very powerful &lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683" target="_blank"&gt;Datasprings' Dynamic Forms module&lt;/a&gt;, you may come across it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The setup&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Historically, there have been quite a few bugs with the image upload field in this module, especially when using in combined with the Preview functionality. I had the following setup:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Dynamic Forms module with more than one image upload field.&lt;/p&gt;  &lt;p&gt;Preview ON&lt;/p&gt;  &lt;p&gt;Thumbnail ON&lt;/p&gt;  &lt;p&gt;Initial SQL rendering/bind ON&lt;/p&gt;  &lt;p&gt;More than one image fields&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Other attributes for image fields (not that it matters, just describing the full scenario):&lt;/p&gt;  &lt;p&gt;Custom image folder &lt;/p&gt;  &lt;p&gt;Save filename only&lt;/p&gt;  &lt;p&gt;Save system generated unique name&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I wanted to setup Dynamic Forms to let a user upload, let's say, four images on the same form. I needed to save those in my own database tables and load them from those tables, so I had initial SQL rendering/bind as well as an sql event to save the images back to my custom database table.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When you use your own sql query to get data for your form, (at least at versions 03.30 to 03.40) thumbnails do not get loaded the first time the form is loaded. Instead, you see the full-sized image (after all, that's what stored in the database). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you cause a postback (e.g. by clicking on the &amp;quot;upload new image&amp;quot; link on another image field) then the image url is correctly prefixed with &amp;quot;thumb_&amp;quot; and it is presented in the correct dimensions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To overcome this, I just added code to my select query that would put the &amp;quot;_thumb&amp;quot; prefix in place even if it wasn't there, like the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;SELECT&lt;/p&gt;  &lt;p&gt;&amp;#160; field1&lt;/p&gt;  &lt;p&gt;, field2&lt;/p&gt;  &lt;p&gt;, ...(other fields)&lt;/p&gt;  &lt;p&gt;, case &lt;/p&gt;  &lt;p&gt;&amp;#160; when ltrim(rtrim(isnull(myfield,''))) ='' &lt;/p&gt;  &lt;p&gt;&amp;#160; then '' &lt;/p&gt;  &lt;p&gt;&amp;#160; else 'thumb_' + myfield &lt;/p&gt;  &lt;p&gt;&amp;#160; end as myfield&lt;/p&gt;  &lt;p&gt;, ...(other fields)&lt;/p&gt;  &lt;p&gt;...(rest of query)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So this would always add the thumb_ prefix to the field &amp;quot;myfield&amp;quot;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This solved the problem with the initial form rendering. The first time a user sees the form, the thumbnails are shown instead of the full images. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The second problem &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The first solution caused an additional problem: In the case of a postback, as I mentioned before, DF puts its own &amp;quot;thumb_&amp;quot; prefix in the images that are displayed on image fields! So if you attempt to click on &amp;quot;upload new image&amp;quot; in any fields, all the other fields will now have an image starting with &amp;quot;thumb_thumb_&amp;quot;, and, since no filename exists that starts with this prefix, broken images will be all you'll see.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Please note that you'll see this only if you're using two or more image fields on the same form (or use any other postback that triggers this behaviour).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The additional solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I found no way to circumvent this, since it's by design. So I had to resort to JQuery in order to correct the problem. I added a Custom Javascript (you can do that in the Module Configuration section) like the following one:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;$(document).ready(function() {&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; $('img[src*=&amp;quot;/Portals/0/imageuploadfolder/&amp;quot;]').each(function(i,d) {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(d).attr(&amp;quot;src&amp;quot;,     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(d).attr(&amp;quot;src&amp;quot;).replace(&amp;quot;thumb_thumb_&amp;quot;, &amp;quot;thumb_&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; );&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; });    &lt;br /&gt;});     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;What it does is take all images that have an src attribute that contains the path /portals/0/imageuploadfolder (replace this with your path) and changes any double &amp;quot;thumb_&amp;quot; prefixes to a single one. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This dual workaround seems to work good so far. Now I know this is a very special situation (Dynamic Forms with more than one image field and initial sql rendering) but I hope someone benefits from this. Take care.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-9209594954652480767?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6wi6G4uqF-mW0fDjOw_zQA4aOKI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6wi6G4uqF-mW0fDjOw_zQA4aOKI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6wi6G4uqF-mW0fDjOw_zQA4aOKI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6wi6G4uqF-mW0fDjOw_zQA4aOKI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/bLfwfOYBuMI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/9209594954652480767/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=9209594954652480767" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/9209594954652480767?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/9209594954652480767?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/bLfwfOYBuMI/datasprings-dynamic-forms-and-image.html" title="Datasprings Dynamic Forms and image upload problems - a fix for specific scenarios" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2011/02/datasprings-dynamic-forms-and-image.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UBRXsyeSp7ImA9Wx9SGUw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-1756152033949020024</id><published>2010-12-09T17:42:00.001+02:00</published><updated>2010-12-09T18:14:14.591+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-09T18:14:14.591+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Hide those help icons, site-wide</title><content type="html">&lt;p&gt;Admit it. Those little questionmark help icons are ugly. Even if you replace the icon image with something more fancy, you still have to display them everywhere, even at the front-end (for example, the Feedback module uses them). And, if you’re developing for more than one language, that creates an awful lot of work for you, since you have to translate all texts that appear as tooltips when you hover over the icons.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There’s an easy way to hide them, though, and it’s site-wide. It will also apply to any third-party modules that use the dnn label control for providing labels for form controls.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to controls\labelcontrol.ascx and change the following line:&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&amp;#160; &amp;lt;asp:image id=&amp;quot;imgHelp&amp;quot;&amp;#160; runat=&amp;quot;server&amp;quot; imageurl=&amp;quot;~/images/help.gif&amp;quot; enableviewstate=&amp;quot;False&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;to&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&amp;#160; &amp;lt;asp:image &lt;strong&gt;&lt;font size="4"&gt;visible=&amp;quot;false&amp;quot;&lt;/font&gt;&lt;/strong&gt; id=&amp;quot;imgHelp&amp;quot;&amp;#160; runat=&amp;quot;server&amp;quot; imageurl=&amp;quot;~/images/help.gif&amp;quot; enableviewstate=&amp;quot;False&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;That’s right. A visible=”false” attribute and the icons will disappear.&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Also, if you notice that the labels are shifted to the left a bit (especially in IE), then go two lines above and change the line:&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&amp;lt;span style=&amp;quot;width:15px&amp;quot;&amp;gt;&lt;/p&gt;  &lt;p align="left"&gt;to&lt;/p&gt;  &lt;p align="left"&gt;&amp;lt;span style=&amp;quot;width:0px&amp;quot;&amp;gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Or delete the span tag all together.&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;You can find a relevant thread on &lt;a href="http://www.dotnetnuke.com" target="_blank"&gt;DotNetNuke.com&lt;/a&gt; with some more tips and tricks for the labelcontrol.ascx file &lt;a href="http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/118/threadid/141766/scope/posts/threadpage/1/Default.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Have fun!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-1756152033949020024?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a7AcBEu2OrLX7RA7Nkj1U1O76m0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a7AcBEu2OrLX7RA7Nkj1U1O76m0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a7AcBEu2OrLX7RA7Nkj1U1O76m0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a7AcBEu2OrLX7RA7Nkj1U1O76m0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/SVlnjOiDVNQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/1756152033949020024/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=1756152033949020024" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1756152033949020024?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1756152033949020024?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/SVlnjOiDVNQ/hide-those-help-icons-site-wide.html" title="Hide those help icons, site-wide" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/12/hide-those-help-icons-site-wide.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIGSXY9cCp7ImA9Wx9TEEw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-6402871347173903364</id><published>2010-11-17T19:38:00.001+02:00</published><updated>2010-11-17T19:55:28.868+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-17T19:55:28.868+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><title>Using resource files in embedded user controls in skins</title><content type="html">&lt;p&gt;If you are editing ASCX skins, then you have probably been tempted to introduce a bit of reusability by creating custom user controls and embedding them to your skins. These can actually function like skin objects, but without all the fuss. I’ve found it easy to create a couple of those in cases where I may need, for example, a common footer for all my skins, but of course you can do a great deal more with them, like introduce functionality without having to copy all the code to every skin file you make.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In any case, you have to register your control inside your skin file like this (names of folders, portal and skin path and tagprefix/name are arbitrary):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="2" face="Courier New"&gt;&amp;lt;%@ Register TagPrefix=&lt;span class="str"&gt;&amp;quot;MyCompany&amp;quot;&lt;/span&gt; TagName=&lt;span class="str"&gt;&amp;quot;FOOTER&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&amp;quot;~/Portals/0/Skins/myskin/myskinobjectsfolder/footer.ascx&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And use it in your skin file like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font face="Courier New"&gt;&amp;lt;MyCompany:FOOTER id=&lt;span class="str"&gt;&amp;quot;myFooterId&amp;quot;&lt;/span&gt; runat=&lt;span class="str"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The question is: How do you localize these little bastards? Even if you add DNN controls on them, the ResourceKey property continues to get data only from the skin’s resource file, not the control’s. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of course, you can use your skin’s resource file to get localized strings and other data but this isn’t very convenient since you’ll have to add data to every resource file corresponding to each one of your skins. And I’m not going to talk about app_globalresources either! :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(If you don’t know that you can have resource files for your skins, yes, you can. You can have a skins/app_localresources folder and you can have .resx files there&amp;#160; and you can use the ResourceKey attribute in your DNN control tags to get localized data for your controls in your skins). &lt;/p&gt;  &lt;p&gt;Well, based on this excellent post &lt;a href="http://local.dotnetnuke.com/Resources/Forums/tabid/795/forumid/111/threadid/270758/scope/posts/threadpage/1/Default.aspx" target="_blank"&gt;here&lt;/a&gt; about localizing embedded controls, I thought it would be good to summarize and simplify the process a bit. So here it goes:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can give an embedded user control its own resource file by following two different approaches:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. Make it inherit PortalModuleBase&lt;/p&gt;  &lt;p&gt;2. Specify the resource file yourself and make the control use it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Approach 1: Inheriting PortalModuleBase&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You just have to add:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;span class="kwrd"&gt;Inherits&lt;/span&gt;=&lt;span class="str"&gt;&amp;quot;DotNetNuke.Entities.Modules.PortalModuleBase&amp;quot;&lt;/span&gt; &lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;in your control’s header. &lt;/p&gt;  &lt;p&gt;E.g. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;%@ Control language=&lt;span class="str"&gt;&amp;quot;vb&amp;quot;&lt;/span&gt; AutoEventWireup=&lt;span class="str"&gt;&amp;quot;false&amp;quot;&lt;/span&gt; Explicit=&lt;span class="str"&gt;&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;Inherits&lt;/span&gt;=&lt;span class="str"&gt;&amp;quot;DotNetNuke.Entities.Modules.PortalModuleBase&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Doing so will give you access to the LocalResourceFile property, which will in turn point to the .resx file located in the app_localresources folder right under your control’s location. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But what .resx file, exactly? Not the one you expected.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The resx file will NOT follow the file name of your user control, but the ID by which it is called. If your control’s filename is MyFooter.ascx, and you call it with an ID of “myFooterId” then your resource file must be named “myFooterId.ascx.resx”. &lt;/p&gt;  &lt;p&gt;Then, you can use code like this to get a localized value, for example, for the “Footer.Text” key:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;%=DotNetNuke.Services.Localization.Localization.GetString(&lt;span class="str"&gt;&amp;quot;Footer.Text&amp;quot;&lt;/span&gt;, LocalResourceFile)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;%&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Ugly, because you have to remember to always use the same ID and also because you can’t use two instances of your control in the same skin. Also, inheriting PortalModuleBase restricts your coding flexibility.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Approach 2: Forcing the user control to use a resource file&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you don’t want your user control to inherit PortalModuleBase but you still need it to have its own resource files, you can define a LocalResourceFile property yourself. This is written directly in the .ASCX file but, of course, you can put it in code-behind too. (sorry about the line breaks):&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font face="Courier New"&gt;&amp;lt;script runat=&lt;span class="str"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;       &lt;br /&gt;&lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;ReadOnly&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt; LocalResourceFile &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="kwrd"&gt;Get&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="kwrd"&gt;Return&lt;/span&gt; &lt;span class="kwrd"&gt;Me&lt;/span&gt;.TemplateSourceDirectory &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="str"&gt;&amp;quot;/&amp;quot;&lt;/span&gt; &amp;amp; _       &lt;br /&gt;DotNetNuke.Services.Localization.Localization.LocalResourceDirectory &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="str"&gt;&amp;quot;/&amp;quot;&lt;/span&gt; &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.IO.Path.GetFileNameWithoutExtension(&lt;span class="kwrd"&gt;me&lt;/span&gt;.AppRelativeVirtualPath)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Get&lt;/span&gt;       &lt;br /&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; GetLocalizedString ( _&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font face="Courier New"&gt;&lt;font color="#ffffff"&gt;&lt;font color="#666666"&gt;ByVal&lt;/font&gt; &lt;/font&gt;key &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;) &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class="kwrd"&gt;Dim&lt;/span&gt; retVal &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; retVal = _       &lt;br /&gt;DotNetNuke.Services.Localization.Localization.GetString( _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; key, LocalResourceFile)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class="kwrd"&gt;return&lt;/span&gt; (retVal)       &lt;br /&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt;       &lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p align="left"&gt;&lt;font face="Courier New"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;What we did here was to create our own LocalResourceFile property. This tells the control to use a resource file that follows the file name of the control itself. So, if your control is named footer.ascx, your resource file will lie in app_localresources\footer.ascx.resx. If you need to specify a differently – named resource file, you just replace the GetFileNameWithoutExtension call with your own string. E.g. if you use “myownFooter” there, then there must be a myownFooter.ascx.resx file in the app_localresources folder.&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;In addition, we created a GetLocalizedString function which will just take the key and return the string from the resource file. &lt;/p&gt;  &lt;p align="left"&gt;We can use this function in our user control to get localized data as follows:&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font face="Courier New"&gt;&amp;lt;%=GetLocalizedString(&lt;span class="str"&gt;&amp;quot;Footer.Text&amp;quot;&lt;/span&gt;)%&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;This is much simpler and much more flexible.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-6402871347173903364?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gMxydx7VYVqyD8PfpnQFSV7N7nc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gMxydx7VYVqyD8PfpnQFSV7N7nc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gMxydx7VYVqyD8PfpnQFSV7N7nc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gMxydx7VYVqyD8PfpnQFSV7N7nc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/pzx_Wk5iuLI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/6402871347173903364/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=6402871347173903364" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/6402871347173903364?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/6402871347173903364?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/pzx_Wk5iuLI/using-resource-files-in-embedded-user.html" title="Using resource files in embedded user controls in skins" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/11/using-resource-files-in-embedded-user.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUAQ306fCp7ImA9Wx5bGE8.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-2199666248840363151</id><published>2010-11-04T00:26:00.001+02:00</published><updated>2010-11-04T00:27:22.314+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-04T00:27:22.314+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>How to quickly switch your "localhost" binding to another dnn site</title><content type="html">&lt;p&gt;Warning: This is for advanced users only. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The situation&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You've got a development machine which has more than one DNN sites that you are currently working on.&lt;/li&gt;    &lt;li&gt;You're using host headers on those sites to have multiple root-level DNN sites. (And you know the terms &amp;quot;host header&amp;quot; and &amp;quot;binding&amp;quot;)&lt;/li&gt;    &lt;li&gt;You are using IIS7 or higher with Windows 7 or Windows 2008. (I suspect it may work on Vista too, but who's still got Vista? :) ).&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;(Don't continue reading if the above don't match your case. One of the most common reasons for the above scenario could be that there are root-level urls inside your DNN site, generated by custom modules or just hard-coded into skins / modules, so you have to make your development PC believe that this is a root-level site and not a virtual directory of your default web site. Or, even worse, if you're working on a copy of a site that's already online and there are links and other stuff pointing to the WHOLE domain, you may have to alter your hosts file to make your PC believe that your local site is running on the exact same domain. If you're dealing with DNN a lot, you've probably seen that we don't live in a perfect world and such cases do exist.)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You need to configure some modules on your installations, but the modules you have installed can run without limits only on &amp;quot;localhost&amp;quot;. Furthermore, some modules, (for example, IndooGrid) need you to buy a licence if you run them ANYWHERE else than localhost - even if it's a test / development machine. But you don't want to buy additional licences since you can do your development work on localhost.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What you need&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You need a way to quickly switch between what you see when you type &amp;quot;localhost&amp;quot; on your PC's browser, so that you can work on the site of your choice each time. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of course, you can do it by altering your sites' host headers in IIS but that wouldn't be quick. And, I won't say a word about using different virtual machines, each with one localhost site - I've seen it happen. :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Let's suppose I've got two sites, let's say Site1 and Site2. These listen to their respective host headers, let's say site1.mypc.local and site2.mypc.local. You have configured your Site1 to listen to &amp;quot;localhost&amp;quot;&amp;#160; too. Currently, when you type &amp;quot;localhost&amp;quot; on your browser you see Site1.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now, you either have configured your IIS to have an extra host header (*:80) for Site 1 or you have changed the location of your &amp;quot;default web site&amp;quot; to point to Site1's folder on your hard disk. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Do the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. STOP your default web site (if that's what you're using to do the trick). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;2. Go to all the sites that you need to implement the &amp;quot;switching&amp;quot; on, and add a portal alias for localhost so that they can respond to the call (if there is not one already). If you do so, an IISRESET would be good too, in order to avoid the dreaded &amp;quot;redirect loop&amp;quot; error that can happen from time to time.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;3. Create a batch file with the following and save it as changehost.bat (or any name you choose):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;@echo off&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;if &amp;quot;%1&amp;quot; == &amp;quot;site1&amp;quot; goto site1     &lt;br /&gt;if &amp;quot;%1&amp;quot; == &amp;quot;site2&amp;quot; goto site2      &lt;br /&gt;if &amp;quot;%1&amp;quot; == &amp;quot;&amp;quot; goto error&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;:site1     &lt;br /&gt;%windir%\System32\inetsrv\appcmd set site /site.name:site2 /-bindings.[protocol='http',bindingInformation='*:80:']      &lt;br /&gt;%windir%\System32\inetsrv\appcmd set site /site.name:site1 /+bindings.[protocol='http',bindingInformation='*:80:']      &lt;br /&gt;goto end&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;:site2     &lt;br /&gt; %windir%\System32\inetsrv\appcmd set site /site.name:site1 /-bindings.[protocol='http',bindingInformation='*:80:']      &lt;br /&gt; %windir%\System32\inetsrv\appcmd set site /site.name:site2 /+bindings.[protocol='http',bindingInformation='*:80:']      &lt;br /&gt;goto end&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;:error     &lt;br /&gt;@echo You have to provide a parameter!      &lt;br /&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;:end&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align="left"&gt;(Sorry for the wrapping, each call to appcmd should be on a single line.)&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let's explain what this batch file does. You call it like this (make sure you have administrator rights):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;changehost site2&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And you expect to see your &amp;quot;site2&amp;quot; responding to localhost instead of &amp;quot;site1&amp;quot;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What the batch file does is go to the matching section of the batch code, following the IFs. When it gets there, it does two things:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First, it uses appcmd.exe (an utility located in your windows directory\system32\inetsrv folder, which allows you to access several IIS properties from the command line) to add a binding to localhost (*:80) to the site you need and REMOVE this binding from any other of your sites that possibly has it. Essentially, it does what you would do by hand - go to iis, add a binding to the site of your choice, remove the binding from the previous site since you are not allowed to have two sites with the same host header.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The result is that you will always have one and only one site bound to localhost, and that you can change what site this is by just executing your batch file.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Some things to have in mind:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The parameter's values can be anything you want, as long as there is a section inside the batch file you can GOTO if you match a parameter value. I've used the same names as the names of the sites in order to have some consistency, but this isn't needed. &amp;quot;Foo&amp;quot; and &amp;quot;Poo&amp;quot; would do the same job, as long as there was a &amp;quot;Foo&amp;quot; section for site1 and a &amp;quot;poo&amp;quot; section for site2.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The /site.name switch needs the actual site's name as it is declared in IIS. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You must FIRST remove any possible localhost bindings (/-bindings switch) and add the localhost binding (*:80) last (/+bindings switch), otherwise you'll get an error and the binding won't be added because it will exist on another site.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If a site does not have a localhost binding, you'll get a message that it can't be found, like this one: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;ERROR ( message:Cannot find requested collection element. )     &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Don't be alarmed, it's normal. Appcmd just tried to remove a non-existent binding, no problem. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you try to run this script twice for the same site, you'll also get an error like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;Cannot add duplicate collection entry of type 'binding' with combined key attributes 'protocol,bindingInformation' respectively set to 'http, *:80:'. )&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This means that you tried to add a binding to *:80 to the site that already had it. That's perfectly normal, too, nothing to worry about, no changes will be made. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The example is for two sites, if you have three you'll have to adjust the number of sections, your IF statements and your appcmd calls accordingly. Remember, we're doing a simple thing: Attempting to remove localhost bindings from sites that may have it (only one will) and add a localhost binding to the site we want.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I hope this helps a bit. It worked for me, if anyone tries it, please let me know if you have succeeded. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Standard disclaimer / warning: Even if you are an advanced user, please use this information at your own risk. It's easy to mess things up (actually, the only thing you'll mess up is your bindings - you won't lose any data but it's enough to make your development sites unaccessible if you don't know what you're doing). I cannot be held responsible if any of the above information proves misleading or incorrect. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy localhosting! :)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-2199666248840363151?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/klnhsjI4A38FZLrzCJHomL1Lmww/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/klnhsjI4A38FZLrzCJHomL1Lmww/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/klnhsjI4A38FZLrzCJHomL1Lmww/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/klnhsjI4A38FZLrzCJHomL1Lmww/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/Q6R_E6BrRs4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/2199666248840363151/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=2199666248840363151" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/2199666248840363151?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/2199666248840363151?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/Q6R_E6BrRs4/how-to-quickly-switch-your-binding-to.html" title="How to quickly switch your &amp;quot;localhost&amp;quot; binding to another dnn site" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/11/how-to-quickly-switch-your-binding-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8NRn08cSp7ImA9Wx5UFkQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-5964452283273464695</id><published>2010-10-22T00:29:00.001+03:00</published><updated>2010-10-22T00:34:57.379+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-22T00:34:57.379+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Troubleshooting" /><title>SupportedFeatures field, Search Indexer exceptions, oh my.</title><content type="html">&lt;p&gt;I had one of my usual strange problems tonight. The search indexer on a DNN web site I created some months ago would not index the entire site. I got suspicious and checked the event log, where there were pages after pages of general exceptions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Most errors seemed to be something like: &lt;/p&gt;  &lt;p align="left"&gt;&lt;font face="Courier New"&gt;&lt;em&gt;&lt;font size="1"&gt;System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey) at DotNetNuke.Services.Search.ModuleIndexer.GetModuleList(Int32 PortalID)         &lt;br /&gt;&lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Okay, this could not be the real error! I had to find the real cause.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First try - cleaning the search index in case it's been corrupted&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The first thing I tried (and I advice you to do that before you try anything else) was to start with a clean search index, in case it was somehow corrupted. What you can do is the following (taken from &lt;a href="http://www.deutschnetnuke.de/AboutDotnetNuke/V3V4TippsTricks/Suchindexl%C3%B6schen/tabid/134/Default.aspx" target="_blank"&gt;this post&lt;/a&gt;):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;If by accident the search index got corrupted, there will be no serach results displayed any further and you have to delete the search index tables manually. Follow these steps:&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;Login as Superuser (&amp;quot;host&amp;quot; by default)      &lt;br /&gt;In Host Menu select item &amp;quot;SQL&amp;quot;      &lt;br /&gt;Copy the following 4 lines and paste them into the text box:      &lt;br /&gt;truncate table {databaseOwner}{objectQualifier}SearchItemWordPosition      &lt;br /&gt;DELETE {databaseOwner}{objectQualifier}SearchItemWord      &lt;br /&gt;DELETE {databaseOwner}{objectQualifier}SearchWord      &lt;br /&gt;DELETE {databaseOwner}{objectQualifier}SearchItem      &lt;br /&gt;Activate the check box and hit Run      &lt;br /&gt;The search index will be rebuilt automatically by the scheduler.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(Although this is the right way, I've found that a DELETE {databaseOwner}{objectQualifier}SearchItem will be sufficient. If you don't have a special db owner or a specific object qualifier, a DELETE from SearchItem will do the same job, either on your SQL Server Management Studio or your Host-SQL page).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Also, you don't have to wait for the scheduler. Go to host-search admin and rebuild the index yourself.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Second try - checking and correcting the SupportedFeatures field on the DesktopModules table&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, starting with a clean index didn't help, so I searched further. What I found surprised me. Let's see what &lt;a href="http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/118/threadid/151544/scope/posts/threadpage/2/Default.aspx" target="_blank"&gt;this post&lt;/a&gt; says:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;It seems that the desktopmodules table has a supportedfeatures field that should be set to 0 or higher.&amp;#160; But sometimes when modules are installed they end up with a -1 so this causes the error.&amp;#160; Setting the fields to 0 when they are -1 fixes it, like so:&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;UPDATE [databasename].[dbo].[DesktopModules]     &lt;br /&gt;&amp;#160;&amp;#160; SET [SupportedFeatures] = 0      &lt;br /&gt; WHERE [SupportedFeatures] = -1&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;This is for SQL Server Express... don't know how it would work in the SQL page of DNN.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, I did a check on my own DesktopModules table. And suprise, surprise, two modules had a value of -1 for the SupportedFeatures field. As expected, these were the two modules that were generating the exceptions and blocked the indexer from indexing the whole site.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I did what the post said, and kaboom! Indexer worked perfectly, no more exceptions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What the SupportedFeatures field actually does&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What troubled me was what this field actually represents. I had values of 6, 7, 0 etc in other modules' records. So I dug a bit further and found &lt;a href="http://web3.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/threadid/307511/scope/posts/Default.aspx" target="_blank"&gt;this post&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;This is a bit field where&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;2^0 = 1 indicates IPortable&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;2^1 = 2 indicates iSearchable&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;2^2 = 4 indicates iUpgradable&lt;/em&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;em&gt;add those values for&amp;#160; combinations (i.e. 7 = 1 +2+4 = IPortable,iSearchable and iUpgradable)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So this solved the mystery. Those two modules were installed in a wrong way and got an invalid value of -1 for their SupportedFeatures field, which in turn caused the exceptions when the Search Indexer ran.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Where and when can this happen?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My DNN site was version 5.2.2, but as far as I understand this thing can happen on various DNN versions, depending on the modules installed and how well the installation process is executed. I can't say that exceptions from the Search Indexer are always due to this particular problem, so use this proposed solution with extreme caution if it happens to you, and always have a database backup handy!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-5964452283273464695?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dfzH_9QNq5N6VDLD7QHMlSY8RcA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dfzH_9QNq5N6VDLD7QHMlSY8RcA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dfzH_9QNq5N6VDLD7QHMlSY8RcA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dfzH_9QNq5N6VDLD7QHMlSY8RcA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/UQIcGR2i0U8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/5964452283273464695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=5964452283273464695" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5964452283273464695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5964452283273464695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/UQIcGR2i0U8/supportedfeatures-field-search-indexer.html" title="SupportedFeatures field, Search Indexer exceptions, oh my." /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/10/supportedfeatures-field-search-indexer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8MSH08fyp7ImA9WxFbEUQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-9174549577713034066</id><published>2010-07-04T01:33:00.008+03:00</published><updated>2010-07-04T01:58:09.377+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-04T01:58:09.377+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><title>(Not a) tutorial: Creating my first DNN scheduled task</title><content type="html">&lt;p&gt;In this post, I’ll describe my (successful) attempt to create a basic email queue functionality using a custom DNN scheduled task.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Why not a tutorial? Because my intention is to show you what I have done, without telling you that this is the right (or the only) way to do it, or demonstrating this as a techically complete and correct solution. This work is far from finished – it just covers basic functionality and is not usable out of the box. But if you’re struggling with DNN scheduled tasks, reading below may provide you with a way to get started.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I found great help in &lt;a href="http://kemmis.info/blog/archive/2008/03/08/how-to-write-a-custom-dotnetnuke-schedulerclient-i.e.-a-scheduled.aspx" target="_blank"&gt;this excellent post here&lt;/a&gt;, which you should read for more information on creating your own scheduled tasks in DNN. Actually, this article here is a simple application of the tutorial I found in that post. Read it, it’ll be extremely helpful.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let’s get to the point. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I had the need to notify custom groups of DNN registered users upon submission of some forms created either with the XMOD Pro or the Datasprings Dynamic Forms module. Although both modules support sending emails upon submission, they are restricted to sending emails to specific people, lists, or roles. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I needed something more complex, such as a database query based on several tables, in order to determine who would get the notification. Both modules allow issuing queries to the database upon submission, so it seemed right to create my own email queue, consisting of a database table (the queue) and a scheduled task to send the mails.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;What’s more, a queue can help where there is a bunch of emails to be sent – let’s say you need to send 1k emails upon the next form submission – you don’t have to send them all at once. You just send a dozen each time the scheduled task is ran, until the queue is empty.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Database objects&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So – what did I need first? Of course, a table to hold my queue.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: auto; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt; [dbo].[DotSee_MailQueue]( &lt;br /&gt;    [MailID] [&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;] &lt;span style="color: #0000ff"&gt;IDENTITY&lt;/span&gt;(1,1) &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [FromUser] [nvarchar](500) &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [ToUser] [nvarchar](500) &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [Subject] [nvarchar](500) &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [BodyHtml] [nvarchar](&lt;span style="color: #0000ff"&gt;max&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;NULL&lt;/span&gt;, &lt;br /&gt;&lt;span style="color: #0000ff"&gt;CONSTRAINT&lt;/span&gt; [PK_DotSee_MailQueue] &lt;span style="color: #0000ff"&gt;PRIMARY&lt;/span&gt; &lt;span style="color: #0000ff"&gt;KEY&lt;/span&gt; &lt;span style="color: #0000ff"&gt;CLUSTERED&lt;/span&gt; &lt;br /&gt;( &lt;br /&gt;    [MailID] &lt;span style="color: #0000ff"&gt;ASC&lt;/span&gt; &lt;br /&gt;)&lt;span style="color: #0000ff"&gt;WITH&lt;/span&gt; (PAD_INDEX  = &lt;span style="color: #0000ff"&gt;OFF&lt;/span&gt;, STATISTICS_NORECOMPUTE  = &lt;span style="color: #0000ff"&gt;OFF&lt;/span&gt;, IGNORE_DUP_KEY = &lt;span style="color: #0000ff"&gt;OFF&lt;/span&gt;, ALLOW_ROW_LOCKS  = &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;, ALLOW_PAGE_LOCKS  = &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;FILLFACTOR&lt;/span&gt; = 80) &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt; [&lt;span style="color: #0000ff"&gt;PRIMARY&lt;/span&gt;] &lt;br /&gt;) &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt; [&lt;span style="color: #0000ff"&gt;PRIMARY&lt;/span&gt;] &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Yes, it’s a silly table but enough for my basic functionality: From, To, Subject, Body and an id. All the necessary information to send an email.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Then I needed a stored procedure to retrieve information from that table:&lt;/p&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: auto; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;PROCEDURE&lt;/span&gt; [dbo].[DotSee_GetMailQueueItems] &lt;br /&gt;&lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; NOCOUNT &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;Select&lt;/span&gt; &lt;span style="color: #0000ff"&gt;top&lt;/span&gt; 10 [MailID],[FromUser],[ToUser],[Subject],[BodyHtml] &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; [dbo].[DotSee_MailQueue] &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;END&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Note: I prefix my tables with “DotSee_” since this is the name I have selected for my custom work (namespaces included, as you’ll see below). Don’t give it serious attention, it’s just my convention.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Setting up a project for my scheduled task&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;There are more than one ways to begin creating a scheduled job for DotNetNuke using Visual Studio, but there is a common denominator: Your job MUST be a DLL file in DotNetNuke’s bin directory. So you can go either with a Web Application Project or with a Class Library. I chose Class Library. Here’s what I did:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Created a new Class Library project. &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Added a reference to DotNetNuke.dll from an existing DNN installation (and set Copy Local to false) &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Added a reference to Microsoft.ApplicationBlocks.Data from the same DNN installation (in order to be able to use DNN’s own DAL for interacting with the database) &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Set the build path INSIDE DNN’s bin folder to save me time copying and recopying the dll. &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Went to the project’s properties and deleted the contents of the root namespace field. Yes, it should be empty for your dll to work. Don’t miss that. &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_GEekUYeFuZ0/TC-6u3R7LZI/AAAAAAAAAyo/PNFEiBwDFxQ/s1600-h/sche1%5B6%5D.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sche1" border="0" alt="sche1" src="http://lh5.ggpht.com/_GEekUYeFuZ0/TC-6vyM-a5I/AAAAAAAAAys/ljOc3XFFkKo/sche1_thumb%5B4%5D.jpg?imgmax=800" width="420" height="118" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Regarding (4), I did this work on a virtual machine, where I had a DNN installation and my class library project on the same computer. I suggest you follow some similar approach, since it is very easy to test and debug (you can debug only by attaching to the w3wp.exe process, but it’s better than nothing). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Writing the code&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Two more things you must know: Your custom class must inherit DotNetNuke.Services.Scheduling.SchedulerClient and the only method that is called by DNN’s scheduler is DoWork(). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;So here’s my custom scheduler class:&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;Imports&lt;/span&gt; DotNetNuke.Services.Scheduling &lt;br /&gt;&lt;span style="color: #0000ff"&gt;Imports&lt;/span&gt; DotNetNuke.Services.Exceptions &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;Imports&lt;/span&gt; System &lt;br /&gt;&lt;span style="color: #0000ff"&gt;Imports&lt;/span&gt; System.Web &lt;br /&gt;&lt;span style="color: #0000ff"&gt;Imports&lt;/span&gt; System.IO &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;Namespace&lt;/span&gt; DotSee.DnnScheduledMailNotifier &lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Class&lt;/span&gt; Mailer &lt;br /&gt;        &lt;span style="color: #0000ff"&gt;Inherits&lt;/span&gt; SchedulerClient &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;' requires a special constructor which &lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;' accepts a ScheduleHistoryItem &lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New&lt;/span&gt;( _ &lt;br /&gt;            &lt;span style="color: #0000ff"&gt;ByVal&lt;/span&gt; objScheduleHistoryItem _ &lt;br /&gt;            &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; ScheduleHistoryItem) &lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;MyBase&lt;/span&gt;.&lt;span style="color: #0000ff"&gt;New&lt;/span&gt;() &lt;br /&gt;            &lt;span style="color: #0000ff"&gt;Me&lt;/span&gt;.ScheduleHistoryItem = objScheduleHistoryItem &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Overrides&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; DoWork() &lt;br /&gt;            &lt;span style="color: #0000ff"&gt;Try&lt;/span&gt; &lt;br /&gt;                &lt;span style="color: #008000"&gt;' perform some tasks &lt;/span&gt;&lt;br /&gt;                MailWorker.DoWork() &lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #008000"&gt;' report success to the scheduler framework &lt;/span&gt;&lt;br /&gt;                ScheduleHistoryItem.Succeeded = &lt;span style="color: #0000ff"&gt;True&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;Catch&lt;/span&gt; ex &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Exception &lt;br /&gt;&lt;br /&gt;                ScheduleHistoryItem.Succeeded = &lt;span style="color: #0000ff"&gt;False&lt;/span&gt; &lt;br /&gt;                ScheduleHistoryItem.AddLogNote _ &lt;br /&gt;                    (&lt;span style="color: #006080"&gt;&amp;quot;EXCEPTION&amp;quot;&lt;/span&gt; + ex.ToString()) &lt;br /&gt;                Errored(ex) &lt;br /&gt;                Exceptions.LogException(ex) &lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Try&lt;/span&gt; &lt;br /&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Class&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Namespace&lt;/span&gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Apart from the MailWorker.DoWork() line (code coming right below), the class can be used as a template for writing your own scheduled tasks. (You will use your own namespace, of course). I put my specific code in a different class so that it would be easy to make the distinction between code needed for my specific need and the “template” code that every DNN scheduled task needs.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Here’s my MailWorker class (DotNetNuke.dll referenced was version 5.2.1, GetHostSettingsDictionary may not work with 4.x):&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;Imports DotNetNuke.Services.Mail&lt;br /&gt;Imports DotNetNuke&lt;br /&gt;Imports DotNetNuke.&lt;span style="color: #0000ff"&gt;Data&lt;/span&gt;&lt;br /&gt;Imports DotNetNuke.Entities.&lt;span style="color: #0000ff"&gt;Host&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Namespace DotSee.DnnScheduledMailNotifier&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Class&lt;/span&gt; MailWorker&lt;br /&gt;&lt;br /&gt;        Private Sub &lt;span style="color: #0000ff"&gt;New&lt;/span&gt;()&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; Sub&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;Public&lt;/span&gt; Shared Sub DoWork()&lt;br /&gt;&lt;br /&gt;            Dim d &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Dictionary&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;Of&lt;/span&gt; String, String)&lt;br /&gt;            d = &lt;span style="color: #0000ff"&gt;Host&lt;/span&gt;.GetHostSettingsDictionary()&lt;br /&gt;&lt;br /&gt;            Dim dnp &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; DataProvider&lt;br /&gt;            dnp = DataProvider.Instance&lt;br /&gt;            Dim dr &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; IDataReader&lt;br /&gt;&lt;br /&gt;            Dim ids &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New&lt;/span&gt; List(&lt;span style="color: #0000ff"&gt;Of&lt;/span&gt; Int32)&lt;br /&gt;&lt;br /&gt;            dr = dnp.ExecuteReader( _&lt;br /&gt;                &amp;quot;DotSee_GetMailQueueItems&amp;quot;, Nothing)&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Not&lt;/span&gt; dr.&lt;span style="color: #0000ff"&gt;Read&lt;/span&gt;() &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Return&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;While&lt;/span&gt; dr.&lt;span style="color: #0000ff"&gt;Read&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                Mail.SendMail( _&lt;br /&gt;                    dr(&amp;quot;fromuser&amp;quot;).ToString _&lt;br /&gt;                    , dr(&amp;quot;touser&amp;quot;).ToString _&lt;br /&gt;                    , &amp;quot;&amp;quot; _&lt;br /&gt;                    , dr(&amp;quot;subject&amp;quot;).ToString _&lt;br /&gt;                    , dr(&amp;quot;bodyhtml&amp;quot;).ToString _&lt;br /&gt;                    , &amp;quot;&amp;quot; _&lt;br /&gt;                    , &amp;quot;&amp;quot; _&lt;br /&gt;                    , d(&amp;quot;SMTPServer&amp;quot;) _&lt;br /&gt;                    , d(&amp;quot;SMTPAuthentication&amp;quot;) _&lt;br /&gt;                    , d(&amp;quot;SMTPUsername&amp;quot;) _&lt;br /&gt;                    , d(&amp;quot;SMTPPassword&amp;quot;) _&lt;br /&gt;                    )&lt;br /&gt;&lt;br /&gt;                ids.&lt;span style="color: #0000ff"&gt;Add&lt;/span&gt;(CType(dr(&amp;quot;mailid&amp;quot;), Int32))&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;While&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;For&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Each&lt;/span&gt; id &lt;span style="color: #0000ff"&gt;In&lt;/span&gt; ids&lt;br /&gt;                dnp.ExecuteSQL( _&lt;br /&gt;                    String.Format( _&lt;br /&gt;                        &amp;quot;&lt;span style="color: #0000ff"&gt;DELETE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; DotSee_MailQueue &lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt; mailid={0}&amp;quot; _&lt;br /&gt;                        , id.ToString))&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; Sub&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;End&lt;/span&gt; Namespace&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;What it actually does (in a brutal way, I should add) is check the table, get 10 items at a time (via the DotSEe_GetMailQueueItems stored procedure defined earlier), send an email for each of the items and then delete the corresponding records from the table. (Ok, I know the way it does it sucks a bit, but It’s only quick and dirty functionality, remember).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So when I compile this beauty, my DotSee.DNNScheduledMailNotifier.dll goes inside DNN’s bin folder, and now what I have to do is tell DNN that this is a scheduled task and that the scheduler should include it. Here’s how:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Host-Schedule and click “Add Item to Schedule”.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set friendly name to whatever you want&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Full class name and assembly should be your assembly name and your class name (the class containing the DoWork method) combined, as in AssemblyName.Classname. My Assembly’s name is DotSee.DnnScheduledMailNotifier and my class name is Mailer, so the full name is DotSee.DnnScheduledMailNotifier.Mailer.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Check the “schedule enabled” checkbox&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Time lapse MUST have some value or else the task will not run at all.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_GEekUYeFuZ0/TC-6w1zPXQI/AAAAAAAAAyw/f6ARhfwKnHY/s1600-h/sche2%5B4%5D.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sche2" border="0" alt="sche2" src="http://lh6.ggpht.com/_GEekUYeFuZ0/TC-6x6uH0zI/AAAAAAAAAy0/pYS-r2N6QLA/sche2_thumb%5B2%5D.jpg?imgmax=800" width="420" height="261" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That’s it! The task is ready to run. I tested it by manually inserting records into the DotSee_MailQueue table and it worked well, even with hundreds of records, sending 10 emails every 5 seconds. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;So now I have my basic system ready. When I need to send emails to groups of people not defined by roles or other DNN constructs, I just have to write a good SQL query that fills the table with recipients that correspond to the criteria I need every time and presto!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Of course, there’s plenty of room for configuration / parameterization (for example, the number of emails sent each time or the type of email – html or plain text, or even a check for whether delivery was successful). But I guess you got the idea. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Thank you for your time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-9174549577713034066?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vSwkxSw1phoZnoew-8QHyndBcmo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vSwkxSw1phoZnoew-8QHyndBcmo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vSwkxSw1phoZnoew-8QHyndBcmo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vSwkxSw1phoZnoew-8QHyndBcmo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/Xmef1GSi8KA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/9174549577713034066/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=9174549577713034066" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/9174549577713034066?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/9174549577713034066?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/Xmef1GSi8KA/not-tutorial-creating-my-first-dnn.html" title="(Not a) tutorial: Creating my first DNN scheduled task" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_GEekUYeFuZ0/TC-6vyM-a5I/AAAAAAAAAys/ljOc3XFFkKo/s72-c/sche1_thumb%5B4%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>7</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/07/not-tutorial-creating-my-first-dnn.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0INRnYzfCp7ImA9WxFREU4.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-3069686188434631856</id><published>2010-04-24T18:12:00.001+03:00</published><updated>2010-04-24T23:06:37.884+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-24T23:06:37.884+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>ModuleMaster, an admin module that was really missing from DNN</title><content type="html">&lt;p&gt;&lt;a href="http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15592"&gt;ModuleMaster&lt;/a&gt; is what I was looking for (and often considered developing myself). It can link modules – along with their settings – on the pages of your choice. Simple as that, but DNN doesn’t give you this option – you can either mark a module as “displayed in all pages”, in which case you only have linked modules to your original one – meaning that if you change something in one, it’ll change in every linked module, or copy the module by hand and then apply settings by hand (IPortable is not always well-implemented).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This module is a time-saver, especially for sites that have a number of pages already developed (and more especially if you’re using templates to create new pages). &lt;strike&gt;Imagine the scenario where the client asks you to apply a new text/html module, for example, in about 500 pages that you have already created, demanding to be able to edit each one of them independently of the others and needing to use a specific container. Count the DAYS it’ll take you to do it by hand&lt;/strike&gt;. EDIT: Unfortunately, as I realised later, the module just creates “shadow” copies – i.e., links and not new instances, but remains useful whatsoever.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If anybody tries it, please post a comment here. I haven’t tried it yet, but looks very promising and it already has a couple of good reviews on SnowCovered.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-3069686188434631856?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/K6u5LjLjT_bUd9UCJkGD_DsBCn4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/K6u5LjLjT_bUd9UCJkGD_DsBCn4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/K6u5LjLjT_bUd9UCJkGD_DsBCn4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/K6u5LjLjT_bUd9UCJkGD_DsBCn4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/3LCrqDn1AJI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/3069686188434631856/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=3069686188434631856" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3069686188434631856?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3069686188434631856?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/3LCrqDn1AJI/modulemaster-admin-module-that-was.html" title="ModuleMaster, an admin module that was really missing from DNN" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/04/modulemaster-admin-module-that-was.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIBSH8yeip7ImA9WxBaFk0.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-6370741039593437400</id><published>2010-03-26T13:39:00.001+02:00</published><updated>2010-03-26T13:39:19.192+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-26T13:39:19.192+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Using page titles instead of names on the DNN breadcrumb skinobject</title><content type="html">&lt;p&gt;Simple, but useful. A fellow developer needed to use the page title (and not the page name which is the default) on the breadcrumb skinobject of his skin. The reason was that his menu had limited real estate so he had to keep names short, but he needed to give more information on the navigation breadcrumb.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The solution is just so simple! In your skin’s .ascx file, you’ll see a definition like the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;&amp;lt;dnn:BREADCRUMB runat=&amp;quot;server&amp;quot; id=&amp;quot;dnnBREADCRUMB&amp;quot;&amp;#160; CssClass=&amp;quot;Breadcrumb&amp;quot; RootLevel=&amp;quot;0&amp;quot; Separator=&amp;quot;&amp;amp;nbsp;&amp;gt;&amp;amp;nbsp;&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;If you add the following attribute:&lt;/p&gt;  &lt;p align="left"&gt;UseTitle=&amp;quot;True&amp;quot;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;You’ll have something like this:&lt;/p&gt;  &lt;p align="left"&gt;&amp;lt;dnn:BREADCRUMB runat=&amp;quot;server&amp;quot; id=&amp;quot;dnnBREADCRUMB&amp;quot;&amp;#160; CssClass=&amp;quot;Breadcrumb&amp;quot; RootLevel=&amp;quot;0&amp;quot; Separator=&amp;quot;&amp;amp;nbsp;&amp;gt;&amp;amp;nbsp;&amp;quot; UseTitle=&amp;quot;True&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;And then your breadcrumb will be using page titles instead of names. &lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Enjoy.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-6370741039593437400?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/c9xG0Km1s5CJSgFcKuwCIDi4yIc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c9xG0Km1s5CJSgFcKuwCIDi4yIc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/c9xG0Km1s5CJSgFcKuwCIDi4yIc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c9xG0Km1s5CJSgFcKuwCIDi4yIc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/2QsXIgSyGnU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/6370741039593437400/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=6370741039593437400" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/6370741039593437400?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/6370741039593437400?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/2QsXIgSyGnU/using-page-titles-instead-of-names-on.html" title="Using page titles instead of names on the DNN breadcrumb skinobject" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/03/using-page-titles-instead-of-names-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcGQn45fCp7ImA9WxBaFk0.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-1649589656990627943</id><published>2010-03-26T13:13:00.001+02:00</published><updated>2010-03-26T13:13:43.024+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-26T13:13:43.024+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>Quick snippet: Show first n characters of a string without cutting words in half with OWS</title><content type="html">&lt;p&gt;Just a quickie for those of you who use the free &lt;a href="http://www.openwebstudio.com/" target="_blank"&gt;Open Web Studio&lt;/a&gt; DNN RAD environment: I needed to show only the first n characters of a string that I got via a query in OWS, but wanted to “stop” display at the end of a word, (that is, not being very strict on the n character limit). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If our field is, for example, called “description” and the character limit is, let’s say, 100, and we need to insert three dots (…) after the end of the string if it’s only part of the original, here’s the function (be sure to write it on a single line):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;{IIF, &amp;quot;[FORMAT,&amp;quot;[description]&amp;quot;, {LENGTH}]&amp;gt;100&amp;quot;, &amp;quot;[FORMAT,&amp;quot;[description]&amp;quot;, {LEFT:[FORMAT,&amp;quot;[FORMAT, &amp;quot;[description]&amp;quot;, {LEFT:100}]&amp;quot;,{LASTINDEXOF: }]}]...&amp;quot;,&amp;quot;[description]&amp;quot;}&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Change the field name, the number of characters and the three dots at the end to whatever suits you.&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Of course there are several ways to achieve that via your SQL query itself, but that’s a quick way to do it in OWS if you can’t modify the query (when you’re using a view that is used somewhere else, for example).&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Enjoy.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-1649589656990627943?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PxeK6dwcGEzxMrtgMOrZ19_IVAc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PxeK6dwcGEzxMrtgMOrZ19_IVAc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PxeK6dwcGEzxMrtgMOrZ19_IVAc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PxeK6dwcGEzxMrtgMOrZ19_IVAc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/ISTAaqvxa7Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/1649589656990627943/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=1649589656990627943" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1649589656990627943?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1649589656990627943?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/ISTAaqvxa7Y/quick-snippet-show-first-n-characters.html" title="Quick snippet: Show first n characters of a string without cutting words in half with OWS" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/03/quick-snippet-show-first-n-characters.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4ESXs6eSp7ImA9WxBbFkk.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-2816960943703354288</id><published>2010-03-15T10:15:00.001+02:00</published><updated>2010-03-15T10:15:08.511+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-15T10:15:08.511+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>Free search/replace admin module from Engage Software</title><content type="html">&lt;p align="left"&gt;&lt;a href="http://www.engagesoftware.com/Products/Modules/Engage_F3.aspx" target="_blank"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="f3" border="0" alt="f3" align="left" src="http://lh4.ggpht.com/_GEekUYeFuZ0/S53siyM3U2I/AAAAAAAAAx4/zjmZwKKITVM/f3%5B6%5D.jpg?imgmax=800" width="150" height="200" /&gt;&lt;/a&gt; This one is cute. It,s called &lt;a href="http://www.engagesoftware.com/Products/Modules/Engage_F3.aspx" target="_blank"&gt;Engage F3&lt;/a&gt; and it lets you search and replace text in Text/Html and Engage Publish modules, site-wide. It’s intended for admin use only.&lt;/p&gt;  &lt;p align="left"&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;You can &lt;a href="http://www.snowcovered.com/snowcovered2/default.aspx?tabid=242&amp;amp;PackageID=17037" target="_blank"&gt;download it for free&lt;/a&gt; from Snowcovered. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-2816960943703354288?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3PUv9n7C55jIdySlI-0Q8Rds-_U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3PUv9n7C55jIdySlI-0Q8Rds-_U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3PUv9n7C55jIdySlI-0Q8Rds-_U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3PUv9n7C55jIdySlI-0Q8Rds-_U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/3zXrLf-L4lw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/2816960943703354288/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=2816960943703354288" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/2816960943703354288?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/2816960943703354288?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/3zXrLf-L4lw/free-searchreplace-admin-module-from.html" title="Free search/replace admin module from Engage Software" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_GEekUYeFuZ0/S53siyM3U2I/AAAAAAAAAx4/zjmZwKKITVM/s72-c/f3%5B6%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/03/free-searchreplace-admin-module-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQAQ3o-eyp7ImA9WxBUEEU.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-829544827423734565</id><published>2010-02-25T10:25:00.001+02:00</published><updated>2010-02-25T10:25:42.453+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-25T10:25:42.453+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>Free HTML Template Repeater module – TEXT/HTML replacement</title><content type="html">&lt;p&gt;A simple idea, but someone had to conceive it and develop it. We often need to repeat a template made for a text/html module, without necessarily having the data stored in the database. Moreover, we need to give editors an easy way to enter data without having to know HTML to edit the markup. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There already are solutions, like &lt;a href="http://www.openwebstudio.com/" target="_blank"&gt;Open Web Studio&lt;/a&gt; (formerly Listx) and the core &lt;a href="http://www.formandlist.com/" target="_blank"&gt;Form and List&lt;/a&gt; module (formerly User Defined Table) module which can achieve similar results, but in a more complex and time-consuming way for the developer when it comes to simple, non-database-bound implementations like the one described above. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enter &lt;strong&gt;HTML Template Repeater&lt;/strong&gt;, created by &lt;a href="http://www.softwaresedge.com" target="_blank"&gt;Software’s Edge&lt;/a&gt;. You can define a template just as you would normally do in a Text/HTML module, defining placeholders for “variables” that you need to be replaced when the module output is rendered. The module provides you with a form to create “records” based on those variables and then you can repeat your template for as many records as you have entered. It even has paging functionality!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can &lt;a href="http://htrm.codeplex.com/Release/ProjectReleases.aspx" target="_blank"&gt;download the module from Codeplex&lt;/a&gt;, or &lt;a href="http://www.softwaresedge.com/Products/HTMLTemplateRepeater/tabid/73/Default.aspx" target="_blank"&gt;see a video tutorial here&lt;/a&gt;. Another blog post / tutorial on the module is &lt;a href="http://www.softwaresedge.com/Blog/ARedirection/tabid/64/EntryId/2/HTML-Template-Repeater-released.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-829544827423734565?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q-BXIRSLjvkfcFMDYi8lPaPOkJQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q-BXIRSLjvkfcFMDYi8lPaPOkJQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q-BXIRSLjvkfcFMDYi8lPaPOkJQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q-BXIRSLjvkfcFMDYi8lPaPOkJQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/JVwpsCB6m_g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/829544827423734565/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=829544827423734565" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/829544827423734565?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/829544827423734565?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/JVwpsCB6m_g/free-html-template-repeater-module.html" title="Free HTML Template Repeater module – TEXT/HTML replacement" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/02/free-html-template-repeater-module.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AHQ306cSp7ImA9WxBUEEU.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-4162282759675163309</id><published>2010-02-25T10:15:00.001+02:00</published><updated>2010-02-25T10:15:32.319+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-25T10:15:32.319+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Utilities" /><title>ERD Data Model and Meta Data Dictionary for DNN CE 5.2.2</title><content type="html">&lt;p&gt;Mr. Chodnicki from &lt;a href="http://www.r2integrated.com" target="_blank"&gt;R2integrated&lt;/a&gt; has created a very useful data model and meta data dictionary for DotNetNuke Community Edition 5.2.2, which you can download &lt;a href="http://www.r2integrated.com/Blog/Entry/ERD_Data_Model_and_Meta_Data_Dictionary_for_DNN_CE_5_2_2.aspx" target="_blank"&gt;by clicking here&lt;/a&gt;. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-4162282759675163309?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M0IYzge-p59gtpxHPau_9DtGVV0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M0IYzge-p59gtpxHPau_9DtGVV0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M0IYzge-p59gtpxHPau_9DtGVV0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M0IYzge-p59gtpxHPau_9DtGVV0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/PEO_iQGvcm8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/4162282759675163309/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=4162282759675163309" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/4162282759675163309?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/4162282759675163309?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/PEO_iQGvcm8/erd-data-model-and-meta-data-dictionary.html" title="ERD Data Model and Meta Data Dictionary for DNN CE 5.2.2" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2010/02/erd-data-model-and-meta-data-dictionary.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EESXw9eCp7ImA9WxNSFks.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-352769156395075215</id><published>2009-08-30T20:30:00.001+03:00</published><updated>2009-08-30T23:53:28.260+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-30T23:53:28.260+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Displaying a “no search results” message when no search results are found</title><content type="html">&lt;p&gt;In earlier (4.x) DNN versions, when you make a search and it yields no results you are presented with an empty search results page – without any message. It’s silly, but nobody ever included this as a feature. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks to &lt;a href="http://www.allaboutduncan.com/2008/dotnetnuke-no-search-results-message/" target="_blank"&gt;this post&lt;/a&gt;, I found a way to include a “no search results” message. Or course, there are plenty of ways to do that, but I think this is the fastest. You’ll have to edit the &lt;strong&gt;admin/search/searchresults.ascx&lt;/strong&gt; file as follows:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First, find this line and add what’s written in big, bold letters:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#000000"&gt;&amp;lt;asp:HyperLink&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”lnkTitle”&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”server”&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;strong&gt;&lt;font size="4"&gt;&lt;font color="#000000"&gt;Name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”result”&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;CssClass&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”SubHead”&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;NavigateUrl&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;’&amp;lt;%&lt;/font&gt;&lt;font color="#0000ff"&gt;#&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;DataBinder.Eval(Container.DataItem,”Guid”))&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;%&amp;gt;’&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Text&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;’&amp;lt;%&lt;/font&gt;&lt;font color="#0000ff"&gt;#&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;DataBinder.Eval(Container.DataItem,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;“Title”)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;%&amp;gt;’&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;/asp:HyperLink&amp;gt;&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Then add the following code directly under the last line of the file:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#000000"&gt;&amp;lt;div&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;id&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”NoResults”&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;h3&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;class=&lt;/font&gt;&lt;font color="#000000"&gt;”red”&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;style&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”text-align:center”&amp;gt;No&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Search&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Results&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Found&amp;lt;/h3&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;/div&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;script&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;language&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;”Javascript”&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;search&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;search&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;font color="#000000"&gt;.getElementsByName(”result”)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(search.length&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;==&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;font color="#000000"&gt;.getElementById(”NoResults”).style.display&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;’block’&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;font color="#000000"&gt;.getElementById(”NoResults”).style.display&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;’none’&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Change the “No Search Results Found” string to whatever you like and you’ll have your “no results” message when your search yields nothing. Of course, you can also change the h3 tag with whatever you like, even include an image. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I don’t know what’s going on with 5.x versions since I haven’t tried it yet in one, but I think it’s still an interesting tweak for 4.x versions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;EDIT: This may not work if you leave the single and double quotes as they are in the code above. Better paste the code to Notepad first. Sorry about that, but I didn’t have the time to replace. (Live Writer can be very unfriendly sometimes :) )&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-352769156395075215?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Y6GtvCcM11mA--jTlS9J8BDQ3mY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y6GtvCcM11mA--jTlS9J8BDQ3mY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Y6GtvCcM11mA--jTlS9J8BDQ3mY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y6GtvCcM11mA--jTlS9J8BDQ3mY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/PMT783sR4Mg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/352769156395075215/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=352769156395075215" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/352769156395075215?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/352769156395075215?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/PMT783sR4Mg/displaying-no-search-results-message.html" title="Displaying a “no search results” message when no search results are found" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2009/08/displaying-no-search-results-message.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AHQns5fCp7ImA9WxJTGE8.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7772674696161458843</id><published>2009-04-27T13:55:00.001+03:00</published><updated>2009-04-27T13:55:33.524+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-27T13:55:33.524+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web" /><title>DnnGallery.net – a place to showcase your DNN sites</title><content type="html">&lt;p&gt;One of the questions I have always found hard to answer is “ok, but show me some ‘wow’ sites made with DotNetNuke”. I always had a hard time finding some sites till I read a post about &lt;a href="http://www.dnngallery.net"&gt;www.dnngallery.net&lt;/a&gt; at the DotNetNuke forums.I think it’s pretty interesting, provided that the “Showcase” section at the official DotNetNuke site is dead and that there is no other place (none that I know of, at least) where one can see and rate some worthy DNN sites. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;DnnGallery allows you to submit your DNN site and lets other users rate it. You will find some interesting implementations there, let’s hope that more DNN publishers participate in the future.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7772674696161458843?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1HchMEIpB7uC8N0GPOxBNCT_4nE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1HchMEIpB7uC8N0GPOxBNCT_4nE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1HchMEIpB7uC8N0GPOxBNCT_4nE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1HchMEIpB7uC8N0GPOxBNCT_4nE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/cs-K1Db-B7k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7772674696161458843/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7772674696161458843" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7772674696161458843?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7772674696161458843?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/cs-K1Db-B7k/dnngallerynet-place-to-showcase-your.html" title="DnnGallery.net – a place to showcase your DNN sites" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2009/04/dnngallerynet-place-to-showcase-your.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMGQ387cCp7ImA9WxJTE04.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-8181248592699738139</id><published>2009-04-21T19:47:00.001+03:00</published><updated>2009-04-21T19:47:02.108+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-21T19:47:02.108+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><title>UDT 03.05.01 and incorrect filtering of script in text/html fields</title><content type="html">&lt;p&gt;Those of you using the latest version of the old User Defined Table module (which is to be replaced by the Form and List module in DNN 5.x) may have noticed an annoying bug that makes the UDT module insist on filtering out script, object and embed tags even when you have specifically specified that you don’t want it to.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What does this mean? It means that you can’t embed YouTube videos, for example, because UDT will filter out the embed code’s tags.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When does it happen? Well, fortunately it doesn’t happen when you’re admin or host. But it does happen if you’ve given other users edit rights on UDT data. Any user that is not Admin or Host cannot write these tags in the HTML view of a Text/HTML field inside a User Defined Table. They are just filtered out, even when the relevant setting is unchecked.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To fix that, you’ll need to download the code for UDT 03.05.01. The problem lies in file EditControls.vb, line 52:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;If&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ParentModule.Settings.ContainsKey(SettingName.ForceInputFiltering) &lt;/font&gt;&lt;font color="#0000ff"&gt;Then&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;inputFilterScript&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Not&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;isAdmin&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;inputFilterTags&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;isAnonymous&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;End&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;If&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The “if” clause in line 52 just checks whether the setting exists, not its value. To fix that you need to make the code in line 52 as follows:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;If&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ParentModule.Settings.ContainsKey(SettingName.ForceInputFiltering)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;AndAlso&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ParentModule.Settings(SettingName.ForceInputFiltering).Equals(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;True&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Then&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;inputFilterScript&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Not&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;isAdmin&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;inputFilterTags&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;isAnonymous&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;End&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;If&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(I apologise for the line breaks, please consider that the IF clause should be in a single line)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What I’ve done is that I have added a second condition that actually checks the VALUE of the setting and applies the rule only if it’s true.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can compile the code with that change and just replace the old dll file with the newly-compiled one in dotnetnuke’s Bin folder.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Please let me know if you’ve been having trouble with this, I’ve already got a compiled dll so I could send it to anyone who’s not into code much – although, as always, I must insist that you always try those things at your own risk!&lt;/p&gt;  &lt;p&gt;. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-8181248592699738139?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5hRlzLjCha2hZD2WLgvR-vyde0g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5hRlzLjCha2hZD2WLgvR-vyde0g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5hRlzLjCha2hZD2WLgvR-vyde0g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5hRlzLjCha2hZD2WLgvR-vyde0g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/g1NPoq72B2M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/8181248592699738139/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=8181248592699738139" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8181248592699738139?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8181248592699738139?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/g1NPoq72B2M/udt-030501-and-incorrect-filtering-of.html" title="UDT 03.05.01 and incorrect filtering of script in text/html fields" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2009/04/udt-030501-and-incorrect-filtering-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4MRH46cCp7ImA9WxVbF0o.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-8590675421628033171</id><published>2009-04-03T19:43:00.001+03:00</published><updated>2009-04-03T19:43:05.018+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-03T19:43:05.018+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>Replacing default module titles in search results with the corresponding tab’s title</title><content type="html">&lt;p&gt;How many times has it happened to you? You put some Text/HTML module here, a Links module there, maybe a third-party module and you forget to change its title, mostly because you’re using a container that doesn’t utilize it, or for any other reason.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This can lead to ugly search results, since DNN’s indexer stores the module’s &lt;strong&gt;title&lt;/strong&gt; in the &lt;strong&gt;SearchItem&lt;/strong&gt; table and uses it as the title for each one of your search results. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;On the other hand, you’ve got some module titles you’ve explicitly set and you need to preserve for your search results. So, you’ve only got to replace the DEFAULT titles with something – in my script, I chose to replace them with the corresponding tab’s title, but you could alter it and make it display anything – or even delete the record if you like.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So here’s a trigger that checks whether the row being written in the SearchItem table is for a module having the default title, and if so, changes the title to the corresponding tab’s title. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;CREATE&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;TRIGGER&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tr_FixSearchItemTitle&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;ON&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;dbo.SearchItem&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;AFTER&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;INSERT&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#0000ff"&gt;UPDATE&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;AS&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;BEGIN&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;-- SET NOCOUNT ON added to prevent extra result sets from     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;-- interfering with SELECT statements.     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;SET&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;NOCOUNT&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;ON;&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--These three variables will come from the     &lt;br /&gt;--searchitem table.      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@searchitemid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduleid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@title&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;nvarchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;200&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--These two will come from the&amp;#160; &lt;br /&gt;--modules table.      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduletitle&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;nvarchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;200&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduledefid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--This will come from the&amp;#160; &lt;br /&gt;--moduledefinitions table      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@friendlyname&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;nvarchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;200&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--This will come from the     &lt;br /&gt;--tabs table      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;declare&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@tabtitle&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;nvarchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;200&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--Get inserted values     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;@searchitemid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;searchitemid&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@title&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;title&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduleid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;inserted&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--Find moduletitle and definition id of the&amp;#160; &lt;br /&gt;--module being inserted in searchitems table.      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;@moduletitle&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduletitle&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduledefid&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;moduledefid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;modules&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduleid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduleid&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--Find the friendly name from the     &lt;br /&gt;--moduledefinitions table      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;@friendlyname&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;friendlyname&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduledefinitions&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduledefid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduledefid&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--If the title of the module in the searchitem table     &lt;br /&gt;--is equal to the module definition's friendly name      &lt;br /&gt;--then we can safely suppose that the module has&amp;#160; &lt;br /&gt;--the default title.      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@friendlyname&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@title&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;begin&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;--Get the tab's title     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;@tabtitle&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;title&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;tabs&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;--If we have multiple instances     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;--of modules in several pages,     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;--just get the first page. I know,     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;--this might be ugly but I've not found     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;--any other way.     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;top&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;1&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(tabid)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;tabmodules&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduleid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@moduleid&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;--Replace the default title with the page's title.     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;update&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;searchitem&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;set&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;title&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@tabtitle&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;searchitemid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@searchitemid&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;end&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;END&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;GO&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This trigger checks each entry in the &lt;strong&gt;SearchItem&lt;/strong&gt; table at the time it’s inserted or updated and determines whether the module title being inserted is a default title. It achieves that by comparing the module’s title with the &lt;strong&gt;FriendlyName&lt;/strong&gt; field of the &lt;strong&gt;ModuleDefinitions&lt;/strong&gt; table – all core modules and all third-party modules I know use this value as the default title. This means the trigger will probably work with any combination of modules you’ve installed in your site.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There’s a catch, though: If you have the same module instance (not the same module, the exact same instance – that means you’ve used the &lt;strong&gt;“add existing module”&lt;/strong&gt; option) in more than one page, it’ll get only one title for it – that is, if you’ve “added an existing module” to several pages, each search result that corresponds to such a module may have the wrong title – no problem if you’re not using multiple instances of modules.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another catch is that you &lt;strong&gt;have to have recursive triggers disabled for your database&lt;/strong&gt;, or this will execute forever – it will run itself again and again since it alters a newly inserted or updated record.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In order to see how this trigger handle things, you should delete everything from your SearchItem table and then do a reindex via the Host-&amp;gt;Search Admin page, or else the trigger will run only for new or updated entries.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As always, use at your own risk!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-8590675421628033171?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9Aac3enuyXFHw6FkQpfVvP7ifMQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9Aac3enuyXFHw6FkQpfVvP7ifMQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9Aac3enuyXFHw6FkQpfVvP7ifMQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9Aac3enuyXFHw6FkQpfVvP7ifMQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/4-4jyi9l_HQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/8590675421628033171/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=8590675421628033171" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8590675421628033171?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8590675421628033171?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/4-4jyi9l_HQ/replacing-default-module-titles-in.html" title="Replacing default module titles in search results with the corresponding tab’s title" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2009/04/replacing-default-module-titles-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YGQ3k_fCp7ImA9WxVREU0.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-1124102536278184121</id><published>2009-01-16T14:32:00.001+02:00</published><updated>2009-01-16T14:32:02.744+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-16T14:32:02.744+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><title>Using the PortalSettings class in containers</title><content type="html">&lt;p&gt;It’s simple, but useful: If you try to use the PortalSettings class in code you have added to a container’s&amp;#160; .ascx file, you’ll find out that you can’t. The PortalSettings shared class is only directly accessible from skins. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;That’s dissapointing, especially when you need to grab things like, for example, the current tab id (PortalSettings.ActiveTab.TabId) inside a container for some reeson.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The solution to this is to grab your PortalSettings contents from the HttpContext and use it like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#000000"&gt;&amp;lt;script&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_portalSettings&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;As&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;PortalSettings&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;_portalSettings&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;CType&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;HttpContext&lt;/font&gt;&lt;font color="#000000"&gt;.Current.Items(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;PortalSettings&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;PortalSettings)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;/script&amp;gt;&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In order to get, for example, the current tab id from your container, you can now use _portalSettings.ActiveTab.Tabid. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-1124102536278184121?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1J4GzJvjHi3j6O8btMrLKhqOXCo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1J4GzJvjHi3j6O8btMrLKhqOXCo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1J4GzJvjHi3j6O8btMrLKhqOXCo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1J4GzJvjHi3j6O8btMrLKhqOXCo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/tu_Vvw4ycfQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/1124102536278184121/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=1124102536278184121" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1124102536278184121?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1124102536278184121?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/tu_Vvw4ycfQ/using-portalsettings-class-in.html" title="Using the PortalSettings class in containers" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2009/01/using-portalsettings-class-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8MRn8ycSp7ImA9WxRbFEs.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-313970088172944842</id><published>2008-12-05T09:58:00.001+02:00</published><updated>2008-12-05T09:58:07.199+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-05T09:58:07.199+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><title>How to enable - disable caching programmatically and on-demand</title><content type="html">&lt;p&gt;Sometimes, when you're doing something programmatically, like moving tabs around, you really don't want caching in your way in any form, since there's a great danger it'll affect the outcome. For some reason, programmatically clearing the cache may not be enough - you just don't need any caching around when you do certain stuff, and you don't want to oblige any host user to manually clear the cache. Here's a really simple way to disable caching programmatically.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#006400"&gt;'Get the initial caching level     &lt;br /&gt;'from the HostSettings arraylist&amp;#160; &lt;br /&gt;'(this is the easiest way)      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;initialCachingLevel&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;As&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;String&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;initialCachingLevel&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;HostSettings.Item(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;PerformanceSetting&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;).ToString&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;'Disable caching     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;hc&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;As&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;New&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Entities.Host.HostSettingsController&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;hc.UpdateHostSetting(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;PerformanceSetting&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;0&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;'Do your stuff here     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;'Enable caching with     &lt;br /&gt;'the initial caching level      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;hc.UpdateHostSetting(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;PerformanceSetting&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;initialCachingLevel)&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What I'm doing in the bit of code above is disable caching temporarily to do what I have to do, then return it to its previous state. That's equivalent to going to Host Settings-Performance, from the Host menu, change the caching level, click &amp;quot;update&amp;quot;, do any job I have to do and then get back to the Host menu and return caching to its previous value.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The caching level is defined by the &amp;quot;PerformanceSetting&amp;quot; Host property which can take string values ranged from &amp;quot;0&amp;quot; to &amp;quot;3&amp;quot; representing different levels of caching:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;0 - No caching&lt;/p&gt;  &lt;p&gt;1 - Light caching&lt;/p&gt;  &lt;p&gt;2 - Moderate caching&lt;/p&gt;  &lt;p&gt;3 - Heavy caching&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Some notes: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can get the current caching level from the HostSettingsController too, but it's a bit more fussy since the GetHostSetting method returns an IDataReader. Since the Host's settings get copied to the publicly-available HostSettings hashtable, I thought it's easier to obtain the current setting from there.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Changing the value in the HostSettings hashtable will NOT affect your caching. You've got to use HostSettingsController.UpdateHostSetting.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You may also want to clear any cache left before you start doing your stuff, it helps in some cases. In this case, the DataCache class may prove very useful. Here's what you can do (you can choose not to execute some of these lines, depending on your needs):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#000000"&gt;DataCache.ClearTabsCache(&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;DataCache.ClearPortalCache(&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;True&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;DataCache.ClearHostCache(&lt;/font&gt;&lt;font color="#0000ff"&gt;True&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;DataCache.ClearModuleCache()&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;DataCache.ClearTabPermissionsCache(&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;DataCache.ClearUserCache(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;UserController.GetCurrentUserInfo().Username)&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Some of the above statements may overlap, in the sense that they're actually subsets of other statements. For example, ClearHostCache() is considered equivalent to the Clear Cache option that exists in the Host Settings page. I personally prefer to issue ALL those statements, even if they overlap. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The DataCache class has some more methods but I think those mentioned here are enough to give you a good start. You'll probably find out the rest yourself, in an as-needed basis.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The above code applies only to portal 0. Whenever you see a boolean parameter there, it's indicating &amp;quot;cascade&amp;quot; cache clearing, which I always want set to true. Also, the ClearUserCache() method needs the currently logged on user's name, which I get by using UserController.GetCurrentUserInfo() which returns a UserInfo object containing, among others, the user's name.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-313970088172944842?l=dnnuke.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fLlJUCIP00Swz51CRCcwPnYwpQE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fLlJUCIP00Swz51CRCcwPnYwpQE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fLlJUCIP00Swz51CRCcwPnYwpQE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fLlJUCIP00Swz51CRCcwPnYwpQE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DotnetnukeThem/~4/-UVpa6XSpBI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/313970088172944842/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=313970088172944842" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/313970088172944842?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/313970088172944842?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/-UVpa6XSpBI/how-to-enable-disable-caching.html" title="How to enable - disable caching programmatically and on-demand" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/12/how-to-enable-disable-caching.html</feedburner:origLink></entry></feed>

