I actually couldn't get that second code to work at all. Not sure if there is a mistake in the script or something. I ended up taking the original code and adding the showthread bit from the second code to get the quick reply to come back...
PHP Code:
if ((THIS_SCRIPT == 'newthread' AND $foruminfo['forumid'] != XX) OR
(THIS_SCRIPT == 'showthread' AND $threadinfo['forumid'] != XX) OR
(THIS_SCRIPT == 'newreply' AND $threadinfo['forumid'] != XX))
{
$vbulletin->options['hvcheck'] &= ~($vbulletin->bf_misc_hvcheck['post']);
}