DotNetNuke, ASP.NET, Web Development Blog

Quick review of DotNetNuke ECommerce stores

We've been doing a lot of DotNetNuke based E-Commerce projects lately. The projects we've done have really spanned a variety of store types (wine, audio files, church stuff, an automated shutoff system, resistors, printing products, and more), client types (wineries, churches, incentive programs, manufactures, master distributors) and feature requirements. So far, for all the DotNetNuke based E-Commerce sites we've built, we've used Catalook.

Catalook has a huge number of features, an immense number of configuration options, and is probably the worst implemented piece of software I've ever used. But it works. At times, though, I think it would be faster if I had just built the E-Commerce pieces of each of the sites from scratch.


DotNetNuke- Code Tokens

Quick tips for getting more from your skin.

Here's a compilation of tips and tricks for getting at more than just <%= SkinPath %> in your DNN skin.

To show the name of the Portal:
<%= PortalSettings.PortalName %>

To get the current portal's home directory (i.e. /portals/0 ) you would use:
<%= PortalSettings.HomeDirectory %>


DotNetNuke: Getting fckEditor to use your site styles when editing

You may have noticed that when you edit text in DotNetNuke, what you see in the editor window may not look like what you see when you save your changes. This is because the fckEditor applies a different stylesheet in the editor window instead of any of the actual site css files. To change this, all you need to do is edit the web.config file for the site and set the proper value for the StaticCSSFile variable in the FckHtmlEditorProvider section.

So search your web.config for StaticCSSFile. And update it to point to your desired css file (e.g.  StaticCSSFile="~/Portals/0/Skins/MySkin/skin.css"). Save your changes and you should now see the proper styles when you edit content.

I initially tried making changes to the EditorAreaCSS variable in the fckconfig.js file as this is the standard place to make fckeditor changes but that proved to be a dead end. Not sure why the DNN folks implemented this in the web.config instead.

DotnetNuke: Requiring Unique Passwords

DotNetNuke has a nice way to require unique passwords for all users. You can't simply go into the web.config, search for RequireUniqueEmail="False" and set it to RequireUniqueEmail="True". The problem is if there are already users with duplicate email addresses, bad things happen (It's been awhile since I've tried it and I don't remember specifically what happens but I know it wasn't handled well).

So, you need a way to remove the duplicate email addresses before you make the web.config change. This SQL will take care of it.


Adding PayPal button to DotNetNuke

Don't get duped into buying a module just to add a PayPal button to your DotNetNuke website. Paypal will actually generate the code/HTML you need for you and then you can just paste that text into the Source view of a Text/HTML module.

Here's some sample code that you can modify with your own information:

But, if you log in to your PayPal account, there's a section where they will generate this code for you with a variety of options.

When you Dynamically Load a Control, you must explicitly set the LocalResourceFile

This is something I've learned and forgotten at least 4 times. Writing these types of things here helps me remember and seem to help quite a few other people as well. So...

Usually in DotNetNuke, if you want to associate a resource file with your control, you just create a resource file with the same name as the ascx file plus the .resx extension and place it in your App_LocalResources directory. DotNetNuke and/or ASP.NET auto-magically associates the file with your code and it just works.

However, every time that I create a control that dynamically loads other controls, I spend 30 minutes looking at names and file placement and... trying to figure out why the resource file doesn't seem to be loading. Eventually, it comes to me, for dynamically loaded files, you must explicitly set the LocalResource file.

To do this add the following line to your PageLoad function in your dynamically loaded control:

 LocalResourceFile = DotNetNuke.Services.Localization.Localization.GetResourceFile(this, "controlfilename.ascx");

To learn more about DNN Module Localization, check out the DotNetNuke Module Localization Guide.

DotNetnuke: Is user an admin / administrator

DotNetNuke makes it easy to determine if the currently logged in user is an administrator (aka admin) or any other role for that matter. All you need to do is call the following: PortalSecurity.IsInRole("Administrators") or PortalSecurity.IsInRole("MyRoleName"). This function should return the boolean value very quickly as everything it needs is already in memory. You can call this from either the code behind or the ascx file (e.g. Visible='<%#PortalSecurity.IsInRole("Administrators")%>').

This can be very useful for determining whether or not to show a control or content meant only for the right groups eyes.

Is your DotNetNuke site running slow

A common performance issue in some versions of DotNetNuke

Is your DotNetNuke site running ridiculously slowly and consuming massive amounts of your processor? It might be stuck in a bit of a catch 22... The scheduler is trying to clear the ScheduleHistory table, but it can't because the ScheduleHistory table is too full.


Website Audio Options with MP3 files

This page will describe options for playing and/or allowing downloading of audio from a website. Ultimately, I think the best answer is a specific combination of the options below: -use flash for streaming, provide a link for downloading, if a feed, provide a link to the rss feed (aka Podcast).


Custom Toolbars in the FCKEditor Provider for DNN

When it comes to the toolbars for Rich Text Editors for clients to use to update there own sites, it is my firm belief that less is more. By default, the toolbars seem to be cluttered with endless options that rarely get used and in the end just make it harder to find the options users do need.

The FCKEditor Provider for DotNetNuke is great overall and exposes almost everything you need to set it up just they way you want it, including setting up different custom toolbars for different types of users (determined by role). But I haven't found much clear and concise documentation for adding your own custom toolbars. Here is how I do it...

Page 4 of 5First   Previous   1  2  3  [4]  5  Next   Last