FAH Stats Sigs v2

Associate
Joined
27 Apr 2004
Posts
2,377
As I had mentioned in other threads, I've been working on a second version of the FAH stats sigs I made.

I started coding on Monday and think I've just about finished the main part. The most asked for feature in the new sigs was 24 hour credit averages, so I'm pleased to say that I have (hopefully) managed to get that working. I say hopefully because I only finished it today and will only really know if it works properly after having left for a few weeks.

At this point, the only remaining work to be done is to create an easy to use wizard for creating your URL (containing all the customisations you choose). However I'm going on holiday on Saturday and want to have a break from coding before I go so won't get the GUI done for a while (I started coding on Monday and have spent roughly half of my waking hours working on it).

For these reasons (and hints of impatience from people :p) I have decided to make what I currently have public. Before continueing though, I have three points to make:
  • Please bare in mind the system is incomplete and will be a lot easier to use when I've made the GUI
  • For a reason currently unknown to me, image generation was taking 5 seconds when I copied it all across to my dedicated server, yet takes roughly 0.25 seconds on my main desktop rig, so for this reason they are currently hosted on my main rig and so may be more susceptible to downtime
  • I'm sure I had a third point but I've forgotten what it was :(

That said, I shall get explaining. My worry is that some people may find it difficult to use in the current state, but impatience has got the better of me.

Statistics
The system supports nine different statistics, as follows:
  • grnk - Global user ranking (i.e. position with all other FAH contributers globally)
  • urnk - User rank (i.e. within Team OcUK)
  • unm - User name - the user name of the person whose stats are being shown
  • pts - User's Points count
  • wus - User's WU count
  • tpts - Total Team Points count
  • twus - Total Team WU count
  • trnk - Team rank
  • avg - User's Points average for last 24 hours (based on last 7 days)

Formatting Options
For every statistic described above, individual formatting options can be applied.
  • ang - Angle of the text. 0 is horizontal. Measured anti-clockwise.
  • size - Size of the font.
  • font - The font used. Must include ".ttf". e.g "Verdana.ttf" (this is the default). The server has all fonts which come as standard with Windows XP.
  • col - Colour of the text. Specified as a hexadecimal.
  • bor - Size of border around text in pixels. 0 disables.
  • brcl - Colour of border around text. Specified as a hexadecimal.
  • x - The X co-ordinate of the lower left corner of the text. Measured from the left of the background.
  • y - The Y co-ordinate of the lower left corner of the text. Measured from the top of the background.
  • en - Enables or disables displaying of the statistic. 0 disables. Default is enabled for all except grnk.
  • pre - The prefix to the actual statistic. e.g. "Username: " in "Username: piggott". Defaults exist and of course vary per statistic (would be stupid if it said "WUs: piggott"!)

Usage
A very basic example of a functioning URL:
http://fahstat.piggott.me.uk/?mode=use&uid=piggott which yields this:



From the above, you should be able to see the defaults for most formatting options. For example you can see that every statistic has a border of 1 pixel by default, the prefixes used (e.g. "Username: "), the approximate X and Y positions, that all the angles are 0 degrees etc. etc.

Further examples
en example
To use the formatting options, the alias of the option is combined with the alias of the statistic, with an underscore. An example of this would be avg_en, which would allow control over whether to show the average credit display. An example of a URL using the 'en' option is as follows:
http://fahstat.piggott.me.uk/?mode=...s_en=0&rnk_en=0&tpts_en=0&twus_en=0&trnk_en=0



As can be seen, this disables displaying of some statistics. We don't need to mention grnk, unm or pts because grnk is disabled by default and we want unm and pts to show.

X and Y example
As with 'en', the option is combined with the statistic, e.g. 'pts_x' and 'pts_y'.
An example of a URL is as follows:
http://fahstat.piggott.me.uk/?mode=...s_en=0&twus_en=0&trnk_en=0&pts_x=260&pts_y=55

 
(continued to new post because reached max image number per post)


Font
An example of a font specification would be 'pts_font=Impact.ttf'. Getting the hang of it now?

An example URL would be as follows:
http://fahstat.piggott.me.uk/?mode=...k_en=0&pts_x=260&pts_y=55&pts_font=Impact.ttf



Border
An example of a border specification would be 'unm_pts=2'.

An example URL would be as follows:
http://fahstat.piggott.me.uk/?mode=..._x=260&pts_y=55&pts_font=Impact.ttf&unm_bor=2



Colour
An example of a colour specification would be 'unm_col=FF0000'

An example URL would be as follows:
http://fahstat.piggott.me.uk/?mode=...&pts_font=Impact.ttf&unm_bor=2&unm_col=00FF00




I think that's enough examples now. Only things I haven't covered are ang, size, brcl, and pre. It should be pretty obvious how they work now. :)

