本文整理匯總了PHP中FabrikHelperHTML::removeDocumentHeadPart方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::removeDocumentHeadPart方法的具體用法?PHP FabrikHelperHTML::removeDocumentHeadPart怎麽用?PHP FabrikHelperHTML::removeDocumentHeadPart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FabrikHelperHTML
的用法示例。
在下文中一共展示了FabrikHelperHTML::removeDocumentHeadPart方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: mootools
/**
* overwrite standard J mootools file with mootools 1.2
* this isnt really going to work out - too much incompatibilty between the two code bases
* even with "compatibility mode" on will try again when final 1.2 is out
*/
function mootools()
{
static $mootools;
if (!isset($mootools)) {
$mootools = true;
if (FabrikWorker::nativeMootools12()) {
//new standard J mt 1.2.4 pluign is enabled
// $$$ hugh - because we set $mootools false in our script() method, before
// we call the JHTML::script(), their method then doesn't include moo automagically.
// So let's make darn sure it gets loaded!
JHTML::_('behavior.mootools');
FabrikHelperHTML::script('j1.5.20_mootools-1.2-ext.js', 'components/com_fabrik/libs/mootools1.2/', true);
//FabrikHelperHTML::script('compat12.js', 'components/com_fabrik/libs/mootools1.2/', false);
return;
}
$mooversion = FabrikWorker::getMooVersion();
if ($mooversion == -1) {
FabrikHelperHTML::script('mootools-ext.js', 'components/com_fabrik/libs/', true);
return;
}
if ($mooversion == 1) {
$document =& JFactory::getDocument();
$docscripts =& FabrikHelperHTML::getDocumentHeadPart('scripts');
$newscripts = array();
foreach ($docscripts as $script => $type) {
if (strstr($script, '/media/system/js/mootools.js') || strstr($script, '/fabrik2.0.x/media/system/js/mootools-uncompressed.js')) {
$newscripts[$script] = $type;
}
}
FabrikHelperHTML::removeDocumentHeadPart('scripts', $newscripts);
$config =& JFactory::getConfig();
$debug = $config->getValue('config.debug');
// TODO NOTE: Here we are checking for Konqueror - If they fix thier issue with compressed, we will need to update this
$konkcheck = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "konqueror");
if ($debug || $konkcheck) {
FabrikHelperHTML::script('mootools-1.2-uncompressed.js', 'components/com_fabrik/libs/mootools1.2/', false);
FabrikHelperHTML::script('mootools-1.2-more-uncompressed.js', 'components/com_fabrik/libs/mootools1.2/', false);
} else {
FabrikHelperHTML::script('mootools-1.2.js', 'components/com_fabrik/libs/mootools1.2/', false);
FabrikHelperHTML::script('mootools-1.2-more.js', 'components/com_fabrik/libs/mootools1.2/', false);
}
FabrikHelperHTML::script('compat.js', 'components/com_fabrik/libs/mootools1.2/', false);
FabrikHelperHTML::script('compat12.js', 'components/com_fabrik/libs/mootools1.2/', false);
FabrikHelperHTML::script('tips.js', 'components/com_fabrik/libs/mootools1.2/', false);
FabrikHelperHTML::script('mootools-1.2-ext.js', 'components/com_fabrik/libs/mootools1.2/', true);
} else {
FabrikHelperHTML::script('mootools-ext.js', 'components/com_fabrik/libs/', true);
}
}
}