⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.php

📁 Joomla!是一套获得过多个奖项的内容管理系统(Content Management System, CMS)。Joomla!采用PHP+MySQL数据库开发
💻 PHP
字号:
<?php// no direct accessdefined('_JEXEC') or die('Restricted access');if ( ! defined('modMainMenuXMLCallbackDefined') ){function modMainMenuXMLCallback(&$node, $args){	$user	= &JFactory::getUser();	$menu	= &JSite::getMenu();	$active	= $menu->getActive();	$path	= isset($active) ? array_reverse($active->tree) : null;	if (($args['end']) && ($node->attributes('level') >= $args['end']))	{		$children = $node->children();		foreach ($node->children() as $child)		{			if ($child->name() == 'ul') {				$node->removeChild($child);			}		}	}	if ($node->name() == 'ul') {		foreach ($node->children() as $child)		{			if ($child->attributes('access') > $user->get('aid', 0)) {				$node->removeChild($child);			}		}	}	if (($node->name() == 'li') && isset($node->ul)) {		$node->addAttribute('class', 'parent');	}	if (isset($path) && (in_array($node->attributes('id'), $path) || in_array($node->attributes('rel'), $path)))	{		if ($node->attributes('class')) {			$node->addAttribute('class', $node->attributes('class').' active');		} else {			$node->addAttribute('class', 'active');		}	}	else	{		if (isset($args['children']) && !$args['children'])		{			$children = $node->children();			foreach ($node->children() as $child)			{				if ($child->name() == 'ul') {					$node->removeChild($child);				}			}		}	}	if (($node->name() == 'li') && ($id = $node->attributes('id'))) {		if ($node->attributes('class')) {			$node->addAttribute('class', $node->attributes('class').' item'.$id);		} else {			$node->addAttribute('class', 'item'.$id);		}	}	if (isset($path) && $node->attributes('id') == $path[0]) {		$node->addAttribute('id', 'current');	} else {		$node->removeAttribute('id');	}	$node->removeAttribute('rel');	$node->removeAttribute('level');	$node->removeAttribute('access');}	define('modMainMenuXMLCallbackDefined', true);}modMainMenuHelper::render($params, 'modMainMenuXMLCallback');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -