All Articles

Articles

The Trouble with Transparent GIFs

For one of my clients, I needed to take their logo, shrink it down and place it against a dark brown background... easy enough it seemed. Since their main logo was dark in color, I had them send me a light colored version. It was an Adobo Illustrator file with a transparent background and I thought, "great, I'll just shrink it down as a gif with a transparent background and voila!".

But it was not to be... no matter what I did, the logo came out jagged and the text was unreadable... I talk to a Graphic Designer friend and he mentions anti-aliasing so I do my research and all becomes clear...

In order for an image to be anti-aliased, it needs to have a background color in order to blend it together with the other colors for the smoothing effect. With transparent GIFs, that can't happen as the software doesn't have a background color to blend.

And that's why most designers don't use transparent gifs much, they just don't look as good as a properly anti-aliased image... if you know the background color for the image, it's best to set that as the background in your image editing program and resize the image with that background.

Seems like opacity should be able to help out here... still more to learn...
Read More...

Image paths and skins

Something I've learned several times and have subsequently forgotten several times is that skinpath only works when your image does not specify runat="server".

When creating a skin, you often want to include images. This can be a bit tricky as DNN's friendly URLs makes it so that your path may be very different for the same page, i.e. www.efficionconsulting.com/default.aspx is the same as http://www.efficionconsulting.com/Home/tabid/1/Default.aspx. This means that most relative paths just won't work, i.e. /images/spacer.gif, image/spacer.gif, ... You can use more hard coded paths such as ~/Portals/0/_default/efficion/images/spacer.gif but that really limits flexibility as if you want to install the same skin as a site specific skin on a different DNN instance.

SkinPath is a great new feature where DNN will figure it out for you. Though I don't know why it won't work when runat="server is used"... Scott Wilhite has a nice write-up on this in this post.
Read More...
DotNetNuke, Blog

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...

Read More...
DotNetNuke, Blog

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.

Read More...
DotNetNuke, Blog

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.

DotNetNuke, Blog

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, 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.

Read More...
DotNetNuke, Blog

DotNetNuke ECommerce Review: eTailer by Emerald Solutions

Updated: December 2, 2008

eTailer from Emerald Solutions is a fairly new entry in the DNN e-commerce world. While there is a great deal of promise in the product, my brief attempt at using it seems to indicate it's not ready yet...

Purchasing, downloading, and installing it went smoothly. eTailer adds a reasonable 5 modules to your DNN install (much better than the 23+ modules Catalook adds). Initially getting things setup and going seemed quite intuitive.  I created a new page and added the "eTailer Store Front module". It had a nice obvious link that allowed me to Add/Modify Products. And so I was off and running, or so I thought...

UPDATE: The developer recently notified he was going to step away from DNN development for 6 months. To me, this means you need to stay clear of this product as there's no guaratee it will continue to be improved or supported.

Read More...
DotNetNuke, Blog

Protect Email Addresses from Spambots

One thing I think it's important to do is to protect my clients from spam. Clients like to be able to put their email address on their sites. But, putting an unprotected email address on a site can soon result in a lot of spam as spambots search sites looking for email addresses to add to their lists, often referred to as "harvesting". There are multiple ways to prevent this...

Read More...
Blog

Fix "Remember Me" feature of the DotNetNuke Login

When the "Remember Me" feature of the DotNetNuke Login is enabled an encrypted authentication cookie is placed on the user's machine. By default, the web.config has a setting which causes to cookie to expire after one hour, which makes it almost useless.  However, the expiration of the cookie can be tweaked by editing a line in the web.config.

Read More...
DotNetNuke, Blog

Programmatically determining the site's Fully Qualified URL and Path in DotNetNuke

