Forum Replies Created

Viewing 15 replies - 121 through 135 (of 200 total)
  • I think we have breakthrough here… 🙂

    More info will come 🙂

    I 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 image

    Then the user coulde chooser if he/she want one of it or both…

    What do you think?

    yeah I could see you have added the first changes – marts versus march..

    Thanks!

    Heheh – you say so…

    I have no more hair – damn its frustrating

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

    Im looking forward to see if you’re able to fix it 😀

    You 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…

    I 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 😀

    My 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?

    Well, a database structure could be:

    CREATE TABLE IF NOT EXISTSgear` (
    gear_id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
    gear_name varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
    gear_type varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
    gear_distance varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
    gear_category varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT ”,
    gear_bought datetime 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

    you are welcome to give it a try.. 🙂

    By 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….

    Exams 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…

    That 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 important

    When 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?

    Just for your information .- just found this one: http://www.mysqlajaxtableeditor.com/index.php seems pretty nasty 🙂

    I dont have the more time today, sry…

Viewing 15 replies - 121 through 135 (of 200 total)