live stats on logbook home page

Not sure where you should be posting? Put it here.
User avatar
Citroen
SpamTeam
Posts: 8017
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Post by Citroen » May 25th, 2007, 1:51 pm

c2bill wrote: My Lifetime Meters on a Concept2 Indoor Rower:
<IMG SRC=.../media/counters/counter1234556.gif>

I would re-create the .gif each time you enter a result into the log. This woudl allow the addition of these counter gifs into nearly any application - from email to signatures to blogs...

thoughts on this approach?

-bp
We've got that sort of idea running at http://c2ctc.com/make_image.php where you can create the image with PBs for use in the forum sigs. It even generates the BBCode you need to paste into here. It works and lots of users are happy to use it - because it's simple.

Image

Code: Select all

[img]http://www.c2ctc.com/sigs/img1162228476.png[/img]

User avatar
c2bill
1k Poster
Posts: 170
Joined: March 15th, 2006, 6:26 pm
Location: Vermont, USA

Post by c2bill » May 25th, 2007, 2:34 pm

thats cool - this is exactly the idea - i wasn't going to try to pull best times across the board - but could possible do.

php has better built in image mgmt stuff so i'm trying to sort out what .net can do...

bp

User avatar
Citroen
SpamTeam
Posts: 8017
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Post by Citroen » May 25th, 2007, 6:36 pm

c2bill wrote:thats cool - this is exactly the idea - i wasn't going to try to pull best times across the board - but could possible do.
I was thinking about that - I don't know if you need to do it.

Daren did make the c2ctc.com image generator store a cookie, so once you've entered your PBs they'll be remembered when you go back to the site to update the image. So you may be able to leave that option for version 2.0

One thing that might be fun would be pulling the total metres data from
http://www.concept2.com/sranking03/chal ... gs2008.asp but qualified with ?univ=%22SUB%2D7+IRC%22
as a simple graphic for MY team.

User avatar
c2bill
1k Poster
Posts: 170
Joined: March 15th, 2006, 6:26 pm
Location: Vermont, USA

Post by c2bill » May 31st, 2007, 12:55 pm

citroen and others:

i have a new gadget going that asks for ranking ID and then displays your personal total meters - however it only works once...

on refresh the ranking ID# is forgotten. you can see it here:

http://concept2.com/sranking03/rss/personal_gadget.xml

(add to iGoogle by using 'add stuff' and then click on 'add by url')

any ideas on how to make ranking ID "sticky"?

-bp

User avatar
Citroen
SpamTeam
Posts: 8017
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Post by Citroen » May 31st, 2007, 4:37 pm

c2bill wrote: any ideas on how to make ranking ID "sticky"?

-bp
Stop sending

Code: Select all

<META HTTP-EQUIV="REFRESH" CONTENT="10;URL=http://www.concept2.com/sranking03/small_counter.asp">
Or change your ASP program to send

Code: Select all

<META HTTP-EQUIV="REFRESH" CONTENT="10;URL=http://www.concept2.com/sranking03/small_counter.asp?user=142454">
The current refresh META tag wipes out my user=142454 parm after the first turn. So ten seconds later my personal metres don't turn up.

User avatar
c2bill
1k Poster
Posts: 170
Joined: March 15th, 2006, 6:26 pm
Location: Vermont, USA

Post by c2bill » June 1st, 2007, 10:06 am

that was easy...


the gadget feed now displays live (or nearly live) totals for the user -

http://www.concept2.com/sranking03/rss/ ... gadget.xml

you'll have to enter your ranking ID# to feed stats - this number is found under your 'profile' panel on the ranking.

yesterday the gadget feed was loaded over 150,000 times...

-bp

User avatar
jessbern
Paddler
Posts: 4
Joined: February 20th, 2007, 10:12 pm
Location: Verona, WI

Post by jessbern » June 7th, 2007, 1:33 pm

Is there a way to "get" my live lifetime meters and average daily meters (just the numbers)? I'm not much of a developer, but I have a vision for my ideal personal stats gadget and I wouldn't mind tinkering with it.

It would have:
- a mark along a horizontal bar that displays my progress toward a million meters (or more generally, the next million), like I've seen in some signatures on the forum.
- a label at the right end of the bar indicating the projected date I should reach the next million meters (based on my average daily meters)
- a chart that indicates my standing for each of my ranked workouts. My thought for this is a series of vertical lines (of equal length), with a hash mark indicating my standing. Obviously, this would also require getting my standing percentage and the total number of standings for each of my ranked workouts.

User avatar
Citroen
SpamTeam
Posts: 8017
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Post by Citroen » June 7th, 2007, 7:41 pm

If you use http://concept2.com/sranking03/small_co ... ser=142454 (with your ranking ID number)

You can get the raw HTML. It's a bit ugly and could do with some nicely named <DIV></DIV> containers wrapped round the raw data (to make scripting easier). I'd also like Bill to generated that as XML (rather than HTML) with some nice <TAGS></TAGS> round each data item as that's more versatile.

Code: Select all

<HTML>
<HEAD>

<META HTTP-EQUIV="REFRESH" CONTENT="30;URL=http://www.concept2.com/sranking03/small_counter.asp?user=142454">
</HEAD>

<STYLE>
	table {font-family: Helvetica, sans-serif; font-size: 10px}
</STYLE>

<BODY>
<FONT SIZE=-2 FACE=arial>

