News Articles

Articles from 2009

Google AJAX Search in my DNN Site

A good search is a prevalent theme in all of the websites I implement. Google has set the bar high in terms of expectations for what search can do. The core search in DotNetNuke doesn’t come close. So as the phrase goes “if you can’t beat ‘em, join ‘em.”

Previously, I have written about how you can use the core search in DNN to integrate with a Google Custom Search engine API. If you’re interested in this approach, check out my blog post on integrating DNN search with the Google Site Search. This approach is nice, but it also is a little clunky to setup and the results launch in a new window. My new favorite way to use Google in a DNN site is to utilize the AJAX search feature provided by Google.

Have you ever typed “site:www.patrickrenner.com” into Google? It allows you to simply search a single site using the indexing of Google. The AJAX search basically does the same thing. It takes the URL you wish to search and appends your search parameters on to the request to Google.

To make this happen in DNN, there are three things you’ll need to do.

  1. Insert an input into your skin. This will act as the search input for your site. The values included in the input will be the values past to the search query.
  2. Include an empty <div> in which you wish to place the results of your search.
  3. Add the JavaScript to your skin which allows for the input, the results div, and Google to all cooperate.

Instead of spelling out the code, I’ve included a text file for you to download to reuse this code for your site. Download the example code here. Feel free to inspect my site as well to see the code in action.

DotNetNuke 5 User’s Guide Reviews

This week has been exciting, aside from the lame mid-summer head cold I’m suffering, because of a few positive reviews of the book I wrote with Chris Hammond. The reviews have been right in line with the goals we had for the book – simple, focused, “Get Your Websites Up and Running.”

Joe Brinkman reviewed the book and reiterated our goals with one of the first topic sentences of his review. “This book is very clear in that it is targeted specifically at DotNetNuke Administrators and it does a very good job of staying focused on the topic.”

One of the common tests Chris and I used as we wrote our book was, “would your mom understand this?” Put aside all “your momma” jokes and don’t take it as an attack on moms or women. The biggest eye opener I had in working with DNN, and prompted me to want to write this book, was when I worked to overhaul my mom’s website – imagethreads.com. As I worked through her site, I realized how three-letter abbreviations, jargon, and technology I take for granted on a daily basis, can be significant barriers to doing something easy like maintaining a blog.

Will Strohl also gave our book some lip service this week and is putting our work to the test by encouraging his girlfriend to read DotNetNuke 5: A User’s Guide. I’m anxious to hear the outcome because if someone new to DNN can follow the book, I’ll consider it a success (just need sales to fall into line).

Speaking at St. Louis Day of .NET

I received an email today confirming that one of my topics was selected for the St. Louis Day of .NET conference.

The topic I will be presenting on is a topic for which I am passionate. Passionate seems a little overkill and strange, but let me give you the long story. The web is very prevalent in our lives. Websites are becoming more-and-more user friendly, and user experience design is important to this progress. Elegant designs, intuitive navigation, attractive, usable websites should not be something limited to web designers. In order for a website to achieve its goals, the handoff from web designer to content owner needs to happen. Websites are only as good as their content. The design helps to make the content stick.

So… using DNN should be easy for content managers – the source of content. Web administrators should feel confident in handing off content management responsibilities. This isn’t always the case. I wince coming back six months later to some of the websites we implemented at Engage.

Okay, okay, so what’s my topic?

Maintaining Design Integrity in a CMS with Smart Implementation Techniques

Abstract: Handing off a website to content managers can often be scary for website developers. The users of content management systems are notorious for killing elegant designs. This presentation will review a number of techniques available in DotNetNuke to keep your website looking good while still distributing content management responsibilities. Topics for this presentation include: locking down the rich text editor, skin and container development techniques to prescribe design, and the importance of training your customers on the basics of web site management.

Sincere Customer Service

I don’t want to turn this blog post into preaching about what makes good customer service, but I do want to make a “shout out” to Josephotography. Joe, shot our wedding photos almost two years ago, but just yesterday we received a CD in the mail with a movie he put together with our photos. Sure, I may have laid down a guilt-trip when we saw him two weeks ago at our friend’s wedding, but his follow through still deserves recognition for great customer service. He didn’t owe us anything. We were already very happy and he had our vote of approval (and recommendations), but he still took the time to do something thoughtful for us.

This movie is a case study in modern-day archiving. A month ago I was in Minnesota sorting through my Grandma’s house as she prepares to move from her house. There was a treasure of sentimental items. Most of her artifacts are wrapped in tissue paper or bubble wrap. But what do you do with a flash movie of your wedding pictures? In the age of digital everything, we need to come up with new ways to store/archive sentimental items. I guess my bubble wrap and tissue paper is a blog which is primarily read by me.

