Jump to content
HWBOT Community Forums

HWBOT Integrated Forum rankings


Recommended Posts

Due to high demand, we're trying to get updated forum topics back into the engine.

 

Working example:

[ hwbot=teamname,application]teamrank[/hwbot ]

eg

[ hwbot=oc_forums,wprime_32m]teamrank[/hwbot ]

 

renders:

=>

[hwbot=oc_forums,wprime_32m,30]teamrank[/hwbot]

Link to comment
Share on other sites

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

The new api can also be used for integrating the ranking on your website. Just paste this code into html:

 

<html>

<h3>hwbot test</h3>

<script type="text/javascript">

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

   // uncomment for custom css
   var _hwbcss = "http://hwbot.org/css/style.external.custom.ocforums.css";
   var _hwb =  _hwb || [];
   _hwb.push(['type=teamrank']);
   _hwb.push(['params=oc_forums,superpi,10']);
   _hwb.push([_hwbtarget]);

   (function() {
     var hwbex = document.createElement('script'); hwbex.type = 'text/javascript'; hwbex.async = true;
     hwbex.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'hwbot.org/js/exf2.js';
     var s = document.getElementById(_hwbtarget); s.parentNode.insertBefore(hwbex, s);
   })();

</script>

</html>

 

Remember to set the correct team name and app name. :)

Link to comment
Share on other sites

For those who want to try it as a vbulletin tag, go to the admin panel en choose "add new bb code".

 

BB Code Tag Name = hwbot

Replacement =

<script type="text/javascript">

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

   // uncomment for custom css
   // var _hwbcss = "http://hwbot.org/css/style.external.custom.ocforums.css";
   var _hwb =  _hwb || [];
   _hwb.push(['type={param}']);
   _hwb.push(['params={option}']);
   _hwb.push([_hwbtarget]);

   (function() {
     var hwbex = document.createElement('script'); hwbex.type = 'text/javascript'; hwbex.async = true;
     hwbex.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'hwbot.org/js/exf2.js';
     var s = document.getElementById(_hwbtarget); s.parentNode.insertBefore(hwbex, s);
   })();

</script>

Example = [ hwbot=oc_forums,wprime_32m,10]teamrank,height=100px[/hwbot ] (remove space in tag)

Use {option} = YES

 

 

When added, you can post the following tag in the forums:

[ hwbot=oc_forums,wprime_32m,10]teamrank,height=100px[/ hwbot]

=>

[hwbot=oc_forums,wprime_32m,10]teamrank,height=340px[/hwbot]

 

:celebration:

Edited by richba5tard
replacement script updated
Link to comment
Share on other sites

Yes, you have to define the BB code in the admin panel.

 

Version 2:

- multiple tags on same page work

- custom css available

- heigth not necessary

 

For those who want to try it as a vbulletin tag, go to the admin panel en choose "add new bb code".

 

BB Code Tag Name = hwbot

Replacement =

<script type="text/javascript">

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

   // uncomment for custom css
   // var _hwbcss = "http://hwbot.org/css/style.external.custom.ocforums.css";
   var _hwb =  _hwb || [];
   _hwb.push(['type={param}']);
   _hwb.push(['params={option}']);
   _hwb.push([_hwbtarget]);

   (function() {
     var hwbex = document.createElement('script'); hwbex.type = 'text/javascript'; hwbex.async = true;
     hwbex.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'hwbot.org/js/exf2.js';
     var s = document.getElementById(_hwbtarget); s.parentNode.insertBefore(hwbex, s);
   })();

</script>

Example = [ hwbot=oc_forums,wprime_32m,10]teamrank,height=100px[/hwbot ] (remove space in tag)

Use {option} = YES

 

 

When added, you can post the following tag in the forums:

[ hwbot=oc_forums,wprime_32m,10]teamrank[/ hwbot]

=>

[hwbot=oc_forums,wprime_32m,10]teamrank[/hwbot]

 

:celebration:

Link to comment
Share on other sites

Fixed and made a kingpincooling specific stylesheet available. Put this css in the script:

<script type="text/javascript">

 

var _hwbtarget = 'hwb_' + Math.round((Math.random() * 100000));

document.write("<div id='"+ _hwbtarget +"'><img src='http://hwbot.org/img/loader.gif' alt='loading'/> Loading…</div>");

 

// uncomment for custom css

var _hwbcss = "http://hwbot.org/css/style.external.custom.kingpincooling.css";

var _hwb = _hwb || [];

_hwb.push(['type={param}']);

_hwb.push(['params={option}']);

_hwb.push([_hwbtarget]);

 

(function() {

var hwbex = document.createElement('script'); hwbex.type = 'text/javascript'; hwbex.async = true;

hwbex.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://') + 'hwbot.org/js/exf2.js';

var s = document.getElementById(_hwbtarget); s.parentNode.insertBefore(hwbex, s);

})();

 

</script>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...