Knowledge Base - Gateway for Joomla Content

What is it

Joomla content simply refers to Joomla articles, from the core Joomla. Using Geocode Factory's content and gateway plugins you can associate one or more sets of coordinates to each of your Joomla articles. In this way you can add maps inside your articles, as well as collectively display the locations of your Joomla articles as markers on another map.


Installation

The content and gateway plugins for Joomla content are included in your Geocode Factory 5 package by default. There is also an editor button plugin which is the latest addition to Geocode Factory 5. This plugin inserts an editor button in your article editor allowing you to easily geocode the article as we shall see later on. These are the files:

  • plg_geofactory_content_jc30.zip: content plugin
  • plg_geofactory_gw_jc30.zip: gateway plugin
  • plg_geofactory_btn_jc30: editor button plugin

Please read the Download, install and update manual for more information.


Content Plugin configuration

Inside the joomla “Plugin Manager” you will find the Content plugin you installed. To locate it more easily, you can use the filter by adding the text “geocode” for example, like in the following image.
GF5 Joomla Plugin Manager

Geocode Factory - Content plugin

Configuring the Joomla content plugin you have the following options: 

Joomla Content PluginMap selector: Select the map to be used with this plugin. The options in the dropdown correspond to the maps you have created in your “Map Manager”

  • Show Map: Here you can choose if you want to display a map inside the articles. If you choose to do this, you have an option to select a Geocode Factory map or a static map. In both these cases the map will appear at the position where the plugin code is entered inside the article (See “How to save coordinates in articles“ for more details in the next section). You may also choose not to display a map inside each individual geocoded article by selecting “No”.
  • Map Zoom: You can select the specific zoom level or leave it to "Auto".
  • Static Map width and Height: You can determine the height and width of your static map in pixels here.

Gateway Plugin configuration

Inside the joomla “Plugin Manager” you will find the Gateway plugin you installed. To locate it more easily, you can use the filter by adding the text “geocode” for example, like in the following image.
GF5 Joomla Plugin Manager

 

Geocode Factory - Gateway plugin

If you choose to use the "Draw Lines" option (Specific Settings tab in Markerset manager) of Geocode Factory for the Joomla content gateway plugin there is one option to configure in this plugin: This is to select the colors of the lines drawn between the markers. To do so click on the hexadecimal color code and select the color from the palette pop-up. Or alternatively, you can type in the hexadecimal color code of your choice in the field directly.

Joomla Content Gateway

If you do not use this specialised feature, then you do not need to configure anything in this plugin.


Editor Plugin configuration

Geocode Factory - Editor button plugin

Inside the joomla “Plugin Manager” you will find the installed button plugin under the editor-xtd type. In other words, to locate it easily, use the filter by choosing the "editor-xtd" option in the "type" dropdown.

There are no settings for this plugin, all you have to do is enable it and it is ready to be used. So simply click on the "x" icon under the "Status" column to enable it. A green check mark should appear next to the plugin, like in the following image.

button joomla content plugin

Now we will look at how to use the editor plugin in the following section "Pattern manager and joomla content", under "How to save coordinates in articles".


 Pattern manager and joomla content

When you enter the pattern manager you will see that one default pattern for joomla content is created automatically when you installed the plugin.

Default Joomla Content Pattern

Unlike other 3rd party extensions, for the case of geocoding joomla articles there are no fields to assign inside the pattern manager. This is because there are no fields in the Joomla articles component used so the respective Geocode Factory plugin has been designed to introduce the address/location directly inside the article via a plugin button.

In other words, the address to geocode is to be manually placed inside each selected joomla article using the plugin button.

How to save coordinates in articles

To do this, open up the Joomla “Article Manager” (found in the Joomla “Content” menu). Select the article you wish to add a map to and open it. Then simply click on the plugin button at the place you want the map to appear on the article view (inside the editor found on the “Content” tab). For example you may want to place the map at the end of the article like in the example below.

Note: You can also perform this editing from the frontend given you have the appropriate user rights.

article geocode plugin

Clicking on the button will cause the plugin pop-up to appear. Type in a location on the address field and the map will automatically point at your location. You can even enter the coordinates manually if you choose.

Add plugin code (draw map): Select this checkbox option if you want the map to be displayed inside this specific article as well. Either way, whether you select this option or not, the geocode information will be used for displaying this location alongside other locations (ex:articles) on a separate Geocode Factory map.

Save your article when finished and repeat this process for all the articles you wish to add to your map.


Markerset

The specific settings tab

The options on this tab are generated based on the currently selected pattern. In this tab you can generate the fields based on your choice of filter for the current markerset.

 

Markerset Specific Settings

Filter Generator: Here you can introduce SQL queries to filter out your results. For ex:

  • The Geocode Factory query will be build with your optional filter, like this sample (your filter in bold) :

  SELECT values FROM articles_table WHERE internal_conditions AND (your_query)

  • You can also use multiple conditions like :

  SELECT values FROM article_table WHERE internal_conditions AND ((your_query_A) AND/OR (your_query_B))

The use of this feature is the most common source of errors that result in no markerset being displayed! Remember that here you are adding a clause/condition affecting the mysql database query. Each wrong or missing charter/quote will cause an error. Handle with care!

Categories to include: Here you can select the categories from which to choose the article markers to display on the map.  You can enter many joomla categories.

Draw Lines: Select if you wish to Draw Lines between the markers.

Enable Auto-Category: With the auto-category feature enabled, the markers that will be displayed will be articles belonging to the categories you are currently browsing only (and child categories as well). This option is used to get a functionality typically seen in directories.


Alternate method - Metadata

Geocode Factory 5 allows you to use a alternate method to geocode your joomla articles: using the metadata (description or keywords).

Use Metadata as address when save articles

To use this, you need to configure the content plugin '', and set the 'Silent Geocode' option to use the metadata. Then when you save a Joomla article (frontend or backend), Geocode Factory, will read the metakeys or metadesc, transform it in address, and try to geocode it. If case of success the coordinates are saved in a special Geocode Factory table.

Use Metadata as address when batch geocode articles

You can also use the articles metadata for batch geocoding (from backend). To accomplish this, you need to create a new pattern in Geocode Factory, based on the 'Joomla 3.0 content gateway' and set the coordinates fields to use the meatadesc or metakes. Now in batch geocode you will see this new patters and all joomla articles. You can geocode them in one click.

Applies To

Geocode Factory 5