By Torsten Weggen on 2/3/2012 9:47 AM

formpatternI am now in the situation to convert the DNN FAQs module to DNN 6. The first thing to do is to implement the new form pattern from DNN 6. I looked around in the internet to find some resources which help with that and found a video from Ian Robertson in the DNN Wiki and some blog posts but no document where everything is documented together . So I decided to put that information together in a blog post

By Torsten Weggen on 6/23/2011 9:25 PM

Today I released my first project on CodePlex: http://bbimagehandler.codeplex.com

The BBImageHandler for DotNetNuke and ASP.NET gives users and module programmers the opportunity to use a handler that displays resized images, adds watermarks to images, creates thumbnails of web pages or displays images stored in a database table without storing them to harddisk. Additionally it could be used to create a counter display.

By Torsten Weggen on 10/26/2010 8:02 PM

webpage thumbOften it is a good thing to visualize a link to something with a thumb of the page you linked to. Imagine you have a link-module where you sample interesting links to, let’s say … pizza services. You want to add a screenshot of their homepage to help your visitors to identify the pizza service they are looking for. But adding all these thumbs manually is something you don’t wish your hardest enemy has to do. So, how can we accomplish this automatically ? I’ll show you in a second…

By Torsten Weggen on 10/18/2010 9:33 AM

Sending emails in dotnetnuke is very simple with the one hit method Mail.SendMail(…) living in the DotNetNuke.Services.Mail namespace. But if you need more options like integrating images in the mail or handling HTML-, Text parts and attachments you need the direct Mail stuff from the .NET Framework.

By Torsten Weggen on 10/16/2010 11:43 AM

When you create a module not only for you and for one special portal, you have to decide how to accomplish the multiple design demands your customers have. You can create a fixed design and deal with a lot of classes, so the user can do all the styling with CSS. But in my opinion, this is often not flexible enough. The most flexible solution is in my eyes working with templates and token replace. With this technique you can give your users the widest possible range of possibilities for arranging all the stuff they need in the design they want.

Think of a RSS module where you can style the display of  the news. On one page you want only the headline and date, on another page you need the full text, the date under the text and the headline above… You will never be able to realize all possible combinations with settings like “Show title under text” or “Don’t show headline”…

By Torsten Weggen on 10/15/2010 9:30 AM

If you want to hide the complete module for some circumstances (e.g. if not logged in as admin) you can use

protected void Page_PreRender(object sender, System.EventArgs e)
{
	this.ContainerControl.Visible = false;
}
By Torsten Weggen on 10/14/2010 2:42 PM

Sometimes you need to change the title of your container, perhaps because you show a special product and want to have the product name as title or something like that. Another reason is localization of module titles…

By Torsten Weggen on 10/14/2010 1:30 PM

Showing code is a very fundamental thing for a blogger writing about developing code. I like blogs with syntax highlighted code and there are a lot plugins for windows live writer outside which show code formatted well. But if you ever want to copy some of this code to clipboard for your own usage, you have to strip out html-tags, blank lines and all this format staff. This blog post is about how to do it in a better way:

using System;
using System.Collections.Generic;
using System.Text;

namespace CSharp
{
	public class Class1
	{
		public static void Main(string[] args)
		{
		}
	}
}
By Torsten Weggen on 5/17/2010 2:37 PM

intlflagsIf you want to create your modules for an international audience you must be aware of maintaining different languages. This is no problem for static content because DNN has his concept of resource files, which is very easy to handle. But when it comes to dynamic data like product information in an ecommerce module, you have to handle this in the database. This is no problem at all but which is the best way of entering these different language information in your edit-control ?

Follow me now to see how I deal with this…