public function render() { global $expose; //import menu file expose_import("core.menu.accordion"); // Assign some values $startlevel = $this->get('startlevel', 0); $endlevel = $this->get('endlevel', 3); // Set start and end level to params $expose->document->params->set('startlevel', $startlevel); //Startlevel $expose->document->params->set('endlevel', $endlevel); //endlevel $menu = new ExposeAccordionMenu($expose->document->params); // Load offcanvas js $expose->addLink('offcanvas.js', 'js'); ob_start(); ?> <nav class="ex-menu"> <?php $menu->loadMenu(); ?> <?php $menu->genMenu(); ?> </nav> <!-- menu end --> <?php return ob_get_clean(); }
public function render() { global $expose; $html = ''; // Assign params values $animation = $this->get('animation'); $animation_sublevel = $this->get('animation-sublevel'); $startlevel = $this->get('startlevel', 1); $endlevel = $this->get('endlevel', -1); //$fancy = ($this->get('fancy-animation')) ? 'true' : 'false'; $style = isset($_COOKIE[$expose->templateName . '_menu']) ? $_COOKIE[$expose->templateName . '_menu'] : $this->get('style', 'mega'); if (isset($_REQUEST['menu'])) { setcookie($expose->templateName . '_menu', $_REQUEST['menu'], time() + 3600, '/'); $style = $_REQUEST['menu']; } $fileName = $style . 'menu'; switch ($style) { case 'split': $class = 'ExposeSplitMenu'; break; case 'mega': default: $class = 'ExposeMegaMenu'; break; } //import menu file expose_import("core.menu.{$fileName}"); //set some menu params $align = $expose->direction == 'rtl' ? 'right' : 'left'; $expose->document->params->set('startlevel', $startlevel); //Startlevel $expose->document->params->set('endlevel', $endlevel); //endlevel $menu = new $class($expose->document->params); ob_start(); ?> <nav class="ex-menu hidden-phone" dropdown-animation="<?php echo $animation; ?> " dropdown-sub-animation="<?php echo $animation_sublevel; ?> "> <?php $menu->loadMenu(); ?> <?php $menu->genMenu(); ?> </nav> <!-- menu end --> <?php return ob_get_clean(); }
public function isEnabled() { global $expose; // If menu style is not split eject $style = isset($_COOKIE[$expose->templateName . '_menu']) ? $_COOKIE[$expose->templateName . '_menu'] : ''; if ($style !== 'split' and $expose->get('menu-style') !== 'split') { return FALSE; } if (!class_exists('ExposeSplitMenu')) { //import menu file expose_import("core.menu.splitmenu"); } $this->menu = new ExposeSplitMenu($expose->document->params); $this->menu->loadMenu(); if ($this->menu->hasSubMenu(1) and $this->menu->showSeparatedSub) { return TRUE; } return FALSE; }
if (!version_compare($version, '5.0.0', '>=')) { return JError::raise(E_ERROR, 500, 'PHP 4 is not supported by Expose Framework'); } if (!defined('EXPOSE_VERSION')) { // Define framework version. define('EXPOSE_VERSION', '4.2.3'); //define directory separator defined('DS') or define('DS', '/'); if (version_compare(JVERSION, '2.5', 'ge') && version_compare(JVERSION, '3.0', 'lt')) { define('EXPOSE_JVERSION', '25'); } else { define('EXPOSE_JVERSION', '30'); } //declare global ver global $expose; expose_import('core.core'); $expose = ExposeCore::getInstance(); } /** * File Loader * * This function will load file form given paths. Joomla default path style * * @access public * @param string the directory path * @return void */ function expose_import($paths) { $paths = str_replace('.', '/', $paths); $file = realpath(dirname(__FILE__)) . '/' . $paths . '.php';
<?php /** * @package Expose * @subpackage Bootstrap Theme * @version 4.0 * @author ThemeXpert http://www.themexpert.com * @copyright Copyright (C) 2010 - 2011 ThemeXpert * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3 **/ //prevent direct access defined('EXPOSE_VERSION') or die('resticted aceess'); //import parent gist class expose_import('core.widget'); class ExposeWidgetJqueryfix extends ExposeWidget { public $name = 'jqueryfix'; public function isEnabled() { return TRUE; } public function init() { global $expose; // Get the component name $option = JRequest::getCmd('option'); /*Joomers fix . Joomer load jquery at the begining so we need to turn off expose jquery */ if ($option == 'com_jomres') { // turn off loading expose jquery $expose->set('jquery-enabled', 0);
* @author ThemeXpert http://www.themexpert.com * @copyright Copyright (C) 2010 - 2011 ThemeXpert * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3 * **/ // no direct access defined('_JEXEC') or die('Restricted index access'); //framework bootstrap if (file_exists(JPATH_LIBRARIES . '/expose/expose.php')) { require_once JPATH_LIBRARIES . '/expose/expose.php'; } else { echo JText::_('Unable to find Expose library. Please make sure you have it installed.'); die; } //Import layout class expose_import('core.layout'); // Create an instance of layout class and it will call the widget->init(). $layout = ExposeLayout::getInstance(); ?> <?php if (JRequest::getString('type') == 'raw') { ?> <jdoc:include type="component" /> <?php } else { ?> <!DOCTYPE html> <html lang="<?php echo $this->language; ?>
public function detectPlatform() { expose_import('libs.browser'); $this->browser = new ExposeBrowser(); $browserName = $this->browser->getBrowser(); //we'll consider 2 mobile now iPhone and Android, iPad will treat as regular desktop device if ($this->get('iphone-enabled') and $this->browser->isMobile() and $browserName == 'iPhone') { $this->platform = 'mobile'; } elseif ($this->get('android-enabled') and $this->browser->isMobile() and ($browserName == 'android' or $browserName == 'Android')) { $this->platform = 'mobile'; } else { $this->platform = 'desktop'; } }
<?php /** * @package Expose * @version * @author ThemeXpert http://www.themexpert.com * @copyright Copyright (C) 2010 - 2011 ThemeXpert * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3 * @file layout.php **/ //prevent direct access defined('EXPOSE_VERSION') or die('resticted aceess'); //Import Module chrome generator class expose_import('core.html'); //import joomla filesystem classes jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); class ExposeLayout { protected $modules = array(); protected $widgets = array(); protected $activeWidgets = array(); public function __construct() { //load all widgets in an array and trigger the initialize event for those widgets. $this->loadWidgets(); } public static function getInstance() { static $instance; if (!isset($instance)) {
protected static function minify($content, $type) { if ($type == 'css') { expose_import('libs.csscompressor'); $content = ExposeCssCompressor::process($content); return $content; } if ($type == 'js') { expose_import('libs.jsmin'); $content = ExposeJSMin::minify($content); return $content; } }