Jump to content
HWBOT Community Forums

Embed HWBOT Rankings on Blog or Forum


Recommended Posts

3 hours ago, richba5tard said:

Typo, it's 


hwbex.src = 'https://www.hwbot.org/js/exf2.js';

not


wbex.src = 'https://www.hwbot.org/js/exf2.js';

The h got lost with copy pasting the code. :)

Sorry, must have made a typo there... still having the same result for some reason though after updating to hwbex.src

Link to comment
Share on other sites

  • 3 years later...

Hey @richba5tard, we recently moved to XenForo and I'm trying to get our BBCode working again. Let me know if you need any other info and I'll be glad to get it!

HTML in use:

<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>

Example BBCode usage:

[hwbot=overclockers.com,CPU-Z,20]teamrank[/hwbot]

What happens on the browser is I get the loading.gif showing, and this in the dev console:

<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=teamrank']);
    _hwb.push(['params=overclockers.com,CPU-Z,20']);
    _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 page has my test usage on it: https://www.overclockers.com/forums/help/bb-codes/#hwbot

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

FYI to anyone still using this, who might be on XenForo. 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.

 

<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>
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...