How can I programatically enable a block by default for a theme? I have set up my site to allow users to set a different theme for each node, which works fine. Some of my themes make use of blocks, so I created a custom blocks module added them programatically, which works fine. The problem comes when I need to enable them. When a user creates a new node, all of the themes are available but none of the blocks are enabled. I have to go in and enable each block manually for each theme on each node. Is there any way to basically programatically say "when this theme is enabled, enable this block in this region" so I don't have to manually enable each block?

Please note that I am using Drupal 6 and upgrading is not gonna happen any time within the next couple of months.
There isn't a way to perform programatic actions during the enabling of a theme. You can, however, have your custom blocks module add an entry to the database for the placement of the block into a theme's region, before that theme is enabled.

To do that, you would implement a database insert query, perhaps in your module's install function, that creates an entry in the blocks table for the block(s) in certain regions in any theme. You can create these entries whether the theme(s) are enabled or not. 

The result will be that the block appears to be enabled when the theme is installed.

Here is a d.o forum post on the subject, with some helpful examples