<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Why does PHP need to be used. In the blocks settings you can
determine visibility for a specific roles as well as specific paths. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>For example you could say that only editors see an editing tool
bar on all pages content/* <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I may be missing what is going on here but this sounds similar than
needing to do PHP. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Steve<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Steve Kessler <o:p></o:p></span></p>

<p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#486E95'>Denver DataMan <o:p></o:p></span></b></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>303-587-4428 <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><a href="http://www.denverdataman.com/content/enewsletter-signup">Sign
up for the Denver DataMan Free eNewsletter</a></span><span style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> bharani kumar
[mailto:bharanikumariyerphp@gmail.com] <br>
<b>Sent:</b> Monday, October 06, 2008 7:34 AM<br>
<b>To:</b> support@drupal.org; nick_young@ncsu.edu<br>
<b>Subject:</b> Re: [support] block visibility based on role AND path<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>May&nbsp; this is clue,<br>
<br>
If you know&nbsp; member id,&nbsp; ,<br>
<br>
Go to block&nbsp; configure<br>
<br>
select&nbsp; &quot; Show if the following PHP code returns <code><span
style='font-size:10.0pt'>TRUE</span></code> (PHP-mode, experts only). &quot;<br>
<br>
and write the code<br>
<br>
global $user<br>
<br>
$userid=$user-&gt;uid;<br>
if($userid ==10 || $userid ==10&nbsp; ){<br>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
return TRUE;<br>
<br>
}<br>
else{<br>
<br>
return FALSE;<br>
}<br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal>On Mon, Oct 6, 2008 at 6:19 PM, Nick Young &lt;<a
href="mailto:nick_young@ncsu.edu">nick_young@ncsu.edu</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>(Issue in Drupal 6)<br>
I need a php snippet that allows me to display (or hide) a block based<br>
on whether the user logged in is a member of a certain role, and that<br>
they are browsing the site at a certain path. I am able to display a<br>
block based on one of these things, but not both.<br>
<br>
IE:<br>
I can display a block if the user is a member of a role.<br>
I can display a block at a certain path (&lt;site&gt;/node/path/x)<br>
<br>
However, if i combine the two pieces of php code, then if one of them<br>
returns true, the block shows. What i need is for it to check if the<br>
path is TRUE, and then also check for the role membership. I have tested<br>
the code externally to Drupal, to make sure the nested IF statements are<br>
working properly, and they are. It's almost as if Drupal sees the first<br>
TRUE, and then stops looking to see if there are multiple conditions to<br>
check for as well.<br>
<br>
Any ideas? Thanks in advance.<br>
<br>
........................................................................<br>
Nick Young<br>
Outreach, Communications &amp; Consulting<br>
Office of Information Technology<br>
North Carolina State University<br>
Box 7109, Raleigh 27695<br>
Ph. 919.513.2716 | E-Mail: <a href="mailto:nick_young@ncsu.edu">nick_young@ncsu.edu</a>
&lt;mailto:<a href="mailto:nick_young@ncsu.edu">nick_young@ncsu.edu</a>&gt;<br>
........................................................................<br>
<span style='color:#888888'><br>
<br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
]</span><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</body>

</html>