elements_helper.php
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/* ======================================================
# Web357 Framework - Joomla! System Plugin v1.5.1
# -------------------------------------------------------
# For Joomla! 3.x
# Author: Yiannis Christodoulou (yiannis@web357.eu)
# Copyright (©) 2009-2018 Web357. All rights reserved.
# License: GNU/GPLv3, http://www.gnu.org/licenses/gpl-3.0.html
# Website: https://www.web357.eu/
# Support: support@web357.eu
# Last modified: 09 Feb 2018, 13:55:18
========================================================= */
defined('_JEXEC') or die;
// BEGIN: Custom CSS & Javascript
// some useful params
jimport('joomla.environment.uri' );
$host = JURI::root();
$document = JFactory::getDocument();
JLoader::import( "joomla.version" );
$version = new JVersion();
// jQuery
if (version_compare( $version->RELEASE, "2.5", "<=")) :
$document->addScript(JURI::root(true).'/plugins/system/web357framework/elements/assets/js/jquery-1.10.2.min.js');
endif;
// Custom JS Script
$document->addScript(JURI::root(true).'/plugins/system/web357framework/elements/assets/js/script.js');
// CSS Style
$document->addStyleSheet(JURI::root(true).'/plugins/system/web357framework/elements/assets/css/web357framework.css');
// END: Custom CSS & Javascript
// BEGIN: Loading plugin language file
$lang = JFactory::getLanguage();
$current_lang_tag = $lang->getTag();
$lang = JFactory::getLanguage();
$extension = 'plg_system_web357framework';
$base_dir = JPATH_ADMINISTRATOR;
$language_tag = (!empty($current_lang_tag)) ? $current_lang_tag : 'en-GB';
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);
// END: Loading plugin language file
// Check if extension=php_curl.dll is enabled in PHP
function isCurl(){
if (function_exists('curl_version')):
return true;
else:
return false;
endif;
}
// Check if allow_url_fopen is enabled in PHP
function allowUrlFopen(){
if(ini_get('allow_url_fopen')):
return true;
else:
return false;
endif;
}