PDA

View Full Version : LiquidNinjas.com DC Stats Sig


Player0
12-31-2002, 02:38 PM
Hello. I have created this thread in order to answer some FAQs regarding the DC Stats Sig program I created, and to keep everyone up to date as to changes I am making on the program without having to go to every site using the sig and explaining things. As I've started allowing other sites access to the program, I've been asked the same things over and over, so I'm hoping I can simply direct people to this thread in the future, or bookmark it if you are interesting in keeping tabs on my progress. Thanks, and happy crunching!

COMING SOON: I am working on a new project called DC Stats Suite, which is really version 3 of the whole coding process. Everything is getting rewritten from scratch this time, so it will take some time before this new program is finished. Due to the instability of the new code, I will not be allowing beta clients to run until the project is near completion.

Some of the enhancements to be featured in this new version are an HTML stats page with ranking ladder tracking. We will be switching to a much faster SQL database design. DC Stats will also be running on its own dedicated server, due to the demand of the thousands of people who use this program (and the hundreds of thousands of other people who view the stats). New caching technology will be put in place. The skinning engine should be ready by the release date (finally) for all those who have been asking for that. This small little program has developed in to a multi-app suite which is why I'm upgrading the name. The program is being cut down in to smaller modules which handle tasks more specifically and reduce load. ETA? Don't ask that either. Should be soon though :)

FAQ
~~~

Q: How does Stats Sig work?
A: Stats Sig is a PHP based program which polls the DC project websites every few hours via HTTP and downloads the stats data provided to a custom SQL database, which is used to display the results in a skinable format. The benefit is that stats are usually very up to date, and the speed of the Sig display is much faster than with real-time processors because of the SQL storage interface. Stats Sig is designed to be very flexible for future growth, and I hope to continue maintaing the code.

Q: Can I use the Stats Sig in my signature on another site?
A: Yes, absolutely. Stats Sig is free for everyone to use. If you are crunching for a team other than LiquidNinjas, you will need to make sure you set the xteam parameter, as the default is for team LiquidNinjas. Please see the instructions below for further information on this.

Q: What DC projects are currently supported by Stats Sig?
A: Currently, only Folding@Home and Seti work with Stats Sig. However, I've designed the code to be flexible in this area, and can add other DC projects if there is a desire for it. The only current planned addition is Seti2, when it is released later.

Q: Why does the Stats Sig seem to load so slow?
A: Unfortunately, the Stats Sig program performs on the fly processing as it generates the images you see. This is why it takes longer to load than a standard image. When used on other sites, the added time of connecting to the LiquidNinjas.com server is also added. And, with a page filled with dozens of signature images to process, the problem becomes compounded. However, a speedy sig is one of my project goals, and I will continue to work on optimizing the PHP and SQL to improve load times. I will also continue to make sure that LiquidNinjas.com servers are running at peak performance.

Q: Why doesn't my UserName work with the Stats?
A: I've tried to make sure that every username will work with the stats program. However, because of the nature of something called 'regular expressions', sometimes special characters can cause goofy things to go wrong. The first thing to check is to make sure you have your username spelled right. Secondly, make sure you have 'escaped' out certain characters. This is a commong URL type of thing. Make sure to replace instances of # with %23, instances of & with %26, and instances of / with %2f. If you still can't get it working, please ask your friends for help, and e-mail me at player0@liquidninjas.com as a last resort. Most names should work, but as I said, in some special instances, things may still break.

Q: Why do I sometimes see strange error messages?
A: I spent a lot of time adding error checking to the Stats Sig program. Common problems such as the SQL server not responding, or the Stats Servers themselves being down will return error messages. These problems will generally go away over time. Other times, bugs may sneak in to the code which I have to fix manually. Either way, please disregard error messages, they are really for my eyes only.

Q: What is 24h WU Avg and why does it display 0?
A: This feature displays your accounts daily WU producing average. Every day, the stats count how many WU you have produced, and average this against the previous days. The result shown here is a great indication of your true to life producing power. Because this stat needs at least one day to count data, the first 24 hours you have your Seti Sig installed, this stat will display 0. And no, this 0 is *not* averaged in to the rest of the average.

Q: What is the Ladder stat?
A: Ladder, or Rank Change, will display the amount of user ranks your account has gone up or down in the past day. For example, if you stomp someone on the stats ranking, and go from 3rd place to 2nd place, the Ladder field will display -1 for that day, and will later reset to 0 as you hold your new position.

Q: Will there be a Stomp feature?
A: Perhaps. I need to finish a few other features up first, but after that I may add a stomp-tracking feature which will allow you to select an opponant on the board, showing the difference in WU between you and him. If you are interested in this feature, be sure to let me know, and I will consider adding it.

Q: Can I use any skin I want for my Stats Sig?
A: Yes, although it is generally a good idea to use the skin endorsed by your DC team, by using the xskin parameter, you can specify the name of any skin of your liking. The only limitation is that each skin has DC specific information, that is, using a SETI skin on a F@H user account will display garbage.

Q: Can I display information from two different DC projects on the same skin?
A: No, not yet. This feature is still under development, and should be available soon. I've always planned on using this feature, and coded accordingly, so it should be easy to complete.

