2015-08-24 20:22:07 +00:00
|
|
|
<?php
|
|
|
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
|
|
|
Vast Development Method
|
|
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
|
2017-04-08 18:35:55 +00:00
|
|
|
@version 2.0.0
|
2018-05-05 13:32:19 +00:00
|
|
|
@build 5th May, 2018
|
2017-04-08 18:35:55 +00:00
|
|
|
@created 18th October, 2016
|
2015-08-24 20:22:07 +00:00
|
|
|
@package Demo
|
|
|
|
@subpackage headercheck.php
|
|
|
|
@author Llewellyn van der Merwe <https://www.vdm.io/>
|
|
|
|
@copyright Copyright (C) 2015. All Rights Reserved
|
|
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
|
|
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
|
|
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
|
|
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
|
|
|
|
|
|
|
/------------------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
// No direct access to this file
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
2017-08-21 12:17:01 +00:00
|
|
|
class demoHeaderCheck
|
2015-08-24 20:22:07 +00:00
|
|
|
{
|
|
|
|
function js_loaded($script_name)
|
|
|
|
{
|
|
|
|
// UIkit check point
|
|
|
|
if (strpos($script_name,'uikit') !== false)
|
|
|
|
{
|
|
|
|
$app = JFactory::getApplication();
|
|
|
|
$getTemplateName = $app->getTemplate('template')->template;
|
|
|
|
|
|
|
|
if (strpos($getTemplateName,'yoo') !== false)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-03 02:17:44 +00:00
|
|
|
$document = JFactory::getDocument();
|
2015-08-24 20:22:07 +00:00
|
|
|
$head_data = $document->getHeadData();
|
|
|
|
foreach (array_keys($head_data['scripts']) as $script)
|
|
|
|
{
|
|
|
|
if (stristr($script, $script_name))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function css_loaded($script_name)
|
|
|
|
{
|
|
|
|
// UIkit check point
|
|
|
|
if (strpos($script_name,'uikit') !== false)
|
|
|
|
{
|
|
|
|
$app = JFactory::getApplication();
|
|
|
|
$getTemplateName = $app->getTemplate('template')->template;
|
|
|
|
|
|
|
|
if (strpos($getTemplateName,'yoo') !== false)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-03 02:17:44 +00:00
|
|
|
$document = JFactory::getDocument();
|
2015-08-24 20:22:07 +00:00
|
|
|
$head_data = $document->getHeadData();
|
|
|
|
|
|
|
|
foreach (array_keys($head_data['styleSheets']) as $script)
|
|
|
|
{
|
|
|
|
if (stristr($script, $script_name))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|