Results 1 to 3 of 3

Thread: [solved] Want to display member avatar in Memberlist

  1. #1
    User
    Join Date
    03-23-10.
    Location
    Canada
    Posts
    34

    Default [solved] Want to display member avatar in Memberlist

    I have been trying to get the memberlist module to display the member's avatar in the frontend. I have looked at the templates for helpdesk (which displays the avatars fine in the front end on my site) but it keeps pointing to the wrong file in the memberlist. There seems to be no way of indicating Avatar in the public fields list of the memberlist module settings in the backend. Seems an easy fix to this problem. I would find it hard to believe that I am the only person on the planet using Contao that does not want avatars included on the profile display of a member as accessed through the memberlist module, perhaps I am??
    I made changes to the mod_memberlist template (or rather, made a copy and tweaked it) to try to include pulling the avatar, but it keeps pointing to the wrong file and only displays the "default" image (the gray head). I want the avatar image in place of the "details" image (the little blue circle) so I put <?php echo Avatar::img($col['id']->avatar); ?> in the last column. The full row (including other fields) looks like this in the template (addition is in bold below):

    <tr class="<?php echo $class; ?>">
    <?php foreach ($row as $col): ?>
    <?php if ($col['field'] == 'username'): ?>
    <td class="body <?php echo $col['class']; ?>"><?php echo $col['content']; ?></td>
    <?php else: ?>
    <td class="body <?php echo $col['class']; ?>"><?php echo $col['content']; ?></td>
    <?php endif; ?>
    <?php endforeach; ?>
    <td class="body <?php echo $this->col_last; ?> col_last"><?php echo Avatar::img($col['id']->avatar); ?></td>
    </tr>

    Anyone know what I'm doing wrong? Anyone know how to display the avatars correctly using the memberlist module? Am I missing a really simple tick box somewhere in the backend settings?????

  2. #2
    User
    Join Date
    03-23-10.
    Location
    Canada
    Posts
    34

    Default Re: Want to display member avatar in Memberlist

    Still struggling with this one... the member list for this Contao forum is doing practically exactly what I want to be able to do, to show the member avatar in the member list or member detail. How does the member detail for this Contao forum work, ie. how was it set up (changes to the template? something fancy with catalogs? is it built right in to the defaults of the extension that I am somehow missing?)
    I would settle for showing the avatar in the details of the member (just like on this contao forum). Can't even make that work!

  3. #3
    User
    Join Date
    07-23-10.
    Posts
    86

    Default Re: Want to display member avatar in Memberlist

    Hi michelle,

    as memberlist ist not ready for Contao 2.11 jet, I made me List of Members with the listing module.
    I made a addition of code on the \system\modules\listing\templates\list_default.xht ml file with this code here.

    Hope it helps you.
    ciaobello

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •