XF 2.2 BBCode Migrated from vBulletin is not Working

atminside

Member
Good Morning,

I was hoping to get some help with this BBCode, it was working as shown in vB 4.2.5 before we migrated to XF2.2. It uses multiple options which are comma delineated, but the HWBot JS script is looking for a string, not for it to be sent as multiple options. Thanks in advance!

This is the text in HTML Replacement:
HTML:
<script type="text/javascript">
    
    var _hwbtarget = 'hwb_' + Math.round((Math.random() * 100000));
    document.write("<div id='"+ _hwbtarget +"'><img src='https://hwbot.org/img/loader.gif' alt='loading'/> Loading…</div>");

    // uncomment for custom css
    var _hwbcss = "https://hwbot.org/css/style.external.custom.ocforums.css";
    var _hwb =  _hwb || [];
    _hwb.push(['type={text}']);
    _hwb.push(['params={option}']);
    _hwb.push([_hwbtarget]);
        
    (function() {
      var hwbex = document.createElement('script'); hwbex.type = 'text/javascript'; hwbex.async = true;
      hwbex.src = 'https://hwbot.org/js/exf2.js';
      var s = document.getElementById(_hwbtarget); s.parentNode.insertBefore(hwbex, s);
    })();
        
</script>

This is the example usage:
Rich (BB code):
[hwbot=overclockers.com,CPU-Z,20]teamrank[/hwbot]
 

atminside

Member
Figured this one out today. Apparently, XF does not like links without www. in some instances. Just adding that in, shown below, to the HTML Replacement got this one working.

HTML:
<script type="text/javascript">
   
    var _hwbtarget = 'hwb_' + Math.round((Math.random() * 100000));
    document.write("<div id='"+ _hwbtarget +"'><img src='https://www.hwbot.org/img/loader.gif' alt='loading'/> Loading…</div>");

    // uncomment for custom css
    var _hwbcss = "https://www.hwbot.org/css/style.external.custom.ocforums.css";
    var _hwb =  _hwb || [];
    _hwb.push(['type={text}']);
    _hwb.push(['params={option}']);
    _hwb.push([_hwbtarget]);
       
    (function() {
      var hwbex = document.createElement('script'); hwbex.type = 'text/javascript'; hwbex.async = true;
      hwbex.src = 'https://www.hwbot.org/js/exf2.js';
      var s = document.getElementById(_hwbtarget); s.parentNode.insertBefore(hwbex, s);
    })();
       
</script>
 
Top