I've been attempting to have avatars appear next to the author's name in every node displayed on the front page, AKA LiveJournal style. The website is View Online at http://view.rit.edu. I've already installed profile.module to enable avatars.

I'm using a modified version of the Trip theme. Here's the code I've inserted...

<!--   <tr>
        <td class="node-date">

        <!-- Inserts Avatar picture here.  -->
        <?php
        $filename = profile_avatar_path($node->uid,".jpg");
        print "<img class=\"avatar\" src=\"";
          if (!file_exists($filename)) {
                $filename =  profile_avatar_path(1, ".jpg");
          }
        print $filename;
        print "\" align=\"top\">";
        ?>

          <?php print strtr(t("%a | %b"), array("%a" => format_name($node), "%b" => format_date($node->created, "medium"))); ?
>
        </td>
-->

However, it seems to be working only for two users, uid #2 and #3. Can anyone help? Thank you!

Comments

theview’s picture

Well, that was silly of me. I thought pre would work. Trying again...

So how do I insert HTML/PHP code into a post? pre and code are not working...