By Lee Sykes
October 2008
In this tutorial we demonstrate how to alert content administrators when adding incorrect HTML content to a DotNetNuke portal.
Alert styles is a new concept we have been working on for ensuring that the content administrators of a DotNetNuke portal add content using good practices.
For instance, we do not want the content administrators to paste text directly from a word document as this will add junk HTML into the source code. We also do not wish them to style the text using font tags, for instance to change the colour of the text or to change the font of the text, the content administrators should be using classes to style the text that have been defined in the skin.css file.
So, the solution is to inform the administrators not to use these techniques when adding content into the Text / HTML module through the use of alert styles. These alerts styles are added to the skin.css file, so when a user pastes some text from word or uses font tags, it will place a red box around the text that is using a bad practice and if the user is using the Firefox browser it will also add a message to the page informing them not to add text in this manner.
The content administrator should then realise something is wrong with the content they have added and find a solution to the problem, ie. Remove the font tags.
Tutorial References
Lazy Days Skin
Video 1 - How to Alert Administrators When Adding Incorrect HTML Content
- Introduction
- The concept of alert styles
- Bad practices for adding text into the FCK Editor, using font tags
- How NOT to style text within the FCK Editor
- How to create alert styles in the skin.css file
- How to add styling for the font tags using the .Normal class
- How to add a red border around any html elements that use a font tag
- How to add alert information text into the content for any html elements that use font tags
Time Length: 9min 49secs