optionally show google widget on the log home page

Please add feature and function requests for PM3 firmware, DLL/API's, and documentation here.
Post Reply
MateosDad
Paddler
Posts: 13
Joined: September 6th, 2007, 1:59 pm
Location: Olympia, WA, USA

optionally show google widget on the log home page

Post by MateosDad » December 9th, 2008, 3:22 pm

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.

User avatar
kdahlhaus
500m Poster
Posts: 95
Joined: September 17th, 2006, 2:13 pm
Contact:

Post by kdahlhaus » December 9th, 2008, 6:28 pm

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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://powertwenty.com
'Do' or 'Do not', there is no 'Try' -Yoda

MateosDad
Paddler
Posts: 13
Joined: September 6th, 2007, 1:59 pm
Location: Olympia, WA, USA

optional team standings

Post by MateosDad » December 12th, 2008, 8:11 pm

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.

MateosDad
Paddler
Posts: 13
Joined: September 6th, 2007, 1:59 pm
Location: Olympia, WA, USA

Post by MateosDad » December 13th, 2008, 12:38 am

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".

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

Post by Citroen » December 13th, 2008, 4:46 am

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.

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

Post by Citroen » December 13th, 2008, 10:32 am

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.
Last edited by Citroen on December 13th, 2008, 12:44 pm, edited 1 time in total.
Dougie Lawson
61yrs, 172cm, Almost LWt (in my dreams).
Twitter: @DougieLawson

MateosDad
Paddler
Posts: 13
Joined: September 6th, 2007, 1:59 pm
Location: Olympia, WA, USA

Post by MateosDad » December 13th, 2008, 12:23 pm

Citroen-
I think I understand what your code is doing. Forgive my ignorance, but now what should I (or c2? ) do with it?
Thanks!

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

Post by Citroen » December 13th, 2008, 12:43 pm

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.

MateosDad
Paddler
Posts: 13
Joined: September 6th, 2007, 1:59 pm
Location: Olympia, WA, USA

on the greasemonkey script

Post by MateosDad » December 14th, 2008, 6:39 pm

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.

Post Reply