Yeah, you would defintely want to check "THIS_SCRIPT" if you only want it to work on that one page.
To be honest, while it's obviously wise to avoid any unnecessary operations (like checking the entire output when you only need to check the post contents), I don't know that it's enough to be worried about compared to everything else that's going on. If I get a chance I'll look to see if there's a hook to check only the posts. I think I looked a couple days ago and couldn't figure it out, but I'll check again.
--------------- Added [DATE]1258761881[/DATE] at [TIME]1258761881[/TIME] ---------------
OK, you got me curious so I had to go figure it out.
You could use:
Code:
global $vbulletin;
if ($vbulletin->userinfo['userid'])
{
$post['message'] = str_replace("example.com", "", $post['message']);
}
for the plugin code, and use the "postbit_display_complete" hook, to do it only for posts. This won't do the post titles, if you want the replacement in the titles you'd have to add a second str_replace line for that. (Also I don't think you need to check THIS_SCRIPT this way).
BTW, this is what Lynne suggested back in post
#16...