<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-660094329033919889</atom:id><lastBuildDate>Wed, 04 Feb 2026 13:06:43 +0000</lastBuildDate><category>Tweaking</category><category>Modules</category><category>Extending</category><category>SQL</category><category>Troubleshooting</category><category>Implementations</category><category>Offers / Discounts</category><category>Utilities</category><category>Video</category><category>Web</category><title>DotNetNuke them!</title><description>My blog on DNN development and customization</description><link>http://dnnuke.blogspot.com/</link><managingEditor>noreply@blogger.com (Gyromyristis)</managingEditor><generator>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-313138916932193847</guid><pubDate>Mon, 30 Sep 2013 12:56:00 +0000</pubDate><atom:updated>2013-09-30T15:56:02.726+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Extending</category><category domain="http://www.blogger.com/atom/ns#">Modules</category><title>Displaying User Profile photos in other places (with a little help)</title><description>&lt;p&gt;Today I ran into a problem I didn&#39;t imagine still existed (in DNN v.7.2). I was using Ventrian Property Agent and I needed to display the profile photo of the user who made the submission inside the module&#39;s View Item template. I was surprised that neither Property Agent supported that, nor was there another way to get the user&#39;s profile image at a decent size inside the module&#39;s templates. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I&#39;m sure that even if you aren&#39;t using this specific module, you&#39;ve also ran into this issue one way or another. There is no decent built-in way to display a user&#39;s profile image outside of the user profile page itself.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In my case, there is a token Ventrian Property Agent users named [USERID] that provides the id of the user who has created the current entry. With only this in hand, I had to find a way to use it to get a decent profile picture.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First option would be to use the standard DNN /profilepic.ashx image handler, but this one returns distorted, grainy images of max 64x64 pixels. Using it like this: &amp;lt;img src=&amp;quot;/profilepic.ashx?userid=[USERID]&amp;quot;&amp;gt; would give me a crappy image, but at least an image.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Two minutes before I was ready to give up, I ran into this gem: &lt;a href=&quot;http://bbimagehandler.codeplex.com/&quot;&gt;http://bbimagehandler.codeplex.com/&lt;/a&gt; - this is a generic image handler that does a lot of things - resizing, watermarks, etc. but one interesting feature is that it can render DNN user profile images - in any dimension given, and with awesome quality compared to DNN&#39;s own profilepic.ashx.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Give it a try if you&#39;re facing the same problem. Have in mind that in order for DNN Profile Pictures to work, you&#39;ll HAVE to specify the &amp;quot;db&amp;quot; parameter as mentioned in the documentation. By specifying this parameter, it is implied that you have already updated your web.config file with this key:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&amp;lt;add key =&amp;quot;BBDatabase&amp;quot; value=&amp;quot;Connectionstring=SiteSqlServer;table=MyImages;ImageField=ImageData;idField=ImageID&amp;quot; /&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The trick is that you only need the first part if you only need BBImageHandler to handle profile images, since it already knows what tables and fields to use. So you can use this version:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&amp;lt;add key =&amp;quot;BBDatabase&amp;quot; value =&amp;quot;Connectionstring=SiteSqlServer;&amp;quot; /&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Where &amp;quot;SiteSqlServer&amp;quot; is your connection string&#39;s name (in case you have renamed it from the default name DNN gives it).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This way, it is only enough to know the user id whose profile image you need to show - In my case, as I said above, I had the [USERID] token, so my code was as follows:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&amp;lt;img src=&amp;quot;/bbimagehandler.ashx?db=BBDatabase&amp;amp;userid=[USERID]&amp;amp;portalid=0&amp;amp;width=300&amp;quot;&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And voila! A profile image with a 300px width inside a Property Agent Template! (I&#39;m thinking of even using it inside the user profile page itself).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Until next time!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/09/displaying-user-profile-photos-in-other.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-5817228047576316844</guid><pubDate>Wed, 04 Sep 2013 14:45:00 +0000</pubDate><atom:updated>2013-09-04T17:45:08.007+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Customizing DNN 7 Search and Search Results</title><description>&lt;p&gt;DNN 7 has introduced a new, Lucene-powered indexing and search results retrieval mechanism. This means that all techniques you knew are not in effect any more. No more SQL queries and/or tables, data get returned in JSON format and rendered via Javascript. For more details, please &lt;a href=&quot;http://www.dnnsoftware.com/community-blog/cid/153947/Search-Done-Right-in-DNN&quot; target=&quot;_blank&quot;&gt;read this post on DNNSofware.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This adds a whole lot of new functionality but also a lot of limitations in the way Search Results are presented. Actually, there never was a straightforward way to customize Search Results, but until now you could just edit SearchResults.ascx and its corresponding code-behind file and have your desired result.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Things are still ugly regarding customization. The default Search Results layout includes a link guiding you to advanced search concepts, an &amp;quot;Advanced&amp;quot; form that asks you to provide various information such as where you want to search (categorized by module type) and so forth.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This doesn&#39;t always make sense to end users, and some elements have to be removed in specific scenarios. Users don&#39;t always want advanced search options, nor do they need to know what type of modules your site contains. In some cases they don&#39;t give a damn about the author, or the last modified date too. But there&#39;s no immediate way to configure what will be displayed and what will be not.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Moreover, until now you could face the problem of default module titles (which users usually leave as is because they are using containers that didn&#39;t include the module title) by tweaking the way module titles were inserted in the SearchItem table (&lt;a href=&quot;http://dnnuke.blogspot.gr/2009/04/replacing-default-module-titles-in.html&quot; target=&quot;_blank&quot;&gt;see this older post for more&lt;/a&gt;). Since no SQL tables are used any more, you&#39;re left with ugly &amp;quot;Text/HTML&amp;quot; and other default titles in Search Results. The JSON returned for each search result item just contains a title that is often made of a concatenation of the tab&#39;s name and the module&#39;s title (or, in the case of grouped results, just the module&#39;s title). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Moreover, having a module with a BLANK title is no longer an option since modules with blank titles are not indexed(!). For more info, see my question here: &lt;b&gt;&lt;a href=&quot;http://www.dnnsoftware.com/answers/cid/420779&quot;&gt;http://www.dnnsoftware.com/answers/cid/420779&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So le&#39;t see how we can address all of the above with some modifications on specific files. Be warned that what I&#39;m saying here applies to version 7.1 and may or may not be in effect for future DNN versions, as well as that those changes are not upgrade-proof, meaning that if you upgrade your site to a higher DNN version you may lose them. But, it&#39;s better than nothing. :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Be sure to get a backup of all the files you are going to modify in case something goes wrong!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let&#39;s start.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hiding the &amp;quot;advanced&amp;quot; link&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;File: dnn.SearchResult.js &lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to line 343, you will see a call to the DnnSearchBox like the following&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font size=&quot;1&quot;&gt; dnn.searchResult.searchInput = $(&#39;#dnnSearchResult_dnnSearchBox&#39;).dnnSearchBox({       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; id: &#39;dnnSearchResult_dnnSearchBox&#39;,        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; filterText: dnn.searchResult.defaultSettings.advancedText,        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; showAdvanced: true,        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; advancedId: &#39;dnnSearchResultAdvancedForm&#39;,&lt;/font&gt;      &lt;br /&gt;...&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Locate this line:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;showAdvanced: true,&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And change it to &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;showAdvanced: false,&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is an option that you can&#39;t access via the module settings and it hides the &amp;quot;advanced&amp;quot; link. Unfortunately, the form that would pop up will still be visible at the bottom of the page so you have to take an extra step:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: SearchResults.ascx&lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to around line 55 and you&#39;ll see a DIV element surrounding the elements of the Advanced form, like the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;lt;div id=&amp;quot;dnnSearchResultAdvancedForm&amp;quot; class=&amp;quot;dnnForm&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div class=&amp;quot;dnnFormItem&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;dnn:Label ID=&amp;quot;lblAdvancedTags&amp;quot; runat=&amp;quot;server&amp;quot; ResourceKey=&amp;quot;lblAdvancedTags&amp;quot; /&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;advancedTagsCtrl&amp;quot; /&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/div&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div class=&amp;quot;dnnFormItem&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;sup&gt;...&lt;/sup&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Add a &lt;em&gt;style=&amp;quot;display:none;&amp;quot;&lt;/em&gt; attribute to the outer div to hide the whole form.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you need the advanced form but do not need to show specific controls, you can just skip the steps above, go at this point and just add a &lt;em&gt;style=&amp;quot;display:none;&amp;quot; &lt;/em&gt;attribute to any of the DIVs nested inside to hide the specific control you don&#39;t need (e.g. Scope)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hide Advanced Tips link&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: dnn.SearchResult.js &lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to line 359 (it&#39;s empty), just above this piece of code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;$(&#39;a.dnnSearchResultAdvancedTip&#39;).on(&#39;click&#39;, function () {       &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; $(&#39;#dnnSearchResult-advancedTipContainer&#39;).slideToggle(&#39;fast&#39;);        &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; return false;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; });&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And insert the following line:&lt;/p&gt;    &lt;blockquote&gt;   &lt;p&gt;&lt;font size=&quot;1&quot;&gt;$(&#39;a.dnnSearchResultAdvancedTip&#39;).hide();&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Alternatively, you can achieve the same result by adding a &lt;em&gt;style=&amp;quot;display:none;&amp;quot;&lt;/em&gt; attribute at the A tag in SearchResults.ascx, line 6:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;lt;a href=&amp;quot;javascript:void(0)&amp;quot; class=&amp;quot;dnnSearchResultAdvancedTip&amp;quot;&amp;gt;&amp;lt;%= LinkAdvancedTipText %&amp;gt;&amp;lt;/a&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hide Results by Page / Sort section&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: SearchResults.ascx&lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to line 13 and add a &lt;em&gt;style=&amp;quot;display:none;&amp;quot;&lt;/em&gt; attribute to the outer DIV element there (first element in code snippet below):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size=&quot;1&quot;&gt;&amp;lt;div class=&amp;quot;dnnSearchResultPanel&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div class=&amp;quot;dnnRight&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ul class=&amp;quot;dnnSearchResultSortOptions&amp;quot;&amp;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;lt;li class=&amp;quot;active&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#byRelevance&amp;quot;&amp;gt;&amp;lt;%= RelevanceText %&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;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;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#byDate&amp;quot;&amp;gt;&amp;lt;%= DateText %&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;...&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you hide this section but you need to specify a different sort order and/or results per page setting, you can alter the Javascript call at the same file, line 116 onwards, by altering the sortOption and pageSize initial values: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;$(function () {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if(typeof dnn != &#39;undefined&#39; &amp;amp;&amp;amp; dnn.searchResult){        &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; dnn.searchResult.moduleId = &amp;lt;%= ModuleId %&amp;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; dnn.searchResult.queryOptions = {        &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; searchTerm: &#39;&amp;lt;%= SearchTerm %&amp;gt;&#39;,        &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; sortOption: 0,        &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; pageIndex: 1,        &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; pageSize: 15        &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;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;sortOption can be 0 for date, 1 for relevance.&lt;/p&gt;  &lt;p&gt;pageSize can be anything you need.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hide various elements on Search Results&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, some people don&#39;t like the &amp;quot;last updated&amp;quot; information. Others don&#39;t like the &amp;quot;author&amp;quot; info. So let&#39;s see how we get rid of anything we don&#39;t need:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: dnn.SearchResult.js &lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Start from about line 112,where you&#39;ll see code like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;markup += &#39;&amp;lt;div class=&amp;quot;dnnSearchResultItem-Others&amp;quot;&amp;gt;&#39;;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; markup += &#39;&amp;lt;span&amp;gt;&#39; + dnn.searchResult.defaultSettings.lastModifiedText + &#39; &amp;lt;/span&amp;gt;&#39;;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; markup += data.DisplayModifiedTime;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; markup += &#39;&amp;lt;/div&amp;gt;&#39;;&lt;/font&gt;&lt;/p&gt;    &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; markup += &#39;&amp;lt;div class=&amp;quot;dnnSearchResultItem-Others&amp;quot;&amp;gt;&#39;;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; markup += &#39;&amp;lt;span&amp;gt;&#39; + dnn.searchResult.defaultSettings.sourceText + &#39; &amp;lt;/span&amp;gt;&#39;;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Comment lines 112 to 115 to get rid of the &amp;quot;last updated&amp;quot; text&lt;/p&gt;  &lt;p&gt;Comment lines 117 to 119 to get rid of the &amp;quot;source&amp;quot; text and link&lt;/p&gt;  &lt;p&gt;Comment lines 121 to 123 to get rid of author info&lt;/p&gt;  &lt;p&gt;Comment lines 126 to 135 to get rid of &#39;tags&amp;quot; info&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hide default HTML module titles (if any) &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As mentioned earlier, you may not want module titles to appear in search results, but they do, even if your container doesn&#39;t display the module&#39;s title. The most common is &amp;quot;Text/HTML&amp;quot; and we&#39;ll see how to get rid of it in Search Results. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: dnn.SearchResult.js &lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Scroll down to the bottom of the file and append this function at the end:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;function fixTitle (s) {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (s==&#39;Text/HTML&#39;) {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return (&#39;...&#39;);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var s1;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var s2;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; s1=s.substring(0,s.indexOf(&#39;&amp;gt;&#39;)-1);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; s2=s.substring(s.indexOf(&#39;&amp;gt;&#39;)+2, s.length);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (s2==&#39;Text/HTML&#39; || s2==s1) {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return (s1);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; else         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return (s);        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This function accepts a search result item title and first checks if the title is &amp;quot;Text/HTML&amp;quot;. If so, it returns three dots (&amp;quot;...&amp;quot;) instead. You will find this in grouped results, where the module title is displayed on its own.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If the title does not belong to a group subset, it&#39;ll be in the format &amp;quot;xxx &amp;gt; yyy&amp;quot; where xxx is the page&#39;s name and yyy is the module&#39;s title. The code breaks the string in its two parts and checks if the second part is equal to &amp;quot;Text/HTML&amp;quot;. If so, it returns only the first part (the page&#39;s name). Also, if both parts are the same it once more returns the first part. Useful when a module has the same title as the page and you don&#39;t want to see this in search results.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is not the best possible solution, but it&#39;s a decent workaround, provided that you don&#39;t have the character &amp;quot;&amp;gt;&amp;quot; anywhere in your module titles or page names. I know it can get better, but this is only to demonstrate how you can do it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In order to put our function into effect, we have to go to line 107:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;markup += &#39;&amp;lt;a href=&amp;quot;&#39; + data.DocumentUrl + &#39;&amp;quot;&#39; + dnn.searchResult.defaultSettings.linkTarget + &#39;&amp;gt;&#39; + data.Title + &#39;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#39;;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and replace &lt;em&gt;data.Title &lt;/em&gt;with &lt;em&gt;fixTitle(data.Title):&lt;/em&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;markup += &#39;&amp;lt;a href=&amp;quot;&#39; + data.DocumentUrl + &#39;&amp;quot;&#39; + dnn.searchResult.defaultSettings.linkTarget + &#39;&amp;gt;&#39; + fixTitle(data.Title) + &#39;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&#39;;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hide subsets (grouped results)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If, for some reason, you don&#39;t want to have any grouped results then you can comment out the code that is generating them. Be adviced that the result that was supposed to be grouped won&#39;t display a description underneath, just the title and link.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: dnn.SearchResult.js &lt;/p&gt;  &lt;p&gt;Location: DesktopModules\Admin\SearchResults &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to line 159 and comment the code there until line 161:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;// render subsets       &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; for (var j = 0; j &amp;lt; result.Results.length; j++) {        &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;&amp;#160; markup += &#39;&amp;lt;div class=&amp;quot;dnnSearchResultItem-Subset&amp;quot;&amp;gt;&#39; + dnn.searchResult.renderResult(result.Results[j]) + &#39;&amp;lt;/div&amp;gt;&#39;;        &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; }        &lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Finally, if you tamper with the way search results are rendered, you may not want to have auto-search (search-as-you-type) get in your way by rendering everything in a different way (e.g. using default text/html module titles). There is no option for disabling it, but we can always hack the code a little more:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;File: SearchSkinObjectPreview.js &lt;/p&gt;  &lt;p&gt;Location: Resources\search&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to line 137 and comment out this piece of code (until line 155):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;throttle = setTimeout(function() {       &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;&amp;#160;&amp;#160;&amp;#160; var service = $.dnnSF ? $.dnnSF(-1) : null;        &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;&amp;#160;&amp;#160;&amp;#160; var url = makeUrl(val, service);        &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;&amp;#160;&amp;#160;&amp;#160; if (url) {        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $.ajax({        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; url: url,        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; beforeSend: service ? service.setModuleHeaders : null,        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; success: function(result) {        &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;&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; if (result)        &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;&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; generatePreviewTemplate(result);        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&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;&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; error: function() {        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&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;&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; type: &#39;GET&#39;,        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; dataType: &#39;json&#39;,        &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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; contentType: &amp;quot;application/json&amp;quot;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&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;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;&amp;#160;&amp;#160;&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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }, self.settings.delayTriggerAutoSearch);        &lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This will prevent the Search skin object from auto-searching.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, that&#39;s all! Even if line numbers change with an upgrade, you have a reference point on what to seek in code. I know this is not the prettiest or the most accurate and bullet-proof solution in the world, but until DNN Corp. decides to add more configuration settings to its Search subsystem, it will have to do. In the meantime, you can vote for my relevant suggestion in Community Voice here:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.dnnsoftware.com/voice/cid/420823&quot;&gt;http://www.dnnsoftware.com/voice/cid/420823&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Oh, and please feel free to suggest any other improvements / hacks to Search and Search Results! I know I didn&#39;t cover the whole range of possible modifications, but these are, IMHO, the most common ones.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Until next time!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/09/customizing-dnn-7-search-and-search.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>8</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-1969817514054421347</guid><pubDate>Mon, 22 Jul 2013 15:12:00 +0000</pubDate><atom:updated>2013-07-22T18:15:21.807+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Offers / Discounts</category><title>DNN Sharp&amp;#39;s My Tokens 30% off (until 7/26/2013)</title><description>&lt;p&gt;&lt;a href=&quot;http://store.dnnsoftware.com/vendor-profile/dnn-sharp/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;&lt;img title=&quot;da12dcee5605e1fa99b50d8b9401aedc&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: left; padding-top: 0px; padding-left: 0px; margin: 0px 10px 0px 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;da12dcee5605e1fa99b50d8b9401aedc&quot; align=&quot;left&quot; src=&quot;http://lh6.ggpht.com/-gEt_SU3PSF8/Ue1L82phN7I/AAAAAAAABRc/U3u2CVuyE6Y/da12dcee5605e1fa99b50d8b9401aedc%25255B37%25255D.png?imgmax=800&quot; width=&quot;60&quot; height=&quot;60&quot; /&gt;DNN Sharp&lt;/a&gt; are promoting a discount on their popular &lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/my-tokens-240-custom-dnn-tokens-with-razor-and-spark-support/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;My Tokens&lt;/a&gt; module that will expire on the 26th of July, 2013. To get the discount, you have to buy their &lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/action-form-30-easiest-form-builder-for-dnn/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Action Form&lt;/a&gt; module from the DNN Store. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Action Form&lt;/strong&gt; is a form builder module which lets you create complex forms quickly and save data to the database / send emails etc. on submission.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;My Tokens&lt;/strong&gt; is a module which lets you include dynamic content from database or HTTP requests in static content.It works with a number of DNN modules out of the box (including Text/HTML and Form and List) but you can even patch the DNN core (with instructions) to extend support to every installed module.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/action-form-30-easiest-form-builder-for-dnn/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Buy Action Form here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/my-tokens-240-custom-dnn-tokens-with-razor-and-spark-support/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Buy My Tokens here&lt;/a&gt;&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/07/dnn-sharp-my-tokens-30-off-until-7262013.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-gEt_SU3PSF8/Ue1L82phN7I/AAAAAAAABRc/U3u2CVuyE6Y/s72-c/da12dcee5605e1fa99b50d8b9401aedc%25255B37%25255D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-8810906325016052308</guid><pubDate>Sat, 20 Jul 2013 12:33:00 +0000</pubDate><atom:updated>2013-07-20T15:33:51.463+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Offers / Discounts</category><title>25% off all Data Springs products (until 7/23/2013)</title><description>&lt;p align=&quot;left&quot;&gt;&lt;a href=&quot;http://lh5.ggpht.com/-qMfC0b8zAD0/UeqDqwD_v_I/AAAAAAAABQw/yV0_mLt7CMU/s1600-h/logo%25255B82%25255D.png&quot;&gt;&lt;img title=&quot;logo&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: left; padding-top: 0px; padding-left: 0px; margin: 0px 15px 0px 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;logo&quot; align=&quot;left&quot; src=&quot;http://lh4.ggpht.com/-3AgeNnZZT9Y/UeqDrY544HI/AAAAAAAABQ4/QLyXWaQq6O8/logo_thumb%25255B80%25255D.png?imgmax=800&quot; width=&quot;164&quot; height=&quot;43&quot; /&gt;&lt;/a&gt;&lt;strong&gt;Data Springs&lt;/strong&gt; is taking&lt;strong&gt; 25% &lt;/strong&gt;off all its products until Tuesday, &lt;strong&gt;7/23/2013&lt;/strong&gt;. You can &lt;a href=&quot;http://store.dnnsoftware.com/vendor-profile/data-springs-inc/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;order your products from the DNN Store&lt;/a&gt; and use the promo code &lt;strong&gt;BYEANNIE&lt;/strong&gt; on checkout to get a 25% discount.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;If you don&#39;t know Data Springs&#39; modules, you should give it a look - their flagship products are &lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/dynamic-forms-41/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Dynamic Forms&lt;/a&gt;, &lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/dynamic-registration-50/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Dynamic Registration&lt;/a&gt; and &lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/dynamic-login-41/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Dynamic Login&lt;/a&gt;, and there are more than a dozen more. There is also a bundle named &lt;a href=&quot;http://store.dnnsoftware.com/home/product-details/data-springs-collection-60/r/5e984796a96c46b58b3e&quot; target=&quot;_blank&quot;&gt;Data Springs Collection&lt;/a&gt; for a very low price compared to bying the products one by one.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/07/25-off-all-data-springs-products-until.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-3AgeNnZZT9Y/UeqDrY544HI/AAAAAAAABQ4/QLyXWaQq6O8/s72-c/logo_thumb%25255B80%25255D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-5801572817550822642</guid><pubDate>Wed, 17 Jul 2013 09:45:00 +0000</pubDate><atom:updated>2013-07-17T12:45:47.621+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Implementations</category><title>At last! DNN7.1 has extensionless URLs and a &amp;quot;url name&amp;quot; setting for every page</title><description>&lt;p&gt;This is a big step forward. Starting with DNN v.7.1, you can say goodbye to ugly URLs and .aspx extensions. Following a suggestion made by yours truly (here: &lt;a href=&quot;http://www.dnnsoftware.com/voice/cid/138237&quot;&gt;http://www.dnnsoftware.com/voice/cid/138237&lt;/a&gt;), DNN 7.1 has adopted a &lt;strong&gt;&amp;quot;Page URL&amp;quot;&lt;/strong&gt; field in Page Settings, letting you specify the &lt;strong&gt;exact URL&lt;/strong&gt; the page should use. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;My Website   About Us   StyleAndGuide&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;My Website   About Us   StyleAndGuide&quot; src=&quot;http://lh3.ggpht.com/-BUE7zvjKNG0/UeZnyXF_0lI/AAAAAAAABQI/TRS_wasfltc/My%252520Website%252520%252520%252520About%252520Us%252520%252520%252520StyleAndGuide%25255B8%25255D.png?imgmax=800&quot; width=&quot;420&quot; height=&quot;66&quot; /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is essentially an URL rewrite for the page, that makes the page&#39;s URL &lt;strong&gt;independent of the page&#39;s name&lt;/strong&gt;, meaning that you can change the name as many times as you like, &lt;strong&gt;without affecting any links&lt;/strong&gt; that are present in text/html modules or elsewhere.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The only bad thing (or good, depending on your point of view) is that the URL is&lt;strong&gt; not automatically synthesized&lt;/strong&gt; based on page hierarhcy, meaning that you have to specify the &lt;strong&gt;exact URL&lt;/strong&gt; for each page, starting from the virtual root. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For example, in the default DNN installation you have the About Us page which has a URL of &amp;quot;/About-Us&amp;quot; while the sub-page Style Guide has a URL of &amp;quot;/About-Us/StyleGuide&amp;quot;. The whole URL for the Style Guide page has to be typed again, i.e. the &amp;quot;/About-Us&amp;quot; part is &lt;strong&gt;not inherited&lt;/strong&gt; from the URL field of the parent page. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This makes things a bit more difficult since you have to &lt;strong&gt;remember&lt;/strong&gt; the URLs of parent pages if you want to represent the hierarchy using friendly URLs, but on the other hand gives you &lt;strong&gt;a bit of freedom&lt;/strong&gt; since you do not need to specify exact paths to get to a page - you can easily give the Style Guide page, for example, a URL of &amp;quot;/YourStyleGuide&amp;quot;, forgetting the &amp;quot;About-Us&amp;quot; part at all.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;It would be nice to see an &amp;quot;&lt;strong&gt;inherit&lt;/strong&gt;&amp;quot; option in future versions though.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/07/at-last-dnn71-has-extensionless-urls.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-BUE7zvjKNG0/UeZnyXF_0lI/AAAAAAAABQI/TRS_wasfltc/s72-c/My%252520Website%252520%252520%252520About%252520Us%252520%252520%252520StyleAndGuide%25255B8%25255D.png?imgmax=800" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-4623905149552572660</guid><pubDate>Thu, 27 Jun 2013 15:44:00 +0000</pubDate><atom:updated>2013-06-27T18:49:16.623+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Bug: &amp;quot;Redirect after login&amp;quot; not redirecting to localized versions of page</title><description>&lt;p align=&quot;left&quot;&gt;I am currently working on DNN7, on a multilingual site (4 languages). The site has public registration and users must be redirected to a specific page after they complete their registration.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;I found that DNN would not let me specify a different page for every language - in fact, if I went to Admin -&amp;gt; Site Settings -&amp;gt; User Account Settings -&amp;gt; Login Settings -&amp;gt; Redirect after Registration and selected a specific page in one language, it would give me &amp;lt;None Specified&amp;gt; if I went to the setting using another language.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;This would probably have no impact if DNN took care to redirect the user to the localized version of the page after registration - which it doesn&#39;t (at least until version 7.0.6). So I had to alter a few things, which I&#39;d like to share with you in case you are facing the same problem.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;The problem seems to be on the \DesktopModules\Admin\Security\Register.ascx.cs file, which fortunately can be directly edited so no recompilation is needed. If you go to line 162 there, (the &amp;quot;else&amp;quot; portion of a rather large if statement), you&#39;ll see that it does the following:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;_RedirectURL = &lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;Globals.NavigateURL(Convert.ToInt32(setting));&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Where &amp;quot;setting&amp;quot; is the Tab ID of the tab you have selected on the Site Settings section for redirecting after registration. This, of course, is not localized so it&#39;ll always take you the the actual page you have specified - regardless of the actual language the user is using to register.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;In order to fix this, I copied and adapted some code from the language skin object (yes, the language picker) which can always find the right localized version of a page. So here&#39;s what I did:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;I changed the line:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;_RedirectURL = &lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;Globals.NavigateURL(Convert.ToInt32(setting));&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;to:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;int currentPortal = &lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;PortalController.GetCurrentPortalSettings().PortalId;     &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;Locale currentLocale = &lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;LocaleController.Instance.GetCurrentLocale (currentPortal);     &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;TabInfo localizedTab = &lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;new TabController().GetTabByCulture(&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;Convert.ToInt32(setting), currentPortal, currentLocale);&lt;/font&gt;&lt;/p&gt; &lt;font face=&quot;Courier New&quot;&gt;   &lt;p align=&quot;left&quot;&gt;     &lt;br /&gt;&lt;font size=&quot;2&quot;&gt;_RedirectURL = Globals.NavigateURL(&lt;/font&gt;&lt;/p&gt;    &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot;&gt;Convert.ToInt32(localizedTab.KeyID));&lt;/font&gt;&lt;/p&gt; &lt;/font&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;And I also had to add two usings on top of the page:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;using DotNetNuke.Entities.Tabs;     &lt;br /&gt;using DotNetNuke.Entities.Portals;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;With those changes, I managed to have the page to redirect to specified only once and have DNN redirect me to the page&#39;s localized version depending on the language I used to register. &lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Also please see here: &lt;a href=&quot;http://support.dotnetnuke.com/project/All/2/item/26617&quot;&gt;http://support.dotnetnuke.com/project/All/2/item/26617&lt;/a&gt; for other issues with Redirect after Login functionality. I applied the change to line 136 of the file mentioned in this issue, too.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;One caveat: If you upgrade your DNN installation, you will probably lose those changes.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Also, have in mind that the same thing probably applies to the &amp;quot;Redirect after Login&amp;quot; functionality - I&#39;ll probably post something similar about that soon :). Plus, I have also created an SQL-based adaptation of GetTabByCulture to be used with OWS - I hope I have enough time to post this here too.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;Standard disclaimer: Keep a backup of your initial Register.ascx.cs file. Don&#39;t blame me if this doesn&#39;t work for you. This is a solution that worked for my own project and it&#39;s not guaranteed to work in every case. Did I mention backup? &lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Until next time!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/06/bug-after-login-not-redirecting-to.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-4356773941891700882</guid><pubDate>Fri, 14 Jun 2013 10:16:00 +0000</pubDate><atom:updated>2013-06-14T13:19:45.692+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Modules</category><title>Great news on Open Web Studio (OWS)!</title><description>&lt;p&gt;&lt;a href=&quot;http://lh5.ggpht.com/-0497pg0LTpM/UbrtdmQ0vQI/AAAAAAAABMM/3R9Nq1w8kLY/s1600-h/ows-logo%25255B3%25255D.png&quot;&gt;&lt;img title=&quot;ows-logo&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;ows-logo&quot; src=&quot;http://lh6.ggpht.com/-wDzHmQzxfO0/UbrteedqLsI/AAAAAAAABMU/ow5c-964V5I/ows-logo_thumb%25255B1%25255D.png?imgmax=800&quot; width=&quot;419&quot; height=&quot;51&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you are using DNN, I&#39;m sure you have at least heard of &lt;a href=&quot;http://www.openwebstudio.com&quot; target=&quot;_blank&quot;&gt;Open Web Studio&lt;/a&gt;, (OWS), a RAD development platform for DNN that is open source, free, and lets you create things for which you would otherwise need full-blown module development. For example: Database - bound grids, forms, queries and templates to view results, AJAX calls, conditional display of information and much more.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the past few years, OWS has been stuck to version 2, with frequent updates including updates for working with DNN 7, but no new functionality. Although the &lt;a href=&quot;http://www.openwebstudio.com/Community/Forums.aspx&quot; target=&quot;_blank&quot;&gt;community&lt;/a&gt; is very active, documentation is still lacking and many people keep asking about the future of OWS, worrying that it may be (or has already been) abandoned.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I had a recent chat with &lt;strong&gt;Kevin Schreiner&lt;/strong&gt;, the lead developer for OWS, and with his permission I&#39;m copying here his thoughts and plans on OWS. If you don&#39;t want to read all of it, bottom line is that Kevin is actively supporting OWS and preparing for OWS 3!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here&#39;s what I asked, among other things:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I&lt;em&gt; am curious (just as so many people) to learn news about OWS&#39;s future (if such a future exists). I&#39;ve used it so much I have lost count - and I&#39;m eager to see it evolve. As far as I understand, you&#39;re (or were) the only developer maintaining it. Should I keep my hopes up high or go desperate? :)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And here&#39;s Kevin&#39;s reply:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;No worries, I understand the anxiety. I created ListX which became OWS while working for Bi4ce - which became R2integrated, and I&#39;m still the only developer maintaining it. This shouldnt be a cause for concern. I&#39;ve been holding off on releasing OWS3 due to a myriad of complications revolving around the changes to the DNN platform and adjustments to the core libraries needed for the new UI all while keeping the platform releases for OWS2 still working within the latest DNN versions. The issues with the OWS3 UI stem from the fact that DNN which typically struggles to release ANYTHING on newly released technologies, adopted the latest jQuery version in the DNN7 release. Doing this caused the UI Layout Manager plugin which I was relying on for the OWS3 release to malfunction and I&#39;ve had to resort to building a new logical structure for handling it. Plus, there have been some issues with the logic in use of the UI because it has been confusing while working within multiple configurations and multiple actions simultaneously. You can see from the original comps how this could be confusing, because when you have more than 1 action opened, you dont know which action is linked to which configuration.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;em&gt;Hopefully something that should make the community rest easily, I rely on OWS for 99.9% of my own livelihood, using it as my core development platform, extending its core functionality and keeping it up to date for the latest DNN releases.&lt;strong&gt; Obviously, this being the fact means that OWS isnt going anywhere ;)&lt;/strong&gt;&amp;#160; (...) &lt;strong&gt;Once I feel comfortable with the OWS3 release stability, I will most assuredly release it to the general public.&lt;/strong&gt; It has always been and will always be primary in my focus to release something that is solid and stable as it is so important to all of our runtimes.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;In the meantime, rest assured that nothing is going to happen to my baby :) It&#39;s a labor of love, and something that I personally rely on.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I am extremely happy with his answer! What about you?&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/06/great-news-on-open-web-studio-ows.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-wDzHmQzxfO0/UbrteedqLsI/AAAAAAAABMU/ow5c-964V5I/s72-c/ows-logo_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-8260117115878467244</guid><pubDate>Thu, 06 Jun 2013 10:12:00 +0000</pubDate><atom:updated>2013-06-14T12:17:47.371+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Troubleshooting</category><title>Bug: Custom profile properties cannot be selected for custom registration form (DNN 7)</title><description>&lt;p&gt;DNN 7 allows customization of the registration form via an easy interface, with intellisense. You just select &amp;quot;Custom&amp;quot; for Registration Form Type in Admin - Site Settings - User Account Settings tab and you can add all the fields you like to your registration form.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Site Settings&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Site Settings&quot; src=&quot;http://lh6.ggpht.com/-quzkbizG5js/UbBgnQZMhlI/AAAAAAAABL8/6ts3vUwUsUM/Site%252520Settings%25255B11%25255D.png?imgmax=800&quot; width=&quot;420&quot; height=&quot;147&quot; /&gt;&lt;/p&gt;  &lt;p&gt;At the moment of writing, this doesn&#39;t seem to work well with custom registration properties (i.e. fields you have created yourself via the &amp;quot;Profile Settings - Add New Profile Property button below on the same tab). If you try to type a custom property&#39;s name on the Registration Fields box, it just won&#39;t come up (although it&#39;s been reported that properties of datatype &amp;quot;Text&amp;quot; do come up). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In order to make these properties available to your registration form until a fix is applied to this, you can use SSMS (provided that you have access and experience using it) and do the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Go to your DNN database &lt;/li&gt;    &lt;li&gt;Open the &amp;quot;PortalSettings&amp;quot; table for edit and find the record that has the value &amp;quot;Registration_RegistrationFields&amp;quot; in the &amp;quot;SettingName&amp;quot; field &lt;/li&gt;    &lt;li&gt;You&#39;ll see that the &amp;quot;SettingValue&amp;quot; field is a comma-delimited list containing the field aliases of the properties that are to be displayed on the custom registration form. Add the aliases of your own fields in the list. &lt;/li&gt;    &lt;li&gt;Update the table and go to your DNN installation (as the Host user), and click on Tools - Clear Cache &lt;/li&gt;    &lt;li&gt;If everything goes well, you&#39;ll see that the &amp;quot;Registration Fields&amp;quot; box now contains your properties too, and they will appear normally on the registration form. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Another way to do this is to use the Host - SQL section on your DNN installation. To see the current profile properties that are displayed on the custom registration form, type this into the Script box and click &amp;quot;Run Script&amp;quot;:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;SELECT      &lt;br /&gt;SettingValue&amp;#160; &lt;br /&gt;FROM&amp;#160; {databaseOwner}{objectQualifier}PortalSettings       &lt;br /&gt;WHERE       &lt;br /&gt;SettingName = &#39;Registration_RegistrationFields&#39;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In order to add one or more fields at the end of the list, you must run something like this (where &#39;MyField&#39; is your custom field&#39;s alias). Remember the comma and use no spaces.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;UPDATE&amp;#160;&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;{databaseOwner}{objectQualifier}PortalSettings      &lt;br /&gt;SET       &lt;br /&gt;SettingValue = SettingValue + &#39;,MyField&#39;       &lt;br /&gt;WHERE       &lt;br /&gt;SettingName = &#39;Registration_RegistrationFields&#39;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After you run it, go to Tools and click Clear Cache and you will see your fields on the &amp;quot;Registration Fields&amp;quot; box in the Admin - Site Settings - User Account Settings tab.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you still need more power and customization with your custom registration page, take a look at the &lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/dynamic-registration-50/r/05d9d615c86c4e589014&quot; target=&quot;_blank&quot;&gt;Dynamic Registration module&lt;/a&gt; from Datasprings - at the moment of writing this, version 5.0 has just been released for DNN 7.x.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Standard disclaimer: When you do stuff like the above on your database, you do it at your own risk, and I have no responsibility should you damage your database, your computer, or the universe. Always have a backup handy! :)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Until next time!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2013/06/bug-custom-profile-properties-cannot-be.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-quzkbizG5js/UbBgnQZMhlI/AAAAAAAABL8/6ts3vUwUsUM/s72-c/Site%252520Settings%25255B11%25255D.png?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-3161446338827521935</guid><pubDate>Tue, 06 Nov 2012 18:39:00 +0000</pubDate><atom:updated>2012-11-06T20:40:33.086+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Removing Google Analytics from your DNN site</title><description>&lt;p&gt;It&#39;s very easy to add the Google Analytics tracking code to your DotNetNuke site: Just go to Admin - Google Anaytics, enter your tracking ID and the tracking code is automatically generated for every page. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But what if you need to REMOVE the Google Analytics code? DNN doesn&#39;t let you replace your tracking ID with nothing in the Google Analytics page (the field is mandatory). So, you either stick with it or put an invalid value (such as &amp;quot;0&amp;quot;) and have your site generate a totally invalid and useless tracking code all the time.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What you can do, is go to your site&#39;s root folder and find the &lt;strong&gt;siteanalytics.config&lt;/strong&gt; file. That&#39;s where the tracking code is. (As of DNN version 6.2.4, this doesn&#39;t seem to have changed). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The problem is that if you &lt;strong&gt;delete&lt;/strong&gt; this file it keeps getting &lt;strong&gt;regenerated&lt;/strong&gt;. So the only way to avoid generating analytics is to &lt;strong&gt;keep&lt;/strong&gt; the file but &lt;strong&gt;COMMENT OUT or DELETE&lt;/strong&gt; &lt;strong&gt;everything inside the CDATA tag&lt;/strong&gt; (essentially,the script tag from start to finish). This way, DNN will still see the file is there, but won&#39;t generate anything for Google to use.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If, at a later time, you need to restore your Google Analytics tracking code, you can either delete the file (so that it can be auto-generated again) or just uncomment what you commented.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope it helps!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2012/11/removing-google-analytics-from-your-dnn.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-5086004166460465087</guid><pubDate>Mon, 05 Nov 2012 18:52:00 +0000</pubDate><atom:updated>2012-11-05T20:52:27.929+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Quick hints: How to ensure your site remembers your visitors&amp;#39; credentials so that they don&amp;#39;t have to login every time</title><description>&lt;p align=&quot;left&quot;&gt;If you need to make life easier for your portal&#39;s registered users, you may have to make it remember them so that they won&#39;t have to retype their credentials next time they visit. &lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;strong&gt;Making &amp;quot;remember me&amp;quot; always checked&lt;/strong&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;By default, DNN&#39;s &amp;quot;remember me&amp;quot; checkbox on the login page is visible and unchecked. In order to make it checked by default, you&#39;ll have to edit the &lt;strong&gt;/DesktopModules/AuthenticationServices/DNN/Logon.ascx &lt;/strong&gt;file (assuming DNN 6.2 but probably same in earlier versions) and find the following control:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;&amp;lt;asp:checkbox id=&amp;quot;chkCookie&amp;quot; resourcekey=&amp;quot;Remember&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Add a checked=&amp;quot;true&amp;quot; attribute to the control as follows:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;&amp;lt;asp:checkbox id=&amp;quot;chkCookie&amp;quot; resourcekey=&amp;quot;Remember&amp;quot; checked=&amp;quot;true&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;And the checkbox will always be checked by default. &lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;If you upgrade your DNN installation sometime in the future, you&#39;ll probably lose this setting, so keep in mind that you may have to edit the file again after an upgrade.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;strong&gt;Defining the &amp;quot;remember me&amp;quot; duration &lt;/strong&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;The second thing you should define is for how long a user will be remembered. This is controlled by a key in your &lt;strong&gt;web.config&lt;/strong&gt; file, under the &amp;lt;appSettings&amp;gt; section:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;&amp;lt;add key=&amp;quot;PersistentCookieTimeout&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;The value expresses duration in minutes. So, if you need your portal to remember your users for, let&#39;s say, a month, that&#39;s 60*24*30 = 43200. A year would be 60*24*365 = 5252600 and so on.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;It&#39;s important to set that value, since your &amp;quot;remember me&amp;quot; functionality may not work at all, especially in older DNN versions that are using an ASP.NET 2.0 application pool. For more details, &lt;a href=&quot;http://www.dotnetnuke.com/Resources/Wiki/loc/history/Page/PersistentCookieTimeout/Revision/4.aspx&quot; target=&quot;_blank&quot;&gt;see here&lt;/a&gt; and also &lt;a href=&quot;http://www.dotnetnuke.com/Resources/Blogs/EntryId/1704/Why-doesnt-Remember-me-work-like-I-expect.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;strong&gt;Ensuring that the &amp;quot;remember me&amp;quot; checkbox is enabled&lt;/strong&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Finally, if you don&#39;t see the &amp;quot;remember login&amp;quot; checkbox at all, it may have been disabled in your DotNetNuke installation. The setting to disable or enable the remember me functionality is under &lt;strong&gt;Host Settings - Basic Settings - Host Details - &amp;quot;Enable remember me on login controls&amp;quot;&lt;/strong&gt; checkbox.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2012/11/quick-hints-how-to-ensure-your-site.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-3455282512485751081</guid><pubDate>Tue, 22 Nov 2011 10:18:00 +0000</pubDate><atom:updated>2011-11-22T12:22:11.535+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Troubleshooting</category><title>Dealing with ‘Could not load type ‘DotNetNuke.Common.Global’’</title><description>There are a thousand reasons this dreaded message can appear, but what if it appears on a site that you are 100% sure nobody has tampered with in any way other than uploading files for quite some time?&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;The problem&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The error itself is as follows:&lt;br /&gt;
&lt;h4 align=&quot;left&quot;&gt;
&lt;i&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;h4 align=&quot;left&quot;&gt;
&lt;i&gt;Parser Error&lt;/i&gt;&lt;/h4&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;b&gt;Description: &lt;/b&gt;An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.     &lt;br /&gt;&lt;b&gt;Parser Error Message: &lt;/b&gt;Could not load type &#39;DotNetNuke.Common.Global&#39;.     &lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;pre&gt;Line 1:  &amp;lt;%@ Application Inherits=&quot;DotNetNuke.Common.Global&quot; Language=&quot;VB&quot; %&amp;gt;&lt;/pre&gt;
&lt;b style=&quot;font-family: monospace; white-space: pre;&quot;&gt;Source File: &lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;/global.asax&lt;/span&gt;&lt;b style=&quot;font-family: monospace; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Line: &lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;strong&gt;The context&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
That was exactly the case I faced today when a client called me and reported the error. The client was absolutely sure that no changes had been performed other than uploading some files, both to the application and the server itself (no upgrades, no apppool changes, no iis configuration changes).&amp;nbsp; Just to be safe, I checked the dates of the files in the bin folder as well as the date of the global.asax file and all had not been changed during the past few months. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Possible causes&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Searching the Web, I was panicked to see that there were at least a few dozen possible causes of this error. For example, there’s &lt;a href=&quot;http://www.dotnetnuke.com/Resources/Forums/forumid/107/threadid/14567/scope/posts/threadpage/1.aspx&quot; target=&quot;_blank&quot;&gt;a multi-page thread in the DotNetNuke forums&lt;/a&gt; dicussing this error. Sadly, most of the cases regarded upgrades to the core platform, recompiling or other stuff that had been changed.&lt;br /&gt;
&lt;br /&gt;
So what else could be wrong? Well, I once more discovered than when something seems inexplicable, it doesn’t always have to be some extremely complicated technical issue. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The client had access to the full site root via an FTP client. Upon trying to upload stuff, the client accidentally moved the App_Data folder inside another folder. That was it!&lt;br /&gt;
&lt;br /&gt;
I moved the App_Data folder back to the root and everything was fine again.&lt;br /&gt;
&lt;br /&gt;
What I learned from this incident: &lt;strong&gt;Always look for the simplest possible cause of an error first&lt;/strong&gt;. Hope it helps some of you out there.</description><link>http://dnnuke.blogspot.com/2011/11/there-are-thousand-reasons-this-dreaded.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-4103700675963363295</guid><pubDate>Fri, 04 Nov 2011 15:29:00 +0000</pubDate><atom:updated>2011-11-04T17:52:43.711+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Implementations</category><title>What modules I used to develop www.alunet.com (Part 3 – Indoo Grid)</title><description>&lt;p&gt;When it comes to displaying data on a grid, you can either choose to implement your own custom module, utilize a module like Open Web Studio (read about it in &lt;a href=&quot;http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html&quot; target=&quot;_blank&quot;&gt;Part 2&lt;/a&gt;) or, if you really want speed and efficiency, install a copy of &lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15173&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Indoo Grid&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This module delivers what it promises: Grids. Fully customizable, sortable and editable, either in-line or via a form. Of course, if you really need advanced form functionality, have a look at &lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Dynamic Forms&lt;/a&gt; from Datasprings (read about this module in &lt;a href=&quot;http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html&quot; target=&quot;_blank&quot;&gt;Part 1&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Every multi-purpose module is powerful in a specific area. Indoo Grid is very powerful in presenting data, and provides acceptable functionality for editing data. It’s ideal, though, for administrative tasks, especially if custom tables are involved. That was the case with alunet.com, so I used it heavily at the site administration pages.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhLxOpRC0phEyL74NEARfzmuIJQ669klYk70nTbN6UX5jbY2Yksjm6Pg_MwcxnKATzrE9GHVzfNr9Ex7q2sNmoJPsZqA7mGd5zMH-J8R2Krvfh1ym4cJeFdZqwNzUlOR6XQPTLc40a198/s1600-h/indoo_products%25255B21%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;indoo_products&quot; border=&quot;0&quot; alt=&quot;indoo_products&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP5zIFA2sBmqpQyOI6y5bvtK0w-6RjkE1kNsKGqfqxjh5eFNMQk8a5p4t_F-EAtPWzkXrybM5pp4UUcMKdcfubkZY81J4kJ6X89O4WQ9CdfaebKaiQDvag1eqqr7aklVB5ADN2PcDJvf4/?imgmax=800&quot; width=&quot;420&quot; height=&quot;288&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size=&quot;1&quot;&gt;Here you can see how the products administration screen looks like. The links to view and edit pages are constructed fields which lead to a Dynamic Forms page and a public detail page respectively. You can sort columns by clicking on them and you can filter data using the text box and the comboboxes above the grid. The “Category”, “Company” and “Views” columns come from respective joined tables. This is not an SQL view you’re seeing – joins are defined in Indoo Grid’s configuration.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can instruct Indoo Grid to display records from a table or view, defining things such as searchboxes (you can define separate searchboxes for each column or combine them in a single searchbox, excluding the columns you don’t need to search), records per page selector, initial sorting and sortable columns, editable columns (if you need to edit things) and so on.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You also don’t have to worry about those cryptic referential integrity errors when trying, let’s say, to delete something that is related to another table – you can configure it to display messages that are understandable to the user.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju4ZSwQjRySyOXTWRanAD3CoLC1rsCTXzPzYR3faGnJlObV_RyFVj6-ZFbh4FLhvp9LdB87Bm611Su9uLQFRg75TpMphEggw56esh9cWoLeUjlKkO-kqwFlxpkNc8bQZgPYSvMcaqAyl8/s1600-h/indoo_categories%25255B4%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;indoo_categories&quot; border=&quot;0&quot; alt=&quot;indoo_categories&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwg-VcZ9IRqujL5eLddV6NM7NY6EnanOCRGakHa4Di8Urrt9l4wAhMIg2z8-ZUQ_0WIF3IerSrMZZ3VzVER1GjBkvbC9M-coUBdQsCRIzQjuAOlSWVIP0kC8YNsSrxk3XD2NGwFnyR2T4/?imgmax=800&quot; width=&quot;420&quot; height=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size=&quot;1&quot;&gt;This is the grid for managing categories. Remember, the Categories table is a self-joined table that is presented in the form of a tree inside the web site.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can also create columns that are lookups in joined tables and even automatically create drop-downs from the values of those columns so that you can filter your grid with them. Additionally, you can create “calculated” fields that may contain one or more column values together with other html markup or scripts you may need (yes, that’s an easy way to include pictures or links to other pages).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;One thing that Indoo Grid does that you won’t easily find elsewhere is that it can also handle hierarchical data. In alunet.com’s case, the “categories” table is a self-joined table that contains the entire tree of categories, where each record “knows” the id of its parent record. This was easily managed with Indoo Grid.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdcwoKdizexZJldUtr3vqfCoYbzHN7dtheZIH9G88a5QjrENLf1rWIVjI_zTN5rn0quB31PGWSiIm3Gl1E1i-OUlxEbWK5LFhdet4KUjKh8Hz1IGDMXgJnkStm3mTYWS1VJj4cvDSL3gU/s1600-h/indoo_categories_hier_edit%25255B4%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;indoo_categories_hier_edit&quot; border=&quot;0&quot; alt=&quot;indoo_categories_hier_edit&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi_-jr_RPgqUJo3MyR_BJKbMtmViqL6CoxrZx1tJJINMpzaAquWpD7iJhRmH_z4TClaOaAnaV2NC27L5KOf39JxEqR4Fx6kqcIzUYOov2iDcQI_Tp46UKbHN4y9_aKypsgYNhP8W4V0Jw/?imgmax=800&quot; width=&quot;420&quot; height=&quot;298&quot; /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;&lt;font size=&quot;1&quot;&gt;&lt;em&gt;Here you see the same grid for Categories management, after navigating to a specific category (castings). What we see now are the children of this category in the tree. You can also see that we have an easy way to add new records right below the grid, that will belong to the “Castings” parent category.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of coure, you can also use Indoo Grid for your front-end. It’s fully customizable in terms of styling and you can always use it in read-only mode. It’s very fast (authors have a &lt;a href=&quot;http://www.indoolab.com/Demo/Millionrecordspage/tabid/161/Default.aspx&quot; target=&quot;_blank&quot;&gt;demo&lt;/a&gt; with a million records which runs pretty smoothly),and there are some predefined templates and samples on their website, too.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Company website: &lt;a href=&quot;http://www.indoolab.com&quot;&gt;www.indoolab.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Buy it from Snowcovered: &lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15173&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Click&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;a href=&quot;http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html&quot;&gt;Click here to read Part 1&lt;/a&gt; (Introduction and Dynamic Forms from Datasprings)&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html&quot;&gt;Click here to read Part 2&lt;/a&gt; (Open Web Studio)&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2011/11/what-modules-i-used-to-develop.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP5zIFA2sBmqpQyOI6y5bvtK0w-6RjkE1kNsKGqfqxjh5eFNMQk8a5p4t_F-EAtPWzkXrybM5pp4UUcMKdcfubkZY81J4kJ6X89O4WQ9CdfaebKaiQDvag1eqqr7aklVB5ADN2PcDJvf4/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-5767925591372650588</guid><pubDate>Fri, 21 Oct 2011 15:12:00 +0000</pubDate><atom:updated>2011-10-21T18:31:13.584+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Extending</category><category domain="http://www.blogger.com/atom/ns#">Modules</category><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Adding paging to the core Announcements module</title><description>&lt;p&gt;The &lt;a href=&quot;http://www.dotnetnuke.com/Community/Extensions-Forge/Module-Announcements.aspx&quot; target=&quot;_blank&quot;&gt;Announcements module&lt;/a&gt; (at the time of writing this, the latest version was 4.0.3) is a very simple DNN core module that lets you present a list of titles and descriptions leading to files, other pages, external links or nowhere at all. It’s customizable via templates, but it doesn’t include any form of paging. So if you have like hundreds of announcements to publish, you probably have to use another module.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Not any more, since with a little help from a clever JQuery plugin called &lt;strong&gt;Pajinate&lt;/strong&gt; (&lt;a href=&quot;https://github.com/wesnolte/Pajinate/wiki&quot; target=&quot;_blank&quot;&gt;download from here&lt;/a&gt;), you can add paging to your announcements module. Of course, you’ll be loading all items since Pajinate functions on the client side, but it’s better than not having paging at all.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I used the default template that comes with the Announcements module and added what was needed to implement paging on it. Unfortunately, Pajinate does not hide the pager when there’s only one page nor does it hide the First/Previous and Next/Last buttons when we are at the first and last page respectively, so I had to write my own little chunk of Javascript to handle this correctly.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Additionally, I adapted the default header and footer templates to include IDs and other stuff needed for pajinate to work correctly. Those IDs are used in the additional javascript code I wrote.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So here’s the Javascript code. I suggest you put this code on a separate file (I used pajinatehelper.js) and load it AFTER the pajinate javascript file. You will probably need to change the value of the itemsperpage variable (top of script) to your own preference, as well as the literals for the First/Previous/Next/Last buttons that follow.&lt;/p&gt;  &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;p&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Set the number of items per page&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #008000&quot;&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;var itemsperpage = 10;&lt;br /&gt;$(document).ready(function(){&lt;br /&gt;$(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).pajinate( {&lt;br /&gt;    item_container_id : &lt;span style=&quot;color: #006080&quot;&gt;&#39;#pagetable&#39;&lt;/span&gt;,  &lt;span style=&quot;color: #008000&quot;&gt;//This must be left as is&lt;/span&gt;&lt;br /&gt;    items_per_page: itemsperpage,    &lt;br /&gt;    nav_label_first: &lt;span style=&quot;color: #006080&quot;&gt;&#39;First&#39;&lt;/span&gt;,&lt;span style=&quot;color: #008000&quot;&gt;//Change this to whatever you like&lt;/span&gt;&lt;br /&gt;    nav_label_prev: &lt;span style=&quot;color: #006080&quot;&gt;&#39;Prev&#39;&lt;/span&gt;,  &lt;span style=&quot;color: #008000&quot;&gt;//Change this to whatever you like    &lt;/span&gt;&lt;br /&gt;    nav_label_next: &lt;span style=&quot;color: #006080&quot;&gt;&#39;Next&#39;&lt;/span&gt;,  &lt;span style=&quot;color: #008000&quot;&gt;//Change this to whatever you like&lt;/span&gt;&lt;br /&gt;    nav_label_last: &lt;span style=&quot;color: #006080&quot;&gt;&#39;Last&#39;&lt;/span&gt;   &lt;span style=&quot;color: #008000&quot;&gt;//Change this to whatever you like&lt;/span&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Get the total number of items&lt;/span&gt;&lt;br /&gt;var total_items = $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#pagetable&#39;&lt;/span&gt;).children().size()&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Get the number of pages&lt;/span&gt;&lt;br /&gt;var numberofpages = Math.ceil(total_items/itemsperpage);&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Since we start at page 1, hide First/Previous buttons&lt;/span&gt;&lt;br /&gt;hideFirstPrev();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Decide what to hide when user clicks on a page number.&lt;/span&gt;&lt;br /&gt;$(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.page_link&#39;&lt;/span&gt;).click(function(){&lt;br /&gt;&lt;br /&gt;    var currpage = parseInt($(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;).attr(&lt;span style=&quot;color: #006080&quot;&gt;&#39;longdesc&#39;&lt;/span&gt;));&lt;br /&gt;    currpage+=1; &lt;span style=&quot;color: #008000&quot;&gt;//longdesc is 0-based but page numbers start at 1.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (currpage==1) {&lt;br /&gt;        hideFirstPrev();&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (currpage==numberofpages) {&lt;br /&gt;        hideNextLast();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; &lt;br /&gt;    &lt;br /&gt;    {&lt;br /&gt;        showAll();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Hide First and Previous links when the user clicks the First link&lt;/span&gt;&lt;br /&gt;$(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.first_link&#39;&lt;/span&gt;).click(function(){&lt;br /&gt;        hideFirstPrev();&lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Hide Last and Next links when the user clicks on the Last link&lt;/span&gt;&lt;br /&gt;$(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.last_link&#39;&lt;/span&gt;).click(function(){&lt;br /&gt;        hideNextLast();&lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//Decide what to hide when the user clicks on the Next or Previous links&lt;/span&gt;&lt;br /&gt;$(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.previous_link,.next_link&#39;&lt;/span&gt;).click(function(){&lt;br /&gt;&lt;br /&gt;    var currpage = parseInt($(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.active_page&#39;&lt;/span&gt;).attr(&lt;span style=&quot;color: #006080&quot;&gt;&#39;longdesc&#39;&lt;/span&gt;));&lt;br /&gt;    currpage+=1; &lt;span style=&quot;color: #008000&quot;&gt;//longdesc is 0-based but page numbers start at 1.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (currpage==1) {&lt;br /&gt;            hideFirstPrev();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (currpage==numberofpages) {&lt;br /&gt;            hideNextLast();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; {&lt;br /&gt;            showAll();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;});            &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//If we have only one page, disable pager completely.            &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(total_items&amp;lt;itemsperpage){&lt;br /&gt;    $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.page_navigation&#39;&lt;/span&gt;).hide();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;});&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;color: #008000&quot;&gt;//These are helper functions for hiding / showing First/Last/Next/Previous links&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; function hideFirstPrev() {&lt;br /&gt;    toggleFirstLastNextPrevControls(1);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function hideNextLast() {&lt;br /&gt;    toggleFirstLastNextPrevControls(2);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function showAll() {&lt;br /&gt;    toggleFirstLastNextPrevControls(3);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function toggleFirstLastNextPrevControls (mode) {&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (mode==1) {&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.first_link&#39;&lt;/span&gt;).hide();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.previous_link&#39;&lt;/span&gt;).hide();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.last_link&#39;&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.next_link&#39;&lt;/span&gt;).show();&lt;br /&gt;    } &lt;br /&gt;    &lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (mode==2) &lt;br /&gt;    {&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.first_link&#39;&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.previous_link&#39;&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.last_link&#39;&lt;/span&gt;).hide();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.next_link&#39;&lt;/span&gt;).hide();&lt;br /&gt;    } &lt;br /&gt;    &lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (mode==3)&lt;br /&gt;    &lt;br /&gt;    {&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.first_link&#39;&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.previous_link&#39;&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.last_link&#39;&lt;/span&gt;).show();&lt;br /&gt;        $(&lt;span style=&quot;color: #006080&quot;&gt;&#39;#paging_container&#39;&lt;/span&gt;).find(&lt;span style=&quot;color: #006080&quot;&gt;&#39;.next_link&#39;&lt;/span&gt;).show();&lt;br /&gt;    }&lt;br /&gt; }&lt;br /&gt;  &lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here’s the code for the Header Template for the Announcements module:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&amp;lt;link rel=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; type=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt; href=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;/portals/0/scripts/pajinate.css&amp;quot;&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;/portals/0/scripts/jquery.pajinate.js&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;/portals/0/scripts/pajinatehelper.js&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;paging_container&amp;quot;&lt;/span&gt; style=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;text-align:left;&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;table &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;DNN_ANN_DesignTable&amp;quot;&lt;/span&gt; cellspacing=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; summary=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Announcements Design Table&amp;quot;&lt;/span&gt; border=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt; style=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;border-collapse:collapse;&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;div id=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;pagetable&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Please note that I include the stylesheet (pajinate.css), the js file for Pajinate (jquery.pajinate.js – you can use jquery.pajinate.min.js too) and my own .js file (pajinatehelper.js) from my /portals/0/scripts folder (I actually created that “scripts” folder, since it didn’t exist in the default skin’s folder structure). You, of course, can load them from whatever path you like, or you can even inject them in the page’s HEAD section (&lt;a href=&quot;http://dnnuke.blogspot.com/2011/05/injecting-css-javascript-on-your-page.html&quot; target=&quot;_blank&quot;&gt;see this post for more on that&lt;/a&gt;).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Pajinate demands that the items to be paged are enclosed inside an element with a specific id (in our case, “paging_container”). You can see the complete documentation &lt;a href=&quot;https://github.com/wesnolte/Pajinate/wiki&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. Unfortunately, this doesn’t work well with tables, so I used an enclosing DIV with this id. Of cource, in your implementation, you can ditch the TABLE alltogether and just use DIVs. I tried to alter the default template as little as possible.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Pajinate also needs a second element that contains elements to be paged. I used this also, as a div with “pagetable” id. Those two are configurable (see the script)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And here’s the code for the footer:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;div &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;page_navigation&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The “page_navigation” div is once again required by pajinate in order to show the pager.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Phew. When you put all the code in place, and ensure that it’s working correctly, the result will be something like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHVLnGymWEpFyLFrxAWosUv9fNBtNv45mDGwLcWoUQf6JGRaoQF_LXfu4wZSz3Dh0cF3_MXNoFvIAX-3uuAa-CCY-Owf4cRrpolsBRVhrzWxi2twl-wWDcbyS4PGdz47osN_j-8-LgNbc/s1600-h/pajinate%25255B5%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;pajinate&quot; border=&quot;0&quot; alt=&quot;pajinate&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5lA4fKWCKcH47pCBU4KVujQoRTAVVcIM9lOwsHNqBu-y9SOBKfOOo-0qu0WImC-lbVDDEvug1efeaQ6Jwf2e_GUxjU9io6r6jcXc60IWUaDH7tZhO3sG7l1jWbMRv0ehNISiM3Q0MRFg/?imgmax=800&quot; width=&quot;430&quot; height=&quot;179&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The orange pager comes from the default stylesheet that comes with Pajinate. You can, of course, change it at your will. In this example, I used a page size of 2.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;CAUTION: Since errors in Javascript can sometimes render your page useless and even disable the edit controls, please take a bookmark of the module edit page URL before you apply changes, so you can always get back to it in case things go wrong.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Have fun and good luck!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2011/10/adding-paging-to-core-announcements.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5lA4fKWCKcH47pCBU4KVujQoRTAVVcIM9lOwsHNqBu-y9SOBKfOOo-0qu0WImC-lbVDDEvug1efeaQ6Jwf2e_GUxjU9io6r6jcXc60IWUaDH7tZhO3sG7l1jWbMRv0ehNISiM3Q0MRFg/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-7814368275878312176</guid><pubDate>Tue, 09 Aug 2011 13:43:00 +0000</pubDate><atom:updated>2011-11-03T17:04:32.799+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Implementations</category><title>What modules I used to develop www.alunet.com (Part 2 - Open Web Studio)</title><description>&lt;p&gt;&lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=12152&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Open Web Studio&lt;/a&gt; (or OWS in short) is a FREE (yes, free!) module from R2integrated, formerly known as ListX. (There are paid subscription options too, although I&#39;m not quite sure what is offered). At first glance, it looks like a module where you can define an sql query and then create a template to render results - something like a glorified data repeater. But it&#39;s a lot more than that. It supports AJAX, paging, variables, it can &amp;quot;talk&amp;quot; to DNN and retrieve things like the tab id, the module id, the locale etc. it can make decisions and branch execution, you can nest modules and have one call another via AJAX, you can do redirections or change page and module titles, you can cache query results and you can even write to files!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Activity lists, product and company lists, product and company details, as well as the users&#39; control panel are rendered via OWS. Additionally, OWS is used in all security checks (such as checking if the user has the right to edit a specific company or product or if the user can add another product). This is achieved via modules that have no front-end but nevertheless run when the page is requested.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE2LQLb-GEEl53RGZMqNoM4auYIn3C9Sgrrc-OVquGp-C_-PKK_-3BST6vDworyVXd_v44VYjyeRc0t8pnjxTtqzN7lzGIpv9pDpCYRfNvqGlhuxIQ4DKYC7hM3lRjbwD06iZWS1bOrfY/s1600-h/alunetcom_controlpanel_thumb92.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_controlpanel_thumb[9]&quot; border=&quot;0&quot; alt=&quot;alunetcom_controlpanel_thumb[9]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBJYYlMXI6EAF4reYWa82IVqxg_cZ9lYZby_NMPYzLPOyiIn7sZSFkPLCBjPuPfzTwaKN71GybwkCtY21RoXWNdh2fki6UuwAMYORuY1SwN6caY5psbkc7MD-JwSUWx5RfwLcdCvM4m8s/?imgmax=800&quot; width=&quot;420&quot; height=&quot;177&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ynDYQwiae7qzf6A5u3RaWozfoUQpc6TOej6288TO6YP1QO1xhThSgRKH9umGDCpxny-hr3hUlPiAGC3AYxptbDg-R6wVLPKSl7V6oDEGZat8dVh7OA1zC4eyA3Qf_yM9JVPNnALA3rc/s1600-h/alunetcom_controlpanel_products_thum%25255B1%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_controlpanel_products_thumb[11]&quot; border=&quot;0&quot; alt=&quot;alunetcom_controlpanel_products_thumb[11]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTokaxJRsUEvey4vY7h0TOLIhj3vIbckusYy69BXyC1L6irSLWlKW4MjuwUffTUpvjwFoR8YtmlcmOiFfowA5O4ZeWly_8T-TCXPNuHwmgQ8RbCRA-QQVhvJrHZTh4SFFSfd0yNX6kGMA/?imgmax=800&quot; width=&quot;420&quot; height=&quot;119&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRgJOXwSQ16cPzmx4SASpCBgxT358a7YHB8GEaEpt9FE3rtdrTBZO_NwpLELtNSc25XQF0p6y-nFRoPh8PNJosUtDra-nIPiWNucv-L5eCL9svhSz4jy-0v3ZRK5EqZbwkFAJmUnrJUs/s1600-h/alunetcom_companylist_thumb62.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_companylist_thumb[6]&quot; border=&quot;0&quot; alt=&quot;alunetcom_companylist_thumb[6]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNZGqBzNmxKGgL9viEKVn4n7597l-xirDLMHimr3Fj6vWvoRMbHah2_Ka_MisdlXxry382PhZLtNse-XIg_736K7tCq3P0zG2TnkDfJUpqHfx3Sq10xvuh_r_YzkI8FkHPWuyScJKxzg/?imgmax=800&quot; width=&quot;420&quot; height=&quot;609&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Development in OWS is done via a handy tree-like interface where you define things like variables, If - else sections, sql queries, header-detail-alternate detail-footer sections etc.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The site&#39;s first page is a good OWS example. The asynchronous effect you will see when you load the first page is because only the main activities are retrieved when the page loads. Subactivities are then queried and rendered via AJAX, and query results are cached for each subactivity (yes, OWS can do named caching on query results so that you don&#39;t have to query your database all the time - you can even use fields from your queries to construct names for the cached elements). This is on purpose, since there is a large number of activities and counting products and companies for each one can take some time. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What&#39;s more is that you can then have more control over your caching - when a new company or product is submitted, you can clear only the cache that corresponds to the specific main activity it belongs to - leaving all the other query results cached. (No, I haven&#39;t done that yet - that&#39;s why it&#39;s a bit slow :))&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another example would be the company details page, in the future - the site will soon be supporting &amp;quot;packages&amp;quot;, i.e. there will be companies that will register for free and companies that will pay. The &amp;quot;free&amp;quot; companies will have fewer details shown than the paying ones. This is very easy to control via OWS. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjEe8ewYubKk930lBchczfFQV6OB74lTbdpqdo1e6olu5PrqpxlUQCob_SXEQHwSBdFSsb2FMLRQpEqoZgAsiZFKRKdTl_30uqpxl6H8F5njgOFVlrRA2E3XqKmMwoaTMBiJhqtidNeEo/s1600-h/alunetcom_companyprofile_thumb162.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_companyprofile_thumb[16]&quot; border=&quot;0&quot; alt=&quot;alunetcom_companyprofile_thumb[16]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0BFg-6VLLPz0GVpdvy4_VaR8n28pgIC85whADQH0IND7uQujlcTX5unFibMJCFxcsuxmQVoN68tLM9ESG3aFrevyyRgJJpaN1NqfXh2AJWnvc8sN72tC304Qdy15aF6Yb1Cs2U0ko8Nw/?imgmax=800&quot; width=&quot;420&quot; height=&quot;851&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In fact, I could use OWS to even create the submission forms - but it would be very hard since I would have to do it all by hand - Dynamic Forms is very easier for this type of task. I created the quick search form on the company and product lists with OWS, though. When submitted, it runs a stored procedure which brings the appropriate results - illegal character escaping, injection protection, even parameter type checking and default values assignment are all built-in and easily customizable.&lt;/p&gt;  &lt;p&gt;What&#39;s the catch? Well, lack of documentation. You&#39;ve got to turn a lot of knobs and push a lot of buttons to understand what OWS really can do. Fortunately, there&#39;s a great community of OWS fans (me included), and this has solved most of my problems.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;OWS Pros:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Free! &lt;/li&gt;    &lt;li&gt;Very few bugs compared to other solutions &lt;/li&gt;    &lt;li&gt;Integrated RAD development environment including debugger &lt;/li&gt;    &lt;li&gt;It can talk to any external database (you can define connection strings) &lt;/li&gt;    &lt;li&gt;Supports calls to webservices or even external DLLs &lt;/li&gt;    &lt;li&gt;Supports caching, ajax, paging, sorting, decisions, variables &lt;/li&gt;    &lt;li&gt;Can talk to DNN - actually it can retrieve everything the PortalSettings class offers and some more. &lt;/li&gt;    &lt;li&gt;Very portable configurations, provides an option to even create your own PA assemblies, meaning that you can create your own modules using OWS. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;OWS Cons:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;VERY poor wiki-style documentation (but lots of examples in the community forums) &lt;/li&gt;    &lt;li&gt;Internal functions have a syntax that is somewhat hard to read (quotes inside quotes, brackets, curly brackets, parentheses, escaped quotes, you can usually find them all in one line) &lt;/li&gt;    &lt;li&gt;Developer must be very proficient in SQL and HTML / Javascript in order to achieve good results (actually IMHO, this is not a bad thing) &lt;/li&gt;    &lt;li&gt;Can be painful to debug in very complex scenarios &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Company website: &lt;a href=&quot;http://www.r2integrated.com&quot;&gt;www.r2integrated.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Module website: &lt;a href=&quot;http://www.openwebstudio.com&quot;&gt;www.openwebstudio.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Snowcovered: &lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=12152&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Click&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;a href=&quot;http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html&quot; target=&quot;_blank&quot;&gt;Click here to read Part 1&lt;/a&gt; (introduction and Dynamic Forms from Datasprings)&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBJYYlMXI6EAF4reYWa82IVqxg_cZ9lYZby_NMPYzLPOyiIn7sZSFkPLCBjPuPfzTwaKN71GybwkCtY21RoXWNdh2fki6UuwAMYORuY1SwN6caY5psbkc7MD-JwSUWx5RfwLcdCvM4m8s/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-7028786093442752558</guid><pubDate>Tue, 09 Aug 2011 13:40:00 +0000</pubDate><atom:updated>2012-10-10T20:05:43.480+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Implementations</category><title>What modules I used to develop www.alunet.com (Part 1 - introduction and Dynamic Forms from Datasprings)</title><description>&lt;p&gt;Instead of writing another boring &amp;quot;top 10&amp;quot; list of modules &amp;quot;you must use before you die&amp;quot;, I chose to present a site I developed (currently online but in Beta stage). This is a unique opportunity, since I usually don&#39;t get permission or don&#39;t have enough time to publish details on my work.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The site is &lt;a href=&quot;http://www.alunet.com&quot;&gt;www.alunet.com&lt;/a&gt;, a global directory related to aluminium companies and products, and has been developed using the following DNN modules:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-kkzRauZ4G_3k0g-d24xY1Abfpz2RVbnGgRKmRRdlHNrKHdghXR-CMBVeTBKCVYAiPiVhqqq-iwqaOVFiJtsoxAYEN4b3UdT3-MHB4qh09PQN6hBKrsOkJVaAKU8dMwlBstzNi20KA5o/s1600-h/alunetcom_main14.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_main&quot; border=&quot;0&quot; alt=&quot;alunetcom_main&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDqx0VcGXZyJuZxhjAaBTh0WLsUD9o-buD_FQM-HrCNvZPJJqyUQTtSSNkLO7D11er2agFZ2yC3kHrbiEe_1zsM3jzQi-YQewano7aXRDPx7EmVALk_iX1tAwg1dSxLDPdzgSUKsq3Qq4/?imgmax=800&quot; width=&quot;420&quot; height=&quot;431&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/dynamic-forms-41/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Dynamic Forms&lt;/a&gt; from Datasprings&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15173&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;IndooGrid&lt;/a&gt; from IndooLab&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/open-web-studio-subscription-/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Open Web Studio&lt;/a&gt; from R2integrated&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=5694&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;News Articles&lt;/a&gt; from Ventrian&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/live-tabs-v390/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Live Tabs&lt;/a&gt; from Mandeeps&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/navigation-suite(all-in-one)v10448--mega-menu-system--4-premium-xhtml-skin-packs-w3c/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Navigation Suite&lt;/a&gt; from DNN360.net&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/smoke-ranch-ad-banner-manager-60/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;SmokeRanch Ad Manager&lt;/a&gt; from Smoke Ranch Software&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(Please be aware that the design is not mine - the layout and site structure was entirely designed by the client and my job was to implement all the functionality needed).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The site is also heavily using &lt;a href=&quot;http://www.jquery.com&quot; target=&quot;_blank&quot;&gt;jQuery&lt;/a&gt;, &lt;a href=&quot;http://fancybox.net/&quot; target=&quot;_blank&quot;&gt;Fancybox&lt;/a&gt; (a jQuery plugin for displaying images and/or html) as well as &lt;a href=&quot;http://www.percipientstudios.com/imagegen/overview.aspx&quot; target=&quot;_blank&quot;&gt;ImageGen&lt;/a&gt;, an image resizer originally developed for the Umbraco CMS that can function stand-alone in any .NET - based website.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let&#39;s discuss where I used what and why:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dynamic Forms from Datasprings&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/dynamic-forms-41/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Dynamic Forms&lt;/a&gt; is being used for almost all end-user data submission tasks. This is a very powerful forms generator for DotNetNuke, which allows you to create data-driven forms, storing data either in the module&#39;s internal database schema or in any custom external table structure. I am using custom tables for companies, products and categories so I chose the second approach. You can easily load data to your forms as well as save data to your database via SQL queries or stored procedures. You can populate form fields using SQL, and this is especially useful with lookup data used in combo boxes or checkbox groups.&amp;#160; The module supports various goodies like injecting your own javascript, creating your own validations and launching events on form submission that can send email or write to the database. I used Dynamic Forms for the product and company data submission forms that are displayed to registered users.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZB2pt730sV0rkf-KAtrEdcmr29QFze5h9fTGME-ZRteKZIbAmKVh9D-UFfqIYyTsiG2sfrpNTgJmtViqI0McKedjexAq-jk3fe1kewiLw8jzAXV1O5aHJSv6ypERbdFxA4e6YdH4630U/s1600-h/alunetcom_companyform16.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_companyform&quot; border=&quot;0&quot; alt=&quot;alunetcom_companyform&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV7wjtJAM_ReaI8jIUo0pRCgKGCKZIDfX6VPqO-Px-9XuqgXTcQgzkz8f4Pj8RuAmsfgCyUaMMRGYPlU0cjzpJqEpwvUv4ngIT6g-aqIbmRFr_Tr5wubMmSfx8iqISizyzb1jHaS9AWo4/?imgmax=800&quot; width=&quot;420&quot; height=&quot;1411&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Registered users can submit their company data. Each user can submit only one company, which is approved by the site&#39;s administrator. Companies must have a main activity and subactivities that fall under their main activity (it&#39;s a tree with 3 levels). After initial submission, the user must select a main activity and subactivities. (again, Dynamic Forms is used for the selection forms). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When this process is complete, the company must be approved by the site administrators. Users get an email when this is done. (Of course, administrators also get an email for each submitted company). This is achieved via Dynamic Forms post-submission events.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Afterwards, the user is able to submit up to a specific number of products for the company (currently 10, but it&#39;s as easy to change as a record in a database table) and assign each product to one of the subactivities they have defined for their company. Actually, the &amp;quot;main activity&amp;quot; acts only as a grouping category, while subactivities are the actual activities of the company.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ohk1kSrAexHacm90bX79tuZvvwvTQ8MUcfVDszkHXauuf_0k-XWHHM9IDOtsQf7q3W9opP6KKjl77cHTurC9tpTARM-HxgnmtkMdiDdOH1JC-mMcGv-w8ePgu6yBNXe-fIoCA69quR8/s1600-h/alunetcom_productform5.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_productform&quot; border=&quot;0&quot; alt=&quot;alunetcom_productform&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDZ0gFF0A5DL-vDp0NOY8tCDcuOpopnDVnAO2jFccf9JLgumromAVodTdDx6J3oxo22pUaiqEz2umbjF0kqY3j1vy6bKKHKHSm1frSP5oXUpq6yySmpiy-GoGjCUqhH_1P0PzOdCg_Dgs/?imgmax=800&quot; width=&quot;420&quot; height=&quot;730&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When editing the subactivity list, the forms present only subactivities that can be selected depending on the main activity chosen and do not let the user unselect a subactivity he has already assigned products to.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbfOO3ZpA3SnwgnJKYbi_O2WrTZK8sC9lLlKK_wQXvS4anONFcYNjwTzAbSoppnDODDIhrLS_NgkodwUY8-d0ZRM5L6Yk0QFHaH9Ny7n-W02xDUQDxfCRWDOID0u-QbWQOpgqBC9-TaAg/s1600-h/alunetcom_activities7.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;alunetcom_activities&quot; border=&quot;0&quot; alt=&quot;alunetcom_activities&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2mUVZ5q1ICvAEixC_sbZdWI0bEMsHtO8eM6n9DuXzI3WU99ffGWiI8AehFwRVXjwZ-zryYBj9GxV-DPvSbATMMPonDqPtZ8cdQMhr-6kPBUecBwm4pdiV1BUkHHAczNlvzoeoXX-ZYQ8/?imgmax=800&quot; width=&quot;420&quot; height=&quot;485&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Users have their own &amp;quot;control panel&amp;quot; where they can manage companies, products and activities. This works mainly with Open Web Studio, which we&#39;ll examine later on.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Dynamic Forms pros:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Very powerful &lt;/li&gt;    &lt;li&gt;Datastore in own schema or custom database &lt;/li&gt;    &lt;li&gt;Post-submission events (email, sql, etc.) &lt;/li&gt;    &lt;li&gt;Field events (when you fill a field - you can hide/show sections depending on value etc.) &lt;/li&gt;    &lt;li&gt;Great selection of controls - including data-driven comboboxes, listbox/radio groups, rich text editor, image and file upload controls. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Dynamic Forms cons:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Bugs arise when you try to push it too far &lt;/li&gt;    &lt;li&gt;Somewhat expensive - you must make sure that you need it &lt;/li&gt;    &lt;li&gt;Not very good / easy control on final layout &lt;/li&gt;    &lt;li&gt;Image and file upload controls have many features (e.g. unique filenames, automatic thumbnail resizing) but need a lot of work to operate correctly. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Company website: &lt;a href=&quot;http://www.datasprings.com&quot;&gt;www.datasprings.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;DotNetNuke Store: &lt;a href=&quot;http://store.dotnetnuke.com/home/product-details/dynamic-forms-41/r/05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Click&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;a href=&quot;http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop_09.html&quot; target=&quot;_blank&quot;&gt;Click here to read Part 2&lt;/a&gt; (Open Web Studio)&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2011/08/what-modules-i-used-to-develop.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDqx0VcGXZyJuZxhjAaBTh0WLsUD9o-buD_FQM-HrCNvZPJJqyUQTtSSNkLO7D11er2agFZ2yC3kHrbiEe_1zsM3jzQi-YQewano7aXRDPx7EmVALk_iX1tAwg1dSxLDPdzgSUKsq3Qq4/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-7034720121190042433</guid><pubDate>Wed, 04 May 2011 12:54:00 +0000</pubDate><atom:updated>2011-05-04T15:54:17.910+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Injecting CSS / Javascript on your page, revised</title><description>&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;A long time ago, I had posted &lt;a href=&quot;http://dnnuke.blogspot.com/2008/10/adding-javascript-to-body-tag-in-dnn.html&quot; target=&quot;_blank&quot;&gt;a method to include Javascript in your .ascx skin’s HEAD section&lt;/a&gt;. Things have evolved till then, DNN supports JQuery out of the box, and we need an easy way to inject scripts and css stylesheets in our page, taking care that core stylesheets and jquery are loaded BEFORE our scripts, so they can work correctly. This is especially important with JQuery plugins.&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;Latest DNN versions include two placeholder controls on the default.aspx page, with Ids CSS and SCRIPTS accordingly. These are the controls that can hold our scripts and stylesheets after all core stuff has been loaded, and we can have code inside our .ascx skins that uses these controls and injects stuff like jquery plugins or custom stylesheets inside our page’s HEAD section.&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;I’ve written some reusable code to do so, which, in this basic implementation, can be used to control what scripts and stylesheets are loaded per skin. Of course, you can customize it even more to control things even on a tab level.&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;The code has basically two functions, AddCSS and AddJS (what they do is obvious). You must override the Page_Init function and add your calls to the functions there.&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;Here’s the code. You can use it inline inside your .ascx page, preferrably right after your last @Register statement.&lt;/font&gt; &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;lt;script runat=&lt;span class=&quot;str&quot;&gt;&quot;server&quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; An enum which holds the various type of elements to be &lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; injected in the HEAD section of our page    &lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Enum&lt;/span&gt; htmlHeadElementType &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Integer&lt;/span&gt;&lt;br /&gt;        css = 1&lt;br /&gt;        javascript = 2&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Enum&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; Add a CSS element to the HEAD section of our page&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;param name=&quot;csspath&quot;&amp;gt;The path to the CSS file&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt; AddCSS(&lt;span class=&quot;kwrd&quot;&gt;ByVal&lt;/span&gt; csspath &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;String&lt;/span&gt;)&lt;br /&gt;        AddHTMLHeadElement(csspath, htmlHeadElementType.css)&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; Add a JavaScript element to the HEAD section of our page&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;param name=&quot;jsPath&quot;&amp;gt;The path to the js file&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt; AddJS(&lt;span class=&quot;kwrd&quot;&gt;ByVal&lt;/span&gt; jsPath &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;String&lt;/span&gt;)&lt;br /&gt;        AddHTMLHeadElement(jsPath, htmlHeadElementType.javascript)&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; This is the actual function. &lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; It addds the element to the HEAD section of our page.    &lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;param name=&quot;elementPath&quot;&amp;gt;The path to the file (css, js etc)&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;param name=&quot;elementType&quot;&amp;gt;a htmlHeadElementType corresponding &lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; to the type of the element&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; we are adding to the HEAD section.&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;rem&quot;&gt;&#39;&#39;&#39; &amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt; AddHTMLHeadElement( _&lt;br /&gt;          &lt;span class=&quot;kwrd&quot;&gt;ByVal&lt;/span&gt; elementPath &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;String&lt;/span&gt; _&lt;br /&gt;        , &lt;span class=&quot;kwrd&quot;&gt;ByVal&lt;/span&gt; elementType &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; htmlHeadElementType)&lt;br /&gt;&lt;br /&gt;        &lt;span class=&quot;kwrd&quot;&gt;Dim&lt;/span&gt; containerControl &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; Control &lt;br /&gt;        &lt;br /&gt;        &lt;span class=&quot;kwrd&quot;&gt;Select&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Case&lt;/span&gt; elementType&lt;br /&gt;        &lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;Case&lt;/span&gt; htmlHeadElementType.css &lt;br /&gt;                &lt;br /&gt;                containerControl = &lt;span class=&quot;kwrd&quot;&gt;Me&lt;/span&gt;.Page.FindControl(&lt;span class=&quot;str&quot;&gt;&quot;CSS&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;Case&lt;/span&gt; htmlHeadElementType.javascript &lt;br /&gt;        &lt;br /&gt;                containerControl = &lt;span class=&quot;kwrd&quot;&gt;Me&lt;/span&gt;.Page.FindControl(&lt;span class=&quot;str&quot;&gt;&quot;SCRIPTS&quot;&lt;/span&gt;)&lt;br /&gt;                &lt;br /&gt;        &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Select&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;        &lt;span class=&quot;kwrd&quot;&gt;If&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Not&lt;/span&gt; containerControl &lt;span class=&quot;kwrd&quot;&gt;Is&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span class=&quot;rem&quot;&gt;&#39;Create our generic html control&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;Dim&lt;/span&gt; oLink &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; HtmlGenericControl&lt;br /&gt;            &lt;br /&gt;            &lt;span class=&quot;rem&quot;&gt;&#39;Decide on what type of element to add&lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;Select&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Case&lt;/span&gt; elementType&lt;br /&gt;                &lt;br /&gt;                &lt;span class=&quot;kwrd&quot;&gt;Case&lt;/span&gt; htmlHeadElementType.css&lt;br /&gt;                    &lt;br /&gt;                    oLink = &lt;span class=&quot;kwrd&quot;&gt;New&lt;/span&gt; HtmlGenericControl(&lt;span class=&quot;str&quot;&gt;&quot;link&quot;&lt;/span&gt;)&lt;br /&gt;                    oLink.Attributes(&lt;span class=&quot;str&quot;&gt;&quot;rel&quot;&lt;/span&gt;) = &lt;span class=&quot;str&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class=&quot;str&quot;&gt;&quot;type&quot;&lt;/span&gt;) = &lt;span class=&quot;str&quot;&gt;&quot;text/css&quot;&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class=&quot;str&quot;&gt;&quot;href&quot;&lt;/span&gt;) = elementPath&lt;br /&gt;                &lt;br /&gt;                &lt;br /&gt;                &lt;span class=&quot;kwrd&quot;&gt;Case&lt;/span&gt; htmlHeadElementType.javascript&lt;br /&gt;                    &lt;br /&gt;                    oLink = &lt;span class=&quot;kwrd&quot;&gt;New&lt;/span&gt; HtmlGenericControl(&lt;span class=&quot;str&quot;&gt;&quot;script&quot;&lt;/span&gt;)&lt;br /&gt;                    oLink.Attributes(&lt;span class=&quot;str&quot;&gt;&quot;language&quot;&lt;/span&gt;) = &lt;span class=&quot;str&quot;&gt;&quot;javascript&quot;&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class=&quot;str&quot;&gt;&quot;type&quot;&lt;/span&gt;) = &lt;span class=&quot;str&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;br /&gt;                    oLink.Attributes(&lt;span class=&quot;str&quot;&gt;&quot;src&quot;&lt;/span&gt;) = elementPath&lt;br /&gt;            &lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Select&lt;/span&gt;&lt;br /&gt;            &lt;br /&gt;            &lt;span class=&quot;rem&quot;&gt;&#39;Add a script reference to the head section &lt;/span&gt;&lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;If&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Not&lt;/span&gt; oLink &lt;span class=&quot;kwrd&quot;&gt;Is&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;                containerControl.Controls.Add(oLink)&lt;br /&gt;            &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;If&lt;/span&gt;&lt;br /&gt;            &lt;br /&gt;        &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;If&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;    &lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt; Page_Init( _&lt;br /&gt;        &lt;span class=&quot;kwrd&quot;&gt;ByVal&lt;/span&gt; sender &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; System.&lt;span class=&quot;kwrd&quot;&gt;Object&lt;/span&gt; _&lt;br /&gt;        , &lt;span class=&quot;kwrd&quot;&gt;ByVal&lt;/span&gt; e &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; System.EventArgs _&lt;br /&gt;        ) &lt;span class=&quot;kwrd&quot;&gt;Handles&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;MyBase&lt;/span&gt;.Init&lt;br /&gt;&lt;br /&gt;        &lt;span class=&quot;rem&quot;&gt;&#39;Add the various files to the HEAD section of our page.&lt;/span&gt;&lt;br /&gt;        AddJS(&lt;span class=&quot;str&quot;&gt;&quot;/somepath/myscript.js&quot;&lt;/span&gt;)&lt;br /&gt;        AddCSS(&lt;span class=&quot;str&quot;&gt;&quot;/somepath/mystylesheet.css&quot;&lt;/span&gt;) &lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;  </description><link>http://dnnuke.blogspot.com/2011/05/injecting-css-javascript-on-your-page.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>11</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-7107832560838533182</guid><pubDate>Wed, 23 Mar 2011 13:46:00 +0000</pubDate><atom:updated>2011-03-23T15:46:16.155+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Troubleshooting</category><title>Fix: Points not added to core DNN Maps module</title><description>&lt;p&gt;The DNN Maps module is very simple and useful, but you may come across a problem: When you add points they are simply not added (and when you go to “data” later you see nothing on the list). This behaviour has been reported for module version 01.00.09.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The fix is very simple and I’m posting it here in order to facilitate anyone who’s been having the same problem: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to your DNN root folder and find &lt;/p&gt;  &lt;p&gt;DesktopModules\Map\Sources\Dotnetnuke.Map.Standard.js    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Change the return value in the mapWriteData function as follows.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;from:&lt;/p&gt;  &lt;p&gt;return encodeURIComponent(strvalue)    &lt;br /&gt;to:&lt;/p&gt;  &lt;p&gt;return strvalue&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And points will be added normally.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You may need to clear your browser’s cache in order to get it working.&lt;/p&gt;  &lt;p&gt;Source: &lt;a href=&quot;http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/130/threadid/327921/scope/posts/threadpage/2/Default.aspx&quot; target=&quot;_blank&quot;&gt;DNN Support Forums&lt;/a&gt;&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2011/03/fix-points-not-added-to-core-dnn-maps.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-9209594954652480767</guid><pubDate>Sun, 20 Feb 2011 20:24:00 +0000</pubDate><atom:updated>2011-09-30T22:19:07.647+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Troubleshooting</category><title>Datasprings Dynamic Forms and image upload problems - a fix for specific scenarios</title><description>&lt;p&gt;This may not interest lots of people, but if you&#39;re using the very powerful &lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=18443&amp;amp;r=05f74f0018a74d8aa683&quot; target=&quot;_blank&quot;&gt;Datasprings&#39; Dynamic Forms module&lt;/a&gt;, you may come across it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The setup&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Historically, there have been quite a few bugs with the image upload field in this module, especially when using in combined with the Preview functionality. I had the following setup:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Dynamic Forms module with more than one image upload field.&lt;/p&gt;  &lt;p&gt;Preview ON&lt;/p&gt;  &lt;p&gt;Thumbnail ON&lt;/p&gt;  &lt;p&gt;Initial SQL rendering/bind ON&lt;/p&gt;  &lt;p&gt;More than one image fields&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Other attributes for image fields (not that it matters, just describing the full scenario):&lt;/p&gt;  &lt;p&gt;Custom image folder &lt;/p&gt;  &lt;p&gt;Save filename only&lt;/p&gt;  &lt;p&gt;Save system generated unique name&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I wanted to setup Dynamic Forms to let a user upload, let&#39;s say, four images on the same form. I needed to save those in my own database tables and load them from those tables, so I had initial SQL rendering/bind as well as an sql event to save the images back to my custom database table.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When you use your own sql query to get data for your form, (at least at versions 03.30 to 03.40) thumbnails do not get loaded the first time the form is loaded. Instead, you see the full-sized image (after all, that&#39;s what stored in the database). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you cause a postback (e.g. by clicking on the &amp;quot;upload new image&amp;quot; link on another image field) then the image url is correctly prefixed with &amp;quot;thumb_&amp;quot; and it is presented in the correct dimensions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To overcome this, I just added code to my select query that would put the &amp;quot;_thumb&amp;quot; prefix in place even if it wasn&#39;t there, like the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;SELECT&lt;/p&gt;  &lt;p&gt;&amp;#160; field1&lt;/p&gt;  &lt;p&gt;, field2&lt;/p&gt;  &lt;p&gt;, ...(other fields)&lt;/p&gt;  &lt;p&gt;, case &lt;/p&gt;  &lt;p&gt;&amp;#160; when ltrim(rtrim(isnull(myfield,&#39;&#39;))) =&#39;&#39; &lt;/p&gt;  &lt;p&gt;&amp;#160; then &#39;&#39; &lt;/p&gt;  &lt;p&gt;&amp;#160; else &#39;thumb_&#39; + myfield &lt;/p&gt;  &lt;p&gt;&amp;#160; end as myfield&lt;/p&gt;  &lt;p&gt;, ...(other fields)&lt;/p&gt;  &lt;p&gt;...(rest of query)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So this would always add the thumb_ prefix to the field &amp;quot;myfield&amp;quot;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This solved the problem with the initial form rendering. The first time a user sees the form, the thumbnails are shown instead of the full images. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The second problem &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The first solution caused an additional problem: In the case of a postback, as I mentioned before, DF puts its own &amp;quot;thumb_&amp;quot; prefix in the images that are displayed on image fields! So if you attempt to click on &amp;quot;upload new image&amp;quot; in any fields, all the other fields will now have an image starting with &amp;quot;thumb_thumb_&amp;quot;, and, since no filename exists that starts with this prefix, broken images will be all you&#39;ll see.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Please note that you&#39;ll see this only if you&#39;re using two or more image fields on the same form (or use any other postback that triggers this behaviour).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The additional solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I found no way to circumvent this, since it&#39;s by design. So I had to resort to JQuery in order to correct the problem. I added a Custom Javascript (you can do that in the Module Configuration section) like the following one:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;$(document).ready(function() {&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; $(&#39;img[src*=&amp;quot;/Portals/0/imageuploadfolder/&amp;quot;]&#39;).each(function(i,d) {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(d).attr(&amp;quot;src&amp;quot;,     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(d).attr(&amp;quot;src&amp;quot;).replace(&amp;quot;thumb_thumb_&amp;quot;, &amp;quot;thumb_&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; );&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; });    &lt;br /&gt;});     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;What it does is take all images that have an src attribute that contains the path /portals/0/imageuploadfolder (replace this with your path) and changes any double &amp;quot;thumb_&amp;quot; prefixes to a single one. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This dual workaround seems to work good so far. Now I know this is a very special situation (Dynamic Forms with more than one image field and initial sql rendering) but I hope someone benefits from this. Take care.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2011/02/datasprings-dynamic-forms-and-image.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-1756152033949020024</guid><pubDate>Thu, 09 Dec 2010 15:42:00 +0000</pubDate><atom:updated>2010-12-09T18:14:14.591+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Hide those help icons, site-wide</title><description>&lt;p&gt;Admit it. Those little questionmark help icons are ugly. Even if you replace the icon image with something more fancy, you still have to display them everywhere, even at the front-end (for example, the Feedback module uses them). And, if you’re developing for more than one language, that creates an awful lot of work for you, since you have to translate all texts that appear as tooltips when you hover over the icons.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There’s an easy way to hide them, though, and it’s site-wide. It will also apply to any third-party modules that use the dnn label control for providing labels for form controls.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Go to controls\labelcontrol.ascx and change the following line:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&amp;#160; &amp;lt;asp:image id=&amp;quot;imgHelp&amp;quot;&amp;#160; runat=&amp;quot;server&amp;quot; imageurl=&amp;quot;~/images/help.gif&amp;quot; enableviewstate=&amp;quot;False&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;to&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&amp;#160; &amp;lt;asp:image &lt;strong&gt;&lt;font size=&quot;4&quot;&gt;visible=&amp;quot;false&amp;quot;&lt;/font&gt;&lt;/strong&gt; id=&amp;quot;imgHelp&amp;quot;&amp;#160; runat=&amp;quot;server&amp;quot; imageurl=&amp;quot;~/images/help.gif&amp;quot; enableviewstate=&amp;quot;False&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;That’s right. A visible=”false” attribute and the icons will disappear.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Also, if you notice that the labels are shifted to the left a bit (especially in IE), then go two lines above and change the line:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;lt;span style=&amp;quot;width:15px&amp;quot;&amp;gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;to&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;lt;span style=&amp;quot;width:0px&amp;quot;&amp;gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Or delete the span tag all together.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;You can find a relevant thread on &lt;a href=&quot;http://www.dotnetnuke.com&quot; target=&quot;_blank&quot;&gt;DotNetNuke.com&lt;/a&gt; with some more tips and tricks for the labelcontrol.ascx file &lt;a href=&quot;http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/118/threadid/141766/scope/posts/threadpage/1/Default.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Have fun!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2010/12/hide-those-help-icons-site-wide.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-6402871347173903364</guid><pubDate>Wed, 17 Nov 2010 17:38:00 +0000</pubDate><atom:updated>2010-11-17T19:55:28.868+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Extending</category><title>Using resource files in embedded user controls in skins</title><description>&lt;p&gt;If you are editing ASCX skins, then you have probably been tempted to introduce a bit of reusability by creating custom user controls and embedding them to your skins. These can actually function like skin objects, but without all the fuss. I’ve found it easy to create a couple of those in cases where I may need, for example, a common footer for all my skins, but of course you can do a great deal more with them, like introduce functionality without having to copy all the code to every skin file you make.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In any case, you have to register your control inside your skin file like this (names of folders, portal and skin path and tagprefix/name are arbitrary):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;&amp;lt;%@ Register TagPrefix=&lt;span class=&quot;str&quot;&gt;&amp;quot;MyCompany&amp;quot;&lt;/span&gt; TagName=&lt;span class=&quot;str&quot;&gt;&amp;quot;FOOTER&amp;quot;&lt;/span&gt; src=&lt;span class=&quot;str&quot;&gt;&amp;quot;~/Portals/0/Skins/myskin/myskinobjectsfolder/footer.ascx&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And use it in your skin file like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;lt;MyCompany:FOOTER id=&lt;span class=&quot;str&quot;&gt;&amp;quot;myFooterId&amp;quot;&lt;/span&gt; runat=&lt;span class=&quot;str&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The question is: How do you localize these little bastards? Even if you add DNN controls on them, the ResourceKey property continues to get data only from the skin’s resource file, not the control’s. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of course, you can use your skin’s resource file to get localized strings and other data but this isn’t very convenient since you’ll have to add data to every resource file corresponding to each one of your skins. And I’m not going to talk about app_globalresources either! :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(If you don’t know that you can have resource files for your skins, yes, you can. You can have a skins/app_localresources folder and you can have .resx files there&amp;#160; and you can use the ResourceKey attribute in your DNN control tags to get localized data for your controls in your skins). &lt;/p&gt;  &lt;p&gt;Well, based on this excellent post &lt;a href=&quot;http://local.dotnetnuke.com/Resources/Forums/tabid/795/forumid/111/threadid/270758/scope/posts/threadpage/1/Default.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; about localizing embedded controls, I thought it would be good to summarize and simplify the process a bit. So here it goes:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can give an embedded user control its own resource file by following two different approaches:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. Make it inherit PortalModuleBase&lt;/p&gt;  &lt;p&gt;2. Specify the resource file yourself and make the control use it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Approach 1: Inheriting PortalModuleBase&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You just have to add:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;Inherits&lt;/span&gt;=&lt;span class=&quot;str&quot;&gt;&amp;quot;DotNetNuke.Entities.Modules.PortalModuleBase&amp;quot;&lt;/span&gt; &lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;in your control’s header. &lt;/p&gt;  &lt;p&gt;E.g. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;lt;%@ Control language=&lt;span class=&quot;str&quot;&gt;&amp;quot;vb&amp;quot;&lt;/span&gt; AutoEventWireup=&lt;span class=&quot;str&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; Explicit=&lt;span class=&quot;str&quot;&gt;&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Inherits&lt;/span&gt;=&lt;span class=&quot;str&quot;&gt;&amp;quot;DotNetNuke.Entities.Modules.PortalModuleBase&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Doing so will give you access to the LocalResourceFile property, which will in turn point to the .resx file located in the app_localresources folder right under your control’s location. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But what .resx file, exactly? Not the one you expected.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The resx file will NOT follow the file name of your user control, but the ID by which it is called. If your control’s filename is MyFooter.ascx, and you call it with an ID of “myFooterId” then your resource file must be named “myFooterId.ascx.resx”. &lt;/p&gt;  &lt;p&gt;Then, you can use code like this to get a localized value, for example, for the “Footer.Text” key:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;lt;%=DotNetNuke.Services.Localization.Localization.GetString(&lt;span class=&quot;str&quot;&gt;&amp;quot;Footer.Text&amp;quot;&lt;/span&gt;, LocalResourceFile)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;%&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Ugly, because you have to remember to always use the same ID and also because you can’t use two instances of your control in the same skin. Also, inheriting PortalModuleBase restricts your coding flexibility.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Approach 2: Forcing the user control to use a resource file&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you don’t want your user control to inherit PortalModuleBase but you still need it to have its own resource files, you can define a LocalResourceFile property yourself. This is written directly in the .ASCX file but, of course, you can put it in code-behind too. (sorry about the line breaks):&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;lt;script runat=&lt;span class=&quot;str&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;       &lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;Public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;ReadOnly&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Property&lt;/span&gt; LocalResourceFile &lt;span class=&quot;kwrd&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;String&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;kwrd&quot;&gt;Get&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;kwrd&quot;&gt;Return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Me&lt;/span&gt;.TemplateSourceDirectory &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;str&quot;&gt;&amp;quot;/&amp;quot;&lt;/span&gt; &amp;amp; _       &lt;br /&gt;DotNetNuke.Services.Localization.Localization.LocalResourceDirectory &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;str&quot;&gt;&amp;quot;/&amp;quot;&lt;/span&gt; &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.IO.Path.GetFileNameWithoutExtension(&lt;span class=&quot;kwrd&quot;&gt;me&lt;/span&gt;.AppRelativeVirtualPath)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Get&lt;/span&gt;       &lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Property&lt;/span&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;Public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Function&lt;/span&gt; GetLocalizedString ( _&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;&lt;font color=&quot;#666666&quot;&gt;ByVal&lt;/font&gt; &lt;/font&gt;key &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;) &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;kwrd&quot;&gt;Dim&lt;/span&gt; retVal &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;String&lt;/span&gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; retVal = _       &lt;br /&gt;DotNetNuke.Services.Localization.Localization.GetString( _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; key, LocalResourceFile)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; (retVal)       &lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;Function&lt;/span&gt;       &lt;br /&gt;&lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;What we did here was to create our own LocalResourceFile property. This tells the control to use a resource file that follows the file name of the control itself. So, if your control is named footer.ascx, your resource file will lie in app_localresources\footer.ascx.resx. If you need to specify a differently – named resource file, you just replace the GetFileNameWithoutExtension call with your own string. E.g. if you use “myownFooter” there, then there must be a myownFooter.ascx.resx file in the app_localresources folder.&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;In addition, we created a GetLocalizedString function which will just take the key and return the string from the resource file. &lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;We can use this function in our user control to get localized data as follows:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;lt;%=GetLocalizedString(&lt;span class=&quot;str&quot;&gt;&amp;quot;Footer.Text&amp;quot;&lt;/span&gt;)%&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;This is much simpler and much more flexible.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2010/11/using-resource-files-in-embedded-user.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-2199666248840363151</guid><pubDate>Wed, 03 Nov 2010 22:26:00 +0000</pubDate><atom:updated>2010-11-04T00:27:22.314+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>How to quickly switch your &amp;quot;localhost&amp;quot; binding to another dnn site</title><description>&lt;p&gt;Warning: This is for advanced users only. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The situation&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You&#39;ve got a development machine which has more than one DNN sites that you are currently working on.&lt;/li&gt;    &lt;li&gt;You&#39;re using host headers on those sites to have multiple root-level DNN sites. (And you know the terms &amp;quot;host header&amp;quot; and &amp;quot;binding&amp;quot;)&lt;/li&gt;    &lt;li&gt;You are using IIS7 or higher with Windows 7 or Windows 2008. (I suspect it may work on Vista too, but who&#39;s still got Vista? :) ).&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;(Don&#39;t continue reading if the above don&#39;t match your case. One of the most common reasons for the above scenario could be that there are root-level urls inside your DNN site, generated by custom modules or just hard-coded into skins / modules, so you have to make your development PC believe that this is a root-level site and not a virtual directory of your default web site. Or, even worse, if you&#39;re working on a copy of a site that&#39;s already online and there are links and other stuff pointing to the WHOLE domain, you may have to alter your hosts file to make your PC believe that your local site is running on the exact same domain. If you&#39;re dealing with DNN a lot, you&#39;ve probably seen that we don&#39;t live in a perfect world and such cases do exist.)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The problem&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You need to configure some modules on your installations, but the modules you have installed can run without limits only on &amp;quot;localhost&amp;quot;. Furthermore, some modules, (for example, IndooGrid) need you to buy a licence if you run them ANYWHERE else than localhost - even if it&#39;s a test / development machine. But you don&#39;t want to buy additional licences since you can do your development work on localhost.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What you need&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You need a way to quickly switch between what you see when you type &amp;quot;localhost&amp;quot; on your PC&#39;s browser, so that you can work on the site of your choice each time. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Of course, you can do it by altering your sites&#39; host headers in IIS but that wouldn&#39;t be quick. And, I won&#39;t say a word about using different virtual machines, each with one localhost site - I&#39;ve seen it happen. :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Let&#39;s suppose I&#39;ve got two sites, let&#39;s say Site1 and Site2. These listen to their respective host headers, let&#39;s say site1.mypc.local and site2.mypc.local. You have configured your Site1 to listen to &amp;quot;localhost&amp;quot;&amp;#160; too. Currently, when you type &amp;quot;localhost&amp;quot; on your browser you see Site1.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now, you either have configured your IIS to have an extra host header (*:80) for Site 1 or you have changed the location of your &amp;quot;default web site&amp;quot; to point to Site1&#39;s folder on your hard disk. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Do the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. STOP your default web site (if that&#39;s what you&#39;re using to do the trick). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;2. Go to all the sites that you need to implement the &amp;quot;switching&amp;quot; on, and add a portal alias for localhost so that they can respond to the call (if there is not one already). If you do so, an IISRESET would be good too, in order to avoid the dreaded &amp;quot;redirect loop&amp;quot; error that can happen from time to time.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;3. Create a batch file with the following and save it as changehost.bat (or any name you choose):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;@echo off&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;if &amp;quot;%1&amp;quot; == &amp;quot;site1&amp;quot; goto site1     &lt;br /&gt;if &amp;quot;%1&amp;quot; == &amp;quot;site2&amp;quot; goto site2      &lt;br /&gt;if &amp;quot;%1&amp;quot; == &amp;quot;&amp;quot; goto error&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;:site1     &lt;br /&gt;%windir%\System32\inetsrv\appcmd set site /site.name:site2 /-bindings.[protocol=&#39;http&#39;,bindingInformation=&#39;*:80:&#39;]      &lt;br /&gt;%windir%\System32\inetsrv\appcmd set site /site.name:site1 /+bindings.[protocol=&#39;http&#39;,bindingInformation=&#39;*:80:&#39;]      &lt;br /&gt;goto end&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;:site2     &lt;br /&gt; %windir%\System32\inetsrv\appcmd set site /site.name:site1 /-bindings.[protocol=&#39;http&#39;,bindingInformation=&#39;*:80:&#39;]      &lt;br /&gt; %windir%\System32\inetsrv\appcmd set site /site.name:site2 /+bindings.[protocol=&#39;http&#39;,bindingInformation=&#39;*:80:&#39;]      &lt;br /&gt;goto end&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;:error     &lt;br /&gt;@echo You have to provide a parameter!      &lt;br /&gt;&lt;/font&gt;&lt;font size=&quot;1&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;:end&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;(Sorry for the wrapping, each call to appcmd should be on a single line.)&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let&#39;s explain what this batch file does. You call it like this (make sure you have administrator rights):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;changehost site2&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And you expect to see your &amp;quot;site2&amp;quot; responding to localhost instead of &amp;quot;site1&amp;quot;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What the batch file does is go to the matching section of the batch code, following the IFs. When it gets there, it does two things:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;First, it uses appcmd.exe (an utility located in your windows directory\system32\inetsrv folder, which allows you to access several IIS properties from the command line) to add a binding to localhost (*:80) to the site you need and REMOVE this binding from any other of your sites that possibly has it. Essentially, it does what you would do by hand - go to iis, add a binding to the site of your choice, remove the binding from the previous site since you are not allowed to have two sites with the same host header.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The result is that you will always have one and only one site bound to localhost, and that you can change what site this is by just executing your batch file.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Some things to have in mind:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The parameter&#39;s values can be anything you want, as long as there is a section inside the batch file you can GOTO if you match a parameter value. I&#39;ve used the same names as the names of the sites in order to have some consistency, but this isn&#39;t needed. &amp;quot;Foo&amp;quot; and &amp;quot;Poo&amp;quot; would do the same job, as long as there was a &amp;quot;Foo&amp;quot; section for site1 and a &amp;quot;poo&amp;quot; section for site2.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The /site.name switch needs the actual site&#39;s name as it is declared in IIS. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You must FIRST remove any possible localhost bindings (/-bindings switch) and add the localhost binding (*:80) last (/+bindings switch), otherwise you&#39;ll get an error and the binding won&#39;t be added because it will exist on another site.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If a site does not have a localhost binding, you&#39;ll get a message that it can&#39;t be found, like this one: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;ERROR ( message:Cannot find requested collection element. )     &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Don&#39;t be alarmed, it&#39;s normal. Appcmd just tried to remove a non-existent binding, no problem. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you try to run this script twice for the same site, you&#39;ll also get an error like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;Cannot add duplicate collection entry of type &#39;binding&#39; with combined key attributes &#39;protocol,bindingInformation&#39; respectively set to &#39;http, *:80:&#39;. )&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This means that you tried to add a binding to *:80 to the site that already had it. That&#39;s perfectly normal, too, nothing to worry about, no changes will be made. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The example is for two sites, if you have three you&#39;ll have to adjust the number of sections, your IF statements and your appcmd calls accordingly. Remember, we&#39;re doing a simple thing: Attempting to remove localhost bindings from sites that may have it (only one will) and add a localhost binding to the site we want.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I hope this helps a bit. It worked for me, if anyone tries it, please let me know if you have succeeded. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Standard disclaimer / warning: Even if you are an advanced user, please use this information at your own risk. It&#39;s easy to mess things up (actually, the only thing you&#39;ll mess up is your bindings - you won&#39;t lose any data but it&#39;s enough to make your development sites unaccessible if you don&#39;t know what you&#39;re doing). I cannot be held responsible if any of the above information proves misleading or incorrect. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy localhosting! :)&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2010/11/how-to-quickly-switch-your-binding-to.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-5964452283273464695</guid><pubDate>Thu, 21 Oct 2010 21:29:00 +0000</pubDate><atom:updated>2010-10-22T00:34:57.379+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Troubleshooting</category><title>SupportedFeatures field, Search Indexer exceptions, oh my.</title><description>&lt;p&gt;I had one of my usual strange problems tonight. The search indexer on a DNN web site I created some months ago would not index the entire site. I got suspicious and checked the event log, where there were pages after pages of general exceptions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Most errors seemed to be something like: &lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;em&gt;&lt;font size=&quot;1&quot;&gt;System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey) at DotNetNuke.Services.Search.ModuleIndexer.GetModuleList(Int32 PortalID)         &lt;br /&gt;&lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Okay, this could not be the real error! I had to find the real cause.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;First try - cleaning the search index in case it&#39;s been corrupted&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The first thing I tried (and I advice you to do that before you try anything else) was to start with a clean search index, in case it was somehow corrupted. What you can do is the following (taken from &lt;a href=&quot;http://www.deutschnetnuke.de/AboutDotnetNuke/V3V4TippsTricks/Suchindexl%C3%B6schen/tabid/134/Default.aspx&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;If by accident the search index got corrupted, there will be no serach results displayed any further and you have to delete the search index tables manually. Follow these steps:&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;Login as Superuser (&amp;quot;host&amp;quot; by default)      &lt;br /&gt;In Host Menu select item &amp;quot;SQL&amp;quot;      &lt;br /&gt;Copy the following 4 lines and paste them into the text box:      &lt;br /&gt;truncate table {databaseOwner}{objectQualifier}SearchItemWordPosition      &lt;br /&gt;DELETE {databaseOwner}{objectQualifier}SearchItemWord      &lt;br /&gt;DELETE {databaseOwner}{objectQualifier}SearchWord      &lt;br /&gt;DELETE {databaseOwner}{objectQualifier}SearchItem      &lt;br /&gt;Activate the check box and hit Run      &lt;br /&gt;The search index will be rebuilt automatically by the scheduler.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(Although this is the right way, I&#39;ve found that a DELETE {databaseOwner}{objectQualifier}SearchItem will be sufficient. If you don&#39;t have a special db owner or a specific object qualifier, a DELETE from SearchItem will do the same job, either on your SQL Server Management Studio or your Host-SQL page).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Also, you don&#39;t have to wait for the scheduler. Go to host-search admin and rebuild the index yourself.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Second try - checking and correcting the SupportedFeatures field on the DesktopModules table&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, starting with a clean index didn&#39;t help, so I searched further. What I found surprised me. Let&#39;s see what &lt;a href=&quot;http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/118/threadid/151544/scope/posts/threadpage/2/Default.aspx&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt; says:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;It seems that the desktopmodules table has a supportedfeatures field that should be set to 0 or higher.&amp;#160; But sometimes when modules are installed they end up with a -1 so this causes the error.&amp;#160; Setting the fields to 0 when they are -1 fixes it, like so:&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;UPDATE [databasename].[dbo].[DesktopModules]     &lt;br /&gt;&amp;#160;&amp;#160; SET [SupportedFeatures] = 0      &lt;br /&gt; WHERE [SupportedFeatures] = -1&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;This is for SQL Server Express... don&#39;t know how it would work in the SQL page of DNN.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, I did a check on my own DesktopModules table. And suprise, surprise, two modules had a value of -1 for the SupportedFeatures field. As expected, these were the two modules that were generating the exceptions and blocked the indexer from indexing the whole site.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I did what the post said, and kaboom! Indexer worked perfectly, no more exceptions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What the SupportedFeatures field actually does&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What troubled me was what this field actually represents. I had values of 6, 7, 0 etc in other modules&#39; records. So I dug a bit further and found &lt;a href=&quot;http://web3.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/threadid/307511/scope/posts/Default.aspx&quot; target=&quot;_blank&quot;&gt;this post&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;This is a bit field where&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;2^0 = 1 indicates IPortable&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;2^1 = 2 indicates iSearchable&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;2^2 = 4 indicates iUpgradable&lt;/em&gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&lt;em&gt;add those values for&amp;#160; combinations (i.e. 7 = 1 +2+4 = IPortable,iSearchable and iUpgradable)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So this solved the mystery. Those two modules were installed in a wrong way and got an invalid value of -1 for their SupportedFeatures field, which in turn caused the exceptions when the Search Indexer ran.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Where and when can this happen?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My DNN site was version 5.2.2, but as far as I understand this thing can happen on various DNN versions, depending on the modules installed and how well the installation process is executed. I can&#39;t say that exceptions from the Search Indexer are always due to this particular problem, so use this proposed solution with extreme caution if it happens to you, and always have a database backup handy!&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2010/10/supportedfeatures-field-search-indexer.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-9174549577713034066</guid><pubDate>Sat, 03 Jul 2010 22:33:00 +0000</pubDate><atom:updated>2010-07-04T01:58:09.377+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Extending</category><title>(Not a) tutorial: Creating my first DNN scheduled task</title><description>&lt;p&gt;In this post, I’ll describe my (successful) attempt to create a basic email queue functionality using a custom DNN scheduled task.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Why not a tutorial? Because my intention is to show you what I have done, without telling you that this is the right (or the only) way to do it, or demonstrating this as a techically complete and correct solution. This work is far from finished – it just covers basic functionality and is not usable out of the box. But if you’re struggling with DNN scheduled tasks, reading below may provide you with a way to get started.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I found great help in &lt;a href=&quot;http://kemmis.info/blog/archive/2008/03/08/how-to-write-a-custom-dotnetnuke-schedulerclient-i.e.-a-scheduled.aspx&quot; target=&quot;_blank&quot;&gt;this excellent post here&lt;/a&gt;, which you should read for more information on creating your own scheduled tasks in DNN. Actually, this article here is a simple application of the tutorial I found in that post. Read it, it’ll be extremely helpful.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Let’s get to the point. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I had the need to notify custom groups of DNN registered users upon submission of some forms created either with the XMOD Pro or the Datasprings Dynamic Forms module. Although both modules support sending emails upon submission, they are restricted to sending emails to specific people, lists, or roles. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I needed something more complex, such as a database query based on several tables, in order to determine who would get the notification. Both modules allow issuing queries to the database upon submission, so it seemed right to create my own email queue, consisting of a database table (the queue) and a scheduled task to send the mails.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;What’s more, a queue can help where there is a bunch of emails to be sent – let’s say you need to send 1k emails upon the next form submission – you don’t have to send them all at once. You just send a dozen each time the scheduled task is ran, until the queue is empty.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Database objects&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So – what did I need first? Of course, a table to hold my queue.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: auto; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;TABLE&lt;/span&gt; [dbo].[DotSee_MailQueue]( &lt;br /&gt;    [MailID] [&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;] &lt;span style=&quot;color: #0000ff&quot;&gt;IDENTITY&lt;/span&gt;(1,1) &lt;span style=&quot;color: #0000ff&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [FromUser] [nvarchar](500) &lt;span style=&quot;color: #0000ff&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [ToUser] [nvarchar](500) &lt;span style=&quot;color: #0000ff&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [Subject] [nvarchar](500) &lt;span style=&quot;color: #0000ff&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NULL&lt;/span&gt;, &lt;br /&gt;    [BodyHtml] [nvarchar](&lt;span style=&quot;color: #0000ff&quot;&gt;max&lt;/span&gt;) &lt;span style=&quot;color: #0000ff&quot;&gt;NULL&lt;/span&gt;, &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;CONSTRAINT&lt;/span&gt; [PK_DotSee_MailQueue] &lt;span style=&quot;color: #0000ff&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;KEY&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;CLUSTERED&lt;/span&gt; &lt;br /&gt;( &lt;br /&gt;    [MailID] &lt;span style=&quot;color: #0000ff&quot;&gt;ASC&lt;/span&gt; &lt;br /&gt;)&lt;span style=&quot;color: #0000ff&quot;&gt;WITH&lt;/span&gt; (PAD_INDEX  = &lt;span style=&quot;color: #0000ff&quot;&gt;OFF&lt;/span&gt;, STATISTICS_NORECOMPUTE  = &lt;span style=&quot;color: #0000ff&quot;&gt;OFF&lt;/span&gt;, IGNORE_DUP_KEY = &lt;span style=&quot;color: #0000ff&quot;&gt;OFF&lt;/span&gt;, ALLOW_ROW_LOCKS  = &lt;span style=&quot;color: #0000ff&quot;&gt;ON&lt;/span&gt;, ALLOW_PAGE_LOCKS  = &lt;span style=&quot;color: #0000ff&quot;&gt;ON&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;FILLFACTOR&lt;/span&gt; = 80) &lt;span style=&quot;color: #0000ff&quot;&gt;ON&lt;/span&gt; [&lt;span style=&quot;color: #0000ff&quot;&gt;PRIMARY&lt;/span&gt;] &lt;br /&gt;) &lt;span style=&quot;color: #0000ff&quot;&gt;ON&lt;/span&gt; [&lt;span style=&quot;color: #0000ff&quot;&gt;PRIMARY&lt;/span&gt;] &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Yes, it’s a silly table but enough for my basic functionality: From, To, Subject, Body and an id. All the necessary information to send an email.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Then I needed a stored procedure to retrieve information from that table:&lt;/p&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: auto; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;PROCEDURE&lt;/span&gt; [dbo].[DotSee_GetMailQueueItems] &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;AS&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;SET&lt;/span&gt; NOCOUNT &lt;span style=&quot;color: #0000ff&quot;&gt;ON&lt;/span&gt;; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Select&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;top&lt;/span&gt; 10 [MailID],[FromUser],[ToUser],[Subject],[BodyHtml] &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; [dbo].[DotSee_MailQueue] &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;END&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Note: I prefix my tables with “DotSee_” since this is the name I have selected for my custom work (namespaces included, as you’ll see below). Don’t give it serious attention, it’s just my convention.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Setting up a project for my scheduled task&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;There are more than one ways to begin creating a scheduled job for DotNetNuke using Visual Studio, but there is a common denominator: Your job MUST be a DLL file in DotNetNuke’s bin directory. So you can go either with a Web Application Project or with a Class Library. I chose Class Library. Here’s what I did:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Created a new Class Library project. &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Added a reference to DotNetNuke.dll from an existing DNN installation (and set Copy Local to false) &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Added a reference to Microsoft.ApplicationBlocks.Data from the same DNN installation (in order to be able to use DNN’s own DAL for interacting with the database) &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Set the build path INSIDE DNN’s bin folder to save me time copying and recopying the dll. &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Went to the project’s properties and deleted the contents of the root namespace field. Yes, it should be empty for your dll to work. Don’t miss that. &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD7HRBDoAubeoW6NCMJGD3cselGygSmJ6kBuyCnW0y6z3a0gLv1xX8aDEINgtY7jKTMpz_p0C2r4iMgj1dv_SuFs9axn8vmM6MMYpoCdS2JxoP28tkyeofvBw7gpEy_O2uAGd5omd5cBs/s1600-h/sche1%5B6%5D.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;sche1&quot; border=&quot;0&quot; alt=&quot;sche1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqbnbfy_KzHq2MPp4uY1zVqBcweUrxjww87QOpQIpB_x2YnEV5c-nHE2iPG_ic9bbh7gPFgpiwNKLHmJtJ97ie8vPj5JbBltK1P0L4GvVQr6fuIi7m7vmqPRmTcnlcYfyvswlX31d7bjc/?imgmax=800&quot; width=&quot;420&quot; height=&quot;118&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Regarding (4), I did this work on a virtual machine, where I had a DNN installation and my class library project on the same computer. I suggest you follow some similar approach, since it is very easy to test and debug (you can debug only by attaching to the w3wp.exe process, but it’s better than nothing). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Writing the code&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Two more things you must know: Your custom class must inherit DotNetNuke.Services.Scheduling.SchedulerClient and the only method that is called by DNN’s scheduler is DoWork(). &lt;/p&gt;&lt;br /&gt;&lt;p&gt;So here’s my custom scheduler class:&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Imports&lt;/span&gt; DotNetNuke.Services.Scheduling &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Imports&lt;/span&gt; DotNetNuke.Services.Exceptions &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Imports&lt;/span&gt; System &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Imports&lt;/span&gt; System.Web &lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Imports&lt;/span&gt; System.IO &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;Namespace&lt;/span&gt; DotSee.DnnScheduledMailNotifier &lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Class&lt;/span&gt; Mailer &lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;Inherits&lt;/span&gt; SchedulerClient &lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #008000&quot;&gt;&#39; requires a special constructor which &lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: #008000&quot;&gt;&#39; accepts a ScheduleHistoryItem &lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Sub&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;New&lt;/span&gt;( _ &lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;ByVal&lt;/span&gt; objScheduleHistoryItem _ &lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;As&lt;/span&gt; ScheduleHistoryItem) &lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;MyBase&lt;/span&gt;.&lt;span style=&quot;color: #0000ff&quot;&gt;New&lt;/span&gt;() &lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;Me&lt;/span&gt;.ScheduleHistoryItem = objScheduleHistoryItem &lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Sub&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Overrides&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Sub&lt;/span&gt; DoWork() &lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;Try&lt;/span&gt; &lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;&#39; perform some tasks &lt;/span&gt;&lt;br /&gt;                MailWorker.DoWork() &lt;br /&gt;&lt;br /&gt;                &lt;span style=&quot;color: #008000&quot;&gt;&#39; report success to the scheduler framework &lt;/span&gt;&lt;br /&gt;                ScheduleHistoryItem.Succeeded = &lt;span style=&quot;color: #0000ff&quot;&gt;True&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;Catch&lt;/span&gt; ex &lt;span style=&quot;color: #0000ff&quot;&gt;As&lt;/span&gt; Exception &lt;br /&gt;&lt;br /&gt;                ScheduleHistoryItem.Succeeded = &lt;span style=&quot;color: #0000ff&quot;&gt;False&lt;/span&gt; &lt;br /&gt;                ScheduleHistoryItem.AddLogNote _ &lt;br /&gt;                    (&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;EXCEPTION&amp;quot;&lt;/span&gt; + ex.ToString()) &lt;br /&gt;                Errored(ex) &lt;br /&gt;                Exceptions.LogException(ex) &lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Try&lt;/span&gt; &lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Sub&lt;/span&gt; &lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Class&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Namespace&lt;/span&gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Apart from the MailWorker.DoWork() line (code coming right below), the class can be used as a template for writing your own scheduled tasks. (You will use your own namespace, of course). I put my specific code in a different class so that it would be easy to make the distinction between code needed for my specific need and the “template” code that every DNN scheduled task needs.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Here’s my MailWorker class (DotNetNuke.dll referenced was version 5.2.1, GetHostSettingsDictionary may not work with 4.x):&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;Imports DotNetNuke.Services.Mail&lt;br /&gt;Imports DotNetNuke&lt;br /&gt;Imports DotNetNuke.&lt;span style=&quot;color: #0000ff&quot;&gt;Data&lt;/span&gt;&lt;br /&gt;Imports DotNetNuke.Entities.&lt;span style=&quot;color: #0000ff&quot;&gt;Host&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Namespace DotSee.DnnScheduledMailNotifier&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Class&lt;/span&gt; MailWorker&lt;br /&gt;&lt;br /&gt;        Private Sub &lt;span style=&quot;color: #0000ff&quot;&gt;New&lt;/span&gt;()&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; Sub&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;Public&lt;/span&gt; Shared Sub DoWork()&lt;br /&gt;&lt;br /&gt;            Dim d &lt;span style=&quot;color: #0000ff&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Dictionary&lt;/span&gt;(&lt;span style=&quot;color: #0000ff&quot;&gt;Of&lt;/span&gt; String, String)&lt;br /&gt;            d = &lt;span style=&quot;color: #0000ff&quot;&gt;Host&lt;/span&gt;.GetHostSettingsDictionary()&lt;br /&gt;&lt;br /&gt;            Dim dnp &lt;span style=&quot;color: #0000ff&quot;&gt;As&lt;/span&gt; DataProvider&lt;br /&gt;            dnp = DataProvider.Instance&lt;br /&gt;            Dim dr &lt;span style=&quot;color: #0000ff&quot;&gt;As&lt;/span&gt; IDataReader&lt;br /&gt;&lt;br /&gt;            Dim ids &lt;span style=&quot;color: #0000ff&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;New&lt;/span&gt; List(&lt;span style=&quot;color: #0000ff&quot;&gt;Of&lt;/span&gt; Int32)&lt;br /&gt;&lt;br /&gt;            dr = dnp.ExecuteReader( _&lt;br /&gt;                &amp;quot;DotSee_GetMailQueueItems&amp;quot;, Nothing)&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;If&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Not&lt;/span&gt; dr.&lt;span style=&quot;color: #0000ff&quot;&gt;Read&lt;/span&gt;() &lt;span style=&quot;color: #0000ff&quot;&gt;Then&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Return&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;While&lt;/span&gt; dr.&lt;span style=&quot;color: #0000ff&quot;&gt;Read&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                Mail.SendMail( _&lt;br /&gt;                    dr(&amp;quot;fromuser&amp;quot;).ToString _&lt;br /&gt;                    , dr(&amp;quot;touser&amp;quot;).ToString _&lt;br /&gt;                    , &amp;quot;&amp;quot; _&lt;br /&gt;                    , dr(&amp;quot;subject&amp;quot;).ToString _&lt;br /&gt;                    , dr(&amp;quot;bodyhtml&amp;quot;).ToString _&lt;br /&gt;                    , &amp;quot;&amp;quot; _&lt;br /&gt;                    , &amp;quot;&amp;quot; _&lt;br /&gt;                    , d(&amp;quot;SMTPServer&amp;quot;) _&lt;br /&gt;                    , d(&amp;quot;SMTPAuthentication&amp;quot;) _&lt;br /&gt;                    , d(&amp;quot;SMTPUsername&amp;quot;) _&lt;br /&gt;                    , d(&amp;quot;SMTPPassword&amp;quot;) _&lt;br /&gt;                    )&lt;br /&gt;&lt;br /&gt;                ids.&lt;span style=&quot;color: #0000ff&quot;&gt;Add&lt;/span&gt;(CType(dr(&amp;quot;mailid&amp;quot;), Int32))&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;While&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Each&lt;/span&gt; id &lt;span style=&quot;color: #0000ff&quot;&gt;In&lt;/span&gt; ids&lt;br /&gt;                dnp.ExecuteSQL( _&lt;br /&gt;                    String.Format( _&lt;br /&gt;                        &amp;quot;&lt;span style=&quot;color: #0000ff&quot;&gt;DELETE&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; DotSee_MailQueue &lt;span style=&quot;color: #0000ff&quot;&gt;WHERE&lt;/span&gt; mailid={0}&amp;quot; _&lt;br /&gt;                        , id.ToString))&lt;br /&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; Sub&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;End&lt;/span&gt; Namespace&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;What it actually does (in a brutal way, I should add) is check the table, get 10 items at a time (via the DotSEe_GetMailQueueItems stored procedure defined earlier), send an email for each of the items and then delete the corresponding records from the table. (Ok, I know the way it does it sucks a bit, but It’s only quick and dirty functionality, remember).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So when I compile this beauty, my DotSee.DNNScheduledMailNotifier.dll goes inside DNN’s bin folder, and now what I have to do is tell DNN that this is a scheduled task and that the scheduler should include it. Here’s how:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Host-Schedule and click “Add Item to Schedule”.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set friendly name to whatever you want&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Full class name and assembly should be your assembly name and your class name (the class containing the DoWork method) combined, as in AssemblyName.Classname. My Assembly’s name is DotSee.DnnScheduledMailNotifier and my class name is Mailer, so the full name is DotSee.DnnScheduledMailNotifier.Mailer.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Check the “schedule enabled” checkbox&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Time lapse MUST have some value or else the task will not run at all.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEw4LGRiprh7-SZjEiQ_63ANc2_6F4qIznboNjaTHMfjFlkCzBou-Pc2pOgr98kgxXkJ-WAAUB40xFOhFGnC5HxZScYaYJXWdDbFz-LaKnqBXVFKPRGGbNN1dkObBu65lRffr_kFtxNtQ/s1600-h/sche2%5B4%5D.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;sche2&quot; border=&quot;0&quot; alt=&quot;sche2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO7jRMohWGSElFrVjE6Bf9GTyCl8hAFW2EnTdMjUkNuapNqMQZh5Bw-VDaZei-uO6gRUHy4OtULxwJNgHIyf43FtwP2LE36SwSa6lDqRK3aep9M2guok2FarO7g-MNCiFu8IRS0GGQKE8/?imgmax=800&quot; width=&quot;420&quot; height=&quot;261&quot; /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That’s it! The task is ready to run. I tested it by manually inserting records into the DotSee_MailQueue table and it worked well, even with hundreds of records, sending 10 emails every 5 seconds. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;So now I have my basic system ready. When I need to send emails to groups of people not defined by roles or other DNN constructs, I just have to write a good SQL query that fills the table with recipients that correspond to the criteria I need every time and presto!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Of course, there’s plenty of room for configuration / parameterization (for example, the number of emails sent each time or the type of email – html or plain text, or even a check for whether delivery was successful). But I guess you got the idea. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Thank you for your time.&lt;/p&gt;</description><link>http://dnnuke.blogspot.com/2010/07/not-tutorial-creating-my-first-dnn.html</link><author>noreply@blogger.com (Gyromyristis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqbnbfy_KzHq2MPp4uY1zVqBcweUrxjww87QOpQIpB_x2YnEV5c-nHE2iPG_ic9bbh7gPFgpiwNKLHmJtJ97ie8vPj5JbBltK1P0L4GvVQr6fuIi7m7vmqPRmTcnlcYfyvswlX31d7bjc/s72-c?imgmax=800" height="72" width="72"/><thr:total>11</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-3069686188434631856</guid><pubDate>Sat, 24 Apr 2010 15:12:00 +0000</pubDate><atom:updated>2010-04-24T23:06:37.884+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Modules</category><title>ModuleMaster, an admin module that was really missing from DNN</title><description>&lt;p&gt;&lt;a href=&quot;http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&amp;amp;PackageID=15592&quot;&gt;ModuleMaster&lt;/a&gt; is what I was looking for (and often considered developing myself). It can link modules – along with their settings – on the pages of your choice. Simple as that, but DNN doesn’t give you this option – you can either mark a module as “displayed in all pages”, in which case you only have linked modules to your original one – meaning that if you change something in one, it’ll change in every linked module, or copy the module by hand and then apply settings by hand (IPortable is not always well-implemented).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This module is a time-saver, especially for sites that have a number of pages already developed (and more especially if you’re using templates to create new pages). &lt;strike&gt;Imagine the scenario where the client asks you to apply a new text/html module, for example, in about 500 pages that you have already created, demanding to be able to edit each one of them independently of the others and needing to use a specific container. Count the DAYS it’ll take you to do it by hand&lt;/strike&gt;. EDIT: Unfortunately, as I realised later, the module just creates “shadow” copies – i.e., links and not new instances, but remains useful whatsoever.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If anybody tries it, please post a comment here. I haven’t tried it yet, but looks very promising and it already has a couple of good reviews on SnowCovered.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2010/04/modulemaster-admin-module-that-was.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-660094329033919889.post-6370741039593437400</guid><pubDate>Fri, 26 Mar 2010 11:39:00 +0000</pubDate><atom:updated>2010-03-26T13:39:19.192+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tweaking</category><title>Using page titles instead of names on the DNN breadcrumb skinobject</title><description>&lt;p&gt;Simple, but useful. A fellow developer needed to use the page title (and not the page name which is the default) on the breadcrumb skinobject of his skin. The reason was that his menu had limited real estate so he had to keep names short, but he needed to give more information on the navigation breadcrumb.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The solution is just so simple! In your skin’s .ascx file, you’ll see a definition like the following:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;lt;dnn:BREADCRUMB runat=&amp;quot;server&amp;quot; id=&amp;quot;dnnBREADCRUMB&amp;quot;&amp;#160; CssClass=&amp;quot;Breadcrumb&amp;quot; RootLevel=&amp;quot;0&amp;quot; Separator=&amp;quot;&amp;amp;nbsp;&amp;gt;&amp;amp;nbsp;&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;If you add the following attribute:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;UseTitle=&amp;quot;True&amp;quot;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;You’ll have something like this:&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;lt;dnn:BREADCRUMB runat=&amp;quot;server&amp;quot; id=&amp;quot;dnnBREADCRUMB&amp;quot;&amp;#160; CssClass=&amp;quot;Breadcrumb&amp;quot; RootLevel=&amp;quot;0&amp;quot; Separator=&amp;quot;&amp;amp;nbsp;&amp;gt;&amp;amp;nbsp;&amp;quot; UseTitle=&amp;quot;True&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;And then your breadcrumb will be using page titles instead of names. &lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;&amp;#160;&lt;/p&gt;  &lt;p align=&quot;left&quot;&gt;Enjoy.&lt;/p&gt;  </description><link>http://dnnuke.blogspot.com/2010/03/using-page-titles-instead-of-names-on.html</link><author>noreply@blogger.com (Gyromyristis)</author><thr:total>1</thr:total></item></channel></rss>