easiest would then be to just hook into the WP menu generator
my site has a primary / secondary menu system and i can maintain them in WP
then generating the menus in UBB from maybe a primary menu ( shared by all ) then a tertiary menu ( you can have as many menus as you want in wordpress. they don't have to be actually 'used' ) that ubbthreads and others grab
it's all possible