Smart IP module - how to check what every country sees

by Antonios Tsimourtos   Last Updated January 11, 2018 10:07 AM

Unfortunately i don't have too much experience with drupal so please feel free to ask for more information if needed and i will provide.

I am using Drupal 7.34 and i have a module installed called Smart IP. I have different blocks which are shown depending on the users IP/Location/Language.

For example, when editing a block, going to the Show block on specific pages -> Pages on which this PHP Code returns TRUE (experts only) with the below code :

<?php

$smart_ip_session = smart_ip_session_get('smart_ip');
if (isset($smart_ip_session['location']['country_code'])){
        if ($smart_ip_session['location']['country_code'] =='GR' && drupal_is_front_page()){
                    return TRUE;
          }
}
?>

The above block will be shown if it's a drupal_is_front_page()) and if country_code is GR.

Since i am from Greece, the specific block is going to be loaded. How can i check how the block of another country looks like?

Tags : 7


Related Questions