I initially started this project for my own personal use, as something to help me keep some structured information about my trips.
Along the way, though, I thought there might be a chance of it being of use to some other people as well; so I decided to open-source it under an unrestrictive license.
By and large, this plug-in manages the following sections:
The technical summary supports data management for the following trip types:
So you can only document this sort of trips.
Depending on the various functions performed by various plug-in components, we can define three major ones:
To run this module, the following technical requirements must be met:
Basically all these requirements are checked upon installation and the process stops if they are not met.
This plug-in is distribute under the terms of the BSD New License. What this means:
This plug-in would have required much more work on my said without the following awesome components:
The viewer component is comprised of three distinct areas:
This is a small box (yellowish, by default) displayed above the post content, but below the post title.
Its purpose is to guide the readers to the technical box.
The idea is to let everyone know that there such thing as a technical box and, if that's the only thing they're searching for, quickly take them there.
Yet another small box (also yellowish, by default), but displayed below the post content.
It is not always displayed, but only when the system detects that the user might have skipped the content (i.e. scrolled too fast), in which case the reader is encouraged to jump back to the beginning of the post to read the post.
This is the area where, each on a distinct tab, the following sections are displayed:
Log).Each tab is only displayed when the corresponding information has been provided by the post author.
If there is not any kind of information for any of these tabs, then the entire component is hidden, including the teasers.
The editing component allows editing the trip's technical summary, as well as uploading the GPS track.
Thus, it to is organized in two tabs, one for each category of information:
The editor launcher smoothly integrates the trip summary editing experience into WordPress post editing workflow.
It is presented as a metabox, rendered in the sidebar of the post editing screen, titled: Trip summary.
At a glance, it allows access to the following information and actions:
Quick actions link button);Quick actions link button);Quick actions link button);Edit button)Trip summary log editor launcher entry).The corresponding tab is simply named "Info".
If no information has been filled in, the form only displays three buttons, one for each supported trip type:
Also note that, regardless of the form, if any of the fields that require an existing lookup data set to select from does not have any such value defined, then a link will be displayed pointing towards the management page for that set.
Besides the form, on the bottom side of the screen two additional control buttons will be shown, right after a trip type has been selected:
The corresponding tab is simply named "Map".
If no track has been uploaded yet, then this screen only displays a button that allows browsing for a GPS track file on the local computer.
Once the track has been uploaded, the map will be centered and the zoom level adjusted to the maximum value for which the entire track is displayed. GPS files that contain disconnected multiple segments are also supported.
Besides the form, on the bottom side of the screen two additional control buttons will be shown, right after a trip type has been selected:
This area contains a list of all the trip summary log entries (records) entered for this post, as well as access to the following actions:
Add log entry button);Clear all log entries button, which is only displayed if there are any log entries).Edit link);Delete link).Every field from this form (apart from the When field - which requires a valid date and the Time field, which requies a valid integer) can be freely edited.
HTML code is not allowed.
If a log entry is not marked as public (Display publicly is not checked), then the log entry will not appear in the Log frontend viewer tab.
The system attempts to provide default values for the following fields:
Who - The current user display name;When - The current date;Vehicle used - The last used vehiche for the current post.For convenience, when adding or editing multiple log entries in a row, the system will maintain between edits the values of following fields:
Who;When;Vehicle used;Gear,Display publicly.The configuration elements can be seen as forming two discrete sections:
There is a dedicated page where these options may be modified to best suit your needs. One can get there by accessing Trip Summary -> Settings in the main menu.
Once there, the following settings are made available.
The plug-in supports the metric system (m/km) as well as the imperial system (mile/inch).
It is worth mentioning that the plug-in does not perform any conversion and it assumes that any value provided is already expressed in the chosen measurement unit. Also, when the measurement units are changed, the values are not automatically converted.
Once the field is unchecked and the changes are saved, the teasers will no longer be displayed (nor the top teaser, nor the bottom teaser).
The text shown in the top teaser (above the post content, but right below the title).
The text shown in the bottom teaser (right below the technical summary box).
This field allows setting the front-end viewer tab selected when the user visits the post page.
Default value: Map.
This field allows specifying how multiple values of the same item are laid out in the front-end viewer:
This field allows setting how many values are displayed for items that have multiple values.
If an item has more values than the what is set in this field, then they are hidden and a (show) button is displayed.
The discussion here is a bit longer.
First of all, one has to keep in mind that the map is not displayed as only one physical image, but using multiple images. These images - called tiles - when put together in a specific order, form the image of the map itself.
Also, there are multiple set of tiles, one for each zoom level and, within each set, each tile is located using two coordinates - let us name them x & y - sort of like squares on a chess board.
Therefore, in order to access & load a tile from whatever server provides them, we need to request it using the following pieces of information:
There is one more problem, though: in order to load that many images in a reasonable time, they are replicated between multiple machines/servers and the tile requests are split between them. That's not mandatory, but often used.
These servers are also numbered - for instance: 1, 2, 3, 4 etc.
This, then, might add another variable when requesting tiles and also when supplying the URL template that will be used to display the map wherever this plug-in requires it.
Add this to the set of coordinates described above and we have this list of supported URL template variables:
These variables can occur anywhere in the string and one must consult the map tile provider to find out the supported URL template.
Depending on where you chose to display the map from, the attribution may or may not be mandatory. It is, at a minimum, a nice thing to have, so I encourage you to do it.
The attribution is placed in the lower right corner of the map area and this field allows you to add a URL to the provider's page.
Depending on where you chose to display the map from, the attribution may or may not be mandatory. It is, at a minimum, a nice thing to have, so I encourage you to do it.
The attribution is placed in the lower right corner of the map area and this field allows you to add a text that describes the provider (a copyright notice of sorts).
Once the field is unchecked and the changes are saved, the full-screen button will not be displayed in the Viewer Component anymore.
By default, this field is checked, so the button is displayed.
Once the field is unchecked and the changes are saved, the magnifying glass switch button will no longer be displayed.
By default, this field is checked, so the button is displayed.
Once the field is unchecked and the changes are saved, the map scale will no longer be displayed in the lower left corner of the map area.
By default, this field is checked, so the map scale is displayed.
Once the field is unchecked and the changes are saved, the GPS track download button will no longer be displayed.
By default, this field is checked, so the button is displayed.
This field allows setting the colour used to plot the GPS track on the map.
Applies to both front-end viewer and back-end trip summary editor.
The default value is the previously used colour: #0033ff.
This field allows setting the thickness, in pixels, of the line used to plot the GPS track on the map.
Applies to both front-end viewer and back-end trip summary editor.
The default value is the previously used thickness: 3 pixels.
This field allows setting the height, in pixels, of the actual map component.
Applies only to the front-end viewer.
The default value is the former default map height: 350 pixels.
Lookup data represents a couple of sets of predefined options out of which some fields are filled in. Some fields only required one value, some multiple.
The plug-in supports per-language values for each option in a data set.
Also, one can define said values for any WordPress-supported language.
Then, there is the possibility of selecting a default value: this is the value displayed when, for any given option, no explicit value is found in the context of the current language.
The fields for which look-up data management is necessary are as follows:
This field is available for the following trip types:
It reflects one's subjective evaluation of how hard the trip was, in terms of effort.
The plug-in provides the following pre-defined options (with English and Romanian translations):
This field is available for the following trip types:
It allows specifying the seasons during which the route can be traveled through in decent conditions (without extreme expense in terms of effort and without taking great risks).
The plug-in provides the following pre-defined options (with English and Romanian translations):
This field is available for the following trip types:
It allows specifying the texture / composition of the roads & trails crossed by the route. Eg.: grass, rocky, tarmac, gravel etc.
The plug-in provides the following pre-defined options (with English and Romanian translations):
This field is available for the following trip types:
It allows specifying the bike types that should be used for optimal safety and comfort.
The plug-in provides the following pre-defined options (with English and Romanian translations):
This field is available for the following trip types:
It allows specifying what companies operate on the described route, be it in its entirety, be it only partial.
There are no pre-defined options.
This field is available for the following trip types:
It allows specifying whether the line was electrified and to what extent.
The plug-in provides the following pre-defined options (with English and Romanian translations):
This field is available for the following trip types:
It allows specifying whether the line is simple or double (one set of tracks for each way).
The plug-in provides the following pre-defined options (with English and Romanian translations):
This field is available for the following trip types:
It allows specifying the line status (for instance whether the line is closed, operating normally, undergoing repairs etc.).
The plug-in provides the following pre-defined options (with English and Romanian translations):
The following operations are supported, each in the context of a chosen language:
The following should also be noted:
The maintenance section is actually a set of tools that allows you to perform some, let's say, non-day-to-day maintenance tasks.
Right now (as of version 0.3.1), these are:
Clear track data cache: this clears the internal cache that this plugin maintains when processing uploaded track files (cannot be undone);Clear all trip summary related data: info, track file data and table records, cache everything (cannot be undone);Detect missing track files: this tool can detect a situation in which you have uploaded a track to a post, but the file no longer exists (cannot detect the reason, though).To use these maintenance features, simply navigate to Trip Summary - Maintenance and select the tool you want to run.
You will be prompted for a confirmation and then the selected tool will start running.