у меня подобная проблема! дело в том, что у меня на сайте две регистрации...для рожениц и для клиник...и нужно сделать так, что когда пользователь входит как будущая мать (группа registred) для нее скрывалось в шапке сайта "регистрация для клиник" и в меню добавлялся пунк меню "Подать заявку".....тоже самое когда входят на сайт как клиника (группа "author")...убиралась в шапке регистрация для будущих мам...и в меню появлились два новых пункта! напиши пожалуйста подробно как это сделать!
<?php
/**
* @copyright Copyright (C) 2009 JoomlaPraise. All rights reserved.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<?php // Detecting Home
$menu = & JSite::getMenu();
if ($menu->getActive() == $menu->getDefault()) {
$siteHome = 1;
}
// Detecting Active Component
$pageOption = JRequest::getVar('option', '');
// set custom template theme for user
$user = &JFactory::getUser();
if( !is_null( JRequest::getCmd('templateTheme', NULL) ) ) {
$user->setParam($this->template.'_theme', JRequest::getCmd('templateTheme'));
$user->save(true);
}
if($user->getParam($this->template.'_theme')) {
$this->params->set('templateTheme', $user->getParam($this->template.'_theme'));
}
?>
<jdoc:include type="head" />
<script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/js/reflection.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/css/<?php echo $this->params->get('templateTheme'); ?>.css" type="text/css" />
<!--[if IE 6]>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/css/ie6.css" type="text/css" />
<![endif]-->
<!-- PNG FIX -->
<!--[if IE 6]>
<style type="text/css"> img { behavior: url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/css/iepngfix.htc); } </style>
<![endif]-->
<style type="text/css">
<?php if($this->params->get('fontFamily') == "times") { ?>
body{font-family:"Times New Roman", Times, serif;}
<?php } elseif($this->params->get('fontFamily') == "courier") { ?>
body{font-family:"Courier New", Courier, monospace;}
<?php } elseif($this->params->get('fontFamily') == "georgia") { ?>
body{font-family:Georgia,"Times New Roman", Times, serif;}
<?php } ?>
<?php if($this->params->get('headingFontFamily') == "arial") { ?>
h1, h2, h3, h4, h5, h6, .componentheading, .contentheading{font-family:Arial, Helvetica, sans-serif;}
<?php } elseif($this->params->get('headingFontFamily') == "times") { ?>
h1, h2, h3, h4, h5, h6, .componentheading, .contentheading{font-family:"Times New Roman", Times, serif;}
<?php } elseif($this->params->get('headingFontFamily') == "courier") { ?>
h1, h2, h3, h4, h5, h6, .componentheading, .contentheading{font-family:"Courier New", Courier, monospace;}
<?php } ?>
<?php if(($this->countModules('left') == 0) && ($this->countModules('right') == 0)) { ?>
#mainbody {width:100%;} #content {width:100%;}
#container-inner {background:transparent url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->params->get('templateTheme'); ?>/container-inner.png) repeat-y scroll 0 0;}
#container-inner3 {background:transparent url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->params->get('templateTheme'); ?>/mainbody.png) no-repeat scroll 0 0;}
<?php } ?>
<?php if(($this->countModules('left') >= 1) && ($this->countModules('right') == 0)) { ?>
#mainbody {width:100%;} #content{width:78.125%;} #sidebar{width:20.6%;}
#container-inner {background:transparent url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->params->get('templateTheme'); ?>/container-inner-2cl.png) repeat-y scroll 0 0;}
#container-inner3 {background:transparent url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->params->get('templateTheme'); ?>/mainbody-2cl.png) no-repeat scroll 0 0;}
<?php } ?>
<?php if(($this->countModules('left') == 0) && ($this->countModules('right') >= 1)) { ?>
#content {width:100%;}
#container-inner {background:transparent url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->params->get('templateTheme'); ?>/container-inner-2cr.png) repeat-y scroll 0 0;}
#container-inner3 {background:transparent url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->params->get('templateTheme'); ?>/mainbody-2cr.png) no-repeat scroll 0 0;}
<?php } ?>
<?php if($this->params->get('fontColor')){ ?>
body{color:<?php echo $this->params->get('fontColor'); ?>}
<?php } ?>
<?php if($this->params->get('headingColor')){ ?>
h1, h2, h3, h4, h5, h6, .componentheading, .contentheading{color:<?php echo $this->params->get('headingColor'); ?>}
<?php } ?>
<?php if($this->params->get('linkColor')){ ?>
a:link, a:active, a:visited{color:<?php echo $this->params->get('linkColor'); ?>}
<?php } ?>
<?php if($this->params->get('linkHoverColor')){ ?>
a:hover{color:<?php echo $this->params->get('linkHoverColor'); ?>}
<?php } ?>
<?php if($this->params->get('elementsHeight')){ ?>
.elements .module div div div,
.elements .module_menu div div div,
.elements .module_text div div div,
.elements .module-ms1 div div div,
.elements .module-ms2 div div div,
.elements .module-ms3 div div div,
.elements .module-ms4 div div div
{height:<?php echo $this->params->get('elementsHeight'); ?>}
<?php } ?>
</style>
</head>
<body>
<div id="bar"></div>
<div id="wrapper">
<?php if (($this->countModules('user1')) || ($this->countModules('user2'))) { ?>
<div id="toolbar">
<div class="inside">
<?php if ($this->countModules('user1')) { ?>
<div id="navigation">
<jdoc:include type="modules" name="user1" />
<div class="clr"></div>
</div>
<?php } ?>
<?php if ($this->countModules('user2')) { ?>
<div id="search">
<jdoc:include type="modules" name="user2" />
<div class="clr"></div>
</div>
<?php } ?>
<div class="clr"></div>
</div>
</div>
<?php } ?>
<?php if (($this->countModules('banner1')) || ($this->countModules('banner2'))) { ?>
<div id="banner">
<?php if ($this->countModules('banner1')) { ?>
<div id="banner-left">
<jdoc:include type="modules" name="banner1" />
</div>
<?php } ?>
<?php if ($this->countModules('banner2')) { ?>
<div id="banner-right">
<jdoc:include type="modules" name="banner2" style="rounded" />
</div>
<?php } ?>
<div class="clr"></div>
</div>
<?php } ?>
<div id="header">
<div class="inside"> <a href="<?php echo $mainframe->getCfg('live_site'); ?>" id="logo" title="<?php echo $mainframe->getCfg('sitename'); ?>"></a>
<?php if ($this->countModules('inset') || $this->params->get('tagLine')) { ?>
<div id="tagline">
<jdoc:include type="modules" name="inset" />
<?php if ($this->countModules('inset') || $this->params->get('tagLine')) {
echo "<h2>" . $this->params->get('tagLine'). "</h2>";
} ?>
</div>
<?php } ?>
<div class="clr"></div>
</div>
</div>
<div id="container">
<div class="inside">
<div id="container-inner">
<div id="container-inner2">
<div id="container-inner3">
<div id="mainbody">
<div id="content">
<div class="inside">
<?php if (($this->countModules('user3')) || ($this->countModules('user4')) || ($this->countModules('user5'))) { ?>
<table width="100%" border="0" class="elements">
<tr>
<?php if ($this->countModules('user3')) { ?>
<td align="left" valign="top" class="elements-left"><jdoc:include type="modules" name="user3" style="rounded" />
</td>
<?php } ?>
<?php if ($this->countModules('user4')) { ?>
<td align="left" valign="top" class="elements-mid"><jdoc:include type="modules" name="user4" style="rounded" />
</td>
<?php } ?>
<?php if ($this->countModules('user5')) { ?>
<td align="left" valign="top" class="elements-right"><jdoc:include type="modules" name="user5" style="rounded" />
</td>
<?php } ?>
</tr>
</table>
<?php } ?>
<?php if ($this->countModules('top')) { ?>
<div id="top">
<jdoc:include type="modules" name="top" style="rounded" />
</div>
<?php } ?>
<jdoc:include type="message" />
<jdoc:include type="component" />
<?php if ($this->countModules('bottom')) { ?>
<div id="bottom">
<jdoc:include type="modules" name="bottom" style="rounded" />
</div>
<?php } ?>
<?php if (($this->countModules('user6')) || ($this->countModules('user7')) || ($this->countModules('user8'))) { ?>
<table width="100%" border="0" class="elements">
<tr>
<?php if ($this->countModules('user6')) { ?>
<td align="left" valign="top" class="elements-left"><jdoc:include type="modules" name="user6" style="rounded" />
</td>
<?php } ?>
<?php if ($this->countModules('user7')) { ?>
<td align="left" valign="top" class="elements-mid"><jdoc:include type="modules" name="user7" style="rounded" />
</td>
<?php } ?>
<?php if ($this->countModules('user8')) { ?>
<td align="left" valign="top" class="elements-right"><jdoc:include type="modules" name="user8" style="rounded" />
</td>
<?php } ?>
</tr>
</table>
<?php } ?>
</div>
</div>
<?php if ($this->countModules('left')) { ?>
<div id="sidebar">
<div class="inside">
<jdoc:include type="modules" name="left" style="rounded" />
</div>
</div>
<?php } ?>
<div class="clr"></div>
</div>
<?php if ($this->countModules('right')) { ?>
<div id="sidebar2">
<div class="inside">
<jdoc:include type="modules" name="right" style="rounded" />
</div>
</div>
<?php } ?>
<div class="clr"></div>
</div>
</div>
</div>
</div>
</div>
<?php if (($this->countModules('footer')) || ($this->countModules('user2'))) { ?>
<div id="footer">
<?php if ($this->countModules('user9')) { ?>
<div id="link">
<jdoc:include type="modules" name="user9"/>
</div>
<?php } ?>
<?php if ($this->countModules('footer')) { ?>
<div id="copy">
<jdoc:include type="modules" name="footer"/>
<?php /* You are free to remove or edit the following */ print "<a href=\"http://qsstudio.ru\" title=\"Быстрая поддержка сайтов\" target=\"_blank\">Создание и поддержка сайта от QSStudio</a>"; ?>
</div>
<?php } ?>
<div class="clr"><!--LiveInternet counter--><script type="text/javascript"><!--
document.write("<a href='http://www.liveinternet.ru/click' "+
"target=_blank><img src='http://counter.yadro.ru/hit?t44.12;r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' alt='' title='LiveInternet' "+
"border='0' width='31' height='31'><\/a>")
//--></script><!--/LiveInternet-->
</div>
</div>
<?php } ?>
</div>
</body>
</html>