The posts are parsed from bbcode into html, and then the result is saved in the postparsed table so that it doesn't have to be done every time (it may be a feature that can be turned off, I'm not sure offhand). And the pagetext_html field is the parsed version. But I think for some reason IMG tags aren't preparsed, which is probably why the code you copied works for img tags.
I'm not sure offhand what [TABLE]...[/TABLE] ends up as in html. If there's any way to do your replacement with html tags, maybe you can do that. Otherwise, what I was talking about above would be done something like this:
hook location bbcode_create:
Code:
$this->tag_list['option']['table']['callback'] = 'handle_external';
$this->tag_list['option']['table']['external_callback'] = 'my_handle_table';
$this->tag_list['no_option']['table']['callback'] = 'handle_external';
$this->tag_list['no_option']['table']['external_callback'] = 'my_handle_table';
if (!function_exists('my_handle_table'))
{
function my_handle_table($parser, $data, $option)
{
global $styleid;
if ($styleid != X)
return $parser->parseTableTag($data, $option);
global $vbphrase, $session;
return construct_phrase($vbphrase['hideimg_message'], $session['sessionurl_q']);
}
}
where of course you'd change X to the styleid that you want.
I haven't tested the above at all, so I'm not certain about it. One thing is that this will do the replacement even for 'alt' bbcode parsers, like if it's being parsed to plain text for a preview or something. You may or may not want that, I don't know.
Sorry if this isn't broken down enough - feel free to ask more questions if it doesn't work like you want.