Im doing my internship as a web developer in a company. we got a customer that owns a blog site that was created with joomla 3.3 . the problem is that the customer is really curious and knows nothing about computers so he is digging daily inside admin cpanel destroying things. My boss told me so to edit the joomla control panel in that way so if he log in some elements from the Admin Menu becomes invisible !
So i found out the code that creates the menu: /home/sitename/public_html/administrator/templates/isis/index.php
and the block code:
<div<?php echo ($this->params->get('admin_menus') != '0') ? ' class="nav-collapse"' : ''; ?>>
<jdoc:include type="modules" name="menu" style="none;" />
<ul class="nav nav-user<?php echo ($this->direction == 'rtl') ? ' pull-left' : ' pull-right'; ?>">
<li class="dropdown" >
I know how to make the specific elements i want invisisble:
style="<?php if($user->name=="user10") { echo "display:none;";}?>">
but The problem is that the admin menu getting included with this : <
jdoc:include type="modules" name="menu" style="none;" />
Im searching in the file public_html/administrator/modules/ but cant find anything that match it. does anyone have any idea where it could be ??
Εdit: after loads of hours i got it, so i share it if anyone else needs it in future:
**administrator/**modules/mod_menu/menu.php ( i was searching in the frontend before :S )
echo "<li" . $class . ">";
eddited to :
$user = JFactory::getUser();
$tmpvar= 'style="display:none;"';
$rekt=$this->_current->title;
if(($user->name=="user10") && ( $rekt== "Content")) {
$childcounteryo=0;
}
if (($user->name=="user10") && ( $rekt == "System") || $rekt== "Extensions" || $rekt=="Help" ) {
echo "<li" . $class . $tmpvar . ">";
}else {
echo "<li" . $class . ">";
}
foreach ($this->_current->getChildren() as $child)
{
if ($childcounteryo !=1) {
$this->_current = & $child;
$this->renderLevel($depth++);
}
$childcounteryo+=1;
}
(in content tab wanted to remove the 2nd submenu )