Knowledge Base - Gateway for Adsmanager

 

What is it

Adsmanager is arguably the leading classified ads component for Joomla!.

Using Geocode Factory's gateway plugin you can associate one or more sets of coordinates to each of your Adsmanager articles. In this way, you can display the locations of your Adsmanager articles as markers on a map.


Adsmanager Preparation

Overview

To geocode your Adsmanager articles using the Geocode Factory Adsmanager gateway plugin you will need to use your Adsmanager fields. Geocoding simply means to assign the proper coordinates for their location.

If you are using a paid version of Adsmanager, you will can your articles geocoded by using the special "GMap" custom field. This special field allows your users to generate the coordinates (latitude, longitude) by adding their address information in this field (and/or manually moving the marker on the map).

geocoder field type

If you are using a free version of Adsmanager, you have two options on the ways to get your articles geocoded (see below):

1
Address fields

You can use address fields like street, postcode, city, etc and automatically fetch the coordinates (geocoding) based on the data in these fields (using Geocode Factory 5).The address fields are field types of your choice. For instance they can be drop-down selection or textbox field types. In this case however you will still need to create coordinate fields to store the data (see 2 below).

2
Coordinate fields

Or you can simply use coordinate fields (latitude and longitude) and input the coordinate values directly (manually). If you use this option, you don't need to create address fields. Using only coordinate fields without address fields is only for a few rare and exceptional cases. It would be a case where the users who create the ads would manually input the coordinate values.

Please note that in both these cases for the free version of Adsmanager you will need to create two coordinates fields. These fields are of course latitude and longitude. Even if you use address fields to fetch the coordinates, you will need a longitude and latitude field where the coordinates data from the geocoding process will be stored. The process of creating coordinate fields is very similar to creating address fields as we shall see.

 

Adsmanager Custom Fields

Follow the following steps to create the fields before configuring the Adsmanager gateway plugin.

Once inside your Adsmanager component in the Joomla administration area, click on the "Fields" option from the left sidebar (or from the Joomla admin main menu dropdown).

You should then see a list of your Fields.

Now, to add a new custom field click on the "New" button , like in the following example image.

adsm-new-field-button

 

If you are using a free version of Adsmanager:

Note: If you want to use coordinate fields (latitude and longitude) and input the coordinate values directly (manually), you don't need to create address fields but only coordinate fields (as described in point "2" above).  So you can skip this part and go straight to number 2.

1
Address fields

First address field: Street

new-address-field-adsm

Type: In this case the field type is a "Text Field".

Name: Give a name to your field.

Title: Give it a title.

Description: Enter the "Description" settings as you like (optional).

Category: You will also need to select at least one category or the "All ads" option (not shown in image above).

Finally, save your new field and repeat these steps for as many fields as you like (ex: region, country, etc).

Note: You should already have a city and postal code field available to you by default in your Adsmanager installation.

 

2
Coordinate fields - latitude and longitude

First coordinate field: Latitude

lat-new-field-adsm

 

Type: In this case the field type is a  "Number Text" or "Text Field".

Name: Give a name to your field.

Title: Give it a title.

Description: Enter the "Description" settings as you like (optional).

Category: You will also need to select at least one category or the "All ads" option (not shown in image above).

Finally, save your new field and repeat these steps for the Longitude field as well.

Adsmanager (free version) is now ready!

 

If you're using a paid version of Adsmanager:

In the case where there is no "GMap" type field already created by default, you will have to create one.

 adsm-geocoder-new-field

Type: In this case the field type is a "GMap" field.

Name: Give a name to your field.

Title: Give it a title.

Description: Enter the "Description" settings as you like (optional).

Category: You will also need to select at least one category or the "All ads" option (not shown in image above).

Map related options: You can also configure tha map related options at the bottom of the GMAp field list (not shown in image above). You can choose to show this map inside each individual ad (ex:details page).You can consult the Adsmanager documentation for more info (this map is not part of Geocode Factory).

Finally, save your new field. Adsmanager is now ready!


Installation

Overview

Note: In order to use Geocode Factory's Adsmanager gateway plugin, you need to have Geocode Factory 5 component already installed.

