RedCouch Linux Live CD distro

Just wanted to let you know, thatredcouch we wrapped CouchDb into Live CD linux distro, you can get it from http://skitsanos.com/content/linux-bits.aspx You will see there is a link to RedCouch. Had no time to document it yet, but basically it's all automated there, just login into a shell when you run RedCouch with root/redcouch credentials. By default it binds to 127.0.0.1, so all you need is to remove this default binding if you want to have access to it on other IPs. You can use 'mc' (midnight commander) for faster access to config files.

SiteAdmin CMS Pages rendering updates

There are days when there is a silence around, when it seems there nothing to expect from nowhere, but there are moments when out of nowhere something big and noisy comes, TADA! New Pages rendering engine updates got out! Today there are three major updates that can flip your content management and the way you doing things. We kept CMS UI simple as possible with adding maximum things that can do great job for you and today it’s about what else Pages engine can render.

Feeds

Feed Import and linking is back. You can import content into your HTML type page withing CMS from RSS feed you provide. This feature been disabled at some point in SiteAdmin V5 due some technical issues and now we've got it back. Content management never been that easy! You type the URL of the feed, click “Preview” to see it’s content, see if you like it, if you do, hit “Import Feed” button and you will see this feed content within your HTML editor as if you typed whole thing yourself.

Hey, one more thing was brought back: using RSS feeds as page content. You can run portal pages or whole sites just out of somebody's RSS feeds, they will maintain your content ;) All you need to do is just to specify URL of the feed as your content source.

Wiki

Oh, that’s something new. It's official now, SiteAdmin CMS got support for WIKI syntax, you can see sample page at http://skitsanos.com/content/wiki-syntax-support.aspx and it's wiki source via http://skitsanos.com/content/wiki-syntax-support.aspx?mode=plain

Following is the tiny cheat-sheet about what’s supported in WIKI type of Pages:

So now when you click on “Create Page” you have at least four options to choose from:

  1. Create HTML Page (that’s what you had for a long time)
  2. Create Page with WIKI markup
  3. Import RSS Feed to a HTML Page
  4. Use RSS feed as your page.

What’s next?

Maybe custom markup?

Well, we wanted to keep quiet about it, but hey, why not mention one more exciting thing we are working on – runtime widget rendering. Within couple of month there was some research work going on on ASP.NET and, surprise, PHP platforms to see if we can have some sort of custom markup, let’s call it (widgets markup language for the moment - wiml) to be brought to use as placeholders for some sort of widgets, so when i type something like:

<wiml:calendar id=’cal1’ />

it will render into complete HTML and JavaScript code block and you will be able to manipulate it with JavaScript.

Won’t get into deep details for the moment, because it’s still in early local testing stage where we have dozens of options how to do things, kind of reminds me the story about Microsoft Ribbon UI control development…

Or, maybe, FTP to VFS?

Another interesting thing could be is to allow access to SiteAdmin CMS Virtual File System via FTP. So all content management modules can be navigated with FTP client and treated as files. This will help a lot Private Label providers that use SiteAdmin CMS and would like to provide their clients additional functionality, like content backup for example.

Oh, what about new content store?

As you know for the moment SiteAdmin CMS using XML side of Microsoft SQL Server 2005/2008 (including Express Edition) to host content meta models. This can be changed as well when WDK9 will be out, very possible, finally, it will run on native XML DB storage, something more productive than it was in 2003 if any of you still using CMS made on WDK5-Berkeley. New storage won’t have that much server loading and will use native to XML queries, so we are expecting quite a boost in performance with lesser use of resources.

That’s it for today, now you can post some comments;)

One click file upload with BrowserPlus

While looking through Yahoo BrowserPlus you can be a bit disappointed with lack of simple examples that explains you really simple things, one of them was like how the heck you can just call file browse dialog and upload selected file, so here we go.

In my case I use jQuery in most of the projects, so I start with the known things to handle my click on some link (I have id id btnUpload):

$(‘#btnUpload’).click(function() {});

Now, piece of code that will popup File Browse dialog:

var $BP = BrowserPlus;

$BP.FileBrowse.OpenBrowseDialog({}, function(e) {});

BrowserPlus allows you to select one or more files, so as result of execution it returns you an array of files selected. In my case I need to have only one file selected and uploaded. Uploading in Browser plus done in following way:

$BP.Uploader.upload({
     url: '/upload.aspx',
     files: { file: my_file },
     progressCallback: function(r) { console.log(r); },
     responseProgressCallback: function(r) { console.log(r); }
   }, function(res) { console.log(res); });

Where my_file in this case will be a reference to what I receive from File Browse dialog. So after I wrap all things together we will have following code snippet:

$(‘#btnUpload’).click(function() {
$BP.FileBrowse.OpenBrowseDialog({
$BP.Uploader.upload({
     url: '/upload.aspx',
     files: { file: e.value[0] },
     progressCallback: function(r) { console.log(r); },
     responseProgressCallback: function(r) { console.log(r); }
   }, function(res) { console.log(res); });
}, function(e) {});
});

console.log() I used just to see BrowserPlus uploading progress status in Firebug, plug-in for Firefox.

Hope this will help you as well.

Placing right BrowserPlus plug-in in SiteAdmin CMS

This night discovered pretty weird behavior of Internet Explorer when I used BrowserPlus.ascx plug-in. For some reason it was firing me a JavaScript error with very little details, something like this:

HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

After short googling i actually found that not only me had the same problem and Microsoft KB explains things in following way:

This problem occurs because a child container HTML element contains script code that tries to modify the parent container element of the child container. The script code tries to modify the parent container element by using either the innerHTML method or the appendChild method.

So, what’s went wrong? Happen to be pretty simple to find, script block generated by BrowserPlus.ascx plug-in was allocated before <form runat=”server”/> tag closed, exactly on the end of the content, so it was a last thing to parse within server side rendered form. ASP.NET is pretty nice weirdo defined thing where usually u have to put all runat=”server” controls within a <form runat=”server”/> DOM element. Well, most of it, controls are actually renders fine even by being placed outside. So all I needed to do is to place my

<plugins:BrowserPlus ID="BrowserPlus1" runat="server" />

exactly after where is my form tag was closed. An it worked. No JavaScript errors in IE anymore.

IE8: Standards mode and IE7 compatibility mode

Source: Chris Koenig’s Blog

As you all know, the Internet Explorer team has been working hard to make IE8 the most standards compliant browser around. Unfortunately, not all web sites confirm to these standards today. If you have concerns about your web site rendering correctly in IE8 standards mode, then there is some help for you out there:

First – you can address the issues on a page-by-page basis using the following HTTP meta-tag:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />



This tag, when seen by IE8 will render the page in IE7 compatibility mode regardless of whether or not you’ve set IE to run in IE8 Standards mode or not. This is a great solution for that one page in the site that doesn’t quite render correctly in Standards mode.

Second – you can add this header via IIS to all of your pages either via the config files directly:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=EmulateIE7">
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>



or using the IIS7 admin tool (which, as we all know, just updates the config files for you)

image

Lastly, for those of you running Apache instead of IIS (shame on you!), Hanu has something to help you - he’s just released a blog post on how to configure your Apache server to render pages in IE7-compatibility mode. You can also get more information about IE8 Compatibility Mode can be found on the IE8 section of the MSDN web site.

JavaScript run-time rendered forms

One more challenge I’ve had these days, I wanted to have a way to define my forms in xml format and render them at run time on the web page. And on web page I want to have just content place holders, so if I work together with web designer, he can jut define the place where the will be rendered.

So to skip all unnecessary introduction, let me show you how whole thing works.

My form place holder looks like this:

<div class="jform">contactform.xml</div>

As you can see I just added a div that has class jqform (I used short for jQuery forms). In text section of this content container I've put the name of the file I will use, the one that contains my XML form definition.

My contactform.xml definition file of the form is following:

<form title="Contact Us" url="save.aspx" submitLabel="Send" replyCallback="__formSubmited">
  <formItem title="Name">
    <input type="text" id="name" />
  </formItem>
  <formItem title="Email">
    <input type="text" id="email" />
  </formItem>
  <formItem title="Message">
    <input type="text" multiline="yes" id="message" />
  </formItem>
</form>

As you can see this form has a title, it has an URL where I will submit form, it  has also submitLabel field that contains a text of the Submit button, the last parameter you see there is replyCallback which the name of the function I will use to pass result of the data post, please note that data i pass to this function is in escaped format.

If url is not specified it will render just form, without any submit buttons and form post functionality included.

And after rendering this form  would look like this:

image

Now, to make things working as I need we going to add into head section of our html the following:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script type="text/javascript" src="http://jqcommons.googlecode.com/svn/trunk/jqc.core.js"></script>

    <script src="jqforms.js" type="text/javascript"></script>

As you can see I use jQuery library hosted by Google and second reference is to jQuery Commons, my recent contribution for webware developers. This lib contains set of functions that makes my life easier, like string operations, date formatting and so on, bunch of goodies.

As you recall, above I mentioned replyCallback function, let’s make it simple:

<script type="text/javascript">
        function __formSubmited(reply) {
            alert(unescape(reply));
        }
    </script>

As I told you string comes in escaped format, so to work with this string I need to unescape it back.

The whole magic done actually by third JavaScript file that I added to my HTML, you can see it referred as jqforms.js. So what it does, is on document_ready event it checks for jqform class enabled containers and renders a form out of XML definition you referred within a container.

You can see whole thing in action at http://labs.skitsanos.com/demos/jsforms/ and ‘jQuery Forms Player’ (jqforms.js) prototype you can get from http://labs.skitsanos.com/demos/jsforms/jqforms.js

Now this thing saves me unreal amount of time, hope it will for you as well.

Configuring Stopeo service under ASP.NET

First of all, what is Stopeo? With stopeo, You can easily check your server performance and keep an eye for any overloads. So...

*How to use stopeo.com from Wojtek Siudzinski on Vimeo.

So now when you know what is all about I will give you a tip how to make Stopeo works with ASP.NET web sites, as it does in my case with SiteAdmin CMS generated sites.

Stopeo requires just two things, to know when page render started and when it’s finished, so implementation is simple, insert following code into server side script part, for example like this:

<script runat="server">
Protected stopeoStart As DateTime
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
  stopeoStart = Now End Sub
</script>

Then,  in very bottom, of the page you just put following code:

<!-- stopeo: <%=Now.Subtract(stopeoStart).TotalSeconds%>s -->

So what it does is returning you time span in seconds format, like 0.000… Now you can feed Stopeo with it.

About...

…SiteAdmin CMS is a powerful but simple, extremely easy to use, low priced, easy to deploy content management system. SiteAdmin CMS offers a rich set of features despite its low price point. It is a leader in its price and feature class…