<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre><span style="color: rgb(128, 128, 128);"><i>hi list
I try to hide parts of the content in relation to userrights. The skinsection </i></span>
<span style="color: rgb(128, 128, 128);"><i>&lt;!--PageCmdsFmt--&gt; should only be visible if the user has edit rights.</i></span><span
 style="color: rgb(128, 128, 128);"><i>
So I made the following configuration:


## Auth User Test (config.php)</i></span>
<span style="color: rgb(85, 85, 255);">$AuthUser</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'Guest'</span><span
 style="color: rgb(0, 128, 0);">]</span> = <span
 style="color: rgb(0, 0, 128);">crypt</span><span
 style="color: rgb(0, 128, 0);">(</span><span
 style="color: rgb(221, 0, 0);">'test'</span><span
 style="color: rgb(0, 128, 0);">);</span>
<span style="color: rgb(85, 85, 255);">$AuthUser</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'Editor'</span><span
 style="color: rgb(0, 128, 0);">]</span> = <span
 style="color: rgb(0, 0, 128);">crypt</span><span
 style="color: rgb(0, 128, 0);">(</span><span
 style="color: rgb(221, 0, 0);">'test'</span><span
 style="color: rgb(0, 128, 0);">);</span>
<span style="color: rgb(85, 85, 255);">$AuthUser</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'Admin'</span><span
 style="color: rgb(0, 128, 0);">]</span> = <span
 style="color: rgb(0, 0, 128);">crypt</span><span
 style="color: rgb(0, 128, 0);">(</span><span
 style="color: rgb(221, 0, 0);">'test'</span><span
 style="color: rgb(0, 128, 0);">);</span>

<span style="color: rgb(85, 85, 255);">$DefaultPasswords</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'admin'</span><span
 style="color: rgb(0, 128, 0);">]</span> = <span
 style="color: rgb(221, 0, 0);">'id:Admin'</span><span
 style="color: rgb(0, 128, 0);">;</span>
<span style="color: rgb(85, 85, 255);">$DefaultPasswords</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'edit'</span><span
 style="color: rgb(0, 128, 0);">]</span> = <span
 style="color: rgb(221, 0, 0);">'id:Editor'</span><span
 style="color: rgb(0, 128, 0);">;</span>
<span style="color: rgb(85, 85, 255);">$DefaultPasswords</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'read'</span><span
 style="color: rgb(0, 128, 0);">]</span> = <span
 style="color: rgb(221, 0, 0);">'id:Guest'</span><span
 style="color: rgb(0, 128, 0);">;</span>

<span style="color: rgb(161, 161, 0);">include_once</span><span
 style="color: rgb(0, 128, 0);">(</span><span
 style="color: rgb(221, 0, 0);">'scripts/authuser.php'</span><span
 style="color: rgb(0, 128, 0);">);</span>

<span style="color: rgb(85, 85, 255);">$page</span> = RetrieveAuthPage<span
 style="color: rgb(0, 128, 0);">(</span><span
 style="color: rgb(85, 85, 255);">$pagename</span><span
 style="color: rgb(0, 128, 0);">,</span> <span
 style="color: rgb(221, 0, 0);">'read'</span><span
 style="color: rgb(0, 128, 0);">,</span> <b>false</b><span
 style="color: rgb(0, 128, 0);">,</span> READPAGE_CURRENT<span
 style="color: rgb(0, 128, 0);">);</span>
<span style="color: rgb(161, 161, 0);">if</span> <span
 style="color: rgb(0, 128, 0);">(</span>!@<span
 style="color: rgb(85, 85, 255);">$page</span><span
 style="color: rgb(0, 128, 0);">[</span><span
 style="color: rgb(221, 0, 0);">'=auth'</span><span
 style="color: rgb(0, 128, 0);">][</span><span
 style="color: rgb(221, 0, 0);">'read'</span><span
 style="color: rgb(0, 128, 0);">])</span> SetTmplDisplay<span
 style="color: rgb(0, 128, 0);">(</span><span
 style="color: rgb(221, 0, 0);">'PageCmdsFmt'</span><span
 style="color: rgb(0, 128, 0);">,</span> <span
 style="color: rgb(0, 0, 255);">0</span><span
 style="color: rgb(0, 128, 0);">);</span></pre>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre><span style="color: rgb(128, 128, 128);"><i>
## skin.tmpl
&lt;!--PageCmdsFmt--&gt;</i></span>
PageCmdsBFmtPageCmdsBFmtPage
<span style="color: rgb(128, 128, 128);"><i>&lt;!--/PageCmdsFmt--&gt;</i></span></pre>
<br>
authuser works correct. But the PageCmdsFmt content is allways visible.
What I'm doing wrong here? And secound question: Is this also susposed
to work with the userauth cookbook script?<br>
<br>
grz nos<br>
<br>
</body>
</html>