Basically I have a BB Code... in the replacement code there used to be a part that said
height="400" in an HTML tag.
But some users with high resolution screens asked for it to be taller than 400 pixels... So I made a custom user profile field where each user can specify the height they want for this particular BB Code.
In the BB Code replacement I changed it from
height="400" to
height="xxx" (for example) and then on the hook bbcode_parse_start I do a str_replace for "xxx" and swap in the value set by the user in their profile field. For the most part this works except sometimes it gets cached at a different user's value.
In class_bbcode.php there are the following lines around line 440...
Code:
// save the cached post
if ($this->options['cachable'])
{
$this->cached['text'] = $text;
$this->cached['has_images'] = $has_img_tag;
}
// do [img] tags if the item contains images
if(($do_bbcode OR $do_imgcode) AND $has_img_tag)
{
$text = $this->handle_bbcode_img($text, $do_imgcode, $has_img_tag);
}
($hook = vBulletinHook::fetch_hook('bbcode_parse_complete')) ? eval($hook) : false;
return $text;
I *think* what I have to do is to make this condition false when a specific BB Code is present in $text. (Which is already converted to HTML at this point).
My main question is how can I change the value of
$this->options['cachable'] because simply setting it equal to zero or false doesn't appear to have any affect.
Unless what you're telling me it might be working but it's cached somewhere else...