Frederik Liljefred. M.D.
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsDid you paste in any data?
In the form box?
https://s.www.ads-software.com/extend/plugins/runners-log/screenshot-1.png
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsNow 1.6.0 is released – the short code release.
Now the following short codes is supported:
[runners_log_basic] [runners_log_graph] [runners_log_graphmini_distance] [runners_log_graphmini_hours] [runners_log_graphmini_calories] [runners_log_pie_distance] [runners_log_pie_hours] [runners_log_pie_calories] [runners_log_bar_distance] [runners_log_bar_hours] [runners_log_bar_calories]
I was able to add it myself ??
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsIm not sure, but what is your question?
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsIts on the todo list.
I did try but wasnt able to add it. I think jaredatch would try to add it ??
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsHey Jens,
Thanks for trying to install this mod.
What did you paste into your template?
Did you make any new post with distance and time?
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsHmm I can see Garmin got a API: https://developer.garmin.com/web-device/garmin-communicator-plugin/
Well, it is not first priority – but should be possible to add a map in your post: eg. like: https://developer.garmin.com/web/communicator-api/apidemo/garminDeviceDisplayDemo.html
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsWell, I think I can say that this will not support import of data from your garmin tool. This is far over my skills. So unless there is a skilled coder that can and will add that feature – I have to disappoint you…
But for that you can use garmin.connect.com – its a very powerfull tool.
If you like to have a list of your latest run uploaded to garmin.connect in a widget you can use the Garmin Connect plugin: https://garminconnect.codedrobot.com
But to use this plugin you have to manually add your data…
Best regards,
Frederik
Forum: Plugins
In reply to: [Plugin: Runners Log] Few suggestionsThank your for your feedback.
Im very glad if someone else can and will use Runners Log.
I totally agree it could be nice if it was more easy to add your data after you did a run. Im pretty new to wordpress I first installed it the 19th of Dec 2009, so… ??
Im also not the must skilled programmer (Im a M.D professionaly) but I have gladly used #wordpress for help.
I will contact your on IRC
Regard miles – it already on the todo-list.
I would love to get some help ??
Best regard, and happy new year
Frederik
Thanks again.
As you said your mysql was right!!
I did play around with the () and my Notepad++ did help me. It needed MANY () to word but now it does ??
Have a mary christmas..
Best wishes
/Frederik
And by the way here is the snippet…
$meters_last_month = $wpdb->get_var($wpdb->prepare(“
SELECT SUM($wpdb->postmeta.meta_value)
FROM $wpdb->postmeta, $wpdb->posts
WHERE $wpdb->postmeta.meta_key=’Meters’
AND $wpdb->postmeta.post_id=$wpdb->posts.id
AND ((month($wpdb->posts.post_date) + year($wpdb->posts.post_date) * 12) = ((month(now()) + year(now()) * 12) – 1))”));Hey,
Thanks, and no problem. Im just glad you try to help. Its not urgent in any way…
I did test your snippet but it doesnt print anything. I did made a post set to publish date in november but it doesnt calculate anything for the previous month. There are no errors…
I dont know how to fit it in and change:
//Connect to DB and calculate the sum of meters run in previous month
$meter_last_month = $wpdb->get_var($wpdb->prepare(“
SELECT SUM($wpdb->postmeta.meta_value)
FROM $wpdb->postmeta, $wpdb->posts
WHERE $wpdb->postmeta.meta_key=’Meters’
AND $wpdb->postmeta.post_id=$wpdb->posts.id
AND month($wpdb->posts.post_date)=’12’
AND year($wpdb->posts.post_date)=’2009′”));Wauw seems like I got it now ??
$meter_sum_2009 = $wpdb->get_var($wpdb->prepare(“
SELECT SUM($wpdb->postmeta.meta_value)
FROM $wpdb->postmeta, $wpdb->posts
WHERE $wpdb->postmeta.meta_key=’Meters’
AND $wpdb->postmeta.post_id=$wpdb->posts.id
AND month($wpdb->posts.post_date)=’12’
AND year($wpdb->posts.post_date)=’2009′
“));
echo ‘<p>Meters run in 2009: ‘ . $meter_sum_2009 . ‘</p>’;Hehe…. this doesnt print much… I must do something wrong ??
$km_sum = $wpdb->get_var($wpdb->prepare(“SELECT SUM(wp_postmeta.meta_value) FROM wp_postmeta,wp_posts WHERE wp_postmeta.meta_key=’Meters’ AND wp_postmeta.post_id=wp_posts.id AND month(wp_posts.post_date)=12 AND year(wp_posts.post_date)=2009”));
echo ‘<p>Km this periode ‘ . $km_sum . ‘</p>’;Wauw you got skills…
Well, Ill will try to read howto use that snippet in my code ??
Forum: Plugins
In reply to: [Plugin Flutter] Howto calculate with varibles?I went back to “Custom Fields”