You put the code in the wrong cells. You need to move them down to to correct cells.
I think a lot of people have this problem because they only search for the first part of the code they are supposed to find and do not verify that it is the whole block. I added just enough of each code block that you change to make that section distinct.
I would suggest that you take public (not the cp) template file backups that you made before applying the hack and re-install it verifying each step.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.