Smart IP

Smart IP Drupal 8 settings explained

The following is the explanation of each Smart IP Drupal 8 settings.

Database Update Status

This Smart IP section setting will only appear if your Data Source is either IP2Location binary database or MaxMind GeoIP2 binary database. It display the status of database update process from manually executed or automatically during cron run. If the database update failed, you can manually force the database update by clicking the "Update database now" button.

Display list of Drupal contents based on your visitor's state/province/region location in Views (using Smart IP and Location modules) and have a dropdown form available to filter other regions

In this article we will discuss how to setup a View that shows list of contents in a Drupal 7 site that are filtered based on your visitor's state/province/region location with the use of Smart IP and Location contributed modules and expose views filter to have a dropdown form available for visitors to enable them to filter list of contents in other regions. Smart IP module is used to identify Drupal site visitor's geographical location based on his IP address and Location module is used to provide the field and expose the views location filters.

Steps:

Display downloadable files based on the country location of the visitor of a Drupal site's content

This article will show how to display downloadable files based on the country location of the visitor of a Drupal 7 site's content. We will take a sample application where the website's contents will have three types of downloadable files; first type should be displayed only for visitors from Philippines; the second type should be displayed only for visitors from Singapore and the third type should be displayed for visitors that are not from Philippines and Singapore (rest of the world) with the use of Smart IP, Field Collection and Location contributed modules.

Influence the Drupal site's suggestion list of search autocomplete module with Smart IP views country filter

This is an example application of Smart IP where it influence the suggestion shown in the list of search autocomplete based on the country location of the visitor in a Drupal 7 site with the use of Smart IP, Search Autocomplete and Location contributed modules. Basically, the search autocomplete will display list of suggestions but the list of nodes will be filtered based on country location of the visitor and nodes that have an empty value in Location country field will not be filtered.

Smart IP Drupal 7 settings explained

The following is the explanation of each Smart IP settings in Drupal 7.

Database Update Status

This Smart IP section setting will only appear if your Data Source is either MaxMind GeoIP Legacy binary database or MaxMind GeoIP2 binary database or Smart IP database (Maxmind's CSV). It display the status of database update process from manually executed or automatically during cron run. If the database update failed, you can manually force the database update by clicking the "Update database now" button.

Display specific Drupal contents based on your visitor's country location in Views (using Smart IP and Location modules) and display all contents if there's no result

This tutorial will show how to setup a View that shows list of contents in a Drupal 7 site that are filtered based on your visitor's country location with the use of Smart IP and Location contributed modules and if there is no result, the fall back is to display all contents. Smart IP module is used to identify Drupal site visitor's geographical location based on his IP address and Location module is used to provide the field and expose views location filters.

Filter Drupal contents based on your visitor's city location in Views using Smart IP and Location modules

This guide will show how to setup a View that shows list of contents in a Drupal 7 site that are filtered based on your visitor's city location with the use of Smart IP and Location contributed modules. Smart IP module is used to identify Drupal site visitor's geographical location based on his IP address and Location module is used to provide the field and expose views location filters.

Steps:

The following steps will list all the nodes with city location field stored content same as the value of my city detected by Smart IP.

Installing geoip2 required library for Smart IP's data source MaxMind GeoIP2 binary database

The MaxMind GeoIP2 binary database is a custom binary format and there are two available APIs that read this binary database: MaxMind DB Reader PHP API which includes an optional C extension that you may install to improve binary database lookup performance and the default is GeoIP2 PHP API. We will discuss how to install these two APIs in your system.

Installing ip2location-php required library for Smart IP's data source IP2Location binary database

Using Smart IP's data source IP2Location binary database requires ip2location/ip2location-php library which contains API that reads its database file. This article will show how to setup this API using composer.

The following procedures are tested on my Linode server running Centos 7 64-bit Linux distribution.

  1. First we will install composer: