Re: query/php problem
I don’t know anything about your plugin, but why not put the OR in the PHP, similar to how WordPress checks for pages or posts:
<?php if(is_home() || is_single() || is_page()) {
whatever;
} ?>
Maybe you could put the logic in the PHP? I don’t understand what the plugin does, but the value in the database seems odd to me.
so, for your application:
<?php if ((bb_get_location == front-page) || (bb_get_location == topic-page)) {
give the ID;
} ?>