Jump to content
HWBOT Community Forums

Integrated Forum rankings - v2


Recommended Posts

How to install tags on vbulletin

If you 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 =

(if you want custom css, uncomment // var _hwbcss = "http://HWBOT.org/css/style.external.custom.ocforums.css"; and replace with own css)

<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=team=madshrimps_belgium_oc_team,app=wprime_-_32m]submissionranking[/HWBOT] (remove space in tag)

Use {option} = YES

 

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

[ HWBOT=team=madshrimps_belgium_oc_team,app=wprime_-_32m,10]submissionranking[/HWBOT]

will =>

[HWBOT=team=madshrimps_belgium_oc_team,app=wprime_-_32m,10]submissionranking[/HWBOT]

 

With custom css, the integration with your forum is seamless:

attachment.php?attachmentid=823&stc=1&d=1276264731

 

How to install tags on blog/html site

You can also use the new forumtag on your blog or website, if you directly use the javascript.

 

Replace {param} with team, member, membergoal, teamgoal, submission, etc.

Replace {option} with the parameters, eg "bench_tec_uk" or "app=wprime,cooling=air".

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

 

Full set of supported tags:

 

Supported tags:

 

display member info:

[ HWBOT=massman]member[/HWBOT]

Renders as (removed space in [ HWBOT]):

[HWBOT=massman]member[/HWBOT]

 

display team info:

[ HWBOT=pure]team[/HWBOT]

Renders as:

[HWBOT=pure]team[/HWBOT]

 

display submission ranking

[ HWBOT=app=wprime_-_32m,cooling=Water Cooling,country=germany]submissionranking[/HWBOT]

Renders as:

[HWBOT=app=wprime_-_32m,cooling=Water Cooling,country=germany]submissionranking[/HWBOT]

 

display member ranking

[ HWBOT=app=CPU-Z,country=us,team=pure]memberranking[/HWBOT]

Renders as:

[HWBOT=app=CPU-Z,country=us,team=pure]memberranking[/HWBOT]

 

display team ranking

[ HWBOT=region=europe]teamranking[/HWBOT]

Renders as:

[HWBOT=region=europe]teamranking[/HWBOT]

 

display submission info:

[ HWBOT=949325]submission[/HWBOT]

Renders as:

[HWBOT=949325]submission[/HWBOT]

 

display team objective (beat next best ranked team)

[ HWBOT=pure]teamgoal[/HWBOT]

Renders as:

[HWBOT=pure]teamgoal[/HWBOT]

 

display user objective (beat next best ranked user)

[ HWBOT=genieben]membergoal[/HWBOT]

Renders as:

[HWBOT=genieben]membergoal[/HWBOT]

 

team members tag

[ HWBOT=bench_tec_uk]teammembers[/HWBOT]

Renders as:

[HWBOT=bench_tec_uk]teammembers[/HWBOT]

 

new submissions tag

[ HWBOT=]newsubmissions[/HWBOT]

or [ HWBOT=team=oc_forums]newsubmissions[/HWBOT]

Renders as:

[HWBOT=]newsubmissions[/HWBOT]

Edited by Devroush
Link to comment
Share on other sites

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

What do you mean with no longer recorded?

 

i4memory members for bench app wprime - 32m:

[ hwbot=app=wprime_-_32m,team=i4memory.com]submissionranking[/hwbot]

=>

[hwbot=app=wprime_-_32m,team=i4memory.com]submissionranking[/hwbot]

 

I'm still tweaking the available options and the "view all" link. Currently it doesn't take into account the options you specified.

Edited by Devroush
Link to comment
Share on other sites

i meant

 

for example

 

wprime 32mb

1. PURE

2. teamname2

3. teamname3

 

etc etc so we see how each team ranks in individual benchmarks

 

Also can't see to get blog/html code to work in wordpress 2.9.2 created pages ? It's just blank http://i4memory.com/wp/hwbot-team ?

 

edit okay see my problem line breaks in the code heh

 

for some strange reason wordpress wants to add a <p> replacement for this part of the code

 

alt='loading' /> Loading…</div>

<p>");

 

hmmm

 

okay found problem had to disable wordpress from auto removing and hiding paragraph tags but wordpress readds them lol

Edited by eva2000
Link to comment
Share on other sites

Thanks Frederik, really coming along nicely.

 

Can you make a sig tag available? OC Forums has a very strict sig policy, and image based sigs aren't permitted to maintain the readability of threads without flashy graphics between each post. I could change the rules, but I want to stick to our goals of maintaining readability and unobtrusive sigs (no images).

 

Ideally, I'd like to make a custom BBcode tag available for our benching team, which will display similar information contained within the image based sigs, however it will use this text based API and display the information in 4-5 lines or less.

 

This would be similar to the following tag, but it would display the member's rank, their team name and team's rank, and maybe 1 or 2 recent submissions all in 4-5 lines or less (the fewer the better). I would implement this via a custom BBcode which would be the only benching stats bbcode permitted in sigs:

[ hwbot=massman]member[/hwbot]

Link to comment
Share on other sites

I have to think about it I.M.O.G., I don't know whether using the bot for this would be a good approach. When using Chrome or Safari (which have a really fast, really lightweight rendering kit, thanks Apple!) the rendering of iframe's does not take a noticable load of the client browser, but 10 or 20 signatures with iframes would not load fluently when using ie6/7 or even firefox.

