This project is read-only.

Adding Author Photo on Posts

Jul 19, 2010 at 9:26 PM

Hello all!

Thanks for your time in reading my post. I am wondering if there is anyway to have a photo displayed for the author in their posts. I went to the admin settings and under the profile tab added a Photo URL, but nothing shows up for that author. Are there any other changes i need to be making/missing? Thanks for any help!

Jul 20, 2010 at 11:26 AM

Even though you can enter the PhotoURL and other profile data, most of the Proflile data isn't actually being displayed anywhere.  At least the first half of the process is there!

You could modify your PostView.ascx file in your theme folder to output the image, if it exists for the Post Author.  This works with the Standard theme (probably other themes too):

<% if (Post.AuthorProfile != null && !string.IsNullOrEmpty(Post.AuthorProfile.PhotoURL)) { %>
    <img src="<%= Post.AuthorProfile.PhotoURL %>" border="0" alt="<%= Post.Author %>" />
<% } %>

Jul 20, 2010 at 4:15 PM

Sweet! works great, thank you!