function universalFetchElement($name, $value, &$node) { $n = new JSimpleXML(); $n->loadString(method_exists($node, 'toString') ? $node->toString() : $node->asXML()); $params = new OfflajnJParameter(''); $params->setXML($n->document); $attr = $node->attributes(); if (!isset($attr['position']) || $attr['position'] != 'first') { $attr['position'] = 'last'; } if (!version_compare(JVERSION, '1.6.0', 'ge')) { // Joomla 1.5 < preg_match('/(.*)\\[([a-zA-Z0-9]*)\\]$/', $name, $out); $control = $out[1]; $name = $out[2]; $params->bind($this->_parent->_raw); $params->_raw =& $this->_parent->_raw; } else { // Joomla 1.7 > $control = $name; if ($value != '') { $params->bind($value); } } plgSystemOfflajnParams::addNewTab($this->generateId($name), parent::getLabel(), $params->render($control), (string) $attr['position']); return ''; }
function universalfetchElement($name, $value, &$node) { define("OFFLAJNADMIN", "1"); $this->loadFiles(); $this->loadFiles('legacy', 'offlajndashboard'); $j17 = 0; if (version_compare(JVERSION, '1.6.0', 'ge')) { $j17 = 1; } $style = ""; $opened_ids = json_decode(stripslashes(@$_COOKIE[$this->_moduleName . "lastState"])); if ($opened_ids) { foreach ($opened_ids as $id) { $style .= '#content-box #' . $id . ' div.content{' . 'opacity: 1;' . 'height: 100%;' . '}'; } } $document =& JFactory::getDocument(); $document->addStyleDeclaration($style); DojoLoader::r('dojo.uacss'); DojoLoader::addScript(' var offlajnParams = new OfflajnParams({ joomla17 : ' . $j17 . ', moduleName : "' . $this->_moduleName . '" }); '); $lang =& JFactory::getLanguage(); $lang->load($this->_moduleName, dirname(__FILE__) . DS . '..' . DS . '..'); $xml = dirname(__FILE__) . DS . '../../' . $this->_moduleName . '.xml'; if (!file_exists($xml)) { $xml = dirname(__FILE__) . DS . '../../install.xml'; if (!file_exists($xml)) { return; } } if (version_compare(JVERSION, '3.0', 'ge')) { $xmlo = JFactory::getXML($xml); $xmld = $xmlo; } else { jimport('joomla.utilities.simplexml'); $xmlo = JFactory::getXMLParser('Simple'); $xmlo->loadFile($xml); $xmld = $xmlo->document; } if (isset($xmld->hash) && (string) $xmld->hash) { if (version_compare(JVERSION, '3.0', 'ge')) { $hash = (string) $xmld->hash[0]; } else { $hash = (string) $xmld->hash[0]->data(); } } $this->attr = $node->attributes(); if (!isset($hash)) { $this->generalInfo = '<iframe src="http://offlajn.com/index2.php?option=com_offlajn_update_info&v=' . (version_compare(JVERSION, '3.0', 'ge') ? (string) $xmld->version : $xmld->version[0]->data()) . '" frameborder="no" style="border: 0;" width="100%"></iframe>'; $this->relatedNews = '<iframe id="related-news-iframe" src="http://offlajn.com/index2.php?option=com_offlajn_related_news&tag=' . @$this->attr['blogtags'] . '" frameborder="no" style="border: 0;" width="100%" ></iframe>'; } else { $this->generalInfo = '<iframe src="http://offlajn.com/index2.php?option=com_offlajn_update_info&hash=' . base64_url_encode($hash) . '&v=' . (version_compare(JVERSION, '3.0', 'ge') ? (string) $xmld->version : $xmld->version[0]->data()) . '&u=' . JURI::root() . '" frameborder="no" style="border: 0;" width="100%"></iframe>'; $this->relatedNews = '<iframe id="related-news-iframe" src="http://offlajn.com/index2.php?option=com_offlajn_related_news&tag=' . @$this->attr['blogtags'] . '" frameborder="no" style="border: 0;" width="100%" ></iframe>'; } $this->loadDashboard(); if (!version_compare(JVERSION, '1.6.0', 'ge')) { preg_match('/(.*)\\[([a-zA-Z0-9]*)\\]$/', $name, $out); @($control = $out[1]); $x = file_get_contents($xml); preg_match('/<fieldset.*?>(.*)<\\/fieldset>/ms', $x, $out); $params = str_replace(array('<field', '</field'), array('<param', '</param'), $out[0]); $n = new JSimpleXML(); $n->loadString($params); $attrs = $n->document->attributes(); if ($_REQUEST['option'] == 'com_modules' || $_REQUEST['option'] == 'com_advancedmodules') { $n->document->removeChild($n->document->param[0]); $params = new OfflajnJParameter(''); $params->setXML($n->document); $params->_raw =& $this->_parent->_raw; $params->bind($this->_parent->_raw); echo $params->render($control); } } if (!isset($hash) || $hash == '') { return; } return ""; }
$document->_scripts[smartslider_translate_url($k)] = $s; unset($document->_scripts[$k]); } } $document->_metaTags = array(); $head = $document->getBuffer('head'); echo preg_replace('/<(meta|title).*/', '', $head); exit; } else { if (isset($_SESSION['slidertype']) && isset($_SESSION['slidertype']['forms'][$_REQUEST['key2']]) && isset($_SESSION['slidertype'][$_SESSION['slidertype']['forms'][$_REQUEST['key2']]]['theme'][$_REQUEST['key']])) { $env = $_SESSION['slidertype']; $type = $_SESSION['slidertype']['forms'][$_REQUEST['key2']]; $theme = $_SESSION['slidertype'][$_SESSION['slidertype']['forms'][$_REQUEST['key2']]]['theme'][$_REQUEST['key']]; require_once $_SESSION['OFFLAJNADMINPARAMPATH'] . DS . 'offlajndashboard' . DS . 'offlajndashboard.php'; $xml = $env['typesdir'] . '/' . $type . '/' . $theme . '/theme.xml'; $params = new OfflajnJParameter('', $xml, 'module'); if ($type == $env['formdata']['type'] && $theme == $env['formdata']['theme']) { $params->bind($env['formdata']); } echo $params->render($env['c']); plgSystemDojoloader::customBuild(); $document = JFactory::getDocument(); if (defined('WP_ADMIN')) { foreach ($document->_styleSheets as $k => $s) { $document->_styleSheets[smartslider_translate_url($k)] = $s; unset($document->_styleSheets[$k]); } foreach ($document->_scripts as $k => $s) { $document->_scripts[smartslider_translate_url($k)] = $s; unset($document->_scripts[$k]); }