Posted on

Sorting A Comma-Separated List On Linux

Here is a quick shortcut I used to combine a series of comma separated values into a single list of unique entries.  In my case I was trying to get a unique list of tags that came from several different lists of tags.   If list A had “apples, oranges, bananas” and list b had “apples,grapes,watermelons” I wanted to get “apples, bananas,grapes,oranges,watermelons” back.

There is the shortcut I used:

Paste each comma-separated list into a file named “x”, separate lines are OK.

Run this Linux command on the file to create a file named “Y” that has my sorted unique list of tags:

# tr ‘,’ ‘\n’ < x | sort -u | tr ‘\n’ ‘,’ > y

This is a quick and efficient way to sort comma-separated lists on Linux, which likely includes OS/X as well.

Posted on

Locator Patch Finds Missing Locations

Twitter 1500x500 Map 3D Banner

Store Locator Plus 4.2.38 was released today addressing an issue where some sites suddenly “lost” locations.

After a week of research it was discovered that some MySQL and MariaDB installations will set boolean data fields to NULL versus true/false or blank.    This led to an issue where any of the locations that had a null value in the privacy flag entry would be considered private by the Store Locator Plus search mechanism.  The new patch considers locations with a NULL privacy value to not be marked private, which has “recovered” missing locations on the front-end search interface.

Enhancements

In addition to the patch, several updates that were underway have been included as part of the effort to launch a Widget Pack update and start provide more advanced user interface features and WordPress theme support.

SLP 4.2.38 Widget Tagalong Pro Pack
Version 4.2.38 with Widget Pack, Tagalong, and Pro Pack options activated.

A new plugin theme has been bundled with Store Locator Plus that has been test for layout compatibility with the iThemes Herschel WordPress theme.

SLP 4.2.38 iThemes Herschel Plugin Theme
SLP 4.2.38 iThemes Herschel Plugin Theme with Pro Pack, Enhanced Search, and Enhanced Results.

The Simple White Four Column theme has been updated to use the newer SaSS based CSS rules engine, patching some quirks that are addressed with the core Store Locator Plus CSS ruleset included in all SaSS based plugin themes.

SLP 4.2.38 Simple White 4 Column on WP theme iThemes Herschel
WordPress iThemes Herschel theme with Store Locator Plus Simple 4 Col White theme. Uses Pro Pack, Enhanced Search, Enhanced Results for layout control.

A new general layout option for Pro Pack users allows site designers to gain access to not just the location data but also Store Locator Plus plugin option values.   The new [[slp_option nojs=”<option_name>”]] and [[slp_option js=”<option_name>”]] settings allow site designers to do things like place headers on the map with dynamic messages that change when site options change such as “All distances shown are in <miles>” where miles will change to kilometers if you change the default measurement in the UX settings panel.     Many other options such as a fixed default radius and various labels can be displayed using this feature.     It is used in conjunction with Enhanced Search to display heading on search box labels that can be changed via the admin panel (coming in the next Enhanced Search release).

The language translation system was extended, providing better internationalization (i18n) and localization (l10n) support for all add-on packs.  This has been built into the SLP 4.2 add-on framework.

The state filter processor was refined to eliminate redundant code in Enhanced Search and the upcoming Widget Pack update.

The state and country SQL processors were updated to address various null data issues and to provide slightly faster SQL query processing.

Map Center and Zoom Level have been migrated to the newer options system in Store Locator Plus. This also grants access to the slp_option shortcode in Pro pack for displaying these values such as “Distances calculated from <map center address>.” when a map is first loaded.

Change Log