Frederik Liljefred. M.D.
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsI think we have breakthrough here… 🙂
More info will come 🙂
Forum: Plugins
In reply to: [Plugin: Runners Log] Weather integrationI dont think the place should decide if its fahrenheit or celcius – it should be the user.
If the user choose english – inches and pound – Im pretty sure the user also want it to be in fahrenheit…..
Picture or not a picture – maybe there could be a to new fields in runners log admin
Weather
-Show text
-Show imageThen the user coulde chooser if he/she want one of it or both…
What do you think?
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsyeah I could see you have added the first changes – marts versus march..
Thanks!
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsHeheh – you say so…
I have no more hair – damn its frustrating
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsHmm Im pretty stocked here :S
Seems to be over my level…
I was able to create the database by adding this to runners_log.php
BEFORE
?>/* G E A R L I S T */ // Do this when user activates the plugin (Install Script) register_activation_hook( __FILE__, 'gear_list_install'); function gear_list_install(){ global $wpdb; $table_name = $wpdb->prefix . "gear_list"; if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { $sql = "CREATE TABLE " . $table_name . " ( gear_id mediumint(8) unsigned NOT NULL auto_increment, gear_inuse mediumint(8) unsigned NOT NULL, gear_name varchar(100) NOT NULL default '', gear_type varchar(100) NOT NULL default '', gear_category varchar(50) NOT NULL default '', gear_price varchar(100) NOT NULL default '', gear_bought datetime NOT NULL, gear_comment TEXT NOT NULL default '', PRIMARY KEY id (gear_id) );"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); } }And adding this to create a new submenu:
AFTER
function runnerslog_converter_toolbox() { include('Includes/runnerslog_converter_toolbox.php'); }ADDING
function runnerslog_gear() { include('Includes/runnerslog_gear.php'); }AND AFTER
add_submenu_page('runners-log', 'Coverter Toolbox', 'Coverter Toolbox', 'administrator', 'runners-log-converter-toolbox', 'runnerslog_converter_toolbox');ADDING
add_submenu_page('runners-log', 'Gear List', 'Gear List', 'administrator', 'runners-log-gear-list', 'runnerslog_gear');Then in Includes I created runnerslog_gear.php
and here we have the problem. The fancy tableeditor need some .js files in the head.
<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous-js/scriptaculous.js"></script> <script type="text/javascript" src="js/lang/lang_vars-en.js"></script> <script type="text/javascript" src="js/ajax_table_editor.js"></script> <!-- calendar files --> <link rel="stylesheet" type="text/css" media="all" href="js/jscalendar/skins/aqua/theme.css" title="win2k-cold-1" /> <script type="text/javascript" src="js/jscalendar/calendar.js"></script> <script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script> <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>But howto get them into the
<head>– I did try something like this to test – but no result.<?php add_action('wp_head', 'addtoheader'); function addtoheader() { echo '<verystrong><verystrong>'; } ?>So Im pretty sure Im not able to get the editor to work… Maybe I will have a second try tonight.
Forum: Plugins
In reply to: [Plugin: Runners Log] Weather integrationIm looking forward to see if you’re able to fix it 😀
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsYou are now added as commiter and I hope you can access SVN now:
http://plugins.svn.wordpress.org/runners-log/
btw if Im working with this plugin Im on #wordpress if you need me…
Forum: Plugins
In reply to: [Plugin: Runners Log] Weather integrationI didnt know they had one 😀
I guess: if its google it will not be outdated soon 🙂
Could be a very good alternative and easy to use:
This city was easy to find:
http://www.google.com/ig/api?weather=odense 🙂
Then you could mix it with the setting: meters versus english
if meters then celcius else you have fahrenheit
Great link API found 😀
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsMy thought was to have a gear table.
Then in the meta box you specify what gear you have used and the data there is stored is the gear_id.
To make stats you call the meta box related database, search for the gear_id by using something like this
[runners_log_gear id=”” type=pie year=2010]
Does it make sense?
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsWell, a database structure could be:
CREATE TABLE IF NOT EXISTSgear` (
gear_idmediumint(8) unsigned NOT NULL AUTO_INCREMENT,
gear_namevarchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
gear_typevarchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
gear_distancevarchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
gear_categoryvarchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
gear_boughtdatetime NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;`By have a database with id per item stats could be called like:
[runners_log_gear id=”” type=pie year=2010]
If I have time I will try to play around with it later today eg using mysqlajaxtableeditor.com
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsyou are welcome to give it a try.. 🙂
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsBy the way I dont know if you have any running watch and if so, which one you have. But the creator of another garmin related plugin (http://garminconnect.codedrobot.com/) is looking for a way to automatictly import data from a forerunner watch using garmin connect….
Forum: Plugins
In reply to: [Plugin: Runners Log] Weather integrationExams have first priority 😀
This is just for fun – your study is your future…
But Im very glad you want to give something back to this plugin…
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsThat statistics is the smallest problem – as I see it 🙂 A [runners_log_gear] tag should be easy to create.
The problem is as you are mention – howto handle the information.
The idea with the fancy table editor was to use in a special gear page in Admin. Here you should be able to set
1. name eg: Nike
2. type eg Trail
3. category eg: Shoe
4. Usage eg km/miles
5. Date bought
6. Last time used
7. Number of time used
(8. Adding a image of the gear) – not so importantWhen you are adding a new course using the meta box you should be able to – in some way – choose what gear you have used based on your gear list.
The gear list is created using the “fancy” editor or some other thing.
Based on your courses and distances the “usage” field for the shoe or what ever is increased. Eg. you can set a manual start usages when you are adding the item.
Does this make any sense or is there a better way to solve this?
Forum: Plugins
In reply to: [Plugin: Runners Log] Running gear statisticsJust for your information .- just found this one: http://www.mysqlajaxtableeditor.com/index.php seems pretty nasty 🙂
I dont have the more time today, sry…