Message boards :
Number crunching :
JavaScript Stats
Message board moderation
Author | Message |
---|---|
SuperNova Send message Joined: 3 Apr 99 Posts: 15 Credit: 1,569 RAC: 0 |
I've written a script that allows people on servers not supporting PHP or some other server language to display their statistics numerically. This is done by using JavaScript includes, and a function to display the variables created by this include. This method works on such servers as GeoCities and Tripod. Thanks to Petrus - my code parses the WAP files and some of that code is derived from his. Check out this quick demonstration page: JavaScript stats demo My to-do list for this is as follows: - Make it possible to display multiple projects at the same time, by storing the variables in arrays (sah[] and cpdn[]). Maybe extend this further so that multiple users can also be displayed. - Make some include files with pre-made table writing functions that are ready for use. - Make a PHP include file that does the same purpose, just writing to PHP variables rather than JavaScript ones. Of course using the image file would look nicer, this is just for anyone who wants to display in tabulated form. I'm looking into making a custom image as well, mostly for my own use but perhaps usable for others. <p> <img src="http://www.infinisoft.34sp.com/boinc/signature.php?project=sah&id=7813418" border="0" /> </p> |
Petrus Send message Joined: 29 Jan 04 Posts: 63 Credit: 32,086 RAC: 0 |
Hi Supernova, great idea, indeed! because of the prices for php-webspace, this can be useful for quite a lot! >I'm looking into making a custom image as well, ... does JavaScript provide any image creation fuctions? I would say no, but I'm not very experienced in that... ;) Petrus ___<br> <img src="http://boincwapstats.sourceforge.net/counter.php?id=454210&style=2"> <a href="http://tinyurl.com/5klcp">Use</a> / <a href="http://petrus.homeftp.org/scripting/download/count.php?id=6">Download</a> |
SuperNova Send message Joined: 3 Apr 99 Posts: 15 Credit: 1,569 RAC: 0 |
> Hi Supernova, > > great idea, indeed! because of the prices for php-webspace, this can be useful > for quite a lot! Thank you! > >I'm looking into making a custom image as well, ... > > does JavaScript provide any image creation fuctions? I would say no, but I'm > not very experienced in that... ;) > > Petrus > Not exactly. I was going to make an image using PHP, but it is possible with JavaScript/HTML by using background images. Doing it this way can make the JavaScript stats look almost like a PHP-generated signature! Later on today I will update the script so that the stats are accessed like such: SAH[user_id][stat_name] CPDN[user_id][stat_name] This will be the final format, so don't use the script yet until these changes have been made. <p> <img src="http://www.infinisoft.34sp.com/boinc/signature.php?project=sah&id=7813418" border="0" /> </p> |
SuperNova Send message Joined: 3 Apr 99 Posts: 15 Credit: 1,569 RAC: 0 |
I've updated the script a bunch. It should now be possible to include multiple users across multiple projects. The variables to be used have a revised syntax. Heres the updated documentation for it: JavaScript Stats The HTML in the example pages should make it easy to learn how to implement. <p> <img src="http://www.infinisoft.34sp.com/boinc/signature.php?project=sah&id=7813418" border="0" /> </p> |
Janus Send message Joined: 4 Dec 01 Posts: 376 Credit: 967,976 RAC: 0 |
I tried something like this on BOINC.dk a while ago. It turned out that a lot of people had problems using it due to security meassures in their browsers. Some browsers simply wouldn't allow loading of off-site javascripts or something like that. Here's how far I got before realizing that it wasn't going to work out: The testpage If you somehow solved this problem I will be glad to know how =) |
SuperNova Send message Joined: 3 Apr 99 Posts: 15 Credit: 1,569 RAC: 0 |
> I tried something like this on BOINC.dk a while ago. It turned out that a lot > of people had problems using it due to security meassures in their browsers. > Some browsers simply wouldn't allow loading of off-site javascripts or > something like that. > > Here's how far I got before realizing that it wasn't going to work out: > The testpage > > If you somehow solved this problem I will be glad to know how =) > I haven't heard of such a problem. I do notice that on your page a tag is missing from the overview table and that seems to prevent it from showing. I'm considering an IFRAME page as well that should work well even for JavaScript-disabled browsers. <p> <img src="http://www.infinisoft.34sp.com/boinc/signature.php?project=sah&id=7813418" border="0" /> </p> |
Petrus Send message Joined: 29 Jan 04 Posts: 63 Credit: 32,086 RAC: 0 |
I know that problem, too. For instance, Proxomitron (a proxyserver that I use) blocks the script by default. Unfortunately, I don't think an iframe can solve that problem because in the end, the page is put together by the browser. Petrus ___<br> <img src="http://boincwapstats.sourceforge.net/counter.php?id=454210&style=2"> <a href="http://tinyurl.com/5klcp">Use</a> / <a href="http://petrus.homeftp.org/scripting/download/count.php?id=6">Download</a> |
SuperNova Send message Joined: 3 Apr 99 Posts: 15 Credit: 1,569 RAC: 0 |
> I know that problem, too. For instance, Proxomitron (a proxyserver that I use) > blocks the script by default. > > Unfortunately, I don't think an iframe can solve that problem because in the > end, the page is put together by the browser. > > Petrus > Thanks for the info. <p> <img src="http://www.infinisoft.34sp.com/boinc/signature.php?project=sah&id=7813418" border="0" /> </p> |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.