I still am using an old Perl version (not even the latest), so you´ll need to redo some of it. Here is where to put them in:
[:red][0] goes in the files:
editpost.php
newpost.php
newreply.php
messhandler.php
sendprivate.php
[:red][1] goes in the files:
addpost.php
previewedit.php
sendmessage.php
messreply.php
That is... assuming the structure is the same as my old perl one, and file names are the same, only with extensions changed from *.pl to *.php. I hope it helps to find where to put it.