Sorry to jump in on this older thread but I just wanted to know if there was an easy way to get this filtering of table names to work to allow me to create a separate instance of buddypress on a wordpress multisite?
I am using the multi-network plugin to create networks and all that is working fine but each time I activate the buddypress plugin on a network it uses the same database as the all of the other networks and therefore it is the same as the normal wordpress multisite setup.
As a workaround I changed the code in bp_core_get_table_prefix() in bp-core.php to append the id of the network. That works fine and creates a new set of tables but obviously not ideal.