Subscribe to my RSS feed RSS

Posted: May 26th, 2008

Demisauce Comment notifications and Help System

A lot of work on the Demisauce Help system, using facebox jquery plugin for the popup page, or at least a heavily modifed version of Facebox. I had to implement quite a few changes to allow for content to be gathered from the Demisauce server, which would be a different domain. Therefore, the traditional ajax get in the Facebox wouldn't work, and i had to modify it to do a Document.write instead.

I added this method to Facebox to route requests via an inserted script.

// in facebox.js 
function fillFaceboxFromDocumentWrite(href, klass) {
    if ($('#facebox .content').attr('src') == href){
        $.facebox.reveal(null, klass,href);
    }else {
        var ds_html_script = document.createElement('script');
        ds_html_script.type = 'text/javascript';
        ds_html_script.src = $.facebox.settings.base_url + href;
        document.getElementById('facebox').appendChild(ds_html_script)
        $.facebox.reveal(null, klass,href);
    }
}

The script that gets called is dynamically generated to produce javascript, which will get inserted into the Dom of the remote server.

//  python code to generate ds_help_output
document.getElementById('facebox_content_holder').innerHTML = ds_help_output;

The end result is this help system. You can edit content at the Demisauce Hosted Server or can host a version of demisauce, then include a line of javascript in your apps to get built in help system. Here is a screenshot. Help System

Also, modified Demisauce to allow for Comment notification's. demisaucecommentsnotification

Posted: May 25th, 2008

Demisauce Upgrades and Help System

Another release of Demisauce including bug fixes, and the start of a help system. Here is a screenshot of the Help System which is an popup over the rest of the page. There are a couple of different styles. The content comes from Demisauce, and both the help (javascript) and its content come from Demisauce server and are easily embeddable in an app. ds04help