There are hundreds of different functions and variables available through DotNetNuke, ASP.NET, and HTTP which can give you a variety of variations on your sites URL. I often find myself needing one variation or another as I'm building one application or another. The problem is, I have yet to find a clean and consistent way to get at the site's root or fully qualified URL regardless of whether the site is in a virtual directory (i.e. http://www.efficionconsulting.com or, for sites with virtual directories http://www.efficionconsulting.com/dotnetnuke). For DotNetNuke, I'm now using the following...

 

Read More...
DotNetNuke, Blog

DotNetNuke: Enable Human Friendly Urls

 DotNetNuke 4.8 added Human Friendly urls, but unlike Friendly URLs, it can only be enabled through the web.config. To enable human friendly urls, replace:

<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" />

with:

<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly" />

UPDATE: In DNN 7.x, DNN incorporated the URL Master functionality for much improved URLs. To enable this, you should now use "advanced" rather than human friendly.
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="advanced" />

NOTE: Keep in mind though that no 301 Redirects for existing URLs are created so if you implement this for a site that has been around for awhile, you should make sure to manually create 301 Redirects or set up Canonical URLs for all existing pages to make sure to not dillute your link juice.

DotNetNuke, Blog

DotNetNuke and IIS7 Integrated Pipeline Vs. Classic Mode

When I first started trying to install DNN on a local Vista installation I had various strange errors that I eventually determined to be due to the fact that I was running my IIS7 App Pool in Integrated Pipeline mode instead of Classic (IIS 6). And so, from that I learned DNN can't run in Integrated Pipeline more.

Today, I discovered that DotNetNuke can run in integrated pipeline mode as long as you're running DNN version 4.8 or greater. Charles Nurse discusses this in this blog.

DotNetNuke, Blog

DotNetNuke and MySQL

A question that I see a lot of is, "Can DotNetNuke run on top of MySQL?" The short answer: while It is possible, it is a terrible idea. The same answer is also true for Oracle. But that doesn't mean you can't write DotNetNuke modules that consume data from MySQL, Oracle, or any external data source.

The Long Answer

While DNN does provide a data abstraction layer so that it can, in theory, be run on top of any modern DBMS, the reality is DNN is a very large and complicated system that relies heavily on SQL Server specific Stored Procedures. The SQL used for DotNetNuke is chock full of Stored Procedures. The Stored Procedures improve the performance and security of the system.

A few intrepid souls have attempted to create and maintain MySQL providers but, with the availability of cheap hosting and free versions of SQL Server, there simply isn't enough need for that in order to make it worthwhile and those providers are long out of date.

Even if someone does manage get the latest version of DNN's core running against MySQL, it's still a bad idea because you would lose the key thing that makes DNN special, Modules. You would need to ensure that every module you ever want to use has a MySQL provider and that that provider would continue to be updated throughout the life of the module. Or, you would have to create a MySQL provider for every module that you want to use. The cost of doing this would far exceed the cost of using a hosting company that would provide you a shared SQL Server on which you can run DNN.

But don't lose hope...
Read More...
DotNetNuke, Blog

DotNetNuke: Hiding and Showing Checkbox with asp.net and Javascript

As I build out the settings for DotNetNuke modules, I only like to display settings that are relevant to the other selections the user has made. The best way to do this is with Javascript so users don't have to wait for a postback everytime they change a relevant control.

In trying to put these things in place, I often find the code often doesn't work quite the way I expect (or at least used to expect) it to. The issue usually has to do with the way asp.net renders controls. I usually find I have to dig into the source view a bit to see exactly how asp.net rendered something and then fiddle a bit to get everything working right.

Here, I'll describe, one particular case where I had two checkboxes linked. The 2nd checkbox should only be displayed when the first checkbox is checked...

Read More...
DotNetNuke, Blog

DotNetNuke: Custom Module Permissions

One of the under-utilized features in the DotNetNuke module development API is the ability to utilize DotNetNuke's built in Permissions architecture within your own custom modules.

Rather than having to write your own code to display a grid of available roles and special permissions, it's fairly easy to add your permissions to the existing permissions grid that usually just displays "View" and "Edit".

I found a nice article that gives a very good overview on how to do this
Extending DotNetNuke Module Permissions for Custom Modules

DotNetNuke, Blog

DotNetNuke: Improving Paste From Word in the fckEditor

As most HTML aware folks know that when you paste content from Microsoft Word or Outlook for use as HTML, it includes all sorts of gobbledygook that clutters up your markup and overrides your CSS. Luckily, the fckEditor has a couple ways to handle this. If you're pasting from Word into the editor using IE, it pops up a dialog that gives you a chance to clean up the markup which is nice. If you're using Firefox you can achieve the same results by clicking on the special Paste from Word icon. But, there's an issue...

Read More...
DotNetNuke, Blog

Cleaning and Re-Indexing your DotNetNuke Search Tables

Last week, we put a lot of effort into improvements to the search and RSS aspects of Efficion's Articles module. As part of that, we noticed that no matter how many times you hit the Re-Index content link on the Host->Search Admin page, the links never actually get updated. As we dug further, it became clear that to update the links used by DNN's search and RSS, you actually have to purge the search tables.

This has implications beyond our module so I thought I'd share the steps as a good practice to do every once in awhile on your DNN site to make sure you Search Results and RSS Feeds are linking properly.

Read More...
Blog

SQL Function to Parse First Name from Full Name

Ever needed to get a users first name out of a SQL table or field where only the full name was collected? We've create a SQL Function that does a pretty good job of this.

This is partially based on a script provided by JosephStyons in this thread on Stack Overflow. Joseph's script parses the name into Title, First, Middle, and Last. For my purposes, I only needed the first name and so was able to simplify the script and breaking it out into a function makes it easy for us to reuse in a variety of places. Read More...
DotNetNuke, Blog

DotNetNuke: Improving the tracking and reporting of Ad Views and Clicks - Part I

Adding the time dimension

This is the first in what we plan on being a 3 part series on improving the tracking and reporting of Ad viewership and clickthroughs within DNN.

Overall, DotNetNuke'sBanner / Ad / Vendor implementation is a nice solution. It does a great job of serving up the appropriate ads based on a nice variety of options. But there's been very little change to the implementation over the last few years and we've found some areas of needed improvement. Efficion is hoping to contribute new features and improvements to these modules based on work we've done to bring it up to the next level.

One of the biggest weaknesses we found was it's reporting capabilities. It's easy enough for us to create reports for our clients (we'll be covering that in Part II of this series) but in this case, we didn't have the data we needed.

Our client wanted to be able to provided statistics on the views and clicks of their ads for a given time period (i.e. September 2010). The problem is, DNN only stores the total number of clicks and views for a given ad. There's no associated time period with those numbers.

So, we need to start storing clicks and views in a way that is time oriented. After some thought on this we decided that we should really accumulate the numbers on daily basis for each ad. Daily seems to be the standard in the analytics world and provides enough granularity to get the time frame you want while also not collecting data at too granular a level.

Daily totals will make it easy to create reports that show totals for a given period or to create trend charts for a particular ad or all ads over a given time period.

Read More...
Page 1 of 2First   Previous   [1]  2  Next   Last   
An error has occurred. Error: Unable to Bind article on the Article Details page.
An error has occurred. Error: Unable to Bind article on the Article Details page.