The gateway plugin for Adsmanager is not included in your Geocode Factory 5 package by default. This file is an optional extra:

  • plg_geofactory_gw_adsm.zip: Adsmanager gateway plugin

 

Access, Download and Installation

The Adsmanager Gateway plugin file "plg_geofactory_gw_adsm.zip" is installed using the standard Joomla installer.

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

 


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.

 joomla-plugin-manager-adsm

Geocode Factory - Adsmanager Gateway plugin

Configuring the Adsmanager Gateway plugin you have only the following option:

joomla-adsm-plugin-view

Colors of the lines between owners and content markers: If you choose to use the "Draw Lines" option (Specific Settings tab in Markerset manager) of Geocode Factory for the Adsmanager gateway plugin, you can configure the color of the lines drawn between the markers here. 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.

Default avatar image: Optionally, you can select a default avatar image here for profiles without an image. If left empty the default Google pin will be used in this case.

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


Pattern manager and Adsmanager ads

When you enter the pattern manager you will see that one default pattern for Adsmanager articles is already available. This pattern was created automatically when you installed the plugin.

 pattern-manager-adsm

Click on the "Default - Adsmanager" pattern and go to the third tab "Assign fields to the values".

Location data assignment from your Adsmanager fields

If you're using a paid version of Adsmanager:

gmap-adsm-pattern

  • For the Latitude and Longitude options select and assign the one "GMap" field you created from the dropdown menu options (ex: "GEO lat/long" in this documentation case).
  • For the address fields there is nothing to assign in this case, you can leave the rest of the fields empty.

If you're using a free version of Adsmanager:

As we mentioned before, in order to geocode your Adsmanager (free) articles using the Geocode Factory Adsmanager gateway plugin you need:

1-) Address fields to fetch the coordinates: You can choose which fields you wish to assign for your needs. Not all fields apearing here need to have a selection. In other words, you can choose not to use some field assignments. In such a case, for the unused address fields the default option "Select" has to be selected.

2-) Coordinate fields to store the fetched data in: The coordinate fields can only be textbox fieldor number text types for them to show up as an option in the associated dropdowns of the latitude and longitutde fields. Please note that these fields will be used to store the coordinates fetched from the address fields above. You can also use these fields to manually input the coordinates from the Adsmanager ad entry form directly. In such a case you don't need to create address fields and so you will not need to associate address fields in the Adsmanager pattern either.

 

1-) Address and coordinates fields case:

adsm-assign-pattern-address

 

 

  • For the Latitude and Longitude options select and assign the respective fields you created from the dropdown menu options (ex: "lat" and "lon").
  • Assign the proper address fields to the Adsmanager pattern fields you have created (ex:street, city, country).

2-) Coordinates fields only case:

adsm-assign-pattern-coords

  • for the Latitude and Longitude options select and assign the respective fields you created from the dropdown menu options (ex: "lat" and "lon").
  • For the address fields there is nothing to assign in this case.

 

Markerset

The specific settings tab

The options on this tab are generated based on the currently selected pattern. In this tab you can select various different filters for the current markerset allowing you to further customize your data pool. You may also select some other options which are not filter-related.

 specific-settings-markerset-adsm

Filter Generator: Here you can introduce SQL queries to filter out your results. The Geocode Factory query will be build with your optional filter. For instance, in the example above the condition is that the data in the field "Adsmanager_special" has to be equal to "Yes". This way, the Adsmanager entries which meet this condition will be used only. The idea in this case is to have a checkbox field (Adsmanager_special) where the authors choose whether they want to have their entry displayed on the map "Yes", or not "No". Of course this field could be an administrative one instead, ior it may be serving some other purpose as well. It all depends on what you want to achieve.

Warning: 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!

Select sales area field: Here you can select the CB field that will be used to calculate the "Sales Area". It has to be a numeric value/field. See the Geocode Factory advanced features article to better understand this functionality

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 Adsmanager categories.

Include child: Here you can select if you want to include articles from child categories.

Entries to load: Choose the status of the articles to display, ex: published.

Lines owners entries-events: Select if you wish to Draw Lines between the markers of the owners (authors) of the Adsmanager articles and their articles.

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.

As long as there are tests, there will be prayer in public schools

 

Applies To

Geocode Factory 5