Tag Archives: DotNetNuke

DotNetNuke MVP Module Development: Tip #2 Disable AutoDataBind

In DotNetNuke MVP Module Development: Tip #1 The AutoDataBind Property I suggested to use AutoDatBind to automatically bind up the user control.  However, there are times when no binding should occur.  For example, when a Cancel button is clicked the view should not be bound.  AutoDataBind should be disabled when no model is need.

protected void cmdCancel_Click(object sender, EventArgs e)
        AutoDataBind = false;
    catch (Exception exc)
        Exceptions.ProcessModuleLoadException(this, exc);

Search and Replace – Text/HTML – DotNetNuke 5.5

I couldn’t get the Engage: F3 module to work with DotNetnuke 5.5 due to a known issue.  This issue will be fixed when Engage: F3 3.4 is released.  However, if you need a quick fix until then you can use this script based on the F3 module.

WARNING:  Backup your database before executing this script. The script may affect every item published by the Text/HTML module and you will want to have a backup in case you make a mistake. 

DECLARE @searchValue NVARCHAR(100)
DECLARE @replaceValue NVARCHAR(100)

SET @portalId = 0
SET @searchValue = '/website/'
SET @replaceValue = '/'

DECLARE @PublishedContent TABLE (ItemId int)
INSERT INTO @PublishedContent (ItemId)
SELECT ht.ItemId
FROM [HtmlText] ht
WHERE ht.IsPublished = 1 
  AND ht.LastModifiedOnDate = (SELECT MAX(LastModifiedOnDate) FROM [HtmlText] WHERE ModuleID = ht.ModuleID AND IsPublished = 1)
UPDATE [HtmlText]
SET Content = REPLACE(CAST(ht.Content AS NVARCHAR(MAX)), @searchValue, @replaceValue)
FROM [HtmlText] ht 
 JOIN @PublishedContent pc ON (ht.ItemID = pc.ItemId)
 JOIN [vw_Modules] m ON (m.ModuleID = ht.ModuleID)
 JOIN [vw_Tabs] t ON (t.TabID = m.TabID)
 JOIN [vw_Portals] p ON (p.PortalID = t.PortalID)
WHERE ht.Content COLLATE SQL_Latin1_General_CP1_CS_AS LIKE '%' + REPLACE(REPLACE(@searchValue, '\', '\\'), '%', '\%') + '%' ESCAPE '\'
  AND (@portalId IS NULL OR m.PortalID = @portalId)

AthleticHost.com will be using DotNetNuke

athletichost_logo_143    DotNetNuke-Logo

I have been working on site for Timberline High School Athletics for the last four years.  The site has become an important tool for the athletic department and used by the parents and student athletes to get news and information about the schools sports programs.

Through my experience with Timberline I have discovered that many high school athletic programs do not have a website or have a very poor website that is not well maintained.   I have been working over the past several months to create a hosting service that will provide websites for high school athletic programs.  The websites will be designed to be easily maintained by athletic directors, coaches, and team parents. 

AthleticHost.com will be using DotNetNuke (DNN) as the core platform for these sites.  DNN was chosen for the following reasons:

  • The ability to have many websites (a.k.a. portals) on a single DNN installation.
  • Site templates will allow for new sites to be quickly created.
  • Built in hosting model that includes security and payment features.
  • Skinning system that allows each portal to have its own look-and-feel.   This is important because many niche web hosts sites all look the same.  I want each school to have it’s own look-and-feel.
  • A security model that will allow separate security configurations for the athletic director, coaches, and team parents.
  • A good set of core modules.

Hosting at AthleticHost.com will be available May 1, 2010.

DotNetNuke 5 and the Map Module Error

I have been exploring the changes to DotNetNuke 5 and noticed that the Map module does not work in 5.0. When you go to edit the settings the following error occurs.

Method not found: 'Void DotNetNuke.Services.Exceptions.Exceptions.Process
ModuleLoadException(System.String, DotNetNuke.Entities.Modules.PortalModuleBase, System.Exception, Boolean)'.

I downloaded the Map Module source and found that all that was needed was to recompile the module for DNN 5.0.0.

Download DotNetNuke.Map_v1.0.9_ForDNN5.zip