Re: [gkornbluth] Membership plugin - author specific photo
Hey everyone,
Ok I got it working kinda but there is some funky stuff going on. I'm going to attach a stripped down file to see if maybe that will help. So when I did the error testing again that Tom recommended, I noticed that the uploaded images from the Blog_Avatars table won't work unless there is an avatar upload form in the Accounts table as well... So now I have them both up and both with images downloaded to the tables. Anyways, using this code:
<?php if ($record['createdBy.avatar']): ?>
<?php foreach ($blog_avatarsRecord['avatar'] as $upload): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" />
<?php endforeach ?>
<?php else : ?>
<img src="images/fpo_avatar.jpg" width="75" height="75" />
<?php endif ?>
Causes the last image that has been added to the manager to be the one that shows up when there is an image created by the user. So my boss uploaded her image after I had, and now for my posts, her image comes up as well as on her own posts. The else statement works. This is the closest I have gotten with every variation of the code I can think of...
Thanks again everyone! You're lifesavers :)