live stats on logbook home page

Not sure where you should be posting? Put it here.
User avatar
c2bill
1k Poster
Posts: 170
Joined: March 15th, 2006, 6:26 pm
Location: Vermont, USA

live stats on logbook home page

Post by c2bill » May 17th, 2007, 5:28 pm

i've quietly added a live stats feed to the header bar in the online logbook/ranking (only those who's profile is set to American English currently see the live stats link - i've emailed david in UK to ask him about including in the UK text).

i'm enthralled by the steady stream of rowers putting in meters -and the occasional photo.

First a question - any javascript fiends know how to stop the image flicker on reload? (I'm using AJAX to pass dB info back to page).

Second - a thought. I'm working on a way to allow those of you with blogs/myspace/misc web pages to include a live stats feed from the ranking - potentially configurable (ie show me live stats for only people who are in xx country or xx team).

Any interest?

-bill

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

Post by Citroen » May 17th, 2007, 7:14 pm

Code: Select all

<div align=right valign=bottom id="liveHTML" onclick="refreshHTML()"><FONT COLOR="white" SIZE=-1>click here to load live stats...</FONT></div>
	  </td>
Doesn't work in Firefox. It gets

Code: Select all

<h1>Length Required</h1>
in my Firebug (javascript debugger) console.

For a blog feed how about show me the stats for ID # 142454 (insert suitable number here).

User avatar
PaulS
10k Poster
Posts: 1212
Joined: March 16th, 2006, 12:07 pm
Location: Washington State, USA
Contact:

Post by PaulS » May 17th, 2007, 8:51 pm

Do what you want, but how about doing it without autorefresh every 10 seconds. :twisted:

Each time the page is loaded will be fine, I would think.
Erg on,
Paul Smith
www.ps-sport.net Your source for Useful Rowing Accessories and Training Assistance.
"If you don't want to know the answer, don't ask me the question."

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

Post by c2bill » May 17th, 2007, 9:00 pm

yeah - the auto refresh bugs me too... take a look now - it writes out a link now instead...

i'll work on firefox now...

User avatar
PaulS
10k Poster
Posts: 1212
Joined: March 16th, 2006, 12:07 pm
Location: Washington State, USA
Contact:

Post by PaulS » May 18th, 2007, 12:22 pm

Now this is just spooky!

I went to the online log and clicked for the live stats and this is what came up.

Season: 256,792,428m
latest entry: PAUL S. USA 5000m
online now: 1080

What are the odds of that? BTW - the Paul S. listed isn't me. :D

Perhaps I should go get a lotto ticket. :lol:
Erg on,
Paul Smith
www.ps-sport.net Your source for Useful Rowing Accessories and Training Assistance.
"If you don't want to know the answer, don't ask me the question."

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

Post by c2bill » May 18th, 2007, 1:02 pm

citroen - i like the idea of a personl blog feed.

what stats would you like to see?

Total Meters rowed this season by you
total meters rowed this season by everyone
team affiliation?
team totals?
ranked pieces and their live position?
profile picture?

other?

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

Post by Citroen » May 18th, 2007, 5:44 pm

c2bill wrote:citroen - i like the idea of a personl blog feed.

what stats would you like to see?
  1. Total Meters rowed this season by you
  2. total meters rowed this season by everyone
  3. team affiliation?
  4. team totals?
  5. ranked pieces and their live position?
  6. profile picture?
other?
#1 is the only thing I was thinking of.
#2, #4 are nice.
#5 would need to be a separate feed.
Dougie Lawson
57yrs, 172cm, Almost LWt (in my dreams).
Twitter: @DougieLawson
Image

User avatar
johnlvs2run
Half Marathon Poster
Posts: 3752
Joined: March 16th, 2006, 1:13 pm
Location: California Central Coast
Contact:

Post by johnlvs2run » May 19th, 2007, 1:11 am

The dates of ranking events aren't showing up in the profiles any more.

It would be nice to keep having these - if possible.
73 5'8 155
age 70+ world record pace per weight percentages
skierg: 100m 87.4 / 500m 86.2 / 1k 85.9 / 2k 89.4 / 5k 89.0 / 30' 89.6 / 10k 92.2 / 60' 92.0 / 21k 93.6
bikeerg: 1k 83.5 / 4k 85.2 / 30' 89.1 / 60' 89.2 / 40k 85.6 . . . my training log
#NoMask #NoTest #NoLockdown #NoRestrictions

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

blog feed

Post by c2bill » May 23rd, 2007, 1:32 pm

citroen and others:

i'm working on a way to have a 'blog' and forum signature feed that would provide some stats from the ranking/log. My question concerns the format that i need to deliver...

1. can standard blog/forums accept the <DIV>tag?
2. can they accept an <IFRAME> tag? (this would allow for the true live stats page that i've got running as a google gadget and on the head of the log pages).

anyone know the tech details that they would need?

anyone want to be a guineapig?

-bp

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

Re: blog feed

Post by Citroen » May 23rd, 2007, 2:21 pm

c2bill wrote: 1. can standard blog/forums accept the <DIV>tag?
2. can they accept an <IFRAME> tag? (this would allow for the true live stats page that i've got running as a google gadget and on the head of the log pages).
I created a blog for testing purposes.
http://dougielawson.blogspot.com/

The template (which I picked from Blogger's menu) for that has:

Code: Select all

      <div id='sidebar-wrapper'>
        <b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'/>
<b:widget id='Profile1' locked='false' title='About Me' type='Profile'/>
</b:section>
      </div>

      <!-- spacer for skins that want sidebar and main to be the same height-->
      <div class='clear'> </div>
    </div> <!-- end content-wrapper -->
  </div></div> <!-- end outer-wrapper -->
So I updated it with a Clocklink.com widget in a <DIV></DIV>.

Code: Select all

      <div id='sidebar-wrapper'>
        <b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'/>
<b:widget id='Profile1' locked='false' title='About Me' type='Profile'/>
</b:section>
      </div>

      <!-- spacer for skins that want sidebar and main to be the same height-->
      <div class='clear'> </div>
<!--- add a clocklink real-time clock -->
<div id='clocklink-wrapper'>
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5012-black.swf";obj.TimeZone = "WET";obj.width = 151;obj.height = 50;obj.wmode = "transparent";showClock(obj);</script>
</div>
<!--- end of my update -->
    </div> <!-- end content-wrapper -->
  </div></div> <!-- end outer-wrapper -->
So it works on Blogger.com.

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

Post by Citroen » May 23rd, 2007, 3:17 pm

I've added the Google gadget with

Code: Select all

<script src="http://gmodules.com/ig/ifr?url=http://concept2.com/sranking03/rss/gadget.xml&synd=open&w=320&h=200&title=Concept2+Season+Meter+Counter&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
So you can possibly use that technique for personal feeds.

I've also moved my clocklink widget into an official Blogger container.

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

Post by c2bill » May 24th, 2007, 10:05 am

thats pretty darn cool!

the problem now is getting the gadget to display your personal stats - in which case i need to be able to pass a varible to the gadget - your ID# for instance.

to do this i would need to be able to get this page:

www.concept2.com/sranking03/small_counter.asp to appear in the blog - maybe by using an IFRAME?

if this is possible - then your personal feed would be something like:

..../small_counter.asp?user=12345

this would then add one line for user 12345's stats to the live feed.

possible?

-bp

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

Post by Citroen » May 24th, 2007, 5:59 pm

c2bill wrote: if this is possible - then your personal feed would be something like:

..../small_counter.asp?user=12345

this would then add one line for user 12345's stats to the live feed.

possible?

-bp
Very possible. You can pass user preferences to the Google gadget.
http://www.google.com/apis/gadgets/basic.html#Userprefs
http://www.google.com/apis/gadgets/refe ... rprefs_Ref

So somehow I'd need to pass ?RankingID=142454 to my gadget.
Which would translate to &up_RankingID=142454 being passed to the Google stuff.

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

Post by Citroen » May 24th, 2007, 6:51 pm

This becomes http://concept2.com/sranking03/rss/personal.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Concept2 Personal Counter" />
<UserPref name="RankingID" display_name="Ranking ID #" required="true" />
<Content type="html"><![CDATA[
<iframe src="http://concept2.com/sranking03/rss/small_counter.asp?user=__UP_RankingID__" name="small counter">
</iframe>
]]></Content>
</Module>
All I've done is add a <UserPref.../> tag then pass the value from that as parm for your CGI program that extracts the data and fills the IFRAME.

Then we get it running with

Code: Select all

<script src="http://gmodules.com/ig/ifr?url=http://concept2.com/sranking03/rss/personal.xml&up_RankingID=142454&synd=open&w=320&h=200&title=Dougie's+Season+Meter+Counter&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>

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

Post by c2bill » May 25th, 2007, 9:38 am

ahh. a thing of beauty...

i'll work on putting that into the code today.

on an even more flexible note - i'm working on a system that would let you do something like:

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

Post Reply