Jump to content
HWBOT Community Forums

HWBOT Integrated Forum rankings


Recommended Posts

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

Yes, it could be that I drop the limit option all together in the final release. Otherwise a) it might be quite heavy to render b) people don't need to visit hwbot any more. :D I think I'm going to set it fixed to 10 or 20 and include a link "see all" in the tag.

Link to comment
Share on other sites

[hwbot=bench_tec_uk]teamgoal,height=400px[/hwbot]

 

 

i would like to have this feed at the side or top of the forum page @ benchtec

 

so we could see it all the time RB do you have any mods to do this with VB

 

or link me to such a mod/how to

 

thanks baz

Edited by bazx
Link to comment
Share on other sites

lol have a look @ benchtec forum rb

 

i get an error

 

here is an image

 

http://www.benchtec.co.uk/images/baz/tag2.gif

 

text in the error

 

 

Failure...

 

Sorry, an error occured: Unkown category chosen, available categories: submissionranking, memberranking, teamranking, member, team, competition, submission, newsubmissions, teamgoal, membergoal, teamrank

 

 

 

 

this is the code i should use ?

 

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

Edited by bazx
Link to comment
Share on other sites

this is the code i should use ?

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

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

 

If i read it right, you need to customise these options to pick what type of info to display mate.

 

Try:

 

_hwb.push(['type=teamrank']);

_hwb.push(['params=bench_tec_uk']);

 

And choose any of the following for the first one of the two:

 

submissionranking, memberranking, teamranking, member, team, competition, submission, newsubmissions, teamgoal, membergoal, teamrank

Link to comment
Share on other sites

A known problem with iframes (the technology used for the tags) is that browser security prevents the iframe to resize itself. This can cause an issue as sometimes the tag takes a bit too much space (a lot of padding at the bottom) or too little (a scrollbar appears).

 

There is a workaround though. If you copy this html file on the same server as the tag displays on, the tag can resize itself.

 

<html>
<head>
	<title>reply hwbot</title>
</head>
<body>
	<script type="text/javascript">
		var targetFrame = getParam('tf');
		var height = getParam('height');

		if (height && targetFrame){
               var parentdoc = window.parent.parent.document;
               var frames = parentdoc.getElementsByTagName('iframe');
               var i = 0;
               while (i < frames.length){
                   if (frames[i].id == targetFrame){
                       frames[i].style.height=height;
                       break;
                   }
                   i++;
               }
		}

		function getParam( name )
		{
		  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
		  var regexS = "[\\?&]"+name+"=([^]*)";
		  var regex = new RegExp( regexS );
		  var results = regex.exec( window.location.href );
		  if( results == null )
		    return "";
		  else
		    return results[1];
		}
	</script>
</body>
</html>

 

Adjust your script (notice var _hwbreply = 'http://<yourserver>/reply.html';):

If you upload the html to http://benchtec.co.uk/forums/hwbotreply.html, you should add _hwbreply = 'http://benchtec.co.uk/forums/hwbotreply.html'

 

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 _hwbreply = 'http://<yourserver>/reply.html';
   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]teamranking[/hwbot ] (remove space in tag)

Use {option} = YES

 

And from now on the tag should always be the correct height. :) It's untested in IE, so feedback is appreciated. :)

Link to comment
Share on other sites

[ hwbot=massman]member[/hwbot]

 

the tags it puts out are in complete @ benchtec

 

when asked i enter bazx and this is the resulting string

 

[ HWBOT=bazx][/HWBOT]

 

 

but if i manually add "member"

 

[ HWBOT=bazx]member[/HWBOT]

 

it out puts my stats fine

Edited by bazx
Link to comment
Share on other sites

I'm sorry, I don't follow you. "member" is in the list it outputs.

 

"teammembers" is not publicly available, it's on the test server.

 

- edit -

 

You mean when using the vbulleting editor, bot icon? I have no control over what the editor exactly does when you click the button... so you will have to enter member/team/etc manually.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...