Link to comment
Share on other sites

I use chrome and sometimes I forget about stuff like that. Good point, I don't think that's the way to go.

 

Essentially, my goal is to do the banner based sigs hwbot does but in a way that appears like text and fits with our site. It gives people the team stats they want to present, while not changing the rules for the site regarding image based sigs.

 

EOC Folding stats is an example of sig stats we are implementing right now, and I think you could probably do something similar with hwbot. How hard would it be for you to do something like the following? With sig images like this, I can create custom bbcodes like this which blend in with our site very well. It doesn't have the rendering problems which the current javascript based API does.

 

[ fstats]6238[/fstats ] = sigimage.php?u=6328&c1=FFFFFF&c2=333333&c3=333333&c4=333333&c5=FFFFFF

 

I could probably put something together myself with a bit of work, but I wouldn't know how I can use the hwbot data in a friendly way (scraping your pages and caching it on our site would be a no-no).

Edited by I.M.O.G.
Link to comment
Share on other sites

Well, I now our signature creator is in dire need of upgrading, but you could make a simple signature using the ocforums background. Then, you could create a [hwbotsig]user_id[/hwbotsig] which maps to [ url=http://hwbot.org/community/user/richba5tard][ img]http://www.hwbot.org/signature/u<user_id>.png[/img][/url]

or

<a href="http://hwbot.org/community/user/richba5tard"><img src="http://hwbot.org/signature/u<user_id>.png" alt="hwbot signature" /></a>

 

It's not easy to find your user id though, we almost always use the url friendly name in the url. If you want, i can create a http://hwbot.org/signature/n<user_name>.png mapping which fetches the signature by user name.

Link to comment
Share on other sites

No need to do the mapping, we can give instructions for people to grab their userid from the storage path line here:

http://hwbot.org/profile.images.do

 

The way you suggested would "work", but people could use different backgrounds, fonts, and text layouts. With the folding stats example, the bbcode controls all formatting, and all the user has to do is insert their userid. It's very simple, just presents the stats, and impossible to mess up or tweak which means we don't have to police sigs.

 

So right now with the way things are, I could make the following available - however anyone could choose to use different background and text font if they want (and whatever they chose would only look right on our forum, no where else).

[attach]830[/attach]

 

I think the easiest solution for me, given the special needs I'm looking for, would be to get a daily export of the team stats from hwbot and pump that into a sql db so that I can use the following PHP to create the images we want:

http://us3.php.net/manual/en/ref.image.php

 

You could do the same thing, but it would be a decent bit of work, and most people are happy with your image sigs already - I don't really think it makes sense for you to spend the time doing it. On the other hand, I can't do it unless I have the raw data available - I'd need daily exports something like what the F@H project offers. Then from that, I could hack something together to present the sig data we are looking for. Probably also doesn't make sense for you to export your raw data. :-/

Link to comment
Share on other sites

The plain xml api exists for a few years now, but is barely used hence we don't plan to extend or even support it anymore.

 

You can however retrieve the (x)html directly, server side, and cache or process it. That's what we do on our local forums: instead of populating an iframe with javascript, we make a direct http get request to the same html page using php, and cache the response on the server. It works faster, but you need a tiny bit php/jsp/... knowledge.

Link to comment
Share on other sites

We could do that of course, but it's preferable with a solution that doesn't depend on your presentational format, for both parties. If we were to parse the html for raw data it would lock both of us to that format since a change on your end could break it, unless there is an option to request a specific version of it. Still, it's unnecessary to do this over html. There is nothing preventing us from caching xml either, for clients on our end there wouldn't be any difference.

 

How come you are discontinuing the xml api?

Link to comment
Share on other sites

Like said, the xml api has existed for a few years and except for i4memory nobody used it. Now the xml api data is outdated (it doesn't support the new ranking concepts, cooling, countries and regions, etc) and the framework used does not support caching in any way (so no option for hightraffic useage).

 

If someone would actively make use of the xml api, I think we need to think about which data we want to provide, and start from scratch with a more decent architecture.

Link to comment
Share on other sites

what discontinuing xmp api NOOOO after I finally figured out to how to properly filter/check your xml feed for validity before overwriting the local cache xml version heh

 

but yeah i understand the demand isn't that great and leaving the option to cache xml feed of hwbot.org up to end users is risky in case overload hwbot.org servers

 

it's been a great learning experience getting revision 4 php code to work with hwbot xml api. Had some problems it seems that if hwbot api xml feed is called from http://www.hwbot.org the xml file i cache locally is corrupted with 400 bad request. If called from non-www hwbot.org link the xml file is cached locally without problem !

 

Got the wordpress <p> issue fixed http://i4memory.com/wp/hwbot-team - decided to just bypass the front end and go right into template code - also will be able to pull in custom api xml data on the page - well until you discontinue the feed :o

Edited by eva2000
Link to comment
Share on other sites

Hey eva2000, I won't remove it as long as you use it, I just don't want to extend it in it's current form. The XML api needs a rev2, and this time I need feedback from the community dev's to see what is needed and wanted. :)

That's great news to hear :)

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