Video on the website the easy way

As recently bloged, I've put up a personal family blog. The idea was to easily share pictures and news to family, friends and acquaintances.

For taking pictures we have a Kodak DX6490. This camera also takes some decent (for being a still picture camera) video, and I've long been thinking about finding out an easy way to share these ones online as well. We could of course just put the created .mov files to download, but the filesize is pretty huge and not everybody has the quicktime player.

I have been playing with video in flash before, so I already had the Riva FLV Encoder installed. However I was looking for an easier solution than having to open the Flash IDE, import the flv file and create a new swf file for each video. So I started looking around for a FLV player. It was pretty hard to find one that was both good and free. But in the end I found this one (at the time of writing the site seems to be down).

So now I could create a simple cfm page that gives the name of the flv to the flv player from a url variable. And using the excelent fckeditor textfield replacement, it's a piece of cake to create links that create a popup link to the cfm file with the wanted url variable.

To see how it looks go here (at the time of writing this page is not 100% finished).

BlogCFC, MySQL and Aura - some issues to be aware of

I wanted to set up a personal family blog using BlogCFC by Raymond Camden (same as this blog is running). Here's a couple of issues I ran across.

MySQL:

I'm using a MySQL version 4.0.12 and when trying to run the mysql.sql script I got errors. What I needed to do to get it working was to change all ocuranses of the following code:

ENGINE=MyISAM DEFAULT CHARSET=utf8;

to:

TYPE=MyISAM;

Mapping:

The family site is located on the same server as this site, so the mapping to org was already in use. What I did was rename the new org folder to orgtwo, in cf administration create a mapping to orgtwo, and adjust the code in client/Application.cfm acordingly (line 30, 33 and 35).

I know that version 3.5 added support for multiple blogs and users per dsn, but this blog (waterswing) is running an older version (I've messed around with it a bit so I've not bothered to update), and at any rate I wanted the two to be completly independed of eachother.

Renaming:

I thought I was done, but my new blog showed up with the content from this (waterswing) blog. I found out that I needed to change the blogname in the Application.cfm file (line 20). I changed it from "Default" to "ulseth". Then I needed to do the same change in the blog.ini file (line 1)

Aura:

I had earlier a self made blog running on our family site some time ago. That blog used the Aura skin, and I wanted to recreate the look from that one as I liked it pretty much. So I headed over to Joe Rineharts site, and downloaded the "Aura for BlogCFC" distro he has put together.

Unfortuneatly it did not work right out of the box. I suspect this has to do with it being made for an earlier version of BlogCFC. Oh wait - going back to Joe's site and looking at the comments I'm not the first one to experience problems. I decided to go with the solution sugested by Chevy:

In Joes version of layout.cfm I changed all:

/#application.root#/

to

../

I then used DW's find and replace function to get rid of all cfsetting tags in the blog code. However this did not work out for me, and also this solution left a bad taste in my mouth. Deleting all the cfsetting tags felt wrong.

So I replaced all the files I had stripped of the cfsetting tag back to their original state. Then I did what I should have done in the first place. I compared the Joes layout.cfm file with Rays, to see if I could make a modernized version of Joes code to make it work with the latest version of BlogCFC. I wont bother to go into the details, but you can download and study the file.

What's next:

I will now change the graphics and css to make the Aura template look like my old blog. Then I'm going to implement FCKeditor (see previous blog posts about that here). And at last I will implement Joes Photoblogger*. If I run into some issues I think others might find usefull I'll blog about these as well.

Well deserved credits:

A big thanks to Ray for the BlogCFC, and to Joe for the Aura template and Photoblogger*.

* Photoblogger is not yet released, as Joe is waiting for the permision to redistribute a piece of code he uses in it.

Applying FCKeditor to BlogCFC

I've added the FCKeditor HTML editor to the admin area of my BlogCFC installment. Here's the quick and dirty way how to do it:

  1. Go to fckeditor.net and follow the link to download the latest version (2.0 RC3 as I'm writing).
  2. Unzip it into your local blog directory, and rename the unzipped directory to "fckeditor" (initially its called "FCKeditor_2.0rc3").
  3. In the blog/editor.cfm file, around line 192, do the following replacement:
<textarea name="body" rows="17" cols="50">#htmlEditFormat(form.body)#</textarea>

replaced by:

<cfscript>
fckEditor = createObject("component", "fckeditor/fckeditor");
fckEditor.instanceName="body"; fckEditor.basePath="/blog/fckeditor/"; fckEditor.value="#form.body#"; fckEditor.width="450"; fckEditor.height="300"; fckEditor.toolbarSet="Blogadmin"; fckEditor.create(); // create instance now.
</cfscript>

That's it!!!

However you might want to edit what options you have on the toolbar. Here's an example.

In the fckeditor directory open up the fckconfig.js file. Here you’ll see that there’s two toolbar sets already defined. “Default” and “Basic”. Below them I added the following:

FCKConfig.ToolbarSets["Blogadmin"] = [
['Source','Bold','Italic','-','FontSize','TextColor','-','Link','Unlink'],
['OrderedList','UnorderedList','-','Outdent','Indent','-','Image','Smiley','SpecialChar']
] ;

Then in the blog/editor.cfm I changed to:

fckEditor.toolbarSet="Blogadmin";

This whole message was written in the FCKeditor field - should be prof enough that it works

Edit: I found out when I posted this post that some of the code in the code views was a bit "messed up". it was easy to come back and edit it, but something to be aware of.

Edit 2: After coming back and "cleaning" the code views I notice that many of the quotation marks in the code have become italiced and bolded. Seems like some changes to BlogCFC's way of handling/transforming code should be fine tuned a bit when using FCKeditor.

Edit 3: To correct the above problem I came back, marked the code in the code views as italic and bold, and then back to normal again.

Edit 4: I corrected the code above by removing the htmlEditFormat() function. Also, thanks to Jared, we've discovered that there's a bug in FCKeditor preventing copy/paste in Firefox. By clearing and disabling the cashe in Firefox I was able to make it work though. Read more at: https://sourceforge.net/forum/forum.php?thread_id=1241793&forum_id=379487

Waterswing blog is now opened

This blog will mainly cover two areas.

The first area will be web development (ColdFusion, CSS, JavaScript, etc.).

The second area will be information about Waterswing services (server status, upcoming upgrades, email administration tips, etc.).

In adition to this I will also post links to blog posts, articles, tools and other relevant/interesting resources I stumble across. First to keep as handy bookmarks for my self (oh the ego), and second, if I find it usefull or interesting, you might to.

Occationally I might just rant as well...