I got it to work now. It wasn't the bracket at the end of what we had to put in the ubb_lib_posting.cgi but right before it I was missing these 2 lines...
chmod (0666, "$vars_config{NonCGIPath}/$exact_path/forum_$number.threads");
} # end unlink_topic_from_forum_summary
Not sure how that happened, but it works now! Thanks for the help though! Great hack!!
Eliza