Removing a functionality from a slot has often a dual impact: on html presentation and on php code. For example to remove a delete functionality, you've both to remove a delete button from html and not allow to execute the delete code section. It's very important to also not allow code execution because an expert user may post a forged form and delete what he/she's not allowed to delete.
Example PHP script:
<?php
function core_test_()
{
global $_obweb;
$user =& new user();
/* showing delete language button depends on having
* dellang operation (just an example, not a real operation)
*/
$show["dellang"]=$user->has(1, "dellang");
/* checking for dellang button push AND if it's allowed to push it */
if ($_GET["action"]=="dellang" AND $show["dellang"]) {
/* delete language code */
}
/* pass show array to Smarty slot template, so we can hide delete
* button if needed
*/
$_obweb->smslot->assign(array("show" => $show));
}
?>
Example HTML Smarty template:
{{if $show.dellang}}
<a href="index.php?page=core_test&action=delete">delete</a>
{{/if}}