WP-Trip-Summary

Logo

A WordPress trip summary plugin to help travel bloggers manage and display structured information about their train rides and biking or hiking trips

View the Project on GitHub alexboia/WP-Trip-Summary

A WordPress trip summary plugin. I initially wrote this for my own personal use, as I needed something to help me keep structured information about my trips. However, as I was getting ready to push this to production I realised it would be a good idea to publish the source code.

There are, of course, some things to be done before this would be of any real use to anyone but me and, in the process, some breaking changes may occur. Please see the issues area for the progress on those things.

What it does

This plug-in provides two basic features:

Structured information

Structured information is supported for the following types of trips:

For bike trips

The following fields are available:

For hiking trips

The following fields are available:

For train rides

The following fields are available:

The track

I really wanted to host the GPX tracks myself for various reasons:

Thus, I developed a module to do just that: upload a GPX track, parse it and display it.

Requirements

For running the plug-in itself

  1. PHP version 5.2.0 or greater;
  2. MySQL version 5.7 or greater (with spatial support);
  3. Wordpress 4.0 (maybe lower, but I haven’t checked it up yet so I’d rather err on the safe side for now) or greater;
  4. libxml extension;
  5. SimpleXml extension;
  6. mysqli extension;
  7. mbstring - not strictly required, but recommended;
  8. zlib - not strictly required, but recommended.

For development

All of the above, with the following amendments:

  1. PHP version 5.4.0 or greater is required;
  2. xdebug extension is recommended;
  3. phpunit version 5.x installed and available in your $PATH, for running the tests;
  4. wp (wp-cli) version 2.x installed and available in your $PATH, for initializing the test environment, if needed
  5. phpcompatinfo version 5.x installed and available in your $PATH, for generating the compatibility information files
  6. cygwin, for Windows users, such as myself, for setting up the development environment, running unit tests and the build scripts, with the following requirements itself:
    • wget command;
    • curl command;
    • gettext libraries;
    • php core engine and the above-mentioned php extensions;
    • zip command.

Limitations

  1. Currently it only works with the classic WordPress Editor. An update is planned for 0.3.
  2. Not designed for (and not tested with) multi-site installations. No update is currently planned.

Screenshots

Editor - Info

Editor - Info

Editor - Map

Editor - Map

Viewer - Info

Viewer - Info

Viewer - Map

Viewer - Map

Credits

  1. PHP-MySQLi-Database-Class - small mysqli wrapper for PHP. I used it instead of the builtin wpdb class
  2. MimeReader - PHP mime sniffer written by Shane Thompson
  3. jQuery EasyTabs
  4. jQuery.SumoSelect - A jQuery Single/Multi Select plugin
  5. Leaflet - open source JavaScript library for interactive maps
  6. Lodash - utility library for JavaScript
  7. Machina - JavaScript state machine
  8. NProgress - slim JavaScript progress bars
  9. Toastr - Javascript library for non-blocking notifications
  10. URI.js - JavaScript URI builder and parser.
  11. Visible - jQuery plugin which allows us to quickly check if an element is within the browsers visual viewport regardless of the window scroll position
  12. blockUI - jQuery modal view plug-in
  13. kite - super small and simple JavaScript template engine
  14. Leaflet.MagnifyingGlass - Leaflet plug-in that adds the magnifying glass feature: enlarging a discrete area on the map
  15. Leaflet.fullscreen - Leaflet plug-in that allows the map to be displayed in full-screen mode

Licence

The source code is published under the terms of the BSD New License licence.