Thursday, March 06, 2008

FCKeditor ASP html encoding problem solved

I am working on a website project for a client which I need to incorporate 4 FCKeditor instances on the same page all generated html codes post into access database. All just doing well as after a little bit of hacking the html code posted into the database as expected and display on web page just perfect.

But then another problem arisen, the html code that stored in database didn't retrieved back into FCKeditor correctly when client tried to do content update. Consequently, the data posted back into database gets mass up. After did quite a bit of search on the net, I found out a hint from forum where a post described the same problem I am having. On that post a person replied that in order for the html code the be translated correctly those html code need to be save as string variable after retrieve from database before post into FCKeditor. So the following is what I did to get the job done.

sContent = rstbl.Fields.Item("overview").Value
'//!!!!!! after var been declared data stored in var will be treated as STRING !!!!//
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "/FCKeditor/"
oFCKeditor.Value = sContent
oFCKeditor.Width = 540
oFCKeditor.Height = 300
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Create "txtprdoverview"

** I know this post is not Ubuntu Linux related but this is just a place where I keep a record.

Monday, February 18, 2008

DVD-RAM read/write in Ubuntu

Following the Howto instructions found in this link

use mkudffs to format DVD-RAM.

Initially I am having problem format DVD-RAM disk after reading through the HOWTO it turns out was a user right issue.

I did a

"sudo chmod 777 /dev/pktcdvd/0"

then I can run

"mkudffs --media-type=dvdram /dev/pktcdvd/0"

without any error messages.

The rest is just follow Howto to mount the DVD-RAM disk.

Saturday, January 26, 2008

Receive Ubuntu local delieved mail

I am working on a script which is monitoring my software raid-1 raid array and sent event mail to local mail system.

By default, Ubuntu Gutsy dose not have local mail delivery system(message transfer agent "MTA") installed. The best way is to install mutt then all the dependents( exim4.....) for MTA will be installed as well.

After mutt installed, I configured Evolution to receive local mail.
In Evolution use user name as username@localhost and chose 'standard Unix mbox spool directory' as server type.

For testing, use mutt to send a testing mail then use Evolution to fetch the mail.