[FLASH MOVIE TO BE INCORPORATED SOON]

Optimizing the FCKEditor for DNN

The FCKEditor in DNN allows for rich text editing, and as a WYSIWYG tool, it does a great job. A recurring goal for many of my DotNetNuke customers is to distribute content administrative rights to a broad audience. This is a realistic goal, and the FCKEditor helps to provide content administrators the tools to create and edit content without detailed knowledge of HTML.

fg5 - Toolbar

Here’s my beef… The default toolbar set for the FCKEditor in DNN really give the content editors a lot of ways to kill the elegance of a well thought-out design. The top offenders are (in no particular order):

  • Style list fg5.7-style
  • Insert Smiley fg5.6-smiley
  • Font Colorfg5.7-fontcolor
  • Font fg5.7-font
  • Background Color fg5.7-bgcolor

There are some configuration options available to anyone with file system access that I would recommend to any implementation of DNN. (Quick note: if you have multiple portals within an instance of DNN the changes you make will affect all portals.)

Clean Up the Toolbar

The default DNN toolbar gives the basic content administrator too many options. Most of the functions in the toolbar shouldn’t be used and clutter the users experience. In my opinion, we should only provide users the tools we want them to use. Personally, I hate the idea of someone applying inline styles or non-semantic markup to the site. Its too hard to account for (dummy proof) in the style sheets.

Solution: create a streamlined toolbar by modifying the fckconfig.xml file. Technically, you should create a custom toolbar and then apply permissions to this new toolbar. I don’t find any real benefit to doing it the “correct way.” In most cases I don’t provide a different set of tools to different users. Is is possible? Yes, but for most of the cases one toolbar is suffice. So I typically just modify the DNNDefault toolbarset.

How: Locate the fckconfig.js file in the website files for DNN. This file is located at [root]\Providers\HtmlEditorProviders\Fck\Custom. Within this file, there is a section that defines the functions available in the Toolbars (search for Toolbarsets). It looks a little something like this:

