OK. This will be relatively easy if you have not made many modifications to function administration() in your snewsMU.php file.
1. Open the file and locate the function by searching for it.
2. If the top part of your function is still in its default state, look for these four strings, starting about 14 lines down from the top:
These strings generate the link to the "Add New" categories and "View" categories links.
<?php // disregard this tag
echo '<p>'.l('categories').': <a href="admin_category/" title="'.l('add_new').'">'.l('add_new').'</a>';
$link = ' '.l('divider').' <a href="';
if (stats('categories','') > 0) {echo $link.'categories/" title="'.l('view').'">'.l('view').'</a>';}
echo '</p>';
// disregard this tag ?>
What we need to do is wrap (enclose) them in a contitional statement string-set so that they only get generated if the condition is met. In this case, if the person logged in is the Admin. Here is the same as above but with the conditional string-set (and informational comments added).
3. Replace the four strings with this complete string-set and see how it works for you.
<?php // do not copy this tag
# If the Admin is logged in
if (get_identity($_SESSION['id'], 'level') == '1') {
# Display the "Add New" and "View" categories links
echo '<p>'.l('categories').': <a href="admin_category/" title="'.l('add_new').'">'.l('add_new').'</a>';
$link = ' '.l('divider').' <a href="';
if (stats('categories','') > 0) {echo $link.'categories/" title="'.l('view').'">'.l('view').'</a>';}
echo '</p>';
}else{
# If the Admin is NOT logged in, show the "No Access" message
echo l('mu_noaccess');
}
// do not copy ?>