Fruddled Gruntbugglies

Enthralling readers since 2005

Author: lpaulriddle

  • More on Coppermine

    Still playing around with Coppermine, trying to set things up so that Cathy can have a separate login and still have the ability to upload and edit photos in the public albums. First, I tried setting her account up in the registered group. After a bit of fiddling and RTFMing, I was able to get it so that the account could upload to public albums. I had to

    1. Remove the disk quota from the registered group (group admin area, change default quota from 1024K to 0)
    2. Enable registered group to upload to public albums without admin approval (group admin area)
    3. For each album, go to the configuration page (go to album list and click “properties”). In properties, select “Visitors can upload files”

    After I did that, I could upload pictures, but once uploaded, I couldn’t do anything further with them (like adding captions etc). So it looks like this isn’t the answer. That leaves me with two options:

    1. Add Cathy’s account to the administrators group; or
    2. Move all the albums to Cathy’s “personal” album space, so she “owns” them; then she should have access to them and I can access them through my administrator account.

    For now, I’m going with option #1 because it’s the easiest.

  • Coppermine

    A couple weeks back, I downloaded a PHP/MySQL-based online photo album package called Coppermine. At the time, I was looking for kind of a be-all-end-all-do-everything solution to managing all of our digital photos and publishing them on the web. I installed it and gave it a go last week. Installation was straightforward as soon as I got the MySQL tablespace properly configured. Once it was ready to go, I uploaded some pics to it.

    The Coppermine documentation is very much geared towards users with web hosting services, as opposed to people like me who run their own servers. It took me a bit of sifting through directions like “use FTP to upload the pictures to your web hosting service”, before I figured out that all I need to do is place the photos in a directory that my Apache installation can read and write to. Once I did that, I fired up Coppermine’s import tool. And waited. And waited. And waited.

    It appears that during the import process, Coppermine runs “convert” (from ImageMagick) on each file to create thumbnails and “intermediate” sized images. From running “top” on my server, it looks like it fires off four “convert” processes at a time (this may be configurable). This process is a bit slow on my crusty old 450mhz server box. So it looks like if I’m going to be importing hundreds of photos, I’m going to need to run this on a machine with a bit more juice. It probably doesn’t help that the web server is currently accessing the photos over an NFS mount.

    However, once the import finishes and the photos are online, the viewer works pretty well. I think for now, I’ll scale back my ambitions and just use Coppermine to publish photos I want to share. I’ll move them to a local disk on the web server box, and then I’ll just pick and choose the photos I want to upload to it. I think it’ll do very nicely in that configuration.

    More later..

    Followup.. Desperately in need of a photo browser for my Linux box, I looked around and found xnview. The Motif interface is a little dated, but it works very nicely and it’s fast. It supposedly also works on Windows and Mac. I played around some more with Coppermine and found that it has a user-level upload tool, where I can upload pictures through the browser. Pretty cool.

  • Busy yardwork day

    I played hooky from work today so I could catch up on some much-needed yardwork. If my work schedule permits, I really like doing that because I can pick a day where the weather is good, knock off all the yardwork, and free up the weekend for more leisurely pursuits. I started at 9:30 this morning doing trimming and edging, then mowed all the grass, then mulched up some twigs with the chipper/shredder. Plus, I relocated one of our compost bins and fixed the door on our big barrel composter. All in all, a very productive day.

    Next up, I need to do a little pruning and weeding, and do end-of-season maintenance on the snowblower. Then I’ve got two outside projects I’d like to get done before I have to deal with the pool… a new lid for the sandbox, and a permanent pole for our bird feeder. I hope to get the ball rolling on these this weekend.

  • Adding content to Perl myUMBC codebase

    Urrgh. I added new functionality to the Perl myUMBC codebase today, and I had forgotten what a pain it was. You know things are bad when you wrote the code, and you have to spend an hour trying to recall how it works. Since it looks like the Perl stuff is going to be around for awhile, I figured I might as well document this process while it’s fresh on my mind. Maybe it’ll save me some time down the road.

    Just to clarify… when I speak of myUMBC here, I’m just talking about the Perl stuff, not uPortal. With that in mind, here goes.

    Background: Everything in myUMBC is database driven. Every link, table, dropdown menu, heading, etc. that you can see, click on, or otherwise manipulate, has a corresponding entry in a database table. All internal URLs in myUMBC are of the form

    http://blah.blah/myumbc?function=foo

    The function code tells myUMBC what the end user is currently doing. Most of myUMBC’s core functions (registration, etc.) actually have two function codes, one for the initial screen, and one for the results page. Every function code needs to have an entry in the database. Otherwise the user will get a “not authorized” type error. This is to keep users from entering arbitrary function codes and producing undefined results. The database table that contains all of this stuff is called BRCTL.PROD_PROG_DESC (don’t ask about the name).

    To add to the confusion, myUMBC also has a built-in function mapping table, which maps shorter function names to possibly-longer Perl subroutine names. For example, the Financial Aid Inquiry function I added today has a short name faidinq which maps to a subroutine finaid_inquiry. There’s no real reason for doing this, other than shortening the URL.

    To make a long story short, first, you need a PROD_PROG_DESC entry with PPD_LINK_TYPE set to “function” and PPD_URL set to the name of the Perl subroutine that builds the initial HTML (which could be a table, dropdown etc). Then, you need a second PROD_PROG_DESC entry for the results page. This one should have PPD_URL set to NULL, and PPD_FUNCTION_NAME should match the Perl subroutine that generates the results page.

    That’s basically it… unfortunately, that probably didn’t make much sense unless you’re already intimately familiar with the myUMBC Perl codebase. One of these days I’ll improve and expand on this, to make it fit for general consumption. That’s why it’s in my blog and not the Syscore Wiki..

    [More:]

    6/16: Here’s how I made our new Student Parking Registration form come up:

    INSERT INTO prod_prog_desc
    
        (ppd_prog_id, ppd_url, ppd_desc, ppd_add_date_time,
         ppd_add_user_id, ppd_link_type, ppd_restrict_access,
         ppd_auth_level, ppd_function_name, ppd_portal_disposition)
    
    VALUES
    
        ('NEWPARK', '%2bParkingRegistrationForm',
         'Student Parking Registration (new)', sysdate, 'paulr',
         'myumbc', 'N', 'password', '+ParkingRegistrationForm', 'maximized')

    Great to have notes to refer back to..

  • Quick note on Palm iCalendar Sync

    A couple weeks back, I upgraded my copy of Missing Sync to the latest version, version 5.1.0. Last night I noticed that event deletions from my read-only calendar subscriptions had stopped propagating properly to the Palm. I probably should have suspected something was amiss.. every time I ran a sync, I was getting a sync services dialog telling me that the sync was “changing more than 5% of the calendars on this computer.”

    I also had the event deleting problem when I first installed Missing Sync. At the time, the Mark/Space support folks gave me a procedure to erase everything on the Palm, reset the sync history, and sort of “start over”. It worked then, and it worked this time too. I documented the procedure in this post.

    Looks like I might want to do this every time I upgrade Missing Sync, just to make sure I’ve got a clean slate and nothing gets wonky.

    I’m still happy with Missing Sync. Now I’m pining for a desktop Mac, so I could do a bluetooth sync from anywhere in the house without worrying about firing up the laptop….

  • Wireless Alarm Keys Demystified

    I successfully programmed an Ademco wireless keyfob transmitter today, and figured I’d document the process.. My panel is a Vista-20P and the transmitter is a 5804BD.

    1. Program an RF house ID into the panel. The house ID needs to be a number between 0 and 31. On the Vista-20P, this is done in location *24:

      Enter programming with 4-digit installer code + 800
      Enter *24
      Enter 2-digit house ID
      System chimes to confirm entry

    2. Install batteries in the transmitter. When prying the case open, hold the transmitter with the buttons facing down; otherwise they’ll all fall out when you pull the case apart.
    3. Program the house ID into the transmitter per the instructions. It must match the house ID programmed into the panel.
    4. Program each button individually using zone programming (*56). On the Vista-20P, zones 49 through 64 are reserved for keyfob zones. The following example will program button 4 to disarm the system:

      Enter *56 to enter zone programming
      Enter 1 at Set to Confirm? prompt
      Enter 49 to program zone 49 (or whatever)
      Enter * at summary screen
      At zone type prompt, enter 22 (disarm)
      Enter 1 at partition prompt
      Enter 0000 at report code prompt (no report)
      Input Device type will default to “Button type RF”
      Enter the device serial number at the prompt
      Enter 4 as the loop number (corresponds to button 4)
      Press button 4 on the keyfob at “Xmit to Confirm” prompt
      System confirms that the correct serial number was transmitted
      Review summary screen and press *
      Press 0 at “Program Alpha?” prompt

      Now, exit programming and assign a user number to this button: Enter master code + 8 + user number + #4 + zone number. For user 04 and zone 49, you would enter

      master code + 8 + 04 + # 4 + 49

      Keypad will chime to confirm.

      That’s it; button 4 on the keyfob should now work to disarm the system. The process should be repeated for each button on the fob (each button corresponds to a separate loop number).

    Next step is to hook one of the buttons up to the garage door opener. It appears that I need to program the button as zone type 23 (no alarm response), then go into device programming and define an output function to activate the appropriate relay when the zone trips.

    This weekend I’ll install the 5800TM transmitter so that the fobs will be able to display system status. I’ll also test the range to see if I’ll need a repeater. Hopefully I won’t.

    Followup 4/22… I’ve programmed both keyfobs and everything worked as expected. I’m pretty impressed with the range of these things.. it seems to be pretty close to the advertised 200 feet. It’s looking like I won’t be needing a signal repeater. Haven’t gotten to the 5800TM yet, and may not this weekend, but the fobs don’t need it to work. I’ll use this week to test them out, and assuming they continue to work well, I’ll put the 5800TM in next weekend.

  • Bike to Work

    The summer ritual officially began today: I rode my bike to work for the first time. I’m admittedly a fair-weather biker; I bike when it’s warm, sunny and light outside. So, today was my first time on the bike since, oh, last October or so. Combine that with two weeks or so of relative inactivity while I was home helping care for our newborn, and well, suffice it to say that I didn’t break any speed records getting here this morning. And then there’s the ride home looming, with its dreadded mile-long grind up Lawyers Hill Road. But I’ve got 8 hours or so before I have to worry about that.

    With gas pushing $3 a gallon, the financial incentive to bike in (and avoid driving) is stronger than ever. The commute to work is about 15 miles round trip, and my car gets roughly 30 miles to the gallon (actually that’s being generous, it’s probably more like 25-28), so I save about 1/2 gallon of gas every time I commute by bike. At $3 per gallon, that’s around $1.50 extra in my pocket for each ride. And the more expensive gas gets, the bigger the payoff gets.

    Last year, I biked to work 22 times, but I didn’t start doing it until early August. So hopefully this year I can do it a lot more. This year I plan on keeping a log so I can track my times, average speed etc. At the end of the season we’ll see how I did.

  • Blosxom Import Complete

    I just finished importing all my Blosxom entries into b2evolution. The process was more or less painless; I just pulled down all the Blosxom entries in Movable Type format using the flavor I mentioned earlier, then processed the result with a Perl script, then ran b2evolution’s Movable Type import utility to bring the entries in. The Perl script basically catenates lines together in the body area of each entry, which makes the result look more attractive in b2evolution. Once the entries were in, I went through and made minor edits to make things look better.

    The only thing I don’t care for about b2evolution is its insistence on sticking <br> tags at the end of every line, even within blocks of markup. This makes it really hard to include code snippets, because I can’t use <pre> blocks; I have to explicitly format everything and use &nbsp; entities to do spacing. There must be a way to make this work right, but I haven’t found it yet.

    That aside, it’s nice to have a “real” blogging engine with all the associated bells and whistles. I’m sure I’ll figure out all of b2evolution’s various quirks over time.

    Followup — Looks like the <br> tag thing is controlled by the Auto-BR option at the bottom of the page where you edit posts. It seems to be turned on for all the imported entries, and off for the native entries. When Auto-BR is off, it seems to be much better behaved with embedded HTML in entries.

  • Time to fix the garage door opener

    As I noted earlier, our garage door opener receiver died a few weeks back. Rather than get a new, cheap, made-in-China receiver to replace it, I’ve decided to get a couple wireless remotes for our security system and program them to operate the garage door. Now, the original plan was to buy two bidirectional remotes (they can receive and display system status as well as arm/disarm the system, hence the term “bidirectional”), and a special keypad which includes an RF receiver/transmitter module to support the remotes. But, our system already has an RF receiver, and I recently learned that my particular alarm panel does not support more than one receiver.

    Now, why am I interested in a second receiver if I already have one installed? It’s basically because of the oddball layout of our house. Our house is very long and narrow, and the center is narrower than the rest of the house. There’s no real practical spot to mount a receiver in the dead center of the house. It either needs to go closer to the west side of the house, or the east. It so happens that most of my wireless zones are on the west side of the house, so that’s where I mounted the current receiver. Unfortunately, the garage and entrances are all on the east side, so the receiver isn’t in the optimal spot for remote keys.

    Plan A for dealing with this was to get the keypad with the RF receiver, and mount it closer to where we’d be using the remotes. But, I can’t do that because my panel doesn’t support multiple receivers. That brings me to Plan B, which is to buy the remotes and the required transmitter module, and just try them out with my existing receiver in its current location. These things supposedly have a 200 foot range, and I’m still well within that, so it can’t hurt to try it out.

    While researching this today, I learned that there’s now a wireless repeater module I can buy, which effectively extends the range of the existing receiver. So if I go with my Plan B and the performance isn’t up to snuff, I can add a repeater closer to the garage, and that should hopefully do the trick. So that’s the current plan. We’ll see how it goes!

  • Importing Blosxom data into b2evolution

    Made my first attempt at importing my Blosxom data into b2evolution this morning. Looks like it will be doable with just a bit of fussing. The basic strategy is to use this handy Blosxom flavor to convert the Blosxom data to Movable Type export format, then use b2evolution’s MT import utility to bring the data in. I tried this on a couple of entries, and it works, but I’ll need to do a bit of data munging. First off, the Blosxom flavor leaves an <h3> markup tag at the beginning of each post, which the importer doesn’t like. And, the importer seems to insist on sticking <br> tags at the end of every line, which makes for some ugly line breaks in the final product. There may be a way to control this behavior from the importer, but I think it’ll be just as easy to massage the import file with a Perl script. Next step is to do that, and try a few more test imports, before bringing in the whole enchilada.