-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path52n_vars_2.5.php
79 lines (70 loc) · 2.13 KB
/
52n_vars_2.5.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die;
include_once (dirname(__FILE__).'/52n_templatetools_2.5.php');
//$mainframe =& JFactory::getApplication('site');
$app = JFactory::getApplication();
//$tmpTools = new JA_Tools($this, array(JA_TOOL_MENU, JA_TOOL_COLOR)); //For demo
$tmpTools = new JA_Tools($this); //For release
# Auto Collapse Divs Functions ##########
$ja_left = $this->countModules('left');
$ja_right = $this->countModules('right');
if ( $ja_left && $ja_right )
{
$divid = '';
}
elseif ( $ja_left )
{
$divid = '-fr';
}
elseif ( $ja_right )
{
$divid = '-fl';
}
else
{
$divid = '-f';
}
//Main navigation
$ja_menutype = $tmpTools->getParam(JA_TOOL_MENU);
include_once( dirname(__FILE__).'/52n_menus/Base.class.php' );
// $japarams = JA_Base::createParameterObject('');
$japarams = JRegistry::getInstance('templateParams');
$japarams->set( 'menutype', $tmpTools->getParam('menutype', 'mainmenu') );
$japarams->set( 'menu_images_align', 'left' );
$japarams->set( 'menupath', $this->baseurl . "/templates/" . $this->template .'/52n_menus');
$japarams->set('menu_title', 0);
switch ($ja_menutype) {
case 'css':
$menu = "CSSmenu";
include_once( dirname(__FILE__).'/52n_menus/'.$menu.'.class.php' );
break;
case 'moo':
$menu = "Moomenu";
include_once( dirname(__FILE__).'/52n_menus/'.$menu.'.class.php' );
break;
case 'split':
default:
$japarams->set('menu_title', 0);
$menu = "CSSmenu";
include_once( dirname(__FILE__).'/52n_menus/'.$menu.'.class.php' );
break;
}
$menuclass = "JA_$menu";
$jamenu = new $menuclass ($japarams);
$hasSubnav = false;
if ($jamenu->hasSubMenu(1) && $jamenu->showSeparatedSub )
{
$hasSubnav = true;
}
//End for main navigation
?>