/user will present a login form to anonymous users, as well.<br><br><div class="gmail_quote">2009/6/10 sinkingfish <span dir="ltr">&lt;<a href="mailto:sinkingfish@gmail.com">sinkingfish@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
ok so I was having a bit of a look about and thought of this :<br>
create a page notd and add the code below with the php input format.<br>
<br>
<br>
&lt;?php<br>
<br>
if (!$user-&gt;uid) {<br>
    print drupal_get_form(&#39;user_login&#39;);<br>
} else {<br>
drupal_goto(&#39;/admin&#39;);<br>
}<br>
<br>
?&gt;<br>
<br>
<br>
but the site doesn&#39;t redirect to admin, it redirects to the user&#39;s history<br>
page :(<br>
<div><div></div><div class="h5"><br>
<br>
sinkingfish wrote:<br>
&gt;<br>
&gt; Thanks for the reply. Just a few q&#39;s :)<br>
&gt;<br>
&gt; If I disable the log in for on the admin screens. How do I then gain<br>
&gt; access to the site? Would you be better displaying the login on a specific<br>
&gt; page? eg <a href="http://www.example.com/cms" target="_blank">www.example.com/cms</a> ? Can you set a theme for different node,<br>
&gt; i.e. garland (my admin theme) to the path /cms<br>
&gt;<br>
&gt; I&#39;m just starting out using Drupal but so far I&#39;m loving it<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Seth Freach wrote:<br>
&gt;&gt;<br>
&gt;&gt; Brian,<br>
&gt;&gt;<br>
&gt;&gt; Are you wanting to only hide the login block? If so, either of the below<br>
&gt;&gt; relatively quick options should work for you. Do which ever works best<br>
&gt;&gt; for your needs, you don&#39;t need to do both.<br>
&gt;&gt;<br>
&gt;&gt; 1) via the clicking in the browser:<br>
&gt;&gt;  - go to ?q=admin/build/block/configure/user/0<br>
&gt;&gt;  - in the &quot;Page specific visibility settings&quot; section, select the first<br>
&gt;&gt; option: &quot;show on every except...&quot;<br>
&gt;&gt;  - in the pages: text block in that section, enter 2 lines:<br>
&gt;&gt;      admin<br>
&gt;&gt;      admin/*<br>
&gt;&gt;  - click &quot;save block&quot;<br>
&gt;&gt;<br>
&gt;&gt; 2) via theme code:<br>
&gt;&gt;  - in your theme&#39;s directory, find a file named &#39;block.tpl.php&#39;<br>
&gt;&gt;  - copy that to a new file named &#39;block-user-0.tpl.php&#39;<br>
&gt;&gt;  - add the following code near the top of the new file:<br>
&gt;&gt; &lt;?php<br>
&gt;&gt; if (arg(0) == &#39;admin&#39; &amp;&amp; !$user-&gt;uid) {<br>
&gt;&gt;   return;<br>
&gt;&gt; }<br>
&gt;&gt; ?&gt;<br>
&gt;&gt;<br>
&gt;&gt; Or are you looking to deliver a 404 message at the /admin path to<br>
&gt;&gt; anonymous visitors? If this is your need, you&#39;d be better off doing it<br>
&gt;&gt; in module code, rather than at the theme layer.<br>
&gt;&gt;<br>
&gt;&gt; Seth<br>
&gt;&gt;<br>
&gt;&gt; sinkingfish wrote:<br>
&gt;&gt;&gt; Hi<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m wondering to hide the admin zone, so if someone goes to<br>
&gt;&gt;&gt; <a href="http://www.example.com/admin" target="_blank">www.example.com/admin</a> they aren&#39;t presented with a login to my site.<br>
&gt;&gt;&gt; I&#39;ve<br>
&gt;&gt;&gt; been looking around and can&#39;t find anything on this, surly this would be<br>
&gt;&gt;&gt; a<br>
&gt;&gt;&gt; common issue.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Any hints and tips welcome.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brian<br>
&gt;&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://www.nabble.com/Hiding-admin-section---log-in---tp23964571p23969911.html" target="_blank">http://www.nabble.com/Hiding-admin-section---log-in---tp23964571p23969911.html</a><br>

<div><div></div><div class="h5">Sent from the Drupal - Support mailing list archive at Nabble.com.<br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Quiller<br><br><a href="mailto:quiller@quiller.org">quiller@quiller.org</a><br><a href="http://www.quiller.org">http://www.quiller.org</a><br>