Other Options

There are three other variables I haven't yet mentioned:
  • mode
  • uid
  • canvas

There are two options for mode: 'use' and 'edit'. Use tells the script you want it to give you an image, and edit gives you the image uploader page. In future it will be the way to access the GUI for URL creation. It defaults to 'edit', so http://fahstat.piggott.me.uk will give you the uploader (more on this in a minute).

uid is very simple. It is your FAH username, e.g. for me it's 'uid=piggott'.

canvas is one which I think a lot of people will like. It allows you to specify your own background. This is the reason for the image uploader. An example would be 'canvas=beta.jpg', and in a URL would look like this:
http://fahstat.piggott.me.uk/?mode=use&uid=piggott&canvas=beta.jpg



To use your own background you must first of all upload it by going to http://fahstat.piggott.me.uk. You can then specify it with the filename that you uploaded it with.

Final Notes
Since the system has only been collecting stats from today, the averages are not currently accurate (since it thinks that for the less recent 6 days everybody has been slacking and has no output. Assuming I haven't made any stupid mistakes with the coding, the averages should be accurate in a weeks time.

The purpose of this thread is two-fold; firstly to attempt to explain how to use the signaturues, and secondly, as a place to share configs. As you can tell from the very plain backgrounds used in the examples, I haven't yet spent any time on making backgrounds or configs. As such I thought it would be a good idea if people would share their URLs and backgrounds with people.

Oh and of course the third-purpose; bug-reporting (hope there aren't any, I really can't be bothered now).

Think that's everything I meant to say, so get creating people!
 
Can i be the first to say that is definately sticky worthy.
I think you should post it in the sticky if no-one objects.

Excellent work, i intend to make use of it soon. :)
 
Glad you appreciate it :)

After having just experimented around with a paint style version (as my sig now is), I realised something about fonts. I had assumed that the name of the font is just that which shows in MS Word etc. but with '.ttf' on the end. Wrong.

Better Explanation Of Fonts
For now, until I get the GUI working, the best way to explore what font options you have, is to go to 'C:\WINDOWS\Fonts' and take your pic from there (double click to preview). Like I already said, the server has all the standard Windows fonts and I would be quite happy to install additional fonts should people wish. To find out the correct name for the URL, right click on your chosen font and click properties. The name to use in the URL then shows in the text field at the top of the properties pane.

URL for anyone wishing to use Painterized version:

http://fahstat.piggott.me.uk/?mode=...rnk_bor=0&trnk_font=VINERITC.TTF&trnk_size=12

Just replace 'piggott' with your FAH username :)
 
Last edited:


oooops :p

I'll have a play tomorrow with a suitable pic to allow my silly name to fit in :)
looking very good so far though :cool:


edit: will the 24hr average correct itself given a full week of data or has something gone a bit wrong with it?
 
Just a quick question, how long is taking for the page to load for people roughly? And my sig, is it showing 'Team Rank: 48' in a different font at the top?

Reason for the mess is due to DNS changes. They work differently externally, due to me having a local DNS server on the LAN. Reason for the DNS changes is due to me taking it all back over to my desktop after realising the dedicated server was being too slow.

Thanks, null :)

edit - ignore this, I managed to test it as though from WAN :)
 
