Idea
- add a new column pwd VARCHAR(32) to table thread
- modify newthread.php to set this to md5(password) if user entered a password when starting a new thread
- modify search.php and forumdisplay.php to check if pwd is set and only display thread summary/post if user has appropriate password cookie, otherwise "This thread is password protected" or smth.
- modify showthread.php to check if the requested thread has a password. If it has and user does not have the appropriate password cookie, display an error message and a form to enter the password. If the user enters the password generate the appropriate cookie (expire = end of session) and redirect to the thread
You might also want to give mods abilities to change/remove password which requires further modifications.
Dunno if this does help to get you started, but i'm too lazy to code that