"Widgets", add the "Concept2 Logbook Widget" to the sidebar and edit its options. You need to set a title and your ranking ID from your Concept2 profile. */ load_plugin_textdomain('concept2-logbook'); function widget_concept2_logbook_init() { if ( !function_exists('register_sidebar_widget') ) return; function concept2_logbook($args) { extract($args); $options = get_option('widget_concept2_logbook'); $userid = $options['userid']; $title = $options['title']; if ($userid <> '') { $output = `wget -O - -q "http://concept2.com/sranking03/small_counter.asp?user=$userid" | grep "id='season'" | grep "id='total'"`; list($season,$total,$last) = explode("", $output); list($crap,$season) = explode("'season'> ", $season); list($crap,$total) = explode("'total'> ", $total); list($crap,$last) = explode("'last'> ", $last); list ($last,$crap) = explode("<",$last); $output = $before_widget . $before_title . $title . $after_title; $output .= '
'; $output .= '

Seasonal Distance: '.$season.'

'; $output .= '

Total Distance: '.$total.'

'; $output .= '

Last Entry: '.$last.'

'; $output .= '
'; $output .= $after_widget; print $output; } } function concept2_logbook_control() { $options = get_option('widget_concept2_logbook'); if ( !is_array($options) ) $options = array('userid'=>'',title=>'Concept2 Personal Stats'); if ( $_POST['concept2_logbook_submit']) { $options['userid'] = strip_tags(stripslashes($_POST['concept2_logbook-userid'])); $options['title'] = strip_tags(stripslashes($_POST['concept2_logbook-title'])); update_option('widget_concept2_logbook', $options); } $userid = htmlspecialchars($options['userid'], ENT_QUOTES); $title = htmlspecialchars($options['title'], ENT_QUOTES); echo '

'; echo '

'; echo ''; } register_sidebar_widget(array('Concept2 Logbook', 'widgets'), 'concept2_logbook'); register_widget_control(array('Concept2 Logbook', 'widgets'), 'concept2_logbook_control', 200, 425); } add_action('widgets_init', 'widget_concept2_logbook_init'); ?>