Example #1
0
 function onAfterRender()
 {
     if (!defined('_MJ')) {
         return;
     }
     if ($this->isJoomla15()) {
         /** @var JSite $app */
         $app = JFactory::getApplication();
         $app->setUserState('setTemplate', null);
     }
     $text = JResponse::getBody();
     $app = JFactory::getApplication();
     $app->triggerEvent('onMobilePagePrepare', array(&$text));
     $MobileJoomla = MobileJoomla::getInstance();
     $text = $MobileJoomla->processPage($text);
     if (!empty($text)) {
         JResponse::setBody($text);
     }
     $app->triggerEvent('onMobileAfterPagePrepare');
 }
Example #2
0
<?php

/**
 * ###DESC###
 * ###URL###
 *
 * @version		###VERSION###
 * @license		###LICENSE###
 * @copyright	###COPYRIGHT###
 * @date		###DATE###
 */
defined('_JEXEC') or die('Restricted access');
defined('_MJ') or die('Incorrect usage of Mobile Joomla.');
$MobileJoomla =& MobileJoomla::getInstance();
$MobileJoomla->showMessage();
$MobileJoomla->showComponent();
Example #3
0
 static function _renderMenu($menu, &$params, $submenu = array())
 {
     $MobileJoomla = MobileJoomla::getInstance();
     $markup = $MobileJoomla->getMarkup();
     switch ($markup) {
         case 'wml':
         case 'chtml':
         case 'xhtml':
         case 'iphone':
             break;
         default:
             $markup = 'xhtml';
     }
     $app = JFactory::getApplication();
     $sitemenu = $app->getMenu();
     $active = $sitemenu->getActive();
     $active_id = isset($active) ? $active->id : 0;
     $is_vertical = $params->get('layout') == 'v';
     $is_submenu = $params->get('class_prefix') == 'submenu';
     $layout_file = JModuleHelper::getLayoutPath('mod_mj_menu', $markup);
     if (!is_file($layout_file)) {
         $layout_file = JModuleHelper::getLayoutPath('mod_mj_menu', 'xhtml');
     }
     require $layout_file;
 }