I didn't get your idea... the code I've provided above
is about displaying ads only in the message thread (since parseMessage() function is designed for parsing each message).
Of course there can not be 2 functions with identical names. Blank screen most probably means PHP reports a critical error, only you don't see it because of the settings specified in php.ini.
If you want to use constant ads at the top of forums for example, just use the code I provided first
. So the answer to your question How do you put these two code together?
would be: just paste provided code in bb_plugins.php, replacing Put your ad html here
but the Google adsense, that's all.