<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Arial">The variable in node.tpl.php that
stores the user picture is (aptly named) $picture.&nbsp; In the template
file, just put a conditional statement that uses $picture only if it
contains something:<br>
<br>
&nbsp; &lt;?php if ($picture): ?&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;div id='user_picture'&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;?php print $picture; ?&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt; &lt;!--end picture div--&gt;<br>
&nbsp; &lt;?php endif; ?&gt;<br>
<br>
That way. the user_picture div only exists if there is actually a
picture.&nbsp; This is the way that regions are commonly laid out in a page
so that they don't show up if they don't contain any content.<br>
<br>
Steve<br>
</font></font><br>
Christopher M. Jones wrote:
<blockquote cite="mid:4935A754.4050101@partialflow.com" type="cite">
  <pre wrap="">Thanks, yes. I assumed that step. To clarify: I have pictures enabled 
and they show in my templates.  But where no picture exists, because the 
user has not uploaded one, I have a link that reads "username's 
picture". I not only want to remove that link but I want to adjust the 
layout to compensate for the lack of a picture.

Dale McGladdery wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">You didn't mention turning on Picture Support in user settings. To do
so go to Adminster | User management | User settings
(/admin/user/settings) and scroll down to the "Picture support"
section. This is where you select you default picture, as well.





On Mon, Dec 1, 2008 at 10:13 AM, Christopher M. Jones
<a class="moz-txt-link-rfc2396E" href="mailto:cjones@partialflow.com">&lt;cjones@partialflow.com&gt;</a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">I'm using Drupal five, building a theme off of Zen. I want to optionally
display a user's picture in posts, so that if the user has uploaded a
picture then it is displayed, and if not then the teaser view shifts
left to occupy that space.

So I turned on pictures in the theme configuration. But now, where there
is no picture available, I have a "soandso's picture" link.

Specifically: I want if( $picture ){...} in the .tpl.php file to
evaluate to FALSE if there is no picture, TRUE if there is one. How can
I get this behavior? Is there a theme override that I'm missing?

--
[ Drupal support list | <a class="moz-txt-link-freetext" href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]

      </pre>
    </blockquote>
  </blockquote>
</blockquote>
</body>
</html>