Server : LiteSpeed System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : alsaif ( 1057) PHP Version : 7.4.33 Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/alsaif/domains/alsaif.group/private_html/modules/mod_bt_googlemaps/ |
<?php
/**
* @package mod_bt_googlemaps - BT Google Maps
* @version 2.0.5
* @created Jun 2012
* @author BowThemes
* @email support@bowthems.com
* @website http://bowthemes.com
* @support Forum - http://bowthemes.com/forum/
* @copyright Copyright (C) 2012 Bowthemes. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
class modbt_googlemapsHelper
{
public static function fetchHead($params, $module){
$document = JFactory::getDocument();
$mainframe = JFactory::getApplication();
$template = $mainframe->getTemplate();
$language = JFactory::getLanguage();
if($params->get('enable_map_api',1)){
$mapApi= '//maps.google.com/maps/api/js?language='.$language->getTag();
if($params->get('map_api')){
$mapApi .= '&key='.$params->get('map_api');
}
$document->addScript($mapApi);
}
$document->addScript(JURI::root().'modules/mod_bt_googlemaps/tmpl/js/btbase64.min.js');
if($params->get('enable-custom-infobox')){
$document->addScript(JURI::root().'modules/mod_bt_googlemaps/tmpl/js/infobox.js');
}
if(file_exists(JPATH_BASE.'/templates/'.$template.'/html/mod_bt_googlemaps/js/default.js'))
{
$document->addScript(JURI::root().'templates/'.$template.'/html/mod_bt_googlemaps/js/default.js');
}
else{
$document->addScript(JURI::root().'modules/mod_bt_googlemaps/tmpl/js/default.js');
}
if(file_exists(JPATH_BASE.'/templates/'.$template.'/html/mod_bt_googlemaps/css/styles.css'))
{
$document->addStyleSheet(JURI::root().'templates/'.$template.'/html/mod_bt_googlemaps/css/style.css');
}
else{
$document->addStyleSheet(JURI::root().'modules/mod_bt_googlemaps/tmpl/css/style.css');
}
}
}