/** * This function is used as a replacement to JRoute::_() to generate sef urls in Joomla admin * * @param mixed $urls * @param mixed $xhtml * @param mixed $ssl */ function siteRoute($urls, $xhtml = true, $ssl = null) { global $mainframe; !is_array($urls) and $urls = array($urls); $parsed_urls = array(); // Check if plugins already processed $_this = cmsFramework::getInstance(); if (!is_object($_this->jMainframe)) { // Backup original mainframe object $_this->jMainframe = clone $mainframe; // Get a new mainframe object to process the sef plugins $mainframe = JApplication::getInstance('site'); $router = $mainframe->getRouter(); $plugins = JPluginHelper::_load(); $total = count($plugins); for ($i = 0; $i < $total; $i++) { $plugins[$i]->type == 'system' and in_array($plugins[$i]->name, $_this->sef_plugins) and JPluginHelper::_import($plugins[$i]); } if (class_exists('plgSystemSEF_Advance')) { plgSystemSEF_Advance::trigger(); } else { $mainframe->triggerEvent('onAfterInitialise'); } // Store modified mainframe object with sef plugin router $_this->newMainframe = $mainframe; } else { // Load the modified mainframe object with sef plugin router $mainframe = $_this->newMainframe; } $router = $mainframe->getRouter(); foreach ($urls as $url) { $uri = $router->build($url); $parsed_url = $uri->toString(); $parsed_urls[] = str_replace('/administrator', '', $parsed_url); } // Restore original mainframe object $mainframe = $_this->jMainframe; return count($parsed_urls) == 1 ? array_shift($parsed_urls) : $parsed_urls; }
function onPrepareContent(&$article, &$params) { if (!class_exists('cmsFramework')) { return; } // Check whether to perform the replacement or not $option = Sanitize::getString($_REQUEST, 'option', ''); $view = Sanitize::getString($_REQUEST, 'view', ''); $layout = Sanitize::getString($_REQUEST, 'layout', ''); $id = Sanitize::getInt($_REQUEST, 'id'); if ($option == 'com_content' && in_array($view, array('article', 'category', 'section', 'frontpage')) && ($layout != '' || in_array($view, array('article', 'frontpage')))) { $row =& $article; if ((isset($row->params) || isset($row->parameters)) && isset($row->id) && isset($row->catid) && isset($row->sectionid) && $row->id > 0 && $row->catid > 0 && $row->sectionid > 0) { $Dispatcher = new S2Dispatcher('jreviews', true); if ($option == 'com_content' && $view == 'article' & $id > 0) { $_GET['url'] = 'com_content/com_content_view'; } elseif ($option == 'com_content' && (($layout == 'blog' || $layout == 'blogfull') && ($view == 'category' || $view == 'section') || $view == 'frontpage')) { $_GET['url'] = 'com_content/com_content_blog'; } $passedArgs = array('params' => $params, 'row' => $row, 'component' => 'com_content'); $passedArgs['cat'] = $row->catid; $passedArgs['section'] = $row->sectionid; $passedArgs['listing_id'] = $row->id; $output = $Dispatcher->dispatch($passedArgs); if ($output) { $row =& $output['row']; $params =& $output['params']; } /** * Store a copy of the $listing and $crumbs arrays in memory for use in the onBeforeDisplayContent method */ $_this =& cmsFramework::getInstance(); $_this->listing =& $output['listing']; $_this->crumbs =& $output['crumbs']; // Destroy pathway if (isset($_this->crumbs) && !empty($_this->crumbs)) { cmsFramework::setPathway(array()); } unset($Dispatcher); } } }
/css/ieonly.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if IE 7]> <link href="<?php echo $this->baseurl; ?> /templates/<?php echo $this->template; ?> /css/ie7only.css" rel="stylesheet" type="text/css" /> <![endif]--> <?php ?> <?php if (JRequest::getString('option') != "com_jreviews" && !(class_exists('cmsFramework') && ($jreviews =& cmsFramework::getInstance()) && isset($jreviews->listing))) { ?> <!-- mvcjr --> <?php } ?> <?php if (!$registration_page) { ?> <script type="text/javascript"> jQuery(function ($) { $('#lnav ul.menu > li > a').each( function () { if ($(this).parent().find('ul').length > 0) { $(this).click(function () {