How to format code blocks in DotNetNuke 6

Sep 26

Written by: Goran Siric
9/26/2011 12:21 PM  RssIcon

Well, this is blog about development. Right? So in my posts I need to write some code, so I started to google how to format code blocks in DNN 6. There is a good article about that and you can find it here: Formatting Code Blocks in DotNetNuke 6

Article is pretty straightforward:

You need to log to site as SuperAdmin  and start HTML Editor Manager from the Host menu.  Then you need to select Toolbar configuration tab.  You will get displayed XML file with configuration of the Editor toolbar. In the  sections you need to add following XML to get FormatCodeBlock toolbar available in the toolbar of  the HTML Editor:

<tool name="FormatCodeBlock"/>
 

Here begins the Nightmare. I tried to start HTML Editor Manager and  have displayed nice red rectangle with message inside: "Object reference not set to instance of object", or something like that. What to do now ? I am new to DNN. How to found reason of this error ? First what I tried is to change web.config section to allow remote users to see errors. That isn't helped. Same rectangle again. After some research I found that I can see all errors using Admin->Event Viewer.  In error logs I found following error:

DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled Error Adding Module to ContentPane ---> System.UnauthorizedAccessException
Access to the path '...\html\Portals\0\Users\001' is denied.

Why is there access denied ? I remember then. I have installed DNN on GoDaddy servers. GoDaddy does not allow that DNN be installed at root.  I followed some articles and moved  DNN to root folder. Because GoDaddy doesn't allow to set permissions on the root folder and because all subfolders inherit permissions from the root, they all have only read permission enabled.

After I changed permissions to read/write on this folder  HTML Editor Manager was finally started. Then I changed ToolbarConfiguraton and clicked Update.  Loading animation was displayed and nothing happened for few minutes.

I realized that there again must be some problem with permissions. After some research (again) I found that location of toolbar configuration file is "/DesktopModules/Admin/RadEditorProvider/ToolsFile/ToolsFile.xml". After changing perrmissions to read/write on folder DesktopModules everything is working fine.

As you can see, now  I can format some text as code blocks:

if (something_was_wrong)
{
   //maybe you need to read documentation first
}
else
{
   //code not reachable
}



Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

Search Blog

If you found this useful,
you can buy me a coffe :)

By me a coffe through PayPal :)

Featured articles

Android "DataEntry ListView" Design Pattern

Have you realized the importance of ListView control in developing android applications ?

GIMP script for creating Android icons at once

Script for creating Android icons for different screen resolutions at once. Icons can be saved using standard Android icons naming conventions and saved in appropriate folders.

Creating Android button with image and text using relative layout

Source code with examples how to use relative layout to create nice buttons with text and images in Android

Android application and the Internet

Tutorial about connecting to the web pages on the Internet from Android application, using both POST and GET web requests.

Recent Entries

Comments about Parking SMS Scheduler
Comments about cities and parking zones
Android "DataEntry ListView" Design Pattern
Android application and the Internet
Keep my DNN site alive
Android default icons

Recent Comments

Re: Creating Android button with image and text using relative layout
Thank you! This is very useful!!
Re: GIMP script for creating Android icons at once
sorry for writing in English I am French but I vien to find thanks to google finally information on the subject that I currently work thank you for sharing good information thanks to you I will advance 'll see you soon I'll follow you to the next and I recommend reading your blog friendly
Great Info.
Great information you got here. I've been reading about this topic for one week now for my papers in school and thank God I found it here in your blog. I had a great time reading this.
Re: GIMP script for creating Android icons at once
Thank you for supporting me :)
Re: GIMP script for creating Android icons at once
Thank you so much! Have donated some money to you so you can buy yourself a good beer.
You deserve it!