Dougie Lawson's total: 6,275,000m<BR>
Season Total: 562,336,832m<BR>

 Last Entry: Steve V. GBR 452m


Total Online: 793<BR>

<TABLE><TR><TD>Team</TD><TD>#</TD><TD>Distance</TD></TR><TR><TR><TD>Free Spirits</TD><TD>232</TD><TD>39,886,009</TD></TR><TR><TD>Age Without Limits</TD><TD>101</TD><TD>20,635,360</TD></TR><TR><TD>Iron Oarsman</TD><TD>80</TD><TD>12,524,452</TD></TR><TR><TD>Ancient Mariners - The Ancients Organization (TAO)</TD><TD>35</TD><TD>8,157,852</TD></TR><TR><TD>SUB-7 IRC</TD><TD>39</TD><TD>7,585,098</TD></TR>


</FONT>
</BODY>
</HTML>
Parse that with Javascript and you can pluck out your metres. You can then feed those into one of those pretty webcounters as a mash-up.

The technology is: soap, web 2.0, ajax, json, rest and stuff to do that.
jessbern wrote:It would have:
- a mark along a horizontal bar that displays my progress toward a million meters (or more generally, the next million), like I've seen in some signatures on the forum.
- a label at the right end of the bar indicating the projected date I should reach the next million meters (based on my average daily meters)
- a chart that indicates my standing for each of my ranked workouts. My thought for this is a series of vertical lines (of equal length), with a hash mark indicating my standing. Obviously, this would also require getting my standing percentage and the total number of standings for each of my ranked workouts.
So at the moment that's not going to be easy.

User avatar
c2bill
1k Poster
Posts: 170
Joined: March 15th, 2006, 6:26 pm
Location: Vermont, USA

Post by c2bill » June 8th, 2007, 10:30 am

citroen - i'm hardly an XML expert - but have experimented with xml feeds from .asp pages - can you give me a feel for the format of the data structure and i'll try pulling an xml feed together?

also i'm happy to fomat the counter page any way that makes it work better... if you'd like i'll email you the basic page code - or you can email me revised html output and i'll add that to the source.

-bp

User avatar
Citroen
SpamTeam
Posts: 8017
Joined: March 16th, 2006, 3:28 pm
Location: A small cave in deepest darkest Basingstoke, UK

Post by Citroen » June 8th, 2007, 2:45 pm

Bill,

Email it to me. There's an email link at the bottom of each posting.

For the XML I'd expect you to generate something like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<UserStats>
 <RankingId type="integer">142454</RankingID>
 <name>Dougie Lawson</name>
 <metres type="integer">6275000</metres>
</UserStats>
<WorldWideStats>
 <metres type="integer">573350866</metres>
 <TotalOnline>1005</TotalOnline>
</WorldWideStats>
<LastEntry>
 <name>Marty T.</name>
 <country>USA</country>
 <metres type="integer">15000</metres>
</LastEntry>
<TeamStats>
  <Concept2Team>
    <id type="integer">1</id>
    <members type="integer">232</members>
    <metres type="integer">40548775</metres>
    <name>Free Spirits</name>
  </Concept2Team>
  <Concept2Team>
    <id type="integer">2</id>
    <members type="integer">104</members>
    <metres type="integer">22055082</metres>
    <name>Age Without Limits</name>
  </Concept2Team>
  <Concept2Team>
    <id type="integer">3</id>
    <members type="integer">80</members>
    <metres type="integer">12751253</metres>
    <name>Iron Oarsman</name>
  </Concept2Team>
  <Concept2Team>
    <id type="integer">4</id>
    <members type="integer">35</members>
    <metres type="integer">8282119</metres>
    <name>Ancient Mariners - The Ancients Organization (TAO)</name>
  </Concept2Team>
  <Concept2Team>
    <id type="integer">5</id>
    <members type="integer">40</members>
    <metres type="integer">7763814</metres>
    <name>SUB-7 IRC</name>
  </Concept2Team>
</TeamStats>
For the HTML I'd wrap a few <DIV></DIV><p> tags round the sections.

Code: Select all

<div name='userstats'>
Dougie Lawson's total: 6,275,000m<BR>
</div>
<p>
<div name='worldwidestats'>
Season Total: 573,494,110m<BR>
<!-- I've moved this element -->
Total Online: 996<BR>
</div>
<p>
<div name='lastentry'>
 Last Entry: Tom D. USA 7562m
</div>
<p>
<div name='teamstats'>
<TABLE>
 <TR>
  <TH>Team</TH>
  <TH>#</TH>
  <TH>Distance</TH>
 </TR>
 <TR>
  <TD>Free Spirits</TD>
  <TD align=right>232</TD> 
  <TD align=right>40,554,248</TD>
 </TR>
 <TR>
  <TD>Age Without Limits</TD>
  <TD align=right>104</TD>
  <TD align=right>22,085,168</TD>
 </TR>
 <TR>
  <TD>Iron Oarsman</TD>
  <TD align=right>80</TD>
  <TD align=right>12,751,253</TD>
 </TR>
 <TR>
  <TD>Ancient Mariners - The Ancients Organization (TAO)</TD>
  <TD align=right>35</TD>
  <TD align=right>8,307,119</TD>
 </TR>
 <TR>
  <TD>SUB-7 IRC</TD>
  <TD align=right>40</TD>
  <TD align=right>7,787,190</TD>
 </TR>
</TABLE>
</div>

Post Reply