FCKConfig.ToolbarSets["DNNDefault"] = [
	['Source','Preview','-','Templates'],
	['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
	['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
	['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
	['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
	['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
	['Link','Unlink','Anchor'],
	['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
	['Style','FontFormat'],['FontName','FontSize'],
	['TextColor','BGColor'],
	['FitWindow','ShowBlocks','-','About']
] ;

You can easily see that the items listed in the Toolbar are easily mapped to features of the FCKEditor. By trimming this down to only the bare essentials and maybe even rearranging the features to be more intuitive, the FCKEditor can make content administration a breeze for your editors and you as the administrator can sleep easy at night knowing Smileys won't be showing up on your content.

To see my prefered toolbar in action download my preferred version of the DNNDefault toolbar (a txt file to allow you to paste into your fckconfig.js).

Use Only the Style List and Clean it Up

From a training standpoint the Style and Format lists are hard to differentiate. To a basic content administrator it is a list of ways to change the text. In reality the Format list applies different semantic markup options to the text and the Style list applies a mix of markup tags and inline styles. If you’re like me, giving users the ability to apply inline styles really gets your goat.

Solution: give the end user only one list to pick from and be very prescriptive about the options available to pick. To do this, you’ll want to clean up the list of styles offered by the FCK Editor

How: There are two steps to cleaning up the styles list. First, we need to get rid of “Red Title.” Why would anyone use this? Gross. To get rid of “Red Title” we need to delete a few lines of code from the file we were already editing for the toolbar (fckconfig.js)

FCKConfig.CustomStyles =
{
	'Red Title'	: { Element : 'h3', Styles : { 'color' : 'Red' } }
};

Just kill this code completely. Next, we’ll create a list of styles we do want to include for users to apply different styles to the content. Since we removed the Format list from the toolbar, we can incorporate the standard headings and any other semantic markup into the list of styles and remove the elements that produce inline styles. To edit the styles list, locate the file titled fckstyles.xml. This file is located here: [root]\Providers\HtmlEditorProviders\Fck\FCKeditor.

My approach is to typically comment out the section titled “Inline Styles” and then enable the “Block Styles.” I also like to move the paragraph to the top of the list. Click here for example of my fckstyles.xml file.

Obviously, there is a lot of personal preference to how content administrators should manage the content on your site. I like to be prescriptive and shepherd my content editors toward semantic markup. If you have other suggestions, let me know.

Integrating DNN Search with Google Site Search

It's no secret that DotNetNuke's core search leaves a lot to be desired. When implementing DNN sites or any site for that matter, search is typically a top requirement. To be perfectly honest, I have conveniently tried to leave off search functions from design comps or implementation plans because I dread the discussion that much (my conscience typically gets the better of me and we find a solution).

For more info on how the core search works check out this blog entry on DNN core search by Chris Hammond.

Well, I have found a solution that I'm pretty happy with and can confidently recommend as an implementation approach for DotNetNuke implementations - integrate a Google Site Search account with the core DNN skin object.

How is it done?

First, the core search token has a lesser known attribute UseWebForSite that allows you to integrate the core search token with your unique identifier with Google Site Search.

Setup Steps

  1. Create a custom search engine with Google Site Search. With the Site Search created, go to the Advanced section of the Control Panel for your custom search and grab the unique identifier (in a section titled “Advanced presentation using the Custom Search Element”)
  2. Add the search token to your skin and define UseWebForSite as “True” (see below). You can either do this through your HTML skin’s accompanying XML file or directly in the ASCX.
  3. Modify the resource file for the core search. You can reference the file directly from the file system (\admin\Skins\App_LocalResources), but it is better to go in through the Language Editor as a site administrator and modifying the Search.ascx.resx for just your portal (in case you have multiple sites in your instance of DNN).
  4. There is a field titled URL.Text. In this field, you can modify the existing URL to include the unique identifier for your custom search. The default uses the DNN project ID and should be something like: http://www.google.com/custom?hl=en&client=pub-9770992166002654&sitesearch=[DOMAIN]&q=[TEXT]

One thing to note is that I ran into some issues with the default URL in the resx file. So instead of modifying the existing URL, I went into my custom search engine home (with Google) and tested the search there. Then I took the URL created by Google and replace the search input with [TEXT]. This accomplishes the same result. Example: http://www.google.com/cse?cx=005560045880849113066:aqsy2ovgo00&ie=UTF-8&q=test&sa=Search and replaced q=test with q=[TEXT]

Other Notes

  • The search launches the results in a separate window and some browsers will block this as a pop-up.
  • The results can be styled using the Control Panel (Look & Feel) in Google Custom Search
  • The results you get are the results Google indexes. So if you don’t like your Google results, you won’t like your Google Custom Search results.

Embedding SWF in HTML

We don't develop Flash at Engage, but we do implement it a lot in websites we develop. As a result, I am frequently hunting down the best way to implement flash in DNN.

I had an example of the HTML saved on my desktop because I was referencing it so frequently, but I realized that's a good way to get set in old ways. I'm creating this blog post as a repository for references I use to find the latest in embedding Flash (swf) in HTML.

First, is the <swfobject> project. The swfobject project maintains a small javascript file used to detect flash and embeds the Flash file (swf).

The second resource is a generator for the HTML using the swfobject.

If you know of better, easier, more effective, fool-proof, ways - let me know. For now this is the way I follow.

Stubbing out Site Navigation

I came across jumpchart.com the other day. The site explains how important it is to clearly articulate the proposed site map or information architecture for sites you're developing.

As a project manager, I'm all for process and looking for better ways to communicate the scope and ideas for a project; but seeing this site made me appreciate the value of a content management system like DNN.

Stubbing Out Pages in DotNetNuke

The ability to easily add pages to your site map, move them as sub pages and re-order your page structure is all out-of-the-box functionality in DNN. There's no need for a stubbed in page structure because the cost of misplacing or incorrectly organizing pages can be easily remedied with a few clicks of the mouse.

My New Flip

I purchased a Flip Ultra last week and received it in the mail yesterday. I thought I'd give it a test spin by video taping something that wasn't camera shy - Sunny.

Really, I wanted to see just how easy it is to get the videos off the camera, on to the web, and into my blog or an email to a friend.

The verdict is... easy.

I had to create a YouTube account to post videos, but since I didn't want to be a full exhibitionist, I was able to keep the video Private and share it with up to 25 people. I was easily have to embed the code into my blog post, and now Sunny is a star.

If you know of better video sharing/hosting services, I'd be open to other options. Let me know if you have a recommendation.

UPDATE: It turns out that I needed to make the video Public on Youtube to allow for it to be viewed through my blog post. I guess that's okay, but I guess I'd like to find something that isn't quite as exposed if I post videos. Something that allows me to post, store, share, and embed, but not necessarily full exposure to the wider world web.

Does Having a Blog make this Hypocritical?

I laughed, I cried, I seriously doubted myself. I'm still holding out against Twitter and seriously reconsidering Facebook.

Peaberry Coffee

I fell in love with the coffee I have been drinking this week. Its Trader Joe's Peaberry blend coffee. My coffee palate has either been refined by the vast quantities of coffee I have been drinking recently or by an adverse reaction to the dishwater we've been brewing at work recently. My body may be telling me to pay attention to the coffee I pour down my throat as a result of the rancid brew we make at work (think Orson Well's description in 1984).

Cowboy coffee

Anyways, I got curious about what made my coffee so good. Here's what I learned about peaberry coffee. Peaberry coffee is the result of a coffee bean only producing a single bean. The single bean is smaller and rounder than the typical bean. There are mixed reviews in the coffee world on peaberry grades of coffee. Some think the single bean received all the love and attention a normally double bean would receive. Others think the peaberry is a runt. I don't care either way. The coffee brewed today from the peaberry blend of beans was delicious.

One more reason for me to like the peaberry coffee blend. There is a mythology that goes along with the bean. It is referred to as the bachelor bean and has insinuations of being a virile coffee.

I want to say the peaberry blend we bought was Ethiopian, but I can't say for certain.

Today's Learning - FATA and Logoff

One of my career mission statements is to learn something every day. One of the reasons I started this blog is to supplement my faulty memory by giving me a place to document things I pickup, observe, and muse about on a semi-irregular basis.

I figure, why not make an effort to document some of the small learnings from each day in my blog. At the very least it will help me to retain these learnings. Maybe someone else will learn from me. Most likely, I'll come back to these posts because a month later I'll blank on something I know I should know.

Today, I have two take-aways that are totally unrelated.

1. FATA  is different than Fatah. Wow, this really helps me sort things out. I never realized FATA was a separate entity from Fatah.

An really FATA is not an entity. Its an acronym (Federally Administered Tribal Areas). An article on Morning Edition helped clarify this for me today. FATA is basically out of the Pakistani government's control. The area borders Afghanistan and is home to the Pashtun people.

Fatah is a Palestinian political faction of the Palestinian Liberation Organization (PLO). Without going through all details of the Palestinian-Israeli conflict I guess I'll just list out the keywords for future recall - Fatah's adversary is Hamas (to be black and white), Yasser Arafat, West Bank. This doesn't do the depth and complexity of the Palestinian-Israeli conflict, but that's not the point of my learning today.

2. Not really a learning, but more of a different way to thing about things. When login is constrained to a small number of users I typically recommend removing the Login skin object fron the skin in DNN and just use ?ctl=login. Today, I learned about using the login skin object in the Control Panel. By adding the following code to the control panels user control you can incorporate the logoff link in the control panel.

<%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.ControlPanels.IconBar" CodeFile="IconBar.ascx.vb" >

Additionally, you'll need to add the skin object for login to the user control after registering the control with the Control Panel. So include the following in your markup.

<dnn:login runat="server" id="dnnLOGIN">

Another way to do this would be to include the login control in the skin but surround it with code to make the control only visible to specific user roles (Registered Users orin the case below Administrators). Again the control will need to be registered in your skin files.

<%if (DotNetNuke.Security.PortalSecurity.IsInRole(DotNetNuke.Common.Globals.GetPortalSettings().AdministratorRoleName)){%>
<dnn:login runat="server" id="dnnLOGIN">
<% } %>

Finally, you can use the boring ?ctl=logoff, but that wouldn't be as much fun.

Showing Your Hand

I'm an open book most of the time. I speak candidly. I am brutally honest. I am a terrible poker player because I have no poker face.

I like to think of it as honest. But when is it not appropriate to show your hand? To continue with the poker analogy, my tendancy is to show my hand before the flop. I probably prematurely take a stance, give my opinion, and offer up advice. When can you get away with having an opinion but not voicing it? I feel like as a rule, having an opinion and voicing it will get your further than keeping to yourself, but when do you harm yourself by offering up your two cents too soon or too frequently?

React, Respond, Initiate

I would contribute the control freak in me to a strong ego. I'm neither ashamed nor proud of this connection. My ego has motivated me to do work in which I'm proud, but wouldn't it be nice to think I did these things purely altruistically? Wouldn't it be nice to think I take an interest in things because I'm genuinely interested and not interested in having my way?

The answer is yes, but I'd be fooling myself to think my drive, direction, and motivation on a day-to-day basis is driven by some innate sense of enlightenment. There are glimmers of passion mixed in, but at its core is most likely control.

So back to the title of this entry - React, Respond, Initiate. There is a post by Seth which I find myself thinking about a bit frequently. The thesis revolves around the thought,

When you react to a medication, that's a bad thing. When you respond to treatment, that's a plus.

Responding is better than reacting, but above both is initiating. Yesterday, Dang launched Engage's new look website. I love the initiative he took to consolidate our two sites, merge the business units (our services and our products), and totally consolidate the site structure. The design is beautiful and the execution is fantastic.

As I look at the site, I'm tempted to react and try to put in my two cents. Sure, there are things that can be improved, but this is the gear that keeps business moving. It would be easy to immediate use these as a way to inject input. But by doing this and trying to control things I would lose the real feat in front of me. Why would I dwell on these issues at all when I should be rejoicing in Dang's initiative?

His initiative took vision, courage, and execution. My reaction took nothing. That's my take away. On a daily basis, find more opportunities to take pause before I react and let the controller in me lead. Acknowledge the feats of others before I look for my way into the mix.

Commercial Investigations, Inc.

I received a call today from Ken Burns, from the Offices of Commercial Investigation.

Apparently, I owe $1,311.97 to Century Restoration, but if I "make some soft of good faith effort" I can avoid "legal action that can adversely affect my credit."

Does this sound like a call you received? I think this is the first time I recognize openly a scam. I know I've been scammed before, and I have even been dubbed out of $20 by a guy saying he needed money for a tow truck to move his car, but this is the first time I legitimately encountered one of the scams you watch on Dateline or 20/20.

In looking at Commercial Investigation's website, I feel a little sick to my stomach because of how obvious they're going to take you for a ride. The sick part is that it probably works.

Remember the old warning from your parents "don't take candy from strangers?" Their site and this phone call reeks of stranger's candy. They collect card information if you're inclined to pay your "debts" or make "good faith efforts" promptly.

The most comical part is Commercial Investigation's letter the Better Business Bureau. In the letter there are a number of great lines, but here are some of my favorites.

It [the collections industry] is one of those overlooked and arcane topics, like Maritime Law—the Law of the Sea—a highly complex yet under-researched area warranting more careful analysis than most journalists have time for.

This is claiming the "article" by the BBB was journalistic in nature and out of touch because they are just writing editorials on how business should be done. Since they don't know the industry, their "article" is like a travel writer's article on a foreign country.

Another gem...

The reality of our economy is that the collections industry plays a necessary role. No one company should be held accountable for being in an industry overlooked by the media and by the disinterested public. Law firms have a bad reputation when they are regarded as “ambulance chasers” or tax lawyers or collection lawyers. They still have a job to do.

Scamming people is up there with protecting laws, justice and equality. The true injustice is the lack of passion people have for scamming old grandmas.

More information on these schmucks from the Better Business Bureau's Alerts.

Since there's not really much I can do to combat these jerks, I wanted to post to inform anyone else who may recieve a call from Ken or someone from Commercial Investigations. On the side, I wanted to say SCREW YOU to all the jerks out there willing to participate in scams like this.

Starbust

This next observation is by in no means unique or novel, its primarily personal.

I have read reports and heard NPR stories about the woes of Starbucks. In St. Louis, Starbucks is (or already has) closed 16 stores.

In a leaked internal memo from Charles Schultz, Schultz recognizes

Stores no longer have the soul of the past and reflect a chain of stores vs. the warm feeling of a neighborhood store.

To a Starbucks outsider, it almost seems comical to me that they didn't see this coming. Of the three Starbucks within two miles of my house, each is a drive through.

I am not going to pretend I don't ever find myself rapping off "Grande, non-fat, vanilla Americano." I drink Coffee. I purposely kept that sentence short, because when it comes down to it, if warm water passes through ground coffee bean, I'll drink it. Greasy-spoon diner coffee pot sitting out for the past 8 hours - I'll drink it. But occasionally, a pretentious cup of coffee really hits the spot.

This mood altering cup of coffee is the experience Starbucks should have been going for - not the drive though, hand held status symbols that will become as short-lived a trend as carrying your toy dog in a Louis V bag.

The instigating moment happened today for me. At the Starbucks (with drive through) I noticed they're offering "The Perfect Oatmeal." When the women before me in line ordered it the "barista" reached under the counter and grabbed a packet of oatmeal, dumped it into a paper bowl, and added hot water. This feels more like a Salad Tosser, than the perfect bowl of warm you to the soul oatmeal. All the intangible elements to a coffee shop (smelling like the burlap sack the beans came in, sipping coffee out of a stained cup, and relaxing for hours with a book) have been stripped from Starbuck and replaced by packet oatmeal, perfectly measured drinks, and drive-thru lines.

Don't even get me started about a Cashier wearing the earpiece and taking two orders at once (on in the ear piece and one in person with me).