Neil,<br><br>I&#39;m glad you got a solution that meets your requirements.<br><br>Would you mind adding a comment with this code and brief explanation of it purpose to the &quot;Overview on block visibility&quot; -- or adding it to the handbook page itself if you are on the docs team.<br>
<br><a href="http://drupal.org/node/64135#page-visibility" target="_blank">http://drupal.org/node/64135</a><br><br>This is an elegant solution and I don&#39;t think something like it is on that page right now.<br><br>Though this support listserve is spidered by search-engine bots, I think it would still be much harder for someone to find this email exchange than if it were posted to the handbook page.<br>
<br>Thanks,<br><br>Shai<br><br><div class="gmail_quote">On Thu, May 29, 2008 at 7:34 AM, Neil: <a href="http://esl-lounge.com">esl-lounge.com</a> &lt;<a href="mailto:neil@esl-lounge.com">neil@esl-lounge.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">great. That seems to have done the trick. Thanks<br>
<font color="#888888"><br>
Neil<br>
</font><div class="Ih2E3d"><br>
<br>
----- Original Message -----<br>
From: &quot;Richard Burford&quot; &lt;<a href="mailto:rich@freestylesystems.co.uk">rich@freestylesystems.co.uk</a>&gt;<br>
To: &lt;<a href="mailto:support@drupal.org">support@drupal.org</a>&gt;<br>
</div><div><div></div><div class="Wj3C7c">Sent: Thursday, May 29, 2008 1:08 PM<br>
Subject: Re: [support] Block visibility quandry<br>
<br>
<br>
&gt; Or maybe:<br>
&gt;<br>
&gt; &lt;?php<br>
&gt; ((arg(0) == &#39;user&#39;) &amp;&amp; is_numeric(arg(1)) &amp;&amp; (arg(2) == NULL)) ?<br>
&gt; return TRUE : return FALSE;<br>
&gt; ?&gt;<br>
&gt;<br>
&gt; Which is equivalent to:<br>
&gt;<br>
&gt; &lt;?php<br>
&gt; if ((arg(0) == &#39;user&#39;) &amp;&amp; is_numeric(arg(1)) &amp;&amp; (arg(2) == NULL)) {<br>
&gt; &nbsp; return TRUE;<br>
&gt; }<br>
&gt; else {<br>
&gt; &nbsp; return FALSE;<br>
&gt; }<br>
&gt; ?&gt;<br>
&gt;<br>
&gt; The above condition was pilfered directly from profile.module in<br>
&gt; Drupal 6.<br>
&gt;<br>
&gt; psynaptic<br>
&gt; <a href="http://freestylesystems.co.uk" target="_blank">http://freestylesystems.co.uk</a><br>
&gt; <a href="http://api.freestylesystems.co.uk" target="_blank">http://api.freestylesystems.co.uk</a><br>
&gt;<br>
&gt; On 29 May 2008, at 11:59, Richard Burford wrote:<br>
&gt;<br>
&gt;&gt; How about:<br>
&gt;&gt;<br>
&gt;&gt; &lt;?php<br>
&gt;&gt; (arg(0) == &#39;user&#39; &amp;&amp; is_numeric(arg(1)) &amp;&amp; is_null(arg(2))) ? return<br>
&gt;&gt; TRUE : return FALSE;<br>
&gt;&gt; ?&gt;<br>
&gt;&gt;<br>
&gt;&gt; psynaptic<br>
&gt;&gt; <a href="http://freestylesystems.co.uk" target="_blank">http://freestylesystems.co.uk</a><br>
&gt;&gt; <a href="http://api.freestylesystems.co.uk" target="_blank">http://api.freestylesystems.co.uk</a><br>
&gt;&gt;<br>
&gt;&gt; On 29 May 2008, at 11:46, Neil: <a href="http://esl-lounge.com" target="_blank">esl-lounge.com</a> wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; I am almost there. Right now I have:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &lt;?php<br>
&gt;&gt;&gt; if(arg(0)==user &amp;&amp; ctype_digit(arg(1)) &amp;&amp; arg(2)!=edit) {<br>
&gt;&gt;&gt; return TRUE;<br>
&gt;&gt;&gt; } else {<br>
&gt;&gt;&gt; return FALSE;<br>
&gt;&gt;&gt; }<br>
&gt;&gt;&gt; ?&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; which prevents the block from showing on user/2/edit, etc. Is there<br>
&gt;&gt;&gt; a way I can check for the existence of arg(2) and not show the block<br>
&gt;&gt;&gt; if it exists? That would eliminate user/2/edit, user/2/track, user/2/<br>
&gt;&gt;&gt; contact and some other possibilities. I could manually alter my<br>
&gt;&gt;&gt; current code to block out contact/track but I&#39;d prefer a kill-all<br>
&gt;&gt;&gt; solution.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; thanks<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Neil<br>
&gt;&gt;&gt; ----- Original Message -----<br>
&gt;&gt;&gt; From: Shai Gluskin<br>
&gt;&gt;&gt; To: <a href="mailto:support@drupal.org">support@drupal.org</a><br>
&gt;&gt;&gt; Sent: Wednesday, May 28, 2008 1:32 PM<br>
&gt;&gt;&gt; Subject: Re: [support] Block visibility quandry<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Neil,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I don&#39;t know if the UI for the block module settings will allow<br>
&gt;&gt;&gt; regular expressions. I doubt it, but give it a try and report back.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; However, what will surely work is putting in your own php. Have you<br>
&gt;&gt;&gt; noticed that radio for adding PHP to return &quot;TRUE&quot; to make block<br>
&gt;&gt;&gt; visible? That&#39;s your answer.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Here&#39;s a code snippet that should get you started:<br>
&gt;&gt;&gt; <a href="http://drupal.org/node/64135#page-visibility" target="_blank">http://drupal.org/node/64135#page-visibility</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Here is one that is a little more sophisticated which was designed<br>
&gt;&gt;&gt; for the Google Analytics module... when to include the tracking code<br>
&gt;&gt;&gt; on a page -- totally analogous to block visibility:<br>
&gt;&gt;&gt; <a href="http://drupal.org/node/261997" target="_blank">http://drupal.org/node/261997</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Good luck. And please add your snippet to the handbook page.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Shai<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, May 28, 2008 at 5:57 AM, Neil: <a href="http://esl-lounge.com" target="_blank">esl-lounge.com</a><br>
&gt;&gt;&gt; &lt;<a href="mailto:neil@esl-lounge.com">neil@esl-lounge.com</a><br>
&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; I have a block which I show on a user&#39;s main page, user/1, user/<br>
&gt;&gt;&gt; 2, etc.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; I have set block visibility to &quot;only show on pages&quot; with user/*<br>
&gt;&gt;&gt; entered below.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; Unfortunately, it&#39;s also showing on user/register, user/password.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; I don&#39;t suppose I can use regular expressions to make the<br>
&gt;&gt;&gt; wildcard ONLY numeric, can I? How would I get the block to show on<br>
&gt;&gt;&gt; user/7 but not user/register?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; Thanks<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; Neil<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; --<br>
&gt;&gt;&gt; &nbsp; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ------------------------------------------------------------------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]--<br>
&gt;&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;&gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt;<br>
&gt; --<br>
&gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt;<br>
<br>
</div></div>--<br>
<div><div></div><div class="Wj3C7c">[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br>