XF 1.4 Custom BBcode and the Image Proxy

Pineapple

Member
Hey everyone,

I'm trying to make a simple background image bbcode, but I've hit a snag. The site is a secure site, and the problem becomes that when a User enters the URL of the image they wish to use for a background it does not pass it through the xenforo image proxy.

Is there any way to get the image to go through the proxy?

I've tried both of these outputs.

HTML:
<div class="bbcode-background">
    <div class="bbcode-background-text">{text}</div>
    <div class="bbcode-background-image"><img src="{option}" /></div>
</div>

<div class="bbcode-background" style="background-image: url('{option}');" >
    <div class="bbcode-background-text">{text}</div>
</div>
 
  • Use a callback
  • Find a way to use the function "handleImageProxyOption" from the class "XenForo_BbCode_Formatter_Base": it's a protected function, so can't be called from the callback. A question has been asked to the XenForo developers and there was no reply. To bypass this problem, the Bbm has a bridge function to call protected ones from the Formatter. Check here the one called "handleImageProxyOption" (arround line 1674).
 
Top Bottom