I&#39;m trying to put together a block that will display additional information on users&#39; blog pages.&nbsp; The person I&#39;m working with wants some of the more &quot;traditional&quot; blog stuff, like a user picture, short bio, blogroll, and archives links shown in the sidebar.&nbsp; All of the actual information is supported by other modules, so I just need to be able to access it from within my theme.&nbsp; Essentially, what I&#39;m going for is to load this block whenever the node type is &#39;blog post&#39;, and populate it with the content matching the author of the node.<br>
<br>I am using a small snippet of code that someone else gave me already for displaying a title.&nbsp; This is residing in node-blog.tpl.php right now and works fine:<br>&lt;?php $the_user = user_load(array(&#39;uid&#39; =&gt; $node-&gt;uid)); ?&gt;
<br>&lt;?php if ($the_user-&gt;profile_blog_title != &quot;&quot;): ?&gt;
<br>&nbsp; &lt;h2&gt;&lt;?php print $the_user-&gt;profile_blog_title ?&gt;&lt;/h2&gt;
<br>&nbsp; &lt;?php else: ?&gt;
<br>&nbsp; &lt;h2&gt;&lt;?php print $node-&gt;name . &quot;&#39;s blog&quot; ?&gt;&lt;/h2&gt;
<br>&lt;?php endif; ?&gt;<br><br>What I&#39;ve been using so far in my module&#39;s implementation of hook_block looks like this, which is just worrying about the picture for now:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &#39;view&#39;:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $block[&#39;subject&#39;] = t(&#39;Blog&#39;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $the_user = user_load(array(&#39;uid&#39; =&gt; $node-&gt;uid));
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $user_pic = $the_user-&gt;picture;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $block[&#39;content&#39;] = $user_pic;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $block;<br><br>However, this does not return anything, and upon further investigation with print_r(), it appears to be returning the anonymous user from &#39;uid&#39;, which of course doesn&#39;t have a picture associated with it.&nbsp; Part of what I&#39;m not sure about is whether I can access the node information ($node-&gt;uid) from within the block, since it&#39;s in the sidebar, not the main content area where the node is loaded.&nbsp; Please excuse me as I&#39;m very new to PHP and Drupal development, but looking to learn.<br clear="all">
<br>-- <br>Tony Yarusso<br><a href="http://tonyyarusso.com/">http://tonyyarusso.com/</a>