$vbulletin->templatecache contains the compiled template, so you probably won't be able to figure out what to match when doing a str_replace() by looking at the template in the template editor (except maybe in a case where you're trying to match a small piece of html). Also, you cannot use template tags or curly braces in your replacement since it's already been compiled. So I think there are two things you can do: figure out the right replacement for the compiled template, or do a replacement after it's been rendered.
You can look in the database "template" table, and the "template" column contains the compiled version of the template (or you can put code in a plugin to print out what's in $vbulletin->templatecache). The cached version of a template is php code that sets a $final_rendered variable when it's eval()'d. You can figure out a str_replace() for that, but it can be tricky to get the quotes right.
If you want to try the second method, you could use hook global_complete and do str_replace() on the $output variable (and probably check for THIS_SCRIPT == 'showthread' so you're not doing it for every page). For this method you can look at the html source of the page in your browser to figure out the replacement.
ETA: Also, I don't think you need the call to vB_Template:

reRegister().