You need to edit your bbcode templates, such as the template:
bbcode_code
Put the entire template in a template conditional- something like:
Code:
<if condition="$show[member]">
original template code here
<else />
You must be logged in to view this code.
</if>
Do this for all the code templates you want (CODE, PHP, HTML) and their associated "print" templates as well otherwise people can see them if they go to print the page.