Month: October 2019
MapPlaying with Image Tagging for Workflow
Now, in more recent years, my photography has moved from a digital camera to a cell phone. I just recently bought tools to better hold my cell phone when taking a lot of pictures and I enjoy taking pictures.
One of the issues has been with documenting the photos. Not everyone will I post online. Photos taken digitally will have a date, details of the hardware, and if with a cell phone, a location embedded(if that is turned on), but not notes on what it is.
I already had a rather complex app that allowed me to edit all embedded metadata on photos, but I found a simple one that only allowed editing 4 fields…namely title and author, and included bulk editing options.
I then, at the camp, fixed some issues that would pull that information out of a photo when uploaded and use it as the title and/or caption in the backend.
The problem is multi-fold. For one, will I actually label photos on my phone? Secondly, I upload to multiple places automatically…I’m not sure if the changes would sync before or after the automatic upload.
Glad that I am trying this, but more to figure out before it works.
Thinking about Time
Part of going into this code, aside from normally doing the rounds of updates & bugfixes on my projects was because WordPress introduced some new functions to better handle date and time functionality. I backported them into my code and adopted them and added several based on the new methodology.
The time handling functionality in my Simple Location plugin started in 2015. I was in a timezone 7 hours later than home, and didn’t like my posts were showing 3AM…it completely changed the context of the post. So, I not only added to my site the timezone, but I wrote the code to transform the post’s time based on a per post setting that would be derived from the post’s location(functionality provided by the plugin already).
If you look at my recent posts, you’d see this adjustment, as I just fixed a few bugs in it. My California posts say PDT, as opposed to my normal EDT.
I also added a widget to my site that can show the current time where I am.
How I can take this further? So, I spent time at IWC NYC learning about sunrise and sunset. PHP, the language WordPress is written in, has built in functions for calculating sunrise and sunset…but it turns out that they don’t properly factor in elevation…which means that the visible sunrise and sunset could be off by as much as 2 minutes. My code does actually derive elevation from an API, so it can make the adjustment.
Being that type of astronomy and math is not my area of expertise, I had to do some reading. And now, with some modifications, my code is now a bit more accurate.
So, why is sunrise and sunset important? I wouldn’t mind my site changing based on time day, but it is mostly that in the Jewish calendar, observances begin at sunset, not midnight. So, I want to be able to account for that.
There are some plugins for calculations, but not with the location based goal I have…it is usually to show the start of holidays and such at a specific location, not to follow me around where I am. So, I want to incorporate work off of this. It makes for an interesting challenge.
There is always more to do. A new Simple Location should be out in the coming days/week and I’ll post about the features.
WordPress Webmentions Plugin Version 4.0.0 Released
In the lastest version, several useful features were added.
- Instead of an option to enable webmention support for pages, the plugin now let’s you select the option to declare support for any public post type. This means, by default, you can add support to Media(attachments)
- For outgoing webmentions, the plugin will now only send actual links, not plaintext URLs in content. It will not send webmentions for media files linked to in img tags or such unless you set this setting. Most sites don’t support receiving them directly to the file anyway.
- Avatar Support was previously handled by the Semantic Linkbacks plugin. A new implementation of this was added to this plugin and a version of Semantic Linkbacks will be released that will disable its handling if this is enabled.
- The new avatar support allows for either a URL or an attachment ID.
- For webmentions without an email address, it will serve a local anonymous avatar(a copy of the WordPress default avatar) rather than asking for one from Gravatar.
- If there is an email address, it will cache whether there is a gravatar for a defined period of time…defaultly one week and if not serve the local file as well. This reduces unneeded calls to gravatar.
- Webmention endpoint headers are now only available on URLs on the site that support them. You can disable this and show on all pages. Caching has been enabled to ensure this doesn’t slow page load.
- Misc improvements to the settings and metadata templates in the admin.
This is all part of a longer project to migrate features from Semantic Linkbacks over to Webmentions. But both plugins are several years old, and therefore it will take time to do it right. The goal is to upgrade, improve, and sometimes completely rewrite each part as it comes over, rather than merge the older code together and fix some of the issues subsequently.
The minimum PHP version for Webmentions is now PHP5.4, to accommodate the current official minimum of PHP-MF2, which will be merged in future when the microformats parsing is migrated to this plugin.
November 1-3, 2019 – WordCamp U.S. has something for everyone: long-term users, or folks just starting out.
The IndieWebCamp San Francisco is a two day creatives workshop 2019-12-07…08 for anyone who wants to come discuss, brainstorm, or hack on any and all independent, distribute, local, offline, indieweb technologies for practical usable solutions to real world problems and social media.