July 18th, 2002

belize
  • brad

DOM

I recently (tonight) became a DOM master, as I want to use it in a number of places in FotoBilder.

In particular, reordering pictures within a gallery would be nice with the DOM.... just move the thumbnails around. (drag & drop being ideal, but Up/Down arrows would work, or clicking the top/bottom of pictures.)

I'll make a user pref for "use old HTML" always, and I'll also automatically go into that mode when UserAgent sniffing suggests fun DOM stuff will be impossible.

Target browsers are Mozilla (and thus Netscape/Galeon/KMeleon/etc) and MSIE 5+. Any DOM bug reports we get for other browsers go into our "old browser" useragent list, which will initially be populated with only Netscape 4, notably.

Summary: We're defaulting to doing cool new things, but we'll provide support for those old browsers because, well, it's the right thing to do.
belize
  • brad

Update

Lots more in the management area... you can now list/sort/view your galleries.

Now that I have ways to visualize that all the different summary info in the database is being kept up correctly (much of which I haven't even started on), I'm going back to the upload handler for awhile.

Then it'll be back to the management area again.

Oh, and drop your gallerypics table before running update-db.pl if you're running the code. (In the future I'll be making update-db.pl do all the ALTERs/etc that are needed like it does on LiveJournal, but it's too early for it to matter....)
Peek a Boo!

Question and Problem

Question:

I created an account at http://www.picpix.com and I got these accounts:

admin
administrator

Should that allowed me to create these accounts? I think it should be blocked. Feel free to delete and restrict them.

Problem:

When I click on 'Logout' link and then tried to log back in, it did not work. I got a Javascript error

Line: 55
Char: 5
Error: Object doesn't support this property or method
Code: 0
URL: http://www.picpix.com/logon

I am using Internet Explorer 5.0

Thought I'd let you know.
  • Current Mood
    curious curious
amused, happy
  • mart

A Stupid Patch, a Question, and a Comment.

It's small, so it can just go directly into this post. heh.

--- fotobilder/src/fotoup.plMon Jul 15 19:58:54 2002
+++ fotobilder/src/fotoup.plThu Jul 18 17:16:02 2002
@@ -78,6 +78,7 @@
 
     my $img;
     open (F, $file);
+    binmode(F);
     { local $/ = undef;
       $img = <F>; }
     close F;
@@ -107,7 +109,8 @@
         print $res->content;
         $chal = $res->header("X-FB-NewChallenge");
     } else {
-        print $res->error_as_HTML();
+        my $error = ($res->content() || $res->error_as_HTML());
+        print $error;
     }
 }
 

Now, PicPix doesn't seem to like any of my JPEGs. I checked and they do indeed start with 0xFF 0xD8 as the fmtid_from_magic function expects, and with my above modification to fotoup I can see that it is the format that the server is complaining about. One strange thing, however, is that I'm getting back a server error saying "Unknown Format" when the code suggests it should be a "Bad Request" response instead.

I was trying to get FotoBilder running on my Windows 2000 box, both out of interest and because it'd make things easier for me. However, I found that ActiveState's DBI package is madly old and I'm guessing this is why it doesn't appear to have selectrow_hashref. Since I don't have the relevant tools to build a new version of DBI for Win32, I've given up on this for now.

Update: Problem solved. It was the binary/non-binary distinction which exists in Windows perl that did it. My patch above fixes that, but I stupidly wasn't using my modified version. It's still strange, because the magic string (which it does format comparison on) was unchanged.