Last edited:
null said:
Final Notes
Since the system has only been collecting stats from today, the averages are not currently accurate (since it thinks that for the less recent 6 days everybody has been slacking and has no output. Assuming I haven't made any stupid mistakes with the coding, the averages should be accurate in a weeks time.
:)
 
the images are taking a little while to load (just did a ctrl+F5) - though not too bad really, 2-3 seconds for all the sigs in this thread so far

yep your team rank seems to be in some sort of handwriting font - i assumed that was part of the background image :p


ahhh should've read more closely - eyes burning so must be time for bed :o
 
Depends what you mean by stable really. Stable as in like the current state but with working averages and proven reliability or stable as in finished with the GUI for URL creation.
If it's the latter then I think pretty much the only thing necessary will be a link to the GUI, which should explain all. :)

If the GUI doesn't happen though, then extensive documentation will indeed be necessary. I would imagine/hope, that what I have already written in this thread would make a pretty good basis for it. As for who writes it, I really don't mind. You seem to have proved yourself very good at explaining things though BillytheImpaler so perhaps you could improve on what I've written in here and add that?

When I open this thread tomorrow, I expect at least 5 different template URLs and backgrounds available for people to play with. Get working people! :D :p

Actually another note about backgrounds, incase anyone had doubts:
The backgrounds can be in either png, jpg, or gif format.
They can be any resolution, the script doesn't need telling. Just don't go above 400x75 if using on here of course :)

Hope this helps, null :)
 
shadowscotland said:
btw can't uplaod jpg, jpeg or png files only gif - is their a 10k size limit?
I had set the file size limit to 50k when making it (OcUK limit is 20k I know but the output can get decreased by the system). Nowhere is a 10k limit specified.

I managed to reproduce the problem myself just now. The fix doesn't make any sense but I've set the limit to 100kB and it now works (no I wasn't out by factors of 10 or anything stupid).

shadowscotland said:
with background...somethings wrong

The URL you're using is this:
http://fahstat.piggott.me.uk/?mode=use&uid=lemonman_canvas=morgan.gif

Problem there is you have set your uid to 'lemonman_canvas' ;). With ALL variables specified in the URL, you should add a '&' beforehand, except for the first one (mode=use in this case). Not an underscore as you did. Hope this clears things up :)

Corrected URL looks like this:
http://fahstat.piggott.me.uk/?mode=use&uid=lemonman&canvas=morgan.gif

Yielding:



Hope this helps, null :)
 
Last edited:
thanks null - can't deleave I forgot the '&' need some time to get the hang of the code also (5 minutes between jobs at work is not enough)

Below are some extra backgrounds for people to play with - all based on proteins

edit: gif's removed to speed up load (and remove double images) - see null's post below for jpg I've uploaded
 
Last edited:
Excellent work there :D

Unfortunately you seem to have highlighted a bug I was unaware of; using gifs as backgrounds seems to cause havoc with everything;
1) Try refreshing the page a few times. Sometimes the images don't generate properly and have lines across, or no background showing/
2) Specifying colours for statistics seems to only work for one at a time, and others just don't show at all.

I will have a look into this later but if the solution isn't obvious I'm not going to spend ages on it. We can just use jpegs for now instead, which seem to work perfectly.

I've converted all of your protein backgrounds to jpgs and so the following URLs work properly:

http://fahstat.piggott.me.uk/?mode=...s_en=0&twus_en=0&trnk_en=0&pts&unm_col=FF6633


http://fahstat.piggott.me.uk/?mode=...s_en=0&twus_en=0&trnk_en=0&pts&unm_col=FFFFFF


http://fahstat.piggott.me.uk/?mode=...s_en=0&twus_en=0&trnk_en=0&pts&unm_col=FF6633


http://fahstat.piggott.me.uk/?mode=...s_en=0&twus_en=0&trnk_en=0&pts&unm_col=cccccc
 
oceaness said:
GUI to generate the url please ;)
Be ****** patient OK!? :p

This is the first real week of holiday I've had yet and I've spent half of it on this! (I'm relatively new to PHP so quite slow). If you read the first post, you'll see I fully intend to make a GUI, it's just a matter of when :)
 
Back
Top Bottom