I'm pleased to announce that version 1.0.1 of the Geodata Solutions Location List Custom Fields Plugin is now completed.

Joomla site owners can now add location data to their content, categories, user and contacts components.

There were some difficulties along the way. Given the newness of the custom fields functionality, there is little documentation for the new plugin type, and the routine for adding new custom field types differs from the custom fields types offered in the default Joomla package, which have their templates hard-baked into the core. I have to thank people on the Joomla forum, who were able to assist with questions and offer support.

This is just the first iteration of the extension, and there are many improvements to come, within the functionality of the plugin's code, and also in the web service offered on the Geodata Solutions side.

A few 'hacks' were required in this version:

  • The jQuery chosen library had to be subverted in order to get the ajax functionality of the lists (as coded in general-use code snippet version) to work within Joomla's back end. The ability to 'destroy' the -chzn elements was available in Joomla 2.5, but it seems this was removed in J3.x. This version of the extension uses a hack that hides the chosen elements and unhides the original form fields offered by cavarief here.
  • The system uses the simple javascript request method that the general use code snippet uses. The disadvantage of this is that it doesn't allow for secure serverside authentication. At current usage, there is no need to throttle access to the web service, but I anticipate that when usage increases, I'll need to switch to a superior solution. Some things to note:
    • Authentication currently checks the HOST header in the js request- it's the crudest way of recording the usage of each separate implementation of the system, but hardly the most reliable
    • Proposed solution in the next release would be to have a key generated with each download of the plugin (I think I can do this without requiring registration with Geodata Solutions- something that I think is a barrier to quick implementation) which the user could simply enter into the plugin configuration
    • Very high volume sites might have to subscribe to support the service at a later stage
  • There are issues related to the output/override of custom fields in the user component. This is reported issue, and one that I hope will be corrected in future Joomla version. Until then users will have to put up with the pipe-separated format used for stage within their user profile views in the front end (eg. Australia|Victoria|Ballarat ) or create their own template override. If you want some help implementing this, or want to share your solution, then please get in touch.

The plugin was submitted to the JED on 4th July, and at time of writing is pending approval, but you can download Location Lists Custom Fields Plugin  and read the (minimal) Location Lists Documentation

Outgrown Joomla?

Most of my clients are companies that started off with a simple Joomla website years ago, either because they arrived at it by evaluating the CMSs strengths against other systems, or because the initial designer they worked with worked with Joomla, and so they ended up with the system by default. Fortunately, these businesses grew, and the requirements they demanded from their Joomla site became more specialised. 

While new businesses often buy commercial extensions that are by nature a one-size-fits-all setup, in a growing business it's less acceptable to have your business systems dictated by your Joomla extensions. So what can businesses who feel like they've outgrown Joomla do?

Read more: Outgrown Joomla?

Why would any website administrator or developer want to 'outsource' something as simple as a country list to a web service?

It sounds like a valid question. Implementing these isn't rocket science, and there are a load of sites with detailed instructions on how this can be achieved with a bit of jQuery, HTML, serverside code (whatever flavour) and some mysql data dumps. I began this process recently when needing a set of dynamic country- state (county for some places) - city dropdowns for a site I was working on. Although there's some great code snippets out there being offered graciously (and freely!) by fellow developers, I wondered why we're all re-inventing the wheel.

Read more: Select lists as a web service?! Really?

Here is an example of the select lists possible with only a few lines of code...

<select name="country" class="countries presel-byip" id="countryId">
    <option value="">Select Country</option>
</select>
<select name="state" class="states" id="stateId">
    <option value="">Select State</option>
</select>
<select name="city" class="cities" id="cityId">
    <option value="">Select City</option>
</select>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
<script src="https://geodata.solutions/includes/countrystatecity.js"></script>
Back to Top