Ok, I managed to create Avatars within posts for Authors. i.e. You can have an image attached to an author (or any member Really that makes an entry) and have it shown in the weblog entry. Where you put this is up to you, but it should be within your {exp:weblog:entries} {/exp:weblog:entries} tags.
First, create a custom profile field for your avatar.
- Go to Admin=>Custom Profile Fields=>Create a new profile field.
- Field Name (top) should be a unique variable name. I used “member_avatar” (without quotes)
- Field Name (second) should be what you want users to see. I used “Avatar URL” (without quotes)
- This will be a text field, with 127 max characters.
- Save the field.
Now that the custom profile field is set, find an image you would like to use as your avatar. (I’ll let you decide what sizes you want to use.) Make a note of the URL, and then go to “my profile” and update your profile with the URL for your Avatar URL. (It should show up at the bottom of the list.)
Now we go to edit the Templates. Go to where your entries are shown (usually the weblog/index) and you’ll want to put this statement in next to your name (or wherever) in the template:
{if member_avatar != ”}
<img src=”{member_avatar}” border=”0″ alt=”{name}” />
{/if}
Save your template and you’re set. You might want to test the placement of this as it can get pretty ugly on layout.
NOTES: (things you need to know)
A few things to remember is that the image shouldn’t be gigantic. That would be entirely up to you how to control it. Also note the image is a URL, so whatever you put into the field is what it’s going to show, broken or not.
If you use this little tip, let me know! I myself have no real use for it since the only person posting to this blog is myself, but for a collective blog I can Totally see the use!
- Excited
- Fascinated
- Amused
- Bored
- Sad
- Angry
In the img scr stuff, you can hard code the width with width=125, and warn users that no matter what size their avatar is set to, it’s only going to be x number of pixels wide. Wide is the important part.
I’m doing this at Online Legal Review.com which is a pMachine Classic install. During the registration process, they have the ability to upload a graphic for their avatar. If there is no avatar, I write out the link to a no photo available photo. (Using the icq for the field.)
Warning: OLR is heavily customized.
Just wanted to see how you have it set up graphically. Especially with long entries. Sorry for the upcoming lack of content!