<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0MEQ387eCp7ImA9WxNUGEQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889</id><updated>2009-11-11T00:16:42.100+02:00</updated><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="hub" href="http://pubsubhubbub.appspot.com/" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/DotnetnukeThem" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><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'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/v_6EcOyFrgIsb5vX4QsdKYU6gFA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/v_6EcOyFrgIsb5vX4QsdKYU6gFA/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/v_6EcOyFrgIsb5vX4QsdKYU6gFA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/v_6EcOyFrgIsb5vX4QsdKYU6gFA/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="https://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:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Vz05QDVuMnMIg16cAUuE1rJtk88/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Vz05QDVuMnMIg16cAUuE1rJtk88/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/Vz05QDVuMnMIg16cAUuE1rJtk88/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Vz05QDVuMnMIg16cAUuE1rJtk88/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="https://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:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4uZLuv-lC-RHPwSZ3wsMpJK0zzo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4uZLuv-lC-RHPwSZ3wsMpJK0zzo/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/4uZLuv-lC-RHPwSZ3wsMpJK0zzo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4uZLuv-lC-RHPwSZ3wsMpJK0zzo/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="https://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:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eXbwaUDo6RQu4wyKLUpQdySQIL4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eXbwaUDo6RQu4wyKLUpQdySQIL4/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/eXbwaUDo6RQu4wyKLUpQdySQIL4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eXbwaUDo6RQu4wyKLUpQdySQIL4/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="https://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:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uQkf65wFVtdN-9BARwcbI8LgOXQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uQkf65wFVtdN-9BARwcbI8LgOXQ/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/uQkf65wFVtdN-9BARwcbI8LgOXQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uQkf65wFVtdN-9BARwcbI8LgOXQ/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="https://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:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">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'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rodi1K26jRmeWSvFrB0j4R3J8E4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rodi1K26jRmeWSvFrB0j4R3J8E4/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/rodi1K26jRmeWSvFrB0j4R3J8E4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rodi1K26jRmeWSvFrB0j4R3J8E4/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="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=313970088172944842" title="0 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:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/12/how-to-enable-disable-caching.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUDRHkyfCp7ImA9WxRUGEo.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-1655043982595480621</id><published>2008-11-28T14:44:00.001+02:00</published><updated>2008-11-28T14:44:35.794+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-28T14:44:35.794+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>Resolving "fileid=xxx" field values to actual file paths</title><content type="html">&lt;p&gt;Following a previous article of mine, &lt;a href="http://dnnuke.blogspot.com/2008/05/dbotabsiconfile-field-issue.html" target="_blank"&gt;The dbo.tabs.IconFile field issue&lt;/a&gt;, I would like to share an easy way to resolve any field that holds values of the type &amp;quot;FileID=xxx&amp;quot; (where xxx is the primary key of a record in the Files table) into the actual file path. This is especially useful when you deal with the IconFile field in the Tabs table, as well as with fields of type Image in a User Defined Table, and probably in a lot more places too.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I have created a UDF (User Defined Function) which accepts a string value and looks whether it's of type &amp;quot;FileID=xxx&amp;quot;. If it is, it constructs the full path (including the portal number) and returns that, otherwise it just returns the initial string with no modification at all. You can use this scalar-valued function inline, in your own SELECT statements, like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;EXAMPLE&lt;/strong&gt;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;SELECT&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;tabid,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;tabname,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;dbo.ResolveFileField(iconfile)&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;/font&gt;&lt;font color="#000000"&gt;tabs&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;CODE&lt;/strong&gt;&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;FUNCTION&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;dbo.ResolveFileField&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;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;@file&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;varchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;1000&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;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;RETURNS&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;varchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;1000&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;AS&lt;/font&gt;&lt;font color="#808080"&gt;     &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;&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;@retval&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;varchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;1000&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;@portalid&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="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;patindex&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;'FileID=%'&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;@file)&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="#800000"&gt;0&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;begin&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;@fileid&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;&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="#000000"&gt;@fileid&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;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;convert&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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;font color="#000000"&gt;,&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;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;replace&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;&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;&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;@file&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;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; 'fileid='     &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;&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;&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;)&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;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;      &lt;br /&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;@retval&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;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 'Portals/'&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;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;convert&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;&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;&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="#0000ff"&gt;varchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;10&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;&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;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;files.portalid&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;&amp;#160;&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;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;+&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;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;folders.folderpath&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;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;files.filename&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;files&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;left&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;outer&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;join&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;folders&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&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;files.folderid&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;folders.folderid&lt;/font&gt;&lt;font color="#808080"&gt;     &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;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;files.fileid&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@fileid&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="#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;else&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &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="#0000ff"&gt;set&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@retval&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;@file&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;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@retval&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;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-1655043982595480621?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5O7VnnxHNy87HZKF9kTmVPfDhTo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5O7VnnxHNy87HZKF9kTmVPfDhTo/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/5O7VnnxHNy87HZKF9kTmVPfDhTo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5O7VnnxHNy87HZKF9kTmVPfDhTo/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/HcitcPKuoII" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/1655043982595480621/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=1655043982595480621" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1655043982595480621?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1655043982595480621?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/HcitcPKuoII/resolving-field-values-to-actual-file.html" title="Resolving &amp;quot;fileid=xxx&amp;quot; field values to actual file paths" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/11/resolving-field-values-to-actual-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEBSH8_fyp7ImA9WxRUF0U.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7849986588887597269</id><published>2008-11-27T13:00:00.001+02:00</published><updated>2008-11-27T13:00:59.147+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-27T13:00:59.147+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>How to promote a regular DotNetNuke user to a superuser</title><content type="html">&lt;p&gt;I found this in &lt;a href="http://www.kevinsouthworth.com/Blog/tabid/59/articleType/ArticleView/articleId/50/Default.aspx" target="_blank"&gt;Kevin Southworth's blog&lt;/a&gt; and I think it's worth mentioning since it may save your life in case you have forgotten your superuser's password. Using SQL, you can promote a regular DNN user to a superuser like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#006400"&gt;-- Promote regular user to SuperUser     &lt;br /&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;@username&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;varchar&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#800000"&gt;50&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="#0000ff"&gt;SET&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@username&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; 'theUsernameToPromote'     &lt;br /&gt;      &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;Users&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;IsSuperUser&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;1&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;username&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;@username&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;DELETE&lt;/font&gt;&lt;font color="#808080"&gt;&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; &lt;/font&gt;&lt;font color="#000000"&gt;UserPortals&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;UserId&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;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;SELECT&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;UserID&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;/font&gt;&lt;font color="#000000"&gt;Users&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;username&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;@username)&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Simply replace 'theUsernameToPromote' with the user name you need.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks Kevin!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7849986588887597269?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2hhgjtYQvI_A2CtT7KYonPKgcDA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2hhgjtYQvI_A2CtT7KYonPKgcDA/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/2hhgjtYQvI_A2CtT7KYonPKgcDA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2hhgjtYQvI_A2CtT7KYonPKgcDA/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/rTj7_I1vjMY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7849986588887597269/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7849986588887597269" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7849986588887597269?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7849986588887597269?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/rTj7_I1vjMY/how-to-promote-regular-dotnetnuke-user.html" title="How to promote a regular DotNetNuke user to a superuser" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/11/how-to-promote-regular-dotnetnuke-user.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMCSXs7eSp7ImA9WxRUFEg.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-3204664342173328076</id><published>2008-11-23T01:59:00.001+02:00</published><updated>2008-11-23T16:27:48.501+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-23T16:27:48.501+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extending" /><title>Persisting large values in Module Settings when creating a custom module</title><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;p&gt;So you want to create a simple custom module. At first, it seems easy. Just two or three settings to take care of, no need for complicated, custom tables and unistall/uninstall scripts. DNN's built-in module settings API seems to be enough. But suddenly, needs grow a lot. There are some large values you need to store and the ModuleSettings table won't allow large chunks of information per row. It seems that you have to switch to a custom table which will be holding your settings...&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;br /&gt;...or use my class :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I came upon the need of storing just one large value (a serialized object, to be more specific) in a custom module I was creating. I didn't have any way to know how large the serialized (XML) sting would be, since the object was a collection, and I HAD to store it in module settings. I thought it wouldn't be worth to create a custom table and the accompanying code to store settings in a case like this, so I decided to extend DNN's ModuleController class instead. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;What I did was to write a new &lt;strong&gt;ModuleControllerExtended &lt;/strong&gt;class which inherits from ModuleController (so I could use it in its place) and add two methods to it: &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. UpdateLargeTabModuleSetting:&lt;/strong&gt; This method is essentially an extension of the UpdateTabModuleSetting method of the ModuleController class which allows storing large string values in the ModuleSettings table by breaking them into smaller chunks and storing multiple name/value pairs. If a value is small enough to fit into a single row of the ModuleSettings table, then it's stored normally, as it would with the UpdateTabModuleSetting method. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;When the value is large, it's stored in 2KB chunks in several rows using a numeric prefix (in the form of _x) for each row, based on the initial name given for the setting. For example, a setting named &amp;quot;SerializedObject&amp;quot; with a value sized at 5KB would be stored in 3 rows with names &amp;quot;SerializedObject_0&amp;quot;, &amp;quot;SerializedObject_1&amp;quot; and &amp;quot;SerializedObject_2&amp;quot; accordingly. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;The method also takes care to delete rows from the ModuleSettings table every time an update takes place to ensure that there are no leftovers should you specify a value of a smaller size (and probably fewer chunks) than the one that may be already stored. &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;2. ReadLargeTabModuleSetting:&lt;/strong&gt; This one reads a large setting doing all the work needed to give you back its string value, but it can also read single-row settings. This is a shared method, and it was added to the class only for consistency. It does not extend any of the known methods of the ModuleController class, meaning you can always remove it from the definition of the class and use it as stand-alone code. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To use the method, you will need the hashtable containing the module's settings, which you can easily get by using the base class GetModuleSettings() method. You feed the method with the hashtable, the module's id and the name of the setting you want and you get a string value containing the &amp;quot;large&amp;quot; value for the setting you specified, or just a setting value should the setting be a &amp;quot;normal&amp;quot; one.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;It's not really complicated and it should save you a lot of time when dealing with situations like the one I described above. I would love to hear your comments, though.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here's the code:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Imports&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Microsoft.VisualBasic&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Imports&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.Collections.Generic&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Public&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="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ModuleControllerExtended&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;Inherits&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;DotNetNuke.Entities.Modules.ModuleController&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Sub&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="#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="#0000ff"&gt;MyBase&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#0000ff"&gt;new&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;End&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Sub&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Sub&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;UpdateLargeTabModuleSetting(&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; &lt;/font&gt;&lt;font color="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabModuleSettings&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="#2b91af"&gt;Hashtable&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; &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;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabModuleID&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="#2b91af"&gt;Int32&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; &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;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingName&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;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;_&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&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="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingValue&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="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;cntDel&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="#2b91af"&gt;Int32&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="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;o&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;Object&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;continueDeleting&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;Boolean&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;continueDeleting&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;True&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'Delete all multiple-value module settings, if they exist.&amp;#160; &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;While&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;continueDeleting&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;True&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;o&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;tabModuleSettings(settingName&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; &amp;quot;_&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;cntDel.ToString)&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="#0000ff"&gt;If&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;o&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Is&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Nothing&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; &lt;/font&gt;&lt;font color="#000000"&gt;DeleteTabModuleSetting(tabModuleID,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingName&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; &amp;quot;_&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;cntDel.ToString)&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; &lt;/font&gt;&lt;font color="#000000"&gt;cntDel&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&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;1&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="#0000ff"&gt;Else&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; &lt;/font&gt;&lt;font color="#000000"&gt;continueDeleting&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;False&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="#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;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;While&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'Guard - if setting value is less than 2KB, update normally and exit&amp;#160; &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;If&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingValue.Length&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;2000&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; &lt;/font&gt;&lt;font color="#006400"&gt;'Normal value&amp;#160; &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="#000000"&gt;UpdateTabModuleSetting(tabModuleID,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingName,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingValue)&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="#0000ff"&gt;Exit&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Sub&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'If we get to this point, then setting value is more than 2KB.&amp;#160; &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;'Delete the original setting (if it exists) so as not to get confused.&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;DeleteTabModuleSetting(tabModuleID,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingName)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'Split the value in 2KB chunks&amp;#160; &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;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;stringList&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="#2b91af"&gt;List&lt;/font&gt;&lt;font color="#000000"&gt;(Of&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="#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="#0000ff"&gt;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;sb&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="#2b91af"&gt;StringBuilder&lt;/font&gt;&lt;font color="#000000"&gt;(settingValue)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;While&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;sb.Length&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="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;2000&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;stringList.Add(sb.ToString.Substring(&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="#800000"&gt;1999&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;sb.Remove(&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="#800000"&gt;1999&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="#0000ff"&gt;End&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;While&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'Add the last chunk&amp;#160; &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;If&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;sb.Length&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="#800000"&gt;0&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;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;stringList.Add(sb.ToString)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'Now do the update changing the setting name with the suffix _x (x=0,1,2,etc.) for&amp;#160; &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;'each update&amp;#160; &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;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;cnt&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="#2b91af"&gt;Int32&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="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;For&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Each&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;s&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;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;In&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;stringList&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;UpdateTabModuleSetting(tabModuleID,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingName&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; &amp;quot;_&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;cnt.ToString,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;s)&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;cnt&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&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;1&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;Next&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;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Sub&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Shared&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Function&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;ReadLargeTabModuleSetting(&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; &lt;/font&gt;&lt;font color="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabModuleSettings&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="#2b91af"&gt;Hashtable&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="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabModuleID&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="#2b91af"&gt;Int32&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="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;settingName&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="#000000"&gt;)&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;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'Guard - if there is a single setting, just return that and exit&amp;#160; &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;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;objTester&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;Object&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;objTester&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;tabModuleSettings(settingName)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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="#0000ff"&gt;Not&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;objTester&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Is&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Nothing&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; &lt;/font&gt;&lt;font color="#0000ff"&gt;Return&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;CType&lt;/font&gt;&lt;font color="#000000"&gt;(objTester,&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="#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="#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;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;'If we got to this point, there's a large value stored.&amp;#160; &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;'Loop through the records and reconstruct the value.&amp;#160; &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;Dim&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;sb&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="#2b91af"&gt;StringBuilder&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;cnt&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="#2b91af"&gt;Int32&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="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;o&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;Object&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;continueAdding&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;Boolean&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;continueAdding&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;True&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;While&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;continueAdding&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;True&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;o&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;tabModuleSettings(settingName&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; &amp;quot;_&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;cnt.ToString)&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="#0000ff"&gt;If&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;o&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Is&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Nothing&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; &lt;/font&gt;&lt;font color="#000000"&gt;sb.Append(&lt;/font&gt;&lt;font color="#0000ff"&gt;CType&lt;/font&gt;&lt;font color="#000000"&gt;(o,&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="#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;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;cnt&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&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;1&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="#0000ff"&gt;Else&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; &lt;/font&gt;&lt;font color="#000000"&gt;continueAdding&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;False&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="#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;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;While&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;Return&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;sb.ToString&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;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Function&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;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Class&lt;/font&gt; &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-3204664342173328076?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cwjnFa92HKVRhPm55E0lAtCwYqU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cwjnFa92HKVRhPm55E0lAtCwYqU/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/cwjnFa92HKVRhPm55E0lAtCwYqU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cwjnFa92HKVRhPm55E0lAtCwYqU/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/8mihI2-WBbY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/3204664342173328076/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=3204664342173328076" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3204664342173328076?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3204664342173328076?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/8mihI2-WBbY/persisting-large-values-in-module.html" title="Persisting large values in Module Settings when creating a custom module" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/11/persisting-large-values-in-module.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04BR3o6fSp7ImA9WxRUEUU.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-5447979863119317569</id><published>2008-11-07T17:14:00.003+02:00</published><updated>2008-11-20T14:59:16.415+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-20T14:59:16.415+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Creating pages based on templates - eventually!</title><content type="html">All my attempts to use custom templates when creating new DNN pages for my portals were frustrating. Even though I exported the template from a page using the Export feature, the new template would not show up at all in the combo box when creating a new page, although it existed in the file system. Even the default template wouldn't show up!&lt;br /&gt;&lt;br /&gt; Here's a simple solution to make those template files appear when you create a new page:&lt;br /&gt;&lt;br /&gt; 1. Go to Host Settings - Other Settings and locate the &amp;quot;File Upload Extensions&amp;quot; section. Add &amp;quot;template&amp;quot; (without the quotes) there and save your changes. &lt;br /&gt;&lt;br /&gt; 2. Click &amp;quot;Restart Application&amp;quot; in Host Settings.&lt;br /&gt;&lt;br /&gt; 3. Go to the File Manager and synchronize files with the &amp;quot;recursive&amp;quot; option set.&lt;br /&gt;&lt;br /&gt; 4. Optionally, clear the portal's cache in Host Settings (only if it doesn't seem to work differently).&lt;br /&gt;&lt;br /&gt; Now you'll have access to your custom templates when creating new pages. Hope that helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-5447979863119317569?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/js8gzARltuZZ4UVlFwJSLwzFZ6g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/js8gzARltuZZ4UVlFwJSLwzFZ6g/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/js8gzARltuZZ4UVlFwJSLwzFZ6g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/js8gzARltuZZ4UVlFwJSLwzFZ6g/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/yzM2aO_NB8U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/5447979863119317569/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=5447979863119317569" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5447979863119317569?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5447979863119317569?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/yzM2aO_NB8U/creating-pages-based-on-templates.html" title="Creating pages based on templates - eventually!" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/11/creating-pages-based-on-templates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAMQHgyfSp7ImA9WxRUFUw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-6056211308332234901</id><published>2008-10-24T17:31:00.002+03:00</published><updated>2008-11-24T10:03:01.695+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-24T10:03:01.695+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Adding Javascript to the BODY tag in DNN</title><content type="html">When working with .ascx skin files, you will sometimes need to add some Javascript to the BODY tag, such as something that runs when the OnLoad event triggers.   &lt;br /&gt;  &lt;br /&gt;Well, you can always add a BODY tag inside your .ascx file along with the Javascript you like and hope that the browser will understand that. Essentially, you'll end up having two BODY tags in your source code-one that is generated by DNN and one that is typed by you. Some browsers (like Chrome) understand what's happening and try to transfer the Javascript to the actual BODY tag when rendering the page, but others don't.  &lt;br /&gt;  &lt;br /&gt;What you can do, though, is create a Page_Init event handler inside your .ascx file and put this code there:  &lt;br /&gt;  &lt;br /&gt;  &lt;div class="code"&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;body&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;System.Web.UI.HtmlControls.HtmlGenericControl&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="#2b91af"&gt;Page&lt;/font&gt;&lt;font color="#000000"&gt;.FindControl(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;body&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;System.Web.UI.HtmlControls.HtmlGenericControl)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;body.Attributes(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;onload&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;=&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;blablablaJavascript&amp;quot;&lt;/font&gt; &lt;/div&gt;  &lt;br /&gt;  &lt;br /&gt;Where blablablaJavascript is your Javascript. Of course, you can do that for other events (even for other tags) as well.  &lt;br /&gt;  &lt;br /&gt;If you're using a single .ascx file with no code-behind (like most do), you'll want to define a Page_Init event there. You can do that like this:  &lt;br /&gt;  &lt;br /&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;     &lt;br /&gt;      &lt;br /&gt;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;Private&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;Sub&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Page_Init(&lt;/font&gt;&lt;font color="#0000ff"&gt;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;sender&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;System.&lt;/font&gt;&lt;font color="#0000ff"&gt;Object&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;ByVal&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;e&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;System.&lt;/font&gt;&lt;font color="#2b91af"&gt;EventArgs&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;Handles&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;MyBase&lt;/font&gt;&lt;font color="#000000"&gt;.Init&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;'Add your code here     &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;Sub&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &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;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-6056211308332234901?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QG2G228dR7rXXLT9PX3bmnk8sZ0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QG2G228dR7rXXLT9PX3bmnk8sZ0/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/QG2G228dR7rXXLT9PX3bmnk8sZ0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QG2G228dR7rXXLT9PX3bmnk8sZ0/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/zPT4hRB31JI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/6056211308332234901/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=6056211308332234901" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/6056211308332234901?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/6056211308332234901?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/zPT4hRB31JI/adding-javascript-to-body-tag-in-dnn.html" title="Adding Javascript to the BODY tag in DNN" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/10/adding-javascript-to-body-tag-in-dnn.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08GSHs_eip7ImA9WxRUEUU.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-8851805103535222057</id><published>2008-10-24T17:23:00.006+03:00</published><updated>2008-11-20T14:57:09.542+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-20T14:57:09.542+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Thickbox and Google Maps API - avoiding random thickbox initialization problems</title><content type="html">&lt;a href="http://jquery.com/demo/thickbox/" target="_blank"&gt;Thickbox&lt;/a&gt; is a very nice JQuery-based Javascript plugin that allows you to present images and other stuff (even whole pages!) in your page in a popup manner but without leaving the current page or opening a new one. Essentially, it's considered an evolution of the &lt;a href="http://www.huddletogether.com/projects/lightbox/" target="_blank"&gt;Lightbox&lt;/a&gt; script which only works with images.&lt;br /&gt;&lt;br /&gt;Many developers use Thickbox with Google maps, in order to provide clickable links on Google Map bubbles that lead to enlarged photos or other info. Some of them (including me) noticed, to their surprise, that suddenly Thickbox wouldn't work correctly inside Google Maps. Specifically, it would work once in a while, and the only way to ensure it worked would be to click on a bubble, close it an then click on another. Then all Thickbox links inside bubbles would work.&lt;br /&gt;&lt;br /&gt;There seems to be a problem with the new version of the Google Maps API that kills the functionality of Thickbox. According to &lt;a href="http://groups.google.com/group/Google-Maps-API/browse_thread/thread/7007425022ea5ab5" target="_blank"&gt;this discussion on Google Groups&lt;/a&gt;, a way to ensure Thickbox is working correctly is to "lock" on version 2.122 of the Google Maps API inside the Javascript that creates the markers. That is, use: google.load("maps", "2.122"); instead of google.load("maps", "2.x");&lt;br /&gt;&lt;br /&gt;I've been using Thickbox and Google Maps in some DNN sites and I was panicked to see this happening in the first place. Although this post is not exactly DNN-related, I think it'll be useful to all of you working with DNN out there. I was very happy to know that there wasn't anything wrong with my DNN development, it was only Google's API.&lt;br /&gt;&lt;br /&gt;Hope it helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-8851805103535222057?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rkO7gjF7Ru6_vtGa7MxpPo4K9dY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rkO7gjF7Ru6_vtGa7MxpPo4K9dY/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/rkO7gjF7Ru6_vtGa7MxpPo4K9dY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rkO7gjF7Ru6_vtGa7MxpPo4K9dY/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/rBD22w_r1aw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/8851805103535222057/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=8851805103535222057" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8851805103535222057?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8851805103535222057?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/rBD22w_r1aw/thickbox-and-google-maps-api-avoiding.html" title="Thickbox and Google Maps API - avoiding random thickbox initialization problems" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/10/thickbox-and-google-maps-api-avoiding.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEHQH46cSp7ImA9WxRUFUw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-455036148735814845</id><published>2008-09-26T19:07:00.001+03:00</published><updated>2008-11-24T10:00:31.019+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-24T10:00:31.019+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>Finding a tab's parent by level</title><content type="html">This is a simple but useful user defined function I have implemented in order to recursively find a tab's parent on a specific level. Syntax is as follows:  &lt;br /&gt;  &lt;br /&gt;select dbo.udfGetParentByLevel (level, tabid)   &lt;br /&gt;  &lt;br /&gt;where level is the level you need (0,1,2 etc.) and tabid is the id of the tab for which you need to find the parent.  &lt;br /&gt;  &lt;br /&gt;Nothing much, but can save you in certain scenarios.  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&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;FUNCTION&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;udfGetParentTabByLevel&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="#006400"&gt;-- Add the parameters for the function here     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;@parentlevel&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="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@initialtabid&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="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;RETURNS&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;AS&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;BEGIN&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&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;@level&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;@tabid&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;@parentid&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="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@level&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;level,&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="#0000ff"&gt;=&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="#000000"&gt;@parentid&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;parentid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabs&lt;/font&gt;&lt;font color="#808080"&gt;&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="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@initialtabid&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;while&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@level&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;@parentlevel&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;begin&lt;/font&gt;&lt;font color="#808080"&gt;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@level&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;level,&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="#0000ff"&gt;=&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="#000000"&gt;@parentid&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;parentid&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;tabs&lt;/font&gt;&lt;font color="#808080"&gt;&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="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@parentid&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;     &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;-- Return the result of the function     &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;RETURN&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;     &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;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-455036148735814845?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HEQq3YxjvkXWvjJvOKpC1gnbNjo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HEQq3YxjvkXWvjJvOKpC1gnbNjo/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/HEQq3YxjvkXWvjJvOKpC1gnbNjo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HEQq3YxjvkXWvjJvOKpC1gnbNjo/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/4sT7Gi7f6Mo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/455036148735814845/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=455036148735814845" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/455036148735814845?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/455036148735814845?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/4sT7Gi7f6Mo/finding-tabs-parent-by-level.html" title="Finding a tab&amp;#39;s parent by level" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/09/finding-tabs-parent-by-level.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAEQHY8fCp7ImA9WxRUFUw.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-3400925312703012078</id><published>2008-09-19T15:07:00.001+03:00</published><updated>2008-11-24T10:01:41.874+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-24T10:01:41.874+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>Copying settings between DNNArticle modules</title><content type="html">&lt;a href="http://www.zldnn.com" target="_blank"&gt;ZLDNN's&lt;/a&gt; &lt;a href="http://www.zldnn.com/Modules/ModuleView/tabid/496/selectmoduleid/1613/ArticleID/30/reftab/1/title/DNNArticle/Default.aspx" target="_blank"&gt;DNNArticle&lt;/a&gt; is a really cool article module, loaded with a ton of features. Unfortunately, sometimes you'll have to add more than one modules on your site, and a ton of features typically comes with a ton of settings. In order not to have a hard time setting all the options from scratch, here is a script you can use to copy all those nifty settings you'll find in the &amp;quot;DNNArticle Settings&amp;quot; area from an already existing module.   &lt;br /&gt;  &lt;br /&gt;You need to know three things: The source and destination module ids (NOT the tab ids, the actual module ids) and the tab id which will be used for the presentation of an article.   &lt;br /&gt;  &lt;br /&gt;In the script given, I'm copying settings from module id 430 to module id 1232, with a view tab id of 986. Be sure to put your own numbers there.   &lt;br /&gt;  &lt;br /&gt;Also, before running the script, make sure you have visited the settings area of the (newly added) DNNArticle module to be updated and have pressed &amp;quot;update&amp;quot; there (even if you haven't changed anything) so that the corresponding records are created in the ModuleSettings table.   &lt;br /&gt;  &lt;br /&gt;The script is fairly straightforward, use at your own risk as always. Enjoy.   &lt;br /&gt;  &lt;br /&gt;  &lt;div class="code"&gt;&lt;font color="#006400"&gt;/*&amp;#160; &lt;br /&gt;------------------------------------------------------&amp;#160; &lt;br /&gt;Start of values to be changed each run&amp;#160; &lt;br /&gt;------------------------------------------------------&amp;#160; &lt;br /&gt;*/&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;-- This is the module id we are copying settings FROM&amp;#160; &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;@originalmodule&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;&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;/font&gt;&lt;font color="#000000"&gt;@originalmodule&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#800000"&gt;430&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;-- This is the module id we are copying settings TO&amp;#160; &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;@moduletobeupdated&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;&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;/font&gt;&lt;font color="#000000"&gt;@moduletobeupdated&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;1232&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;-- This is the view tab id for the module we are updating, in case it is&amp;#160; &lt;br /&gt;-- different than the one of the source module.&amp;#160; &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;@viewtab&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;&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;/font&gt;&lt;font color="#000000"&gt;@viewtab&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#800000"&gt;986&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;/*&amp;#160; &lt;br /&gt;------------------------------------------------------&amp;#160; &lt;br /&gt;End of values to be changed each run&amp;#160; &lt;br /&gt;------------------------------------------------------&amp;#160; &lt;br /&gt;*/&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;-- Some variables to hold table data&amp;#160; &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;@settingname&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;50&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &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;@settingvalue&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;2000&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#006400"&gt;-- Get a cursor and start updating&amp;#160; &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;cur&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;cursor&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;fast_forward&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;for&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &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; &lt;/font&gt;&lt;font color="#000000"&gt;settingname&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;,settingvalue&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;modulesettings&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="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@originalmodule&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;open&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;cur&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;fetch&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;next&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;cur&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;into&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@settingname,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@settingvalue&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;while&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@@fetch_status&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#800000"&gt;0&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;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &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;@settingname&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;'ViewTab'&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;begin&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;update&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;modulesettings&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;set&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;settingvalue&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@viewtab&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;settingname&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@settingname&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;and&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="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@moduletobeupdated&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;end&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;else&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;begin&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &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;update&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;modulesettings&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;set&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;settingvalue&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@settingvalue&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;settingname&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@settingname&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;and&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="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;@moduletobeupdated&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;end&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;fetch&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;next&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;cur&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;into&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@settingname,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;@settingvalue&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;end&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;close&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;cur&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;deallocate&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;cur&lt;/font&gt; &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-3400925312703012078?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JaqzeI1O4if9pySK2j1HbrSkkuA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JaqzeI1O4if9pySK2j1HbrSkkuA/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/JaqzeI1O4if9pySK2j1HbrSkkuA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JaqzeI1O4if9pySK2j1HbrSkkuA/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/QdNiIMt1oPw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/3400925312703012078/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=3400925312703012078" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3400925312703012078?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3400925312703012078?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/QdNiIMt1oPw/copying-settings-between-dnnarticle.html" title="Copying settings between DNNArticle modules" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/09/copying-settings-between-dnnarticle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMERnozfip7ImA9WxdUGUQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-3026517340464887656</id><published>2008-08-06T06:41:00.003+03:00</published><updated>2008-08-06T06:46:47.486+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-06T06:46:47.486+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Utilities" /><title>MSDN-style core DNN documentation</title><content type="html">Mr. Ernst Peter Tamminga has created a help (.CHM) DNN Core reference file, based on the inline code documentation comments found on the DNN source code. Pretty useful, if you want to have a quick browse at all the DNN classes. The latest download is based on DNN 4.8.4.&lt;br /&gt;&lt;br /&gt;You'll find it here: &lt;a href="http://www.codeplex.com/DNNHelpSystem"&gt;http://www.codeplex.com/DNNHelpSystem&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-3026517340464887656?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mNcQJwzBO1Ah6vRlK5hlmG1VLqE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mNcQJwzBO1Ah6vRlK5hlmG1VLqE/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/mNcQJwzBO1Ah6vRlK5hlmG1VLqE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mNcQJwzBO1Ah6vRlK5hlmG1VLqE/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/-dZmheRF-V8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/3026517340464887656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=3026517340464887656" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3026517340464887656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3026517340464887656?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/-dZmheRF-V8/msdn-style-core-dnn-documentation.html" title="MSDN-style core DNN documentation" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/08/msdn-style-core-dnn-documentation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcDRHY8eCp7ImA9WxdUGUQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-814305429745184260</id><published>2008-07-04T18:07:00.003+03:00</published><updated>2008-08-06T06:41:15.870+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-06T06:41:15.870+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Changing what appears on the title bar</title><content type="html">DotNetNuke has two ways of setting the title bar, depending on whether you set the "Page Title" field in Page Properties. It either displays your page title as you have set it, or the full path to your page (similar to the breadcrumb) when you leave it blank.&lt;br /&gt;&lt;br /&gt;Some third-party modules, though, do use the page title for their purposes so you may want to have a page title exactly the same as the page name (reminder: the page name is what you see in the navigation component, while the page title is what you see at the browser title bar). &lt;br /&gt;&lt;br /&gt;But you don't want the page title to appear "naked" in the title bar. You may still want to display the full path, or even just the portal name along with the current page's title.&lt;br /&gt;&lt;br /&gt;To do either:&lt;br /&gt;&lt;br /&gt;- Open default.aspx.vb (you'll find it in the root folder) with your favourite editor, even with notepad.&lt;br /&gt;&lt;br /&gt;- Locate the InitializePage() function.&lt;br /&gt;&lt;br /&gt;- Find the following chunk of code:&lt;br /&gt;&lt;br /&gt;            ' set page title&lt;br /&gt;            Dim strTitle As String = PortalSettings.PortalName&lt;br /&gt;            For Each objTab In PortalSettings.ActiveTab.BreadCrumbs&lt;br /&gt;                strTitle += " &gt; " &amp; objTab.TabName&lt;br /&gt;            Next&lt;br /&gt;            ' tab title override&lt;br /&gt;            If PortalSettings.ActiveTab.Title &lt;&gt; "" Then&lt;br /&gt;                strTitle = PortalSettings.ActiveTab.Title&lt;br /&gt;            End If&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The first part of the code (set page title) says: "Put the full path in the title"&lt;br /&gt;The second part of the code (tab title override) says: "If the title is not empty, just show the title the user has entered and nothing else".&lt;br /&gt;&lt;br /&gt;In order to show the portal name along with the title the user has entered, change the line:&lt;br /&gt;&lt;br /&gt;strTitle = PortalSettings.ActiveTab.Title&lt;br /&gt;to&lt;br /&gt;strTitle = PortalSettings.PortalName + " &gt; " + PortalSettings.ActiveTab.Title&lt;br /&gt;&lt;br /&gt;In order to show the full path in any case (regardless whether the title is empty or not), DELETE the second part of the code all together (the last if...end if part). That way, the title will always be the full path to your page, comprised of the corresponding page titles of all the parent pages till the root page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-814305429745184260?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NVVo_u0e-zcHhqoN1-6k_ZDsdsw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NVVo_u0e-zcHhqoN1-6k_ZDsdsw/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/NVVo_u0e-zcHhqoN1-6k_ZDsdsw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NVVo_u0e-zcHhqoN1-6k_ZDsdsw/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/A_UIrhvl970" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/814305429745184260/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=814305429745184260" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/814305429745184260?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/814305429745184260?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/A_UIrhvl970/changing-what-appears-on-title-bar.html" title="Changing what appears on the title bar" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/07/changing-what-appears-on-title-bar.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMBSXczfSp7ImA9WxdXFE0.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-8198273777332118124</id><published>2008-06-25T18:36:00.001+03:00</published><updated>2008-06-25T18:40:58.985+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-25T18:40:58.985+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>Retrieving tabs using SQL, security-aware</title><content type="html">&lt;p&gt;There are times when you like to go deeper with DNN and retrieve certain information by means of an SQL Query or a stored procedure. That's what happened to me when I needed to create a custom combo box which would redirect the user to specific pages. &lt;/p&gt;  &lt;p&gt;In order to achieve that functionality, I had to use a module which would permit me to issue SQL queries to DotNetNuke and then format the results as I wanted. As I've stated many times before, I find the &lt;a href="http://www.bi4ce.com/?tabid=122&amp;amp;pid=2"&gt;ListX&lt;/a&gt; module pretty useful in these situations. &lt;/p&gt;  &lt;p&gt;One thing I discovered, though, is that you need to have a deeper understanding on what's going on with security in order to issue an SQL query that selects ONLY the tabs that a registered user has the right to see. You see, DNN tabs are not always visible to all user roles, so when using SQL you must be careful not to retrieve tab records that lead nowhere for the current user.&lt;/p&gt;  &lt;p&gt;I'm not going to go into details on what I've done with the ListX module, unless someone asks specifically for it. Instead, on this post, I'm going to focus on how to issue a SQL query that retrieves records from the Tabs table that are visible for the current user.&lt;/p&gt;  &lt;p&gt;For this post, it is assumed that you already know the ID of the current user in some way. &lt;/p&gt;  &lt;p&gt;If you issue something like:&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;SELECT tabid, tabtitle FROM Tabs&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Then you'll have all tabs, even those that are deleted. So we first need to have a WHERE clause to exclude deleted tabs, like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;SELECT tabid,tabtitle FROM Tabs WHERE isDeleted=0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;That leaves as with all active tabs, even those that are accessible by the administrator. In order to make our query security-aware, we have to see what tables the Tabs table is related to, in the context of security permissions. &lt;/p&gt;  &lt;p&gt;The related tables are the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;TabPermission&lt;/strong&gt;: A table which holds role permissions for every tab. Remember, DNN security works with roles. (We assume that we're not using the special &amp;quot;specific userid&amp;quot; feature that was introduced in later version of DNN).&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;UserRoles&lt;/strong&gt;: A table which holds the participations of DNN users to DNN security roles&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Users&lt;/strong&gt;: A table which holds the actual DNN users.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The table that interests us more is the &lt;strong&gt;TabPermission&lt;/strong&gt; table. Let's see the fields that interest us the most from this table:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;TabId&lt;/strong&gt;: &lt;/p&gt;  &lt;p&gt;The tab id the record is referring to. There may be more than one records per tab id in the TabPermissions table, if the tab is available to multiple roles or even to one role with multiple permissions (DNN grants VIEW and EDIT permissions to tabs).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;PermissionID&lt;/strong&gt;: &lt;/p&gt;  &lt;p&gt;The number you see here is the type of permission specified, and is related to the Permission.PermissionId field. If you do a SELECT * FROM Permissions you'll get, among other records, the following two records:&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;3&amp;#160;&amp;#160;&amp;#160; SYSTEM_TAB&amp;#160;&amp;#160;&amp;#160; -1&amp;#160;&amp;#160;&amp;#160; VIEW&amp;#160;&amp;#160;&amp;#160; View Tab     &lt;br /&gt;4&amp;#160;&amp;#160;&amp;#160; SYSTEM_TAB&amp;#160;&amp;#160;&amp;#160; -1&amp;#160;&amp;#160;&amp;#160; EDIT&amp;#160;&amp;#160;&amp;#160; Edit Tab&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;For our purposes, we will need permission id 3, i.e. VIEW permissions. Remember, we need the tabs that our user is allowed to see.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RoleID&lt;/strong&gt;: &lt;/p&gt;  &lt;p&gt;This is where things get a bit complicated. The RoleID field is related to the &lt;strong&gt;Roles.RoleId&lt;/strong&gt; field (try a SELECT * FROM Roles to see what you'll get). But here, we don't need all the roles but just the roles our user is participating in. So we need to relate this field to the &lt;strong&gt;UserRoles&lt;/strong&gt; table, which holds that information. If you do a SELECT * FROM UserRoles WHERE UserId=xxx (put your user id in the place of xxx), you'll get all role participations for the specified user. &lt;/p&gt;  &lt;p&gt;(You'll notice that the &lt;strong&gt;UserRoles&lt;/strong&gt; table also has the fields &lt;strong&gt;ExpiryDate, IsTrialUsed and EffectiveDate&lt;/strong&gt;. For the sake of simplicity, we'll suppose that we don't have any roles with dates set, although it would be very easy to extend our final query to include only roles that are effective in the current time period.)&lt;/p&gt;  &lt;p&gt;In the &lt;strong&gt;TabPermissions&lt;/strong&gt; table, you'll notice two additional role ids that DO NOT exist on the Roles table: -1 and -2. -2 stands for &amp;quot;&lt;strong&gt;Host&lt;/strong&gt;&amp;quot;, and concerns pages accessible by the host user. -1 stands for &amp;quot;&lt;strong&gt;All Users&lt;/strong&gt;&amp;quot; and concerns all non-administrative pages that are accessible from the &amp;quot;All Users&amp;quot; virtual role (this role actually does not exist anywhere). &lt;/p&gt;  &lt;p&gt;Try doing the following:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;--Fetch only admin pages accessed by the Administrators role     &lt;br /&gt;select * from tabpermission      &lt;br /&gt;inner join tabs      &lt;br /&gt;on tabs.tabid = tabpermission.tabid      &lt;br /&gt;where roleid=0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;--Fetch only non-admin pages accessed by all users     &lt;br /&gt;select * from tabpermission      &lt;br /&gt;inner join tabs      &lt;br /&gt;on tabs.tabid = tabpermission.tabid      &lt;br /&gt;where roleid=-1&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;--Fetch only host pages     &lt;br /&gt;select * from tabpermission      &lt;br /&gt;inner join tabs      &lt;br /&gt;on tabs.tabid = tabpermission.tabid      &lt;br /&gt;where roleid=-2&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And observe the different results.&lt;/p&gt;  &lt;p&gt;So what do we need in order to get the tabs that are accessible from a single, specific user? We'll take our initial query:&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;SELECT      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; tabid,tabtitle       &lt;br /&gt;FROM       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Tabs       &lt;br /&gt;WHERE       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; isDeleted=0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And we'll amend it as follows:&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;declare @userid int      &lt;br /&gt;select @userid = 2 &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;&amp;#160;&amp;#160;&amp;#160; select      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tabs.tabid, tabs.title      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; from       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tabs &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;inner join (     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; select       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; distinct tabpermission.tabid      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; from       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tabpermission       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; left outer join       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; userroles on tabpermission.roleid = userroles.roleid      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; left outer join       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; users on users.userid = userroles.userid      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; where       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tabpermission.permissionid=3      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; and (users.userid = @userid      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; or tabpermission.roleid=-1 or @userid=1)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ) as perm      &lt;br /&gt;on perm.tabid=tabs.tabid &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="courier new"&gt;where      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; tabs.isdeleted=0      &lt;br /&gt;order by tabs.tabid ASC&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;What we did was to initially declare a &lt;strong&gt;@userid&lt;/strong&gt; variable and give it a value (4 for our example, whatever suits you for your DNN installation - if you're making an SP out of this you can just provide the user's ID value as a parameter to the SP).&lt;/p&gt;  &lt;p&gt;We're using the @userid variable inside our &lt;strong&gt;JOIN&lt;/strong&gt; statement, which actually joins the &lt;strong&gt;Tabs&lt;/strong&gt; table with the &lt;strong&gt;TabPermission&lt;/strong&gt; table, but restricts the TabPermission table results to where the permission type is VIEW (id 3) and our user id is equal to @userid (users.userid = @userid) OR there are view rights for all users (tabpermission.roleid=-1)&amp;#160; OR our user is the administrator. (@userid=1), which overrides everything else. The DISTINCT clause is used to ommit propable multiple results for the same tab.&lt;/p&gt;  &lt;p&gt;This will essentially get us the tab records that are accessible with VIEW permissions for the given user. &lt;/p&gt;  &lt;p&gt;As I've mentioned before, some things are not covered in this query:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Permissions to a specific user id&lt;/li&gt;    &lt;li&gt;Roles with start and expiry dates&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But in my opinion it's a good starting point for anyone who needs to create a security-aware tab retrieval query in DNN. &lt;/p&gt;  &lt;p&gt;Please let me know what you think.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-8198273777332118124?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/O_7XrMe2H6LSmnUi6U820ZkzgSw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O_7XrMe2H6LSmnUi6U820ZkzgSw/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/O_7XrMe2H6LSmnUi6U820ZkzgSw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O_7XrMe2H6LSmnUi6U820ZkzgSw/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/VSeu7OsJpvo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/8198273777332118124/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=8198273777332118124" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8198273777332118124?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/8198273777332118124?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/VSeu7OsJpvo/retrieving-tabs-using-sql-security.html" title="Retrieving tabs using SQL, security-aware" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/06/retrieving-tabs-using-sql-security.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUACQnc6eip7ImA9WxdTGUk.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-9174405164613583460</id><published>2008-05-16T17:04:00.003+03:00</published><updated>2008-05-16T17:22:43.912+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-16T17:22:43.912+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>The dbo.tabs.IconFile field issue</title><content type="html">The case is fairly simple: In a DNN installation, we needed the user to use the IconFile field (i.e. the "Icon" field in the Advanced Settings section of the Page Properties page to add a custom icon to each page they made. We would then use a query created in Bi4Ce's &lt;a href="http://www.bi4ce.com/"&gt;ListX &lt;/a&gt;module to present a list of pages in the form of an in-page navigation menu for a specific portion of the portal.&lt;br /&gt;&lt;br /&gt;To our horror, we discovered (using DNN version 4.8.2), that the IconFile field in the Tabs table takes two types of values: Either a value like "FileID=xxx", where xxx is the id of a record in the Files table, or the full path of the image file (Portals/0 is implied, so the file path is starting with the next sub folder).&lt;br /&gt;&lt;br /&gt;That is, if you've set the icon to be in portals/0/myimages/myimage.jpg, you either get an entry in the Tabs table like "FileId=2312", or an entry like "myimages/myimage.jpg". At this point we are not sure why this is happening, but the truth is we don't care. We just want the path to the actual file either way.&lt;br /&gt;&lt;br /&gt;In the case of the fileid thing, you can get the path by joining the tabs table with the files table and then the files table with the folders table (the folder path itself is in the folders table) and voila. In the case where the full path exists in the IconFile field, you obviously don't need to do anything else.&lt;br /&gt;&lt;br /&gt;We created a query which decides on what to do and produces a result set with two fields: tabid and img where img ALWAYS contains the full path to the image file (provided that one is set for the page), regardless of whether it's in the form "FileID=xxx" or in the full path form, and I'd like to share it with you.&lt;br /&gt;&lt;br /&gt;You can easily make a view out of it and use it where appropriate. It hasn't been tested on multi-portal installations, maybe things will differ a bit there. Comments are always welcome. Here goes:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;select &lt;br /&gt; tabid&lt;br /&gt; , case &lt;br /&gt;  when ltrim(rtrim(iconfilepath))='' &lt;br /&gt;  then folderpath+filename&lt;br /&gt;  else iconfilepath&lt;br /&gt;  end &lt;br /&gt; as img&lt;br /&gt;&lt;br /&gt;from &lt;br /&gt;(&lt;br /&gt;select &lt;br /&gt;&lt;br /&gt;   tabid&lt;br /&gt; , taborder&lt;br /&gt; , case&lt;br /&gt;  when patindex ('FileID=%', iconfile) &gt;0&lt;br /&gt;  then convert(int, replace(iconfile, 'fileid=', '')) &lt;br /&gt;  else 0&lt;br /&gt;  end &lt;br /&gt; as iconfileid&lt;br /&gt; , case&lt;br /&gt;  when patindex ('FileID=%', iconfile) =0&lt;br /&gt;  then iconfile&lt;br /&gt;  else ''&lt;br /&gt;  end &lt;br /&gt; as iconfilepath&lt;br /&gt; &lt;br /&gt;from &lt;br /&gt; tabs &lt;br /&gt;where &lt;br /&gt; isdeleted=0 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;) mytabs&lt;br /&gt;&lt;br /&gt;left outer join files&lt;br /&gt;on files.fileid = iconfileid&lt;br /&gt;left outer join folders&lt;br /&gt;on files.folderid = folders.folderid&lt;br /&gt;&lt;br /&gt;order by &lt;br /&gt; taborder asc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-9174405164613583460?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9aK1FfUJpuHKPu8qYEgf82Pc9PI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9aK1FfUJpuHKPu8qYEgf82Pc9PI/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/9aK1FfUJpuHKPu8qYEgf82Pc9PI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9aK1FfUJpuHKPu8qYEgf82Pc9PI/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/JEV2ksYWoE4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/9174405164613583460/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=9174405164613583460" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/9174405164613583460?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/9174405164613583460?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/JEV2ksYWoE4/dbotabsiconfile-field-issue.html" title="The dbo.tabs.IconFile field issue" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/05/dbotabsiconfile-field-issue.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYNSXc9cCp7ImA9WxZWFEQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7103261127227321277</id><published>2008-03-13T18:54:00.003+02:00</published><updated>2008-03-14T13:13:18.968+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-14T13:13:18.968+02:00</app:edited><title>Solving the Search Results problem when using the free MMLinks localizable module</title><content type="html">(This article assumes that you have an advanced knowledge of what's going on inside the DotNetNuke portal framework and its Search indexer.)&lt;br /&gt;&lt;br /&gt;For those of you who don't know what the MMLinks module is, &lt;a href="http://dnn.tiendaboliviana.com/web/Modulesandresources/Modules/MMLinks/tabid/77/Locale/en-US/Default.aspx"&gt;go here &lt;/a&gt;to find out.&lt;br /&gt;&lt;br /&gt;(waiting for you to read...)&lt;br /&gt;&lt;br /&gt;Okay, now you know. With MMLinks, you can replace your standard Text/HTML modules with fully localizable ones, localizing both the title and the Text/HTML part. With one slight defect: Since DotNetNuke's search indexer doesn't know anything about the localized titles, it insists on presenting the default, non-localized module title in the Search Results page (that would be "MMLinks" if you leave it intact).&lt;br /&gt;&lt;br /&gt;The reason for this is that localized titles for the MMLinks modules are kept in a different table: Delisoft_MMLinksTitleLocales. DotNetNuke doesn't take this table into consideration when indexing, so no localized titles in Search Results.&lt;br /&gt;&lt;br /&gt;I tried to solve this problem by creating a trigger which affects the core SearchItem table. That's right, the table where all indexed items are kept. The trigger investigates whether the row being updated belongs to an MMLinks module instance (by checking the ModuleDefinitions table). If it does, it replaces the contents of the Title field with the localized MMLinks title. Since MMLinks modules produce one entry for each locale, voila. You've got localized MMLinks titles in Search Results (which, by the way, uses the contents of the SearchItem table).&lt;br /&gt;&lt;br /&gt;I am providing this code in order to receive comments and / or improvements to it. Please do not use it anywhere near sensitive data or production databases. It may not work correctly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, first, a catch-all disclaimer to make the above statement even stronger :) :&lt;br /&gt;&lt;br /&gt;CAUTION: THE TRIGGER HAS BEEN ONLY TESTED A COUPLE OF TIMES. IT IS SUGGESTED THAT YOU DO NOT USE THIS CODE IN A PRODUCTION ENVIRONMENT. IT IS STRONLGY ADVISED THAT YOU BACKUP YOUR DOTNETNUKE DATABASE FIRST. I DO NOT TAKE RESPONSIBILITY FOR ANY MALFUNCTION OR DATA LOSS THAT MAY RESULT FROM USING THE CODE PROVIDED HERE.  USE AT YOUR OWN RISK.&lt;br /&gt;&lt;br /&gt;And now, the code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;-- =============================================&lt;br /&gt;-- Author: Tool&lt;br /&gt;-- Create date: March 2008&lt;br /&gt;-- Description: A trigger which changes the title&lt;br /&gt;-- field in the SearchItem table and replaces it&lt;br /&gt;-- with the LOCALIZED title when using the MMLinks&lt;br /&gt;-- module. USE AT YOUR OWN RISK.&lt;br /&gt;-- =============================================&lt;br /&gt;ALTER TRIGGER [dbo].[tr_Tool_setLocalizedTitleForMMLInksModule]&lt;br /&gt;   ON  [dbo].[SearchItem]&lt;br /&gt;   AFTER INSERT, UPDATE&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt; -- SET NOCOUNT ON added to prevent extra result sets from&lt;br /&gt; -- interfering with SELECT statements.&lt;br /&gt; SET NOCOUNT ON&lt;br /&gt;&lt;br /&gt; DECLARE @searchItemId int&lt;br /&gt; SELECT @searchItemId = searchItemId FROM Inserted&lt;br /&gt;&lt;br /&gt; DECLARE @moduleid int&lt;br /&gt; SELECT @moduleid = moduleid FROM Inserted&lt;br /&gt;&lt;br /&gt; -- Do work ONLY if entry in SearchItem table concerns an MMLinks module instance.&lt;br /&gt; IF EXISTS&lt;br /&gt;  (&lt;br /&gt;  SELECT&lt;br /&gt;   ModuleId&lt;br /&gt;  FROM&lt;br /&gt;   dbo.Modules&lt;br /&gt;  WHERE&lt;br /&gt;   ModuleDefId in&lt;br /&gt;    (&lt;br /&gt;    SELECT&lt;br /&gt;     ModuleDefId&lt;br /&gt;    FROM&lt;br /&gt;     dbo.ModuleDefinitions&lt;br /&gt;    WHERE&lt;br /&gt;     FriendlyName ='MMLinks'&lt;br /&gt;    )&lt;br /&gt;  AND ModuleId = @moduleid&lt;br /&gt;  )&lt;br /&gt; BEGIN&lt;br /&gt;&lt;br /&gt;  DECLARE @localetext nvarchar(150)&lt;br /&gt;&lt;br /&gt;  --Get the localized text&lt;br /&gt;  --In order to find the localized text, we use a trick.&lt;br /&gt;  --MMLinks fillds the SearchKey column in the SearchItem table with the&lt;br /&gt;  --moduleId concatenated with the locale, in the form xxx-yyy. We use this&lt;br /&gt;  --information to track the correct entry in the MMLinksTitleLocales table.&lt;br /&gt;  &lt;br /&gt;  SELECT&lt;br /&gt;   @localetext = LocaleText&lt;br /&gt;  FROM&lt;br /&gt;   dbo.Delisoft_MMLinksTitleLocales&lt;br /&gt;  WHERE&lt;br /&gt;   (CONVERT (varchar(5), ModuleId)+'-'+ LocaleKey) =&lt;br /&gt;   (SELECT SearchKey FROM SearchItem WHERE SearchItemID = @searchitemid)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;  --Once we have the localized text, do the update.&lt;br /&gt;  IF @localetext IS NOT NULL AND rtrim(ltrim(@localetext))&lt;&gt;''&lt;br /&gt;  BEGIN&lt;br /&gt;   UPDATE&lt;br /&gt;    dbo.SearchItem&lt;br /&gt;   SET&lt;br /&gt;    Title = @localetext&lt;br /&gt;   WHERE SearchItemId = @searchitemid&lt;br /&gt;  END&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; SET NOCOUNT OFF&lt;br /&gt;END&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to see immediate results, just delete everything in your SearchItem table and do a content re-index from the Host Search Admin menu.&lt;br /&gt;&lt;br /&gt;I'm anxiously waiting for comments.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdnnuke.blogspot.com%2f2008%2f03%2fsolving-search-results-problem-when.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdnnuke.blogspot.com%2f2008%2f03%2fsolving-search-results-problem-when.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7103261127227321277?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q8yi5L4ZJ9KGXJ7gEWCa1SxGEn8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q8yi5L4ZJ9KGXJ7gEWCa1SxGEn8/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/Q8yi5L4ZJ9KGXJ7gEWCa1SxGEn8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q8yi5L4ZJ9KGXJ7gEWCa1SxGEn8/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/-P_HFO4n5DU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7103261127227321277/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7103261127227321277" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7103261127227321277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7103261127227321277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/-P_HFO4n5DU/solving-search-results-problem-when.html" title="Solving the Search Results problem when using the free MMLinks localizable module" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2008/03/solving-search-results-problem-when.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcARngzfCp7ImA9WxZWFEQ.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-5558572934422089171</id><published>2007-12-06T12:00:00.002+02:00</published><updated>2008-03-14T13:10:47.684+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-14T13:10:47.684+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tweaking" /><title>Integrating the Lightbox JS 2.03.3 image overlay script with DNN</title><content type="html">According to its creators, &lt;em&gt;"Lightbox is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on all modern browsers."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;And it really does what they say. So, why not use it with DNN? The fact that it can also work with groups of pictures providing basic back/forward navigation functionality makes it ideal as a lightweight picture gallery. Of course, it can be used with single pictures too, eliminating popup windows in order to see a picture, complete with (optional) caption, at a larger size.&lt;br /&gt;&lt;br /&gt;In order to get Lightbox to work, you first need to go get if from &lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;http://www.huddletogether.com/projects/lightbox2/&lt;/a&gt; . There you can also see examples and the way you can integrate Lightbox in an HTML page. So we'll only concentrate on things needed to be done in DNN here.&lt;br /&gt;&lt;br /&gt;Our aim is to integrate Lightbox with a specific skin, not with the whole DNN installation. This way we'll have more flexibility regarding access to hosted DNN installations which may only allow access to the "Portals" folder.&lt;br /&gt;&lt;br /&gt;So here are our steps:&lt;br /&gt;&lt;br /&gt;1. Under the skin folder you wish to use for your DNN portal, create a folder called "Lightbox" and drop the contents of the .zip file you downloaded there. Three directories will be created: js, images and css.&lt;br /&gt;&lt;br /&gt;2. Delete the html file as it only serves as an example.&lt;br /&gt;&lt;br /&gt;3. Append the contents of the lightbox.css file that you'll find in the css folder into your skin.css file. You can keep the lightbox.css file, but you'll only make things more complex :)&lt;br /&gt;&lt;br /&gt;4. Delete the lightbox/css folder if you like, as it is no longer needed.&lt;br /&gt;&lt;br /&gt;5. In the ASCX file you will be using for your skin, put the following code immediately after the "@Register" tags as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;&lt;br /&gt; &amp;lt;script src="&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&amp;lt;%&lt;/i&gt;&lt;span style="font-size:78%;color:blue;"&gt;&lt;span style="font-size:78%;color:blue;"&gt;=&lt;/span&gt;&lt;/span&gt;skinpath&lt;i&gt;%&amp;gt;&lt;/i&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;lightbox/js/prototype.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;script src="&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&amp;lt;%&lt;/i&gt;&lt;span style="font-size:78%;color:blue;"&gt;&lt;span style="font-size:78%;color:blue;"&gt;=&lt;/span&gt;&lt;/span&gt;skinpath&lt;i&gt;%&amp;gt;&lt;/i&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;lightbox/js/scriptaculous.js?load=effects" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;script src="&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&amp;lt;%&lt;/i&gt;&lt;span style="font-size:78%;color:blue;"&gt;&lt;span style="font-size:78%;color:blue;"&gt;=&lt;/span&gt;&lt;/span&gt;skinpath&lt;i&gt;%&amp;gt;&lt;/i&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;lightbox/js/lightbox.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Update: For LightBox v2.04, the second line must be:&lt;br /&gt;&amp;lt;script src="&amp;lt;%=skinpath%&amp;gt;lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;SKINPATH is a DNN token and will be replaced at runtime with your current skin's path.&lt;br /&gt;&lt;br /&gt;6. Immediately after the above piece of code, insert the following code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt; var fileLoadingImage = "&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&amp;lt;%&lt;/i&gt;&lt;span style="font-size:78%;color:blue;"&gt;&lt;span style="font-size:78%;color:blue;"&gt;=&lt;/span&gt;&lt;/span&gt;skinpath&lt;i&gt;%&amp;gt;&lt;/i&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;lightbox/images/loading.gif";&lt;br /&gt;        var fileBottomNavCloseImage = "&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&amp;lt;%&lt;/i&gt;&lt;span style="font-size:78%;color:blue;"&gt;&lt;span style="font-size:78%;color:blue;"&gt;=&lt;/span&gt;&lt;/span&gt;skinpath&lt;i&gt;%&amp;gt;&lt;/i&gt;&lt;span class="cch1"&gt;&lt;span style="color:gray;"&gt;lightbox/images/closelabel.gif";&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Why do we need this? The javascript file declares these two variables supposing they will be inside a folder relative to the physical position of the script, but that's not how DNN works, since our current path is NOT the skin's path, but the root path of the DNN installation! So we must override the paths here in order to be transparent to the image paths (using the skin path). We also have the additional ability to change the images used for the "close image" function here.&lt;br /&gt;&lt;br /&gt;7. Open your skin.css file, locate the part you have copied from lightbox.css and locate the #prevLink, #nextLink classes. Change the paths to the three images for blank background, previous and next picture mentioned there as follows:&lt;br /&gt;&lt;br /&gt;../images/blank.gif to lightbox/images/blank.gif&lt;br /&gt;../images/prevlabel.gif to lightbox/images/prevlabel.gif&lt;br /&gt;../images/nextlabel.gif to lightbox/images/nextlabel.gif&lt;br /&gt;&lt;br /&gt;These images are unfortunately defined by the stylesheet, so since we moved the contents to skin.css we must make the positions of the images relative to the position of our current skin file. I will say again that you could always include the original lightbox.css but the current way is just my suggestion.&lt;br /&gt;&lt;br /&gt;Of course you can use any image you like for next, previous and close functions as long as you maintain correct paths.&lt;br /&gt;&lt;br /&gt;8. Try entering some image links into a text/html module as described in the original instructions for Lightbox and see what happens. Note: You can't use the aspx page link provided by the file manager when using lightbox. You must provide the links exactly as described in their (simple) instructions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally, if the required JS files seem too big (approx. 103K total size) you could always use a JScript compressor like &lt;a href="http://javascriptcompressor.com/"&gt;http://javascriptcompressor.com/&lt;/a&gt; to reduce the total file size.&lt;br /&gt;&lt;br /&gt;Please send comments if something in the instructions is not correct, so as to have it immediately corrected.&lt;br /&gt;&lt;br /&gt;Happy Lightboxing! :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdnnuke.blogspot.com%2f2007%2f12%2fintegrating-lightbox-js-2033-image.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdnnuke.blogspot.com%2f2007%2f12%2fintegrating-lightbox-js-2033-image.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-5558572934422089171?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4CODCNobAYX6iLT53h-Lm0vD4x8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4CODCNobAYX6iLT53h-Lm0vD4x8/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/4CODCNobAYX6iLT53h-Lm0vD4x8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4CODCNobAYX6iLT53h-Lm0vD4x8/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/uLqNBVqrhfQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/5558572934422089171/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=5558572934422089171" title="20 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5558572934422089171?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5558572934422089171?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/uLqNBVqrhfQ/integrating-lightbox-js-2033-image.html" title="Integrating the Lightbox JS 2.03.3 image overlay script with DNN" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">20</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2007/12/integrating-lightbox-js-2033-image.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAARXY4fyp7ImA9WB9XEU0.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-5140990416515197602</id><published>2007-11-03T17:44:00.001+02:00</published><updated>2007-11-03T17:45:44.837+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-03T17:45:44.837+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Video" /><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>Video: Creating DotNetNuke Modules</title><content type="html">A free video from &lt;a href="http://www.jumpstarttv.com"&gt;JumpStart TV &lt;/a&gt;explaining how to create your own DotNetNuke modules. You can watch it online &lt;a href="http://www.jumpstarttv.com/Player.aspx?vid=67"&gt;right here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-5140990416515197602?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2bq5xzMTLHgo1zImBbC0QSnwXr0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2bq5xzMTLHgo1zImBbC0QSnwXr0/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/2bq5xzMTLHgo1zImBbC0QSnwXr0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2bq5xzMTLHgo1zImBbC0QSnwXr0/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/fau3MkxCM6g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/5140990416515197602/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=5140990416515197602" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5140990416515197602?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/5140990416515197602?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/fau3MkxCM6g/video-creating-dotnetnuke-modules.html" title="Video: Creating DotNetNuke Modules" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2007/11/video-creating-dotnetnuke-modules.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcDQno5cCp7ImA9WB9SEEU.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-1450208661208234047</id><published>2007-09-29T17:41:00.000+03:00</published><updated>2007-09-29T20:14:33.428+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-29T20:14:33.428+03:00</app:edited><title>Using the ListX module to create a database-driven master-detail interface on a single web page</title><content type="html">Warning: This article assumes that you're aware of the &lt;a href="http://www.bi4ce.com/?tabid=122&amp;amp;pid=2"&gt;ListX module &lt;/a&gt;by &lt;a href="http://www.bi4ce.com/"&gt;Bi4ce &lt;/a&gt;and that you have a basic understanding of what this module does, as well as a basic understaning of what &lt;a href="http://www.dotnetnuke.com/"&gt;DotNetNuke &lt;/a&gt;is. This article requires you to have the ListX module installed in your DotNetNuke portal.&lt;br /&gt;&lt;br /&gt;Needless to say I am not a Bi4ce employee, I have just been using ListX and I'm thrilled about what this module can do - ListX lets you effortlesly pull data from any data source into DNN and present it the way you want - even use AJAX to do it.&lt;br /&gt;&lt;br /&gt;The title may seem complex at first, but in fact what I would like to demonstrate is the exciting functionality of the &lt;a href="http://www.bi4ce.com/?tabid=122&amp;amp;pid=2"&gt;ListX module &lt;/a&gt;with which not only can you issue custom queries (for tables inside your own DotNetNuke database or for any other source) and display results as a grid or repeater-like style, but you can also easily create detail pages - AJAX-enabled - which can reflect your choice in the "master" part without even having to reload the current web page.&lt;br /&gt;&lt;br /&gt;First of all, we'll need a table to pull our data from. For the sake of simplicity, we'll just use an existing DotNetNuke table which will contain data even in a default installation: The Tabs table. The Tabs table contains information about our DNN pages, i.e. the title, the id and so forth. In a default installation, the table is filled with our default page info along with all the administrative pages for the Admin and Host accounts. Of course, nothing stops you from using your own table that you may create inside your DNN database or even a table from an external database. ListX supports it all.&lt;br /&gt;&lt;br /&gt;Let's just mention the SQL we'll be using to retrieve list and detail data, we'll be using the statements later in our respective ListX instances.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Query 1: &lt;/strong&gt;The query that we'll be using to present a list of available entries for the Tabs table&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SELECT tabid AS pageid, tabname FROM tabs ORDER BY tabname DESC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Query 2:&lt;/strong&gt; the query that we'll be using to present the details of a record&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SELECT tabname, title, isvisible, iconfile, tabpath FROM tabs WHERE tabid = @pageid&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you're curious about the &lt;strong&gt;@pageid&lt;/strong&gt; thing, have in mind that, when using the query in ListX, this will represent a &lt;strong&gt;parameter&lt;/strong&gt; which will be replaced at runtime with the given tab id. The tabid field is a primary key for the Tabs table, so we're using this WHERE clause in our details query to ensure that it will return the requested record and that it'll be one and only one record.&lt;br /&gt;Also notice that in Query 1 we give the alias &lt;strong&gt;"pageid"&lt;/strong&gt; to the column &lt;strong&gt;"tabid".&lt;/strong&gt; This is done because "tabid" is already a querystring parameter in DotNetNuke and we wouldn't like our Details module to confuse this querystring parameter for our own. More details on this will follow.&lt;br /&gt;&lt;br /&gt;Finally, notice that in the details query we're just pulling some more columns from the Tabs table. I'm trying to keep this simple, so I'm not pulling too many columns - just enough to show a visual difference between list data and detail data.&lt;br /&gt;&lt;br /&gt;It's time to create our first ListX component which will be the "master" part of our Master-Detail interface. Just add a ListX instance on any page you like (no details on that! If you're reading this you know how to do that! :).&lt;br /&gt;&lt;br /&gt;- Click "&lt;strong&gt;View Options"&lt;/strong&gt; on your new module's drop-down menu and you'll be transferred to the View Options page.&lt;br /&gt;- Click the "&lt;strong&gt;Query"&lt;/strong&gt; icon to show the Query section and query no.1 like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_GEekUYeFuZ0/Rv55dSdd0AI/AAAAAAAAAFk/8vLDOa4nlpQ/s1600-h/listx_1.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115659770818056194" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_GEekUYeFuZ0/Rv55dSdd0AI/AAAAAAAAAFk/8vLDOa4nlpQ/s400/listx_1.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;- Click &lt;strong&gt;"Save and Continue"&lt;/strong&gt;.&lt;br /&gt;- Click the &lt;strong&gt;"Format"&lt;/strong&gt; icon (you can click the &lt;strong&gt;"Query"&lt;/strong&gt; icon a second time to hide the Query section). &lt;/p&gt;&lt;p&gt;Our next step is to define the template for showing our data. Click the pencil next to &lt;strong&gt;"List Item Detail" &lt;/strong&gt;to edit the list item detail template and define a very simple template, like the following: &lt;/p&gt;&lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_GEekUYeFuZ0/Rv5tnCddz5I/AAAAAAAAAEs/6EaxGauKz1g/s1600-h/listx_2.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115646744182247314" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_GEekUYeFuZ0/Rv5tnCddz5I/AAAAAAAAAEs/6EaxGauKz1g/s400/listx_2.jpeg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Note that this template doesn't provide us with any links in order to connect with the Details part of our page, but we'll add the markup for that later.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Click &lt;strong&gt;"Save and Continue"&lt;/strong&gt;.&lt;br /&gt;- Click on the &lt;strong&gt;"Format"&lt;/strong&gt; icon again to make the section hide, if you like.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For now, we'll finish by checking the &lt;strong&gt;"Show all records"&lt;/strong&gt; checkbox on the General section of the View Options page for our module, so that we can see the records. Click the &lt;strong&gt;"General"&lt;/strong&gt; icon and check the&lt;strong&gt; "Show All Records"&lt;/strong&gt; checkbox, as in the picture:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_GEekUYeFuZ0/Rv5uPyddz6I/AAAAAAAAAE0/26eB0ISwV2o/s1600-h/listx_3.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115647444261916578" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_GEekUYeFuZ0/Rv5uPyddz6I/AAAAAAAAAE0/26eB0ISwV2o/s400/listx_3.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;- Click &lt;strong&gt;"Save Configuration"&lt;/strong&gt; to return to your page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's how our first result will look like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_GEekUYeFuZ0/Rv56JCdd0BI/AAAAAAAAAFs/0kpr29JhRBk/s1600-h/listx_4.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115660522437333010" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_GEekUYeFuZ0/Rv56JCdd0BI/AAAAAAAAAFs/0kpr29JhRBk/s400/listx_4.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So we've got a list which comes from a query made on our Tabs table, which contains links that lead nowhere - for the time being. Let's start preparing our second ListX module instance - the details section. For that, we'll have to add another ListX instance on our page, directly beneath the first one. So, add a second ListX instance now.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For reasons of not being too verbose, I'll be skipping the steps on how to go to the various sections of the View Options page from now on. Be sure to click &lt;strong&gt;"Save and Continue"&lt;/strong&gt; after you have finished a series of actions so as not to accidentally lose your configuration.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Working with our second ListX instance (the "detail" instance), we must also specify a query to pull data from our Tabs table. We'll use Query no.2 here, as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_GEekUYeFuZ0/Rv56aydd0CI/AAAAAAAAAF0/vqYsKrIfa_c/s1600-h/listx_5.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115660827380011042" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_GEekUYeFuZ0/Rv56aydd0CI/AAAAAAAAAF0/vqYsKrIfa_c/s400/listx_5.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;and a simple template in the Format section under List Item Detail for presenting our data:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_GEekUYeFuZ0/Rv5zPyddz_I/AAAAAAAAAFc/OtFNiBTgrYk/s1600-h/listx_6.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115652941820055538" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_GEekUYeFuZ0/Rv5zPyddz_I/AAAAAAAAAFc/OtFNiBTgrYk/s400/listx_6.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;As usual, don't forget to check&lt;strong&gt; "Show all records"&lt;/strong&gt; in the General section of our second module's View Options.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This is going to present us the details of a record selected in our first ListX module instance - but in order for this to work, we need to define one more thing in our Detail instance: The &lt;strong&gt;@pageid&lt;/strong&gt; query parameter. This parameter will be coming from the QueryString (that's the way ListX works), so we've got to issue something like the following in the Variables section of View Options:&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_GEekUYeFuZ0/Rv567idd0DI/AAAAAAAAAF8/cdH7BbYOM7Y/s1600-h/listx_7.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115661390020726834" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_GEekUYeFuZ0/Rv567idd0DI/AAAAAAAAAF8/cdH7BbYOM7Y/s400/listx_7.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Details on how to do that (need to be a bit more explanatory here):&lt;/p&gt;&lt;br /&gt;&lt;p&gt;- In View Options, click the &lt;strong&gt;"Variables"&lt;/strong&gt; icon.&lt;br /&gt;- The Variables interface appears. Click &lt;strong&gt;"New Query Variable"&lt;br /&gt;&lt;/strong&gt;- Choose &lt;strong&gt;"QueryString"&lt;/strong&gt; as the variable type from the Variable Type combo box&lt;br /&gt;- Enter &lt;strong&gt;"pageid"&lt;/strong&gt; at the Source textbox&lt;br /&gt;- Enter &lt;strong&gt;"@pageid"&lt;/strong&gt; at the Target text box&lt;br /&gt;- Click &lt;strong&gt;"Save" &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Remeber what I told you about querystring parameters? Tabid is already a querystring parameter (if you're using friendly URLs you'll see it appearing as&lt;strong&gt; /tabid/xxx &lt;/strong&gt;where xxx is your page's id, and if you're not using friendly URLs you'll see it appearing as &lt;strong&gt;/default.aspx?tabid=xxx&lt;/strong&gt;). Whatever the case, we've GOT to use another name for our parameter, hence the AS alias in our Query no.1 in the first place in order to be concise with the naming.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;- Click &lt;strong&gt;"Save Configuration".&lt;/strong&gt; You will return to your page.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What we did was to define a variable that will be contained in the querystring and will have the name "pageid". The value of that variable will go into the query parameter @pageid (remember our query?) so essentially our WHERE clause will get a record with a specific tab id.&lt;/p&gt;&lt;p&gt;But hold on. Aren't we supposed to make our first (master) module instance communicate in some way with our second (detail) instance and pass that variable? &lt;/p&gt;&lt;p&gt;Yes, we are. Since we've got the tab id value for every record in the first place (remember Query no.1), now it's the time to use it. Let's go to our first module's View Options and edit the Template section as follows:&lt;/p&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_GEekUYeFuZ0/Rv57Zidd0EI/AAAAAAAAAGE/Xa5m-WzRFQ0/s1600-h/listx_8.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115661905416802370" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_GEekUYeFuZ0/Rv57Zidd0EI/AAAAAAAAAGE/Xa5m-WzRFQ0/s400/listx_8.jpeg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;Notice the HREF part of our link. The &lt;strong&gt;lxFetch function&lt;/strong&gt; is a JavaScript function defined by ListX and, in short, refreshes a given module passing it any number of name/value pairs for querystring variables needed.&lt;br /&gt;&lt;br /&gt;The&lt;strong&gt; first argument&lt;/strong&gt; is the module ID of the module we want to refresh (fetch). There are a number of ways to get to know the module number, the simplest of which is to look for the "mid" parameter value in our querystring when in View Options or Module Settings for our ListX module. In our case, our Detail module's id is 375.&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;You can find some information for the &lt;strong&gt;second argument&lt;/strong&gt; in the ListX documentation, but it's ok for our example if we leave it with the default value 0. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The &lt;strong&gt;third argument&lt;/strong&gt; specifies the name/value pairs that we want to pass to the module that will be fetching data (i.e., our detail listx module with module id 375). The [pageid] string will be replaced with the specific record's tab id (remember: tabid AS pageid) at runtime, so we'll have a different value for each record shown. This value will be passed to our "detail" listX module as a querystring variable (although the DNN page itself won't be refreshed and thus you won't be seeing the pageid variable in the actual query string) and it'll be used by our query as we specified. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The result is a master/detail interface in which the detail module's content will change WITHOUT reloading the page each time we click on one of our master module's links. Of course, you can extend that example and use your own table with better formatting on your master / detail modules (your master module's layout can easily become a multicolumn grid and your detail module's layout can easily be transformed to a neatly-aligned detail view)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This is a screenshot of our final result:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_GEekUYeFuZ0/Rv6Czidd0FI/AAAAAAAAAGM/Wv8x7QX9gf0/s1600-h/listx_9.jpeg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5115670048674795602" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_GEekUYeFuZ0/Rv6Czidd0FI/AAAAAAAAAGM/Wv8x7QX9gf0/s400/listx_9.jpeg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;By clicking on any link on the first ListX module, the contents of the second ListX module change reflecting the selected record's details without the page being reloaded.&lt;/p&gt;&lt;p&gt;Of course, there are some more issues like what you can show when the page first loads (when there's no selected record), which are beyond the scope of this article. It's easy, though, to have the second module hidden at first, or have it present a message like "Please select a record". &lt;/p&gt;&lt;p&gt;Happy ListX'ing!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://dnnuke.blogspot.com/2007/09/using-listx-component-to-create.html"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://dnnuke.blogspot.com/2007/09/using-listx-component-to-create.html" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-1450208661208234047?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JMy2cwccKNPqc-3Qm6ZZg-2LWLc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JMy2cwccKNPqc-3Qm6ZZg-2LWLc/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/JMy2cwccKNPqc-3Qm6ZZg-2LWLc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JMy2cwccKNPqc-3Qm6ZZg-2LWLc/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/3gk95g9q6rY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/1450208661208234047/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=1450208661208234047" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1450208661208234047?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/1450208661208234047?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/3gk95g9q6rY/using-listx-component-to-create.html" title="Using the ListX module to create a database-driven master-detail interface on a single web page" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_GEekUYeFuZ0/Rv55dSdd0AI/AAAAAAAAAFk/8vLDOa4nlpQ/s72-c/listx_1.jpeg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2007/09/using-listx-component-to-create.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUABRn46fyp7ImA9WB9TF0U.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-3787623913769278337</id><published>2007-09-26T09:18:00.001+03:00</published><updated>2007-09-26T09:22:37.017+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-26T09:22:37.017+03:00</app:edited><title>Testing the ISearchable interface</title><content type="html">When you create a DotNetNuke custom module you often have to implement the ISearchable interface which allows you to integrate your module's data in DotNetNuke's Search indexer so that they are available when a user performs a search on your portal.&lt;br /&gt;&lt;br /&gt;The ISearchable interface is very powerful but unfortunately there is no easy way to test your module's integration - except if you start trying random keyword searches hoping that some of your custom module's data will eventually come up in search results.&lt;br /&gt;&lt;br /&gt;Mr. Nik Kalyani is aware of this problem and has published a solution here: &lt;a href="http://www.dotnetnuke.com/Community/BlogsDotNetNuke/tabid/825/EntryID/1100/Default.aspx"&gt;http://www.dotnetnuke.com/Community/BlogsDotNetNuke/tabid/825/EntryID/1100/Default.aspx&lt;/a&gt;&lt;br /&gt;This is esssentially an .aspx page which you can upload on the root folder of your portal. By specifying the tab id and the module id, you get all the results that have been indexed for that combination.&lt;br /&gt;&lt;br /&gt;Time-saver!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-3787623913769278337?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BetIYxs1zFZcQL4TFQW5IAikLC8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BetIYxs1zFZcQL4TFQW5IAikLC8/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/BetIYxs1zFZcQL4TFQW5IAikLC8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BetIYxs1zFZcQL4TFQW5IAikLC8/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/yTkZhBgCavU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/3787623913769278337/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=3787623913769278337" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3787623913769278337?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/3787623913769278337?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/yTkZhBgCavU/testing-isearchable-interface.html" title="Testing the ISearchable interface" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2007/09/testing-isearchable-interface.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQFSXczfCp7ImA9WB9TF0U.&quot;"><id>tag:blogger.com,1999:blog-660094329033919889.post-7876241272256050857</id><published>2007-09-26T09:07:00.001+03:00</published><updated>2007-09-26T09:15:18.984+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-26T09:15:18.984+03:00</app:edited><title>Getting locked out of DNN's login page</title><content type="html">One common accident while developing DNN portals is to change DNN's default login page through the Site Settings page. This is ok, as long as the new page you set contains a user login module. But if the new page does not, you usually get "locked out" of DNN, not being able to login since there is no way to get to the login page again.&lt;br /&gt;&lt;br /&gt;Here are two simple ways to overcome this:&lt;br /&gt;&lt;br /&gt;1. If you have access to the DNN database, locate the Portals table and change the LoginTabId field to NULL. That way, DNN will be forced to serve the default login page. (The value you'll see in this field will be the tab id of the page you accidentally specified in the Site Settings page). Alternatively, you can run the following query using Query Analyzer or Management Studio (for SQL Server 2005): Update Portals Set LoginTabId=null Where PortalId=xx (where xx is your portal id - if you only have one portal then you should specify 0).&lt;br /&gt;&lt;br /&gt;2. If you do not have access to the DNN database, you can use a solution provided by John Mitchell, &lt;a href="http://blogs.snapsis.com/PermaLink,guid,3078311e-6925-4c03-8243-d1b9c8a11906.aspx"&gt;right here&lt;/a&gt;. John provides a page which you can upload on your site. This page does the dirty work of updating the DNN database for you in order to be able to see the login page again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/660094329033919889-7876241272256050857?l=dnnuke.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3KciZlD3u63bjj84D2k5aM2gX3s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3KciZlD3u63bjj84D2k5aM2gX3s/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/3KciZlD3u63bjj84D2k5aM2gX3s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3KciZlD3u63bjj84D2k5aM2gX3s/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/SHH_URtybLk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://dnnuke.blogspot.com/feeds/7876241272256050857/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=660094329033919889&amp;postID=7876241272256050857" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7876241272256050857?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/660094329033919889/posts/default/7876241272256050857?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DotnetnukeThem/~3/SHH_URtybLk/getting-locked-out-of-dnns-login-page.html" title="Getting locked out of DNN's login page" /><author><name>Gyromyristis</name><uri>http://www.blogger.com/profile/07078677584884156019</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07147315759930180556" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://dnnuke.blogspot.com/2007/09/getting-locked-out-of-dnns-login-page.html</feedburner:origLink></entry></feed>
