Page 1 of 1

optionally show google widget on the log home page

Posted: December 9th, 2008, 3:22 pm
by MateosDad
Consider adding an option to display the google team member totals widget on the log home page (or something like it). That way when a person logs in a workout, they'll be able to see what their teammates have logged, without having to go to another page.

Posted: December 9th, 2008, 6:28 pm
by kdahlhaus
I've not used it myself, but Firefox users could create a Grease Monkey script to pull the data from the other page in the background and add it to the displayed login page.

optional team standings

Posted: December 12th, 2008, 8:11 pm
by MateosDad
This optional feature doesn't have to be the google widget. C2 has already released code to display standings in other websites:

Code: Select all

<iframe   frameborder="0" name="iframe_log_contents" marginWidth="0" scrolling=auto
marginHeight="1" style="font-family: Verdana, sans-serif; color: #444444; font-size: .75em;"
src="http://www.concept2.com/sranking03/challenge/univDetailFeed2009.asp?univID=9999"  width="500"
></IFRAME>
This displays the current team roster by meters in a webpage. "univID" tells the page which team to display. It would be cool if the c2 log had an option where you could choose to have your team standings automatically displayed when you logged in.

Posted: December 13th, 2008, 12:38 am
by MateosDad
It turns out that over a year ago there was a related thread:
http://www.c2forum.com/viewtopic.php?t=6689

In it Citroen published the google widget code, including:

Code: Select all

<script src="http://gmodules.com/ig/ifr?url=http://concept2.com/sranking03/rss/team_gadget.xml&up_univID=1270&output=js"></script>
So - not to sound like a broken record or anything... I'd love to have forum members have an option that they could opt in to which would automatically display the widget on the log, when they logged into post their meters. The trick would be to figure out how to generate the script tag with the member's team ID.

It would also be nice if the widget displayed the name of the team in its header. At the moment it just displays the generic phrase "Concept2 Team Viewer".

Posted: December 13th, 2008, 4:46 am
by Citroen
This is exactly the same problem as http://www.c2forum.com/viewtopic.php?p=106917

So I'd guess it'll get exactly the same answer from David. There's a bit of redesign needed for the C2 logging database and a lot of redesign needed for the website to make it Web2.0.

Using Greasemonkey to add a <DIV>...</DIV> element and within that container add the <iframe src=http://www.concept2.com/sranking03/chal ... ?univID=55 /> stuff should work.

Posted: December 13th, 2008, 10:32 am
by Citroen

Code: Select all

// ==UserScript==
// @name           C2 Logbook Team ID
// @namespace      tag:darkside-internet.co.uk,2008-12-13,C2TeamID
// @description    Add team stats on http://concept2.com logbook
// @include        http://*.concept2.com/sranking03/log.asp*
// ==/UserScript==

var target = document.getElementById('info');

var table = document.createElement('table');
var tr = document.createElement('tr');
var td = document.createElement('td');
var iframe = document.createElement('iframe');
iframe.src = 'http://www.concept2.com/sranking03/challenge/univDetailFeed2009.asp?univID=55'; // change  =55 to your team#
td.insertBefore(iframe, null);
tr.insertBefore(td, null);
table.insertBefore(tr, null);
target.appendChild(table);
It's not quite right because I was having a terrible trouble with insertBefore vs appendChild (mainly because C2's HTML doesn't have an ID=... label at the right point), but it kind of does what you want.

Posted: December 13th, 2008, 12:23 pm
by MateosDad
Citroen-
I think I understand what your code is doing. Forgive my ignorance, but now what should I (or c2? ) do with it?
Thanks!

Posted: December 13th, 2008, 12:43 pm
by Citroen
MateosDad wrote:Citroen-
I think I understand what your code is doing. Forgive my ignorance, but now what should I (or c2? ) do with it?
Thanks!
It's a Greasemonkey script. Install Greasemonkey from https://addons.mozilla.org/en-US/firefox/addon/748 change the univID to your team number and enjoy.

It may work in GM4IE (or equivalent) but I'm not going to test it.

on the greasemonkey script

Posted: December 14th, 2008, 6:39 pm
by MateosDad
This works well. Very handy. It is pretty close to what I'm hoping the c2 webdev folks will give to the log users some day! Meanwhile users who want to learn about greasemonkey scripts can take what you (Citreon) have provided and have the functionality today own their own machine.