tra('Locator'), 'description' => tra('Presents a map with the geolocated content within the page.'), 'prefs' => [], 'params' => [ ], ]; } /** * @param $mod_reference * @param $module_params */ function module_locator($mod_reference, $module_params) { global $prefs; $smarty = TikiLib::lib('smarty'); if ($prefs['geo_enabled'] === 'y') { TikiLib::lib('header')->add_map(); // assign the default map centre from the prefs as a data attribute for the map-container div $smarty->assign('center', TikiLib::lib('geo')->get_default_center()); } else { $smarty->assign('module_error', tr('Preference "%0" is disabled', 'geo_enabled')); } }