Q: Can I create my own custom skin?
A: No, not yet. This feature is also still under development. Although the skinning engine is in place, the user interface is not yet completed. In the mean time, I will *manually* create a general purpose skin for your DC team if you provide me with the background image and a list of items you would like to display. The skinning interface is next on my list of features.

Q: What sort of things can I display using my skin?
A: All fields displayed in the default skins will be available for you in making your custom skin. However, you don't have to use all the fields. A listing of addressable fields is listed on the Skinning User Interface, and you can simply select from the drop down boxes. You may select one background image of any size. This image must be in PNG-8 format, and may have transparancy if you would like. (Note: PNG Alpha Channel Blending doesn't work on all browsers yet, so please do not use this). Each stat you selected may display a text-label. You have a choice of about 5 different font-styles to use (pretty much just varies by size). You may display each label and each data item in which ever HTML color of your choosing. Labels may exist without a matching data-item (such as the title for the Sig Image). All items are placed using relative pixel-coordinates (with 0,0 being in the upper left hand corner of the background image). Please see the skinning interface for more information on all of these options.

Q: Can I use my own custom fonts, or change the way data-elements display?
A: Both of these are on the feature wish list. Currently, there is no easy way to display custom fonts, and making one would take a lot of work anyway. Changing the way data-elements display is a definate possibility. This means you can tell the program to display 10woots instead of 10wu, or say Player0 (2 of 19) instead of having those data-elements (username and rank) seperate. This is something I kind of want to add for myself (if for nothing else than to quickly beable to add paranthesis around certain data-elements), so may be added eventually. However, people creating their own custom skins will need an under standing of reg exp to format these fields away from default.

Q: What is a Skin Seed?
A: Yes, I made that name up, but it does make sense. Every skin the Stats Sig uses has an initial record called the Skin Seed. This Skin Seed is a SQL record that contains the Name, Password, and Background Image information for the rest of the matching skin records. When someone asks me to give them a custom skin, I will create a Skin Seed record. Then the user can use this Skin Seed to create their own custom elements. You can't create your own skin unless I provide you with a Skin Seed record. So, it's mostly a security device.

Q: Does my skin have to display LiquidNinjas.com?
A: Yes, it is the only rule I have for other teams using my Stats Sig program. However, you can make the LiquidNinjas.com credit as small and unobtrusive as you want in your skin, just so long as it is partially legible. My only reason for this rule is in order to get some recognition for the hard work I've put in to this project, and that I will continue to devote, as well as the bandwidth this program uses which LiquidNinjas.com will pay for.

Q: How can I get you to add a feature for me?
A: Please ask me on the boards or e-mail me at player0@liquidninjas.com, and I will be happy to consider all ideas. Although, because of time constraints and other projects, I may not be able to quickly add all features requested. If enough people ask for something, I will add it to the wishlist. The more people who make requests, the better as I would hate to add a feature just for one person when I could be spending that time doing something more people would make greater use out of.

Instructions
~~~~~~~~
The Stats Sig program which generates a .PNG image that can be displayed from any BBS allowing dynamic images. If your board does not support dynamic images, there's nothing you can do I'm afraid, except to bug your administrators to enable this feature. Many sites use different BBS software, so I can't explain how to install your signature in depth. But I can give some examples:

For vBulletin (remove the asterisk for this to work):
[img]http://www.liquidninjas.net/dc/ln_dc_sig.php?xuser=Player0[/*img]

Using HTML (some boards support this):
<img src="http://www.liquidninjas.net/dc/ln_dc_sig.php?xuser=Player0">

In both cases, the root URL stays the same. The URL always begins:

http://www.liquidninjas.net/dc/ln_dc_sig.php?

Then, you must supply parameters, such as xuser=Player0 which tells the Sig Stats program that Player0 is your FAH username. You can combine parameters using the & character. For example:

http://www.liquidninjas.net/dc/ln_dc_sig.php?xuser=Player0&xskin=f_marb

Which instructs the Sig Stats program that you want to display the Player0 FAH account using the f_marb skin. Below are a breakdown of other common parameters:

xuser=XXXX <- This paramater should hold your FAH username.

yuser=XXXX <- This parameter should hold your SETI username.

xskin=XXXX <- Overrides the default skin with a custom one.

xteam=XXXX <- Overrides the default team (Ln.com) with your own custom team ID.

xpass=XXXX <- Used with xskin, holds the password needed to edit the skin. (Not completed yet).

Changes/Fixes Log
~~~~~~~~~~~~
12/31/02 - Fixed F@H UserName bug which prevented users with some special characters in their names from using the Stats Sig.

12/31/02 - Fixed F@H UserRank bug which displayed the total number of processors instead of the total number of users.

12/28/02 - Increased stats websites poll rate from 6 hours to 3 hours in order to promote more accurate stats.

1/17/03 - Moved Stats Sig to the new LiquidNinjas.net server due to hosting problems. Performance boost though.

5/2/03 - *NEW* Modified Folding Average from 24h WU Average to Weekly Score Average.

Featurs on the Way
~~~~~~~~~~~~~
Skinning Interface
SETI/F@H Combo Stats
Stomp Tracker
Custom Fonts
Customizable Results display