[Mozile] Which version ?

Ian Thurlbeck ian at stams.strath.ac.uk
Fri Jan 20 11:00:20 EST 2006


James A. Overton wrote:
> On 2006-Jan-17, at 5:35 AM, Ian Thurlbeck wrote:
> 
>>
>> I've downloaded and install 0.7, but I'm having some trouble  configuring
>> POST - it seems to ignore the rsd.xml config file - is this 0.6 only?
>>
>> Also, the lines in the JS files seem to be CR-terminated rather than
>> LF or CR-LF ? "vi" doesn't like them!
>>
>> Thanks
>>
>> Ian
> 
> 
>     Sorry! I thought I'd left better documentation, but I was mistaken.
>     Mozile 0.7 is a complete rewrite, so very little of the older  
> documentation applies to it. There's no RSD file. All the  configuration 
> and bootstrapping is done with the core/mozile.js file,  so that's the 
> only one you need to include. To configure saving via  POST you need to 
> change the "modules" array in mozile.js to contain a  module 
> configuration entry like this:
> "HTTPPost: default=true, url='http://overton.ca/james/mozile/php/ 
> save_dump.php'",
> (All on one line.) There should be only one saving module set to  
> "default=true", otherwise the last one gets picked. I also discovered  
> that I haven't set up content and formatting options for the module  
> configuration strings, although you can change this in the Save As  
> dialog. That's on the To Do list.

Thanks, I've done that and got it saving some editable areas! I have to
use preg_match() to chop off the containing "div" and parse out my
"id" tag:

$content = trim(file_get_contents('php://input'));
// id tags can only have alphanumerics and underscores
if (preg_match(":^<div id=\"([A-Za-z0-9_]+)\":", $content, $matches)) {
         $tag = $matches[1];
         // remove opening and closing div tags
         $content = preg_replace(":^<div [^>]+>\n:", "", $content);
         $content = preg_replace(":</div>$:", "", $content);
         set_editable_content($tag, $content);
}

The docs talk about an automatic MozileID which can be used - but again
this is probably older stuff now ? Anyway I'm happy with what I've got
for now.

One more thing - is the table editing feature likely to be ported
into the 0.7 release anytime ?

>     I use a Mac to do development, although I have my editor set to do  
> Unix line-endings. So you should be seeing LF's, and if you're seeing  
> CR's then something went wrong at my end. The browser shouldn't care,  
> so change them to whatever you like.

Sorry, you are correct! They are just very long lines, like the source 
has been run through a whitespace removing program or something.

>     Messing around with Mozile this morning, I noticed some focus bugs  
> with the Mozile status bar that hadn't been there before. There's  also 
> a layout bug with the Save-As dialog for saving POST.  I'll add  them to 
> the list. Please tell us about other bugs you come across.

Well, since you ask!:

When you visit a "mozile" page, and then try to leave it, mozile always
pops up a dialog box saying the page has unsaved changes, even if you 
haven't clicked into the editable area.

Thanks for the help and pointers!

Ian


-- 
Ian Thurlbeck                http://www.stams.strath.ac.uk/
Statistics and Modelling Science, University of Strathclyde
Livingstone Tower, 26 Richmond Street, Glasgow, UK,  G1 1XH
Tel: +44 (0)141 548 3667           Fax: +44 (0)141 552 2079


More information about the Mozile mailing list